This species thermo manager requires that all species have one of two parameterizations. More...
#include <SpeciesThermoMgr.h>
Public Member Functions | |
SpeciesThermoDuo () | |
Constructor. | |
virtual | ~SpeciesThermoDuo () |
Destructor. | |
SpeciesThermoDuo (const SpeciesThermoDuo &right) | |
copy constructor | |
SpeciesThermoDuo & | operator= (const SpeciesThermoDuo &right) |
Assignment operator. | |
virtual SpeciesThermo * | duplMyselfAsSpeciesThermo () const |
Duplication routine for objects which inherit from SpeciesThermo. | |
virtual void | install (std::string name, int sp, int type, const doublereal *c, doublereal minTemp, doublereal maxTemp, doublereal refPressure) |
install a new species thermodynamic property parameterization for one species. | |
virtual void | install_STIT (SpeciesThermoInterpType *stit_ptr) |
Install a new species thermodynamic property parameterization for one species. | |
virtual void | update (doublereal t, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const |
Compute the reference-state properties for all species. | |
virtual doublereal | minTemp (int k=-1) const |
Minimum temperature. | |
virtual doublereal | maxTemp (int k=-1) const |
Maximum temperature. | |
virtual doublereal | refPressure (int k=-1) const |
The reference-state pressure for species k. | |
virtual int | reportType (int k) const |
This utility function reports the type of parameterization used for the species with index number index. | |
virtual void | reportParams (int index, int &type, doublereal *const c, doublereal &minTemp, doublereal &maxTemp, doublereal &refPressure) const |
virtual void | modifyParams (int index, doublereal *c) |
Modify parameters for the standard state. | |
virtual void | update_one (int k, doublereal T, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const |
Like update(), but only updates the single species k. | |
Private Attributes | |
T1 | m_thermo1 |
Thermo Type 1. | |
T2 | m_thermo2 |
Thermo Type 2. | |
doublereal | m_p0 |
Reference pressure. | |
std::map< int, int > | speciesToType |
map from species to type |
This species thermo manager requires that all species have one of two parameterizations.
Note this seems to be a slow way to do things, and it may be on its way out.
Definition at line 159 of file SpeciesThermoMgr.h.
SpeciesThermoDuo | ( | ) | [inline] |
Constructor.
Definition at line 519 of file SpeciesThermoMgr.h.
~SpeciesThermoDuo | ( | ) | [inline, virtual] |
Destructor.
Definition at line 524 of file SpeciesThermoMgr.h.
SpeciesThermoDuo | ( | const SpeciesThermoDuo< T1, T2 > & | right | ) | [inline] |
copy constructor
right | Object to be copied |
Definition at line 529 of file SpeciesThermoMgr.h.
References SpeciesThermoDuo< T1, T2 >::operator=().
SpeciesThermo * duplMyselfAsSpeciesThermo | ( | ) | const [inline, virtual] |
Duplication routine for objects which inherit from SpeciesThermo.
This virtual routine can be used to duplicate SpeciesThermo objects inherited from SpeciesThermo even if the application only has a pointer to SpeciesThermo to work with. ->commented out because we first need to add copy constructors and assignment operators to all of the derived classes.
Implements SpeciesThermo.
Definition at line 548 of file SpeciesThermoMgr.h.
void install | ( | std::string | name, | |
int | sp, | |||
int | type, | |||
const doublereal * | c, | |||
doublereal | minTemp, | |||
doublereal | maxTemp, | |||
doublereal | refPressure | |||
) | [inline, virtual] |
install a new species thermodynamic property parameterization for one species.
name | Name of the species | |
sp | The 'update' method will update the property values for this species at position i index in the property arrays. | |
type | int flag specifying the type of parameterization to be installed. | |
c | vector of coefficients for the parameterization. This vector is simply passed through to the parameterization constructor. | |
minTemp | minimum temperature for which this parameterization is valid. | |
maxTemp | maximum temperature for which this parameterization is valid. | |
refPressure | standard-state pressure for this parameterization. |
Implements SpeciesThermo.
Definition at line 555 of file SpeciesThermoMgr.h.
References SpeciesThermoDuo< T1, T2 >::m_p0, SpeciesThermoDuo< T1, T2 >::m_thermo1, SpeciesThermoDuo< T1, T2 >::m_thermo2, and SpeciesThermoDuo< T1, T2 >::speciesToType.
void install_STIT | ( | SpeciesThermoInterpType * | stit_ptr | ) | [inline, virtual] |
Install a new species thermodynamic property parameterization for one species.
stit_ptr | Pointer to the SpeciesThermoInterpType object This will set up the thermo for one species |
Implements SpeciesThermo.
Definition at line 576 of file SpeciesThermoMgr.h.
doublereal maxTemp | ( | int | k = -1 |
) | const [inline, virtual] |
Maximum temperature.
If no argument is supplied, this method returns the maximum temperature for which all parameterizations are valid. If an integer index k is supplied, then the value returned is the maximum temperature for parameterization k.
k | index for parameterization k |
Implements SpeciesThermo.
Definition at line 598 of file SpeciesThermoMgr.h.
References SpeciesThermoDuo< T1, T2 >::m_thermo1, and SpeciesThermoDuo< T1, T2 >::m_thermo2.
doublereal minTemp | ( | int | k = -1 |
) | const [inline, virtual] |
Minimum temperature.
If no argument is supplied, this method returns the minimum temperature for which all parameterizations are valid. If an integer index k is supplied, then the value returned is the minimum temperature for species k in the phase.
k | Species index |
Implements SpeciesThermo.
Definition at line 590 of file SpeciesThermoMgr.h.
References SpeciesThermoDuo< T1, T2 >::m_thermo1, and SpeciesThermoDuo< T1, T2 >::m_thermo2.
void modifyParams | ( | int | index, | |
doublereal * | c | |||
) | [inline, virtual] |
Modify parameters for the standard state.
index | Species index | |
c | Vector of coefficients used to set the parameters for the standard state. |
Implements SpeciesThermo.
Definition at line 642 of file SpeciesThermoMgr.h.
References SpeciesThermoDuo< T1, T2 >::m_thermo1, SpeciesThermoDuo< T1, T2 >::m_thermo2, and SpeciesThermoDuo< T1, T2 >::reportType().
SpeciesThermoDuo< T1, T2 > & operator= | ( | const SpeciesThermoDuo< T1, T2 > & | right | ) | [inline] |
Assignment operator.
right | Object to be copied |
Definition at line 535 of file SpeciesThermoMgr.h.
References SpeciesThermoDuo< T1, T2 >::m_p0, SpeciesThermoDuo< T1, T2 >::m_thermo1, SpeciesThermoDuo< T1, T2 >::m_thermo2, and SpeciesThermoDuo< T1, T2 >::speciesToType.
Referenced by SpeciesThermoDuo< T1, T2 >::SpeciesThermoDuo().
doublereal refPressure | ( | int | k = -1 |
) | const [inline, virtual] |
The reference-state pressure for species k.
returns the reference state pressure in Pascals for species k. If k is left out of the argument list, it returns the reference state pressure for the first species. Note that some SpeciesThermo implementations, such as those for ideal gases, require that all species in the same phase have the same reference state pressures.
k | index for parameterization k |
Implements SpeciesThermo.
Definition at line 606 of file SpeciesThermoMgr.h.
References SpeciesThermoDuo< T1, T2 >::m_p0.
void reportParams | ( | int | index, | |
int & | type, | |||
doublereal *const | c, | |||
doublereal & | minTemp, | |||
doublereal & | maxTemp, | |||
doublereal & | refPressure | |||
) | const [inline, virtual] |
This utility function reports back the type of parameterization and all of the parameters for the species, index.
index | Species index | |
type | Integer type of the standard type | |
c | Vector of coefficients used to set the parameters for the standard state. | |
minTemp | output - Minimum temperature | |
maxTemp | output - Maximum temperature | |
refPressure | output - reference pressure (Pa). |
Implements SpeciesThermo.
Definition at line 623 of file SpeciesThermoMgr.h.
References SpeciesThermoDuo< T1, T2 >::m_thermo1, SpeciesThermoDuo< T1, T2 >::m_thermo2, and SpeciesThermoDuo< T1, T2 >::reportType().
int reportType | ( | int | k | ) | const [inline, virtual] |
This utility function reports the type of parameterization used for the species with index number index.
k | Species index |
Implements SpeciesThermo.
Definition at line 612 of file SpeciesThermoMgr.h.
References SpeciesThermoDuo< T1, T2 >::speciesToType.
Referenced by SpeciesThermoDuo< T1, T2 >::modifyParams(), and SpeciesThermoDuo< T1, T2 >::reportParams().
void update | ( | doublereal | t, | |
doublereal * | cp_R, | |||
doublereal * | h_RT, | |||
doublereal * | s_R | |||
) | const [inline, virtual] |
Compute the reference-state properties for all species.
Given temperature T in K, this method updates the values of the non-dimensional heat capacity at constant pressure, enthalpy, and entropy, at the reference pressure, Pref of each of the standard states.
t | Temperature (Kelvin) | |
cp_R | Vector of Dimensionless heat capacities. (length m_kk). | |
h_RT | Vector of Dimensionless enthalpies. (length m_kk). | |
s_R | Vector of Dimensionless entropies. (length m_kk). |
Implements SpeciesThermo.
Definition at line 582 of file SpeciesThermoMgr.h.
References SpeciesThermoDuo< T1, T2 >::m_thermo1, and SpeciesThermoDuo< T1, T2 >::m_thermo2.
virtual void update_one | ( | int | k, | |
doublereal | T, | |||
doublereal * | cp_R, | |||
doublereal * | h_RT, | |||
doublereal * | s_R | |||
) | const [inline, virtual, inherited] |
Like update(), but only updates the single species k.
The default treatment is to just call update() which means that potentially the operation takes a m_kk*m_kk hit.
k | species index | |
T | Temperature (Kelvin) | |
cp_R | Vector of Dimensionless heat capacities. (length m_kk). | |
h_RT | Vector of Dimensionless enthalpies. (length m_kk). | |
s_R | Vector of Dimensionless entropies. (length m_kk). |
Reimplemented in GeneralSpeciesThermo, NasaThermo, ShomateThermo, and SimpleThermo.
Definition at line 291 of file SpeciesThermo.h.
References SpeciesThermo::update().
Referenced by PDSS_SSVol::setTemperature(), PDSS_IdealGas::setTemperature(), and PDSS_ConstVol::setTemperature().
doublereal m_p0 [private] |
Reference pressure.
Definition at line 338 of file SpeciesThermoMgr.h.
Referenced by SpeciesThermoDuo< T1, T2 >::install(), SpeciesThermoDuo< T1, T2 >::operator=(), and SpeciesThermoDuo< T1, T2 >::refPressure().
T1 m_thermo1 [private] |
Thermo Type 1.
Definition at line 334 of file SpeciesThermoMgr.h.
Referenced by SpeciesThermoDuo< T1, T2 >::install(), SpeciesThermoDuo< T1, T2 >::maxTemp(), SpeciesThermoDuo< T1, T2 >::minTemp(), SpeciesThermoDuo< T1, T2 >::modifyParams(), SpeciesThermoDuo< T1, T2 >::operator=(), SpeciesThermoDuo< T1, T2 >::reportParams(), and SpeciesThermoDuo< T1, T2 >::update().
T2 m_thermo2 [private] |
Thermo Type 2.
Definition at line 336 of file SpeciesThermoMgr.h.
Referenced by SpeciesThermoDuo< T1, T2 >::install(), SpeciesThermoDuo< T1, T2 >::maxTemp(), SpeciesThermoDuo< T1, T2 >::minTemp(), SpeciesThermoDuo< T1, T2 >::modifyParams(), SpeciesThermoDuo< T1, T2 >::operator=(), SpeciesThermoDuo< T1, T2 >::reportParams(), and SpeciesThermoDuo< T1, T2 >::update().
std::map<int, int> speciesToType [private] |
map from species to type
Definition at line 340 of file SpeciesThermoMgr.h.
Referenced by SpeciesThermoDuo< T1, T2 >::install(), SpeciesThermoDuo< T1, T2 >::operator=(), and SpeciesThermoDuo< T1, T2 >::reportType().