| Cantera 3.0.0

Loading...
Searching...
No Matches
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 https://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 */
25 enum IonSolnType_enumType {
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 *
67 * @deprecated To be removed after %Cantera 3.0.
68 */
69 class IonsFromNeutralVPSSTP : public GibbsExcessVPSSTP
70{
71 public:
72 //! @name Constructors
73 //! @{
74
75 //! Construct an IonsFromNeutralVPSSTP object from an input file
76 /*!
77 * @param inputFile Name of the input file containing the phase definition.
78 * If blank, an empty phase will be created.
79 * @param id name (ID) of the phase in the input file. If empty, the
80 * first phase definition in the input file will be used.
81 */
82 explicit IonsFromNeutralVPSSTP(const string& inputFile="", const string& id="");
83
84 //! @}
85 //! @name Utilities
86 //! @{
87
88 string type() const override {
89 return "IonsFromNeutral";
90 }
91
92 //! @}
93 //! @name Molar Thermodynamic Properties
94 //! @{
95
96 //! Return the Molar enthalpy. Units: J/kmol.
97 /*!
98 * This is calculated from the partial molar enthalpies of the species.
99 */
100 double enthalpy_mole() const override;
101
102 double entropy_mole() const override;
103 double gibbs_mole() const override;
104 double cp_mole() const override;
105 double cv_mole() const override;
106
107 //! @}
108 //! @name Activities, Standard States, and Activity Concentrations
109 //!
110 //! The activity @f$ a_k @f$ of a species in solution is
111 //! related to the chemical potential by @f[ \mu_k = \mu_k^0(T)
112 //! + \hat R T \ln a_k. @f] The quantity @f$ \mu_k^0(T,P) @f$ is
113 //! the chemical potential at unit activity, which depends only
114 //! on temperature and pressure.
115 //! @{
116
117 void getActivityCoefficients(double* ac) const override;
118
119 //! @}
120 //! @name Partial Molar Properties of the Solution
121 //! @{
122
123 void getChemPotentials(double* mu) const override;
124
125 //! Returns an array of partial molar enthalpies for the species in the
126 //! mixture.
127 /*!
128 * Units (J/kmol)
129 *
130 * For this phase, the partial molar enthalpies are equal to the standard
131 * state enthalpies modified by the derivative of the molality-based
132 * activity coefficient wrt temperature
133 *
134 * @f[
135 * \bar h_k(T,P) = h^o_k(T,P) - R T^2 \frac{d \ln(\gamma_k)}{dT}
136 * @f]
137 *
138 * @param hbar Output vector of species partial molar enthalpies.
139 * Length: m_kk. Units: J/kmol
140 */
141 void getPartialMolarEnthalpies(double* hbar) const override;
142
143 //! Returns an array of partial molar entropies for the species in the
144 //! mixture.
145 /*!
146 * Units (J/kmol)
147 *
148 * For this phase, the partial molar enthalpies are equal to the standard
149 * state enthalpies modified by the derivative of the activity coefficient
150 * wrt temperature
151 *
152 * @f[
153 * \bar s_k(T,P) = s^o_k(T,P) - R T^2 \frac{d \ln(\gamma_k)}{dT}
154 * - R \ln( \gamma_k X_k)
155 * - R T \frac{d \ln(\gamma_k) }{dT}
156 * @f]
157 *
158 * @param sbar Output vector of species partial molar entropies.
159 * Length: m_kk. Units: J/kmol/K
160 */
161 void getPartialMolarEntropies(double* sbar) const override;
162
163 void getdlnActCoeffds(const double dTds, const double* const dXds,
164 double* dlnActCoeffds) const override;
165 void getdlnActCoeffdlnX_diag(double* dlnActCoeffdlnX_diag) const override;
166 void getdlnActCoeffdlnN_diag(double* dlnActCoeffdlnN_diag) const override;
167 void getdlnActCoeffdlnN(const size_t ld, double* const dlnActCoeffdlnN) override;
168 //! @}
169
170 //! Get the Salt Dissociation Coefficients.
171 //! Returns the vector of dissociation coefficients and vector of charges
172 /*!
173 * @param fm_neutralMolec_ions Returns the formula matrix for the
174 * composition of neutral molecules in terms of the ions.
175 * @param charges Returns a vector containing the charges of
176 * all species in this phase
177 * @param neutMolIndex Returns the vector fm_invert_ionForNeutral
178 * This is the mapping between ion species and neutral molecule for
179 * quick invert.
180 */
181 void getDissociationCoeffs(vector<double>& fm_neutralMolec_ions,
182 vector<double>& charges, vector<size_t>& neutMolIndex) const;
183
184 //! Return the current value of the neutral mole fraction vector
185 /*!
186 * @param neutralMoleculeMoleFractions Vector of neutral molecule mole
187 * fractions.
188 */
189 void getNeutralMolecMoleFractions(vector<double>& neutralMoleculeMoleFractions) const {
190 neutralMoleculeMoleFractions = NeutralMolecMoleFractions_;
191 }
192
193 //! Calculate neutral molecule mole fractions
194 /*!
195 * This routine calculates the neutral molecule mole fraction given the
196 * vector of ion mole fractions, that is, the mole fractions from this
197 * ThermoPhase. Note, this routine basically assumes that there is charge
198 * neutrality. If there isn't, then it wouldn't make much sense.
199 *
200 * for the case of cIonSolnType_SINGLEANION, some slough in the charge
201 * neutrality is allowed. The cation number is followed, while the
202 * difference in charge neutrality is dumped into the anion mole number to
203 * fix the imbalance.
204 *
205 * @param dx input vector of ion mole fraction gradients
206 * @param dy output Vector of neutral molecule mole fraction gradients
207 */
208 void getNeutralMoleculeMoleGrads(const double* const dx, double* const dy) const;
209
210 //! Get the list of cations in this object
211 /*!
212 * @param cation List of cations
213 */
214 void getCationList(vector<size_t>& cation) const {
215 cation=cationList_;
216 }
217
218 //! Get the list of anions in this object
219 /*!
220 * @param anion List of anions
221 */
222 void getAnionList(vector<size_t>& anion) const {
223 anion=anionList_;
224 }
225
226 //! @name Setting the State
227 //!
228 //! These methods set all or part of the thermodynamic state.
229 //! @{
230
231 void calcDensity() override;
232
233 //! Calculate ion mole fractions from neutral molecule mole fractions.
234 /*!
235 * @param mf Dump the mole fractions into this vector.
236 */
237 virtual void calcIonMoleFractions(double* const mf) const;
238
239 //! Calculate neutral molecule mole fractions
240 /*!
241 * This routine calculates the neutral molecule mole fraction given the
242 * vector of ion mole fractions, that is, the mole fractions from this
243 * ThermoPhase. Note, this routine basically assumes that there is charge
244 * neutrality. If there isn't, then it wouldn't make much sense.
245 *
246 * for the case of cIonSolnType_SINGLEANION, some slough in the charge
247 * neutrality is allowed. The cation number is followed, while the
248 * difference in charge neutrality is dumped into the anion mole number to
249 * fix the imbalance.
250 */
251 virtual void calcNeutralMoleculeMoleFractions() const;
252
253 //! @}
254
255 bool addSpecies(shared_ptr<Species> spec) override;
256 void setNeutralMoleculePhase(shared_ptr<ThermoPhase> neutral);
257 shared_ptr<ThermoPhase> getNeutralMoleculePhase();
258
259 void setParameters(const AnyMap& phaseNode,
260 const AnyMap& rootNode=AnyMap()) override;
261 void initThermo() override;
262 void getParameters(AnyMap& phaseNode) const override;
263
264 private:
265 //! Update the activity coefficients
266 /*!
267 * This function will be called to update the internally stored natural
268 * logarithm of the activity coefficients
269 */
270 void s_update_lnActCoeff() const;
271
272 //! Update the temperature derivative of the ln activity coefficients
273 /*!
274 * This function will be called to update the internally stored temperature
275 * derivative of the natural logarithm of the activity coefficients
276 */
277 void s_update_dlnActCoeffdT() const;
278
279 //! Update the change in the ln activity coefficients
280 /*!
281 * This function will be called to update the internally stored change of
282 * the natural logarithm of the activity coefficients w.r.t a change in
283 * state (temp, mole fraction, etc)
284 */
285 void s_update_dlnActCoeff() const;
286
287 //! Update the derivative of the log of the activity coefficients wrt
288 //! log(mole fraction)
289 /*!
290 * This function will be called to update the internally stored
291 * derivative of the natural logarithm of the activity coefficients
292 * wrt logarithm of the mole fractions.
293 */
294 void s_update_dlnActCoeff_dlnX_diag() const;
295
296 //! Update the derivative of the log of the activity coefficients wrt
297 //! log(number of moles) - diagonal components
298 /*!
299 * This function will be called to update the internally stored derivative
300 * of the natural logarithm of the activity coefficients wrt logarithm of
301 * the number of moles of given species.
302 */
303 void s_update_dlnActCoeff_dlnN_diag() const;
304
305 //! Update the derivative of the log of the activity coefficients
306 //! wrt log(number of moles) - diagonal components
307 /*!
308 * This function will be called to update the internally stored derivative
309 * of the natural logarithm of the activity coefficients wrt logarithm of
310 * the number of moles of given species.
311 */
312 void s_update_dlnActCoeff_dlnN() const;
313
314 protected:
315 void compositionChanged() override;
316
317 //! Ion solution type
318 /*!
319 * There is either mixing on the anion, cation, or both lattices.
320 * There is also a passthrough option
321 *
322 * Defaults to cIonSolnType_SINGLEANION, so that LiKCl can be hardwired
323 */
324 IonSolnType_enumType ionSolnType_ = cIonSolnType_SINGLEANION;
325
326 //! Number of neutral molecule species
327 /*!
328 * This is equal to the number of species in the neutralMoleculePhase_
329 * ThermoPhase.
330 */
331 size_t numNeutralMoleculeSpecies_ = 0;
332
333 //! Index of special species
334 size_t indexSpecialSpecies_ = npos;
335
336 //! Formula Matrix for composition of neutral molecules
337 //! in terms of the molecules in this ThermoPhase
338 /*!
339 * fm_neutralMolec_ions[ i + jNeut * m_kk ]
340 *
341 * This is the number of ions of type i in the neutral molecule jNeut.
342 */
343 vector<double> fm_neutralMolec_ions_;
344
345 //! Mapping between ion species and neutral molecule for quick invert.
346 /*!
347 * fm_invert_ionForNeutral returns vector of int. Each element represents an
348 * ionic species and stores the value of the corresponding neutral molecule
349 *
350 * For the case of fm_invert_simple_ = true, we assume that there is a quick
351 * way to invert the formula matrix so that we can quickly calculate the
352 * neutral molecule mole fraction given the ion mole fraction vector.
353 *
354 * We assume that for a selected set of ion species, that that ion is only
355 * in the neutral molecule, jNeut.
356 *
357 * therefore,
358 *
359 * NeutralMolecMoleFractions_[jNeut] += moleFractions_[i_ion] / fmij;
360 *
361 * where fmij is the number of ions in neutral molecule jNeut.
362 *
363 * Thus, we formulate the neutral molecule mole fraction
364 * NeutralMolecMoleFractions_[] vector from this association. We further
365 * assume that there are no other associations. If fm_invert_simple_ is not
366 * true, then we need to do a formal inversion which takes a great deal of
367 * time and is not currently implemented.
368 */
369 vector<size_t> fm_invert_ionForNeutral;
370
371 //! Mole fractions using the Neutral Molecule Mole fraction basis
372 mutable vector<double> NeutralMolecMoleFractions_;
373
374 //! List of the species in this ThermoPhase which are cation species
375 vector<size_t> cationList_;
376
377 //! List of the species in this ThermoPhase which are anion species
378 vector<size_t> anionList_;
379
380 //! List of the species in this ThermoPhase which are passed through to the
381 //! neutralMoleculePhase ThermoPhase. These have neutral charges.
382 vector<size_t> passThroughList_;
383
384 //! This is a pointer to the neutral Molecule Phase
385 shared_ptr<ThermoPhase> neutralMoleculePhase_;
386
387 //! Root node of the AnyMap which contains this phase definition.
388 //! Used to look up the phase definition for the embedded neutral phase.
389 AnyMap m_rootNode;
390
391 private:
392 GibbsExcessVPSSTP* geThermo;
393 // Temporary vectors that I don't want to allocate every time the function
394 // is called
395 mutable vector<double> y_;
396 mutable vector<double> dlnActCoeff_NeutralMolecule_;
397 mutable vector<double> dX_NeutralMolecule_;
398 mutable vector<double> m_work; // length m_kk
399
400 //! Temporary mole fraction vector
401 mutable vector<double> moleFractionsTmp_;
402
403 //! Storage vector for the neutral molecule chemical potentials
404 /*!
405 * This vector is used as a temporary storage area when calculating the ion
406 * chemical potentials.
407 *
408 * - Units = Joules/kmol
409 * - Length = numNeutralMoleculeSpecies_
410 */
411 mutable vector<double> muNeutralMolecule_;
412
413 //! Storage vector for the neutral molecule ln activity coefficients
414 /*!
415 * This vector is used as a temporary storage area when calculating the ion
416 * chemical potentials and activity coefficients
417 *
418 * - Units = none
419 * - Length = numNeutralMoleculeSpecies_
420 */
421 mutable vector<double> lnActCoeff_NeutralMolecule_;
422
423 //! Storage vector for the neutral molecule d ln activity coefficients dT
424 /*!
425 * This vector is used as a temporary storage area when calculating the ion
426 * derivatives
427 *
428 * - Units = 1/Kelvin
429 * - Length = numNeutralMoleculeSpecies_
430 */
431 mutable vector<double> dlnActCoeffdT_NeutralMolecule_;
432
433 //! Storage vector for the neutral molecule d ln activity coefficients dX -
434 //! diagonal component
435 /*!
436 * This vector is used as a temporary storage area when calculating the ion
437 * derivatives
438 *
439 * - Units = none
440 * - Length = numNeutralMoleculeSpecies_
441 */
442 mutable vector<double> dlnActCoeffdlnX_diag_NeutralMolecule_;
443
444 //! Storage vector for the neutral molecule d ln activity coefficients dlnN
445 //! - diagonal component
446 /*!
447 * This vector is used as a temporary storage area when calculating the ion
448 * derivatives
449 *
450 * - Units = none
451 * - Length = numNeutralMoleculeSpecies_
452 */
453 mutable vector<double> dlnActCoeffdlnN_diag_NeutralMolecule_;
454
455 //! Storage vector for the neutral molecule d ln activity coefficients dlnN
456 /*!
457 * This vector is used as a temporary storage area when calculating the ion
458 * derivatives
459 *
460 * - Units = none
461 * - Length = numNeutralMoleculeSpecies_
462 */
463 mutable Array2D dlnActCoeffdlnN_NeutralMolecule_;
464};
465
466}
467
468#endif
GibbsExcessVPSSTP.h
Header for intermediate ThermoPhase object for phases which employ Gibbs excess free energy based for...
Cantera::AnyMap
A map of string keys to values whose type can vary at runtime.
Definition AnyMap.h:427
Cantera::Array2D
A class for 2D arrays stored in column-major (Fortran-compatible) form.
Definition Array.h:32
Cantera::GibbsExcessVPSSTP
GibbsExcessVPSSTP is a derived class of ThermoPhase that handles variable pressure standard state met...
Definition GibbsExcessVPSSTP.h:85
Cantera::IonsFromNeutralVPSSTP
The IonsFromNeutralVPSSTP is a derived class of ThermoPhase that handles the specification of the che...
Definition IonsFromNeutralVPSSTP.h:70
Cantera::IonsFromNeutralVPSSTP::lnActCoeff_NeutralMolecule_
vector< double > lnActCoeff_NeutralMolecule_
Storage vector for the neutral molecule ln activity coefficients.
Definition IonsFromNeutralVPSSTP.h:421
Cantera::IonsFromNeutralVPSSTP::anionList_
vector< size_t > anionList_
List of the species in this ThermoPhase which are anion species.
Definition IonsFromNeutralVPSSTP.h:378
Cantera::IonsFromNeutralVPSSTP::getdlnActCoeffds
void getdlnActCoeffds(const double dTds, const double *const dXds, double *dlnActCoeffds) const override
Get the change in activity coefficients wrt changes in state (temp, mole fraction,...
Definition IonsFromNeutralVPSSTP.cpp:678
Cantera::IonsFromNeutralVPSSTP::enthalpy_mole
double enthalpy_mole() const override
Return the Molar enthalpy. Units: J/kmol.
Definition IonsFromNeutralVPSSTP.cpp:37
Cantera::IonsFromNeutralVPSSTP::m_rootNode
AnyMap m_rootNode
Root node of the AnyMap which contains this phase definition.
Definition IonsFromNeutralVPSSTP.h:389
Cantera::IonsFromNeutralVPSSTP::dlnActCoeffdlnX_diag_NeutralMolecule_
vector< double > dlnActCoeffdlnX_diag_NeutralMolecule_
Storage vector for the neutral molecule d ln activity coefficients dX - diagonal component.
Definition IonsFromNeutralVPSSTP.h:442
Cantera::IonsFromNeutralVPSSTP::getPartialMolarEnthalpies
void getPartialMolarEnthalpies(double *hbar) const override
Returns an array of partial molar enthalpies for the species in the mixture.
Definition IonsFromNeutralVPSSTP.cpp:140
Cantera::IonsFromNeutralVPSSTP::getChemPotentials
void getChemPotentials(double *mu) const override
Get the species chemical potentials. Units: J/kmol.
Definition IonsFromNeutralVPSSTP.cpp:91
Cantera::IonsFromNeutralVPSSTP::getDissociationCoeffs
void getDissociationCoeffs(vector< double > &fm_neutralMolec_ions, vector< double > &charges, vector< size_t > &neutMolIndex) const
Get the Salt Dissociation Coefficients.
Definition IonsFromNeutralVPSSTP.cpp:70
Cantera::IonsFromNeutralVPSSTP::calcNeutralMoleculeMoleFractions
virtual void calcNeutralMoleculeMoleFractions() const
Calculate neutral molecule mole fractions.
Definition IonsFromNeutralVPSSTP.cpp:251
Cantera::IonsFromNeutralVPSSTP::getCationList
void getCationList(vector< size_t > &cation) const
Get the list of cations in this object.
Definition IonsFromNeutralVPSSTP.h:214
Cantera::IonsFromNeutralVPSSTP::calcIonMoleFractions
virtual void calcIonMoleFractions(double *const mf) const
Calculate ion mole fractions from neutral molecule mole fractions.
Definition IonsFromNeutralVPSSTP.cpp:222
Cantera::IonsFromNeutralVPSSTP::fm_invert_ionForNeutral
vector< size_t > fm_invert_ionForNeutral
Mapping between ion species and neutral molecule for quick invert.
Definition IonsFromNeutralVPSSTP.h:369
Cantera::IonsFromNeutralVPSSTP::muNeutralMolecule_
vector< double > muNeutralMolecule_
Storage vector for the neutral molecule chemical potentials.
Definition IonsFromNeutralVPSSTP.h:411
Cantera::IonsFromNeutralVPSSTP::s_update_dlnActCoeff_dlnN_diag
void s_update_dlnActCoeff_dlnN_diag() const
Update the derivative of the log of the activity coefficients wrt log(number of moles) - diagonal com...
Definition IonsFromNeutralVPSSTP.cpp:833
Cantera::IonsFromNeutralVPSSTP::getParameters
void getParameters(AnyMap &phaseNode) const override
Store the parameters of a ThermoPhase object such that an identical one could be reconstructed using ...
Definition IonsFromNeutralVPSSTP.cpp:571
Cantera::IonsFromNeutralVPSSTP::type
string type() const override
String indicating the thermodynamic model implemented.
Definition IonsFromNeutralVPSSTP.h:88
Cantera::IonsFromNeutralVPSSTP::initThermo
void initThermo() override
Initialize the ThermoPhase object after all species have been set up.
Definition IonsFromNeutralVPSSTP.cpp:466
Cantera::IonsFromNeutralVPSSTP::getNeutralMolecMoleFractions
void getNeutralMolecMoleFractions(vector< double > &neutralMoleculeMoleFractions) const
Return the current value of the neutral mole fraction vector.
Definition IonsFromNeutralVPSSTP.h:189
Cantera::IonsFromNeutralVPSSTP::fm_neutralMolec_ions_
vector< double > fm_neutralMolec_ions_
Formula Matrix for composition of neutral molecules in terms of the molecules in this ThermoPhase.
Definition IonsFromNeutralVPSSTP.h:343
Cantera::IonsFromNeutralVPSSTP::indexSpecialSpecies_
size_t indexSpecialSpecies_
Index of special species.
Definition IonsFromNeutralVPSSTP.h:334
Cantera::IonsFromNeutralVPSSTP::cv_mole
double cv_mole() const override
Molar heat capacity at constant volume. Units: J/kmol/K.
Definition IonsFromNeutralVPSSTP.cpp:61
Cantera::IonsFromNeutralVPSSTP::dlnActCoeffdlnN_diag_NeutralMolecule_
vector< double > dlnActCoeffdlnN_diag_NeutralMolecule_
Storage vector for the neutral molecule d ln activity coefficients dlnN.
Definition IonsFromNeutralVPSSTP.h:453
Cantera::IonsFromNeutralVPSSTP::cationList_
vector< size_t > cationList_
List of the species in this ThermoPhase which are cation species.
Definition IonsFromNeutralVPSSTP.h:375
Cantera::IonsFromNeutralVPSSTP::dlnActCoeffdlnN_NeutralMolecule_
Array2D dlnActCoeffdlnN_NeutralMolecule_
Storage vector for the neutral molecule d ln activity coefficients dlnN.
Definition IonsFromNeutralVPSSTP.h:463
Cantera::IonsFromNeutralVPSSTP::s_update_dlnActCoeff_dlnN
void s_update_dlnActCoeff_dlnN() const
Update the derivative of the log of the activity coefficients wrt log(number of moles) - diagonal com...
Definition IonsFromNeutralVPSSTP.cpp:883
Cantera::IonsFromNeutralVPSSTP::getAnionList
void getAnionList(vector< size_t > &anion) const
Get the list of anions in this object.
Definition IonsFromNeutralVPSSTP.h:222
Cantera::IonsFromNeutralVPSSTP::entropy_mole
double entropy_mole() const override
Molar entropy. Units: J/kmol/K.
Definition IonsFromNeutralVPSSTP.cpp:43
Cantera::IonsFromNeutralVPSSTP::calcDensity
void calcDensity() override
Calculate the density of the mixture using the partial molar volumes and mole fractions as input.
Definition IonsFromNeutralVPSSTP.cpp:212
Cantera::IonsFromNeutralVPSSTP::neutralMoleculePhase_
shared_ptr< ThermoPhase > neutralMoleculePhase_
This is a pointer to the neutral Molecule Phase.
Definition IonsFromNeutralVPSSTP.h:385
Cantera::IonsFromNeutralVPSSTP::dlnActCoeffdT_NeutralMolecule_
vector< double > dlnActCoeffdT_NeutralMolecule_
Storage vector for the neutral molecule d ln activity coefficients dT.
Definition IonsFromNeutralVPSSTP.h:431
Cantera::IonsFromNeutralVPSSTP::numNeutralMoleculeSpecies_
size_t numNeutralMoleculeSpecies_
Number of neutral molecule species.
Definition IonsFromNeutralVPSSTP.h:331
Cantera::IonsFromNeutralVPSSTP::cp_mole
double cp_mole() const override
Molar heat capacity at constant pressure. Units: J/kmol/K.
Definition IonsFromNeutralVPSSTP.cpp:55
Cantera::IonsFromNeutralVPSSTP::compositionChanged
void compositionChanged() override
Apply changes to the state which are needed after the composition changes.
Definition IonsFromNeutralVPSSTP.cpp:417
Cantera::IonsFromNeutralVPSSTP::moleFractionsTmp_
vector< double > moleFractionsTmp_
Temporary mole fraction vector.
Definition IonsFromNeutralVPSSTP.h:401
Cantera::IonsFromNeutralVPSSTP::s_update_dlnActCoeff_dlnX_diag
void s_update_dlnActCoeff_dlnX_diag() const
Update the derivative of the log of the activity coefficients wrt log(mole fraction)
Definition IonsFromNeutralVPSSTP.cpp:783
Cantera::IonsFromNeutralVPSSTP::s_update_lnActCoeff
void s_update_lnActCoeff() const
Update the activity coefficients.
Definition IonsFromNeutralVPSSTP.cpp:634
Cantera::IonsFromNeutralVPSSTP::gibbs_mole
double gibbs_mole() const override
Molar Gibbs function. Units: J/kmol.
Definition IonsFromNeutralVPSSTP.cpp:49
Cantera::IonsFromNeutralVPSSTP::passThroughList_
vector< size_t > passThroughList_
List of the species in this ThermoPhase which are passed through to the neutralMoleculePhase ThermoPh...
Definition IonsFromNeutralVPSSTP.h:382
Cantera::IonsFromNeutralVPSSTP::getdlnActCoeffdlnX_diag
void getdlnActCoeffdlnX_diag(double *dlnActCoeffdlnX_diag) const override
Get the array of ln mole fraction derivatives of the log activity coefficients - diagonal component o...
Definition IonsFromNeutralVPSSTP.cpp:180
Cantera::IonsFromNeutralVPSSTP::addSpecies
bool addSpecies(shared_ptr< Species > spec) override
Add a Species to this Phase.
Definition IonsFromNeutralVPSSTP.cpp:605
Cantera::IonsFromNeutralVPSSTP::getdlnActCoeffdlnN_diag
void getdlnActCoeffdlnN_diag(double *dlnActCoeffdlnN_diag) const override
Get the array of log species mole number derivatives of the log activity coefficients.
Definition IonsFromNeutralVPSSTP.cpp:190
Cantera::IonsFromNeutralVPSSTP::getActivityCoefficients
void getActivityCoefficients(double *ac) const override
Get the array of non-dimensional molar-based activity coefficients at the current solution temperatur...
Definition IonsFromNeutralVPSSTP.cpp:78
Cantera::IonsFromNeutralVPSSTP::s_update_dlnActCoeffdT
void s_update_dlnActCoeffdT() const
Update the temperature derivative of the ln activity coefficients.
Definition IonsFromNeutralVPSSTP.cpp:733
Cantera::IonsFromNeutralVPSSTP::setParameters
void setParameters(const AnyMap &phaseNode, const AnyMap &rootNode=AnyMap()) override
Set equation of state parameters from an AnyMap phase description.
Definition IonsFromNeutralVPSSTP.cpp:459
Cantera::IonsFromNeutralVPSSTP::NeutralMolecMoleFractions_
vector< double > NeutralMolecMoleFractions_
Mole fractions using the Neutral Molecule Mole fraction basis.
Definition IonsFromNeutralVPSSTP.h:372
Cantera::IonsFromNeutralVPSSTP::getNeutralMoleculeMoleGrads
void getNeutralMoleculeMoleGrads(const double *const dx, double *const dy) const
Calculate neutral molecule mole fractions.
Definition IonsFromNeutralVPSSTP.cpp:347
Cantera::IonsFromNeutralVPSSTP::ionSolnType_
IonSolnType_enumType ionSolnType_
Ion solution type.
Definition IonsFromNeutralVPSSTP.h:324
Cantera::IonsFromNeutralVPSSTP::getPartialMolarEntropies
void getPartialMolarEntropies(double *sbar) const override
Returns an array of partial molar entropies for the species in the mixture.
Definition IonsFromNeutralVPSSTP.cpp:159
Cantera::IonsFromNeutralVPSSTP::s_update_dlnActCoeff
void s_update_dlnActCoeff() const
Update the change in the ln activity coefficients.
Cantera::IonsFromNeutralVPSSTP::getdlnActCoeffdlnN
void getdlnActCoeffdlnN(const size_t ld, double *const dlnActCoeffdlnN) override
Get the array of derivatives of the log activity coefficients with respect to the log of the species ...
Definition IonsFromNeutralVPSSTP.cpp:200
Cantera
Namespace for the Cantera kernel.
Definition AnyMap.cpp:564
Cantera::npos
const size_t npos
index returned by functions to indicate "no position"
Definition ct_defs.h:195
Cantera::IonSolnType_enumType
IonSolnType_enumType
enums for molten salt ion solution types
Definition IonsFromNeutralVPSSTP.h:25