Cantera 2.6.0

LatticePhase.cpp
Go to the documentation of this file.
1/**
2 * @file LatticePhase.cpp
3 * Definitions for a simple thermodynamics model of a bulk phase
4 * derived from ThermoPhase,
5 * assuming a lattice of solid atoms
6 * (see \ref thermoprops and class \link Cantera::LatticePhase LatticePhase\endlink).
7 */
8
9// This file is part of Cantera. See License.txt in the top-level directory or
10// at https://cantera.org/license.txt for license and copyright information.
11
12#include "cantera/thermo/LatticePhase.h"
13#include "cantera/thermo/ThermoFactory.h"
14#include "cantera/thermo/Species.h"
15#include "cantera/base/stringUtils.h"
16#include "cantera/base/ctml.h"
17#include "cantera/base/utilities.h"
18
19 namespace Cantera
20{
21
22 LatticePhase::LatticePhase(const std::string& inputFile, const std::string& id_)
23 : m_Pref(OneAtm)
24 , m_Pcurrent(OneAtm)
25 , m_site_density(0.0)
26{
27 initThermoFile(inputFile, id_);
28}
29
30 LatticePhase::LatticePhase(XML_Node& phaseRef, const std::string& id_)
31{
32 importPhase(phaseRef, this);
33}
34
35doublereal LatticePhase::enthalpy_mole() const
36{
37 return RT() * mean_X(enthalpy_RT_ref()) +
38 (pressure() - m_Pref)/molarDensity();
39}
40
41doublereal LatticePhase::entropy_mole() const
42{
43 return GasConstant * (mean_X(entropy_R_ref()) - sum_xlogx());
44}
45
46doublereal LatticePhase::cp_mole() const
47{
48 return GasConstant * mean_X(cp_R_ref());
49}
50
51doublereal LatticePhase::cv_mole() const
52{
53 return cp_mole();
54}
55
56doublereal LatticePhase::calcDensity()
57{
58 assignDensity(std::max(meanMolecularWeight() * m_site_density, SmallNumber));
59 return meanMolecularWeight() * m_site_density;
60}
61
62 void LatticePhase::setPressure(doublereal p)
63{
64 m_Pcurrent = p;
65 calcDensity();
66}
67
68 void LatticePhase::compositionChanged()
69{
70 Phase::compositionChanged();
71 calcDensity();
72}
73
74 Units LatticePhase::standardConcentrationUnits() const
75{
76 return Units(1.0);
77}
78
79 void LatticePhase::getActivityConcentrations(doublereal* c) const
80{
81 getMoleFractions(c);
82}
83
84 void LatticePhase::getActivityCoefficients(doublereal* ac) const
85{
86 for (size_t k = 0; k < m_kk; k++) {
87 ac[k] = 1.0;
88 }
89}
90
91doublereal LatticePhase::standardConcentration(size_t k) const
92{
93 return 1.0;
94}
95
96doublereal LatticePhase::logStandardConc(size_t k) const
97{
98 return 0.0;
99}
100
101 void LatticePhase::getChemPotentials(doublereal* mu) const
102{
103 doublereal delta_p = m_Pcurrent - m_Pref;
104 const vector_fp& g_RT = gibbs_RT_ref();
105 for (size_t k = 0; k < m_kk; k++) {
106 double xx = std::max(SmallNumber, moleFraction(k));
107 mu[k] = RT() * (g_RT[k] + log(xx))
108 + delta_p * m_speciesMolarVolume[k];
109 }
110}
111
112 void LatticePhase::getPartialMolarEnthalpies(doublereal* hbar) const
113{
114 const vector_fp& _h = enthalpy_RT_ref();
115 scale(_h.begin(), _h.end(), hbar, RT());
116}
117
118 void LatticePhase::getPartialMolarEntropies(doublereal* sbar) const
119{
120 const vector_fp& _s = entropy_R_ref();
121 for (size_t k = 0; k < m_kk; k++) {
122 double xx = std::max(SmallNumber, moleFraction(k));
123 sbar[k] = GasConstant * (_s[k] - log(xx));
124 }
125}
126
127 void LatticePhase::getPartialMolarCp(doublereal* cpbar) const
128{
129 getCp_R(cpbar);
130 for (size_t k = 0; k < m_kk; k++) {
131 cpbar[k] *= GasConstant;
132 }
133}
134
135 void LatticePhase::getPartialMolarVolumes(doublereal* vbar) const
136{
137 getStandardVolumes(vbar);
138}
139
140 void LatticePhase::getStandardChemPotentials(doublereal* mu0) const
141{
142 const vector_fp& gibbsrt = gibbs_RT_ref();
143 scale(gibbsrt.begin(), gibbsrt.end(), mu0, RT());
144}
145
146 void LatticePhase::getPureGibbs(doublereal* gpure) const
147{
148 const vector_fp& gibbsrt = gibbs_RT_ref();
149 doublereal delta_p = (m_Pcurrent - m_Pref);
150 for (size_t k = 0; k < m_kk; k++) {
151 gpure[k] = RT() * gibbsrt[k] + delta_p * m_speciesMolarVolume[k];
152 }
153}
154
155 void LatticePhase::getEnthalpy_RT(doublereal* hrt) const
156{
157 const vector_fp& _h = enthalpy_RT_ref();
158 doublereal delta_prt = (m_Pcurrent - m_Pref) / RT();
159 for (size_t k = 0; k < m_kk; k++) {
160 hrt[k] = _h[k] + delta_prt * m_speciesMolarVolume[k];
161 }
162}
163
164 void LatticePhase::getEntropy_R(doublereal* sr) const
165{
166 const vector_fp& _s = entropy_R_ref();
167 std::copy(_s.begin(), _s.end(), sr);
168}
169
170 void LatticePhase::getGibbs_RT(doublereal* grt) const
171{
172 const vector_fp& gibbsrt = gibbs_RT_ref();
173 doublereal delta_prt = (m_Pcurrent - m_Pref) / RT();
174 for (size_t k = 0; k < m_kk; k++) {
175 grt[k] = gibbsrt[k] + delta_prt * m_speciesMolarVolume[k];
176 }
177}
178
179 void LatticePhase::getGibbs_ref(doublereal* g) const
180{
181 getGibbs_RT_ref(g);
182 for (size_t k = 0; k < m_kk; k++) {
183 g[k] *= RT();
184 }
185}
186
187 void LatticePhase::getCp_R(doublereal* cpr) const
188{
189 const vector_fp& _cpr = cp_R_ref();
190 std::copy(_cpr.begin(), _cpr.end(), cpr);
191}
192
193 void LatticePhase::getStandardVolumes(doublereal* vbar) const
194{
195 copy(m_speciesMolarVolume.begin(), m_speciesMolarVolume.end(), vbar);
196}
197
198 const vector_fp& LatticePhase::enthalpy_RT_ref() const
199{
200 _updateThermo();
201 return m_h0_RT;
202}
203
204 const vector_fp& LatticePhase::gibbs_RT_ref() const
205{
206 _updateThermo();
207 return m_g0_RT;
208}
209
210 void LatticePhase::getGibbs_RT_ref(doublereal* grt) const
211{
212 _updateThermo();
213 for (size_t k = 0; k < m_kk; k++) {
214 grt[k] = m_g0_RT[k];
215 }
216}
217
218 const vector_fp& LatticePhase::entropy_R_ref() const
219{
220 _updateThermo();
221 return m_s0_R;
222}
223
224 const vector_fp& LatticePhase::cp_R_ref() const
225{
226 _updateThermo();
227 return m_cp0_R;
228}
229
230 bool LatticePhase::addSpecies(shared_ptr<Species> spec)
231{
232 bool added = ThermoPhase::addSpecies(spec);
233 if (added) {
234 if (m_kk == 1) {
235 m_Pref = refPressure();
236 }
237 m_h0_RT.push_back(0.0);
238 m_g0_RT.push_back(0.0);
239 m_cp0_R.push_back(0.0);
240 m_s0_R.push_back(0.0);
241 double mv = 1.0 / m_site_density;
242 if (spec->input.hasKey("equation-of-state")) {
243 auto& eos = spec->input["equation-of-state"].getMapWhere(
244 "model", "constant-volume");
245 if (eos.hasKey("density")) {
246 mv = molecularWeight(m_kk-1) / eos.convert("density", "kg/m^3");
247 } else if (eos.hasKey("molar-density")) {
248 mv = 1.0 / eos.convert("molar-density", "kmol/m^3");
249 } else if (eos.hasKey("molar-volume")) {
250 mv = eos.convert("molar-volume", "m^3/kmol");
251 }
252 } else if (spec->input.hasKey("molar_volume")) {
253 // @Deprecated - remove this case for Cantera 3.0 with removal of the XML format
254 mv = spec->input["molar_volume"].asDouble();
255 }
256 m_speciesMolarVolume.push_back(mv);
257 }
258 return added;
259}
260
261 void LatticePhase::setSiteDensity(double sitedens)
262{
263 m_site_density = sitedens;
264 for (size_t k = 0; k < m_kk; k++) {
265 if (species(k)->input.hasKey("molar_volume")) {
266 // @Deprecated - remove this case for Cantera 3.0 with removal of the XML format
267 continue;
268 } else if (species(k)->input.hasKey("equation-of-state")) {
269 auto& eos = species(k)->input["equation-of-state"].getMapWhere(
270 "model", "constant-volume");
271 if (eos.hasKey("molar-volume") || eos.hasKey("density")
272 || eos.hasKey("molar-density")) {
273 continue;
274 }
275 }
276 m_speciesMolarVolume[k] = 1.0 / m_site_density;
277 }
278}
279
280 void LatticePhase::_updateThermo() const
281{
282 doublereal tnow = temperature();
283 if (m_tlast != tnow) {
284 m_spthermo.update(tnow, &m_cp0_R[0], &m_h0_RT[0], &m_s0_R[0]);
285 m_tlast = tnow;
286 for (size_t k = 0; k < m_kk; k++) {
287 m_g0_RT[k] = m_h0_RT[k] - m_s0_R[k];
288 }
289 m_tlast = tnow;
290 }
291}
292
293 void LatticePhase::initThermo()
294{
295 if (m_input.hasKey("site-density")) {
296 setSiteDensity(m_input.convert("site-density", "kmol/m^3"));
297 }
298}
299
300 void LatticePhase::getParameters(AnyMap& phaseNode) const
301{
302 ThermoPhase::getParameters(phaseNode);
303 phaseNode["site-density"].setQuantity(m_site_density, "kmol/m^3");
304}
305
306 void LatticePhase::getSpeciesParameters(const std::string& name,
307 AnyMap& speciesNode) const
308{
309 ThermoPhase::getSpeciesParameters(name, speciesNode);
310 size_t k = speciesIndex(name);
311 // Output volume information in a form consistent with the input
312 const auto S = species(k);
313 if (S->input.hasKey("equation-of-state")) {
314 auto& eosIn = S->input["equation-of-state"].getMapWhere(
315 "model", "constant-volume");
316 auto& eosOut = speciesNode["equation-of-state"].getMapWhere(
317 "model", "constant-volume", true);
318
319 if (eosIn.hasKey("density")) {
320 eosOut["model"] = "constant-volume";
321 eosOut["density"].setQuantity(
322 molecularWeight(k) / m_speciesMolarVolume[k], "kg/m^3");
323 } else if (eosIn.hasKey("molar-density")) {
324 eosOut["model"] = "constant-volume";
325 eosOut["molar-density"].setQuantity(1.0 / m_speciesMolarVolume[k],
326 "kmol/m^3");
327 } else if (eosIn.hasKey("molar-volume")) {
328 eosOut["model"] = "constant-volume";
329 eosOut["molar-volume"].setQuantity(m_speciesMolarVolume[k],
330 "m^3/kmol");
331 }
332 } else if (S->input.hasKey("molar_volume")) {
333 // Species came from XML
334 auto& eosOut = speciesNode["equation-of-state"].getMapWhere(
335 "model", "constant-volume", true);
336 eosOut["model"] = "constant-volume";
337 eosOut["molar-volume"].setQuantity(m_speciesMolarVolume[k], "m^3/kmol");
338 }
339 // Otherwise, species volume is determined by the phase-level site density
340}
341
342
343 void LatticePhase::setParametersFromXML(const XML_Node& eosdata)
344{
345 eosdata._require("model", "Lattice");
346 setSiteDensity(getFloat(eosdata, "site_density", "toSI"));
347}
348
349}
LatticePhase.h
Header for a simple thermodynamics model of a bulk phase derived from ThermoPhase,...
Species.h
Declaration for class Cantera::Species.
ThermoFactory.h
Headers for the factory class that can create known ThermoPhase objects (see Thermodynamic Properties...
Cantera::AnyMap
A map of string keys to values whose type can vary at runtime.
Definition: AnyMap.h:399
Cantera::AnyMap::convert
double convert(const std::string &key, const std::string &units) const
Convert the item stored by the given key to the units specified in units.
Definition: AnyMap.cpp:1508
Cantera::AnyMap::hasKey
bool hasKey(const std::string &key) const
Returns true if the map contains an item named key.
Definition: AnyMap.cpp:1406
Cantera::LatticePhase::m_g0_RT
vector_fp m_g0_RT
Temporary storage for the reference state Gibbs energies.
Definition: LatticePhase.h:650
Cantera::LatticePhase::m_cp0_R
vector_fp m_cp0_R
Temporary storage for the reference state heat capacities.
Definition: LatticePhase.h:647
Cantera::LatticePhase::addSpecies
virtual bool addSpecies(shared_ptr< Species > spec)
Definition: LatticePhase.cpp:230
Cantera::LatticePhase::getGibbs_RT_ref
virtual void getGibbs_RT_ref(doublereal *grt) const
Returns the vector of nondimensional Gibbs Free Energies of the reference state at the current temper...
Definition: LatticePhase.cpp:210
Cantera::LatticePhase::getParameters
virtual void getParameters(AnyMap &phaseNode) const
Store the parameters of a ThermoPhase object such that an identical one could be reconstructed using ...
Definition: LatticePhase.cpp:300
Cantera::LatticePhase::getActivityCoefficients
virtual void getActivityCoefficients(doublereal *ac) const
Get the array of non-dimensional activity coefficients at the current solution temperature,...
Definition: LatticePhase.cpp:84
Cantera::LatticePhase::getGibbs_RT
virtual void getGibbs_RT(doublereal *grt) const
Get the nondimensional Gibbs functions for the species standard states at the current T and P of the ...
Definition: LatticePhase.cpp:170
Cantera::LatticePhase::cp_mole
virtual doublereal cp_mole() const
Molar heat capacity at constant pressure of the solution.
Definition: LatticePhase.cpp:46
Cantera::LatticePhase::m_h0_RT
vector_fp m_h0_RT
Reference state enthalpies / RT.
Definition: LatticePhase.h:644
Cantera::LatticePhase::getPartialMolarEnthalpies
virtual void getPartialMolarEnthalpies(doublereal *hbar) const
Returns an array of partial molar enthalpies for the species in the mixture.
Definition: LatticePhase.cpp:112
Cantera::LatticePhase::getPartialMolarEntropies
virtual void getPartialMolarEntropies(doublereal *sbar) const
Returns an array of partial molar entropies of the species in the solution.
Definition: LatticePhase.cpp:118
Cantera::LatticePhase::enthalpy_mole
virtual doublereal enthalpy_mole() const
Return the Molar Enthalpy. Units: J/kmol.
Definition: LatticePhase.cpp:35
Cantera::LatticePhase::logStandardConc
virtual doublereal logStandardConc(size_t k=0) const
Natural logarithm of the standard concentration of the kth species.
Definition: LatticePhase.cpp:96
Cantera::LatticePhase::getPartialMolarVolumes
virtual void getPartialMolarVolumes(doublereal *vbar) const
Return an array of partial molar volumes for the species in the mixture.
Definition: LatticePhase.cpp:135
Cantera::LatticePhase::calcDensity
doublereal calcDensity()
Calculate the density of the mixture using the partial molar volumes and mole fractions as input.
Definition: LatticePhase.cpp:56
Cantera::LatticePhase::getStandardVolumes
virtual void getStandardVolumes(doublereal *vol) const
Get the molar volumes of the species standard states at the current T and P of the solution.
Definition: LatticePhase.cpp:193
Cantera::LatticePhase::m_s0_R
vector_fp m_s0_R
Temporary storage for the reference state entropies at the current temperature.
Definition: LatticePhase.h:654
Cantera::LatticePhase::cv_mole
virtual doublereal cv_mole() const
Molar heat capacity at constant volume of the solution.
Definition: LatticePhase.cpp:51
Cantera::LatticePhase::getActivityConcentrations
virtual void getActivityConcentrations(doublereal *c) const
This method returns an array of generalized concentrations.
Definition: LatticePhase.cpp:79
Cantera::LatticePhase::cp_R_ref
const vector_fp & cp_R_ref() const
Returns a reference to the dimensionless reference state Heat Capacity vector.
Definition: LatticePhase.cpp:224
Cantera::LatticePhase::getCp_R
virtual void getCp_R(doublereal *cpr) const
Get the nondimensional Heat Capacities at constant pressure for the species standard states at the cu...
Definition: LatticePhase.cpp:187
Cantera::LatticePhase::getPartialMolarCp
virtual void getPartialMolarCp(doublereal *cpbar) const
Returns an array of partial molar Heat Capacities at constant pressure of the species in the solution...
Definition: LatticePhase.cpp:127
Cantera::LatticePhase::getEntropy_R
virtual void getEntropy_R(doublereal *sr) const
Get the array of nondimensional Entropy functions for the species standard states at the current T an...
Definition: LatticePhase.cpp:164
Cantera::LatticePhase::setPressure
virtual void setPressure(doublereal p)
Set the internally stored pressure (Pa) at constant temperature and composition.
Definition: LatticePhase.cpp:62
Cantera::LatticePhase::m_speciesMolarVolume
vector_fp m_speciesMolarVolume
Vector of molar volumes for each species in the solution.
Definition: LatticePhase.h:660
Cantera::LatticePhase::entropy_mole
virtual doublereal entropy_mole() const
Molar entropy of the solution. Units: J/kmol/K.
Definition: LatticePhase.cpp:41
Cantera::LatticePhase::entropy_R_ref
const vector_fp & entropy_R_ref() const
Returns a reference to the dimensionless reference state Entropy vector.
Definition: LatticePhase.cpp:218
Cantera::LatticePhase::initThermo
virtual void initThermo()
Initialize the ThermoPhase object after all species have been set up.
Definition: LatticePhase.cpp:293
Cantera::LatticePhase::gibbs_RT_ref
const vector_fp & gibbs_RT_ref() const
Returns a reference to the dimensionless reference state Gibbs free energy vector.
Definition: LatticePhase.cpp:204
Cantera::LatticePhase::setSiteDensity
void setSiteDensity(double sitedens)
Set the density of lattice sites [kmol/m^3].
Definition: LatticePhase.cpp:261
Cantera::LatticePhase::m_Pcurrent
doublereal m_Pcurrent
The current pressure.
Definition: LatticePhase.h:641
Cantera::LatticePhase::pressure
virtual doublereal pressure() const
Pressure. Units: Pa.
Definition: LatticePhase.h:325
Cantera::LatticePhase::standardConcentrationUnits
virtual Units standardConcentrationUnits() const
The activity of a species in solution is related to the chemical potential by.
Definition: LatticePhase.cpp:74
Cantera::LatticePhase::setParametersFromXML
virtual void setParametersFromXML(const XML_Node &eosdata)
Set equation of state parameter values from XML entries.
Definition: LatticePhase.cpp:343
Cantera::LatticePhase::getSpeciesParameters
virtual void getSpeciesParameters(const std::string &name, AnyMap &speciesNode) const
Get phase-specific parameters of a Species object such that an identical one could be reconstructed a...
Definition: LatticePhase.cpp:306
Cantera::LatticePhase::getStandardChemPotentials
virtual void getStandardChemPotentials(doublereal *mu) const
Get the array of chemical potentials at unit activity for the species at their standard states at the...
Definition: LatticePhase.cpp:140
Cantera::LatticePhase::compositionChanged
virtual void compositionChanged()
Apply changes to the state which are needed after the composition changes.
Definition: LatticePhase.cpp:68
Cantera::LatticePhase::LatticePhase
LatticePhase(const std::string &inputFile="", const std::string &id="")
Full constructor for a lattice phase.
Definition: LatticePhase.cpp:22
Cantera::LatticePhase::_updateThermo
void _updateThermo() const
Update the species reference state thermodynamic functions.
Definition: LatticePhase.cpp:280
Cantera::LatticePhase::getChemPotentials
virtual void getChemPotentials(doublereal *mu) const
Get the species chemical potentials. Units: J/kmol.
Definition: LatticePhase.cpp:101
Cantera::LatticePhase::getGibbs_ref
virtual void getGibbs_ref(doublereal *g) const
Returns the vector of the Gibbs function of the reference state at the current temperature of the sol...
Definition: LatticePhase.cpp:179
Cantera::LatticePhase::m_Pref
doublereal m_Pref
Reference state pressure.
Definition: LatticePhase.h:632
Cantera::LatticePhase::getEnthalpy_RT
virtual void getEnthalpy_RT(doublereal *hrt) const
Get the nondimensional Enthalpy functions for the species standard states at their standard states at...
Definition: LatticePhase.cpp:155
Cantera::LatticePhase::m_site_density
doublereal m_site_density
Site Density of the lattice solid.
Definition: LatticePhase.h:668
Cantera::LatticePhase::getPureGibbs
virtual void getPureGibbs(doublereal *gpure) const
Get the Gibbs functions for the standard state of the species at the current T and P of the solution.
Definition: LatticePhase.cpp:146
Cantera::LatticePhase::standardConcentration
virtual doublereal standardConcentration(size_t k=0) const
Return the standard concentration for the kth species.
Definition: LatticePhase.cpp:91
Cantera::MultiSpeciesThermo::update
virtual void update(doublereal T, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const
Compute the reference-state properties for all species.
Definition: MultiSpeciesThermo.cpp:90
Cantera::Phase::molarDensity
double molarDensity() const
Molar density (kmol/m^3).
Definition: Phase.cpp:671
Cantera::Phase::assignDensity
void assignDensity(const double density_)
Set the internally stored constant density (kg/m^3) of the phase.
Definition: Phase.cpp:698
Cantera::Phase::mean_X
doublereal mean_X(const doublereal *const Q) const
Evaluate the mole-fraction-weighted mean of an array Q.
Definition: Phase.cpp:717
Cantera::Phase::name
std::string name() const
Return the name of the phase.
Definition: Phase.cpp:70
Cantera::Phase::m_kk
size_t m_kk
Number of species in the phase.
Definition: Phase.h:943
Cantera::Phase::molecularWeight
doublereal molecularWeight(size_t k) const
Molecular weight of species k.
Definition: Phase.cpp:492
Cantera::Phase::meanMolecularWeight
doublereal meanMolecularWeight() const
The mean molecular weight. Units: (kg/kmol)
Definition: Phase.h:751
Cantera::Phase::getMoleFractions
void getMoleFractions(double *const x) const
Get the species mole fraction vector.
Definition: Phase.cpp:543
Cantera::Phase::moleFraction
double moleFraction(size_t k) const
Return the mole fraction of a single species.
Definition: Phase.cpp:548
Cantera::Phase::compositionChanged
virtual void compositionChanged()
Apply changes to the state which are needed after the composition changes.
Definition: Phase.cpp:999
Cantera::Phase::temperature
doublereal temperature() const
Temperature (K).
Definition: Phase.h:654
Cantera::Phase::speciesIndex
size_t speciesIndex(const std::string &name) const
Returns the index of a species named 'name' within the Phase object.
Definition: Phase.cpp:187
Cantera::Phase::species
shared_ptr< Species > species(const std::string &name) const
Return the Species object for the named species.
Definition: Phase.cpp:950
Cantera::Phase::sum_xlogx
doublereal sum_xlogx() const
Evaluate .
Definition: Phase.cpp:727
Cantera::ThermoPhase::addSpecies
virtual bool addSpecies(shared_ptr< Species > spec)
Definition: ThermoPhase.cpp:1140
Cantera::ThermoPhase::RT
doublereal RT() const
Return the Gas Constant multiplied by the current temperature.
Definition: ThermoPhase.h:782
Cantera::ThermoPhase::m_tlast
doublereal m_tlast
last value of the temperature processed by reference state
Definition: ThermoPhase.h:1928
Cantera::ThermoPhase::initThermoFile
void initThermoFile(const std::string &inputFile, const std::string &id)
Definition: ThermoPhase.cpp:1066
Cantera::ThermoPhase::refPressure
virtual doublereal refPressure() const
Returns the reference pressure in Pa.
Definition: ThermoPhase.h:150
Cantera::ThermoPhase::m_spthermo
MultiSpeciesThermo m_spthermo
Pointer to the calculation manager for species reference-state thermodynamic properties.
Definition: ThermoPhase.h:1894
Cantera::ThermoPhase::m_input
AnyMap m_input
Data supplied via setParameters.
Definition: ThermoPhase.h:1898
Cantera::ThermoPhase::input
const AnyMap & input() const
Access input data associated with the phase description.
Definition: ThermoPhase.cpp:1268
Cantera::ThermoPhase::getSpeciesParameters
virtual void getSpeciesParameters(const std::string &name, AnyMap &speciesNode) const
Get phase-specific parameters of a Species object such that an identical one could be reconstructed a...
Definition: ThermoPhase.h:1726
Cantera::ThermoPhase::getParameters
virtual void getParameters(int &n, doublereal *const c) const
Get the equation of state parameters in a vector.
Definition: ThermoPhase.cpp:1193
Cantera::Units
A representation of the units associated with a dimensional quantity.
Definition: Units.h:30
Cantera::XML_Node
Class XML_Node is a tree-based representation of the contents of an XML file.
Definition: xml.h:103
Cantera::XML_Node::_require
void _require(const std::string &a, const std::string &v) const
Require that the current XML node has an attribute named by the first argument, a,...
Definition: xml.cpp:577
ctml.h
CTML ("Cantera Markup Language") is the variant of XML that Cantera uses to store data.
Cantera::importPhase
void importPhase(XML_Node &phase, ThermoPhase *th)
Import a phase information into an empty ThermoPhase object.
Definition: ThermoFactory.cpp:250
Cantera
Namespace for the Cantera kernel.
Definition: AnyMap.cpp:557
Cantera::getFloat
doublereal getFloat(const XML_Node &parent, const std::string &name, const std::string &type)
Get a floating-point value from a child element.
Definition: ctml.cpp:166
Cantera::OneAtm
const double OneAtm
One atmosphere [Pa].
Definition: ct_defs.h:81
Cantera::SmallNumber
const double SmallNumber
smallest number to compare to zero.
Definition: ct_defs.h:153
Cantera::vector_fp
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
Definition: ct_defs.h:184
Cantera::GasConstant
const double GasConstant
Universal Gas Constant [J/kmol/K].
Definition: ct_defs.h:113
Cantera::scale
void scale(InputIter begin, InputIter end, OutputIter out, S scale_factor)
Multiply elements of an array by a scale factor.
Definition: utilities.h:100
stringUtils.h
Contains declarations for string manipulation functions within Cantera.
utilities.h
Various templated functions that carry out common vector operations (see Templated Utility Functions)...