changed REEPS name to LLEPE, modified opt_dict to deal with more general xml properties,

pull/1/head
titusquah 5 years ago
parent 97ca231afc
commit 0a9a7ffddc

@ -0,0 +1,324 @@
<ctml>
<validate reactions="yes" species="yes" />
<phase dim="3" id="PC88A_liquid">
<elementArray datasrc="elementz.xml">
Cl O H C P Ce dummy
</elementArray>
<speciesArray datasrc="#species_PC88A_liquid">
(HA)2(org) dodecane Ce(H(A)2)3(org)
</speciesArray>
<state>
<temperature units="K"> 298.15 </temperature>
<pressure units="Pa"> 100000.0 </pressure>
<soluteMolalities>
(HA)2(org): 0.25
</soluteMolalities>
</state>
<thermo model="IdealSolidSolution">
<standardConc model="molar_volume" />
</thermo>
<standardConc model="molar_volume" />
<transport model="None" />
<kinetics model="none" />
</phase>
<speciesData id="species_PC88A_liquid">
<species name="(HA)2(org)">
<atomArray> C:16 H:35 O:3 P:1 </atomArray>
<thermo>
<const_cp Tmax="300.0" Tmin="298.0">
<t0 units="K">298.14999999999998</t0>
<h0 units="J/mol" updated="Updated at 8:33 6-16-2020">-130251.85800000011</h0>
<s0 units="J/mol/K"> 558.9824 </s0>
<cp0 units="J/mol/K"> 0.0</cp0>
</const_cp>
</thermo>
<standardState model="constant_incompressible">
<molarVolume updated="yep">0.32</molarVolume>
</standardState>
</species>
<species name="Ce(H(A)2)3(org)">
<atomArray> C:48 H:102 O:9 P:3 Ce:1 </atomArray>
<thermo>
<const_cp Tmax="300.0" Tmin="298.0">
<t0 units="K">298.14999999999998</t0>
<h0 units="J/mol" updated="Updated at 8:33 6-16-2020">-1190252.4083322566</h0>
<s0 units="J/mol/K"> 1117.965 </s0>
<cp0 units="J/mol/K">0.0</cp0>
</const_cp>
</thermo>
<standardState model="constant_incompressible">
<molarVolume updated="yep">0.94</molarVolume>
</standardState>
</species>
<species name="dodecane">
<atomArray> dummy:1 </atomArray>
<thermo>
<const_cp Tmax="300.0" Tmin="298.0">
<t0 units="K">298.14999999999998</t0>
<h0 units="J/mol"> 0.0 </h0>
<s0 units="J/mol/K"> 0.0 </s0>
<cp0 units="J/mol/K">0.0</cp0>
</const_cp>
</thermo>
<standardState model="constant_incompressible">
<molarVolume> 0.227113 </molarVolume>
</standardState>
</species>
</speciesData>
<phase dim="3" id="HCl_electrolyte">
<speciesArray datasrc="#species_waterSolution">
H2O(L) H+ OH- Cl- Ce+++
</speciesArray>
<state>
<temperature units="K"> 298.15 </temperature>
<pressure units="Pa"> 100000.0 </pressure>
<soluteMolalities>
Cl-: 1.0E-7
H+: 1.0E-7
</soluteMolalities>
</state>
<thermo model="HMW">
<standardConc model="solvent_volume" />
<activityCoefficients TempModel="complex1" model="Pitzer">
<A_Debye model="water" />
<ionicRadius default="3.042843" units="Angstroms">
</ionicRadius>
<binarySaltParameters anion="Cl-" cation="H+">
<beta0> 0.177000779, 0.000125778, 0.0, -33.4777082, -0.262214535 </beta0>
<beta1> 0.292922504, -0.027938838, 0.0, 3402.47027, 19.7936248 </beta1>
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
<Cphi> 0.000362, -0.00003036, 0.0, -2.91038E-11, 0.0 </Cphi>
<Alpha1> 2 </Alpha1>
<Alpha2> 12 </Alpha2>
<source>
refit of Holmes, H.F., Busey, J.M., Simonson, J.M., Mesmer, R.E.,
Archer, D.G., and Wood, R.H., 1987, The enthalpy of dilution of HCl(aq)
to 648 K and 4p MPa. Thermodynamic properties, Journal of Chemical
Thermodynamics, v. 19, p. 863-890.
</source>
</binarySaltParameters>
<binarySaltParameters anion="NO3-" cation="H+">
<beta0> 0.123757018, 0.0, 0.0, 0.0, 0.0 </beta0>
<beta1> 0.31055417, 0.0, 0.0, 0.0, 0.0 </beta1>
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
<Cphi> -0.005539018, 0.0, 0.0, 0.0, 0.0 </Cphi>
<Alpha1> 2 </Alpha1>
<Alpha2> 12 </Alpha2>
<source>
02mar (Table 3)
Marion, G. M. (2002) "A molal-based model for strong acid chemistry at low
temperatures (less than 200 to 298 K)", Geochimica et Cosmochimica Acta, Vol. 66,
No. 14, pp. 2499-2516. These parameters are derived from the mole fraction model of
Clegg and Brimblecombe (1990) but were parameterized by Marion (2002) for the Pitzer
molality-based model.
</source>
</binarySaltParameters>
</activityCoefficients>
<solvent> H2O(L) </solvent>
</thermo>
<elementArray datasrc="elements.xml"> O H Ce C Fe Si N Na Cl Ca P E </elementArray>
<kinetics model="none">
</kinetics>
</phase>
<speciesData id="species_waterSolution">
<species name="H2O(L)">
<atomArray>H:2 O:1 </atomArray>
<thermo>
<NASA P0="100000.0" Tmax="600.0" Tmin="273.14999999999998">
<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="waterPDSS">
<molarVolume> 0.018068 </molarVolume>
</standardState>
</species>
<species name="OH-">
<speciesChemFormula> OH- </speciesChemFormula>
<atomArray> O:1 H:1 </atomArray>
<charge> -1 </charge>
<thermo model="HKFT">
<HKFT Pref="1 atm" Tmax="625.15" Tmin="298.15">
<DG0_f_Pr_Tr units="cal/gmol"> -37595 </DG0_f_Pr_Tr>
<DH0_f_Pr_Tr units="cal/gmol"> -54977 </DH0_f_Pr_Tr>
<S0_Pr_Tr units="cal/gmol/K"> -2.56 </S0_Pr_Tr>
</HKFT>
</thermo>
<standardState model="HKFT">
<a1 units="cal/gmol/bar"> 0.12527 </a1>
<a2 units="cal/gmol"> 7.38 </a2>
<a3 units="cal-K/gmol/bar"> 1.8423 </a3>
<a4 units="cal-K/gmol"> -27821 </a4>
<c1 units="cal/gmol/K"> 4.15 </c1>
<c2 units="cal-K/gmol"> -103460 </c2>
<omega_Pr_Tr units="cal/gmol"> 172460 </omega_Pr_Tr>
</standardState>
<source>
ref:G9
</source>
</species>
<species name="NO3-">
<speciesChemFormula> NO3- </speciesChemFormula>
<atomArray> N:1 O:3 </atomArray>
<charge> -1 </charge>
<thermo model="HKFT">
<HKFT Pref="1 atm" Tmax="625.15" Tmin="298.15">
<DG0_f_Pr_Tr units="cal/gmol"> -26507 </DG0_f_Pr_Tr>
<DH0_f_Pr_Tr units="cal/gmol"> -49429 </DH0_f_Pr_Tr>
<S0_Pr_Tr units="cal/gmol/K"> 35.12 </S0_Pr_Tr>
</HKFT>
</thermo>
<standardState model="HKFT">
<a1 units="cal/gmol/bar"> 0.73161 </a1>
<a2 units="cal/gmol"> 678.24 </a2>
<a3 units="cal-K/gmol/bar"> -4.6838 </a3>
<a4 units="cal-K/gmol"> -30594 </a4>
<c1 units="cal/gmol/K"> 7.7 </c1>
<c2 units="cal-K/gmol"> -67250 </c2>
<omega_Pr_Tr units="cal/gmol"> 109770 </omega_Pr_Tr>
</standardState>
<source>
ref:G9
</source>
</species>
<species name="Na+">
<speciesChemFormula> Na+ </speciesChemFormula>
<atomArray> Na:1 </atomArray>
<charge> 1 </charge>
<thermo model="HKFT">
<HKFT Pref="1 atm" Tmax="625.15" Tmin="298.15">
<DG0_f_Pr_Tr units="cal/gmol"> -62591 </DG0_f_Pr_Tr>
<DH0_f_Pr_Tr units="cal/gmol"> -57433 </DH0_f_Pr_Tr>
<S0_Pr_Tr units="cal/gmol/K"> 13.96 </S0_Pr_Tr>
</HKFT>
</thermo>
<standardState model="HKFT">
<a1 units="cal/gmol/bar"> 0.1839 </a1>
<a2 units="cal/gmol"> -228.5 </a2>
<a3 units="cal-K/gmol/bar"> 3.256 </a3>
<a4 units="cal-K/gmol"> -27260 </a4>
<c1 units="cal/gmol/K"> 18.18 </c1>
<c2 units="cal-K/gmol"> -29810 </c2>
<omega_Pr_Tr units="cal/gmol"> 33060 </omega_Pr_Tr>
</standardState>
<source>
ref:G9
</source>
</species>
<species name="Cl-">
<speciesChemFormula> Cl- </speciesChemFormula>
<atomArray> Cl:1 </atomArray>
<charge> -1 </charge>
<thermo model="HKFT">
<HKFT Pref="1 atm" Tmax="625.15" Tmin="273.15">
<DG0_f_Pr_Tr units="cal/gmol"> -31379 </DG0_f_Pr_Tr>
<DH0_f_Pr_TR units="cal/gmol"> -39933 </DH0_f_Pr_TR>
<S0_Pr_Tr units="cal/gmol/K"> 13.56 </S0_Pr_Tr>
</HKFT>
</thermo>
<standardState model="HKFT">
<a1 units="cal/mol/bar"> 0.4032 </a1>
<a2 units="cal/mol"> 480.1 </a2>
<a3 units="cal-K/mol/bar"> 5.563 </a3>
<a4 units="cal-K/mol"> -28470 </a4>
<c1 units="cal/mol/K"> -4.4 </c1>
<c2 units="cal-K/mol"> -57140 </c2>
<omega_Pr_Tr units="cal/mol"> 145600 </omega_Pr_Tr>
<molarVolume units="cm3/mol"> 17.79 </molarVolume>
</standardState>
<source> ref:G9 </source>
</species>
<species name="H+">
<speciesChemFormula> H+ </speciesChemFormula>
<atomArray> H:1 </atomArray>
<charge> +1 </charge>
<thermo model="HKFT">
<HKFT Pref="1 atm" Tmax="625.15" Tmin="273.15">
<DG0_f_Pr_Tr units="cal/gmol"> 0 </DG0_f_Pr_Tr>
<DH0_f_Pr_TR units="cal/gmol"> 0 </DH0_f_Pr_TR>
<S0_Pr_Tr units="cal/gmol/K"> 0 </S0_Pr_Tr>
</HKFT>
</thermo>
<standardState model="HKFT">
<a1 units="cal/mol/bar"> 0 </a1>
<a2 units="cal/mol"> 0 </a2>
<a3 units="cal-K/mol/bar"> 0 </a3>
<a4 units="cal-K/mol"> 0 </a4>
<c1 units="cal/mol/K"> 0 </c1>
<c2 units="cal-K/mol"> 0 </c2>
<omega_Pr_Tr units="cal/mol"> 0 </omega_Pr_Tr>
<molarVolume units="cm3/mol"> 0 </molarVolume>
</standardState>
<source> ref:G9 </source>
</species>
<species name="Ce+++">
<speciesChemFormula> Ce+++ </speciesChemFormula>
<atomArray> Ce:1 </atomArray>
<charge> +3 </charge>
<thermo model="HKFT">
<HKFT Pref="1 atm" Tmax="625.15" Tmin="298.15">
<DG0_f_Pr_Tr units="cal/gmol"> -161600 </DG0_f_Pr_Tr>
<DH0_f_Pr_Tr units="cal/gmol"> -167400 </DH0_f_Pr_Tr>
<S0_Pr_Tr units="cal/gmol/K"> -49 </S0_Pr_Tr>
</HKFT>
</thermo>
<standardState model="HKFT">
<a1 units="cal/gmol/bar"> -0.29292 </a1>
<a2 units="cal/gmol"> -1493.38 </a2>
<a3 units="cal-K/gmol/bar"> 11.6196 </a3>
<a4 units="cal-K/gmol"> -21616 </a4>
<c1 units="cal/gmol/K"> 4.0445 </c1>
<c2 units="cal-K/gmol"> -108974 </c2>
<omega_Pr_Tr units="cal/gmol"> 222510 </omega_Pr_Tr>
</standardState>
<source>
ref:G9
</source>
</species>
</speciesData>
</ctml>

