Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
1deecfe
Add SwirlMixer class
malihass Jul 29, 2026
b9d3df2
rename to actuator class, swirl is decided later
malihass Jul 29, 2026
13ad8c3
ball-source fvModels writer
malihass Jul 29, 2026
8a71204
format
malihass Jul 29, 2026
7f8e3e5
machinery to call the right mixer
malihass Jul 29, 2026
b6681fd
new tutorial for the new mixer
malihass Jul 29, 2026
69652ee
add actuator mixer test
malihass Jul 29, 2026
19eed37
actuator-disk power helper and mixer-model keys for case generation
malihass Jul 30, 2026
699bb0a
improve design sweep gen
malihass Jul 30, 2026
a5f9e89
adjust path
malihass Jul 30, 2026
0963bc1
remove te default qos high option
malihass Jul 30, 2026
6f47fe0
fix _readOFScal NameError, we have a public functions for that
malihass Jul 30, 2026
b096c07
update template file with the right qoi
malihass Jul 31, 2026
a15f682
add static mixer class
malihass Aug 3, 2026
fbdd061
add write_static_mixer_ball to the static mixer class
malihass Aug 3, 2026
37c330e
make sure we can mix static and dynamic mixers
malihass Aug 3, 2026
77be001
Add template for mixer placement
malihass Aug 3, 2026
8b3e5b1
doc updates for static/dynamic mixer distinction
malihass Aug 3, 2026
704ff34
sign printing was messed up
malihass Aug 3, 2026
7b1d084
add regression test for later
malihass Aug 3, 2026
e5f1deb
sign issue
malihass Aug 7, 2026
8d596d7
source is -=
malihass Aug 18, 2026
4024b10
regen fvModels
malihass Aug 18, 2026
6525f17
add per level timestepping option
malihass Aug 19, 2026
2253842
robust template folder resolution
malihass Aug 19, 2026
d14d789
make sure outlets are read from template json
malihass Aug 20, 2026
da321fc
use random sampling or shared pool depending on if we need to compute…
malihass Aug 21, 2026
2a5ca8f
also pack post proc
malihass Aug 21, 2026
0e70925
pack post proc together
malihass Aug 21, 2026
bdf264f
add uloop validation case
malihass Sep 1, 2026
f9b1f62
format
malihass Sep 1, 2026
06fa77f
merge main to static mix
malihass Sep 1, 2026
d338975
missing gmsh
malihass Sep 1, 2026
b8535db
update pixi lock
malihass Sep 1, 2026
cc91f70
fix lib hdf5 link
malihass Sep 1, 2026
fe1ee1c
fix hdf5 lib
malihass Sep 2, 2026
eb5d46d
fix application paths and deploy to pypi
malihass Sep 2, 2026
1064f7b
remove run all and adjust allclean
malihass Sep 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 29 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,15 @@ jobs:
environment-name: test-env
create-args: >-
python=${{ matrix.python-version }}
paraview=6.1
hdf5=1.14
channels: conda-forge
channel-priority: strict
cache-downloads: true
cache-env: true

- name: Install dependencies
run: |
micromamba install --yes -n test-env -c conda-forge paraview
pip install --upgrade pip
pip install --upgrade nox
pip install .[tests]
Expand Down Expand Up @@ -147,14 +148,15 @@ jobs:
environment-name: test-env
create-args: >-
python=${{ matrix.python-version }}
paraview=6.1
hdf5=1.14
channels: conda-forge
channel-priority: strict
cache-downloads: true
cache-env: true

- name: Install dependencies
run: |
micromamba install --yes -n test-env -c conda-forge paraview
pip install --upgrade pip
pip install --upgrade nox
pip install nlr-bird[tests]
Expand Down Expand Up @@ -189,14 +191,15 @@ jobs:
environment-name: test-env
create-args: >-
python=${{ matrix.python-version }}
paraview=6.1
hdf5=1.14
channels: conda-forge
channel-priority: strict
cache-downloads: true
cache-env: true

- name: Install dependencies
run: |
micromamba install --yes -n test-env -c conda-forge paraview
pip install --upgrade pip
pip install .

Expand All @@ -218,6 +221,18 @@ jobs:
run: |
cd experimental_cases/OF9/deckwer19
bash run.sh
- name: Run Uloop Exp1
run: |
cd experimental_cases/OF9/uloop_valadbeigy_exp1
bash run.sh
- name: Run Uloop Exp2
run: |
cd experimental_cases/OF9/uloop_valadbeigy_exp2
bash run.sh
- name: Run Uloop Exp3
run: |
cd experimental_cases/OF9/uloop_valadbeigy_exp3
bash run.sh
- name: Run side sparger tutorial
run: |
cd tutorial_cases/OF9/side_sparger
Expand All @@ -237,7 +252,15 @@ jobs:
- name: Run mixing loop reactor tutorial
run: |
cd tutorial_cases/OF9/loop_reactor_mixing
bash run.sh
bash run.sh
- name: Run mixing loop reactor with swirl tutorial
run: |
cd tutorial_cases/OF9/loop_reactor_mixing_swirl
bash run.sh
- name: Run mixing loop reactor with static mixer tutorial
run: |
cd tutorial_cases/OF9/loop_reactor_mixing_static
bash run.sh
- name: Run airlift reactor tutorial
run: |
cd tutorial_cases/OF9/airlift_40m
Expand Down Expand Up @@ -274,14 +297,15 @@ jobs:
environment-name: test-env
create-args: >-
python=${{ matrix.python-version }}
paraview=6.1
hdf5=1.14
channels: conda-forge
channel-priority: strict
cache-downloads: true
cache-env: true

