initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / applications / solvers / combustion / PDRFoam / laminarFlameSpeed / SCOPE / SCOPELaminarFlameSpeed.H
blob1931dbbb3554e8b9747fd107b799c6e9f0e4ce4c
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     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, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     Foam::laminarFlameSpeedModels::SCOPE
28 Description
29     Laminar flame speed obtained from the SCOPE correlation.
31     Seven parameters are specified in terms of polynomial functions of
32     stoichiometry. Two polynomials are fitted, covering different parts of the
33     flammable range. If the mixture is outside the fitted range, linear
34     interpolation is used between the extreme of the polynomio and the upper or
35     lower flammable limit with the Markstein number constant.
37     Variations of pressure and temperature from the reference values are taken
38     into account through \f$ pexp \f$ and \f$ texp \f$
40     The laminar burning velocity fitting polynomial is:
42     \f$ Su = a_{0}(1+a_{1}x+K+..a_{i}x^{i}..+a_{6}x^{6}) (p/p_{ref})^{pexp}
43     (T/T_{ref})^{texp} \f$
45     where:
47         \f$ a_{i} \f$ are the polinomial coefficients.
49         \f$ pexp \f$ and \f$ texp \f$ are the pressure and temperature factors
50         respectively.
52         \f$ x \f$ is the equivalence ratio.
54         \f$ T_{ref} \f$ and \f$ p_{ref} \f$ are the temperature and pressure
55         references for the laminar burning velocity.
58 SourceFiles
59     SCOPELaminarFlameSpeed.C
61 \*---------------------------------------------------------------------------*/
63 #ifndef SCOPE_H
64 #define SCOPE_H
66 #include "laminarFlameSpeed.H"
68 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
70 namespace Foam
72 namespace laminarFlameSpeedModels
75 /*---------------------------------------------------------------------------*\
76                            Class SCOPE Declaration
77 \*---------------------------------------------------------------------------*/
79 class SCOPE
81     public laminarFlameSpeed
83     // Private Data
85         class polynomial
86         :
87             public FixedList<scalar, 7>
88         {
89         public:
91             //- Lower limit
92             scalar ll;
94             //- Upper polynomial limit
95             scalar ul;
97             //- Value at lower limit
98             scalar llv;
100             //- Value at upper limit
101             scalar ulv;
103             //- Changeover point from lower to upper polynomial
104             scalar lu;
106             //- Construct from dictionary
107             polynomial(const dictionary& polyDict);
108         };
111         dictionary coeffsDict_;
113         //- Lower flamability limit
114         scalar LFL_;
116         //- Upper flamability limit
117         scalar UFL_;
119         //- Lower Su polynomial
120         polynomial SuPolyL_;
122         //- Upper Su polynomial
123         polynomial SuPolyU_;
125         //- Temperature correction exponent
126         scalar Texp_;
128         //- Pressure correction exponent
129         scalar pexp_;
131         //- Lower Ma polynomial
132         polynomial MaPolyL_;
134         //- Upper Ma polynomial
135         polynomial MaPolyU_;
138     // Private member functions
140         //- Polynomial evaluated from the given equivalence ratio
141         //  and polynomial coefficients
142         static inline scalar polyPhi(scalar phi, const polynomial& a);
144         //- Laminar flame speed evaluated from the given equivalence ratio
145         //  at the reference temperature and pressure
146         inline scalar SuRef(scalar phi) const;
148         //- Markstein evaluated from the given equivalence ratio
149         inline scalar Ma(scalar phi) const;
151         //- Laminar flame speed evaluated from the given equivalence ratio
152         //  corrected for temperature and pressure dependence
153         inline scalar Su0pTphi(scalar p, scalar Tu, scalar phi) const;
155         //- Laminar flame speed evaluated from the given uniform
156         //  equivalence ratio corrected for temperature and pressure dependence
157         tmp<volScalarField> Su0pTphi
158         (
159             const volScalarField& p,
160             const volScalarField& Tu,
161             scalar phi
162         ) const;
164         //- Laminar flame speed evaluated from the given equivalence ratio
165         //  distribution corrected for temperature and pressure dependence
166         tmp<volScalarField> Su0pTphi
167         (
168             const volScalarField& p,
169             const volScalarField& Tu,
170             const volScalarField& phi
171         ) const;
173         //- Return the Markstein number
174         //  evaluated from the given equivalence ratio
175         tmp<volScalarField> Ma(const volScalarField& phi) const;
177         //- Construct as copy (not implemented)
178         SCOPE(const SCOPE&);
180         void operator=(const SCOPE&);
183 public:
185     //- Runtime type information
186     TypeName("SCOPE");
188     // Constructors
190         //- Construct from dictionary and hhuCombustionThermo
191         SCOPE
192         (
193             const dictionary&,
194             const hhuCombustionThermo&
195         );
198     // Destructor
199     ~SCOPE();
202     // Member functions
204         //- Return the Markstein number
205         tmp<volScalarField> Ma() const;
207         //- Return the laminar flame speed [m/s]
208         tmp<volScalarField> operator()() const;
212 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
214 } // End laminarFlameSpeedModels
215 } // End namespace Foam
217 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
219 #endif
221 // ************************************************************************* //