@ -0,0 +1,324 @@
<ctml>
<validate reactions="yes" species="yes" />
<phase dim="3" id="PC88A_liquid">
<elementArray datasrc="elementz.xml">
Cl O H C P Nd dummy
</elementArray>
<speciesArray datasrc="#species_PC88A_liquid">
(HA)2(org) dodecane Nd(H(A)2)3(org)
</speciesArray>
<state>
<temperature units="K"> 298.15 </temperature>
<pressure units="Pa"> 100000.0 </pressure>
<soluteMolalities>
(HA)2(org): 0.25
</soluteMolalities>
</state>
<thermo model="IdealSolidSolution">
<standardConc model="molar_volume" />
</thermo>
<standardConc model="molar_volume" />
<transport model="None" />
<kinetics model="none" />
</phase>
<speciesData id="species_PC88A_liquid">
<species name="(HA)2(org)">
<atomArray> C:16 H:35 O:3 P:1 </atomArray>
<thermo>
<const_cp Tmax="300.0" Tmin="298.0">
<t0 units="K">298.14999999999998</t0>
<h0 units="J/mol" updated="Updated at 10:52 6-16-2020">-852842.5769865816</h0>
<s0 units="J/mol/K"> 558.9824 </s0>
<cp0 units="J/mol/K"> 0.0</cp0>
</const_cp>
</thermo>
<standardState model="constant_incompressible">
<molarVolume updated="yep">0.32</molarVolume>
</standardState>
</species>
<species name="Nd(H(A)2)3(org)">
<atomArray> C:48 H:102 O:9 P:3 Nd:1 </atomArray>
<thermo>
<const_cp Tmax="300.0" Tmin="298.0">
<t0 units="K">298.14999999999998</t0>
<h0 units="J/mol" updated="Updated at 10:52 6-16-2020">-3358931.9094941025</h0>
<s0 units="J/mol/K"> 1117.965 </s0>
<cp0 units="J/mol/K">0.0</cp0>
</const_cp>
</thermo>
<standardState model="constant_incompressible">
<molarVolume updated="yep">0.94</molarVolume>
</standardState>
</species>
<species name="dodecane">
<atomArray> dummy:1 </atomArray>
<thermo>
<const_cp Tmax="300.0" Tmin="298.0">
<t0 units="K">298.14999999999998</t0>
<h0 units="J/mol"> 0.0 </h0>
<s0 units="J/mol/K"> 0.0 </s0>
<cp0 units="J/mol/K">0.0</cp0>
</const_cp>
</thermo>
<standardState model="constant_incompressible">
<molarVolume> 0.227113 </molarVolume>
</standardState>
</species>
</speciesData>
<phase dim="3" id="HCl_electrolyte">
<speciesArray datasrc="#species_waterSolution">
H2O(L) H+ OH- Cl- Nd+++
</speciesArray>
<state>
<temperature units="K"> 298.15 </temperature>
<pressure units="Pa"> 100000.0 </pressure>
<soluteMolalities>
Cl-: 1.0E-7
H+: 1.0E-7
</soluteMolalities>
</state>
<thermo model="HMW">
<standardConc model="solvent_volume" />
<activityCoefficients TempModel="complex1" model="Pitzer">
<A_Debye model="water" />
<ionicRadius default="3.042843" units="Angstroms">
</ionicRadius>
<binarySaltParameters anion="Cl-" cation="H+">
<beta0> 0.177000779, 0.000125778, 0.0, -33.4777082, -0.262214535 </beta0>
<beta1> 0.292922504, -0.027938838, 0.0, 3402.47027, 19.7936248 </beta1>
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
<Cphi> 0.000362, -0.00003036, 0.0, -2.91038E-11, 0.0 </Cphi>
<Alpha1> 2 </Alpha1>
<Alpha2> 12 </Alpha2>
<source>
refit of Holmes, H.F., Busey, J.M., Simonson, J.M., Mesmer, R.E.,
Archer, D.G., and Wood, R.H., 1987, The enthalpy of dilution of HCl(aq)
to 648 K and 4p MPa. Thermodynamic properties, Journal of Chemical
Thermodynamics, v. 19, p. 863-890.
</source>
</binarySaltParameters>
<binarySaltParameters anion="NO3-" cation="H+">
<beta0> 0.123757018, 0.0, 0.0, 0.0, 0.0 </beta0>
<beta1> 0.31055417, 0.0, 0.0, 0.0, 0.0 </beta1>
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
<Cphi> -0.005539018, 0.0, 0.0, 0.0, 0.0 </Cphi>
<Alpha1> 2 </Alpha1>
<Alpha2> 12 </Alpha2>
<source>
02mar (Table 3)
Marion, G. M. (2002) "A molal-based model for strong acid chemistry at low
temperatures (less than 200 to 298 K)", Geochimica et Cosmochimica Acta, Vol. 66,
No. 14, pp. 2499-2516. These parameters are derived from the mole fraction model of
Clegg and Brimblecombe (1990) but were parameterized by Marion (2002) for the Pitzer
molality-based model.
</source>
</binarySaltParameters>
</activityCoefficients>
<solvent> H2O(L) </solvent>
</thermo>
<elementArray datasrc="elements.xml"> O H Nd C Fe Si N Na Cl Ca P E </elementArray>
<kinetics model="none">
</kinetics>
</phase>
<speciesData id="species_waterSolution">
<species name="H2O(L)">
<atomArray>H:2 O:1 </atomArray>
<thermo>
<NASA P0="100000.0" Tmax="600.0" Tmin="273.14999999999998">
<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="waterPDSS">
<molarVolume> 0.018068 </molarVolume>
</standardState>
</species>
<species name="OH-">
<speciesChemFormula> OH- </speciesChemFormula>
<atomArray> O:1 H:1 </atomArray>
<charge> -1 </charge>
<thermo model="HKFT">
<HKFT Pref="1 atm" Tmax="625.15" Tmin="298.15">
<DG0_f_Pr_Tr units="cal/gmol"> -37595 </DG0_f_Pr_Tr>
<DH0_f_Pr_Tr units="cal/gmol"> -54977 </DH0_f_Pr_Tr>
<S0_Pr_Tr units="cal/gmol/K"> -2.56 </S0_Pr_Tr>
</HKFT>
</thermo>
<standardState model="HKFT">
<a1 units="cal/gmol/bar"> 0.12527 </a1>
<a2 units="cal/gmol"> 7.38 </a2>
<a3 units="cal-K/gmol/bar"> 1.8423 </a3>
<a4 units="cal-K/gmol"> -27821 </a4>
<c1 units="cal/gmol/K"> 4.15 </c1>
<c2 units="cal-K/gmol"> -103460 </c2>
<omega_Pr_Tr units="cal/gmol"> 172460 </omega_Pr_Tr>
</standardState>
<source>
ref:G9
</source>
</species>
<species name="NO3-">
<speciesChemFormula> NO3- </speciesChemFormula>
<atomArray> N:1 O:3 </atomArray>
<charge> -1 </charge>
<thermo model="HKFT">
<HKFT Pref="1 atm" Tmax="625.15" Tmin="298.15">
<DG0_f_Pr_Tr units="cal/gmol"> -26507 </DG0_f_Pr_Tr>
<DH0_f_Pr_Tr units="cal/gmol"> -49429 </DH0_f_Pr_Tr>
<S0_Pr_Tr units="cal/gmol/K"> 35.12 </S0_Pr_Tr>
</HKFT>
</thermo>
<standardState model="HKFT">
<a1 units="cal/gmol/bar"> 0.73161 </a1>
<a2 units="cal/gmol"> 678.24 </a2>
<a3 units="cal-K/gmol/bar"> -4.6838 </a3>
<a4 units="cal-K/gmol"> -30594 </a4>
<c1 units="cal/gmol/K"> 7.7 </c1>
<c2 units="cal-K/gmol"> -67250 </c2>
<omega_Pr_Tr units="cal/gmol"> 109770 </omega_Pr_Tr>
</standardState>
<source>
ref:G9
</source>
</species>
<species name="Na+">
<speciesChemFormula> Na+ </speciesChemFormula>
<atomArray> Na:1 </atomArray>
<charge> 1 </charge>
<thermo model="HKFT">
<HKFT Pref="1 atm" Tmax="625.15" Tmin="298.15">
<DG0_f_Pr_Tr units="cal/gmol"> -62591 </DG0_f_Pr_Tr>
<DH0_f_Pr_Tr units="cal/gmol"> -57433 </DH0_f_Pr_Tr>
<S0_Pr_Tr units="cal/gmol/K"> 13.96 </S0_Pr_Tr>
</HKFT>
</thermo>
<standardState model="HKFT">
<a1 units="cal/gmol/bar"> 0.1839 </a1>
<a2 units="cal/gmol"> -228.5 </a2>
<a3 units="cal-K/gmol/bar"> 3.256 </a3>
<a4 units="cal-K/gmol"> -27260 </a4>
<c1 units="cal/gmol/K"> 18.18 </c1>
<c2 units="cal-K/gmol"> -29810 </c2>
<omega_Pr_Tr units="cal/gmol"> 33060 </omega_Pr_Tr>
</standardState>
<source>
ref:G9
</source>
</species>
<species name="Cl-">
<speciesChemFormula> Cl- </speciesChemFormula>
<atomArray> Cl:1 </atomArray>
<charge> -1 </charge>
<thermo model="HKFT">
<HKFT Pref="1 atm" Tmax="625.15" Tmin="273.15">
<DG0_f_Pr_Tr units="cal/gmol"> -31379 </DG0_f_Pr_Tr>
<DH0_f_Pr_TR units="cal/gmol"> -39933 </DH0_f_Pr_TR>
<S0_Pr_Tr units="cal/gmol/K"> 13.56 </S0_Pr_Tr>
</HKFT>
</thermo>
<standardState model="HKFT">
<a1 units="cal/mol/bar"> 0.4032 </a1>
<a2 units="cal/mol"> 480.1 </a2>
<a3 units="cal-K/mol/bar"> 5.563 </a3>
<a4 units="cal-K/mol"> -28470 </a4>
<c1 units="cal/mol/K"> -4.4 </c1>
<c2 units="cal-K/mol"> -57140 </c2>
<omega_Pr_Tr units="cal/mol"> 145600 </omega_Pr_Tr>
<molarVolume units="cm3/mol"> 17.79 </molarVolume>
</standardState>
<source> ref:G9 </source>
</species>
<species name="H+">
<speciesChemFormula> H+ </speciesChemFormula>
<atomArray> H:1 </atomArray>
<charge> +1 </charge>
<thermo model="HKFT">
<HKFT Pref="1 atm" Tmax="625.15" Tmin="273.15">
<DG0_f_Pr_Tr units="cal/gmol"> 0 </DG0_f_Pr_Tr>
<DH0_f_Pr_TR units="cal/gmol"> 0 </DH0_f_Pr_TR>
<S0_Pr_Tr units="cal/gmol/K"> 0 </S0_Pr_Tr>
</HKFT>
</thermo>
<standardState model="HKFT">
<a1 units="cal/mol/bar"> 0 </a1>
<a2 units="cal/mol"> 0 </a2>
<a3 units="cal-K/mol/bar"> 0 </a3>
<a4 units="cal-K/mol"> 0 </a4>
<c1 units="cal/mol/K"> 0 </c1>
<c2 units="cal-K/mol"> 0 </c2>
<omega_Pr_Tr units="cal/mol"> 0 </omega_Pr_Tr>
<molarVolume units="cm3/mol"> 0 </molarVolume>
</standardState>
<source> ref:G9 </source>
</species>
<species name="Nd+++">
<speciesChemFormula> Nd+++ </speciesChemFormula>
<atomArray> Nd:1 </atomArray>
<charge> +3 </charge>
<thermo model="HKFT">
<HKFT Pref="1 atm" Tmax="625.15" Tmin="298.15">
<DG0_f_Pr_Tr units="cal/gmol"> -160600 </DG0_f_Pr_Tr>
<DH0_f_Pr_Tr units="cal/gmol"> -166500 </DH0_f_Pr_Tr>
<S0_Pr_Tr units="cal/gmol/K"> -49.5 </S0_Pr_Tr>
</HKFT>
</thermo>
<standardState model="HKFT">
<a1 units="cal/gmol/bar"> -0.33707 </a1>
<a2 units="cal/gmol"> -1454.52 </a2>
<a3 units="cal-K/gmol/bar"> 8.3211 </a3>
<a4 units="cal-K/gmol"> -21777 </a4>
<c1 units="cal/gmol/K"> 1.6236 </c1>
<c2 units="cal-K/gmol"> -118344 </c2>
<omega_Pr_Tr units="cal/gmol"> 225500 </omega_Pr_Tr>
</standardState>
<source>
ref:G9
</source>
</species>
</speciesData>
</ctml>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,2 @@
from .llepe import LLEPE
from .utils import get_xml_value, set_size