- name: Install dependencies
run: |
micromamba install --yes -n test-env -c conda-forge paraview
pip install --upgrade pip
pip install .

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ if [ ! -f qoi.txt ]; then
# Reconstruct if needed
source /projects/gas2fuels/ofoam_cray_mpich/OpenFOAM-dev/etc/bashrc
reconstructPar -newTimes
module load anaconda3/2023
conda activate /projects/gas2fuels/conda_env/bird
module load conda
conda activate /projects/gas2fuels/conda_env/bird_mixer/
python read_history.py -cr .. -cn local -df data
python get_qoi.py
conda deactivate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def get_lh(verb=False):


def get_pinj(vvm, Vl, As, lh):
rhog = 1.25 # kg /m3
rhog = 0.593333 # kg /m3
Vg = Vl * vvm / (60 * As * 1) # m/s
Ptank = 101325 # Pa
# Ptank = 0 # Pa
Expand All @@ -116,21 +116,30 @@ def get_qoi(kla_co2, cs_co2, kla_h2, cs_h2, verb=False):
P_inj = get_pinj(vvm, V_l, As, liqh)
P_mix = get_pmix(verb)

qoi_co2 = kla_co2 * cs_co2 * V_l * 0.04401 / (P_mix / 3600 + P_inj / 3600)
qoi_h2 = kla_h2 * cs_h2 * V_l * 0.002016 / (P_mix / 3600 + P_inj / 3600)
return qoi_co2 * qoi_h2
qoi_kla_co2 = kla_co2 * cs_co2 * V_l * 0.04401
qoi_kla_h2 = kla_h2 * cs_h2 * V_l * 0.002016

qoi_co2 = qoi_kla_co2 / (P_mix / 3600 + P_inj / 3600)
qoi_h2 = qoi_kla_h2 / (P_mix / 3600 + P_inj / 3600)
return qoi_co2 * qoi_h2, qoi_kla_co2 * qoi_kla_h2


def get_qoi_uq(kla_co2, cs_co2, kla_h2, cs_h2):
qoi = []
qoi_kla = []
for i in range(len(kla_co2)):
if i == 0:
verb = True
else:
verb = False
qoi.append(get_qoi(kla_co2[i], cs_co2[i], kla_h2[i], cs_h2[i], verb))
qoi_tmp, qoi_kla_tmp = get_qoi(
kla_co2[i], cs_co2[i], kla_h2[i], cs_h2[i], verb
)
qoi.append(qoi_tmp)
qoi_kla.append(qoi_kla_tmp)
qoi = np.array(qoi)
return np.mean(qoi), np.std(qoi)
qoi_kla = np.array(qoi_kla)
return np.mean(qoi), np.std(qoi), np.mean(qoi_kla), np.std(qoi_kla)


os.makedirs("Figures", exist_ok=True)
Expand All @@ -139,8 +148,8 @@ def get_qoi_uq(kla_co2, cs_co2, kla_h2, cs_h2):
fold = "local"

nuq = 100
mean_cstar_co2 = np.random.uniform(14, 16.9, nuq)
mean_cstar_h2 = np.random.uniform(1.04, 1.19, nuq)
mean_cstar_co2 = np.random.uniform(7.68, 8.22, nuq)
mean_cstar_h2 = np.random.uniform(0.516, 0.548, nuq)


tmp_cs_h2 = []
Expand Down Expand Up @@ -176,8 +185,12 @@ def get_qoi_uq(kla_co2, cs_co2, kla_h2, cs_h2):
tmp_cs_h2.append(cs_h2[i])
tmp_cs_co2.append(cs_co2[i])

qoi_m, qoi_s = get_qoi_uq(tmp_kla_co2, tmp_cs_co2, tmp_kla_h2, tmp_cs_h2)
qoi_m, qoi_s, qoi_kla_m, qoi_kla_s = get_qoi_uq(
tmp_kla_co2, tmp_cs_co2, tmp_kla_h2, tmp_cs_h2
)


with open("qoi.txt", "w+") as f:
f.write(f"{qoi_m},{qoi_s}\n")
with open("qoi_kla.txt", "w+") as f:
f.write(f"{qoi_kla_m},{qoi_kla_s}\n")
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Clean case
module load conda
conda activate /projects/gas2fuels/conda_env/bird_wf
#conda activate /projects/gas2fuels/conda_env/bird_wf
conda activate /projects/gas2fuels/conda_env/bird_mixer
source /projects/gas2fuels/ofoam_cray_mpich/OpenFOAM-dev/etc/bashrc
./Allclean

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,8 @@ def readInletArea():


def getLiqVol():
cell_centers, _ = read_cell_centers(".")
volume_field, _ = read_cell_volumes(".")
alpha_field = _readOFScal(
os.path.join("0", "alpha.liquid"), len(cell_centers)
)["field"]
alpha_field, _ = read_field(".", "0", field_name="alpha.liquid")
return np.sum(volume_field * alpha_field)


Expand Down
Loading
Loading