Reaktoro 
A unified framework for modeling chemically reactive systems
ThermoData.hpp
1 // Reaktoro is a unified framework for modeling chemically reactive systems.
2 //
3 // Copyright (C) 2014-2015 Allan Leal
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18 #pragma once
19 
20 // C++ includes
21 #include <vector>
22 
23 // Reaktoro includes
24 #include <Reaktoro/Common/ReactionEquation.hpp>
25 #include <Reaktoro/Common/Optional.hpp>
26 #include <Reaktoro/Math/BilinearInterpolator.hpp>
27 
28 namespace Reaktoro {
29 
35 {
38 
41 
44 
47 
50 
53 
56 
59 };
60 
66 {
69 
72 
75 
78 
81 
84 
87 
90 
93 
96 };
97 
100 {
102  double Gf;
103 
105  double Hf;
106 
108  double Sr;
109 
111  double a1;
112 
114  double a2;
115 
117  double a3;
118 
120  double a4;
121 
123  double c1;
124 
126  double c2;
127 
129  double wref;
130 };
131 
134 {
136  double Gf;
137 
139  double Hf;
140 
142  double Sr;
143 
145  double a;
146 
148  double b;
149 
151  double c;
152 
154  double Tmax;
155 };
156 
159 {
161  double Gf;
162 
164  double Hf;
165 
167  double Sr;
168 
170  double Vr;
171 
173  int nptrans;
174 
176  std::vector<double> a;
177 
179  std::vector<double> b;
180 
182  std::vector<double> c;
183 
185  std::vector<double> Ttr;
186 
188  std::vector<double> Htr;
189 
191  std::vector<double> Vtr;
192 
194  std::vector<double> dPdTtr;
195 
197  double Tmax;
198 };
199 
202 {
204  {
207 
209  double log_k;
210 
217  double delta_h;
218 
223  std::vector<double> analytic;
224  };
225 
226  ReactionParams reaction;
227 };
228 
231 {
234 
237 
240 
243 };
244 
247 {
250 
253 
256 
259 };
260 
263 {
266 
269 
272 
275 };
276 
277 } // namespace Reaktoro
278 
279 
BilinearInterpolator internal_energy
The interpolator of the standard molar internal energy of the species (in units of J/mol) ...
Definition: ThermoData.hpp:43
A type for storing thermodynamic properties of a species over a range of temperatures and pressures...
Definition: ThermoData.hpp:34
double a2
The coefficient a2 of the HKF equation of state of the aqueous species (in units of cal/mol) ...
Definition: ThermoData.hpp:114
double Hf
The apparent standard molal enthalpy of formation of the species from its elements (in units of cal/m...
Definition: ThermoData.hpp:139
Optional< MineralSpeciesThermoParamsHKF > hkf
The thermodynamic parameters of the HKF model for a mineral species.
Definition: ThermoData.hpp:271
double Vr
The standard molal volume of the mineral species at reference temperature and pressure (in units of c...
Definition: ThermoData.hpp:170
Optional< SpeciesThermoParamsPhreeqc > phreeqc
The thermodynamic parameters of the species from a Phreeqc database.
Definition: ThermoData.hpp:258
double b
The coefficient b of the HKF equation of state of the gaseous species (in units of cal/(mol�K^2)) ...
Definition: ThermoData.hpp:148
Optional< ReactionThermoInterpolatedProperties > reaction
The interpolated thermodynamic properties of a gaseous species given in terms of reaction.
Definition: ThermoData.hpp:252
std::vector< double > Htr
The change in the standard molal enthalpy of each mineral phase transition (in units of cal/mol) ...
Definition: ThermoData.hpp:188
BilinearInterpolator entropy
The interpolator of the standard molar entropy of the reaction (in units of J/K) ...
Definition: ThermoData.hpp:86
BilinearInterpolator helmholtz_energy
The interpolator of the standard molar Helmholtz free energy of the species (in units of J/mol) ...
Definition: ThermoData.hpp:40
BilinearInterpolator heat_capacity_cp
The interpolator of the standard molar isobaric heat capacity of the reaction (in units of J/(mol*K)...
Definition: ThermoData.hpp:92
std::vector< double > c
The coefficients ci of the HKF equation of state of the mineral species for each phase region (in uni...
Definition: ThermoData.hpp:182
ReactionEquation equation
The reaction equation defining the Phreeqc species in terms of master species.
Definition: ThermoData.hpp:206
double Sr
The standard molal entropy of the species at reference temperature and pressure (in units of cal/(mol...
Definition: ThermoData.hpp:108
double a3
The coefficient a3 of the HKF equation of state of the aqueous species (in units of (cal*K)/(mol*bar)...
Definition: ThermoData.hpp:117
double a4
The coefficient a4 of the HKF equation of state of the aqueous species (in units of (cal*K)/mol) ...
Definition: ThermoData.hpp:120
double Gf
The apparent standard molal Gibbs free energy of formation of the species from its elements (in units...
Definition: ThermoData.hpp:102
BilinearInterpolator enthalpy
The interpolator of the standard molar enthalpy of the species (in units of J/mol) ...
Definition: ThermoData.hpp:46
double Sr
The standard molal entropy of the species at reference temperature and pressure (in units of cal/(mol...
Definition: ThermoData.hpp:167
BilinearInterpolator lnk
The interpolator of the equilibrium constant of the reaction.
Definition: ThermoData.hpp:71
BilinearInterpolator heat_capacity_cv
The interpolator of the standard molar isochoric heat capacity of the reaction (in units of J/(mol*K...
Definition: ThermoData.hpp:95
double a1
The coefficient a1 of the HKF equation of state of the aqueous species (in units of cal/(mol*bar)) ...
Definition: ThermoData.hpp:111
double Sr
The standard molal entropy of the species at reference temperature and pressure (in units of cal/(mol...
Definition: ThermoData.hpp:142
BilinearInterpolator internal_energy
The interpolator of the standard molar internal energy of the reaction (in units of J/mol) ...
Definition: ThermoData.hpp:80
double log_k
The equilibrium constant of the product species at 25 °C.
Definition: ThermoData.hpp:209
ReactionEquation equation
The equation of the reaction as pairs (reactant, stoichiometry)
Definition: ThermoData.hpp:68
A type for storing the thermodynamic data of a gaseous species.
Definition: ThermoData.hpp:246
std::vector< double > Ttr
The temperatures at which the mineral experiences phase transition along the line of reference pressu...
Definition: ThermoData.hpp:185
A class used to calculate bilinear interpolation of data in two dimensions.
Definition: BilinearInterpolator.hpp:28
double c1
The coefficient c1 of the HKF equation of state of the aqueous species (in units of cal/(mol*K)) ...
Definition: ThermoData.hpp:123
double c
The coefficient c of the HKF equation of state of the gaseous species (in units of (cal�K)/mol) ...
Definition: ThermoData.hpp:151
Define a type that describes the equation of a reaction.
Definition: ReactionEquation.hpp:35
double Tmax
The maximum temperature at which the HKF equation of state can be applied for the mineral (in units o...
Definition: ThermoData.hpp:197
A type for storing the thermodynamic data of an aqueous species.
Definition: ThermoData.hpp:230
double delta_h
The standard enthalpy of the reaction at 25 °C (in units of kJ/mol).
Definition: ThermoData.hpp:217
double Gf
The apparent standard molal Gibbs free energy of formation of the species from its elements (in units...
Definition: ThermoData.hpp:161
std::vector< double > analytic
The coefficients of the analytical expression of the equilibrium constant of the reaction.
Definition: ThermoData.hpp:223
Optional< GaseousSpeciesThermoParamsHKF > hkf
The thermodynamic parameters of the HKF model for a gaseous species.
Definition: ThermoData.hpp:255
BilinearInterpolator volume
The interpolator of the standard molar volume of the species (in units of m3/mol) ...
Definition: ThermoData.hpp:52
std::vector< double > Vtr
The change in the standard molal volume of each mineral phase transition (in units of cm^3/mol) ...
Definition: ThermoData.hpp:191
A type for storing the thermodynamic data of a mineral species.
Definition: ThermoData.hpp:262
double wref
The conventional Born coefficient of the aqueous species at reference temperature 298...
Definition: ThermoData.hpp:129
double Hf
The apparent standard molal enthalpy of formation of the species from its elements (in units of cal/m...
Definition: ThermoData.hpp:105
BilinearInterpolator heat_capacity_cp
The interpolator of the standard molar isobaric heat capacity of the species (in units of J/(mol*K))...
Definition: ThermoData.hpp:55
BilinearInterpolator gibbs_energy
The interpolator of the standard molar Gibbs free energy of the reaction (in units of J/mol) ...
Definition: ThermoData.hpp:74
Optional< ReactionThermoInterpolatedProperties > reaction
The interpolated thermodynamic properties of a mineral species given in terms of reaction.
Definition: ThermoData.hpp:268
std::vector< double > b
The coefficients bi of the HKF equation of state of the mineral species for each phase region (in uni...
Definition: ThermoData.hpp:179
double a
The coefficient a of the HKF equation of state of the gaseous species (in units of cal/(mol�K)) ...
Definition: ThermoData.hpp:145
double Tmax
The maximum temperature at which the HKF equation of state can be applied for the gaseous species (in...
Definition: ThermoData.hpp:154
BilinearInterpolator enthalpy
The interpolator of the standard molar enthalpy of the reaction (in units of J/mol) ...
Definition: ThermoData.hpp:83
double Hf
The apparent standard molal enthalpy of formation of the species from its elements (in units of cal/m...
Definition: ThermoData.hpp:164
Optional< SpeciesThermoInterpolatedProperties > properties
The interpolated thermodynamic properties of a gaseous species.
Definition: ThermoData.hpp:249
A type for storing thermodynamic properties of a reaction over a range of temperatures and pressures...
Definition: ThermoData.hpp:65
A type for storing Phreeqc parameters of a species.
Definition: ThermoData.hpp:201
std::vector< double > dPdTtr
The Clapeyron slote at each mineral phase transition (in units of bar/K)
Definition: ThermoData.hpp:194
Optional< SpeciesThermoInterpolatedProperties > properties
The interpolated thermodynamic properties of an aqueous species.
Definition: ThermoData.hpp:233
A type for storing the parameters of the HKF equation of state for a mineral species.
Definition: ThermoData.hpp:158
double c2
The coefficient c2 of the HKF equation of state of the aqueous species (in units of (cal*K)/mol) ...
Definition: ThermoData.hpp:126
The namespace containing all components of the Reaktoro library.
Definition: ChemicalScalar.hpp:24
Optional< ReactionThermoInterpolatedProperties > reaction
The interpolated thermodynamic properties of an aqueous species given in terms of reaction...
Definition: ThermoData.hpp:236
int nptrans
The number of phase transitions that the mineral may undergo.
Definition: ThermoData.hpp:173
Optional< SpeciesThermoParamsPhreeqc > phreeqc
The thermodynamic parameters of the species from a Phreeqc database.
Definition: ThermoData.hpp:242
std::vector< double > a
The coefficients ai of the HKF equation of state of the mineral species for each phase region (in uni...
Definition: ThermoData.hpp:176
A type for storing the parameters of the HKF equation of state for a gaseous species.
Definition: ThermoData.hpp:133
BilinearInterpolator entropy
The interpolator of the standard molar entropy of the species (in units of J/K)
Definition: ThermoData.hpp:49
Optional< SpeciesThermoInterpolatedProperties > properties
The interpolated thermodynamic properties of a mineral species.
Definition: ThermoData.hpp:265
double Gf
The apparent standard molal Gibbs free energy of formation of the species from its elements (in units...
Definition: ThermoData.hpp:136
BilinearInterpolator gibbs_energy
The interpolator of the standard molar Gibbs free energy of the species (in units of J/mol) ...
Definition: ThermoData.hpp:37
A type for storing the parameters of the HKF equation of state for a aqueous species.
Definition: ThermoData.hpp:99
Optional< AqueousSpeciesThermoParamsHKF > hkf
The thermodynamic parameters of the HKF model for an aqueous species.
Definition: ThermoData.hpp:239
A type for defining an optional instance.
Definition: Optional.hpp:30
Optional< SpeciesThermoParamsPhreeqc > phreeqc
The thermodynamic parameters of the species from a Phreeqc database.
Definition: ThermoData.hpp:274
BilinearInterpolator helmholtz_energy
The interpolator of the standard molar Helmholtz free energy of the reaction (in units of J/mol) ...
Definition: ThermoData.hpp:77
BilinearInterpolator volume
The interpolator of the standard molar volume of the reaction (in units of m3/mol) ...
Definition: ThermoData.hpp:89
BilinearInterpolator heat_capacity_cv
The interpolator of the standard molar isochoric heat capacity of the species (in units of J/(mol*K)...
Definition: ThermoData.hpp:58