11 #ifndef CT_MIXTUREFUGACITYTP_H 12 #define CT_MIXTUREFUGACITYTP_H 22 #define FLUID_UNSTABLE -4 23 #define FLUID_UNDEFINED -3 24 #define FLUID_SUPERCRIT -2 26 #define FLUID_LIQUID_0 0 27 #define FLUID_LIQUID_1 1 28 #define FLUID_LIQUID_2 2 29 #define FLUID_LIQUID_3 3 30 #define FLUID_LIQUID_4 4 31 #define FLUID_LIQUID_5 5 32 #define FLUID_LIQUID_6 6 33 #define FLUID_LIQUID_7 7 34 #define FLUID_LIQUID_8 8 35 #define FLUID_LIQUID_9 9 87 virtual std::string
type()
const {
88 return "MixtureFugacity";
239 virtual void getCp_R(doublereal* cpr)
const;
297 virtual void setState_TP(doublereal T, doublereal pres);
298 virtual void setState_TR(doublereal T, doublereal rho);
299 virtual void setState_TPX(doublereal t, doublereal p,
const doublereal* x);
303 void setMoleFractions_NoState(
const doublereal*
const x);
363 virtual bool addSpecies(shared_ptr<Species> spec);
378 doublereal
z()
const;
387 virtual doublereal
sresid()
const;
396 virtual doublereal
hresid()
const;
406 virtual doublereal
psatEst(doublereal TKelvin)
const;
423 virtual doublereal
liquidVolEst(doublereal TKelvin, doublereal& pres)
const;
449 virtual doublereal
densityCalc(doublereal TKelvin, doublereal
pressure,
int phaseRequested,
450 doublereal rhoguess);
462 int corr0(doublereal TKelvin, doublereal pres, doublereal& densLiq,
463 doublereal& densGas, doublereal& liqGRT, doublereal& gasGRT);
476 int phaseState(
bool checkState =
false)
const;
501 doublereal
calculatePsat(doublereal TKelvin, doublereal& molarVolGas,
502 doublereal& molarVolLiquid);
511 virtual doublereal
satPressure(doublereal TKelvin);
520 virtual doublereal
pressureCalc(doublereal TKelvin, doublereal molarVol)
const;
532 virtual doublereal
dpdVCalc(doublereal TKelvin, doublereal molarVol, doublereal& presCalc)
const;
534 virtual void updateMixingExpressions();
virtual int forcedSolutionBranch() const
Report the solution branch which the solution is restricted to.
virtual doublereal satPressure(doublereal TKelvin)
Calculate the saturation pressure at the current mixture content for the given temperature.
virtual void calcDensity()
Calculate the density of the mixture using the partial molar volumes and mole fractions as input...
virtual void setState_TPX(doublereal t, doublereal p, const doublereal *x)
Set the temperature (K), pressure (Pa), and mole fractions.
virtual void getEnthalpy_RT_ref(doublereal *hrt) const
virtual doublereal sresid() const
Calculate the deviation terms for the total entropy of the mixture from the ideal gas mixture...
virtual doublereal densityCalc(doublereal TKelvin, doublereal pressure, int phaseRequested, doublereal rhoguess)
Calculates the density given the temperature and the pressure and a guess at the density.
virtual int standardStateConvention() const
This method returns the convention used in specification of the standard state, of which there are cu...
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 std::string type() const
String indicating the thermodynamic model implemented.
virtual doublereal hresid() const
Calculate the deviation terms for the total enthalpy of the mixture from the ideal gas mixture...
An error indicating that an unimplemented function has been called.
virtual void getChemPotentials_RT(doublereal *mu) const
Get the array of non-dimensional species chemical potentials These are partial molar Gibbs free energ...
virtual doublereal psatEst(doublereal TKelvin) const
Estimate for the saturation pressure.
virtual doublereal dpdVCalc(doublereal TKelvin, doublereal molarVol, doublereal &presCalc) const
Calculate the pressure and the pressure derivative given the temperature and the molar volume...
doublereal z() const
Calculate the value of z.
int forcedState_
Force the system to be on a particular side of the spinodal curve.
vector_fp m_g0_RT
Temporary storage for dimensionless reference state Gibbs energies.
Class XML_Node is a tree-based representation of the contents of an XML file.
This is a filter class for ThermoPhase that implements some preparatory steps for efficiently handlin...
doublereal calculatePsat(doublereal TKelvin, doublereal &molarVolGas, doublereal &molarVolLiquid)
Calculate the saturation pressure at the current mixture content for the given temperature.
MixtureFugacityTP()
Constructor.
virtual void getPureGibbs(doublereal *gpure) const
Get the pure Gibbs free energies of each species.
virtual int reportSolnBranchActual() const
Report the solution branch which the solution is actually on.
Base class for a phase with thermodynamic properties.
virtual bool addSpecies(shared_ptr< Species > spec)
virtual void invalidateCache()
Invalidate any cached values which are normally updated only when a change in state is detected...
vector_fp m_s0_R
Temporary storage for dimensionless reference state entropies.
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...
virtual void setTemperature(const doublereal temp)
Set the temperature of the phase.
virtual void getCp_R_ref(doublereal *cprt) const
Returns the vector of nondimensional constant pressure heat capacities of the reference state at the ...
virtual void _updateReferenceStateThermo() const
Updates the reference state thermodynamic functions at the current T of the solution.
virtual doublereal densSpinodalLiquid() const
Return the value of the density at the liquid spinodal point (on the liquid side) for the current tem...
virtual void setForcedSolutionBranch(int solnBranch)
Set the solution branch to force the ThermoPhase to exist on one branch or another.
virtual void getStandardChemPotentials(doublereal *mu) const
Get the array of chemical potentials at unit activity.
virtual void setPressure(doublereal p)
Set the internally stored pressure (Pa) at constant temperature and composition.
virtual doublereal pressure() const
Return the thermodynamic pressure (Pa).
virtual doublereal densSpinodalGas() const
Return the value of the density at the gas spinodal point (on the gas side) for the current temperatu...
virtual doublereal pressureCalc(doublereal TKelvin, doublereal molarVol) const
Calculate the pressure given the temperature and the molar volume.
int iState_
Current state of the fluid.
virtual void getEntropy_R_ref(doublereal *er) const
Returns the vector of nondimensional entropies of the reference state at the current temperature of t...
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
doublereal m_Tlast_ref
The last temperature at which the reference state thermodynamic properties were calculated at...
virtual void compositionChanged()
Apply changes to the state which are needed after the composition changes.
int phaseState(bool checkState=false) const
Returns the Phase State flag for the current state of the object.
int corr0(doublereal TKelvin, doublereal pres, doublereal &densLiq, doublereal &densGas, doublereal &liqGRT, doublereal &gasGRT)
Utility routine in the calculation of the saturation pressure.
const vector_fp & gibbs_RT_ref() const
Returns the vector of nondimensional Gibbs free energies of the reference state at the current temper...
vector_fp moleFractions_
Storage for the current values of the mole fractions of the species.
virtual void getEnthalpy_RT(doublereal *hrt) const
Get the nondimensional Enthalpy functions for the species at their standard states at the current T a...
virtual void getStandardVolumes(doublereal *vol) const
Get the molar volumes of each species in their standard states at the current T and P of the solution...
virtual void setState_TP(doublereal T, doublereal pres)
Set the temperature (K) and pressure (Pa)
virtual void getStandardVolumes_ref(doublereal *vol) const
Get the molar volumes of the species reference states at the current T and P_ref of the solution...
virtual void getGibbs_RT(doublereal *grt) const
Get the nondimensional Gibbs functions for the species at their standard states of solution at the cu...
virtual void getdlnActCoeffdlnN_diag(doublereal *dlnActCoeffdlnN_diag) const
Get the array of log species mole number derivatives of the log activity coefficients.
virtual void getCp_R(doublereal *cpr) const
Get the nondimensional Heat Capacities at constant pressure for the standard state of the species at ...
Namespace for the Cantera kernel.
Header file for class ThermoPhase, the base class for phases with thermodynamic properties, and the text for the Module thermoprops (see Thermodynamic Properties and class ThermoPhase).
virtual void getIntEnergy_RT(doublereal *urt) const
Returns the vector of nondimensional internal Energies of the standard state at the current temperatu...
vector_fp m_h0_RT
Temporary storage for dimensionless reference state enthalpies.
virtual void getEntropy_R(doublereal *sr) const
Get the array of nondimensional Enthalpy functions for the standard state species at the current T an...
vector_fp m_cp0_R
Temporary storage for dimensionless reference state heat capacities.
virtual void setStateFromXML(const XML_Node &state)
Set the initial state of the phase to the conditions specified in the state XML element.
virtual doublereal liquidVolEst(doublereal TKelvin, doublereal &pres) const
Estimate for the molar volume of the liquid.