Skip to content

Commit b02fa1a

Browse files
committed
[Test] Add SRK example input file and set up thermo consistency tests
1 parent f323fa5 commit b02fa1a

File tree

3 files changed

+144
-0
lines changed

3 files changed

+144
-0
lines changed

test/data/co2_SRK_example.yaml

+129
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
units: {length: cm, quantity: mol, activation-energy: cal/mol}
2+
3+
phases:
4+
- name: CO2-PR
5+
species: [CO2, H2O, H2, CO, CH4, O2, N2]
6+
thermo: Soave-Redlich-Kwong
7+
kinetics: gas
8+
reactions: all
9+
state: {T: 300, P: 1 atm, mole-fractions: {CO2: 0.99, H2: 0.01}}
10+
11+
12+
species:
13+
- name: CO2
14+
composition: {C: 1, O: 2}
15+
thermo:
16+
model: NASA7
17+
temperature-ranges: [200.0, 1000.0, 3500.0]
18+
data:
19+
- [2.35677352, 8.98459677e-03, -7.12356269e-06, 2.45919022e-09, -1.43699548e-13,
20+
-4.83719697e+04, 9.90105222]
21+
- [3.85746029, 4.41437026e-03, -2.21481404e-06, 5.23490188e-10, -4.72084164e-14,
22+
-4.8759166e+04, 2.27163806]
23+
note: L7/88
24+
equation-of-state:
25+
model: Soave-Redlich-Kwong
26+
a: 3.700552E+11
27+
b: 29.6547
28+
acentric-factor: 0.228
29+
- name: H2O
30+
composition: {H: 2, O: 1}
31+
thermo:
32+
model: NASA7
33+
temperature-ranges: [200.0, 1000.0, 3500.0]
34+
data:
35+
- [4.19864056, -2.0364341e-03, 6.52040211e-06, -5.48797062e-09, 1.77197817e-12,
36+
-3.02937267e+04, -0.849032208]
37+
- [3.03399249, 2.17691804e-03, -1.64072518e-07, -9.7041987e-11, 1.68200992e-14,
38+
-3.00042971e+04, 4.9667701]
39+
note: L8/89
40+
equation-of-state:
41+
model: Soave-Redlich-Kwong
42+
a: 5.608487E+11
43+
b: 21.1282
44+
acentric-factor: 0.344
45+
- name: H2
46+
composition: {H: 2}
47+
thermo:
48+
model: NASA7
49+
temperature-ranges: [200.0, 1000.0, 3500.0]
50+
data:
51+
- [2.34433112, 7.98052075e-03, -1.9478151e-05, 2.01572094e-08, -7.37611761e-12,
52+
-917.935173, 0.683010238]
53+
- [3.3372792, -4.94024731e-05, 4.99456778e-07, -1.79566394e-10, 2.00255376e-14,
54+
-950.158922, -3.20502331]
55+
note: TPIS78
56+
equation-of-state:
57+
model: Soave-Redlich-Kwong
58+
a: 2.494771E+10
59+
b: 18.4290
60+
acentric-factor: -0.22
61+
- name: CO
62+
composition: {C: 1, O: 1}
63+
thermo:
64+
model: NASA7
65+
temperature-ranges: [200.0, 1000.0, 3500.0]
66+
data:
67+
- [3.57953347, -6.1035368e-04, 1.01681433e-06, 9.07005884e-10, -9.04424499e-13,
68+
-1.4344086e+04, 3.50840928]
69+
- [2.71518561, 2.06252743e-03, -9.98825771e-07, 2.30053008e-10, -2.03647716e-14,
70+
-1.41518724e+04, 7.81868772]
71+
note: TPIS79
72+
equation-of-state:
73+
model: Soave-Redlich-Kwong
74+
a: 1.502575E+11
75+
b: 27.4578
76+
acentric-factor: 0.049
77+
- name: CH4
78+
composition: {C: 1, H: 4}
79+
thermo:
80+
model: NASA7
81+
temperature-ranges: [200.0, 1000.0, 3500.0]
82+
data:
83+
- [5.14987613, -0.0136709788, 4.91800599e-05, -4.84743026e-08, 1.66693956e-11,
84+
-1.02466476e+04, -4.64130376]
85+
- [0.074851495, 0.0133909467, -5.73285809e-06, 1.22292535e-09, -1.0181523e-13,
86+
-9468.34459, 18.437318]
87+
note: L8/88
88+
equation-of-state:
89+
model: Soave-Redlich-Kwong
90+
a: 2.333891E+11
91+
b: 29.8499
92+
acentric-factor: 0.01
93+
- name: O2
94+
composition: {O: 2}
95+
thermo:
96+
model: NASA7
97+
temperature-ranges: [200.0, 1000.0, 3500.0]
98+
data:
99+
- [3.78245636, -2.99673416e-03, 9.84730201e-06, -9.68129509e-09, 3.24372837e-12,
100+
-1063.94356, 3.65767573]
101+
- [3.28253784, 1.48308754e-03, -7.57966669e-07, 2.09470555e-10, -2.16717794e-14,
102+
-1088.45772, 5.45323129]
103+
note: TPIS89
104+
equation-of-state:
105+
model: Soave-Redlich-Kwong
106+
a: 1.400265E+11
107+
b: 22.0823
108+
acentric-factor: 0.022
109+
- name: N2
110+
composition: {N: 2}
111+
thermo:
112+
model: NASA7
113+
temperature-ranges: [300.0, 1000.0, 5000.0]
114+
data:
115+
- [3.298677, 1.4082404e-03, -3.963222e-06, 5.641515e-09, -2.444854e-12,
116+
-1020.8999, 3.950372]
117+
- [2.92664, 1.4879768e-03, -5.68476e-07, 1.0097038e-10, -6.753351e-15,
118+
-922.7977, 5.980528]
119+
note: '121286'
120+
equation-of-state:
121+
model: Soave-Redlich-Kwong
122+
a: 1.388390E+11
123+
b: 31.2734
124+
acentric-factor: 0.04
125+
126+
127+
reactions:
128+
- equation: CO2 + H2 <=> CO + H2O # Reaction 1
129+
rate-constant: {A: 1.2E+3, b: 0, Ea: 0}

