Skip to content

Flexvar #96

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ To cite BiRD, please use these articles on [CO2 interphase mass transfer](https:
title={Bayesian calibration of bubble size dynamics applied to \ce{CO2} gas fermenters},
author={Hassanaly, Malik and Parra-Alvarez, John M. and Rahimi, Mohammad J., Municchi, Federico and Sitaraman, Hariswaran},
journal={Chemical Engineering Research and Design},
volume={215},
pages={312--328},
year={2025},
publisher={Elsevier}
}

@article{rahimi2018computational,
Expand Down
1 change: 1 addition & 0 deletions bird/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
BIRD_MESH_DIR = os.path.join(BIRD_DIR, "meshing")
BIRD_POST_DIR = os.path.join(BIRD_DIR, "postprocess")
BIRD_PRE_DIR = os.path.join(BIRD_DIR, "preprocess")
BIRD_CONST_DIR = os.path.join(BIRD_DIR, "constants")
BIRD_BLOCK_CYL_MESH_TEMP_DIR = os.path.join(
BIRD_MESH_DIR, "block_cyl_mesh_templates"
)
Expand Down
33 changes: 33 additions & 0 deletions bird/constants/ch4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CH4

specie:
molWeight: 16.04303
elements:
C: 1
H: 4

liquid:
LeLiq: '#calc "$kThermLiq / $rho0MixLiq / $D_CH4 / $CpMixLiq"'
thermodynamics:
Hf: -1.5879e+07

gas:
in-H2O:
WC_V: "35e-3" # m3/kmol molar volume at normal boiling temperature (Treybal 1968)
D: '#calc "1.173e-16 * pow($WC_psi * $WC_M,0.5) * $T0 / $muMixLiq / pow($WC_V_CH4,0.6)'
H_298: "0.032"
DH: "1900"
He: '#calc "$H_CH4_298 * exp($DH_CH4 *(1. / $T0 - 1./298.15))"'
k: '#calc "$D_CH4*$rho0MixLiq*$CpMixLiq*$LeLiqMix"'
Pr: '#calc "$muMixLiq*$CpMixLiq / $kCH4"'

thermodynamics:
Tlow: 200
Thigh: 3500
Tcommon: 1000
highCpCoeffs: 0.074851495 0.0133909467 -5.73285809e-06 1.22292535e-09 -1.0181523e-13 -9468.34459 18.437318
lowCpCoeffs: 5.14987613 -0.0136709788 4.91800599e-05 -4.84743026e-08 1.66693956e-11 -10246.6476 -4.64130376
transport:
As: 1.512e-06
Ts: 120

34 changes: 34 additions & 0 deletions bird/constants/co.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CO

specie:
molWeight: 28.01055
elements:
C: 1
O: 1

liquid:
LeLiq: '#calc "$kThermLiq / $rho0MixLiq / $D_CO / $CpMixLiq"'
thermodynamics:
Hf: -1.5879e+07

gas:
in-H2O:
WC_V: "30.7e-3" # m3/kmol molar volume at normal boiling temperature (Treybal 1968)
D: '#calc "1.173e-16 * pow($WC_psi * $WC_M,0.5) * $T0 / $muMixLiq / pow($WC_V_CO,0.6)'
H_298: "0.023"
DH: "1300"
He: '#calc "$H_CO_298 * exp($DH_CO *(1. / $T0 - 1./298.15))"'
k: '#calc "$D_CO*$rho0MixLiq*$CpMixLiq*$LeLiqMix"'
Pr: '#calc "$muMixLiq*$CpMixLiq / $kCO"'

thermodynamics:
Tlow: 200
Thigh: 3500
Tcommon: 1000
highCpCoeffs: 2.71518561 0.00206252743 -9.98825771e-07 2.30053008e-10 -2.03647716e-14 -14151.8724 7.81868772
lowCpCoeffs: 3.57953347 -0.00061035368 1.01681433e-06 9.07005884e-10 -9.04424499e-13 -14344.086 3.50840928
transport:
As: 1.512e-06
Ts: 120


34 changes: 34 additions & 0 deletions bird/constants/co2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CO2

specie:
molWeight: 44.00995
elements:
C: 1
O: 2

liquid:
LeLiq: '#calc "$kThermLiq / $rho0MixLiq / $D_CO2 / $CpMixLiq"'
thermodynamics:
Hf: -1.5879e+07

gas:
in-H2O:
WC_V: "34e-3" # m3/kmol molar volume at normal boiling temperature (Treybal 1968)
D: '#calc "1.173e-16 * pow($WC_psi * $WC_M,0.5) * $T0 / $muMixLiq / pow($WC_V_CO2,0.6)'
H_298: "0.83"
DH: "2400"
He: '#calc "$H_CO2_298 * exp($DH_CO2 *(1. / $T0 - 1./298.15))"'
k: '#calc "$D_CO2*$rho0MixLiq*$CpMixLiq*$LeLiqMix"'
Pr: '#calc "$muMixLiq*$CpMixLiq / $kCO2"'

thermodynamics:
Tlow: 200
Thigh: 3500
Tcommon: 1000
highCpCoeffs: 3.85746029 0.00441437026 -2.21481404e-06 5.23490188e-10 -4.72084164e-14 -48759.166 2.27163806
lowCpCoeffs: 2.35677352 0.00898459677 -7.12356269e-06 2.45919022e-09 -1.43699548e-13 -48371.9697 9.90105222
transport:
As: 1.652e-06
Ts: 273


32 changes: 32 additions & 0 deletions bird/constants/h2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: H2

specie:
molWeight: 2.01594
elements:
H: 2

liquid:
LeLiq: '#calc "$kThermLiq / $rho0MixLiq / $D_H2 / $CpMixLiq"'
thermodynamics:
Hf: -1.5879e+07

gas:
in-H2O:
WC_V: "14.3e-3" # m3/kmol molar volume at normal boiling temperature (Treybal 1968)
D: '#calc "1.173e-16 * pow($WC_psi * $WC_M,0.5) * $T0 / $muMixLiq / pow($WC_V_H2,0.6)'
H_298: "0.019"
DH: "500"
He: '#calc "$H_H2_298 * exp($DH_H2 *(1. / $T0 - 1./298.15))"'
k: '#calc "$D_H2*$rho0MixLiq*$CpMixLiq*$LeLiqMix"'
Pr: '#calc "$muMixLiq*$CpMixLiq / $kH2"'

thermodynamics:
Tlow: 200
Thigh: 3500
Tcommon: 1000
highCpCoeffs: 3.3372792 -4.94024731e-05 4.99456778e-07 -1.79566394e-10 2.00255376e-14 -950.158922 -3.20502331
lowCpCoeffs: 2.34433112 0.00798052075 -1.9478151e-05 2.01572094e-08 -7.37611761e-12 -917.935173 0.683010238
transport:
As: 6.362e-07
Ts: 72

30 changes: 30 additions & 0 deletions bird/constants/h2o.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: H2O

specie:
molWeight: 18.01534
elements:
H: 2
O: 1

liquid:
CpMixLiq: "4181"
muMixLiq: '#calc "2.414e-5 * pow(10,247.8/($T0 - 140.0))"' # Viscosity (Pa.s)
kThermLiq: "0.62" # thermal conductivity (W/mK)
rho0MixLiq: "1000" # density (kg/m3)
sigmaLiq: "0.07" # surface tension (N/m)
WC_psi: "2.6"
thermodynamics:
Hf: -1.5879e+07


gas:
thermodynamics:
Tlow: 200
Thigh: 3500
Tcommon: 1000
highCpCoeffs: 3.03399249 0.00217691804 -1.64072518e-07 -9.7041987e-11 1.68200992e-14 -30004.2971 4.9667701
lowCpCoeffs: 4.19864056 -0.0020364341 6.52040211e-06 -5.48797062e-09 1.77197817e-12 -30293.7267 -0.849032208
transport:
As: 1.456e-06
Ts: 273

28 changes: 28 additions & 0 deletions bird/constants/n2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: N2

specie:
molWeight: 28.0134
elements:
N: 2

liquid:
LeLiq: '#calc "$kThermLiq / $rho0MixLiq / $D_N2 / $CpMixLiq"'

gas:
in-H2O:
WC_V: "31.2e-3" # m3/kmol molar volume at normal boiling temperature (Treybal 1968)
D: '#calc "1.173e-16 * pow($WC_psi * $WC_M,0.5) * $T0 / $muMixLiq / pow($WC_V_N2,0.6)'
H_298: "0.015"
DH: "1300"
He: '#calc "$H_N2_298 * exp($DH_N2 *(1. / $T0 - 1./298.15))"'
k: '#calc "$D_N2*$rho0MixLiq*$CpMixLiq*$LeLiqMix"'
Pr: '#calc "$muMixLiq*$CpMixLiq / $kN2"'

thermodynamics:
Tlow: 250
Thigh: 5000
highCpCoeffs: 2.92664 0.0014879768 -5.68476e-07 1.0097038e-10 -6.753351e-15 -922.7977 5.980528
lowCpCoeffs: 3.298677 0.0014082404 -3.963222e-06 5.641515e-09 -2.444854e-12 -1020.8999 3.950372
transport:
As: 1.688e-06
Ts: 273
32 changes: 32 additions & 0 deletions bird/constants/o2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: O2

specie:
molWeight: 31.999
elements:
O: 2


liquid:
LeLiq: '#calc "$kThermLiq / $rho0MixLiq / $D_O2 / $CpMixLiq"'
thermodynamics:
Hf: -365639.0

gas:
in-H2O:
WC_V: "25.6e-3" # m3/kmol molar volume at normal boiling temperature (Treybal 1968)
D: '#calc "1.173e-16 * pow($WC_psi * $WC_M,0.5) * $T0 / $muMixLiq / pow($WC_V_O2,0.6)'
H_298: "0.032"
DH: "1700"
He: '#calc "$H_O2_298 * exp($DH_O2 *(1. / $T0 - 1./298.15))"'
k: '#calc "$D_O2*$rho0MixLiq*$CpMixLiq*$LeLiqMix"'
Pr: '#calc "$muMixLiq*$CpMixLiq / $kO2"'

thermodynamics:
Tlow: 200
Thigh: 3500
Tcommon: 1000
highCpCoeffs: 3.28254 0.00148309 -7.57967e-07 2.09471e-10 -2.16718e-14 -1038.31 5.56079
lowCpCoeffs: 3.78246 -0.00299673 9.8473e-06 -9.6813e-09 3.24373e-12 -1063.94 3.65768
transport:
As: 1.948e-06
Ts: 273
Loading