File diff suppressed because it is too large Load Diff

@ -0,0 +1,49 @@
import xml.etree.ElementTree as ET
import matplotlib.pyplot as plt
def set_size(w, h, ax=None):
""" w, h: width, height in inches """
if not ax:
ax = plt.gca()
left = ax.figure.subplotpars.left
right = ax.figure.subplotpars.right
top = ax.figure.subplotpars.top
bottom = ax.figure.subplotpars.bottom
fig_width = float(w) / (right - left)
fig_height = float(h) / (top - bottom)
ax.figure.set_size_inches(fig_width, fig_height)
def get_xml_value(info_dict, xml_filename):
tree = ET.parse(xml_filename)
root = tree.getroot()
d = info_dict
value = None
if (d['upper_attrib_name'] is not None
and d['lower_attrib_name'] is not None):
for child1 in root.iter(d['upper_element_name']):
if (child1.attrib[d['upper_attrib_name']]
== d['upper_attrib_value']):
for child2 in child1.iter(d['lower_element_name']):
if (child1.attrib[d['lower_attrib_name']]
== d['lower_attrib_value']):
value = child2.text
elif d['upper_attrib_name'] is None and d['lower_attrib_name'] is not None:
for child1 in root.iter(d['upper_element_name']):
for child2 in child1.iter(d['lower_element_name']):
if (child1.attrib[d['lower_attrib_name']]
== d['lower_attrib_value']):
value = child2.text
elif d['upper_attrib_name'] is not None and d['lower_attrib_name'] is None:
for child1 in root.iter(d['upper_element_name']):
if (child1.attrib[d['upper_attrib_name']]
== d['upper_attrib_value']):
for child2 in child1.iter(d['lower_element_name']):
value = child2.text
else:
for child1 in root.iter(d['upper_element_name']):
for child2 in child1.iter(d['lower_element_name']):
value = child2.text
return value

