Cantera  2.4.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  //! Constructor used in templated instantiations
40  /*!
41  * @param regionPts Vector of pointers to Nasa9Poly1 objects. These objects
42  * all refer to the temperature regions for the same species. The vector
43  * must be in increasing temperature region format. Together they
44  * represent the reference temperature parameterization for a single
45  * species.
46  *
47  * Note, after the constructor, we will own the underlying Nasa9Poly1
48  * objects and be responsible for owning them.
49  */
50  Nasa9PolyMultiTempRegion(std::vector<Nasa9Poly1*> &regionPts);
51 
52  virtual ~Nasa9PolyMultiTempRegion();
53 
54  virtual int reportType() const;
55 
56  virtual size_t temperaturePolySize() const { return 7; }
57  virtual void updateTemperaturePoly(double T, double* T_poly) const;
58 
59  //! @copydoc Nasa9Poly1::updateProperties
60  virtual void updateProperties(const doublereal* tt,
61  doublereal* cp_R, doublereal* h_RT,
62  doublereal* s_R) const;
63 
64  virtual void updatePropertiesTemp(const doublereal temp,
65  doublereal* cp_R, doublereal* h_RT,
66  doublereal* s_R) const;
67 
68  //! This utility function reports back the type of parameterization and all
69  //! of the parameters for the species, index.
70  /*!
71  * All parameters are output variables
72  *
73  * @param n Species index
74  * @param type Integer type of the standard type
75  * @param tlow output - Minimum temperature
76  * @param thigh output - Maximum temperature
77  * @param pref output - reference pressure (Pa).
78  * @param coeffs Vector of coefficients used to set the parameters for
79  * the standard state. There are 1 + 11*nzones coefficients.
80  * coeffs[0] is equal to nTempZones.
81  * index = 1
82  * for each zone:
83  * coeffs[index] = minTempZone
84  * coeffs[index+1] = maxTempZone
85  * coeffs[index+2+i] from i =0,9 are the coefficients themselves
86  */
87  virtual void reportParameters(size_t& n, int& type,
88  doublereal& tlow, doublereal& thigh,
89  doublereal& pref,
90  doublereal* const coeffs) const;
91 
92 protected:
93  //! Lower boundaries of each temperature regions
95 
96  //! Individual temperature region objects
97  std::vector<std::unique_ptr<Nasa9Poly1>> m_regionPts;
98 
99  //! current region
100  mutable int m_currRegion;
101 };
102 
103 }
104 #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.
Nasa9PolyMultiTempRegion(std::vector< Nasa9Poly1 *> &regionPts)
Constructor used in templated instantiations.
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 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: AnyMap.cpp:8
The NASA 9 polynomial parameterization for a single species encompassing multiple temperature regions...
std::vector< std::unique_ptr< Nasa9Poly1 > > m_regionPts
Individual temperature region objects.