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