@ -0,0 +1,59 @@
from llepe import LLEPE
import json
opt_dict = {'(HA)2(org)_h0': {'upper_element_name': 'species',
'upper_attrib_name': 'name',
'upper_attrib_value': 'Nd(H(A)2)3(org)',
'lower_element_name': 'h0',
'lower_attrib_name': None,
'lower_attrib_value': None,
'input_format': '{0}',
'input_value': -4.7e6}}
searcher_parameters = {'exp_data': 'Nd_exp_data.csv',
'phases_xml_filename':
'twophase.xml',
'opt_dict': opt_dict,
'phase_names': ['HCl_electrolyte',
'PC88A_liquid'],
'aq_solvent_name': 'H2O(L)',
'extractant_name': '(HA)2(org)',
'diluant_name': 'dodecane',
'complex_names':
['Nd(H(A)2)3(org)'],
'extracted_species_ion_names': ['Nd+++'],
'aq_solvent_rho': 1000.0,
'extractant_rho': 960.0,
'diluant_rho': 750.0,
'temp_xml_file_path': 'temp1.xml'}
searcher = LLEPE(**searcher_parameters)
searcher.update_xml(searcher_parameters['opt_dict'])
predicted_dict1 = searcher.get_predicted_dict()
def array_to_list_in_dict(dictionary):
new_dictionary = {}
for key, value in dictionary.items():
new_dictionary[key] = list(value)
return new_dictionary
predicted_dict1 = array_to_list_in_dict(predicted_dict1)
in_moles = searcher.get_in_moles().to_dict('list')
est_enthalpy, obj_value = searcher.fit()
searcher.update_xml(est_enthalpy)
predicted_dict2 = searcher.get_predicted_dict()
predicted_dict2 = array_to_list_in_dict(predicted_dict2)
r2 = searcher.r_squared()
validation_values = {'predicted_dict1': predicted_dict1,
'in_moles': in_moles,
'est_enthalpy': est_enthalpy,
'predicted_dict2': predicted_dict2,
'r2': r2}
with open("validation_values.txt", "w") as write_file:
json.dump(validation_values, write_file)
with open("validation_parameters.txt", 'w') as write_file:
json.dump(searcher_parameters, write_file)
print(r2)

