37 throw CanteraError(
"IdealSolnGasVPSS::setStandardConcentrationModel",
38 "Unknown standard concentration model '{}'", model);
84 return Units(1.0, 0, -3, 0, 0, 0, 1);
95 for (
size_t k = 0; k <
m_kk; k++) {
100 for (
size_t k = 0; k <
m_kk; k++) {
105 for (
size_t k = 0; k <
m_kk; k++) {
128 for (
size_t k = 0; k <
m_kk; k++) {
138 for (
size_t k = 0; k <
m_kk; k++) {
140 mu[k] +=
RT() * log(xx);
154 for (
size_t k = 0; k <
m_kk; k++) {
188 for (
size_t k = 0; k <
m_kk; k++) {
189 double tmp = -
m_g0_RT[k] + mu_RT[k];
192 }
else if (tmp > 500.0) {
193 double tmp2 = tmp / 500.;
195 m_pp[k] = m_p0 * exp(500.) * tmp2;
197 m_pp[k] = m_p0 * exp(tmp);
228 phaseNode[
"standard-concentration-basis"] =
"species-molar-volume";
230 phaseNode[
"standard-concentration-basis"] =
"solvent-molar-volume";
Definition file for a derived class of ThermoPhase that assumes an ideal solution approximation and h...
Declarations for the virtual base class PDSS (pressure dependent standard state) which handles calcul...
A map of string keys to values whose type can vary at runtime.
bool hasKey(const string &key) const
Returns true if the map contains an item named key.
Base class for exceptions thrown by Cantera classes.
double enthalpy_mole() const override
Molar enthalpy. Units: J/kmol.
void getPartialMolarEnthalpies(double *hbar) const override
Returns an array of partial molar enthalpies for the species in the mixture.
void getChemPotentials(double *mu) const override
Get the species chemical potentials. Units: J/kmol.
vector< double > m_pp
Temporary storage - length = m_kk.
void getParameters(AnyMap &phaseNode) const override
Store the parameters of a ThermoPhase object such that an identical one could be reconstructed using ...
void initThermo() override
Initialize the ThermoPhase object after all species have been set up.
IdealSolnGasVPSS(const string &infile="", string id="")
Create an object from an input file.
void getActivityConcentrations(double *c) const override
This method returns an array of generalized concentrations.
void setPressure(double p) override
Set the internally stored pressure (Pa) at constant temperature and composition.
void getPartialMolarVolumes(double *vbar) const override
Return an array of partial molar volumes for the species in the mixture.
double cv_mole() const override
Molar heat capacity at constant volume. Units: J/kmol/K.
void setStandardConcentrationModel(const string &model)
Set the standard concentration model.
double entropy_mole() const override
Molar entropy. Units: J/kmol/K.
void calcDensity() override
Calculate the density of the mixture using the partial molar volumes and mole fractions as input.
int m_formGC
form of the generalized concentrations
void setToEquilState(const double *lambda_RT) override
This method is used by the ChemEquil equilibrium solver.
void getPartialMolarIntEnergies(double *ubar) const override
Return an array of partial molar internal energies for the species in the mixture.
double cp_mole() const override
Molar heat capacity at constant pressure. Units: J/kmol/K.
Units standardConcentrationUnits() const override
Returns the units of the "standard concentration" for this phase.
void getPartialMolarCp(double *cpbar) const override
Return an array of partial molar heat capacities for the species in the mixture.
double standardConcentration(size_t k=0) const override
Returns the standard concentration , which is used to normalize the generalized concentration.
bool addSpecies(shared_ptr< Species > spec) override
Add a Species to this Phase.
void getActivityCoefficients(double *ac) const override
Get the array of non-dimensional molar-based activity coefficients at the current solution temperatur...
void getPartialMolarEntropies(double *sbar) const override
Returns an array of partial molar entropies of the species in the solution.
void assignDensity(const double density_)
Set the internally stored constant density (kg/m^3) of the phase.
virtual void setMoleFractions(const double *const x)
Set the mole fractions to the specified values.
size_t m_kk
Number of species in the phase.
double meanMolecularWeight() const
The mean molecular weight. Units: (kg/kmol)
double sum_xlogx() const
Evaluate .
double moleFraction(size_t k) const
Return the mole fraction of a single species.
double mean_X(const double *const Q) const
Evaluate the mole-fraction-weighted mean of an array Q.
virtual void getParameters(AnyMap &phaseNode) const
Store the parameters of a ThermoPhase object such that an identical one could be reconstructed using ...
double RT() const
Return the Gas Constant multiplied by the current temperature.
void initThermoFile(const string &inputFile, const string &id)
Initialize a ThermoPhase object using an input file.
virtual double refPressure() const
Returns the reference pressure in Pa.
AnyMap m_input
Data supplied via setParameters.
A representation of the units associated with a dimensional quantity.
vector< double > m_g0_RT
Vector containing the species reference Gibbs functions at T = m_tlast and P = p_ref.
vector< double > m_sss_R
Vector containing the species Standard State entropies at T = m_tlast and P = m_plast.
void getEntropy_R(double *sr) const override
Get the array of nondimensional Entropy functions for the standard state species at the current T and...
void getStandardChemPotentials(double *mu) const override
Get the array of chemical potentials at unit activity for the species at their standard states at the...
void getCp_R(double *cpr) const override
Get the nondimensional Heat Capacities at constant pressure for the species standard states at the cu...
void initThermo() override
Initialize the ThermoPhase object after all species have been set up.
void getEnthalpy_RT(double *hrt) const override
Get the nondimensional Enthalpy functions for the species at their standard states at the current T a...
vector< double > m_cpss_R
Vector containing the species Standard State constant pressure heat capacities at T = m_tlast and P =...
void getStandardVolumes(double *vol) const override
Get the molar volumes of the species standard states at the current T and P of the solution.
void getIntEnergy_RT(double *urt) const override
Returns the vector of nondimensional Internal Energies of the standard state species at the current T...
virtual void updateStandardStateThermo() const
Updates the standard state thermodynamic functions at the current T and P of the solution.
vector< double > m_hss_RT
Vector containing the species Standard State enthalpies at T = m_tlast and P = m_plast.
bool addSpecies(shared_ptr< Species > spec) override
Add a Species to this Phase.
double m_Pcurrent
Current value of the pressure - state variable.
bool caseInsensitiveEquals(const string &input, const string &test)
Case insensitive equality predicate.
void scale(InputIter begin, InputIter end, OutputIter out, S scale_factor)
Multiply elements of an array by a scale factor.
const double GasConstant
Universal Gas Constant [J/kmol/K].
Namespace for the Cantera kernel.
const double SmallNumber
smallest number to compare to zero.
Contains declarations for string manipulation functions within Cantera.
Various templated functions that carry out common vector and polynomial operations (see Templated Arr...