multiphasepy 4.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. multiphasepy-4.0.0/.gitignore +201 -0
  2. multiphasepy-4.0.0/PKG-INFO +172 -0
  3. multiphasepy-4.0.0/README.md +111 -0
  4. multiphasepy-4.0.0/multiphasepy/__init__.py +30 -0
  5. multiphasepy-4.0.0/multiphasepy/assets/header_templates/c++_foundation.jinja +30 -0
  6. multiphasepy-4.0.0/multiphasepy/assets/header_templates/c++_hzdr.jinja +46 -0
  7. multiphasepy-4.0.0/multiphasepy/assets/header_templates/config_openfoam_foundation.jinja +17 -0
  8. multiphasepy-4.0.0/multiphasepy/assets/header_templates/config_openfoam_hzdr.jinja +17 -0
  9. multiphasepy-4.0.0/multiphasepy/assets/header_templates/shell_foundation.jinja +35 -0
  10. multiphasepy-4.0.0/multiphasepy/assets/header_templates/shell_hzdr.jinja +50 -0
  11. multiphasepy-4.0.0/multiphasepy/auxiliary.py +423 -0
  12. multiphasepy-4.0.0/multiphasepy/case.py +680 -0
  13. multiphasepy-4.0.0/multiphasepy/cfd/__init__.py +11 -0
  14. multiphasepy-4.0.0/multiphasepy/cfd/foam.py +309 -0
  15. multiphasepy-4.0.0/multiphasepy/cfd/foamlexer.py +598 -0
  16. multiphasepy-4.0.0/multiphasepy/cli/__init__.py +15 -0
  17. multiphasepy-4.0.0/multiphasepy/cli/callbacks.py +185 -0
  18. multiphasepy-4.0.0/multiphasepy/cli/cliutils.py +138 -0
  19. multiphasepy-4.0.0/multiphasepy/cli/convert.py +72 -0
  20. multiphasepy-4.0.0/multiphasepy/cli/copy.py +90 -0
  21. multiphasepy-4.0.0/multiphasepy/cli/decorators.py +353 -0
  22. multiphasepy-4.0.0/multiphasepy/cli/docker.py +264 -0
  23. multiphasepy-4.0.0/multiphasepy/cli/fuzzy.py +131 -0
  24. multiphasepy-4.0.0/multiphasepy/cli/hooks.py +326 -0
  25. multiphasepy-4.0.0/multiphasepy/cli/identify.py +106 -0
  26. multiphasepy-4.0.0/multiphasepy/cli/post.py +219 -0
  27. multiphasepy-4.0.0/multiphasepy/cli/publish.py +164 -0
  28. multiphasepy-4.0.0/multiphasepy/cli/rpcmp.py +82 -0
  29. multiphasepy-4.0.0/multiphasepy/cli/rpdiff.py +86 -0
  30. multiphasepy-4.0.0/multiphasepy/cli/shrun.py +76 -0
  31. multiphasepy-4.0.0/multiphasepy/cli/test.py +91 -0
  32. multiphasepy-4.0.0/multiphasepy/cli/visualize.py +210 -0
  33. multiphasepy-4.0.0/multiphasepy/cli/watch.py +366 -0
  34. multiphasepy-4.0.0/multiphasepy/cli/workflow.py +154 -0
  35. multiphasepy-4.0.0/multiphasepy/exceptions.py +115 -0
  36. multiphasepy-4.0.0/multiphasepy/fuzzy.py +411 -0
  37. multiphasepy-4.0.0/multiphasepy/hooks/__init__.py +30 -0
  38. multiphasepy-4.0.0/multiphasepy/hooks/copyright.py +523 -0
  39. multiphasepy-4.0.0/multiphasepy/hooks/header_ifndef.py +59 -0
  40. multiphasepy-4.0.0/multiphasepy/hooks/keywords.py +128 -0
  41. multiphasepy-4.0.0/multiphasepy/hooks/line_length.py +32 -0
  42. multiphasepy-4.0.0/multiphasepy/hooks/nonstandardcode.py +44 -0
  43. multiphasepy-4.0.0/multiphasepy/hooks/preview_encoding.py +41 -0
  44. multiphasepy-4.0.0/multiphasepy/hooks/tabs.py +36 -0
  45. multiphasepy-4.0.0/multiphasepy/io.py +656 -0
  46. multiphasepy-4.0.0/multiphasepy/logutils.py +21 -0
  47. multiphasepy-4.0.0/multiphasepy/metrics.py +93 -0
  48. multiphasepy-4.0.0/multiphasepy/oci/__init__.py +32 -0
  49. multiphasepy-4.0.0/multiphasepy/oci/apptainer.py +491 -0
  50. multiphasepy-4.0.0/multiphasepy/oci/docker.py +706 -0
  51. multiphasepy-4.0.0/multiphasepy/oci/oci.py +515 -0
  52. multiphasepy-4.0.0/multiphasepy/post.py +398 -0
  53. multiphasepy-4.0.0/multiphasepy/rodare.py +563 -0
  54. multiphasepy-4.0.0/multiphasepy/rpcmp.py +285 -0
  55. multiphasepy-4.0.0/multiphasepy/stream.py +92 -0
  56. multiphasepy-4.0.0/multiphasepy/testing.py +44 -0
  57. multiphasepy-4.0.0/multiphasepy/visualization.py +457 -0
  58. multiphasepy-4.0.0/multiphasepy/workflow.py +333 -0
  59. multiphasepy-4.0.0/pyproject.toml +340 -0
