15 #ifndef CT_REDLICHKWONGMFTP_H
16 #define CT_REDLICHKWONGMFTP_H
124 virtual doublereal
cp_mole()
const;
127 virtual doublereal
cv_mole()
const;
143 virtual doublereal
pressure()
const;
522 virtual doublereal
sresid()
const;
531 virtual doublereal
hresid()
const;
546 virtual doublereal
liquidVolEst(doublereal TKelvin, doublereal& pres)
const;
573 virtual doublereal
densityCalc(doublereal TKelvin, doublereal pressure,
int phase, doublereal rhoguess);
598 virtual doublereal
pressureCalc(doublereal TKelvin, doublereal molarVol)
const;
611 virtual doublereal
dpdVCalc(doublereal TKelvin, doublereal molarVol, doublereal& presCalc)
const;
619 virtual void updateMixingExpressions();
638 void calculateAB(doublereal temp, doublereal& aCalc, doublereal& bCalc)
const;
642 doublereal da_dt()
const;
644 void calcCriticalConditions(doublereal a, doublereal b, doublereal a0_coeff, doublereal aT_coeff,
645 doublereal& pc, doublereal& tc, doublereal& vc)
const;
657 int NicholsSolve(
double TKelvin,
double pres, doublereal a, doublereal b,
658 doublereal Vroot[3])
const;
698 doublereal Vroot_[3];
int NicholsSolve(double TKelvin, double pres, doublereal a, doublereal b, doublereal Vroot[3]) const
Solve the cubic equation of state.
RedlichKwongMFTP & operator=(const RedlichKwongMFTP &right)
Assignment operator.
This class can handle either an ideal solution or an ideal gas approximation of a phase...
doublereal m_b_current
Value of b in the equation of state.
doublereal dpdV_
The derivative of the pressure wrt the volume.
virtual doublereal isothermalCompressibility() const
Returns the isothermal compressibility. Units: 1/Pa.
virtual void getPartialMolarIntEnergies(doublereal *ubar) const
Get the species partial molar enthalpies. Units: J/kmol.
virtual doublereal pressure() const
Return the thermodynamic pressure (Pa).
vector_fp m_tmpV
Temporary storage - length = m_kk.
virtual doublereal entropy_mole() const
Molar entropy. Units: J/kmol/K.
RedlichKwongMFTP()
Base constructor.
virtual doublereal densityCalc(doublereal TKelvin, doublereal pressure, int phase, doublereal rhoguess)
Calculates the density given the temperature and the pressure and a guess at the density.
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...
virtual ThermoPhase * duplMyselfAsThermoPhase() const
Duplicator from the ThermoPhase parent class.
virtual doublereal enthalpy_mole() const
Molar enthalpy. Units: J/kmol.
void readXMLPureFluid(XML_Node &pureFluidParam)
Read the pure species RedlichKwong input parameters.
virtual void getPartialMolarCp(doublereal *cpbar) const
Get the partial molar heat capacities Units: J/kmol/K.
virtual int eosType() const
Equation of state type flag.
virtual void setMassFractions(const doublereal *const y)
Set the mass fractions to the specified values, and then normalize them so that they sum to 1...
virtual void getPartialMolarVolumes(doublereal *vbar) const
Get the species partial molar volumes. Units: m^3/kmol.
virtual void initThermoXML(XML_Node &phaseNode, const std::string &id)
Initialize a ThermoPhase object, potentially reading activity coefficient information from an XML dat...
A class for 2D arrays stored in column-major (Fortran-compatible) form.
Base class for a phase with thermodynamic properties.
void setToEquilState(const doublereal *lambda_RT)
This method is used by the ChemEquil equilibrium solver.
int m_standardMixingRules
boolean indicating whether standard mixing rules are applied
static const doublereal omega_b
Omega constant for b.
virtual void setMoleFractions_NoNorm(const doublereal *const x)
Set the mole fractions to the specified values without normalizing.
int m_formTempParam
Form of the temperature parameterization.
virtual void initThermo()
Header file for a derived class of ThermoPhase that handles non-ideal mixtures based on the fugacity ...
doublereal dpdT_
The derivative of the pressure wrt the temperature.
doublereal m_a_current
Value of a in the equation of state.
virtual doublereal sresid() const
Calculate the deviation terms for the total entropy of the mixture from the ideal gas mixture...
void pressureDerivatives() const
Calculate dpdV and dpdT at the current conditions.
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 void getChemPotentials(doublereal *mu) const
Get the species chemical potentials. Units: J/kmol.
virtual doublereal logStandardConc(size_t k=0) const
Returns the natural logarithm of the standard concentration of the kth species.
vector_fp m_pp
Temporary storage - length = m_kk.
virtual void setParametersFromXML(const XML_Node &thermoNode)
Set equation of state parameter values from XML entries.
virtual doublereal dpdVCalc(doublereal TKelvin, doublereal molarVol, doublereal &presCalc) const
Calculate the pressure and the pressure derivative given the temperature and the molar volume...
virtual void setMassFractions_NoNorm(const doublereal *const y)
Set the mass fractions to the specified values without normalizing.
virtual doublereal standardConcentration(size_t k=0) const
Returns the standard concentration , which is used to normalize the generalized concentration.
virtual void setConcentrations(const doublereal *const c)
Set the concentrations to the specified values within the phase.
virtual doublereal cp_mole() const
Molar heat capacity at constant pressure. Units: J/kmol/K.
virtual void setTemperature(const doublereal temp)
Set the temperature (K)
virtual doublereal hresid() const
Calculate the deviation terms for the total enthalpy of the mixture from the ideal gas mixture...
virtual doublereal critDensity() const
Critical density (kg/m3).
void readXMLCrossFluid(XML_Node &pureFluidParam)
Read the cross species RedlichKwong input parameters.
virtual doublereal liquidVolEst(doublereal TKelvin, doublereal &pres) const
Estimate for the molar volume of the liquid.
virtual void calcDensity()
Calculate the density of the mixture using the partial molar volumes and mole fractions as input...
static const doublereal omega_a
Omega constant for a -> value of a in terms of critical properties.
virtual void getActivityConcentrations(doublereal *c) const
This method returns an array of generalized concentrations.
virtual doublereal intEnergy_mole() const
Molar internal energy. Units: J/kmol.
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 critPressure() const
Critical pressure (Pa).
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
void calculateAB(doublereal temp, doublereal &aCalc, doublereal &bCalc) const
Calculate the a and the b parameters given the temperature.
virtual doublereal gibbs_mole() const
Molar Gibbs function. Units: J/kmol.
virtual void getPartialMolarEnthalpies(doublereal *hbar) const
Get the species partial molar enthalpies. Units: J/kmol.
static const doublereal omega_vc
Omega constant for the critical molar volume.
virtual doublereal densSpinodalLiquid() const
Return the value of the density at the liquid spinodal point (on the liquid side) for the current tem...
virtual doublereal cv_mole() const
Molar heat capacity at constant volume. Units: J/kmol/K.
virtual void getUnitsStandardConc(double *uA, int k=0, int sizeUA=6) const
Returns the units of the standard and generalized concentrations.
void applyStandardMixingRules()
Apply mixing rules for a coefficients.
virtual doublereal pressureCalc(doublereal TKelvin, doublereal molarVol) const
Calculate the pressure given the temperature and the molar volume.
void getChemPotentials_RT(doublereal *mu) const
Get the array of non-dimensional species chemical potentials.
virtual doublereal critTemperature() const
Critical temperature (K).
virtual void getPartialMolarEntropies(doublereal *sbar) const
Get the species partial molar entropies. Units: J/kmol/K.
vector_fp dpdni_
Vector of derivatives of pressure wrt mole number.
void updateAB()
Update the a and b parameters.
virtual void getActivityCoefficients(doublereal *ac) const
Get the array of non-dimensional activity coefficients at the current solution temperature, pressure, and solution concentration.