Contributing

How to contribute to multiPhysicsFoam.

Thank you for considering contributing to multiPhysicsFoam! Whether you fix a bug, add a new region or interface type, improve a tutorial or the documentation, every contribution helps.

The source code is hosted on Bitbucket: bitbucket.org/hmarschall/multiphysicsfoam.

Reporting Bugs and Requesting Features

Once a new issue tracker is available, please include the following in a bug report:

  • A concise and descriptive title.

  • Steps to reproduce the issue, and the behaviour you expected.

  • Relevant details, such as logs, error messages or screenshots, and a description of your environment:

    - OS version: Ubuntu 24.04 LTS
    - OpenFOAM version: v2512
    - multiPhysicsFoam version/commit: <git commit hash>
    
  • Ideally, a minimal case that reproduces the problem.

Feature requests should be titled Feature request: <feature title> and describe the proposed feature and its benefit for multiPhysicsFoam.

Submitting Code Changes

Step 1: Fork and Clone

  1. Fork the repository on Bitbucket.

  2. Clone your fork and create a branch for your change:

    git clone https://bitbucket.org/<your-username>/multiphysicsfoam.git
    cd multiphysicsfoam
    git checkout -b feat/my-new-feature
    

Step 2: Make Your Changes

  • Follow the OpenFOAM coding style guide and the structure and naming of the existing code.
  • The code must compile against an unmodified OpenFOAM installation of every supported version (currently OpenFOAM v2512 and v2606). Do not require patches to OpenFOAM itself; missing core functionality belongs in multiPhysicsFoam.
  • Build everything with ./Allwmake and check that it finishes without errors.
  • New region types, interface types and boundary conditions are compiled into libmultiRegionSystem: add the .C file to src/multiRegionSystem/Make/files. See Adding Region Physics Types, Adding Interface Physics Types and Adding Coupled BCs.
  • There is no unit-test suite: the tutorials are the tests. Run the tutorials affected by your change, and add or update a tutorial case if you add new functionality.
  • Document your code with clear comments.

Step 3: Document Your Changes

Every region type, interface type, boundary condition and utility has a page in the docs/ directory of the code repository. These pages are used in this website, so please add or update them along with your code:

ComponentDocumentation fileTemplate
Region typedocs/regions/<regionType>.mddocs/regions/_template.md
Interface typedocs/interfaces/<interfaceType>.mddocs/interfaces/_template.md
Boundary conditiondocs/boundaryConditions/{coupled,uncoupled}/<bcType>.mddocs/boundaryConditions/_template.md
Utilitydocs/utilities/<name>.mddocs/utilities/_template.md

Keep the front matter of these files Hugo-compatible (title, description, tags, weight).

Step 4: Commit Your Changes

Write clear, descriptive commit messages following the Conventional Commits format <type>[(<scope>)]: <description>, where <type> is one of feat, fix, docs, port, style, refactor, perf, test, build, ci, chore or revert:

git add src/regions/myRegion/myRegion.C
git commit -m "feat(regions): add myRegion region type"

Step 5: Push and Open a Pull Request

Push your branch to your fork:

git push -u origin feat/my-new-feature

Then open a pull request against the main branch of the multiPhysicsFoam repository on Bitbucket. Include:

  • A clear title in the same format as the commit messages, e.g. fix(tutorials): port HronTurekFsi3 to OpenFOAM.com.
  • A detailed description of your changes and the motivation behind them.
  • Instructions or example cases to test your contribution, e.g. which tutorials you ran.

Contributing to the Documentation

Documentation of individual components belongs in the code repository (see Step 3). General pages of this website, such as the getting-started guide or this page, live in the website repository on GitHub: github.com/CoHabes/multiPhysicsFoamDocumentation. Pull requests there are welcome as well.

Thank you for contributing to multiPhysicsFoam!