test/data/consistency-cases.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ peng-robinson:
5555
- {T: 320, P: 200 bar, X: {CO2: 0.3, CH4: 0.5, H2O: 0.2}}
5656
- {T: 600, P: 200 bar, X: {CO2: 0.4, CH4: 0.2, H2O: 0.4}}
5757

58+
soave-redlich-kwong:
59+
setup:
60+
file: co2_SRK_example.yaml
61+
rtol_fd: 1e-5
62+
states:
63+
- {T: 300, P: 101325, X: {CO2: 0.7, CH4: 0.2, H2O: 0.1}}
64+
- {T: 320, P: 200 bar, X: {CO2: 0.3, CH4: 0.5, H2O: 0.2}}
65+
- {T: 600, P: 200 bar, X: {CO2: 0.4, CH4: 0.2, H2O: 0.4}}
66+
5867
ideal-molal-solution:
5968
setup:
6069
file: thermo-models.yaml

test/thermo/consistency.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,12 @@ INSTANTIATE_TEST_SUITE_P(PengRobinson, TestConsistency,
606606
testing::ValuesIn(getStates("peng-robinson")))
607607
);
608608

609+
INSTANTIATE_TEST_SUITE_P(SoaveRedlichKwong, TestConsistency,
610+
testing::Combine(
611+
testing::Values(getSetup("soave-redlich-kwong")),
612+
testing::ValuesIn(getStates("soave-redlich-kwong")))
613+
);
614+
609615
INSTANTIATE_TEST_SUITE_P(IdealMolalSolution, TestConsistency,
610616
testing::Combine(
611617
testing::Values(getSetup("ideal-molal-solution")),

0 commit comments

Comments
 (0)