BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / applications / solvers / combustion / PDRFoam / laminarFlameSpeed / SCOPE / SCOPELaminarFlameSpeed.H
blobcb3dd7f4237f462a7fbbab8d85ee843d05da2a80
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
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.
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.
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/>.
24 Class
25     Foam::laminarFlameSpeedModels::SCOPE
27 Description
28     Laminar flame speed obtained from the SCOPE correlation.
30     Seven parameters are specified in terms of polynomial functions of
31     stoichiometry. Two polynomials are fitted, covering different parts of the
32     flammable range. If the mixture is outside the fitted range, linear
33     interpolation is used between the extreme of the polynomio and the upper or
34     lower flammable limit with the Markstein number constant.
36     Variations of pressure and temperature from the reference values are taken
37     into account through \f$ pexp \f$ and \f$ texp \f$
39     The laminar burning velocity fitting polynomial is:
41     \f$ Su = a_{0}(1+a_{1}x+K+..a_{i}x^{i}..+a_{6}x^{6}) (p/p_{ref})^{pexp}
42     (T/T_{ref})^{texp} \f$
44     where:
46         \f$ a_{i} \f$ are the polinomial coefficients.
48         \f$ pexp \f$ and \f$ texp \f$ are the pressure and temperature factors
49         respectively.
51         \f$ x \f$ is the equivalence ratio.
53         \f$ T_{ref} \f$ and \f$ p_{ref} \f$ are the temperature and pressure
54         references for the laminar burning velocity.
57 SourceFiles
58     SCOPELaminarFlameSpeed.C
60 \*---------------------------------------------------------------------------*/
62 #ifndef SCOPE_H
63 #define SCOPE_H
65 #include "laminarFlameSpeed.H"
67 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
69 namespace Foam
71 namespace laminarFlameSpeedModels
74 /*---------------------------------------------------------------------------*\
75                            Class SCOPE Declaration
76 \*---------------------------------------------------------------------------*/
78 class SCOPE
80     public laminarFlameSpeed
82     // Private Data
84         class polynomial
85         :
86             public FixedList<scalar, 7>
87         {
88         public:
90             //- Lower limit
91             scalar ll;
93             //- Upper polynomial limit
94             scalar ul;
96             //- Value at lower limit
97             scalar llv;
99             //- Value at upper limit
100             scalar ulv;
102             //- Changeover point from lower to upper polynomial
103             scalar lu;
105             //- Construct from dictionary
106             polynomial(const dictionary& polyDict);
107         };
110         dictionary coeffsDict_;
112         //- Lower flamability limit
113         scalar LFL_;
115         //- Upper flamability limit
116         scalar UFL_;
118         //- Lower Su polynomial
119         polynomial SuPolyL_;
121         //- Upper Su polynomial
122         polynomial SuPolyU_;
124         //- Temperature correction exponent
125         scalar Texp_;
127         //- Pressure correction exponent
128         scalar pexp_;
130         //- Lower Ma polynomial
131         polynomial MaPolyL_;
133         //- Upper Ma polynomial
134         polynomial MaPolyU_;
137     // Private member functions
139         //- Polynomial evaluated from the given equivalence ratio
140         //  and polynomial coefficients
141         static inline scalar polyPhi(scalar phi, const polynomial& a);
143         //- Laminar flame speed evaluated from the given equivalence ratio
144         //  at the reference temperature and pressure
145         inline scalar SuRef(scalar phi) const;
147         //- Markstein evaluated from the given equivalence ratio
148         inline scalar Ma(scalar phi) const;
150         //- Laminar flame speed evaluated from the given equivalence ratio
151         //  corrected for temperature and pressure dependence
152         inline scalar Su0pTphi(scalar p, scalar Tu, scalar phi) const;
154         //- Laminar flame speed evaluated from the given uniform
155         //  equivalence ratio corrected for temperature and pressure dependence
156         tmp<volScalarField> Su0pTphi
157         (
158             const volScalarField& p,
159             const volScalarField& Tu,
160             scalar phi
161         ) const;
163         //- Laminar flame speed evaluated from the given equivalence ratio
164         //  distribution corrected for temperature and pressure dependence
165         tmp<volScalarField> Su0pTphi
166         (
167             const volScalarField& p,
168             const volScalarField& Tu,
169             const volScalarField& phi
170         ) const;
172         //- Return the Markstein number
173         //  evaluated from the given equivalence ratio
174         tmp<volScalarField> Ma(const volScalarField& phi) const;
176         //- Construct as copy (not implemented)
177         SCOPE(const SCOPE&);
179         void operator=(const SCOPE&);
182 public:
184     //- Runtime type information
185     TypeName("SCOPE");
187     // Constructors
189         //- Construct from dictionary and hhuCombustionThermo
190         SCOPE
191         (
192             const dictionary&,
193             const hhuCombustionThermo&
194         );
197     //- Destructor
198     ~SCOPE();
201     // Member functions
203         //- Return the Markstein number
204         tmp<volScalarField> Ma() const;
206         //- Return the laminar flame speed [m/s]
207         tmp<volScalarField> operator()() const;
211 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
213 } // End laminarFlameSpeedModels
214 } // End namespace Foam
216 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
218 #endif
220 // ************************************************************************* //