@ -0,0 +1 @@
{"exp_data": "Nd_exp_data.csv", "phases_xml_filename": "twophase.xml", "opt_dict": {"(HA)2(org)_h0": {"upper_element_name": "species", "upper_attrib_name": "name", "upper_attrib_value": "Nd(H(A)2)3(org)", "lower_element_name": "h0", "lower_attrib_name": null, "lower_attrib_value": null, "input_format": "{0}", "input_value": -4700000.0}}, "phase_names": ["HCl_electrolyte", "PC88A_liquid"], "aq_solvent_name": "H2O(L)", "extractant_name": "(HA)2(org)", "diluant_name": "dodecane", "complex_names": ["Nd(H(A)2)3(org)"], "extracted_species_ion_names": ["Nd+++"], "aq_solvent_rho": 1000.0, "extractant_rho": 960.0, "diluant_rho": 750.0, "temp_xml_file_path": "C:/Users/tq220/AppData/Local/Temp/temp1.xml"}

@ -0,0 +1 @@
{"predicted_dict1": {"h_eq": [0.058364995714349444, 0.06391393155745115, 0.07444535507983865, 0.08262581542999746, 0.09476518930810575], "z_eq": [0.9516350042860701, 0.9460860684430508, 0.9355546449206639, 0.9273741845705067, 0.9152348106924012], "Nd_aq_eq": [0.03387952476202338, 0.08202671948101695, 0.12852391497355461, 0.17579539485683557, 0.27175642689746715], "Nd_org_eq": [0.01612166523797662, 0.017971310518983034, 0.021481785026445446, 0.02420860514316445, 0.02825506310253288], "Nd_d_eq": [0.4758527562360585, 0.21909093320673453, 0.16714231768356566, 0.13770898357650085, 0.1039720142964399]}, "in_moles": {"H2O(L)": [55.508435061791985, 55.508435061791985, 55.508435061791985, 55.508435061791985, 55.508435061791985], "H+": [0.01, 0.01, 0.01, 0.01, 0.01], "OH-": [0, 0, 0, 0, 0], "Cl-": [0.16000357, 0.30999409, 0.46001709999999996, 0.610012, 0.91003447], "Nd+++": [0.05000119, 0.09999803, 0.1500057, 0.200004, 0.30001149], "(HA)2(org)": [1.0, 1.0, 1.0, 1.0, 1.0], "dodecane": [2.997650493879708, 2.997650493879708, 2.997650493879708, 2.997650493879708, 2.997650493879708], "Nd(H(A)2)3(org)": [0.0, 0.0, 0.0, 0.0, 0.0]}, "est_enthalpy": {"(HA)2(org)_h0": {"upper_element_name": "species", "upper_attrib_name": "name", "upper_attrib_value": "Nd(H(A)2)3(org)", "lower_element_name": "h0", "lower_attrib_name": null, "lower_attrib_value": null, "input_format": "{0}", "input_value": -4704699.156668724}}, "predicted_dict2": {"h_eq": [0.08312070532256348, 0.09366629837883175, 0.10990341965038186, 0.12241262392184332, 0.14084968554653704], "z_eq": [0.9268792946777146, 0.9163337016214961, 0.900096580349945, 0.8875873760784844, 0.8691503144537928], "Nd_aq_eq": [0.025627621559238152, 0.07210926387383204, 0.11670456011664825, 0.1625331253594948, 0.25639492815126425], "Nd_org_eq": [0.02437356844076186, 0.027888766126168002, 0.033301139883351746, 0.03747087464050526, 0.04361656184873576], "Nd_d_eq": [0.9510663478630839, 0.38675704934340127, 0.2853456613012094, 0.23054300197345157, 0.1701147607062004]}, "r2": 0.9970803631106648}
Loading…
Cancel
Save