RaviPetersen.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2013-2016 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::laminarFlameSpeedModels::RaviPetersen
28
29Description
30 Laminar flame speed obtained from Ravi and Petersen's correlation.
31
32 The correlation for the laminar flame speed \f$Su\f$ is of the following
33 form:
34 \f[
35 Su = \left( \sum \alpha_i \phi^i \right)
36 \left( \frac{T}{T_{ref}} \right)^{\left( \sum \beta_j \phi^j \right)}
37 \f]
38
39 Where \f$\phi\f$ is the equivalence ratio, and \f$\alpha\f$ and \f$\beta\f$
40 are polynomial coefficients given for a number of pressure and equivalence
41 ratio points.
42
43SourceFiles
44 RaviPetersen.C
45
46\*---------------------------------------------------------------------------*/
47
48#ifndef RaviPetersen_H
49#define RaviPetersen_H
50
51#include "laminarFlameSpeed.H"
52
53// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54
55namespace Foam
56{
57namespace laminarFlameSpeedModels
58{
59
60/*---------------------------------------------------------------------------*\
61 Class RaviPetersen Declaration
62\*---------------------------------------------------------------------------*/
64class RaviPetersen
65:
67{
68 // Private Data
69
70 dictionary coeffsDict_;
71
72 //- Correlation pressure values
73 List<scalar> pPoints_;
74
75 //- Correlation equivalence ratios
76 List<scalar> EqRPoints_;
77
78 //- Correlation alpha coefficients
80
81 //- Correlation beta coefficients
83
84 //- Reference temperature
85 scalar TRef_;
86
87
88 // Private Member Functions
89
90 //- Check that input points are ordered
91 void checkPointsMonotonicity
92 (
93 const word& name,
94 const List<scalar>& x
95 ) const;
96
97 //- Check that the coefficient arrays are of the correct shape
98 void checkCoefficientArrayShape
99 (
100 const word& name,
101 const List<List<List<scalar>>>& x
102 ) const;
103
104 //- Find and interpolate a value in the data point arrays
105 inline bool interval
106 (
107 const List<scalar>& xPoints,
108 const scalar x,
109 label& xIndex,
110 scalar& xXi,
111 scalar& xLim
112 ) const;
113
114 //- Evaluate a polynomial
115 inline scalar polynomial
116 (
117 const List<scalar>& coeffs,
118 const scalar x
119 ) const;
120
121 //- Evaluate a polynomial differential
122 inline scalar dPolynomial
123 (
124 const List<scalar>& coeffs,
125 const scalar x
126 ) const;
127
128 //- Calculate normalised temperature to the power of the B polynomial
129 inline scalar THatPowB
130 (
131 const label EqRIndex,
132 const label pIndex,
133 const scalar EqR,
134 const scalar Tu
135 ) const;
136
137 //- Return the flame speed within the correlation range
138 inline scalar correlationInRange
139 (
140 const label EqRIndex,
141 const label pIndex,
142 const scalar EqR,
143 const scalar Tu
144 ) const;
145
146 //- Extrapolate the flame speed correlation outside its range
147 inline scalar correlationOutOfRange
148 (
149 const label EqRIndex,
150 const label pIndex,
151 const scalar EqR,
152 const scalar EqRLim,
153 const scalar Tu
154 ) const;
155
156 //- Return the laminar flame speed [m/s]
157 inline scalar speed
158 (
159 const scalar EqR,
160 const scalar p,
161 const scalar Tu
162 ) const;
163
164
165 //- Construct as copy (not implemented)
167 void operator=(const RaviPetersen&);
168
169
170public:
171
172 //- Runtime type information
173 TypeName("RaviPetersen");
174
175 // Constructors
176
177 //- Construct from dictionary and psiuReactionThermo
179 (
180 const dictionary&,
181 const psiuReactionThermo&
182 );
183
184
185 //- Destructor
186 virtual ~RaviPetersen();
187
188
189 // Member functions
190
191 //- Return the laminar flame speed [m/s]
193};
194
195
196// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
197
198} // End laminarFlameSpeedModels
199} // End namespace Foam
200
201// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
202
203#endif
204
205// ************************************************************************* //
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: List.H:77
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Laminar flame speed obtained from Ravi and Petersen's correlation.
Definition: RaviPetersen.H:66
TypeName("RaviPetersen")
Runtime type information.
tmp< volScalarField > operator()() const
Return the laminar flame speed [m/s].
Definition: RaviPetersen.C:291
Abstract class for laminar flame speed.
Foam::psiuReactionThermo.
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
volScalarField & p
Namespace for OpenFOAM.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73