[Test] Use YAML input for HMWSoln tests

This commit is contained in:
Ray Speth
2021-06-19 16:11:26 -06:00
committed by Ingmar Schoegl
parent 0ae655d4f3
commit 2deb981621
20 changed files with 501 additions and 1017 deletions
+104
View File
@@ -0,0 +1,104 @@
generator: ctml2yaml
cantera-version: 2.6.0a2
date: Sat, 15 May 2021 16:41:14 -0400
input-files: [test_problems/cathermo/HMW_graph_GvI/HMW_NaCl.xml]
phases:
- name: NaCl_electrolyte_complex_shomate
elements: [O, H, C, E, Fe, Si, N, Na, Cl]
species:
- species_waterSolution: [H2O(L), Cl-, H+, Na+, OH-]
thermo: HMW-electrolyte
activity-data:
temperature-model: complex1
A_Debye: variable
interactions:
- species: [Na+, Cl-]
beta0: [0.0765, 8.946e-03, -3.3158e-06, -777.03, -4.4706]
beta1: [0.2664, 6.1608e-05, 1.0715e-06, 0.0, 0.0]
beta2: [0.0, 0.0, 0.0, 0.0, 0.0]
Cphi: [1.27e-03, -4.655e-05, 0.0, 33.317, 0.09421]
alpha1: 2.0
- species: [H+, Cl-]
beta0: 0.1775
beta1: 0.2945
beta2: 0.0
Cphi: 8.0e-04
alpha1: 2.0
- species: [Na+, OH-]
beta0: 0.0864
beta1: 0.253
beta2: 0.0
Cphi: 4.4e-03
alpha1: 2.0
- species: [Cl-, OH-]
theta: -0.05
- species: [Na+, Cl-, OH-]
psi: -6.0e-03
- species: [Na+, H+]
theta: 0.036
- species: [Cl-, Na+, H+]
psi: -4.0e-03
state: {T: 298.15 K, P: 1.01325e+05 Pa, molalities: {Na+: 6.0954, Cl-: 6.0954, H+: 2.1628e-09,
OH-: 1.3977e-06}}
species_waterSolution:
- name: H2O(L)
composition: {H: 2.0, O: 1.0}
thermo:
model: NASA7
temperature-ranges: [273.15, 600.0]
data:
- [72.5575005, -0.662445402, 2.56198746e-03, -4.36591923e-06, 2.78178981e-09,
-4.18865499e+04, -288.280137]
equation-of-state:
model: liquid-water-IAPWS95
- name: Na+
composition: {Na: 1.0, E: -1.0}
thermo:
model: Shomate
temperature-ranges: [298.0, 623.15]
data:
- [1.232125829e+04, -5.498445383e+04, 9.169571717e+04, -5.441215442e+04, -234.4221295,
-2958.883542, 2.644931197e+04]
equation-of-state:
model: constant-volume
molar-volume: 8.34e-03
- name: Cl-
composition: {Cl: 1.0, E: 1.0}
thermo:
model: Shomate
temperature-ranges: [298.0, 623.15]
data:
- [5.66962042e+04, -2.97835978e+05, 5.81426549e+05, -4.01759991e+05, -804.301136,
-1.08738257e+04, 1.30650697e+05]
equation-of-state:
model: constant-volume
molar-volume: 8.34e-03
- name: H+
composition: {H: 1.0, E: -1.0}
thermo:
model: piecewise-Gibbs
reference-pressure: 1.0e+05
h0: 0.0 cal/mol
T-min: 273.15
T-max: 625.15
dimensionless: true
data:
273.15: 0.0
298.15: 0.0
623.15: 0.0
equation-of-state:
model: constant-volume
molar-volume: 0.0
- name: OH-
composition: {O: 1.0, H: 1.0, E: 1.0}
thermo:
model: Shomate
temperature-ranges: [298.0, 623.15]
data:
- [4.467499961e+04, -2.349430414e+05, 4.60522826e+05, -3.206951836e+05, -638.5044716,
-8683.955813, 1.028742667e+05]
equation-of-state:
model: constant-volume
molar-volume: 8.34e-03
+145
View File
@@ -0,0 +1,145 @@
description: >
NaCl modeling Based on the Silvester&Pitzer 1977 treatment:
(L. F. Silvester, K. S. Pitzer, "Thermodynamics of Electrolytes:
8. High-Temperature Properties, including Enthalpy and Heat
Capacity, with application to sodium chloride",
J. Phys. Chem., 81, 19 1822 - 1828 (1977)
This modification reworks the Na+ standard state Shomate
polynomial, so that the resulting DeltaG0 for the NaCl(s) -> Na+ + Cl-
reaction agrees closely with Silvester and Pitzer. The main
effect that this has is to change the predicted Na+ heat capacity
at low temperatures.
generator: ctml2yaml
cantera-version: 2.6.0a2
date: Sat, 15 May 2021 15:42:46 -0400
input-files: [test/data/HMW_NaCl_sp1977_alt.xml]
phases:
- name: NaCl_electrolyte
elements: [O, H, C, E, Fe, Si, N, Na, Cl]
species:
- species_waterSolution: [H2O(L), Cl-, H+, Na+, OH-]
thermo: HMW-electrolyte
activity-data:
source: These coefficients are from Pitzer's main paper, in his book.
temperature-model: complex1
A_Debye: variable
interactions:
- species: [Na+, Cl-]
beta0: [0.0765, 8.946e-03, -3.3158e-06, -777.03, -4.4706]
beta1: [0.2664, 6.1608e-05, 1.0715e-06, 0.0, 0.0]
beta2: [0.0, 0.0, 0.0, 0.0, 0.0]
Cphi: [1.27e-03, -4.655e-05, 0.0, 33.317, 0.09421]
alpha1: 2.0
- species: [H+, Cl-]
beta0: [0.1775, 0.0, 0.0, 0.0, 0.0]
beta1: [0.2945, 0.0, 0.0, 0.0, 0.0]
beta2: [0.0, 0.0, 0.0, 0.0, 0.0]
Cphi: [8.0e-04, 0.0, 0.0, 0.0, 0.0]
alpha1: 2.0
- species: [Na+, OH-]
beta0: [0.0864, 0.0, 0.0, 0.0, 0.0]
beta1: [0.253, 0.0, 0.0, 0.0, 0.0]
beta2: [0.0, 0.0, 0.0, 0.0, 0.0]
Cphi: [4.4e-03, 0.0, 0.0, 0.0, 0.0]
alpha1: 2.0
- species: [Cl-, OH-]
theta: -0.05
- species: [Na+, Cl-, OH-]
theta: -0.05
psi: -6.0e-03
- species: [Na+, H+]
theta: 0.036
- species: [Cl-, Na+, H+]
theta: 0.036
psi: -4.0e-03
state: {T: 298.15 K, P: 1.01325e+05 Pa, molalities: {Na+: 6.0954, Cl-: 6.0954, H+: 2.1628e-09,
OH-: 1.3977e-06}}
species_waterSolution:
- name: H2O(L)
composition: {H: 2.0, O: 1.0}
thermo:
model: NASA7
temperature-ranges: [273.15, 600.0]
data:
- [72.5575005, -0.662445402, 2.56198746e-03, -4.36591923e-06, 2.78178981e-09,
-4.18865499e+04, -288.280137]
comment:
H2O(L) liquid standard state -> pure H2O. The origin of the NASA polynomial
is a bit murky. It does fit the vapor pressure curve at 298K adequately.
equation-of-state:
model: liquid-water-IAPWS95
- name: Na+
composition: {Na: 1.0, E: -1.0}
thermo:
model: Shomate
temperature-ranges: [293.15, 593.15]
data:
- [-5.799347558e+04, 3.05112604e+05, -5.922221591e+05, 4.019779827e+05, 804.419598,
1.062524901e+04, -1.337962298e+05]
comment: Differences in the delta_G0 reaction for salt formation were dumped into
this polynomial.
equation-of-state:
model: constant-volume
molar-volume: 8.34e-03
comment: From Pitzer, Peiper, and Busey. We divide NaCl (aq) value by 2 to get this.
- name: Cl-
composition: {Cl: 1.0, E: 1.0}
thermo:
model: Shomate
temperature-ranges: [298.0, 623.15]
data:
- [5.66962042e+04, -2.97835978e+05, 5.81426549e+05, -4.01759991e+05, -804.301136,
-1.08738257e+04, 1.30650697e+05]
comment:
Cl- (aq) standard state based on the unity molality convention. The Shomate
polynomial was created from the SUPCRT92 J. Phys Chem Ref article, and the CODATA
recommended values, DelHf(298.15) = -167.08 kJ/gmol and S(298.15) = 56.60 J/gmolK.
There was a slight discrepancy between those two, which was resolved in favor of
CODATA. Note, the order of the polynomials can be decreased by dropping terms
from the complete Shomate poly.
equation-of-state:
model: constant-volume
molar-volume: 8.34e-03
comment: From Pitzer, Peiper, and Busey. We divide NaCl (aq) value by 2 to get this
- name: H+
composition: {H: 1.0, E: -1.0}
thermo:
model: piecewise-Gibbs
reference-pressure: 1.0e+05
h0: 0.0 cal/mol
T-min: 273.15
T-max: 625.15
dimensionless: true
data:
273.15: 0.0
298.15: 0.0
623.15: 0.0
comment:
H+ (aq) standard state based on the unity molality convention. The H+ standard
state is set to zeroes by convention. This includes it's contribution to the molar
volume of solution.
equation-of-state:
model: constant-volume
molar-volume: 0.0
- name: OH-
composition: {O: 1.0, H: 1.0, E: 1.0}
thermo:
model: Shomate
temperature-ranges: [298.0, 623.15]
data:
- [4.467499961e+04, -2.349430414e+05, 4.60522826e+05, -3.206951836e+05, -638.5044716,
-8683.955813, 1.028742667e+05]
comment: OH- (aq) standard state based on the unity molality convention. The Shomate
polynomial was created with data from the SUPCRT92 J. Phys Chem Ref article, and
from the CODATA recommended values. DelHf(298.15) = -230.015 kJ/gmol;
S(298.15) = -10.90 J/gmolK. There was a slight discrepancy between those two,
which was resolved in favor of CODATA. Note, the order of the polynomials can be
decreased by dropping terms from the complete Shomate poly.
equation-of-state:
model: constant-volume
molar-volume: 8.34e-03
comment: This value is currently made up.
+23
View File
@@ -0,0 +1,23 @@
generator: ctml2yaml
cantera-version: 2.6.0a2
date: Sat, 15 May 2021 19:57:23 -0400
input-files: [test/data/NaCl_Solid.xml]
phases:
- name: NaCl(S)
elements: [O, H, C, Fe, Ca, N, Na, Cl]
species:
- species_NaCl(S): [NaCl(S)]
thermo: fixed-stoichiometry
species_NaCl(S):
- name: NaCl(S)
composition: {Na: 1.0, Cl: 1.0}
thermo:
model: Shomate
temperature-ranges: [250.0, 1075.0]
data:
- [50.72389, 6.672267, -2.517167, 10.15934, -0.200675, -427.2115, 130.3973]
equation-of-state:
model: constant-volume
density: 2.165 g/cm^3
+4 -4
View File
@@ -168,7 +168,7 @@ Test('DH_graph_Pitzer', 'cathermo/DH_graph_1',
CompileAndTest('HMW_graph_CpvT', 'cathermo/HMW_graph_CpvT',
extensions=['^HMW_graph_CpvT.cpp'],
arguments=File('#test/data/HMW_NaCl_sp1977_alt.xml').abspath)
arguments=File('#test/data/HMW_NaCl_sp1977_alt.yaml').abspath)
CompileAndTest('HMW_graph_GvI', 'cathermo/HMW_graph_GvI',
blessedName=None,
comparisons=[('T298_blessed.csv', 'T298.csv'),
@@ -177,13 +177,13 @@ CompileAndTest('HMW_graph_GvI', 'cathermo/HMW_graph_GvI',
'T548.csv','T573.csv'])
CompileAndTest('HMW_graph_GvT', 'cathermo/HMW_graph_GvT',
extensions=['^HMW_graph_GvT.cpp'],
arguments=File('#test/data/HMW_NaCl_sp1977_alt.xml').abspath)
arguments=File('#test/data/HMW_NaCl_sp1977_alt.yaml').abspath)
CompileAndTest('HMW_graph_HvT', 'cathermo/HMW_graph_HvT',
extensions=['^HMW_graph_HvT.cpp'],
arguments=File('#test/data/HMW_NaCl_sp1977_alt.xml').abspath)
arguments=File('#test/data/HMW_NaCl_sp1977_alt.yaml').abspath)
CompileAndTest('HMW_graph_VvT', 'cathermo/HMW_graph_VvT',
extensions=['^HMW_graph_VvT.cpp'],
arguments=File('#test/data/HMW_NaCl_sp1977_alt.xml').abspath)
arguments=File('#test/data/HMW_NaCl_sp1977_alt.yaml').abspath)
CompileAndTest('HMW_test_1', 'cathermo/HMW_test_1',
blessedName='output_noD_blessed.txt')
CompileAndTest('HMW_test_3', 'cathermo/HMW_test_3',
@@ -1,239 +0,0 @@
<?xml version="1.0"?>
<!--
NaCl modeling Based on the Silvester&Pitzer 1977 treatment:
(L. F. Silvester, K. S. Pitzer, "Thermodynamics of Electrolytes:
8. High-Temperature Properties, including Enthalpy and Heat
Capacity, with application to sodium chloride",
J. Phys. Chem., 81, 19 1822 - 1828 (1977)
-->
<ctml>
<phase id="NaCl_electrolyte" dim="3">
<speciesArray datasrc="#species_waterSolution">
H2O(L) Cl- H+ Na+ OH-
</speciesArray>
<state>
<temperature units="K"> 298.15 </temperature>
<pressure units="Pa"> 101325.0 </pressure>
<soluteMolalities>
Na+:6.0954
Cl-:6.0954
H+:2.1628E-9
OH-:1.3977E-6
</soluteMolalities>
</state>
<thermo model="HMW">
<standardConc model="solvent_volume" />
<activityCoefficients model="Pitzer" TempModel="complex1">
<!-- Pitzer Coefficients
These coefficients are from Pitzer's main
paper, in his book.
-->
<A_Debye model="water" />
<ionicRadius default="3.042843" units="Angstroms">
</ionicRadius>
<binarySaltParameters cation="Na+" anion="Cl-">
<beta0> 0.0765, 0.008946, -3.3158E-6,
-777.03, -4.4706
</beta0>
<beta1> 0.2664, 6.1608E-5, 1.0715E-6, 0.0, 0.0 </beta1>
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
<Cphi> 0.00127, -4.655E-5, 0.0,
33.317, 0.09421
</Cphi>
<Alpha1> 2.0 </Alpha1>
</binarySaltParameters>
<binarySaltParameters cation="H+" anion="Cl-">
<beta0> 0.1775, 0.0, 0.0, 0.0, 0.0 </beta0>
<beta1> 0.2945, 0.0, 0.0, 0.0, 0.0 </beta1>
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
<Cphi> 0.0008, 0.0, 0.0, 0.0, 0.0 </Cphi>
<Alpha1> 2.0 </Alpha1>
</binarySaltParameters>
<binarySaltParameters cation="Na+" anion="OH-">
<beta0> 0.0864, 0.0, 0.0, 0.0, 0.0 </beta0>
<beta1> 0.253, 0.0, 0.0, 0.0, 0.0 </beta1>
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
<Cphi> 0.0044, 0.0, 0.0, 0.0, 0.0 </Cphi>
<Alpha1> 2.0 </Alpha1>
</binarySaltParameters>
<thetaAnion anion1="Cl-" anion2="OH-">
<theta> -0.05 </theta>
</thetaAnion>
<psiCommonCation cation="Na+" anion1="Cl-" anion2="OH-">
<theta> -0.05 </theta>
<Psi> -0.006 </Psi>
</psiCommonCation>
<thetaCation cation1="Na+" cation2="H+">
<theta> 0.036 </theta>
</thetaCation>
<psiCommonAnion anion="Cl-" cation1="Na+" cation2="H+">
<theta> 0.036 </theta>
<Psi> -0.004 </Psi>
</psiCommonAnion>
</activityCoefficients>
<solvent> H2O(L) </solvent>
</thermo>
<elementArray datasrc="elements.xml"> O H C Fe Si N Na Cl E </elementArray>
<kinetics model="none" >
</kinetics>
</phase>
<speciesData id="species_waterSolution">
<species name="H2O(L)">
<!-- H2O(L) liquid standard state -> pure H2O
The origin of the NASA polynomial is a bit murky. It does
fit the vapor pressure curve at 298K adequately.
-->
<atomArray>H:2 O:1 </atomArray>
<thermo>
<NASA Tmax="600.0" Tmin="273.14999999999998" P0="100000.0">
<floatArray name="coeffs" size="7">
7.255750050E+01, -6.624454020E-01, 2.561987460E-03, -4.365919230E-06,
2.781789810E-09, -4.188654990E+04, -2.882801370E+02
</floatArray>
</NASA>
</thermo>
<standardState model="waterIAPWS">
<!--
Molar volume in m3 kmol-1.
(this is from Pitzer, Peiper, and Busey. However,
the result can be easily derived from ~ 1gm/cm**3)
-->
<molarVolume> 0.018068 </molarVolume>
</standardState>
</species>
<species name="Na+">
<!-- Na+ (aq) standard state based on the unity molality convention
The Shomate polynomial was created from the SUPCRT92
J. Phys Chem Ref article, and the CODATA recommended
values. DelHf(298.15) = -240.34 kJ/gmol
S(298.15) = 58.45 J/gmolK
There was a slight discrepancy between those two, which was
resolved in favor of CODATA.
Notes: the order of the polynomials can be decreased by
dropping terms from the complete Shomate poly.
-->
<atomArray> Na:1 E:-1 </atomArray>
<charge> +1 </charge>
<thermo>
<Shomate Pref="1 atm" Tmax=" 623.15" Tmin=" 298.00">
<floatArray size="7">
12321.25829 , -54984.45383 , 91695.71717 ,
-54412.15442 , -234.4221295 , -2958.883542 ,
26449.31197
</floatArray>
</Shomate>
</thermo>
<standardState model="constant_incompressible">
<!-- Na+ (aq) molar volume
Molar volume in m3 kmol-1.
(this is from Pitzer, Peiper, and Busey. We divide
NaCl (aq) value by 2 to get this)
-->
<molarVolume> 0.00834 </molarVolume>
</standardState>
</species>
<species name="Cl-">
<!-- Cl- (aq) standard state based on the unity molality convention
The Shomate polynomial was created from the SUPCRT92
J. Phys Chem Ref article, and the CODATA recommended
values. DelHf(298.15) = -167.08 kJ/gmol
S(298.15) = 56.60 J/gmolK
There was a slight discrepancy between those two, which was
resolved in favor of CODATA.
Notes: the order of the polynomials can be decreased by
dropping terms from the complete Shomate poly.
-->
<atomArray> Cl:1 E:1 </atomArray>
<charge> -1 </charge>
<standardState model="constant_incompressible">
<!-- Cl- (aq) molar volume
Molar volume in m3 kmol-1.
(this is from Pitzer, Peiper, and Busey. We divide
NaCl (aq) value by 2 to get this)
-->
<molarVolume> 0.00834 </molarVolume>
</standardState>
<thermo>
<Shomate Pref="1 atm" Tmax=" 623.15" Tmin=" 298.00">
<floatArray size="7">
56696.2042 , -297835.978 , 581426.549 ,
-401759.991 , -804.301136 , -10873.8257 ,
130650.697
</floatArray>
</Shomate>
</thermo>
</species>
<species name="H+">
<!-- H+ (aq) standard state based on the unity molality convention
The H+ standard state is set to zeroes by convention. This
includes it's contribution to the molar volume of solution.
-->
<atomArray> H:1 E:-1 </atomArray>
<charge> +1 </charge>
<standardState model="constant_incompressible">
<molarVolume> 0.0 </molarVolume>
</standardState>
<thermo>
<Mu0 Pref="100000.0" Tmax="625.15" Tmin="273.15">
<H298 units="cal/mol"> 0.0 </H298>
<numPoints> 3 </numPoints>
<floatArray size="3" title="Mu0Values" units="Dimensionless">
0.0 , 0.0, 0.0
</floatArray>
<floatArray size="3" title="Mu0Temperatures">
273.15, 298.15 , 623.15
</floatArray>
</Mu0>
</thermo>
</species>
<species name="OH-">
<!-- OH- (aq) standard state based on the unity molality convention
The Shomate polynomial was created with data from the SUPCRT92
J. Phys Chem Ref article, and from the CODATA recommended
values. DelHf(298.15) = -230.015 kJ/gmol
S(298.15) = -10.90 J/gmolK
There was a slight discrepancy between those two, which was
resolved in favor of CODATA.
Notes: the order of the polynomials can be decreased by
dropping terms from the complete Shomate poly.
-->
<atomArray> O:1 H:1 E:1 </atomArray>
<charge> -1 </charge>
<standardState model="constant_incompressible">
<!-- OH- (aq) molar volume
This value is currently made up.
-->
<molarVolume> 0.00834 </molarVolume>
</standardState>
<thermo>
<Shomate Pref="1 atm" Tmax=" 623.15" Tmin=" 298.00">
<floatArray size="7">
44674.99961 , -234943.0414 , 460522.8260 ,
-320695.1836 , -638.5044716 , -8683.955813 ,
102874.2667
</floatArray>
</Shomate>
</thermo>
</species>
</speciesData>
</ctml>
@@ -0,0 +1,81 @@
generator: ctml2yaml
cantera-version: 2.6.0a2
date: Sat, 15 May 2021 19:55:11 -0400
input-files: [test_problems/VCSnonideal/NaCl_equil/gas.xml]
phases:
- name: air
elements: [O, H, C, Fe, Ca, N, Na, Cl]
species: [O2, H2, CO2, H2O, NaCl, N2, OH]
thermo: ideal-gas
transport: mixture-averaged
state: {T: 300.0 K, P: 1.01325e+05 Pa}
species:
- name: O2
composition: {O: 2.0}
thermo:
model: NASA7
temperature-ranges: [200.0, 1000.0, 6000.0]
data:
- [3.78245636, -2.99673415e-03, 9.847302e-06, -9.68129508e-09, 3.24372836e-12,
-1063.94356, 3.65767573]
- [3.66096083, 6.56365523e-04, -1.41149485e-07, 2.05797658e-11, -1.29913248e-15,
-1215.97725, 3.41536184]
- name: H2
composition: {H: 2.0}
thermo:
model: NASA7
temperature-ranges: [200.0, 1000.0, 6000.0]
data:
- [2.34433112, 7.98052075e-03, -1.9478151e-05, 2.01572094e-08, -7.37611761e-12,
-917.935173, 0.683010238]
- [2.93286579, 8.26607967e-04, -1.46402335e-07, 1.54100359e-11, -6.88804432e-16,
-813.065597, -1.02432887]
- name: CO2
composition: {C: 1.0, O: 2.0}
thermo:
model: NASA7
temperature-ranges: [200.0, 1000.0, 6000.0]
data:
- [2.35677352, 8.98459677e-03, -7.12356269e-06, 2.45919022e-09, -1.43699548e-13,
-4.83719697e+04, 9.90105222]
- [4.63659493, 2.74131991e-03, -9.95828531e-07, 1.60373011e-10, -9.16103468e-15,
-4.90249341e+04, -1.93534855]
- name: H2O
composition: {H: 2.0, O: 1.0}
thermo:
model: NASA7
temperature-ranges: [200.0, 1000.0, 6000.0]
data:
- [4.19864056, -2.0364341e-03, 6.52040211e-06, -5.48797062e-09, 1.77197817e-12,
-3.02937267e+04, -0.849032208]
- [2.67703787, 2.97318329e-03, -7.7376969e-07, 9.44336689e-11, -4.26900959e-15,
-2.98858938e+04, 6.88255571]
- name: OH
composition: {H: 1.0, O: 1.0}
thermo:
model: NASA7
temperature-ranges: [200.0, 1000.0, 2000.0]
data:
- [72.5575, -0.7409634, 2.56198746e-03, -4.36591923e-06, 2.78178981e-09, -3.15909e+04,
-274.2698]
- [72.5575, -0.7409634, 2.56198746e-03, -4.36591923e-06, 2.78178981e-09, -3.15909e+04,
-274.2698]
- name: NaCl
composition: {Na: 1.0, Cl: 1.0}
thermo:
model: Shomate
temperature-ranges: [250.0, 1074.0]
data:
- [37.33, 0.7364, 0.0, 0.0, -0.1586, -193.113, 273.765]
- name: N2
composition: {N: 2.0}
thermo:
model: NASA7
temperature-ranges: [200.0, 1000.0, 6000.0]
data:
- [3.53100528, -1.23660987e-04, -5.02999437e-07, 2.43530612e-09, -1.40881235e-12,
-1046.97628, 2.96747468]
- [2.95257626, 1.39690057e-03, -4.92631691e-07, 7.86010367e-11, -4.60755321e-15,
-923.948645, 5.87189252]
@@ -1,145 +0,0 @@
<?xml version="1.0"?>
<ctml>
<validate reactions="yes" species="yes"/>
<!-- phase gas -->
<phase dim="3" id="air">
<elementArray datasrc="elements.xml">
O H C Fe Ca N Na Cl
</elementArray>
<speciesArray datasrc="#species_data">
O2 H2 CO2 H2O NaCl N2 OH
</speciesArray>
<state>
<temperature units="K">300.0</temperature>
<pressure units="Pa">101325.0</pressure>
</state>
<thermo model="IdealGas"/>
<kinetics model="GasKinetics"/>
<transport model="Mix"/>
</phase>
<!-- species definitions -->
<speciesData id="species_data">
<!-- species O2 -->
<species name="O2">
<atomArray>O:2 </atomArray>
<thermo>
<NASA Tmax="1000.0" Tmin="200.0" P0="100000.0">
<floatArray name="coeffs" size="7">
3.782456360E+00, -2.996734150E-03, 9.847302000E-06, -9.681295080E-09,
3.243728360E-12, -1.063943560E+03, 3.657675730E+00</floatArray>
</NASA>
<NASA Tmax="6000.0" Tmin="1000.0" P0="100000.0">
<floatArray name="coeffs" size="7">
3.660960830E+00, 6.563655230E-04, -1.411494850E-07, 2.057976580E-11,
-1.299132480E-15, -1.215977250E+03, 3.415361840E+00</floatArray>
</NASA>
</thermo>
</species>
<!-- species H2 -->
<species name="H2">
<atomArray>H:2 </atomArray>
<thermo>
<NASA Tmax="1000.0" Tmin="200.0" P0="100000.0">
<floatArray name="coeffs" size="7">
2.344331120E+00, 7.980520750E-03, -1.947815100E-05, 2.015720940E-08,
-7.376117610E-12, -9.179351730E+02, 6.830102380E-01</floatArray>
</NASA>
<NASA Tmax="6000.0" Tmin="1000.0" P0="100000.0">
<floatArray name="coeffs" size="7">
2.932865790E+00, 8.266079670E-04, -1.464023350E-07, 1.541003590E-11,
-6.888044320E-16, -8.130655970E+02, -1.024328870E+00</floatArray>
</NASA>
</thermo>
</species>
<!-- species CO2 -->
<species name="CO2">
<atomArray>C:1 O:2 </atomArray>
<thermo>
<NASA Tmax="1000.0" Tmin="200.0" P0="100000.0">
<floatArray name="coeffs" size="7">
2.356773520E+00, 8.984596770E-03, -7.123562690E-06, 2.459190220E-09,
-1.436995480E-13, -4.837196970E+04, 9.901052220E+00</floatArray>
</NASA>
<NASA Tmax="6000.0" Tmin="1000.0" P0="100000.0">
<floatArray name="coeffs" size="7">
4.636594930E+00, 2.741319910E-03, -9.958285310E-07, 1.603730110E-10,
-9.161034680E-15, -4.902493410E+04, -1.935348550E+00</floatArray>
</NASA>
</thermo>
</species>
<!-- species H2O gas phase water -->
<species name="H2O">
<atomArray>H:2 O:1 </atomArray>
<thermo>
<NASA Tmax="1000.0" Tmin="200.0" P0="100000.0">
<floatArray name="coeffs" size="7">
4.198640560E+00, -2.036434100E-03, 6.520402110E-06, -5.487970620E-09,
1.771978170E-12, -3.029372670E+04, -8.490322080E-01
</floatArray>
</NASA>
<NASA Tmax="6000.0" Tmin="1000.0" P0="100000.0">
<floatArray name="coeffs" size="7">
2.677037870E+00, 2.973183290E-03, -7.737696900E-07, 9.443366890E-11,
-4.269009590E-15, -2.988589380E+04, 6.882555710E+00
</floatArray>
</NASA>
</thermo>
</species>
<!-- species OH gas phase water -->
<species name="OH">
<atomArray>H:1 O:1 </atomArray>
<thermo>
<NASA Tmax="1000.0" Tmin="200.0" P0="100000.0">
<floatArray name="coeffs" size="7">
7.25575E1, -0.7409634, 2.56198746E-3, -4.36591923E-6,
2.78178981E-9, -3.15909E4, -274.2698
</floatArray>
</NASA>
<NASA Tmax="2000.0" Tmin="1000.0" P0="100000.0">
<floatArray name="coeffs" size="7">
7.25575E1, -0.7409634, 2.56198746E-3, -4.36591923E-6,
2.78178981E-9, -3.15909E4, -274.2698
</floatArray>
</NASA>
</thermo>
</species>
<species name="NaCl">
<atomArray> Na:1 Cl:1 </atomArray>
<thermo>
<Shomate Tmax="1074.0" Tmin="250.0" P0="100000.0">
<floatArray name="coeffs" size="7">
37.33, 0.7364, 0.0, 0.0,
-0.1586, -193.113, 273.765
</floatArray>
</Shomate>
</thermo>
</species>
<!-- species N2 -->
<species name="N2">
<atomArray>N:2 </atomArray>
<thermo>
<NASA Tmax="1000.0" Tmin="200.0" P0="100000.0">
<floatArray name="coeffs" size="7">
3.531005280E+00, -1.236609870E-04, -5.029994370E-07, 2.435306120E-09,
-1.408812350E-12, -1.046976280E+03, 2.967474680E+00</floatArray>
</NASA>
<NASA Tmax="6000.0" Tmin="1000.0" P0="100000.0">
<floatArray name="coeffs" size="7">
2.952576260E+00, 1.396900570E-03, -4.926316910E-07, 7.860103670E-11,
-4.607553210E-15, -9.239486450E+02, 5.871892520E+00</floatArray>
</NASA>
</thermo>
</species>
</speciesData>
</ctml>
@@ -99,12 +99,12 @@ Elemental Abundances: Target_kmol ElemType ElActive
O 2.000000000000E+00 0 1
H 4.000000000000E+00 0 1
C 0.000000000000E+00 0 1
E 0.000000000000E+00 1 0
Fe 0.000000000000E+00 0 1
Si 0.000000000000E+00 0 1
N 8.000000000000E+00 0 1
Na 5.000000000000E+00 0 1
Cl 5.000000000000E+00 0 1
E 0.000000000000E+00 1 0
cn 0.000000000000E+00 2 1
Ca 0.000000000000E+00 0 1
@@ -152,8 +152,8 @@ VCS CALCULATION METHOD
Cl 5.000000000000E+00 5.000000000000E+00 0
cn 0.000000000000E+00 0.000000000000E+00 2
Fe 0.000000000000E+00 0.000000000000E+00 0
E 0.000000000000E+00 0.000000000000E+00 1
Si 0.000000000000E+00 0.000000000000E+00 0
E 0.000000000000E+00 0.000000000000E+00 1
Ca 0.000000000000E+00 0.000000000000E+00 0
MODIFIED LINEAR PROGRAMMING ESTIMATE OF EQUILIBRIUM - forced
@@ -161,15 +161,15 @@ VCS CALCULATION METHOD
SPECIES FORMULA VECTOR STAN_CHEM_POT EQUILIBRIUM_EST. Species_Type
O H C N Na Cl cn_N Fe E Si Ca PhaseID
Na+ 0 0 0 0 1 0 1 0 -1 0 0 0 -2.57752E+08 5.00000E+00 Mol_Num
Cl- 0 0 0 0 0 1 -1 0 1 0 0 0 -1.83974E+08 5.00000E+00 Mol_Num
O H C N Na Cl cn_N Fe Si E Ca PhaseID
Na+ 0 0 0 0 1 0 1 0 0 -1 0 0 -2.57752E+08 5.00000E+00 Mol_Num
Cl- 0 0 0 0 0 1 -1 0 0 1 0 0 -1.83974E+08 5.00000E+00 Mol_Num
N2 0 0 0 2 0 0 0 0 0 0 0 1 -5.71281E+07 4.00000E+00 Mol_Num
H2O(L) 1 2 0 0 0 0 0 0 -0 0 0 0 -3.06686E+08 1.84000E+00 Mol_Num
OH- 1 1 0 0 0 0 -1 0 1 0 0 0 -2.26784E+08 1.60000E-01 Mol_Num
H2O(L) 1 2 0 0 0 0 0 0 0 -0 0 0 -3.06686E+08 1.84000E+00 Mol_Num
OH- 1 1 0 0 0 0 -1 0 0 1 0 0 -2.26784E+08 1.60000E-01 Mol_Num
CO2 2 0 1 0 0 0 0 0 0 0 0 1 -4.57248E+08 0.00000E+00 Mol_Num
H2 0 2 0 0 0 0 0 0 0 0 0 1 -3.89623E+07 2.49543E-14 Mol_Num
H+ 0 1 0 0 0 0 1 0 -1 0 0 0 0.00000E+00 1.60000E-01 Mol_Num
H+ 0 1 0 0 0 0 1 0 0 -1 0 0 0.00000E+00 1.60000E-01 Mol_Num
H2O 1 2 0 0 0 0 0 0 0 0 0 1 -2.98124E+08 2.99921E-20 Mol_Num
NaCl 0 0 0 0 1 1 0 0 0 0 0 1 -2.49904E+08 4.71533E-44 Mol_Num
O2 2 0 0 0 0 0 0 0 0 0 0 1 -6.11650E+07 2.05302E-41 Mol_Num
@@ -226,7 +226,7 @@ VCS CALCULATION METHOD
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| ElementID | 0 1 2 3 4 5 6 7 8 9 10 | |
| Element | O H C N Na Cl cn_NaCl_el Fe E Si Ca | |
| Element | O H C N Na Cl cn_NaCl_el Fe Si E Ca | |
PhaseName |KMolTarget | 2 4 0 8 5 5 0 0 0 0 0 | Gibbs Total |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
0 NaCl_electro | 2.327e+00 | 1.9 3.81 0 0 0.212 0.212 0 0 0 0 0 | -2.73007712838E+02 |
@@ -248,8 +248,8 @@ Elemental Abundances (kmol): Actual Target T
Cl 5.000000000000E+00 5.000000000000E+00 0 1
cn 0.000000000000E+00 0.000000000000E+00 2 1
Fe 0.000000000000E+00 0.000000000000E+00 0 1
E 0.000000000000E+00 0.000000000000E+00 1 0
Si 0.000000000000E+00 0.000000000000E+00 0 1
E 0.000000000000E+00 0.000000000000E+00 1 0
Ca 0.000000000000E+00 0.000000000000E+00 0 1
@@ -13,11 +13,11 @@ using namespace std;
void printUsage()
{
cout << "usage: nacl_equil [-h] [-help_cmdfile] [-d #] [HMW_NaCl.xml] "
cout << "usage: nacl_equil [-h] [-help_cmdfile] [-d #] [HMW_NaCl.yaml] "
<< endl;
cout << " -h help" << endl;
cout << " -d # : level of debug printing" << endl;
cout << " [HMW_NaCl.xml] - Optionally change the name of the input file " << endl;
cout << " [HMW_NaCl.yaml] - Optionally change the name of the input file " << endl;
cout << endl;
cout << endl;
}
@@ -31,7 +31,7 @@ int main(int argc, char** argv)
int numSucc = 0;
int numFail = 0;
int printLvl = 1;
string inputFile = "HMW_NaCl.xml";
string inputFile = "HMW_NaCl.yaml";
VCS_SOLVE::disableTiming();
/*
@@ -67,7 +67,7 @@ int main(int argc, char** argv)
exit(1);
}
}
} else if (inputFile == "HMW_NaCl.xml") {
} else if (inputFile == "HMW_NaCl.yaml") {
inputFile = tok;
} else {
printUsage();
@@ -85,14 +85,15 @@ int main(int argc, char** argv)
// Initialize the individual phases
HMWSoln hmw(inputFile, "");
HMWSoln hmw(inputFile, "NaCl_electrolyte_complex_shomate");
hmw.setName("NaCl_electrolyte");
size_t kk = hmw.nSpecies();
vector_fp Xmol(kk, 0.0);
size_t iH2OL = hmw.speciesIndex("H2O(L)");
Xmol[iH2OL] = 1.0;
hmw.setState_TPX(T, pres, Xmol.data());
ThermoPhase* gas = newPhase("gas.xml");
ThermoPhase* gas = newPhase("NaCl_gas.yaml");
kk = gas->nSpecies();
Xmol.resize(kk, 0.0);
@@ -104,7 +105,7 @@ int main(int argc, char** argv)
gas->setState_TPX(T, pres, Xmol.data());
StoichSubstance ss("NaCl_Solid.xml", "");
StoichSubstance ss("NaCl_Solid.yaml");
ss.setState_TP(T, pres);
@@ -18,17 +18,11 @@ int main(int argc, char** argv)
size_t i;
try {
std::string iFile = (argc > 1) ? argv[1] : "HMW_NaCl.xml";
std::string iFile = (argc > 1) ? argv[1] : "HMW_NaCl.yaml";
double Cp0_R[20], pmCp[20];
HMWSoln* HMW = new HMWSoln(iFile, "NaCl_electrolyte");
/*
* Load in and initialize the
*/
Cantera::ThermoPhase* solid = newPhase("NaCl_Solid.xml","NaCl(S)");
ThermoPhase* solid = newPhase("NaCl_Solid.yaml", "NaCl(S)");
size_t nsp = HMW->nSpecies();
double mf[100];
@@ -1,239 +0,0 @@
<?xml version="1.0"?>
<!--
NaCl modeling Based on the Silvester&Pitzer 1977 treatment:
(L. F. Silvester, K. S. Pitzer, "Thermodynamics of Electrolytes:
8. High-Temperature Properties, including Enthalpy and Heat
Capacity, with application to sodium chloride",
J. Phys. Chem., 81, 19 1822 - 1828 (1977)
-->
<ctml>
<phase id="NaCl_electrolyte" dim="3">
<speciesArray datasrc="#species_waterSolution">
H2O(L) Cl- H+ Na+ OH-
</speciesArray>
<state>
<temperature units="K"> 298.15 </temperature>
<pressure units="Pa"> 101325.0 </pressure>
<soluteMolalities>
Na+:6.0954
Cl-:6.0954
H+:2.1628E-9
OH-:1.3977E-6
</soluteMolalities>
</state>
<thermo model="HMW">
<standardConc model="solvent_volume" />
<activityCoefficients model="Pitzer" TempModel="complex1">
<!-- Pitzer Coefficients
These coefficients are from Pitzer's main
paper, in his book.
-->
<A_Debye model="water" />
<ionicRadius default="3.042843" units="Angstroms">
</ionicRadius>
<binarySaltParameters cation="Na+" anion="Cl-">
<beta0> 0.0765, 0.008946, -3.3158E-6,
-777.03, -4.4706
</beta0>
<beta1> 0.2664, 6.1608E-5, 1.0715E-6, 0.0, 0.0 </beta1>
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
<Cphi> 0.00127, -4.655E-5, 0.0,
33.317, 0.09421
</Cphi>
<Alpha1> 2.0 </Alpha1>
</binarySaltParameters>
<binarySaltParameters cation="H+" anion="Cl-">
<beta0> 0.1775, 0.0, 0.0, 0.0, 0.0 </beta0>
<beta1> 0.2945, 0.0, 0.0, 0.0, 0.0 </beta1>
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
<Cphi> 0.0008, 0.0, 0.0, 0.0, 0.0 </Cphi>
<Alpha1> 2.0 </Alpha1>
</binarySaltParameters>
<binarySaltParameters cation="Na+" anion="OH-">
<beta0> 0.0864, 0.0, 0.0, 0.0, 0.0 </beta0>
<beta1> 0.253, 0.0, 0.0, 0.0, 0.0 </beta1>
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
<Cphi> 0.0044, 0.0, 0.0, 0.0, 0.0 </Cphi>
<Alpha1> 2.0 </Alpha1>
</binarySaltParameters>
<thetaAnion anion1="Cl-" anion2="OH-">
<theta> -0.05 </theta>
</thetaAnion>
<psiCommonCation cation="Na+" anion1="Cl-" anion2="OH-">
<theta> -0.05 </theta>
<Psi> -0.006 </Psi>
</psiCommonCation>
<thetaCation cation1="Na+" cation2="H+">
<theta> 0.036 </theta>
</thetaCation>
<psiCommonAnion anion="Cl-" cation1="Na+" cation2="H+">
<theta> 0.036 </theta>
<Psi> -0.004 </Psi>
</psiCommonAnion>
</activityCoefficients>
<solvent> H2O(L) </solvent>
</thermo>
<elementArray datasrc="elements.xml"> O H C E Fe Si N Na Cl </elementArray>
<kinetics model="none" >
</kinetics>
</phase>
<speciesData id="species_waterSolution">
<species name="H2O(L)">
<!-- H2O(L) liquid standard state -> pure H2O
The origin of the NASA polynomial is a bit murky. It does
fit the vapor pressure curve at 298K adequately.
-->
<atomArray>H:2 O:1 </atomArray>
<thermo>
<NASA Tmax="600.0" Tmin="273.14999999999998" P0="100000.0">
<floatArray name="coeffs" size="7">
7.255750050E+01, -6.624454020E-01, 2.561987460E-03, -4.365919230E-06,
2.781789810E-09, -4.188654990E+04, -2.882801370E+02
</floatArray>
</NASA>
</thermo>
<standardState model="waterIAPWS">
<!--
Molar volume in m3 kmol-1.
(this is from Pitzer, Peiper, and Busey. However,
the result can be easily derived from ~ 1gm/cm**3)
<molarVolume> 0.018068 </molarVolume>
-->
</standardState>
</species>
<species name="Na+">
<!-- Na+ (aq) standard state based on the unity molality convention
The Shomate polynomial was created from the SUPCRT92
J. Phys Chem Ref article, and the CODATA recommended
values. DelHf(298.15) = -240.34 kJ/gmol
S(298.15) = 58.45 J/gmolK
There was a slight discrepancy between those two, which was
resolved in favor of CODATA.
Notes: the order of the polynomials can be decreased by
dropping terms from the complete Shomate poly.
-->
<atomArray> Na:1 E:-1 </atomArray>
<charge> +1 </charge>
<thermo>
<Shomate Pref="1 atm" Tmax=" 623.15" Tmin=" 298.00">
<floatArray size="7">
12321.25829 , -54984.45383 , 91695.71717 ,
-54412.15442 , -234.4221295 , -2958.883542 ,
26449.31197
</floatArray>
</Shomate>
</thermo>
<standardState model="constant_incompressible">
<!-- Na+ (aq) molar volume
Molar volume in m3 kmol-1.
(this is from Pitzer, Peiper, and Busey. We divide
NaCl (aq) value by 2 to get this)
-->
<molarVolume> 0.00834 </molarVolume>
</standardState>
</species>
<species name="Cl-">
<!-- Cl- (aq) standard state based on the unity molality convention
The shomate polynomial was created from the SUPCRT92
J. Phys Chem Ref article, and the CODATA recommended
values. DelHf(298.15) = -167.08 kJ/gmol
S(298.15) = 56.60 J/gmolK
There was a slight discrepancy between those two, which was
resolved in favor of CODATA.
Notes: the order of the polynomials can be decreased by
dropping terms from the complete Shomate poly.
-->
<atomArray> Cl:1 E:1 </atomArray>
<charge> -1 </charge>
<standardState model="constant_incompressible">
<!-- Cl- (aq) molar volume
Molar volume in m3 kmol-1.
(this is from Pitzer, Peiper, and Busey. We divide
NaCl (aq) value by 2 to get this)
-->
<molarVolume> 0.00834 </molarVolume>
</standardState>
<thermo>
<Shomate Pref="1 atm" Tmax=" 623.15" Tmin=" 298.00">
<floatArray size="7">
56696.2042 , -297835.978 , 581426.549 ,
-401759.991 , -804.301136 , -10873.8257 ,
130650.697
</floatArray>
</Shomate>
</thermo>
</species>
<species name="H+">
<!-- H+ (aq) standard state based on the unity molality convention
The H+ standard state is set to zeroes by convention. This
includes it's contribution to the molar volume of solution.
-->
<atomArray> H:1 E:-1 </atomArray>
<charge> +1 </charge>
<standardState model="constant_incompressible">
<molarVolume> 0.0 </molarVolume>
</standardState>
<thermo>
<Mu0 Pref="100000.0" Tmax="625.15" Tmin="273.15">
<H298 units="cal/mol"> 0.0 </H298>
<numPoints> 3 </numPoints>
<floatArray size="3" title="Mu0Values" units="Dimensionless">
0.0 , 0.0, 0.0
</floatArray>
<floatArray size="3" title="Mu0Temperatures">
273.15, 298.15 , 623.15
</floatArray>
</Mu0>
</thermo>
</species>
<species name="OH-">
<!-- OH- (aq) standard state based on the unity molality convention
The Shomate polynomial was created with data from the SUPCRT92
J. Phys Chem Ref article, and from the CODATA recommended
values. DelHf(298.15) = -230.015 kJ/gmol
S(298.15) = -10.90 J/gmolK
There was a slight discrepancy between those two, which was
resolved in favor of CODATA.
Notes: the order of the polynomials can be decreased by
dropping terms from the complete Shomate poly.
-->
<atomArray> O:1 H:1 E:1 </atomArray>
<charge> -1 </charge>
<standardState model="constant_incompressible">
<!-- OH- (aq) molar volume
This value is currently made up.
-->
<molarVolume> 0.00834 </molarVolume>
</standardState>
<thermo>
<Shomate Pref="1 atm" Tmax=" 623.15" Tmin=" 298.00">
<floatArray size="7">
44674.99961 , -234943.0414 , 460522.8260 ,
-320695.1836 , -638.5044716 , -8683.955813 ,
102874.2667
</floatArray>
</Shomate>
</thermo>
</species>
</speciesData>
</ctml>
@@ -17,7 +17,6 @@ int main(int argc, char** argv)
size_t i;
string commandFile;
try {
std::string iFile = (argc > 1) ? argv[1] : "HMW_NaCl.xml";
double Temp = 273.15 + 275.;
double aTemp[7];
@@ -29,7 +28,7 @@ int main(int argc, char** argv)
aTemp[5] = 273.15 + 275.;
aTemp[6] = 273.15 + 300.;
HMWSoln* HMW = new HMWSoln(iFile, "NaCl_electrolyte");
HMWSoln* HMW = new HMWSoln("HMW_NaCl.yaml", "NaCl_electrolyte_complex_shomate");
size_t nsp = HMW->nSpecies();
double acMol[100];
@@ -21,14 +21,14 @@ int main(int argc, char** argv)
int extraCols = 1;
try {
std::string iFile = (argc > 1) ? argv[1] : "HMW_NaCl.xml";
std::string iFile = (argc > 1) ? argv[1] : "HMW_NaCl.yaml";
HMWSoln* HMW = new HMWSoln(iFile, "NaCl_electrolyte");
/*
* Load in and initialize the
*/
string nacl_s = "NaCl_Solid.xml";
string nacl_s = "NaCl_Solid.yaml";
string id = "NaCl(S)";
Cantera::ThermoPhase* solid = Cantera::newPhase(nacl_s, id);
@@ -18,7 +18,7 @@ int main(int argc, char** argv)
size_t i;
try {
std::string iFile = (argc > 1) ? argv[1] : "HMW_NaCl.xml";
std::string iFile = (argc > 1) ? argv[1] : "HMW_NaCl.yaml";
double Enth0_RT[20], pmEnth[20], molarEnth;
HMWSoln* HMW = new HMWSoln(iFile, "NaCl_electrolyte");
@@ -27,7 +27,7 @@ int main(int argc, char** argv)
/*
* Load in and initialize the
*/
Cantera::ThermoPhase* solid = newPhase("NaCl_Solid.xml","NaCl(S)");
Cantera::ThermoPhase* solid = newPhase("NaCl_Solid.yaml","NaCl(S)");
size_t nsp = HMW->nSpecies();
@@ -17,7 +17,7 @@ int main(int argc, char** argv)
size_t i;
try {
std::string iFile = (argc > 1) ? argv[1] : "HMW_NaCl.xml";
std::string iFile = (argc > 1) ? argv[1] : "HMW_NaCl.yaml";
double V0[20], pmV[20];
HMWSoln* HMW = new HMWSoln(iFile, "NaCl_electrolyte");
@@ -26,7 +26,7 @@ int main(int argc, char** argv)
/*
* Load in and initialize the
*/
Cantera::ThermoPhase* solid = newPhase("NaCl_Solid.xml","NaCl(S)");
Cantera::ThermoPhase* solid = newPhase("NaCl_Solid.yaml","NaCl(S)");
size_t nsp = HMW->nSpecies();
@@ -1,175 +0,0 @@
<?xml version="1.0"?>
<ctml>
<phase id="NaCl_electrolyte" dim="3">
<speciesArray datasrc="#species_waterSolution">
H2O(L) Cl- H+ Na+ OH-
</speciesArray>
<state>
<temperature units="K"> 298.15 </temperature>
<pressure units="Pa"> 101325.0 </pressure>
<soluteMolalities>
Na+:6.0954
Cl-:6.0954
H+:2.1628E-9
OH-:1.3977E-6
</soluteMolalities>
</state>
<!-- thermo model identifies the inherited class
from ThermoPhase that will handle the thermodynamics.
-->
<thermo model="HMW">
<activityCoefficients>
<!-- A_Debye units = sqrt(kg/gmol)
This is adjusted to match the GWB value so
that numerical comparisons can be made
Aln = 0.5107
-->
<A_Debye> 1.175930 </A_Debye>
<!-- B_Debye units = sqrt(kg/gmol)/m
-->
<B_Debye> 3.28640E9 </B_Debye>
<binarySaltParameters cation="Na+" anion="Cl-">
<beta0> 0.0765 </beta0>
<beta1> 0.2664 </beta1>
<beta2> 0.0 </beta2>
<Cphi> 0.00127 </Cphi>
<Alpha1> 2.0 </Alpha1>
</binarySaltParameters>
<binarySaltParameters cation="H+" anion="Cl-">
<beta0> 0.1775 </beta0>
<beta1> 0.2945 </beta1>
<beta2> 0.0 </beta2>
<Cphi> 0.0008 </Cphi>
<Alpha1> 2.0 </Alpha1>
</binarySaltParameters>
<binarySaltParameters cation="Na+" anion="OH-">
<beta0> 0.0864 </beta0>
<beta1> 0.253 </beta1>
<beta2> 0.0 </beta2>
<Cphi> 0.0044 </Cphi>
<Alpha1> 2.0 </Alpha1>
</binarySaltParameters>
<thetaAnion anion1="Cl-" anion2="OH-">
<theta> -0.05 </theta>
</thetaAnion>
<psiCommonCation cation="Na+" anion1="Cl-" anion2="OH-">
<Psi> -0.006 </Psi>
</psiCommonCation>
<thetaCation cation1="Na+" cation2="H+">
<theta> 0.036 </theta>
</thetaCation>
<psiCommonAnion anion="Cl-" cation1="Na+" cation2="H+">
<Psi> -0.004 </Psi>
</psiCommonAnion>
</activityCoefficients>
</thermo>
<elementArray datasrc="elements.xml"> O H C E Fe Si N Na Cl </elementArray>
</phase>
<speciesData id="species_waterSolution">
<!-- species H2O(L) -->
<species name="H2O(L)">
<atomArray>H:2 O:1 </atomArray>
<thermo>
<NASA Tmax="600.0" Tmin="273.14999999999998" P0="100000.0">
<floatArray name="coeffs" size="7">
7.255750050E+01, -6.624454020E-01, 2.561987460E-03, -4.365919230E-06,
2.781789810E-09, -4.188654990E+04, -2.882801370E+02
</floatArray>
</NASA>
</thermo>
<standardState model="waterIAPWS">
</standardState>
</species>
<species name="Na+">
<atomArray> Na:1 E:-1 </atomArray>
<charge> +1 </charge>
<thermo>
<Mu0 Pref="100000.0" Tmax="1000.0" Tmin="200.0">
<H298 units="cal/mol"> 0.0 </H298>
<numPoints> 2 </numPoints>
<floatArray size="2" title="Mu0Values" units="Dimensionless">
-125.5213, -125.5213
</floatArray>
<floatArray size="2" title="Mu0Temperatures">
298.15, 333.15
</floatArray>
</Mu0>
</thermo>
<standardState model="constant_incompressible">
<molarVolume> 1.3 </molarVolume>
</standardState>
</species>
<species name="Cl-">
<atomArray> Cl:1 E:1 </atomArray>
<charge> -1 </charge>
<standardState model="constant_incompressible">
<molarVolume> 1.3 </molarVolume>
</standardState>
<thermo>
<Mu0 Pref="100000.0" Tmax="333." Tmin="298.">
<H298 units="cal/mol"> 0.0 </H298>
<numPoints> 2 </numPoints>
<floatArray size="2" title="Mu0Values" units="Dimensionless">
-52.8716 , -52.8716
</floatArray>
<floatArray size="2" title="Mu0Temperatures">
298.15, 333.15
</floatArray>
</Mu0>
</thermo>
</species>
<species name="H+">
<atomArray> H:1 E:-1 </atomArray>
<charge> +1 </charge>
<standardState model="constant_incompressible">
<molarVolume> 1.3 </molarVolume>
</standardState>
<thermo>
<Mu0 Pref="100000.0" Tmax="333." Tmin="298.">
<H298 units="cal/mol"> 0.0 </H298>
<numPoints> 2 </numPoints>
<floatArray size="2" title="Mu0Values" units="Dimensionless">
0.0 , 0.0
</floatArray>
<floatArray size="2" title="Mu0Temperatures">
298.15, 333.15
</floatArray>
</Mu0>
</thermo>
</species>
<species name="OH-">
<atomArray> O:1 H:1 E:1 </atomArray>
<charge> -1 </charge>
<standardState model="constant_incompressible">
<molarVolume> 1.3 </molarVolume>
</standardState>
<thermo>
<Mu0 Pref="100000.0" Tmax="333." Tmin="298.">
<H298 units="cal/mol"> 0.0 </H298>
<numPoints> 2 </numPoints>
<floatArray size="2" title="Mu0Values" units="Dimensionless">
-91.523 , -91.523
</floatArray>
<floatArray size="2" title="Mu0Temperatures">
298.15, 333.15
</floatArray>
</Mu0>
</thermo>
</species>
</speciesData>
</ctml>
@@ -0,0 +1,115 @@
generator: ctml2yaml
cantera-version: 2.6.0a2
date: Sat, 15 May 2021 16:51:15 -0400
input-files: [test_problems/cathermo/HMW_test_1/HMW_NaCl.xml]
phases:
- name: NaCl_electrolyte
elements: [O, H, C, E, Fe, Si, N, Na, Cl]
species:
- species_waterSolution: [H2O(L), Cl-, H+, Na+, OH-]
thermo: HMW-electrolyte
activity-data:
temperature-model: constant
A_Debye: 1.175930 kg^0.5/gmol^0.5
interactions:
- species: [Na+, Cl-]
beta0: 0.0765
beta1: 0.2664
beta2: 0.0
Cphi: 1.27e-03
alpha1: 2.0
- species: [H+, Cl-]
beta0: 0.1775
beta1: 0.2945
beta2: 0.0
Cphi: 8.0e-04
alpha1: 2.0
- species: [Na+, OH-]
beta0: 0.0864
beta1: 0.253
beta2: 0.0
Cphi: 4.4e-03
alpha1: 2.0
- species: [Cl-, OH-]
theta: -0.05
- species: [Na+, Cl-, OH-]
psi: -6.0e-03
- species: [Na+, H+]
theta: 0.036
- species: [Cl-, Na+, H+]
psi: -4.0e-03
state: {T: 298.15 K, P: 1.01325e+05 Pa, molalities: {Na+: 6.0954, Cl-: 6.0954, H+: 2.1628e-09,
OH-: 1.3977e-06}}
species_waterSolution:
- name: H2O(L)
composition: {H: 2.0, O: 1.0}
thermo:
model: NASA7
temperature-ranges: [273.15, 600.0]
data:
- [72.5575005, -0.662445402, 2.56198746e-03, -4.36591923e-06, 2.78178981e-09,
-4.18865499e+04, -288.280137]
equation-of-state:
model: liquid-water-IAPWS95
- name: Na+
composition: {Na: 1.0, E: -1.0}
thermo:
model: piecewise-Gibbs
reference-pressure: 1.0e+05
h0: 0.0 cal/mol
T-min: 200.0
T-max: 1000.0
dimensionless: true
data:
298.15: -125.5213
333.15: -125.5213
equation-of-state:
model: constant-volume
molar-volume: 1.3
- name: Cl-
composition: {Cl: 1.0, E: 1.0}
thermo:
model: piecewise-Gibbs
reference-pressure: 1.0e+05
h0: 0.0 cal/mol
T-min: 298.0
T-max: 333.0
dimensionless: true
data:
298.15: -52.8716
333.15: -52.8716
equation-of-state:
model: constant-volume
molar-volume: 1.3
- name: H+
composition: {H: 1.0, E: -1.0}
thermo:
model: piecewise-Gibbs
reference-pressure: 1.0e+05
h0: 0.0 cal/mol
T-min: 298.0
T-max: 333.0
dimensionless: true
data:
298.15: 0.0
333.15: 0.0
equation-of-state:
model: constant-volume
molar-volume: 1.3
- name: OH-
composition: {O: 1.0, H: 1.0, E: 1.0}
thermo:
model: piecewise-Gibbs
reference-pressure: 1.0e+05
h0: 0.0 cal/mol
T-min: 298.0
T-max: 333.0
dimensionless: true
data:
298.15: -91.523
333.15: -91.523
equation-of-state:
model: constant-volume
molar-volume: 1.3
@@ -38,7 +38,7 @@ int main(int argc, char** argv)
try {
HMWSoln* HMW = new HMWSoln("HMW_NaCl.xml");
HMWSoln* HMW = new HMWSoln("HMW_NaCl_const.yaml", "NaCl_electrolyte");
HMW->printCoeffs();
size_t nsp = HMW->nSpecies();
@@ -1,180 +0,0 @@
<?xml version="1.0"?>
<ctml>
<phase id="NaCl_electrolyte" dim="3">
<speciesArray datasrc="#species_waterSolution">
H2O(L) Cl- H+ Na+ OH-
</speciesArray>
<state>
<temperature units="K"> 298.15 </temperature>
<pressure units="Pa"> 101325.0 </pressure>
<soluteMolalities>
Na+:6.0954
Cl-:6.0954
H+:2.1628E-9
OH-:1.3977E-6
</soluteMolalities>
</state>
<!-- thermo model identifies the inherited class
from ThermoPhase that will handle the thermodynamics.
-->
<thermo model="HMW">
<activityCoefficients TempModel="complex1">
<!-- A_Debye units = sqrt(kg/gmol)
This is adjusted to match the GWB value so
that numerical comparisons can be made
Aln = 0.5107
-->
<A_Debye> 1.175930 </A_Debye>
<!-- B_Debye units = sqrt(kg/gmol)/m
-->
<binarySaltParameters cation="Na+" anion="Cl-">
<beta0> 0.0765, 0.008946, -3.3158E-6,
-777.03, -4.4706
</beta0>
<beta1> 0.2664, 6.1608E-5, 1.0715E-6, 0.0, 0.0 </beta1>
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
<Cphi> 0.00127, -4.655E-5, 0.0,
33.317, 0.09421
</Cphi>
<Alpha1> 2.0 </Alpha1>
</binarySaltParameters>
<binarySaltParameters cation="H+" anion="Cl-">
<beta0> 0.1775
</beta0>
<beta1> 0.2945 </beta1>
<beta2> 0.0 </beta2>
<Cphi> 0.0008
</Cphi>
<Alpha1> 2.0 </Alpha1>
</binarySaltParameters>
<binarySaltParameters cation="Na+" anion="OH-">
<beta0> 0.0864 </beta0>
<beta1> 0.253 </beta1>
<beta2> 0.0 </beta2>
<Cphi> 0.0044 </Cphi>
<Alpha1> 2.0 </Alpha1>
</binarySaltParameters>
<thetaAnion anion1="Cl-" anion2="OH-">
<theta> -0.05 </theta>
</thetaAnion>
<psiCommonCation cation="Na+" anion1="Cl-" anion2="OH-">
<Psi> -0.006 </Psi>
</psiCommonCation>
<thetaCation cation1="Na+" cation2="H+">
<theta> 0.036 </theta>
</thetaCation>
<psiCommonAnion anion="Cl-" cation1="Na+" cation2="H+">
<Psi> -0.004 </Psi>
</psiCommonAnion>
</activityCoefficients>
</thermo>
<elementArray datasrc="elements.xml"> O H C E Fe Si N Na Cl </elementArray>
</phase>
<speciesData id="species_waterSolution">
<!-- species H2O(L) -->
<species name="H2O(L)">
<atomArray>H:2 O:1 </atomArray>
<thermo>
<NASA Tmax="600.0" Tmin="273.14999999999998" P0="100000.0">
<floatArray name="coeffs" size="7">
7.255750050E+01, -6.624454020E-01, 2.561987460E-03, -4.365919230E-06,
2.781789810E-09, -4.188654990E+04, -2.882801370E+02
</floatArray>
</NASA>
</thermo>
<standardState model="waterIAPWS">
</standardState>
</species>
<species name="Na+">
<atomArray> Na:1 E:-1 </atomArray>
<charge> +1 </charge>
<thermo>
<Mu0 Pref="100000.0" Tmax="1000.0" Tmin="200.0">
<H298 units="cal/mol"> 0.0 </H298>
<numPoints> 2 </numPoints>
<floatArray size="2" title="Mu0Values" units="Dimensionless">
-125.5213, -125.5213
</floatArray>
<floatArray size="2" title="Mu0Temperatures">
298.15, 333.15
</floatArray>
</Mu0>
</thermo>
<standardState model="constant_incompressible">
<molarVolume> 1.3 </molarVolume>
</standardState>
</species>
<species name="Cl-">
<atomArray> Cl:1 E:1 </atomArray>
<charge> -1 </charge>
<standardState model="constant_incompressible">
<molarVolume> 1.3 </molarVolume>
</standardState>
<thermo>
<Mu0 Pref="100000.0" Tmax="333." Tmin="298.">
<H298 units="cal/mol"> 0.0 </H298>
<numPoints> 2 </numPoints>
<floatArray size="2" title="Mu0Values" units="Dimensionless">
-52.8716 , -52.8716
</floatArray>
<floatArray size="2" title="Mu0Temperatures">
298.15, 333.15
</floatArray>
</Mu0>
</thermo>
</species>
<species name="H+">
<atomArray> H:1 E:-1 </atomArray>
<charge> +1 </charge>
<standardState model="constant_incompressible">
<molarVolume> 1.3 </molarVolume>
</standardState>
<thermo>
<Mu0 Pref="100000.0" Tmax="333." Tmin="298.">
<H298 units="cal/mol"> 0.0 </H298>
<numPoints> 2 </numPoints>
<floatArray size="2" title="Mu0Values" units="Dimensionless">
0.0 , 0.0
</floatArray>
<floatArray size="2" title="Mu0Temperatures">
298.15, 333.15
</floatArray>
</Mu0>
</thermo>
</species>
<species name="OH-">
<atomArray> O:1 H:1 E:1 </atomArray>
<charge> -1 </charge>
<standardState model="constant_incompressible">
<molarVolume> 1.3 </molarVolume>
</standardState>
<thermo>
<Mu0 Pref="100000.0" Tmax="333." Tmin="298.">
<H298 units="cal/mol"> 0.0 </H298>
<numPoints> 2 </numPoints>
<floatArray size="2" title="Mu0Values" units="Dimensionless">
-91.523 , -91.523
</floatArray>
<floatArray size="2" title="Mu0Temperatures">
298.15, 333.15
</floatArray>
</Mu0>
</thermo>
</species>
</speciesData>
</ctml>
@@ -38,7 +38,7 @@ int main(int argc, char** argv)
int retn = 0;
try {
HMWSoln* HMW = new HMWSoln("HMW_NaCl_tc.xml");
HMWSoln* HMW = new HMWSoln("thermo-models.yaml", "HMW-NaCl-electrolyte");
size_t nsp = HMW->nSpecies();