6 #ifndef CT_REDLICHKWONGMFTP_H 7 #define CT_REDLICHKWONGMFTP_H 55 virtual std::string
type()
const {
56 return "RedlichKwong";
64 virtual doublereal
cp_mole()
const;
65 virtual doublereal
cv_mole()
const;
184 virtual bool addSpecies(shared_ptr<Species> spec);
221 const std::string& species_j,
double a0,
double a1);
240 virtual doublereal
sresid()
const;
241 virtual doublereal
hresid()
const;
244 virtual doublereal
liquidVolEst(doublereal TKelvin, doublereal& pres)
const;
245 virtual doublereal
densityCalc(doublereal TKelvin, doublereal
pressure,
int phase, doublereal rhoguess);
249 virtual doublereal
pressureCalc(doublereal TKelvin, doublereal molarVol)
const;
250 virtual doublereal
dpdVCalc(doublereal TKelvin, doublereal molarVol, doublereal& presCalc)
const;
258 virtual void updateMixingExpressions();
277 void calculateAB(doublereal temp, doublereal& aCalc, doublereal& bCalc)
const;
281 doublereal da_dt()
const;
283 void calcCriticalConditions(doublereal a, doublereal b, doublereal a0_coeff, doublereal aT_coeff,
284 doublereal& pc, doublereal& tc, doublereal& vc)
const;
296 int NicholsSolve(
double TKelvin,
double pres, doublereal a, doublereal b,
297 doublereal Vroot[3])
const;
326 doublereal Vroot_[3];
void setSpeciesCoeffs(const std::string &species, double a0, double a1, double b)
Set the pure fluid interaction parameters for a species.
virtual doublereal dpdVCalc(doublereal TKelvin, doublereal molarVol, doublereal &presCalc) const
Calculate the pressure and the pressure derivative given the temperature and the molar volume...
Implementation of a multi-species Redlich-Kwong equation of state.
doublereal m_b_current
Value of b in the equation of state.
doublereal dpdV_
The derivative of the pressure wrt the volume.
virtual void getPartialMolarIntEnergies(doublereal *ubar) const
Return an array of partial molar internal energies for the species in the mixture.
vector_fp m_tmpV
Temporary storage - length = m_kk.
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 compositionChanged()
Apply changes to the state which are needed after the composition changes.
void pressureDerivatives() const
Calculate dpdV and dpdT at the current conditions.
virtual doublereal hresid() const
Calculate the deviation terms for the total enthalpy of the mixture from the ideal gas mixture...
RedlichKwongMFTP()
Base constructor.
virtual doublereal critVolume() const
Critical volume (m3/kmol).
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 void getActivityCoefficients(doublereal *ac) const
Get the array of non-dimensional activity coefficients at the current solution temperature, pressure, and solution concentration.
void readXMLPureFluid(XML_Node &pureFluidParam)
Read the pure species RedlichKwong input parameters.
virtual doublereal cp_mole() const
Molar heat capacity at constant pressure. Units: J/kmol/K.
virtual void getPartialMolarVolumes(doublereal *vbar) const
Return an array of partial molar volumes for the species in the mixture.
int NicholsSolve(double TKelvin, double pres, doublereal a, doublereal b, doublereal Vroot[3]) const
Solve the cubic equation of state.
virtual doublereal sresid() const
Calculate the deviation terms for the total entropy of the mixture from the ideal gas mixture...
virtual doublereal critTemperature() const
Critical temperature (K).
virtual void initThermoXML(XML_Node &phaseNode, const std::string &id)
Import and initialize a ThermoPhase object using an XML tree.
A class for 2D arrays stored in column-major (Fortran-compatible) form.
virtual void setToEquilState(const doublereal *lambda_RT)
This method is used by the ChemEquil equilibrium solver.
Header file for class Cantera::Array2D.
virtual doublereal critDensity() const
Critical density (kg/m3).
virtual doublereal cv_mole() const
Molar heat capacity at constant volume. Units: J/kmol/K.
static const doublereal omega_b
Omega constant for b.
int m_formTempParam
Form of the temperature parameterization.
void calculateAB(doublereal temp, doublereal &aCalc, doublereal &bCalc) const
Calculate the a and the b parameters given the temperature.
virtual std::string type() const
String indicating the thermodynamic model implemented.
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.
shared_ptr< Species > species(const std::string &name) const
Return the Species object for the named 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 critPressure() const
Critical pressure (Pa).
void setBinaryCoeffs(const std::string &species_i, const std::string &species_j, double a0, double a1)
Set values for the interaction parameter between two species.
virtual doublereal liquidVolEst(doublereal TKelvin, doublereal &pres) const
Estimate for the molar volume of the liquid.
virtual void getChemPotentials_RT(doublereal *mu) const
Get the array of non-dimensional species chemical potentials.
virtual void setTemperature(const doublereal temp)
Set the temperature of the phase.
void readXMLCrossFluid(XML_Node &pureFluidParam)
Read the cross species RedlichKwong input parameters.
virtual void calcDensity()
Calculate the density of the mixture using the partial molar volumes and mole fractions as input...
virtual doublereal enthalpy_mole() const
Molar enthalpy. Units: J/kmol.
virtual doublereal critCompressibility() const
Critical compressibility (unitless).
static const doublereal omega_a
Omega constant for a -> value of a in terms of critical properties.
virtual doublereal standardConcentration(size_t k=0) const
Returns the standard concentration , which is used to normalize the generalized concentration.
virtual void getPartialMolarEntropies(doublereal *sbar) const
Returns an array of partial molar entropies of the species in the solution.
virtual doublereal pressureCalc(doublereal TKelvin, doublereal molarVol) const
Calculate the pressure given the temperature and the molar volume.
virtual doublereal pressure() const
Return the thermodynamic pressure (Pa).
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
virtual bool addSpecies(shared_ptr< Species > spec)
virtual doublereal densSpinodalGas() const
Return the value of the density at the gas spinodal point (on the gas side) for the current temperatu...
virtual void getChemPotentials(doublereal *mu) const
Get the species chemical potentials. Units: J/kmol.
static const doublereal omega_vc
Omega constant for the critical molar volume.
virtual void getPartialMolarEnthalpies(doublereal *hbar) const
Returns an array of partial molar enthalpies for the species in the mixture.
virtual doublereal entropy_mole() const
Molar entropy. Units: J/kmol/K.
Namespace for the Cantera kernel.
virtual void getPartialMolarCp(doublereal *cpbar) const
Return an array of partial molar heat capacities for the species in the mixture.
vector_fp dpdni_
Vector of derivatives of pressure wrt mole number.
void updateAB()
Update the a and b parameters.
virtual void getActivityConcentrations(doublereal *c) const
This method returns an array of generalized concentrations.