PureFluidPhase.cpp Source File#
PureFluidPhase.cpp
Go to the documentation of this file.
Header for a ThermoPhase class for a pure fluid phase consisting of gas, liquid, mixed-gas-liquid and...
A map of string keys to values whose type can vary at runtime.
Definition AnyMap.h:427
bool hasKey(const string &key) const
Returns true if the map contains an item named key.
Definition AnyMap.cpp:1423
virtual void update_single(size_t k, double T, double *cp_R, double *h_RT, double *s_R) const
Get reference-state properties for a single species.
Definition MultiSpeciesThermo.cpp:85
void setState_TD(double t, double rho)
Set the internally stored temperature (K) and density (kg/m^3)
Definition Phase.cpp:377
virtual void setDensity(const double density_)
Set the internally stored density (kg/m^3) of the phase.
Definition Phase.cpp:586
virtual void setTemperature(double temp)
Set the internally stored temperature of the phase (K).
Definition Phase.h:623
void setMolecularWeight(const int k, const double mw)
Set the molecular weight of a single species to a given value.
Definition Phase.cpp:895
void Set(tpx::PropertyPair::type n, double x, double y) const
Main call to the tpx level to set the state of the system.
Definition PureFluidPhase.cpp:144
double thermalExpansionCoeff() const override
Return the volumetric thermal expansion coefficient. Units: 1/K.
Definition PureFluidPhase.cpp:154
void getPartialMolarEnthalpies(double *hbar) const override
Returns an array of partial molar enthalpies for the species in the mixture.
Definition PureFluidPhase.cpp:164
double pressure() const override
Return the thermodynamic pressure (Pa).
Definition PureFluidPhase.cpp:121
vector< string > partialStates() const override
Return a vector of settable partial property sets within a phase.
Definition PureFluidPhase.cpp:63
void getEntropy_R(double *sr) const override
Get the array of nondimensional Entropy functions for the standard state species at the current T and...
Definition PureFluidPhase.cpp:219
void setState_SH(double s, double h, double tol=1e-9) override
Set the specific entropy (J/kg/K) and the specific enthalpy (J/kg)
Definition PureFluidPhase.cpp:355
void getGibbs_ref(double *g) const override
Returns the vector of the Gibbs function of the reference state at the current temperature of the sol...
Definition PureFluidPhase.cpp:252
void getStandardChemPotentials(double *mu) const override
Get the array of chemical potentials at unit activity for the species at their standard states at the...
Definition PureFluidPhase.cpp:209
void getActivities(double *a) const override
Get the array of non-dimensional activities at the current solution temperature, pressure,...
Definition PureFluidPhase.cpp:204
void getParameters(AnyMap &phaseNode) const override
Store the parameters of a ThermoPhase object such that an identical one could be reconstructed using ...
Definition PureFluidPhase.cpp:51
void initThermo() override
Initialize the ThermoPhase object after all species have been set up.
Definition PureFluidPhase.cpp:21
vector< string > fullStates() const override
Return a vector containing full states defining a phase.
Definition PureFluidPhase.cpp:57
void getActivityConcentrations(double *c) const override
This method returns an array of generalized concentrations.
Definition PureFluidPhase.cpp:194
void setState_HP(double h, double p, double tol=1e-9) override
Set the internally stored specific enthalpy (J/kg) and pressure (Pa) of the phase.
Definition PureFluidPhase.cpp:295
void setPressure(double p) override
sets the thermodynamic pressure (Pa).
Definition PureFluidPhase.cpp:126
unique_ptr< tpx::Substance > m_sub
Pointer to the underlying tpx object Substance that does the work.
Definition PureFluidPhase.h:206
void getPartialMolarVolumes(double *vbar) const override
Return an array of partial molar volumes for the species in the mixture.
Definition PureFluidPhase.cpp:184
void setState_PV(double p, double v, double tol=1e-9) override
Set the pressure (Pa) and specific volume (m^3/kg).
Definition PureFluidPhase.cpp:331
void setState_VH(double v, double h, double tol=1e-9) override
Set the specific volume (m^3/kg) and the specific enthalpy (J/kg)
Definition PureFluidPhase.cpp:343
double vaporFraction() const override
Return the fraction of vapor at the current conditions.
Definition PureFluidPhase.cpp:367
void setState_TH(double t, double h, double tol=1e-9) override
Set the temperature (K) and the specific enthalpy (J/kg)
Definition PureFluidPhase.cpp:349
double cv_mole() const override
Molar heat capacity at constant volume. Units: J/kmol/K.
Definition PureFluidPhase.cpp:116
void setTemperature(const double T) override
Set the internally stored temperature of the phase (K).
Definition PureFluidPhase.cpp:132
void setSubstance(const string &name)
Set the name of the TPX substance to use for the equation of state.
Definition PureFluidPhase.h:59
void getEnthalpy_RT(double *hrt) const override
Get the nondimensional Enthalpy functions for the species at their standard states at the current T a...
Definition PureFluidPhase.cpp:214
void getEntropy_R_ref(double *er) const override
Returns the vector of nondimensional entropies of the reference state at the current temperature of t...
Definition PureFluidPhase.cpp:258
double minTemp(size_t k=npos) const override
Minimum temperature for which the thermodynamic data for the species or phase are valid.
Definition PureFluidPhase.cpp:81
double isothermalCompressibility() const override
Returns the isothermal compressibility. Units: 1/Pa.
Definition PureFluidPhase.cpp:149
void getGibbs_RT(double *grt) const override
Get the nondimensional Gibbs functions for the species in their standard states at the current T and ...
Definition PureFluidPhase.cpp:224
double intEnergy_mole() const override
Molar internal energy. Units: J/kmol.
Definition PureFluidPhase.cpp:96
void setState_Tsat(double t, double x) override
Set the state to a saturated system at a particular temperature.
Definition PureFluidPhase.cpp:372
double entropy_mole() const override
Molar entropy. Units: J/kmol/K.
Definition PureFluidPhase.cpp:101
void getPartialMolarIntEnergies(double *ubar) const override
Return an array of partial molar internal energies for the species in the mixture.
Definition PureFluidPhase.cpp:174
double cp_mole() const override
Molar heat capacity at constant pressure. Units: J/kmol/K.
Definition PureFluidPhase.cpp:111
void setState_SV(double s, double v, double tol=1e-9) override
Set the specific entropy (J/kg/K) and specific volume (m^3/kg).
Definition PureFluidPhase.cpp:307
Units standardConcentrationUnits() const override
Returns the units of the "standard concentration" for this phase.
Definition PureFluidPhase.cpp:189
void getPartialMolarCp(double *cpbar) const override
Return an array of partial molar heat capacities for the species in the mixture.
Definition PureFluidPhase.cpp:179
double gibbs_mole() const override
Molar Gibbs function. Units: J/kmol.
Definition PureFluidPhase.cpp:106
double standardConcentration(size_t k=0) const override
Return the standard concentration for the kth species.
Definition PureFluidPhase.cpp:199
double satTemperature(double p) const override
Return the saturation temperature given the pressure.
Definition PureFluidPhase.cpp:285
tpx::Substance & TPX_Substance()
Returns a reference to the substance object.
Definition PureFluidPhase.cpp:159
void setState_TV(double t, double v, double tol=1e-9) override
Set the temperature (K) and specific volume (m^3/kg).
Definition PureFluidPhase.cpp:325
void setState_UV(double u, double v, double tol=1e-9) override
Set the specific internal energy (J/kg) and specific volume (m^3/kg).
Definition PureFluidPhase.cpp:301
void getGibbs_RT_ref(double *grt) const override
Returns the vector of nondimensional Gibbs Free Energies of the reference state at the current temper...
Definition PureFluidPhase.cpp:240
void setState_Psat(double p, double x) override
Set the state to a saturated system at a particular pressure.
Definition PureFluidPhase.cpp:379
void setState_UP(double u, double p, double tol=1e-9) override
Set the specific internal energy (J/kg) and pressure (Pa).
Definition PureFluidPhase.cpp:337
void setState_SP(double s, double p, double tol=1e-9) override
Set the specific entropy (J/kg/K) and pressure (Pa).
Definition PureFluidPhase.cpp:313
void setState_ST(double s, double t, double tol=1e-9) override
Set the specific entropy (J/kg/K) and temperature (K).
Definition PureFluidPhase.cpp:319
void getPartialMolarEntropies(double *sbar) const override
Returns an array of partial molar entropies of the species in the solution.
Definition PureFluidPhase.cpp:169
double maxTemp(size_t k=npos) const override
Maximum temperature for which the thermodynamic data for the species are valid.
Definition PureFluidPhase.cpp:86
string phaseOfMatter() const override
String indicating the mechanical phase of the matter in this Phase.
Definition PureFluidPhase.cpp:68
void getEnthalpy_RT_ref(double *hrt) const override
Returns the vector of nondimensional enthalpies of the reference state at the current temperature of ...
Definition PureFluidPhase.cpp:229
double satPressure(double t) override
Return the saturation pressure given the temperature.
Definition PureFluidPhase.cpp:361
void setDensity(const double rho) override
Set the internally stored density (kg/m^3) of the phase.
Definition PureFluidPhase.cpp:138
string report(bool show_thermo=true, double threshold=1e-14) const override
returns a summary of the state of the phase as a string
Definition PureFluidPhase.cpp:386
virtual void getParameters(AnyMap &phaseNode) const
Store the parameters of a ThermoPhase object such that an identical one could be reconstructed using ...
Definition ThermoPhase.cpp:1099
double RT() const
Return the Gas Constant multiplied by the current temperature.
Definition ThermoPhase.h:1062
double cp_mass() const
Specific heat at constant pressure. Units: J/kg/K.
Definition ThermoPhase.h:1048
MultiSpeciesThermo m_spthermo
Pointer to the calculation manager for species reference-state thermodynamic properties.
Definition ThermoPhase.h:1962
A representation of the units associated with a dimensional quantity.
Definition Units.h:35
void fmt_append(fmt::memory_buffer &b, Args... args)
Versions 6.2.0 and 6.2.1 of fmtlib do not include this define before they include windows....
Definition fmt.h:29
This file contains definitions for utility functions and text for modules, inputfiles and logging,...
void debuglog(const string &msg, int loglevel)
Write a message to the log only if loglevel > 0.
Definition global.h:158
Contains declarations for string manipulation functions within Cantera.
Generated by 1.9.7