Go to the documentation of this file.
6 #ifndef CT_REDLICHKWONGMFTP_H
7 #define CT_REDLICHKWONGMFTP_H
48 virtual std::string
type()
const {
49 return "RedlichKwong";
57 virtual doublereal
cp_mole()
const;
58 virtual doublereal
cv_mole()
const;
177 virtual bool addSpecies(shared_ptr<Species> spec);
194 virtual std::vector<double>
getCoeff(
const std::string& iName);
228 const std::string& species_j,
double a0,
double a1);
247 virtual doublereal
sresid()
const;
248 virtual doublereal
hresid()
const;
251 virtual doublereal
liquidVolEst(doublereal TKelvin, doublereal& pres)
const;
252 virtual doublereal
densityCalc(doublereal TKelvin, doublereal
pressure,
int phase, doublereal rhoguess);
256 virtual doublereal
pressureCalc(doublereal TKelvin, doublereal molarVol)
const;
257 virtual doublereal
dpdVCalc(doublereal TKelvin, doublereal molarVol, doublereal& presCalc)
const;
265 virtual void updateMixingExpressions();
284 void calculateAB(doublereal temp, doublereal& aCalc, doublereal& bCalc)
const;
288 doublereal da_dt()
const;
290 void calcCriticalConditions(doublereal a, doublereal b, doublereal a0_coeff, doublereal aT_coeff,
291 doublereal& pc, doublereal& tc, doublereal& vc)
const;
303 int NicholsSolve(
double TKelvin,
double pres, doublereal a, doublereal b,
304 doublereal Vroot[3])
const;
333 doublereal Vroot_[3];
void readXMLCrossFluid(XML_Node &pureFluidParam)
Read the cross species RedlichKwong input parameters.
doublereal m_a_current
Value of a in the equation of state.
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 critCompressibility() const
Critical compressibility (unitless).
virtual void initThermo()
Initialize the ThermoPhase object after all species have been set up.
virtual doublereal sresid() const
Calculate the deviation terms for the total entropy of the mixture from the ideal gas mixture.
A class for 2D arrays stored in column-major (Fortran-compatible) form.
doublereal dpdV_
The derivative of the pressure wrt the volume.
virtual doublereal pressureCalc(doublereal TKelvin, doublereal molarVol) const
Calculate the pressure given the temperature and the molar volume.
virtual doublereal critPressure() const
Critical pressure (Pa).
virtual void getPartialMolarEnthalpies(doublereal *hbar) const
Returns an array of partial molar enthalpies for the species in the mixture.
virtual void getPartialMolarVolumes(doublereal *vbar) const
Return an array of partial molar volumes for the species in the mixture.
virtual void getChemPotentials_RT(doublereal *mu) const
Get the array of non-dimensional species chemical potentials.
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.
virtual doublereal pressure() const
Return the thermodynamic pressure (Pa).
doublereal dpdT_
The derivative of the pressure wrt the temperature.
virtual doublereal critDensity() const
Critical density (kg/m3).
virtual void getActivityCoefficients(doublereal *ac) const
Get the array of non-dimensional activity coefficients at the current solution temperature,...
virtual void calcDensity()
Calculate the density of the mixture using the partial molar volumes and mole fractions as input.
static const doublereal omega_vc
Omega constant for the critical molar volume.
virtual std::string type() const
String indicating the thermodynamic model implemented.
static const doublereal omega_a
Omega constant for a -> value of a in terms of critical properties.
virtual void compositionChanged()
Apply changes to the state which are needed after the composition changes.
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
virtual doublereal critTemperature() const
Critical temperature (K).
virtual void getPartialMolarEntropies(doublereal *sbar) const
Returns an array of partial molar entropies of the species in the solution.
vector_fp dpdni_
Vector of derivatives of pressure wrt mole number.
doublereal m_b_current
Value of b in the equation of state.
virtual void setTemperature(const doublereal temp)
Set the temperature of the phase.
static const doublereal omega_b
Omega constant for b.
virtual doublereal enthalpy_mole() const
Molar enthalpy. Units: J/kmol.
virtual doublereal cp_mole() const
Molar heat capacity at constant pressure. Units: J/kmol/K.
void calculateAB(doublereal temp, doublereal &aCalc, doublereal &bCalc) const
Calculate the a and the b parameters given the temperature.
vector_fp m_tmpV
Temporary storage - length = m_kk.
vector_fp m_pp
Temporary storage - length = m_kk.
int NicholsSolve(double TKelvin, double pres, doublereal a, doublereal b, doublereal Vroot[3]) const
Solve the cubic equation of state.
virtual doublereal entropy_mole() const
Molar entropy. Units: J/kmol/K.
void updateAB()
Update the a and b parameters.
virtual void getPartialMolarCp(doublereal *cpbar) const
Return an array of partial molar heat capacities for the species in the mixture.
virtual void getChemPotentials(doublereal *mu) const
Get the species chemical potentials. Units: J/kmol.
Class XML_Node is a tree-based representation of the contents of an XML file.
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 doublereal densSpinodalGas() const
Return the value of the density at the gas spinodal point (on the gas side) for the current temperatu...
void pressureDerivatives() const
Calculate dpdV and dpdT at the current conditions.
virtual doublereal critVolume() const
Critical volume (m3/kmol).
virtual doublereal hresid() const
Calculate the deviation terms for the total enthalpy of the mixture from the ideal gas mixture.
virtual std::vector< double > getCoeff(const std::string &iName)
Retrieve a and b coefficients by looking up tabulated critical parameters.
virtual void getActivityConcentrations(doublereal *c) const
This method returns an array of generalized concentrations.
virtual void initThermoXML(XML_Node &phaseNode, const std::string &id)
Import and initialize a ThermoPhase object using an XML tree.
virtual void setParametersFromXML(const XML_Node &thermoNode)
Set equation of state parameter values from XML entries.
void readXMLPureFluid(XML_Node &pureFluidParam)
Read the pure species RedlichKwong input parameters.
void setSpeciesCoeffs(const std::string &species, double a0, double a1, double b)
Set the pure fluid interaction parameters for a species.
virtual doublereal standardConcentration(size_t k=0) const
Returns the standard concentration , which is used to normalize the generalized concentration.
virtual void getPartialMolarIntEnergies(doublereal *ubar) const
Return an array of partial molar internal energies for the species in the mixture.
shared_ptr< Species > species(const std::string &name) const
Return the Species object for the named species.
Namespace for the Cantera kernel.
virtual doublereal liquidVolEst(doublereal TKelvin, doublereal &pres) const
Estimate for the molar volume of the liquid.
virtual bool addSpecies(shared_ptr< Species > spec)
int m_formTempParam
Form of the temperature parameterization.
virtual doublereal cv_mole() const
Molar heat capacity at constant volume. Units: J/kmol/K.
virtual doublereal densSpinodalLiquid() const
Return the value of the density at the liquid spinodal point (on the liquid side) for the current tem...
Implementation of a multi-species Redlich-Kwong equation of state.