Skip to content

Add Uloop validation case + dynamic and static mixer implementations - #159

Merged
malihass merged 38 commits into
mainfrom
static_mix
Sep 2, 2026
Merged

Add Uloop validation case + dynamic and static mixer implementations#159
malihass merged 38 commits into
mainfrom
static_mix

Conversation

@malihass

@malihass malihass commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Several added/modified scripts have confirmed functional/operational issues (incorrect run paths/working-directory assumptions, broken cleanup globbing, and hard-coded Slurm dependencies) that will prevent reliable execution.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR expands the OpenFOAM v9 case set to cover additional loop-reactor mixer validation scenarios (swirl-capable actuator-disk mixers and passive static mixers), adds multiple uloop experimental validation cases, and updates the Python tooling/docs to support the new mixer configuration modes.

Changes:

  • Add new OF9 tutorial cases for swirl-capable dynamic mixers and passive static mixers, plus runall integration.
  • Add uloop Valadbeigy exp1/exp2/exp3 experimental cases (including mixer + static-mixer JSON inputs).
  • Update Python preprocess/docs (dynamic mixer schema + optional model selectors) and add gmsh as a Python dependency.
File summaries
File Description
tutorial_cases/OF9/runall.sh Adds new tutorial runs (swirl/static mixer loop reactor).
tutorial_cases/OF9/loop_reactor_mixing_swirl/writeGlobalVars.py Computes inlet area + liquid volume and writes constant/globalVars.
tutorial_cases/OF9/loop_reactor_mixing_swirl/system/setFieldsDict Initializes phase volume fractions.
tutorial_cases/OF9/loop_reactor_mixing_swirl/system/mesh.json Defines blockwise mesh and fluid geometry graph.
tutorial_cases/OF9/loop_reactor_mixing_swirl/system/fvConstraints Adds field limiting constraints for stability.
tutorial_cases/OF9/loop_reactor_mixing_swirl/system/decomposeParDict Parallel decomposition settings.
tutorial_cases/OF9/loop_reactor_mixing_swirl/system/controlDict Solver controls + function objects.
tutorial_cases/OF9/loop_reactor_mixing_swirl/script Slurm run script for the swirl tutorial case.
tutorial_cases/OF9/loop_reactor_mixing_swirl/script_post Slurm post-processing script.
tutorial_cases/OF9/loop_reactor_mixing_swirl/computeQOI.sh Computes QoI from reconstructed results.
tutorial_cases/OF9/loop_reactor_mixing_swirl/README.md Documents the swirl actuator-disk mixer tutorial.
tutorial_cases/OF9/loop_reactor_mixing_swirl/constant/momentumTransport.liquid Liquid turbulence model configuration.
tutorial_cases/OF9/loop_reactor_mixing_swirl/constant/momentumTransport.gas Gas turbulence model configuration.
tutorial_cases/OF9/loop_reactor_mixing_swirl/constant/g Gravity vector.
tutorial_cases/OF9/loop_reactor_mixing_swirl/Allclean Case cleanup script.
tutorial_cases/OF9/loop_reactor_mixing_swirl/0.orig/* Initial conditions for swirl tutorial (fields in 0.orig).
tutorial_cases/OF9/loop_reactor_mixing_static/writeGlobalVars.py Computes inlet area + liquid volume and writes constant/globalVars.
tutorial_cases/OF9/loop_reactor_mixing_static/system/setFieldsDict Initializes phase volume fractions.
tutorial_cases/OF9/loop_reactor_mixing_static/system/mesh.json Defines blockwise mesh and fluid geometry graph.
tutorial_cases/OF9/loop_reactor_mixing_static/system/fvConstraints Adds field limiting constraints for stability.
tutorial_cases/OF9/loop_reactor_mixing_static/system/decomposeParDict Parallel decomposition settings.
tutorial_cases/OF9/loop_reactor_mixing_static/system/controlDict Solver controls + function objects.
tutorial_cases/OF9/loop_reactor_mixing_static/script Slurm run script for the static-mixer tutorial case.
tutorial_cases/OF9/loop_reactor_mixing_static/script_post Slurm post-processing script.
tutorial_cases/OF9/loop_reactor_mixing_static/computeQOI.sh Computes QoI from reconstructed results.
tutorial_cases/OF9/loop_reactor_mixing_static/README.md Documents the passive static mixer tutorial.
tutorial_cases/OF9/loop_reactor_mixing_static/constant/momentumTransport.liquid Liquid turbulence model configuration.
tutorial_cases/OF9/loop_reactor_mixing_static/constant/momentumTransport.gas Gas turbulence model configuration.
tutorial_cases/OF9/loop_reactor_mixing_static/constant/g Gravity vector.
tutorial_cases/OF9/loop_reactor_mixing_static/Allclean Case cleanup script.
tutorial_cases/OF9/loop_reactor_mixing_static/0.orig/* Initial conditions for static-mixer tutorial (fields in 0.orig).
experimental_cases/OF9/uloop_valadbeigy_exp1/system/setFieldsDict Initializes liquid/gas regions for uloop validation.
experimental_cases/OF9/uloop_valadbeigy_exp1/system/mixers.json Dynamic + static mixer definitions and global mixer mode selectors.
experimental_cases/OF9/uloop_valadbeigy_exp1/system/inlets_outlets.json Defines sparger/dye inlet geometry.
experimental_cases/OF9/uloop_valadbeigy_exp1/system/fvConstraints Adds field limiting constraints for stability.
experimental_cases/OF9/uloop_valadbeigy_exp1/system/decomposeParDict Parallel decomposition settings.
experimental_cases/OF9/uloop_valadbeigy_exp1/system/createPatchDict Consolidates wall patches to a single walls patch.
experimental_cases/OF9/uloop_valadbeigy_exp1/script Slurm run script for uloop exp1.
experimental_cases/OF9/uloop_valadbeigy_exp1/script_post Slurm post-processing script for uloop exp1.
experimental_cases/OF9/uloop_valadbeigy_exp1/constant/momentumTransport.liquid Liquid turbulence model configuration.
experimental_cases/OF9/uloop_valadbeigy_exp1/constant/momentumTransport.gas Gas momentum transport configuration.
experimental_cases/OF9/uloop_valadbeigy_exp1/constant/g Gravity vector.
experimental_cases/OF9/uloop_valadbeigy_exp1/Allclean Case cleanup script.
experimental_cases/OF9/uloop_valadbeigy_exp1/0.orig/* Initial conditions for exp1 (fields in 0.orig).
experimental_cases/OF9/uloop_valadbeigy_exp2/system/setFieldsDict Initializes liquid/gas regions for uloop validation.
experimental_cases/OF9/uloop_valadbeigy_exp2/system/mixers.json Dynamic + static mixer definitions and global mixer mode selectors.
experimental_cases/OF9/uloop_valadbeigy_exp2/system/inlets_outlets.json Defines sparger/dye inlet geometry.
experimental_cases/OF9/uloop_valadbeigy_exp2/system/fvConstraints Adds field limiting constraints for stability.
experimental_cases/OF9/uloop_valadbeigy_exp2/system/decomposeParDict Parallel decomposition settings.
experimental_cases/OF9/uloop_valadbeigy_exp2/system/createPatchDict Consolidates wall patches to a single walls patch.
experimental_cases/OF9/uloop_valadbeigy_exp2/script Slurm run script for uloop exp2.
experimental_cases/OF9/uloop_valadbeigy_exp2/script_post Slurm post-processing script for uloop exp2.
experimental_cases/OF9/uloop_valadbeigy_exp2/constant/momentumTransport.liquid Liquid turbulence model configuration.
experimental_cases/OF9/uloop_valadbeigy_exp2/constant/momentumTransport.gas Gas momentum transport configuration.
experimental_cases/OF9/uloop_valadbeigy_exp2/constant/g Gravity vector.
experimental_cases/OF9/uloop_valadbeigy_exp2/Allclean Case cleanup script.
experimental_cases/OF9/uloop_valadbeigy_exp2/0.orig/* Initial conditions for exp2 (fields in 0.orig).
experimental_cases/OF9/uloop_valadbeigy_exp3/system/setFieldsDict Initializes liquid/gas regions for uloop validation.
experimental_cases/OF9/uloop_valadbeigy_exp3/system/mixers.json Dynamic + static mixer definitions and global mixer mode selectors.
experimental_cases/OF9/uloop_valadbeigy_exp3/system/inlets_outlets.json Defines sparger/dye inlet geometry.
experimental_cases/OF9/uloop_valadbeigy_exp3/system/fvConstraints Adds field limiting constraints for stability.
experimental_cases/OF9/uloop_valadbeigy_exp3/system/decomposeParDict Parallel decomposition settings.
experimental_cases/OF9/uloop_valadbeigy_exp3/system/createPatchDict Consolidates wall patches to a single walls patch.
experimental_cases/OF9/uloop_valadbeigy_exp3/script Slurm run script for uloop exp3.
experimental_cases/OF9/uloop_valadbeigy_exp3/script_post Slurm post-processing script for uloop exp3.
experimental_cases/OF9/uloop_valadbeigy_exp3/constant/momentumTransport.liquid Liquid turbulence model configuration.
experimental_cases/OF9/uloop_valadbeigy_exp3/constant/momentumTransport.gas Gas momentum transport configuration.
experimental_cases/OF9/uloop_valadbeigy_exp3/constant/g Gravity vector.
experimental_cases/OF9/uloop_valadbeigy_exp3/Allclean Case cleanup script.
experimental_cases/OF9/uloop_valadbeigy_exp3/0.orig/* Initial conditions for exp3 (fields in 0.orig).
pyproject.toml Adds gmsh dependency and extends pixi env deps.
docs/source/bird.preprocess.dynamic_mixer.rst Documents static mixer schema and behavior in dynamic_mixer preprocess.
bird/version.py Bumps package version to 0.0.57.
bird/preprocess/json_gen/design_io.py Extends generate_dynamic_mixer to optionally write top-level model selectors.
bird/preprocess/dynamic_mixer/mixing_template/static_loop_list/mixers.json Adds a static-mixer loop-placement template.
bird/preprocess/dynamic_mixer/mixing_template/static_expl_list/mixers.json Adds a static-mixer explicit-placement template.
bird/preprocess/data_case_gen/loop_reactor_pbe_dynmix_nonstat_headbranch_scaleup/writeGlobalVars.py Switches to read_field for alpha reading when computing liquid volume.
bird/preprocess/data_case_gen/loop_reactor_pbe_dynmix_nonstat_headbranch_scaleup/presteps.sh Switches to the bird_mixer conda env.
bird/preprocess/data_case_gen/loop_reactor_pbe_dynmix_nonstat_headbranch_scaleup/computeQOI.sh Switches to the bird_mixer conda env.
Review details
  • Files reviewed: 229/283 changed files
  • Comments generated: 10
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

# [ -d "constant/extendedFeatureEdgeMesh" ] && rm -rf "constant/extendedFeatureEdgeMesh"
[ -d "constant/polyMesh" ] && rm -rf "constant/polyMesh"
[ -d "dynamicCode" ] && rm -rf "dynamicCode"
[ -d "processor*" ] && rm -rf "processor*"
#SBATCH --ntasks-per-node=16
#SBATCH --time=01:59:00
#SBATCH --account=gas2fuels
#SBATCH --dependency=afterany:15800966
# [ -d "constant/extendedFeatureEdgeMesh" ] && rm -rf "constant/extendedFeatureEdgeMesh"
[ -d "constant/polyMesh" ] && rm -rf "constant/polyMesh"
[ -d "dynamicCode" ] && rm -rf "dynamicCode"
[ -d "processor*" ] && rm -rf "processor*"
#SBATCH --ntasks-per-node=16
#SBATCH --time=01:59:00
#SBATCH --account=gas2fuels
#SBATCH --dependency=afterany:15800966
# [ -d "constant/extendedFeatureEdgeMesh" ] && rm -rf "constant/extendedFeatureEdgeMesh"
[ -d "constant/polyMesh" ] && rm -rf "constant/polyMesh"
[ -d "dynamicCode" ] && rm -rf "dynamicCode"
[ -d "processor*" ] && rm -rf "processor*"
#SBATCH --ntasks-per-node=16
#SBATCH --time=01:59:00
#SBATCH --account=gas2fuels
#SBATCH --dependency=afterany:15800966
# [ -d "constant/extendedFeatureEdgeMesh" ] && rm -rf "constant/extendedFeatureEdgeMesh"
[ -d "constant/polyMesh" ] && rm -rf "constant/polyMesh"
[ -d "dynamicCode" ] && rm -rf "dynamicCode"
[ -d "processor*" ] && rm -rf "processor*"
# [ -d "constant/extendedFeatureEdgeMesh" ] && rm -rf "constant/extendedFeatureEdgeMesh"
[ -d "constant/polyMesh" ] && rm -rf "constant/polyMesh"
[ -d "dynamicCode" ] && rm -rf "dynamicCode"
[ -d "processor*" ] && rm -rf "processor*"
Comment thread tutorial_cases/OF9/runall.sh Outdated
Comment on lines +41 to +45
## Run mixing loop reactor tutorial
cd tutorial_cases/loop_reactor_mixing
bash run.sh
bash run.sh
cd ../../
## Run mixing loop reactor with swirl tutorial
Comment thread pyproject.toml
@malihass
malihass merged commit a500c3c into main Sep 2, 2026
15 checks passed
github-actions Bot pushed a commit that referenced this pull request Sep 2, 2026
…159)

* Add SwirlMixer class

* rename to actuator class, swirl is decided later

* ball-source fvModels writer

* format

* machinery to call the right mixer

* new tutorial for the new mixer

* add actuator mixer test

* actuator-disk power helper and mixer-model keys for case generation

* improve design sweep gen

* adjust path

* remove te default qos high option

* fix _readOFScal NameError, we have a public functions for that

* update template file with the right qoi

* add static mixer class

* add write_static_mixer_ball to the static mixer class

* make sure we can mix static and dynamic mixers

* Add template for mixer placement

* doc updates for static/dynamic mixer distinction

* sign printing was messed up

* add regression test for later

* sign issue

* source is -=

* regen fvModels

* add per level timestepping option

* robust template folder resolution

* make sure outlets are read from template json

* use random sampling or shared pool depending on if we need to compute correlations

* also pack post proc

* pack post proc together

* add uloop validation case

* format

* missing gmsh

* update pixi lock

* fix lib hdf5 link

* fix hdf5 lib

* fix application paths and deploy to pypi

* remove run all and adjust allclean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants