Cantera  2.3.0
Nasa9PolyMultiTempRegion.h
Go to the documentation of this file.
1 /**
2  * @file Nasa9PolyMultiTempRegion.h
3  * Header for a single-species standard state object derived
4  * from \link Cantera::SpeciesThermoInterpType
5  * SpeciesThermoInterpType\endlink based
6  * on the NASA 9 coefficient temperature polynomial form
7  * applied to multiple temperature regions
8  * (see \ref spthermo and class \link Cantera::Nasa9PolyMultiTempRegion Nasa9PolyMultiTempRegion\endlink).
9  *
10  * This parameterization has multiple NASA temperature regions.
11  */
12 
13 // This file is part of Cantera. See License.txt in the top-level directory or
14 // at http://www.cantera.org/license.txt for license and copyright information.
15 
16 #ifndef CT_NASA9POLYMULTITEMPREGION_H
17 #define CT_NASA9POLYMULTITEMPREGION_H
18 
20 
21 namespace Cantera
22 {
23 //! The NASA 9 polynomial parameterization for a single species encompassing
24 //! multiple temperature regions.
25 /*!
26  * The parameterization used in each temperature range is described in the
27  * documentation for class Nasa9Poly1.
28  *
29  * These NASA representations may have multiple temperature regions through the
30  * use of this Nasa9PolyMultiTempRegion object, which uses multiple copies of
31  * the Nasa9Poly1 object to handle multiple temperature regions.
32  *
33  * @ingroup spthermo
34  * @see Nasa9Poly1
35  */
37 {
38 public:
39  //! Empty constructor
40  //! @deprecated Default constructor to be removed after Cantera 2.3.
42 
43  //! Constructor used in templated instantiations
44  /*!
45  * @param regionPts Vector of pointers to Nasa9Poly1 objects. These objects
46  * all refer to the temperature regions for the same species. The vector
47  * must be in increasing temperature region format. Together they
48  * represent the reference temperature parameterization for a single
49  * species.
50  *
51  * Note, after the constructor, we will own the underlying Nasa9Poly1
52  * objects and be responsible for owning them.
53  */
54  Nasa9PolyMultiTempRegion(std::vector<Nasa9Poly1*> &regionPts);
55 
58  virtual ~Nasa9PolyMultiTempRegion();
59 
62 
63  virtual int reportType() const;
64 
65  virtual size_t temperaturePolySize() const { return 7; }
66  virtual void updateTemperaturePoly(double T, double* T_poly) const;
67 
68  //! @copydoc Nasa9Poly1::updateProperties
69  virtual void updateProperties(const doublereal* tt,
70  doublereal* cp_R, doublereal* h_RT,
71  doublereal* s_R) const;
72 
73  virtual void updatePropertiesTemp(const doublereal temp,
74  doublereal* cp_R, doublereal* h_RT,
75  doublereal* s_R) const;
76 
77  //! This utility function reports back the type of parameterization and all
78  //! of the parameters for the species, index.
79  /*!
80  * All parameters are output variables
81  *
82  * @param n Species index
83  * @param type Integer type of the standard type
84  * @param tlow output - Minimum temperature
85  * @param thigh output - Maximum temperature
86  * @param pref output - reference pressure (Pa).
87  * @param coeffs Vector of coefficients used to set the parameters for
88  * the standard state. There are 1 + 11*nzones coefficients.
89  * coeffs[0] is equal to nTempZones.
90  * index = 1
91  * for each zone:
92  * coeffs[index] = minTempZone
93  * coeffs[index+1] = maxTempZone
94  * coeffs[index+2+i] from i =0,9 are the coefficients themselves
95  */
96  virtual void reportParameters(size_t& n, int& type,
97  doublereal& tlow, doublereal& thigh,
98  doublereal& pref,
99  doublereal* const coeffs) const;
100 
101  //! @deprecated To be removed after Cantera 2.3. Use
102  //! MultiSpeciesThermo::modifySpecies instead.
103  virtual void modifyParameters(doublereal* coeffs);
104 
105 protected:
106  //! Lower boundaries of each temperature regions
108 
109  //! Individual temperature region objects
110  std::vector<std::unique_ptr<Nasa9Poly1>> m_regionPts;
111 
112  //! current region
113  mutable int m_currRegion;
114 };
115 
116 }
117 #endif
virtual void updatePropertiesTemp(const doublereal temp, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const
Compute the reference-state property of one species.
Abstract Base class for the thermodynamic manager for an individual species&#39; reference state...
Header for a single-species standard state object derived from SpeciesThermoInterpType based on the N...
virtual int reportType() const
Returns an integer representing the type of parameterization.
vector_fp m_lowerTempBounds
Lower boundaries of each temperature regions.
virtual SpeciesThermoInterpType * duplMyselfAsSpeciesThermoInterpType() const
virtual size_t temperaturePolySize() const
Number of terms in the temperature polynomial for this parameterization.
virtual void updateProperties(const doublereal *tt, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const
Update the properties for this species, given a temperature polynomial.
virtual void updateTemperaturePoly(double T, double *T_poly) const
Given the temperature T, compute the terms of the temperature polynomial T_poly.
virtual void reportParameters(size_t &n, int &type, doublereal &tlow, doublereal &thigh, doublereal &pref, doublereal *const coeffs) const
This utility function reports back the type of parameterization and all of the parameters for the spe...
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
Definition: ct_defs.h:157
Namespace for the Cantera kernel.
Definition: application.cpp:29
The NASA 9 polynomial parameterization for a single species encompassing multiple temperature regions...
virtual void modifyParameters(doublereal *coeffs)
std::vector< std::unique_ptr< Nasa9Poly1 > > m_regionPts
Individual temperature region objects.