18#ifndef CT_MOLALITYVPSSTP_H
19#define CT_MOLALITYVPSSTP_H
497 bool addSpecies(shared_ptr<Species> spec)
override;
510 void setState_TPM(
double t,
double p,
const double*
const molalities);
536 getdlnActCoeffdlnN_numderiv(ld, dlnActCoeffdlnN);
539 string report(
bool show_thermo=
true,
double threshold=1e-14)
const override;
543 vector<vector<double>>& data)
const override;
Header file for a derived class of ThermoPhase that handles variable pressure standard state methods ...
A map of string keys to values whose type can vary at runtime.
MolalityVPSSTP is a derived class of ThermoPhase that handles variable pressure standard state method...
int activityConvention() const override
We set the convention to molality here.
void setState(const AnyMap &state) override
Set the state using an AnyMap containing any combination of properties supported by the thermodynamic...
void getCsvReportData(vector< string > &names, vector< vector< double > > &data) const override
Fills names and data with the column names and species thermo properties to be included in the output...
void setMolalitiesByName(const Composition &xMap)
Set the molalities of a phase.
double m_Mnaught
This is the multiplication factor that goes inside log expressions involving the molalities of specie...
size_t m_indexCLM
Index of the phScale species.
size_t findCLMIndex() const
Returns the index of the Cl- species.
void initThermo() override
Initialize the ThermoPhase object after all species have been set up.
void getActivityConcentrations(double *c) const override
This method returns an array of generalized concentrations.
int pHScale() const
Reports the pH scale, which determines the scale for single-ion activity coefficients.
virtual void getMolalityActivityCoefficients(double *acMolality) const
Get the array of non-dimensional molality based activity coefficients at the current solution tempera...
void setpHScale(const int pHscaleType)
Set the pH scale, which determines the scale for single-ion activity coefficients.
double m_xmolSolventMIN
In any molality implementation, it makes sense to have a minimum solvent mole fraction requirement,...
vector< double > m_molalities
Current value of the molalities of the species in the phase.
virtual void applyphScale(double *acMolality) const
Apply the current phScale to a set of activity Coefficients or activities.
int m_pHScalingType
Scaling to be used for output of single-ion species activity coefficients.
void setMolalities(const double *const molal)
Set the molalities of the solutes in a phase.
void getMolalities(double *const molal) const
This function will return the molalities of the species.
void setMoleFSolventMin(double xmolSolventMIN)
Sets the minimum mole fraction in the molality formulation.
virtual double osmoticCoefficient() const
Calculate the osmotic coefficient.
MolalityVPSSTP()
Default Constructor.
double moleFSolventMin() const
Returns the minimum mole fraction in the molality formulation.
void setState_TPM(double t, double p, const double *const molalities)
Set the temperature (K), pressure (Pa), and molalities (gmol kg-1) of the solutes.
void getActivities(double *ac) const override
Get the array of non-dimensional activities (molality based for this class and classes that derive fr...
virtual void getUnscaledMolalityActivityCoefficients(double *acMolality) const
Get the array of unscaled non-dimensional molality based activity coefficients at the current solutio...
void calcMolalities() const
Calculates the molality of all species and stores the result internally.
double standardConcentration(size_t k=0) const override
Return the standard concentration for the kth species.
double m_weightSolvent
Molecular weight of the Solvent.
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 activity coefficients at the current solution temperature,...
string phaseOfMatter() const override
String indicating the mechanical phase of the matter in this Phase.
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 ...
string report(bool show_thermo=true, double threshold=1e-14) const override
returns a summary of the state of the phase as a string
string name() const
Return the name of the phase.
This is a filter class for ThermoPhase that implements some preparatory steps for efficiently handlin...
Namespace for the Cantera kernel.
const size_t npos
index returned by functions to indicate "no position"
const int PHSCALE_PITZER
Scale to be used for the output of single-ion activity coefficients is that used by Pitzer.
const int PHSCALE_NBS
Scale to be used for evaluation of single-ion activity coefficients is that used by the NBS standard ...
map< string, double > Composition
Map from string names to doubles.