Cantera  2.3.0
IonsFromNeutralVPSSTP.h
Go to the documentation of this file.
1 /**
2  * @file IonsFromNeutralVPSSTP.h Header for intermediate ThermoPhase object for
3  * phases which consist of ions whose thermodynamics is calculated from
4  * neutral molecule thermodynamics. (see \ref thermoprops and class \link
5  * Cantera::IonsFromNeutralVPSSTP IonsFromNeutralVPSSTP\endlink).
6  */
7 
8 // This file is part of Cantera. See License.txt in the top-level directory or
9 // at http://www.cantera.org/license.txt for license and copyright information.
10 
11 #ifndef CT_IONSFROMNEUTRALVPSSTP_H
12 #define CT_IONSFROMNEUTRALVPSSTP_H
13 
14 #include "GibbsExcessVPSSTP.h"
15 
16 namespace Cantera
17 {
18 
19 //! enums for molten salt ion solution types
20 /*!
21  * Types identify how complicated the solution is. If there is just mixing on
22  * one of the sublattices but not the other, then the math is considerably
23  * simpler.
24  */
26  cIonSolnType_PASSTHROUGH = 2000 ,
27  cIonSolnType_SINGLEANION ,
28  cIonSolnType_SINGLECATION ,
29  cIonSolnType_MULTICATIONANION
30 };
31 
32 /*!
33  * The IonsFromNeutralVPSSTP is a derived class of ThermoPhase that handles the
34  * specification of the chemical potentials for ionic species, given a
35  * specification of the chemical potentials for the same phase expressed in
36  * terms of combinations of the ionic species that represent neutral molecules.
37  * It's expected that the neutral molecules will be represented in terms of an
38  * excess Gibbs free energy approximation that is a derivative of the
39  * GibbsExcessVPSSTP object. All of the excess Gibbs free energy formulations in
40  * this area employ symmetrical formulations.
41  *
42  * @attention This class currently does not have any test cases or examples. Its
43  * implementation may be incomplete, and future changes to Cantera may
44  * unexpectedly cause this class to stop working. If you use this class,
45  * please consider contributing examples or test cases. In the absence of
46  * new tests or examples, this class may be deprecated and removed in a
47  * future version of Cantera. See
48  * https://github.com/Cantera/cantera/issues/267 for additional information.
49  *
50  * This class is used for molten salts.
51  *
52  * This object actually employs 4 different mole fraction types.
53  *
54  * 1. There is a mole fraction associated the the cations and anions and
55  * neutrals from this ThermoPhase object. This is the normal mole fraction
56  * vector for this object. Note, however, it isn't the appropriate mole
57  * fraction vector to use even for obtaining the correct ideal free energies
58  * of mixing.
59  * 2. There is a mole fraction vector associated with the neutral molecule
60  * ThermoPhase object.
61  * 3. There is a mole fraction vector associated with the cation lattice.
62  * 4. There is a mole fraction vector associated with the anion lattice
63  *
64  * This object can translate between any of the four mole fraction
65  * representations.
66  */
68 {
69 public:
70  //! @name Constructors
71  //! @{
72 
73  /*!
74  * Default constructor
75  */
77 
78  //! Construct and initialize an IonsFromNeutralVPSSTP object directly from
79  //! an ASCII input file
80  /*!
81  * This constructor is a shell around the routine initThermo(), with a
82  * reference to the XML database to get the info for the phase.
83  *
84  * @param inputFile Name of the input file containing the phase XML data
85  * to set up the object
86  * @param id ID of the phase in the input file. Defaults to the
87  * empty string.
88  * @param neutralPhase The object takes a neutralPhase ThermoPhase object
89  * as input. It can either take a pointer to an existing object in the
90  * parameter list, in which case it does not own the object, or it can
91  * construct a neutral Phase as a slave object, in which case, it does
92  * own the slave object, for purposes of who gets to destroy the object.
93  * If this parameter is zero, then a slave neutral phase object is
94  * created and used.
95  */
96  IonsFromNeutralVPSSTP(const std::string& inputFile,
97  const std::string& id = "",
98  ThermoPhase* neutralPhase = 0);
99 
100  //! Construct and initialize an IonsFromNeutralVPSSTP object
101  //! directly from an XML database
102  /*!
103  * @param phaseRoot XML phase node containing the description of the phase
104  * @param id id attribute containing the name of the phase.
105  * (default is the empty string)
106  * @param neutralPhase The object takes a neutralPhase ThermoPhase object
107  * as input. It can either take a pointer to an existing object in the
108  * parameter list, in which case it does not own the object, or it can
109  * construct a neutral Phase as a slave object, in which case, it does
110  * own the slave object, for purposes of who gets to destroy the object.
111  * If this parameter is zero, then a slave neutral phase object is
112  * created and used.
113  */
114  IonsFromNeutralVPSSTP(XML_Node& phaseRoot, const std::string& id = "",
115  ThermoPhase* neutralPhase = 0);
116 
118  IonsFromNeutralVPSSTP& operator=(const IonsFromNeutralVPSSTP& b);
119  virtual ~IonsFromNeutralVPSSTP();
120  virtual ThermoPhase* duplMyselfAsThermoPhase() const;
121 
122  // @}
123 
124  /// The following methods are used in the process of constructing
125  /// the phase and setting its parameters from a specification in an
126  /// input file.
127 
128  //! Initialization of an IonsFromNeutralVPSSTP phase using an XML file
129  /*!
130  * This routine is a precursor to initThermo(XML_Node*) routine, which does
131  * most of the work.
132  *
133  * @param inputFile XML file containing the description of the phase
134  * @param id Optional parameter identifying the name of the phase. If none
135  * is given, the first XML phase element will be used.
136  * @deprecated Use initThermoFile() instead. To be removed after Cantera 2.3.
137  */
138  void constructPhaseFile(std::string inputFile, std::string id);
139 
140  //! Import and initialize an IonsFromNeutralVPSSTP phase specification in an
141  //! XML tree into the current object.
142  /*!
143  * Here we read an XML description of the phase. We import descriptions of
144  * the elements that make up the species in a phase. We import information
145  * about the species, including their reference state thermodynamic
146  * polynomials. We then freeze the state of the species.
147  *
148  * Then, we read the species molar volumes from the XML tree to finish the
149  * initialization.
150  *
151  * @param phaseNode This object must be the phase node of a complete XML
152  * tree description of the phase, including all of the species
153  * data. In other words while "phase" must point to an XML phase
154  * object, it must have sibling nodes "speciesData" that
155  * describe the species in the phase.
156  * @param id ID of the phase. If nonnull, a check is done to see if
157  * phaseNode is pointing to the phase with the correct id.
158  * @deprecated Use importPhase() instead. To be removed after Cantera 2.3.
159  */
160  void constructPhaseXML(XML_Node& phaseNode, std::string id);
161 
162  //! @name Utilities
163  //! @{
164 
165  virtual int eosType() const;
166  virtual std::string type() const {
167  return "IonsFromNeutral";
168  }
169 
170 
171  //! @}
172  //! @name Molar Thermodynamic Properties
173  //! @{
174 
175  //! Return the Molar enthalpy. Units: J/kmol.
176  /*!
177  * This is calculated from the partial molar enthalpies of the species.
178  */
179  virtual doublereal enthalpy_mole() const;
180 
181  virtual doublereal entropy_mole() const;
182  virtual doublereal gibbs_mole() const;
183  virtual doublereal cp_mole() const;
184  virtual doublereal cv_mole() const;
185 
186  /**
187  * @}
188  * @name Activities, Standard States, and Activity Concentrations
189  *
190  * The activity \f$a_k\f$ of a species in solution is
191  * related to the chemical potential by \f[ \mu_k = \mu_k^0(T)
192  * + \hat R T \log a_k. \f] The quantity \f$\mu_k^0(T,P)\f$ is
193  * the chemical potential at unit activity, which depends only
194  * on temperature and pressure.
195  * @{
196  */
197 
198  virtual void getActivityCoefficients(doublereal* ac) const;
199 
200  //@}
201  /// @name Partial Molar Properties of the Solution
202  //@{
203 
204  virtual void getChemPotentials(doublereal* mu) const;
205 
206  //! Returns an array of partial molar enthalpies for the species in the
207  //! mixture.
208  /*!
209  * Units (J/kmol)
210  *
211  * For this phase, the partial molar enthalpies are equal to the standard
212  * state enthalpies modified by the derivative of the molality-based
213  * activity coefficient wrt temperature
214  *
215  * \f[
216  * \bar h_k(T,P) = h^o_k(T,P) - R T^2 \frac{d \ln(\gamma_k)}{dT}
217  * \f]
218  *
219  * @param hbar Output vector of species partial molar enthalpies.
220  * Length: m_kk. Units: J/kmol
221  */
222  virtual void getPartialMolarEnthalpies(doublereal* hbar) const;
223 
224  //! Returns an array of partial molar entropies for the species in the
225  //! mixture.
226  /*!
227  * Units (J/kmol)
228  *
229  * For this phase, the partial molar enthalpies are equal to the standard
230  * state enthalpies modified by the derivative of the activity coefficient
231  * wrt temperature
232  *
233  * \f[
234  * \bar s_k(T,P) = s^o_k(T,P) - R T^2 \frac{d \ln(\gamma_k)}{dT}
235  * - R \ln( \gamma_k X_k)
236  * - R T \frac{d \ln(\gamma_k) }{dT}
237  * \f]
238  *
239  * @param sbar Output vector of species partial molar entropies.
240  * Length: m_kk. Units: J/kmol/K
241  */
242  virtual void getPartialMolarEntropies(doublereal* sbar) const;
243 
244  virtual void getdlnActCoeffds(const doublereal dTds, const doublereal* const dXds,
245  doublereal* dlnActCoeffds) const;
246  virtual void getdlnActCoeffdlnX_diag(doublereal* dlnActCoeffdlnX_diag) const;
247  virtual void getdlnActCoeffdlnN_diag(doublereal* dlnActCoeffdlnN_diag) const;
248  virtual void getdlnActCoeffdlnN(const size_t ld, doublereal* const dlnActCoeffdlnN);
249  //! @}
250 
251  //! Get the Salt Dissociation Coefficients.
252  //! Returns the vector of dissociation coefficients and vector of charges
253  /*!
254  * @param fm_neutralMolec_ions Returns the formula matrix for the
255  * composition of neutral molecules in terms of the ions.
256  * @param charges Returns a vector containing the charges of
257  * all species in this phase
258  * @param neutMolIndex Returns the vector fm_invert_ionForNeutral
259  * This is the mapping between ion species and neutral molecule for
260  * quick invert.
261  */
262  void getDissociationCoeffs(vector_fp& fm_neutralMolec_ions, vector_fp& charges, std::vector<size_t>& neutMolIndex) const;
263 
264  //! Return the current value of the neutral mole fraction vector
265  /*!
266  * @param neutralMoleculeMoleFractions Vector of neutral molecule mole
267  * fractions.
268  */
269  void getNeutralMolecMoleFractions(vector_fp& neutralMoleculeMoleFractions) const {
270  neutralMoleculeMoleFractions = NeutralMolecMoleFractions_;
271  }
272 
273  //! Calculate neutral molecule mole fractions
274  /*!
275  * This routine calculates the neutral molecule mole fraction given the
276  * vector of ion mole fractions, i.e., the mole fractions from this
277  * ThermoPhase. Note, this routine basically assumes that there is charge
278  * neutrality. If there isn't, then it wouldn't make much sense.
279  *
280  * for the case of cIonSolnType_SINGLEANION, some slough in the charge
281  * neutrality is allowed. The cation number is followed, while the
282  * difference in charge neutrality is dumped into the anion mole number to
283  * fix the imbalance.
284  *
285  * @param dx input vector of ion mole fraction gradients
286  * @param dy output Vector of neutral molecule mole fraction gradients
287  */
288  void getNeutralMoleculeMoleGrads(const doublereal* const dx, doublereal* const dy) const;
289 
290  //! Get the list of cations in this object
291  /*!
292  * @param cation List of cations
293  */
294  void getCationList(std::vector<size_t>& cation) const {
295  cation=cationList_;
296  }
297 
298  //! Get the list of anions in this object
299  /*!
300  * @param anion List of anions
301  */
302  void getAnionList(std::vector<size_t>& anion) const {
303  anion=anionList_;
304  }
305 
306  /**
307  * @name Setting the State
308  * These methods set all or part of the thermodynamic state.
309  * @{
310  */
311 
312  virtual void calcDensity();
313 
314  //! Calculate ion mole fractions from neutral molecule mole fractions.
315  /*!
316  * @param mf Dump the mole fractions into this vector.
317  */
318  virtual void calcIonMoleFractions(doublereal* const mf) const;
319 
320  //! Calculate neutral molecule mole fractions
321  /*!
322  * This routine calculates the neutral molecule mole fraction given the
323  * vector of ion mole fractions, i.e., the mole fractions from this
324  * ThermoPhase. Note, this routine basically assumes that there is charge
325  * neutrality. If there isn't, then it wouldn't make much sense.
326  *
327  * for the case of cIonSolnType_SINGLEANION, some slough in the charge
328  * neutrality is allowed. The cation number is followed, while the
329  * difference in charge neutrality is dumped into the anion mole number to
330  * fix the imbalance.
331  */
332  virtual void calcNeutralMoleculeMoleFractions() const;
333 
334  //@}
335 
336  virtual void initThermo();
337  virtual void initThermoXML(XML_Node& phaseNode, const std::string& id);
338 
339 private:
340  //! Initialize lengths of local variables after all species have
341  //! been identified.
342  void initLengths();
343 
344  //! Update the activity coefficients
345  /*!
346  * This function will be called to update the internally stored natural
347  * logarithm of the activity coefficients
348  */
349  void s_update_lnActCoeff() const;
350 
351  //! Update the temperature derivative of the ln activity coefficients
352  /*!
353  * This function will be called to update the internally stored temperature
354  * derivative of the natural logarithm of the activity coefficients
355  */
356  void s_update_dlnActCoeffdT() const;
357 
358  //! Update the change in the ln activity coefficients
359  /*!
360  * This function will be called to update the internally stored change of
361  * the natural logarithm of the activity coefficients w.r.t a change in
362  * state (temp, mole fraction, etc)
363  */
364  void s_update_dlnActCoeff() const;
365 
366  //! Update the derivative of the log of the activity coefficients wrt
367  //! log(mole fraction)
368  /*!
369  * This function will be called to update the internally stored
370  * derivative of the natural logarithm of the activity coefficients
371  * wrt logarithm of the mole fractions.
372  */
373  void s_update_dlnActCoeff_dlnX_diag() const;
374 
375  //! Update the derivative of the log of the activity coefficients wrt
376  //! log(number of moles) - diagonal components
377  /*!
378  * This function will be called to update the internally stored derivative
379  * of the natural logarithm of the activity coefficients wrt logarithm of
380  * the number of moles of given species.
381  */
382  void s_update_dlnActCoeff_dlnN_diag() const;
383 
384  //! Update the derivative of the log of the activity coefficients
385  //! wrt log(number of moles) - diagonal components
386  /*!
387  * This function will be called to update the internally stored derivative
388  * of the natural logarithm of the activity coefficients wrt logarithm of
389  * the number of moles of given species.
390  */
391  void s_update_dlnActCoeff_dlnN() const;
392 
393 protected:
394  virtual void compositionChanged();
395 
396  //! Ion solution type
397  /*!
398  * There is either mixing on the anion, cation, or both lattices.
399  * There is also a passthrough option
400  *
401  * Defaults to cIonSolnType_SINGLEANION, so that LiKCl can be hardwired
402  */
404 
405  //! Number of neutral molecule species
406  /*!
407  * This is equal to the number of species in the neutralMoleculePhase_
408  * ThermoPhase.
409  */
411 
412  //! Index of special species
414 
415  //! Index of special species
417 
418  //! Formula Matrix for composition of neutral molecules
419  //! in terms of the molecules in this ThermoPhase
420  /*!
421  * fm_neutralMolec_ions[ i + jNeut * m_kk ]
422  *
423  * This is the number of ions of type i in the neutral molecule jNeut.
424  */
426 
427  //! Mapping between ion species and neutral molecule for quick invert.
428  /*!
429  * fm_invert_ionForNeutral returns vector of int. Each element represents an
430  * ionic species and stores the value of the corresponding neutral molecule
431  *
432  * For the case of fm_invert_simple_ = true, we assume that there is a quick
433  * way to invert the formula matrix so that we can quickly calculate the
434  * neutral molecule mole fraction given the ion mole fraction vector.
435  *
436  * We assume that for a selected set of ion species, that that ion is only
437  * in the neutral molecule, jNeut.
438  *
439  * therefore,
440  *
441  * NeutralMolecMoleFractions_[jNeut] += moleFractions_[i_ion] / fmij;
442  *
443  * where fmij is the number of ions in neutral molecule jNeut.
444  *
445  * Thus, we formulate the neutral molecule mole fraction
446  * NeutralMolecMoleFractions_[] vector from this association. We further
447  * assume that there are no other associations. If fm_invert_simple_ is not
448  * true, then we need to do a formal inversion which takes a great deal of
449  * time and is not currently implemented.
450  */
451  std::vector<size_t> fm_invert_ionForNeutral;
452 
453  //! Mole fractions using the Neutral Molecule Mole fraction basis
455 
456  //! List of the species in this ThermoPhase which are cation species
457  std::vector<size_t> cationList_;
458 
459  //! List of the species in this ThermoPhase which are anion species
460  std::vector<size_t> anionList_;
461 
462  //! List of the species in this ThermoPhase which are passed through to the
463  //! neutralMoleculePhase ThermoPhase. These have neutral charges.
464  std::vector<size_t> passThroughList_;
465 
466 public:
467  //! This is a pointer to the neutral Molecule Phase
468  /*!
469  * If the variable, IOwnNThermoPhase_ is true, then we own
470  * the pointer. If not, then this is considered a shallow pointer.
471  */
473 
474 private:
475  GibbsExcessVPSSTP* geThermo;
476  // Temporary vectors that I don't want to allocate every time the function
477  // is called
478  mutable vector_fp y_;
479  mutable vector_fp dlnActCoeff_NeutralMolecule_;
480  mutable vector_fp dX_NeutralMolecule_;
481  mutable vector_fp m_work; // length m_kk
482 
483  //! If true then we own the underlying neutral Molecule Phase
484  /*!
485  * If this is false, then the neutral molecule phase is considered
486  * as a shallow pointer.
487  */
489 
490  //! Temporary mole fraction vector
492 
493  //! Storage vector for the neutral molecule chemical potentials
494  /*!
495  * This vector is used as a temporary storage area when calculating the ion
496  * chemical potentials.
497  *
498  * - Units = Joules/kmol
499  * - Length = numNeutralMoleculeSpecies_
500  */
502 
503  //! Storage vector for the neutral molecule ln activity coefficients
504  /*!
505  * This vector is used as a temporary storage area when calculating the ion
506  * chemical potentials and activity coefficients
507  *
508  * - Units = none
509  * - Length = numNeutralMoleculeSpecies_
510  */
512 
513  //! Storage vector for the neutral molecule d ln activity coefficients dT
514  /*!
515  * This vector is used as a temporary storage area when calculating the ion
516  * derivatives
517  *
518  * - Units = 1/Kelvin
519  * - Length = numNeutralMoleculeSpecies_
520  */
522 
523  //! Storage vector for the neutral molecule d ln activity coefficients dX -
524  //! diagonal component
525  /*!
526  * This vector is used as a temporary storage area when calculating the ion
527  * derivatives
528  *
529  * - Units = none
530  * - Length = numNeutralMoleculeSpecies_
531  */
533 
534  //! Storage vector for the neutral molecule d ln activity coefficients dlnN
535  //! - diagonal component
536  /*!
537  * This vector is used as a temporary storage area when calculating the ion
538  * derivatives
539  *
540  * - Units = none
541  * - Length = numNeutralMoleculeSpecies_
542  */
544 
545  //! Storage vector for the neutral molecule d ln activity coefficients dlnN
546  /*!
547  * This vector is used as a temporary storage area when calculating the ion
548  * derivatives
549  *
550  * - Units = none
551  * - Length = numNeutralMoleculeSpecies_
552  */
554 };
555 
556 }
557 
558 #endif
vector_fp muNeutralMolecule_
Storage vector for the neutral molecule chemical potentials.
vector_fp NeutralMolecMoleFractions_
Mole fractions using the Neutral Molecule Mole fraction basis.
size_t indexSpecialSpecies_
Index of special species.
Class XML_Node is a tree-based representation of the contents of an XML file.
Definition: xml.h:97
void constructPhaseFile(std::string inputFile, std::string id)
The following methods are used in the process of constructing the phase and setting its parameters fr...
void s_update_dlnActCoeff() const
Update the change in the ln activity coefficients.
virtual std::string type() const
String indicating the thermodynamic model implemented.
bool IOwnNThermoPhase_
If true then we own the underlying neutral Molecule Phase.
void constructPhaseXML(XML_Node &phaseNode, std::string id)
Import and initialize an IonsFromNeutralVPSSTP phase specification in an XML tree into the current ob...
vector_fp lnActCoeff_NeutralMolecule_
Storage vector for the neutral molecule ln activity coefficients.
vector_fp dlnActCoeffdT_NeutralMolecule_
Storage vector for the neutral molecule d ln activity coefficients dT.
void getAnionList(std::vector< size_t > &anion) const
Get the list of anions in this object.
A class for 2D arrays stored in column-major (Fortran-compatible) form.
Definition: Array.h:31
Base class for a phase with thermodynamic properties.
Definition: ThermoPhase.h:93
void s_update_dlnActCoeff_dlnX_diag() const
Update the derivative of the log of the activity coefficients wrt log(mole fraction) ...
vector_fp dlnActCoeffdlnN_diag_NeutralMolecule_
Storage vector for the neutral molecule d ln activity coefficients dlnN.
virtual void calcNeutralMoleculeMoleFractions() const
Calculate neutral molecule mole fractions.
virtual void getChemPotentials(doublereal *mu) const
Get the species chemical potentials. Units: J/kmol.
virtual void getdlnActCoeffds(const doublereal dTds, const doublereal *const dXds, doublereal *dlnActCoeffds) const
Get the change in activity coefficients wrt changes in state (temp, mole fraction, etc) along a line in parameter space or along a line in physical space.
void s_update_dlnActCoeffdT() const
Update the temperature derivative of the ln activity coefficients.
IonSolnType_enumType ionSolnType_
Ion solution type.
virtual void getdlnActCoeffdlnN_diag(doublereal *dlnActCoeffdlnN_diag) const
Get the array of log species mole number derivatives of the log activity coefficients.
virtual void getdlnActCoeffdlnN(const size_t ld, doublereal *const dlnActCoeffdlnN)
Get the array of derivatives of the log activity coefficients with respect to the log of the species ...
virtual void compositionChanged()
Apply changes to the state which are needed after the composition changes.
void s_update_lnActCoeff() const
Update the activity coefficients.
Array2D dlnActCoeffdlnN_NeutralMolecule_
Storage vector for the neutral molecule d ln activity coefficients dlnN.
Header for intermediate ThermoPhase object for phases which employ Gibbs excess free energy based for...
virtual doublereal gibbs_mole() const
Molar Gibbs function. Units: J/kmol.
void initLengths()
Initialize lengths of local variables after all species have been identified.
virtual void calcDensity()
Calculate the density of the mixture using the partial molar volumes and mole fractions as input...
void getNeutralMolecMoleFractions(vector_fp &neutralMoleculeMoleFractions) const
Return the current value of the neutral mole fraction vector.
virtual void getPartialMolarEntropies(doublereal *sbar) const
Returns an array of partial molar entropies for the species in the mixture.
void s_update_dlnActCoeff_dlnN() const
Update the derivative of the log of the activity coefficients wrt log(number of moles) - diagonal com...
std::vector< size_t > anionList_
List of the species in this ThermoPhase which are anion species.
virtual doublereal entropy_mole() const
Molar entropy. Units: J/kmol/K.
std::vector< size_t > passThroughList_
List of the species in this ThermoPhase which are passed through to the neutralMoleculePhase ThermoPh...
virtual doublereal cv_mole() const
Molar heat capacity at constant volume. Units: J/kmol/K.
virtual int eosType() const
Equation of state type flag.
virtual void calcIonMoleFractions(doublereal *const mf) const
Calculate ion mole fractions from neutral molecule mole fractions.
virtual void getdlnActCoeffdlnX_diag(doublereal *dlnActCoeffdlnX_diag) const
Get the array of ln mole fraction derivatives of the log activity coefficients - diagonal component o...
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:157
std::vector< size_t > fm_invert_ionForNeutral
Mapping between ion species and neutral molecule for quick invert.
virtual doublereal enthalpy_mole() const
Return the Molar enthalpy. Units: J/kmol.
virtual void getPartialMolarEnthalpies(doublereal *hbar) const
Returns an array of partial molar enthalpies for the species in the mixture.
std::vector< size_t > cationList_
List of the species in this ThermoPhase which are cation species.
virtual void getActivityCoefficients(doublereal *ac) const
Get the array of non-dimensional molar-based activity coefficients at the current solution temperatur...
virtual void initThermoXML(XML_Node &phaseNode, const std::string &id)
Import and initialize a ThermoPhase object using an XML tree.
vector_fp fm_neutralMolec_ions_
Formula Matrix for composition of neutral molecules in terms of the molecules in this ThermoPhase...
void getCationList(std::vector< size_t > &cation) const
Get the list of cations in this object.
virtual ThermoPhase * duplMyselfAsThermoPhase() const
Duplication routine for objects which inherit from ThermoPhase.
void getDissociationCoeffs(vector_fp &fm_neutralMolec_ions, vector_fp &charges, std::vector< size_t > &neutMolIndex) const
Get the Salt Dissociation Coefficients.
Namespace for the Cantera kernel.
Definition: application.cpp:29
size_t indexSecondSpecialSpecies_
Index of special species.
size_t numNeutralMoleculeSpecies_
Number of neutral molecule species.
ThermoPhase * neutralMoleculePhase_
This is a pointer to the neutral Molecule Phase.
virtual doublereal cp_mole() const
Molar heat capacity at constant pressure. Units: J/kmol/K.
vector_fp moleFractionsTmp_
Temporary mole fraction vector.
void getNeutralMoleculeMoleGrads(const doublereal *const dx, doublereal *const dy) const
Calculate neutral molecule mole fractions.
void s_update_dlnActCoeff_dlnN_diag() const
Update the derivative of the log of the activity coefficients wrt log(number of moles) - diagonal com...
IonSolnType_enumType
enums for molten salt ion solution types
vector_fp dlnActCoeffdlnX_diag_NeutralMolecule_
Storage vector for the neutral molecule d ln activity coefficients dX - diagonal component.