PengRobinson.h Source File#
PengRobinson.h
Go to the documentation of this file.
Header file for class Cantera::Array2D.
Header file for a derived class of ThermoPhase that handles non-ideal mixtures based on the fugacity ...
A map of string keys to values whose type can vary at runtime.
Definition AnyMap.h:427
A class for 2D arrays stored in column-major (Fortran-compatible) form.
Definition Array.h:32
This is a filter class for ThermoPhase that implements some preparatory steps for efficiently handlin...
Definition MixtureFugacityTP.h:66
Implementation of a multi-species Peng-Robinson equation of state.
Definition PengRobinson.h:20
double thermalExpansionCoeff() const override
Return the volumetric thermal expansion coefficient. Units: 1/K.
Definition PengRobinson.cpp:632
double densSpinodalLiquid() const override
Return the value of the density at the liquid spinodal point (on the liquid side) for the current tem...
Definition PengRobinson.cpp:574
void getPartialMolarEnthalpies(double *hbar) const override
Returns an array of partial molar enthalpies for the species in the mixture.
Definition PengRobinson.cpp:204
void getChemPotentials(double *mu) const override
Get the species chemical potentials. Units: J/kmol.
Definition PengRobinson.cpp:169
void setSpeciesCoeffs(const string &species, double a, double b, double w)
Set the pure fluid interaction parameters for a species.
Definition PengRobinson.cpp:29
double sresid() const override
Calculate the deviation terms for the total entropy of the mixture from the ideal gas mixture.
Definition PengRobinson.cpp:459
double soundSpeed() const override
Return the speed of sound. Units: m/s.
Definition PengRobinson.cpp:638
double pressure() const override
Return the thermodynamic pressure (Pa).
Definition PengRobinson.cpp:120
map< string, map< string, double > > m_binaryParameters
Explicitly-specified binary interaction parameters, to enable serialization.
Definition PengRobinson.h:272
void getSpeciesParameters(const string &name, AnyMap &speciesNode) const override
Get phase-specific parameters of a Species object such that an identical one could be reconstructed a...
Definition PengRobinson.cpp:423
static const double omega_b
Omega constant: b0 (= omega_b) used in Peng-Robinson equation of state.
Definition PengRobinson.h:320
void setBinaryCoeffs(const string &species_i, const string &species_j, double a)
Set values for the interaction parameter between two species.
Definition PengRobinson.cpp:74
vector< double > m_dpdni
Vector of derivatives of pressure with respect to mole number.
Definition PengRobinson.h:303
string type() const override
String indicating the thermodynamic model implemented.
Definition PengRobinson.h:33
void initThermo() override
Initialize the ThermoPhase object after all species have been set up.
Definition PengRobinson.cpp:338
double densSpinodalGas() const override
Return the value of the density at the gas spinodal point (on the gas side) for the current temperatu...
Definition PengRobinson.cpp:596
double m_dpdT
The derivative of the pressure with respect to the temperature.
Definition PengRobinson.h:296
void getPartialMolarVolumes(double *vbar) const override
Return an array of partial molar volumes for the species in the mixture.
Definition PengRobinson.cpp:281
double cv_mole() const override
Molar heat capacity at constant volume. Units: J/kmol/K.
Definition PengRobinson.cpp:112
double liquidVolEst(double T, double &pres) const override
Estimate for the molar volume of the liquid.
Definition PengRobinson.cpp:485
int solveCubic(double T, double pres, double a, double b, double aAlpha, double Vroot[3]) const
Prepare variables and call the function to solve the cubic equation of state.
Definition PengRobinson.cpp:763
void calculatePressureDerivatives() const
Calculate and at the current conditions.
Definition PengRobinson.cpp:644
double isothermalCompressibility() const override
Returns the isothermal compressibility. Units: 1/Pa.
Definition PengRobinson.cpp:626
double hresid() const override
Calculate the deviation terms for the total enthalpy of the mixture from the ideal gas mixture.
Definition PengRobinson.cpp:472
static const double omega_a
Omega constant: a0 (= omega_a) used in Peng-Robinson equation of state.
Definition PengRobinson.h:314
static const double omega_vc
Omega constant for the critical molar volume.
Definition PengRobinson.h:323
vector< CoeffSource > m_coeffSource
For each species, specifies the source of the a, b, and omega coefficients.
Definition PengRobinson.h:307
void calculateAB(double &aCalc, double &bCalc, double &aAlpha) const
Calculate the , , and parameters given the temperature.
Definition PengRobinson.cpp:676
void getPartialMolarIntEnergies(double *ubar) const override
Return an array of partial molar internal energies for the species in the mixture.
Definition PengRobinson.cpp:265
void updateMixingExpressions() override
Update the , , and parameters.
Definition PengRobinson.cpp:656
double cp_mole() const override
Molar heat capacity at constant pressure. Units: J/kmol/K.
Definition PengRobinson.cpp:98
void getPartialMolarCp(double *cpbar) const override
Calculate species-specific molar specific heats.
Definition PengRobinson.cpp:276
double standardConcentration(size_t k=0) const override
Returns the standard concentration , which is used to normalize the generalized concentration.
Definition PengRobinson.cpp:130
bool addSpecies(shared_ptr< Species > spec) override
Add a Species to this Phase.
Definition PengRobinson.cpp:318
double dpdVCalc(double T, double molarVol, double &presCalc) const override
Calculate the pressure and the pressure derivative given the temperature and the molar volume.
Definition PengRobinson.cpp:618
void getActivityCoefficients(double *ac) const override
Get the array of non-dimensional activity coefficients at the current solution temperature,...
Definition PengRobinson.cpp:136
double densityCalc(double T, double pressure, int phase, double rhoguess) override
Calculates the density given the temperature and the pressure and a guess at the density.
Definition PengRobinson.cpp:516
void getPartialMolarEntropies(double *sbar) const override
Returns an array of partial molar entropies of the species in the solution.
Definition PengRobinson.cpp:254
double m_dpdV
The derivative of the pressure with respect to the volume.
Definition PengRobinson.h:289
double speciesCritTemperature(double a, double b) const
Calculate species-specific critical temperature.
Definition PengRobinson.cpp:307
vector< double > m_acentric
acentric factor for each species, length m_kk
Definition PengRobinson.h:261
shared_ptr< Species > species(const string &name) const
Return the Species object for the named species.
Definition Phase.cpp:856
Generated by