@@ -0,0 +1,201 @@
1
+ # Created by https://www.toptal.com/developers/gitignore/api/python
2
+ # Edit at https://www.toptal.com/developers/gitignore?templates=python
3
+
4
+ ### macOS ###
5
+ .DS_Store
6
+ .AppleDouble
7
+ .LSOverride
8
+
9
+ # Project specific files ###
10
+ docs/modules.rst
11
+ docs/multiphasepy.rst
12
+ docs/multiphasepy.*.rst
13
+ docs/_build
14
+ **/_version.py
15
+ tests/data/**/postProcessing/**/fuzzy
16
+ tests/data/case/jinja2/case.yml
17
+ megalinter-reports
18
+ report.xml
19
+ flask
20
+
21
+ # Apptainer files
22
+ *.sif
23
+ *.def
24
+
25
+ # VS Code
26
+ **/.vscode
27
+ *.code-workspace
28
+ .history/
29
+ .history
30
+ .ionide
31
+ .devcontainer.json
32
+
33
+
34
+ ### Python ###
35
+ # Byte-compiled / optimized / DLL files
36
+ __pycache__/
37
+ *.py[cod]
38
+ *$py.class
39
+
40
+ # C extensions
41
+ *.so
42
+
43
+ # Distribution / packaging
44
+ .Python
45
+ build/
46
+ develop-eggs/
47
+ dist/
48
+ downloads/
49
+ eggs/
50
+ .eggs/
51
+ lib/
52
+ lib64/
53
+ parts/
54
+ sdist/
55
+ var/
56
+ wheels/
57
+ share/python-wheels/
58
+ *.egg-info/
59
+ .installed.cfg
60
+ *.egg
61
+ MANIFEST
62
+
63
+ # PyInstaller
64
+ # Usually these files are written by a python script from a template
65
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
66
+ *.manifest
67
+ *.spec
68
+
69
+ # Installer logs
70
+ pip-log.txt
71
+ pip-delete-this-directory.txt
72
+
73
+ # Unit test / coverage reports
74
+ htmlcov/
75
+ .tox/
76
+ .nox/
77
+ .coverage
78
+ .coverage.*
79
+ .cache
80
+ nosetests.xml
81
+ coverage.xml
82
+ *.cover
83
+ *.py,cover
84
+ .hypothesis/
85
+ .pytest_cache/
86
+ cover/
87
+
88
+ # Translations
89
+ *.mo
90
+ *.pot
91
+
92
+ # Django stuff:
93
+ *.log
94
+ local_settings.py
95
+ db.sqlite3
96
+ db.sqlite3-journal
97
+
98
+ # Flask stuff:
99
+ instance/
100
+ .webassets-cache
101
+
102
+ # Scrapy stuff:
103
+ .scrapy
104
+
105
+ # PyBuilder
106
+ .pybuilder/
107
+ target/
108
+
109
+ # Jupyter Notebook
110
+ .ipynb_checkpoints
111
+
112
+ # IPython
113
+ profile_default/
114
+ ipython_config.py
115
+
116
+ # pyenv
117
+ # For a library or package, you might want to ignore these files since the code is
118
+ # intended to run in multiple environments; otherwise, check them in:
119
+ # .python-version
120
+
121
+ # pipenv
122
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
123
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
124
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
125
+ # install all needed dependencies.
126
+ #Pipfile.lock
127
+
128
+ # poetry
129
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
130
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
131
+ # commonly ignored for libraries.
132
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
133
+ #poetry.lock
134
+
135
+ # pdm
136
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
137
+ #pdm.lock
138
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
139
+ # in version control.
140
+ # https://pdm.fming.dev/#use-with-ide
141
+ .pdm.toml
142
+
143
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
144
+ __pypackages__/
145
+
146
+ # Celery stuff
147
+ celerybeat-schedule
148
+ celerybeat.pid
149
+
150
+ # SageMath parsed files
151
+ *.sage.py
152
+
153
+ # Environments
154
+ .env
155
+ .venv
156
+ env/
157
+ venv/
158
+ ENV/
159
+ env.bak/
160
+ venv.bak/
161
+
162
+ # Spyder project settings
163
+ .spyderproject
164
+ .spyproject
165
+
166
+ # Rope project settings
167
+ .ropeproject
168
+
169
+ # mkdocs documentation
170
+ /site
171
+
172
+ # mypy
173
+ .mypy_cache/
174
+ .dmypy.json
175
+ dmypy.json
176
+
177
+ # Pyre type checker
178
+ .pyre/
179
+
180
+ # pytype static type analyzer
181
+ .pytype/
182
+
183
+ # Cython debug symbols
184
+ cython_debug/
185
+
186
+ # PyCharm
187
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
188
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
189
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
190
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
191
+ #.idea/
192
+
193
+ ### Python Patch ###
194
+ # Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
195
+ poetry.toml
196
+
197
+ # ruff
198
+ .ruff_cache/
199
+
200
+ # LSP config files
201
+ pyrightconfig.json
@@ -0,0 +1,172 @@
1
+ Metadata-Version: 2.4
2
+ Name: multiphasepy
3
+ Version: 4.0.0
4
+ Summary: Toolkit for reproducible multiphase CFD workflows.
5
+ Project-URL: Documentation, https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/
6
+ Project-URL: Repository, https://codebase.helmholtz.cloud/fwdc/public/python.git
7
+ Project-URL: Issues, https://codebase.helmholtz.cloud/fwdc/public/python/-/issues
8
+ Project-URL: Changelog, https://codebase.helmholtz.cloud/fwdc/public/python/-/blob/main/CHANGELOG.md
9
+ Project-URL: DOI, https://doi.org/10.14278/rodare.3093
10
+ Project-URL: HELMHOLTZ-Software, https://helmholtz.software/software/multiphase-python-repository-by-hzdr
11
+ Author-email: "Members of the Department of Computational Fluid Dynamics at Helmholtz-Zentrum Dresden-Rossendorf e.V. (HZDR)" <f.schlegel@hzdr.de>
12
+ Maintainer-email: "Schlegel, Fabian" <f.schlegel@hzdr.de>, "Fombonne, Clement" <clement.fombonne@framatome.com>, "Hänsch, Susann" <s.haensch@hzdr.de>, "Krull, Benjamin" <b.krull@hzdr.de>, "Lehnigk, Ronald" <r.lehnigk@hzdr.de>, "Meller, Richard" <r.meller@hzdr.de>
13
+ License: GPL-3.0-or-later
14
+ Keywords: Gitlab,Numerical Simulations,Post-Processing,Python
15
+ Classifier: Development Status :: 3 - Alpha
16
+ Classifier: Intended Audience :: Information Technology
17
+ Classifier: Intended Audience :: Science/Research
18
+ Classifier: Operating System :: MacOS :: MacOS X
19
+ Classifier: Operating System :: POSIX :: Linux
20
+ Classifier: Programming Language :: Python :: 3
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Topic :: Scientific/Engineering
23
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
+ Requires-Python: >=3.12
25
+ Requires-Dist: astropy>=6.1.3
26
+ Requires-Dist: copier>=9.2.0
27
+ Requires-Dist: dask>=2025.5.1
28
+ Requires-Dist: fabric>=3.2.2
29
+ Requires-Dist: gitpython>=3.1.45
30
+ Requires-Dist: identify>=2.6.12
31
+ Requires-Dist: jinja2>=3.1.2
32
+ Requires-Dist: markdown>=3.6
33
+ Requires-Dist: matplotlib>=3.10.8
34
+ Requires-Dist: mistune>=3.0.2
35
+ Requires-Dist: numpy<2.5.0,>=1.21.5
36
+ Requires-Dist: paramiko>=3.5.1
37
+ Requires-Dist: pygments==2.20.0
38
+ Requires-Dist: pyvista>=0.46.4
39
+ Requires-Dist: pyyaml==6.0.3
40
+ Requires-Dist: requests>=2.32.3
41
+ Requires-Dist: rich-argparse>=1.4.0
42
+ Requires-Dist: rich-click>=1.9.5
43
+ Requires-Dist: scikit-fuzzy>=0.5.0
44
+ Requires-Dist: scipy>=1.8.0
45
+ Requires-Dist: snakemake-executor-plugin-cluster-generic==1.0.9
46
+ Requires-Dist: snakemake==9.5.0
47
+ Requires-Dist: watchdog>=3.0.0
48
+ Provides-Extra: dev
49
+ Requires-Dist: black; extra == 'dev'
50
+ Requires-Dist: build; extra == 'dev'
51
+ Requires-Dist: myst-parser; extra == 'dev'
52
+ Requires-Dist: pre-commit>=3.8.0; extra == 'dev'
53
+ Requires-Dist: pytest>=8; extra == 'dev'
54
+ Requires-Dist: requests-mock; extra == 'dev'
55
+ Requires-Dist: ruff; extra == 'dev'
56
+ Requires-Dist: sphinx; extra == 'dev'
57
+ Requires-Dist: sphinx-rtd-theme; extra == 'dev'
58
+ Requires-Dist: tox>=4.19; extra == 'dev'
59
+ Requires-Dist: xvfbwrapper>=0.2.18; extra == 'dev'
60
+ Description-Content-Type: text/markdown
61
+
62
+ # Multiphase Python Repository by HZDR
63
+
64
+ The `multiphasepy` package is a Python toolkit for building, running, and
65
+ maintaining CFD simulation case collections for the software released by the
66
+ [OpenFOAM Foundation](https://openfoam.org) (but also others, like Ansys Fluent
67
+ or Siemens Simcenter Star-CCM). It combines reusable library modules with
68
+ practical command-line tools to cover the full simulation lifecycle: case
69
+ templating, batch execution, monitoring, post-processing, validation support,
70
+ repository comparison, and publication workflows.
71
+
72
+ At its core, `multiphasepy` helps teams move from individual case setups to
73
+ scalable, structured projects containing a large collection of setups, e.g. a
74
+ validation database. Cases can be provided as templates that are parameterized
75
+ at runtime, metadata can be managed in a machine-readable way and cases can be
76
+ conveniently batch-processed with the workflow management tool
77
+ [Snakemake](https://snakemake.github.io/) both on workstations and
78
+ [Slurm](https://slurm.schedmd.com/)-based HPC systems. Using a container-based
79
+ software environment (e.g. [Apptainer](https://apptainer.org/) or
80
+ [Docker](https://www.docker.com/)) the case collection becomes fully portable.
81
+ An integrated [Copier](https://copier.readthedocs.io/) template allows the
82
+ creation and maintenance of multiple independent case collections.
83
+
84
+ Beyond execution, the package supports quality assurance and communication of
85
+ results: tools are included for automated checks, fuzzy-logic based evaluation,
86
+ data conversion, visualization, and generation of artifacts suitable for
87
+ reporting and dissemination. This makes multiphasepy a practical bridge
88
+ between day-to-day CFD case work and long-term, reproducible research software
89
+ operations in collaborative environments.
90
+
91
+ ## Command-Line Tools
92
+
93
+ The multiphasepy package provides a comprehensive suite of command-line tools
94
+ for CFD workflow management, data processing, and quality assurance. All tools
95
+ follow the naming convention `mpy<function>` and provide `--help` for detailed
96
+ usage information.
97
+
98
+ ### Workflow Management
99
+
100
+ - [**mpycopy**](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/cli-tools/mpycopy.html)
101
+ : Copy and render templated cases
102
+ - [**mpydocker**](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/cli-tools/mpycopy.html/cli-tools/mpydocker.html)
103
+ : Launch customizable Docker development environments
104
+ - [**mpywatch**](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/cli-tools/mpywatch.html)
105
+ : Progress display and real-time data visualization
106
+ - [**mpyworkflow**](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/cli-tools/mpyworkflow.html)
107
+ : Create and manage cases projects allowing [batch processing](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/batch-processing.html)
108
+
109
+ ### Data Processing
110
+
111
+ - [**mpyconv**](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/cli-tools/mpyconv.html)
112
+ : Convert data files between formats
113
+ - [**mpypost**](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/cli-tools/mpypost.html)
114
+ : Mathematical post-processing operations
115
+ - [**mpyvisualize**](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/cli-tools/mpyvisualize.html)
116
+ : Visualize simulation result files
117
+
118
+ ### Quality Assurance
119
+
120
+ - [**mpytest**](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/cli-tools/mpytest.html)
121
+ : Run CFD code functionality tests
122
+ - [**mpyfuzzy**](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/cli-tools/mpyfuzzy.html)
123
+ : Evaluate simulation goodness using fuzzy logic
124
+ - [**mpyhooks**](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/cli-tools/mpyhooks.html)
125
+ : Run git hooks for code quality checks
126
+
127
+ ### Utilities
128
+
129
+ - [**mpyidentify**](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/cli-tools/mpyidentify.html)
130
+ : Identify file types and associate tags
131
+ - [**mpyrpcmp**](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/cli-tools/mpyrpcmp.html)
132
+ : Compare two repositories (file-based)
133
+ - [**mpyrpdiff**](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/cli-tools/mpyrpdiff.html)
134
+ : Compare repositories using git diff
135
+ - [**mpyshrun**](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/cli-tools/mpyshrun.html)
136
+ : Wrap shell commands with logging
137
+
138
+ ### Publishing
139
+
140
+ - [**mpypublish**](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/cli-tools/mpypublish.html)
141
+ : Publish software to Rodare repository
142
+
143
+ ## Installation
144
+
145
+ The `multiphasepy` package requires Python 3.12 or newer.
146
+
147
+ Install the latest release from PyPI:
148
+
149
+ ```bash
150
+ pip install multiphasepy
151
+ ```
152
+
153
+ For full environment setup and platform-specific notes, see the installation
154
+ guide in the documentation.
155
+
156
+ ## How to cite us?
157
+
158
+ If you find that package useful, please cite as
159
+
160
+ ```text
161
+ Schlegel et al. (2026). Multiphase Python Repository by HZDR. Rodare.
162
+ <https://doi.org/10.14278/rodare.3093>.
163
+ ```
164
+
165
+ ## Acknowledgements
166
+
167
+ OpenFOAM® is a registered trade mark of OpenCFD Limited, producer and
168
+ distributor of the OpenFOAM® software via
169
+ [www.openfoam.com](https://openfoam.com). The Multiphase Python Repository by
170
+ HZDR is not compatible with the software released by OpenCFD Limited, but is
171
+ developed for the software released by the OpenFOAM Foundation via
172
+ [www.openfoam.org](https://openfoam.org).
@@ -0,0 +1,111 @@
1
+ # Multiphase Python Repository by HZDR
2
+
3
+ The `multiphasepy` package is a Python toolkit for building, running, and
4
+ maintaining CFD simulation case collections for the software released by the
5
+ [OpenFOAM Foundation](https://openfoam.org) (but also others, like Ansys Fluent
6
+ or Siemens Simcenter Star-CCM). It combines reusable library modules with
7
+ practical command-line tools to cover the full simulation lifecycle: case
8
+ templating, batch execution, monitoring, post-processing, validation support,
9
+ repository comparison, and publication workflows.
10
+
11
+ At its core, `multiphasepy` helps teams move from individual case setups to
12
+ scalable, structured projects containing a large collection of setups, e.g. a
13
+ validation database. Cases can be provided as templates that are parameterized
14
+ at runtime, metadata can be managed in a machine-readable way and cases can be
15
+ conveniently batch-processed with the workflow management tool
16
+ [Snakemake](https://snakemake.github.io/) both on workstations and
17
+ [Slurm](https://slurm.schedmd.com/)-based HPC systems. Using a container-based
18
+ software environment (e.g. [Apptainer](https://apptainer.org/) or
19
+ [Docker](https://www.docker.com/)) the case collection becomes fully portable.
20
+ An integrated [Copier](https://copier.readthedocs.io/) template allows the
21
+ creation and maintenance of multiple independent case collections.
22
+
23
+ Beyond execution, the package supports quality assurance and communication of
24
+ results: tools are included for automated checks, fuzzy-logic based evaluation,
25
+ data conversion, visualization, and generation of artifacts suitable for
26
+ reporting and dissemination. This makes multiphasepy a practical bridge
27
+ between day-to-day CFD case work and long-term, reproducible research software
28
+ operations in collaborative environments.
29
+
30
+ ## Command-Line Tools
31
+
32
+ The multiphasepy package provides a comprehensive suite of command-line tools
33
+ for CFD workflow management, data processing, and quality assurance. All tools
34
+ follow the naming convention `mpy<function>` and provide `--help` for detailed
35
+ usage information.
36
+
37
+ ### Workflow Management
38
+
39
+ - [**mpycopy**](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/cli-tools/mpycopy.html)
40
+ : Copy and render templated cases
41
+ - [**mpydocker**](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/cli-tools/mpycopy.html/cli-tools/mpydocker.html)
42
+ : Launch customizable Docker development environments
43
+ - [**mpywatch**](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/cli-tools/mpywatch.html)
44
+ : Progress display and real-time data visualization
45
+ - [**mpyworkflow**](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/cli-tools/mpyworkflow.html)
46
+ : Create and manage cases projects allowing [batch processing](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/batch-processing.html)
47
+
48
+ ### Data Processing
49
+
50
+ - [**mpyconv**](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/cli-tools/mpyconv.html)
51
+ : Convert data files between formats
52
+ - [**mpypost**](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/cli-tools/mpypost.html)
53
+ : Mathematical post-processing operations
54
+ - [**mpyvisualize**](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/cli-tools/mpyvisualize.html)
55
+ : Visualize simulation result files
56
+
57
+ ### Quality Assurance
58
+
59
+ - [**mpytest**](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/cli-tools/mpytest.html)
60
+ : Run CFD code functionality tests
61
+ - [**mpyfuzzy**](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/cli-tools/mpyfuzzy.html)
62
+ : Evaluate simulation goodness using fuzzy logic
63
+ - [**mpyhooks**](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/cli-tools/mpyhooks.html)
64
+ : Run git hooks for code quality checks
65
+
66
+ ### Utilities
67
+
68
+ - [**mpyidentify**](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/cli-tools/mpyidentify.html)
69
+ : Identify file types and associate tags
70
+ - [**mpyrpcmp**](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/cli-tools/mpyrpcmp.html)
71
+ : Compare two repositories (file-based)
72
+ - [**mpyrpdiff**](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/cli-tools/mpyrpdiff.html)
73
+ : Compare repositories using git diff
74
+ - [**mpyshrun**](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/cli-tools/mpyshrun.html)
75
+ : Wrap shell commands with logging
76
+
77
+ ### Publishing
78
+
79
+ - [**mpypublish**](https://multiphase-python-repository-by-hzdr.readthedocs.io/en/latest/cli-tools/mpypublish.html)
80
+ : Publish software to Rodare repository
81
+
82
+ ## Installation
83
+
84
+ The `multiphasepy` package requires Python 3.12 or newer.
85
+
86
+ Install the latest release from PyPI:
87
+
88
+ ```bash
89
+ pip install multiphasepy
90
+ ```
91
+
92
+ For full environment setup and platform-specific notes, see the installation
93
+ guide in the documentation.
94
+
95
+ ## How to cite us?
96
+
97
+ If you find that package useful, please cite as
98
+
99
+ ```text
100
+ Schlegel et al. (2026). Multiphase Python Repository by HZDR. Rodare.
101
+ <https://doi.org/10.14278/rodare.3093>.
102
+ ```
103
+
104
+ ## Acknowledgements
105
+
106
+ OpenFOAM® is a registered trade mark of OpenCFD Limited, producer and
107
+ distributor of the OpenFOAM® software via
108
+ [www.openfoam.com](https://openfoam.com). The Multiphase Python Repository by
109
+ HZDR is not compatible with the software released by OpenCFD Limited, but is
110
+ developed for the software released by the OpenFOAM Foundation via
111
+ [www.openfoam.org](https://openfoam.org).
@@ -0,0 +1,30 @@
1
+ # Multiphase Python Repository by HZDR
2
+ #
3
+ # SPDX-FileCopyrightText: 2025 Helmholtz-Zentrum Dresden-Rossendorf e.V. (HZDR)
4
+ #
5
+ # SPDX-License-Identifier: GPL-3.0-or-later
6
+
7
+ """Mark this directory as multiphasepy Python package.
8
+
9
+ Attributes:
10
+ pkgversion (str): Installed version of the package
11
+ """
12
+
13
+ from importlib.metadata import version as get_installed_version
14
+
15
+ from packaging.version import Version
16
+
17
+ pkgversion = get_installed_version(str(__package__))
18
+
19
+
20
+ def minimum_version(minversion: str):
21
+ """Check that the installed version meets the minimum required version.
22
+
23
+ Args:
24
+ minversion: Minimum required version.
25
+ """
26
+ if Version(pkgversion) < Version(minversion):
27
+ raise RuntimeError(
28
+ f"{__package__} >= {minversion} is required, "
29
+ f"but version {pkgversion} is installed."
30
+ )
@@ -0,0 +1,30 @@
1
+ /*--------------------------------{{file_type}}----------------------------------*\
2
+ ========= |
3
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
+ \\ / O peration | Website: https://openfoam.org
5
+ \\ / A nd | Copyright (C) {% for org in copyrightHolder %}{% if org.name == "OpenFOAM Foundation" %}{{- org.year -}}{% endif %}{% endfor %} OpenFOAM Foundation
6
+ \\/ M anipulation |
7
+ -------------------------------------------------------------------------------
8
+ License
9
+ This file is part of OpenFOAM.
10
+
11
+ OpenFOAM is free software: you can redistribute it and/or modify it
12
+ under the terms of the GNU General Public License as published by
13
+ the Free Software Foundation, either version 3 of the License, or
14
+ (at your option) any later version.
15
+
16
+ OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19
+ for more details.
20
+
21
+ You should have received a copy of the GNU General Public License
22
+ along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23
+
24
+ {% for category, text in header.items() -%}
25
+ {{ category }}
26
+ {{ text | wordwrap(76, wrapstring='\n ', break_long_words=False) | replace('\n \n', '\n\n') }}
27
+
28
+ {% endfor -%}
29
+ \*---------------------------------------------------------------------------*/
30
+ {# Keep a tailing new line to separate body from header #}
@@ -0,0 +1,46 @@
1
+ /*--------------------------------{{file_type}}----------------------------------*\
2
+ == == ====== ==== ==== |
3
+ \\ || | {{name | truncate(47, True, '...') }}
4
+ ====== // || || ===// | Website: {{url}}
5
+ || || // || // || \\ | License: GPL-3.0-or-later
6
+ == == ====== ==== == == |
7
+ -------------------------------------------------------------------------------
8
+ License
9
+ {%- filter wordwrap(76, wrapstring='\n ', break_long_words=False) | replace('\n \n', '\n\n') %}
10
+ This file is part of the {{name}}.
11
+ {% for org in copyrightHolder %}
12
+ Copyright (C) {{ org.year }} by {{ org.name }}, Website: {{ org.url }}
13
+ {% endfor %}
14
+ {% filter replace('\n', ' ')-%}
15
+ If you are interested in which files are original OpenFOAM Foundation files,
16
+ which OpenFOAM Foundation files were modified, and which files were newly
17
+ created, see FILES.md.
18
+ {%- endfilter %}
19
+ banana
20
+
21
+ {% filter replace('\n', ' ')-%}
22
+ {{name}} is free software: you can redistribute it and/or modify it
23
+ under the terms of the GNU General Public License as published by the Free
24
+ Software Foundation, either version 3 of the License, or (at your option) any
25
+ later version.
26
+ {%- endfilter %}
27
+
28
+ {% filter replace('\n', ' ')-%}
29
+ {{name}} is distributed in the hope that it will be useful, but WITHOUT
30
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
31
+ FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
32
+ {%- endfilter %}
33
+
34
+ {% filter replace('\n', ' ')-%}
35
+ You should have received a copy of the GNU General Public License along with
36
+ the {{name}}. If not, see <http://www.gnu.org/licenses/>.
37
+ {%- endfilter %}
38
+ {% endfilter %}
39
+
40
+ {% for category, text in header.items() -%}
41
+ {{ category }}
42
+ {{ text | wordwrap(76, wrapstring='\n ', break_long_words=False) | replace('\n \n', '\n\n') }}
43
+
44
+ {% endfor -%}
45
+ \*---------------------------------------------------------------------------*/
46
+ {# Keep a tailing new line to separate body from header #}
@@ -0,0 +1,17 @@
1
+ /*--------------------------------{{file_type}}----------------------------------*\
2
+ ========= |
3
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
+ \\ / O peration | Website: https://openfoam.org
5
+ \\ / A nd | Version: dev
6
+ \\/ M anipulation |
7
+ {% if header -%}
8
+ {% for category, text in header.items() -%}
9
+ {% if loop.first -%}
10
+ -------------------------------------------------------------------------------
11
+ {%- endif %}
12
+ {{ category }}
13
+ {{ text | wordwrap(76, wrapstring='\n ', break_long_words=False) | replace('\n \n', '\n\n') }}
14
+
15
+ {% endfor %}
16
+ {% endif -%}
17
+ \*---------------------------------------------------------------------------*/
@@ -0,0 +1,17 @@
1
+ /*--------------------------------{{file_type}}----------------------------------*\
2
+ == == ====== ==== ==== |
3
+ \\ || | {{name | truncate(47, True, '...') }}
4
+ ====== // || || ===// | Website: {{url}}
5
+ || || // || // || \\ | License: GPL-3.0-or-later
6
+ == == ====== ==== == == |
7
+ {% if header -%}
8
+ {% for category, text in header.items() -%}
9
+ {% if loop.first -%}
10
+ -------------------------------------------------------------------------------
11
+ {%- endif %}
12
+ {{ category }}
13
+ {{ text | wordwrap(76, wrapstring='\n ', break_long_words=False) | replace('\n \n', '\n\n') }}
14
+
15
+ {% endfor -%}
16
+ {% endif -%}
17
+ \*---------------------------------------------------------------------------*/
@@ -0,0 +1,35 @@
1
+ {% if shebang -%}
2
+ {{ shebang }}
3
+ #---------------------------------{{file_type}}------------------------------------
4
+ {%- else -%}
5
+ #---------------------------------{{file_type}}------------------------------------
6
+ {%- endif %}
7
+ # ========= |
8
+ # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
9
+ # \\ / O peration | Website: https://openfoam.org
10
+ # \\ / A nd | Copyright (C) {% for org in copyrightHolder %}{% if org.name == "OpenFOAM Foundation" %}{{- org.year -}}{% endif %}{% endfor %} OpenFOAM Foundation
11
+ # \\/ M anipulation |
12
+ #------------------------------------------------------------------------------
13
+ # License
14
+ # This file is part of OpenFOAM.
15
+ #
16
+ # OpenFOAM is free software: you can redistribute it and/or modify it
17
+ # under the terms of the GNU General Public License as published by
18
+ # the Free Software Foundation, either version 3 of the License, or
19
+ # (at your option) any later version.
20
+ #
21
+ # OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
22
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
23
+ # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24
+ # for more details.
25
+ #
26
+ # You should have received a copy of the GNU General Public License
27
+ # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
28
+ #
29
+ {% for category, text in header.items() -%}
30
+ {{ category | indent(width='# ', first=True) }}
31
+ # {{ text | wordwrap(74, wrapstring='\n# ', break_long_words=False) }}
32
+ #
33
+ {% endfor -%}
34
+ #------------------------------------------------------------------------------
35
+ {# Keep a tailing new line to separate body from header #}