11 #ifndef CT_LATTICESOLID_H
12 #define CT_LATTICESOLID_H
110 virtual std::string
type()
const {
111 return "LatticeSolid";
127 return { {
"T", 0}, {
"P", 1}, {
"X", 2} };
219 virtual doublereal
cp_mole()
const;
290 virtual doublereal moleFraction(
const int k)
const {
294 virtual void getMassFractions(doublereal*
const y)
const {
295 throw NotImplementedError(
"LatticeSolidPhase::getMassFractions");
298 virtual doublereal massFraction(
const int k)
const {
299 throw NotImplementedError(
"LatticeSolidPhase::massFraction");
310 virtual void getConcentrations(doublereal*
const c)
const {
314 virtual doublereal concentration(
int k)
const {
315 throw NotImplementedError(
"LatticeSolidPhase::concentration");
426 virtual bool addSpecies(shared_ptr<Species> spec);
429 void addLattice(shared_ptr<ThermoPhase> lattice);
474 std::vector<size_t> lkstart_;
Header file for class ThermoPhase, the base class for phases with thermodynamic properties,...
A map of string keys to values whose type can vary at runtime.
A phase that is comprised of a fixed additive combination of other lattice phases.
virtual void setConcentrations(const doublereal *const conc)
Set the concentrations to the specified values within the phase.
virtual void getMoleFractions(doublereal *const x) const
Get the species mole fraction vector.
virtual doublereal minTemp(size_t k=npos) const
Minimum temperature for which the thermodynamic data for the species or phase are valid.
doublereal m_molar_density
Current value of the molar density.
doublereal m_press
Current value of the pressure.
AnyMap m_rootNode
Root node of the AnyMap which contains this phase definition.
virtual bool addSpecies(shared_ptr< Species > spec)
virtual void setMassFractions(const doublereal *const y)
Set the mass fractions to the specified values and normalize them.
LatticeSolidPhase()
Base empty constructor.
virtual void getGibbs_RT_ref(doublereal *grt) const
Returns the vector of nondimensional Gibbs Free Energies of the reference state at the current temper...
virtual void setParameters(const AnyMap &phaseNode, const AnyMap &rootNode=AnyMap())
Set equation of state parameters from an AnyMap phase description.
virtual int standardStateConvention() const
This method returns the convention used in specification of the standard state, of which there are cu...
std::map< std::string, size_t > nativeState() const
Return a map of properties defining the native state of a substance.
virtual void getActivityCoefficients(doublereal *ac) const
Get the array of non-dimensional molar-based activity coefficients at the current solution temperatur...
vector_fp m_x
Vector of mole fractions.
std::vector< shared_ptr< ThermoPhase > > m_lattice
Vector of sublattic ThermoPhase objects.
virtual doublereal cp_mole() const
Return the constant pressure heat capacity. Units: J/kmol/K.
virtual void getPartialMolarEnthalpies(doublereal *hbar) const
Returns an array of partial molar enthalpies for the species in the mixture.
virtual void getPartialMolarEntropies(doublereal *sbar) const
Returns an array of partial molar entropies of the species in the solution.
virtual doublereal enthalpy_mole() const
Return the Molar Enthalpy. Units: J/kmol.
virtual doublereal logStandardConc(size_t k=0) const
Natural logarithm of the standard concentration of the kth species.
virtual void getPartialMolarVolumes(doublereal *vbar) const
returns an array of partial molar volumes of the species in the solution.
doublereal calcDensity()
Calculate the density of the solid mixture.
virtual void getActivityConcentrations(doublereal *c) const
This method returns an array of generalized concentrations.
virtual void setMassFractions_NoNorm(const doublereal *const y)
Set the mass fractions to the specified values without normalizing.
void setLatticeMoleFractionsByName(int n, const std::string &x)
Set the Lattice mole fractions using a string.
virtual void getPartialMolarCp(doublereal *cpbar) const
Returns an array of partial molar Heat Capacities at constant pressure of the species in the solution...
virtual void getStandardChemPotentials(doublereal *mu0) const
Get the array of standard state chemical potentials at unit activity for the species at their standar...
virtual std::string phaseOfMatter() const
String indicating the mechanical phase of the matter in this Phase.
virtual bool isCompressible() const
Return whether phase represents a compressible substance.
virtual doublereal cv_mole() const
Return the constant volume heat capacity. Units: J/kmol/K.
virtual void setPressure(doublereal p)
Set the pressure at constant temperature. Units: Pa.
virtual doublereal entropy_mole() const
Return the Molar Entropy. Units: J/kmol/K.
virtual void initThermo()
Initialize the ThermoPhase object after all species have been set up.
virtual void setMoleFractions(const doublereal *const x)
Set the mole fractions to the specified values, and then normalize them so that they sum to 1....
virtual doublereal refPressure() const
Returns the reference pressure in Pa.
virtual std::string type() const
String indicating the thermodynamic model implemented.
virtual void resetHf298(const size_t k=npos)
Restore the original heat of formation of one or more species.
vector_fp theta_
Lattice stoichiometric coefficients.
virtual doublereal gibbs_mole() const
Return the Molar Gibbs energy. Units: J/kmol.
virtual doublereal pressure() const
Report the Pressure. Units: Pa.
virtual Units standardConcentrationUnits() const
Returns the units of the "standard concentration" for this phase.
virtual void setParametersFromXML(const XML_Node &eosdata)
Set equation of state parameter values from XML entries.
void setLatticeStoichiometry(const compositionMap &comp)
Set the lattice stoichiometric coefficients, .
virtual void modifyOneHf298SS(const size_t k, const doublereal Hf298New)
Modify the value of the 298 K Heat of Formation of one species in the phase (J kmol-1)
void addLattice(shared_ptr< ThermoPhase > lattice)
Add a lattice to this phase.
void _updateThermo() const
Update the reference thermodynamic functions.
virtual void getChemPotentials(doublereal *mu) const
Get the species chemical potentials. Units: J/kmol.
virtual void getGibbs_ref(doublereal *g) const
Returns the vector of the Gibbs function of the reference state at the current temperature of the sol...
vector_fp tmpV_
Temporary vector.
virtual doublereal maxTemp(size_t k=npos) const
Maximum temperature for which the thermodynamic data for the species are valid.
virtual doublereal intEnergy_mole() const
Return the Molar Internal Energy. Units: J/kmol.
virtual doublereal standardConcentration(size_t k=0) const
Return the standard concentration for the kth species.
An error indicating that an unimplemented function has been called.
Base class for a phase with thermodynamic properties.
A representation of the units associated with a dimensional quantity.
Class XML_Node is a tree-based representation of the contents of an XML file.
const size_t npos
index returned by functions to indicate "no position"
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
std::map< std::string, double > compositionMap
Map connecting a string name with a double.
Namespace for the Cantera kernel.
const int cSS_CONVENTION_SLAVE
Standard state thermodynamics is obtained from slave ThermoPhase objects.