1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
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
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 \*---------------------------------------------------------------------------*/
26 #include "GuldersEGR.H"
27 #include "addToRunTimeSelectionTable.H"
29 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
33 namespace laminarFlameSpeedModels
35 defineTypeNameAndDebug(GuldersEGR, 0);
37 addToRunTimeSelectionTable
46 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
48 Foam::laminarFlameSpeedModels::GuldersEGR::GuldersEGR
50 const dictionary& dict,
51 const hhuCombustionThermo& ct
54 laminarFlameSpeed(dict, ct),
56 coeffsDict_(dict.subDict(typeName + "Coeffs").subDict(fuel_)),
57 W_(readScalar(coeffsDict_.lookup("W"))),
58 eta_(readScalar(coeffsDict_.lookup("eta"))),
59 xi_(readScalar(coeffsDict_.lookup("xi"))),
60 f_(readScalar(coeffsDict_.lookup("f"))),
61 alpha_(readScalar(coeffsDict_.lookup("alpha"))),
62 beta_(readScalar(coeffsDict_.lookup("beta")))
66 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
68 Foam::laminarFlameSpeedModels::GuldersEGR::~GuldersEGR()
72 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
74 inline Foam::scalar Foam::laminarFlameSpeedModels::GuldersEGR::SuRef
81 return W_*pow(phi, eta_)*exp(-xi_*sqr(phi - 1.075));
90 inline Foam::scalar Foam::laminarFlameSpeedModels::GuldersEGR::Su0pTphi
98 static const scalar Tref = 300.0;
99 static const scalar pRef = 1.013e5;
101 return SuRef(phi)*pow((Tu/Tref), alpha_)*pow((p/pRef), beta_)*(1 - f_*Yres);
105 Foam::tmp<Foam::volScalarField>
106 Foam::laminarFlameSpeedModels::GuldersEGR::Su0pTphi
108 const volScalarField& p,
109 const volScalarField& Tu,
113 tmp<volScalarField> tSu0
126 dimensionedScalar("Su0", dimVelocity, 0.0)
130 volScalarField& Su0 = tSu0();
134 Su0[celli] = Su0pTphi(p[celli], Tu[celli], phi, 0.0);
137 forAll(Su0.boundaryField(), patchi)
139 forAll(Su0.boundaryField()[patchi], facei)
141 Su0.boundaryField()[patchi][facei] =
144 p.boundaryField()[patchi][facei],
145 Tu.boundaryField()[patchi][facei],
156 Foam::tmp<Foam::volScalarField>
157 Foam::laminarFlameSpeedModels::GuldersEGR::Su0pTphi
159 const volScalarField& p,
160 const volScalarField& Tu,
161 const volScalarField& phi,
162 const volScalarField& egr
165 tmp<volScalarField> tSu0
178 dimensionedScalar("Su0", dimVelocity, 0.0)
182 volScalarField& Su0 = tSu0();
186 Su0[celli] = Su0pTphi(p[celli], Tu[celli], phi[celli], egr[celli]);
189 forAll(Su0.boundaryField(), patchi)
191 forAll(Su0.boundaryField()[patchi], facei)
193 Su0.boundaryField()[patchi][facei] =
196 p.boundaryField()[patchi][facei],
197 Tu.boundaryField()[patchi][facei],
198 phi.boundaryField()[patchi][facei],
199 egr.boundaryField()[patchi][facei]
208 Foam::tmp<Foam::volScalarField>
209 Foam::laminarFlameSpeedModels::GuldersEGR::operator()() const
213 hhuCombustionThermo_.composition().contains("ft")
214 && hhuCombustionThermo_.composition().contains("egr")
219 hhuCombustionThermo_.p(),
220 hhuCombustionThermo_.Tu(),
223 hhuCombustionThermo_.lookup("stoichiometricAirFuelMassRatio")
226 scalar(1)/hhuCombustionThermo_.composition().Y("ft")
229 hhuCombustionThermo_.composition().Y("egr")
236 hhuCombustionThermo_.p(),
237 hhuCombustionThermo_.Tu(),
244 // ************************************************************************* //