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