35 vector_fp vbar = getPartialMolarVolumesVector();
36 doublereal vtotal = 0.0;
37 for (
size_t i = 0; i <
m_kk; i++) {
70 for (
size_t k = 0; k <
m_kk; k++) {
78 for (
size_t k = 0; k <
m_kk; k++) {
81 }
else if (ac[k] < -700.) {
97const vector_fp& GibbsExcessVPSSTP::getPartialMolarVolumesVector()
const
99 return getStandardVolumes();
104 doublereal norm = std::accumulate(x, x +
m_kk, 0.0);
105 if (fabs(norm - 1.0) > 1.0E-9) {
107 "(MF sum - 1) exceeded tolerance of 1.0E-9: {}", norm);
Header for intermediate ThermoPhase object for phases which employ Gibbs excess free energy based for...
void resize(size_t n, size_t m, double v=0.0)
Resize the array, and fill the new entries with 'v'.
Base class for exceptions thrown by Cantera classes.
virtual bool addSpecies(shared_ptr< Species > spec)
Array2D dlnActCoeffdlnN_
Storage for the current derivative values of the gradients with respect to logarithm of the species m...
virtual void getActivityCoefficients(doublereal *ac) const
Get the array of non-dimensional molar-based activity coefficients at the current solution temperatur...
virtual doublereal logStandardConc(size_t k=0) const
Natural logarithm of the standard concentration of the kth species.
virtual void getPartialMolarVolumes(doublereal *vbar) const
Return an array of partial molar volumes for the species in the mixture.
virtual void getActivityConcentrations(doublereal *c) const
This method returns an array of generalized concentrations.
vector_fp dlnActCoeffdlnX_diag_
Storage for the current derivative values of the gradients with respect to logarithm of the mole frac...
vector_fp lnActCoeff_Scaled_
Storage for the current values of the activity coefficients of the species.
vector_fp d2lnActCoeffdT2_Scaled_
Storage for the current derivative values of the gradients with respect to temperature of the log of ...
vector_fp moleFractions_
Storage for the current values of the mole fractions of the species.
virtual Units standardConcentrationUnits() const
Returns the units of the "standard concentration" for this phase.
vector_fp dlnActCoeffdlnN_diag_
Storage for the current derivative values of the gradients with respect to logarithm of the mole frac...
virtual void compositionChanged()
Apply changes to the state which are needed after the composition changes.
virtual void getActivities(doublereal *ac) const
Get the array of non-dimensional activities (molality based for this class and classes that derive fr...
double checkMFSum(const doublereal *const x) const
utility routine to check mole fraction sum
vector_fp dlnActCoeffdT_Scaled_
Storage for the current derivative values of the gradients with respect to temperature of the log of ...
void calcDensity()
Calculate the density of the mixture using the partial molar volumes and mole fractions as input.
virtual doublereal standardConcentration(size_t k=0) const
The standard concentration used to normalize the generalized concentration.
void assignDensity(const double density_)
Set the internally stored constant density (kg/m^3) of the phase.
size_t m_kk
Number of species in the phase.
doublereal meanMolecularWeight() const
The mean molecular weight. Units: (kg/kmol)
void getMoleFractions(double *const x) const
Get the species mole fraction vector.
virtual void compositionChanged()
Apply changes to the state which are needed after the composition changes.
virtual void getLnActivityCoefficients(doublereal *lnac) const
Get the array of non-dimensional molar-based ln activity coefficients at the current solution tempera...
A representation of the units associated with a dimensional quantity.
virtual bool addSpecies(shared_ptr< Species > spec)
virtual void getStandardVolumes(doublereal *vol) const
Get the molar volumes of the species standard states at the current T and P of the solution.
Namespace for the Cantera kernel.
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
Contains declarations for string manipulation functions within Cantera.