**Table of Content** [[_TOC_]] ## Description HZDR Multiphase Case Collection for OpenFOAM contains simulation setups for the open-source CFD software OpenFOAM with the [HZDR Multiphase Addon for OpenFOAM](https://doi.org/10.14278/rodare.767). The simulation setups are separated into mono- and polydisperse bubbly flows utilising the [HZDR Baseline model](https://www.hzdr.de/db/Cms?pNid=121&pOid=50671) set, setups for a [hybrid modelling approach](https://hzdr.de/openfoam-hybrid) (disperse and resolved interfaces) and miscellaneous cases. ### Cases using the HZDR Baseline model set #### baseline/1998_Liu * Reference for experiment: Liu (1998)[^11] * Reference for case setup: Rzehak et al. (2021)[^15], Kriebitzsch and Rzehak (2016)[^8] #### baseline/2005_Lucas_et_al * Reference for experiment: Lucas et al. (2005)[^12] * Reference for case setup: Lehnigk et al. (2021)[^9] #### baseline/2008_Shawkat * Reference for experiment: Shawkat et al. (2008)[^16] * Reference for case setup: Kriebitzsch and Rzehak (2016)[^8] #### baseline/2009_Hosokawa * Reference for experiment: Hosokawa and Tomiyama (2009)[^4] * Reference for case setup: Rzehak et al. (2021)[^15] #### baseline/2013_Hosokawa_and_Tomiyama * Reference for experiment: Hosokawa and Tomiyama (2013)[^5] * Reference for case setup: Kriebitzsch and Rzehak (2016)[^8], Liao et al. (2020)[^10] #### baseline/2016_Kim_et_al * Reference for experiment: Kim et al. (2016)[^7] * Reference for case setup: Liao et al. (2020)[^10] ### Cases using the hybrid modelling approach #### hybrid/wenka/2D-MP3-23 * Reference for experiment: Staebler (2007)[^17] * Reference for case setup: Tekavcic et al. (2021)[^18] #### hybrid/risingBubbleHysingEtAl2009 * References for case setup: Hysing et al. (2009)[^6], Meller et al. (2021, 2022)[^13][^14] #### hybrid/risingBubbleBalcazarEtAl2015 * Reference for experiment: Bhaga and Weber (1981)[^3] * Reference for direct numerical simulation: Balcazar et al. (2015)[^2] * References for case setup: Meller et al. (2021)[^13] #### hybrid/risingBubbleMellerEtAl2022 * Reference for case setup: Meller et al. (2022)[^14] ### Miscellaneous cases #### misc/multiphase/HZDRmultiphaseEulerFoam/1991_Akhtar_et_al * Reference for experiment: Akhtar et al. (1991)[^1] * Reference for case setup: Lehnigk et al. (2021)[^9] ## Installation ### General remarks The installation instructions will use the following environment variables - `FOAM_RUN`: directory where OpenFOAM simulation setups are stored ### HZDR Multiphase Addon for OpenFOAM Depending on what you have access to: - **[gitlab.hzdr.de](https://gitlab.hzdr.de/openfoam/fwdc/Developments)**: For Helmholtz and Friends via [Helmholtz AAI](https://aai.helmholtz.de/) or using a HZDR guest account - **[Rossendorf Data Repository (RODARE)](https://rodare.hzdr.de/record/767)**: For everybody you can install the [HZDR Multiphase Addon for OpenFOAM](https://rodare.hzdr.de/record/767) in several ways: - as Debian packages - by compiling from sources - by downloading and running the provided Docker Images Follow the installation instructions in your preferred download source and make sure your OpenFOAM environment is setup correctly, e.g. by running `foamVersion` ### HZDR Multiphase Case Collection from gitlab.hzdr.de Simply clone the HZDR Multiphase Case Collection into OpenFOAM run directory ``` mkdir -p $FOAM_RUN git clone --single-branch git@gitlab.hzdr.de:openfoam/fwdc/Cases.git $FOAM_RUN ``` ### HZDR Multiphase Case Collection from Rossendorf Data Repository (RODARE) Download tar archive for the [HZDR Multiphase Addon for OpenFOAM](https://doi.org/10.14278/rodare.811) from RODARE and unpack it into OpenFOAM run directory ```shell mkdir -p $FOAM_RUN tar -xzf HZDR-Multiphase-Case-Collection-.tgz -C $FOAM_RUN ``` ## Workflow Management with Snakemake The Baseline Workflow consists of several steps to allow computational scalability and advanced reporting features, for instance, deployment on Gitlab of Snakemake reports as static pages or "templated" cases. These steps are configuration, simulation, and post-processing of the workflow. Configuration and post-processing rely on convenient functions provided by [FWDC Python library](https://gitlab.hzdr.de/openfoam/fwdc/fwdc-lib). Note: The [Snakemake workflow](https://snakemake.readthedocs.io) feature is not part of the [Rossendorf Data Repository (RODARE)](https://doi.org/10.14278/rodare.811) and requires access to [gitlab.hzdr.de](https://gitlab.hzdr.de/openfoam/fwdc/Cases). ### Prerequisites #### FWDC Python Library The library is not distributed via `pip` central repository. Thus, it is required to download the source code and to install it manually. ``` git clone https://gitlab.hzdr.de/openfoam/fwdc/fwdc-lib.git cd fwdc-lib python3 setup.py install ``` #### Installation of Snakemake Python Snakemake library is general purpose workflow engine. Installation instructions are available [here](https://snakemake.readthedocs.io/en/stable/getting_started/installation.html). Snakemake can be directly installed from `pip`: ``` apt install python3 python3-pip pip3 install snakemake ``` ### Execute Snakemake Workflow A snakemake workflow can be executed for all cases. A set of cases can be selected via the `export $KEYWORDS` functionality. For example: > export KEYWORDS='1987_Wang_et_al, 1998_Liu, 2016_Kim_et_al' Two default workflow configurations are available in the repository: * `baseline-test.yaml` is a test procedure that runs only one time step for each case. * `baseline.yaml` runs the selected cases to the defined end. The `KEYWORDS` functionality works only if indexing option is enabled in the workflow config file. > index: true To apply the workflow configuration and to set up a snakemake run first it must be configured: > snakemake -j2 -s configure.rules --configfile baseline.yaml Alternatively, providing `baseline-test.yaml` as a config file will allow the execution of the reduced set of cases. To enable `writeNow` option in all OpenFoam cases a special Snakemake job has to be invoked: > snakemake -j16 -s baseline.rules enable_test The workflow `configure.rules` will produce configfile with `*.yaml` extension. Run snakemake by executing: > snakemake -j16 -s baseline.rules To produce `report.html` execute: > snakemake -j2 -s baseline.rules --report ## Repository Structure The HZDR Multiphase Case Collection for OpenFOAM includes the following main directories and files: - **baseline:** directory containing mono- and poly-disperse bubbly flow cases - **etc:** header templates for dictionaries, scripts and Snakefiles - **flotation:** directory for three-phase flotation cases - **hybrid:** directory for cases using the hybrid modelling approach - **misc:** directory for various `interFoam` and `HZDRmultiphaseEulerFoam` setups with experimental data - **workflow:** stores workflow-relevant files for [`baseline_testing`](https://gitlab.hzdr.de/openfoam/fwdc/Documentation/-/wikis/Baseline%20Workflow/Baseline-Workflow:-Testing-with-Snakemake) workflows and [reStructuredText](https://wiki.python.org/moin/reStructuredText) headers for [Snakemake](https://snakemake.readthedocs.io/en/stable/) reports - **baseline.rules:** top-level simulation workflow specification - **baseline.yaml:** top-level workflow configuration file - **baseline-test.yaml:** top-level workflow configuration file for workflow tests and dry runs - **configure.rules:** top-level configuration workflow specification - **codemeta.json:** software metadata according to [The CodeMeta Project](https://codemeta.github.io) - **CONTRIBUTING.md**: how to contribute to the project - **LICENSE**: licensing information ## How to cite us? When using the HZDR Multiphase Case Collection for OpenFOAM cite us as >>> Haensch, S., Draw, M., Evdokimov, I., Khan, H., Kamble, V., Krull, B., Lehnigk, R., Liao, Y., Lyu, H., Meller, R., Schlegel, F., Tekavcic, M. (2022). HZDR Multiphase Case Collection for OpenFOAM. Rodare. http://doi.org/10.14278/rodare.811 >>> ## References [^1]: Akhtar, M. K., Xiong, Y., & Pratsinis, S. E. (1991). Vapor synthesis of titania powder by titanium tetrachloride oxidation. AIChE Journal, 37(10), 1561-1570. [^2]: Balcazar, N., Lehmkuhl, O., Jofre, L., & Oliva, A. (2015). Level-set simulations of buoyancy-driven motion of single and multiple bubbles. International Journal of Heat and Fluid Flow, 56, 91-107. [^3]: Bhaga, D., & Weber, M. E. (1981). Bubbles in viscous liquids: shapes, wakes and velocities. Journal of fluid Mechanics, 105, 61-85. [^4]: Hosokawa, S., & Tomiyama, A. (2009). Multi-fluid simulation of turbulent bubbly pipe flows. Chemical Engineering Science, 64(24), 5308-5318. [^5]: Hosokawa, S., & Tomiyama, A. (2013). Bubble-induced pseudo turbulence in laminar pipe flows. International journal of heat and fluid flow, 40, 97-105. [^6]: Hysing, S. R., Turek, S., Kuzmin, D., Parolini, N., Burman, E., Ganesan, S., & Tobiska, L. (2009). Quantitative benchmark computations of two-dimensional bubble dynamics. International Journal for Numerical Methods in Fluids, 60(11), 1259-1288. [^7]: Kim, M., Lee, J. H., & Park, H. (2016). Study of bubble-induced turbulence in upward laminar bubbly pipe flows measured with a two-phase particle image velocimetry. Experiments in Fluids, 57(4), 1-21. [^8]: Kriebitzsch, S., & Rzehak, R. (2016). Baseline model for bubbly flows: simulation of monodisperse flow in pipes of different diameters. Fluids, 1(3), 29. [^9]: Lehnigk, R., Bainbridge, W., Liao, Y., Lucas, D., Niemi, T., Peltola, J., & Schlegel, F. (2022). An open-source population balance modeling framework for the simulation of polydisperse multiphase flows. AIChE Journal, 68(3), e17539. [^10]: Liao, Y., Upadhyay, K., & Schlegel, F. (2020). Eulerian-Eulerian two-fluid model for laminar bubbly pipe flows: Validation of the baseline model. Computers & Fluids, 202, 104496. [^11]: Liu, T. J. (1998, June). The role of bubble size on liquid phase turbulent structure in two-phase bubbly flow. In Proc. Third International Congress on Multiphase Flow ICMF (Vol. 98, pp. 8-12). [^12]: Lucas, D., Krepper, E., & Prasser, H. M. (2005). Development of co-current air-water flow in a vertical pipe. International Journal of Multiphase Flow, 31(12), 1304-1328. [^13]: Meller, R., Schlegel, F., & Lucas, D. (2021). Basic verification of a numerical framework applied to a morphology adaptive multifield two-fluid model considering bubble motions. International Journal for Numerical Methods in Fluids, 93(3), 748-773. [^14]: Meller, R., Schlegel, F., & Klein, M. (2022). Sub-grid Scale Modelling and a-Posteriori Tests with a Morphology Adaptive Multifield Two-Fluid Model Considering Rising Gas Bubbles. Flow, Turbulence and Combustion 108, 895-922. [^15]: Rzehak, R., Liao, Y., Meller, R., Schlegel, F., Lehnigk, R., & Lucas, D. (2021). Radial pressure forces in Euler-Euler simulations of turbulent bubbly pipe flows. Nuclear Engineering and Design, 374, 111079. [^16]: Shawkat, M. E., Ching, C. Y., & Shoukri, M. (2008). Bubble and liquid turbulence characteristics of bubbly flow in a large diameter vertical pipe. International Journal of Multiphase Flow, 34(8), 767-785. [^17]: Staebler, T. D. (2007). Experimentelle Untersuchung und physikalische Beschreibung der Schichtenstroemung in horizontalen Kanaelen. PhD Thesis, Universitaet Stuttgart. [^18]: Tekavcic, M., Meller, R., & Schlegel, F. (2021). Validation of a morphology adaptive multi-field two-fluid model considering counter-current stratified flow with interfacial turbulence damping. Nuclear Engineering and Design, 379, 111223.