00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include "GuldersEGR.H"
00028 #include "addToRunTimeSelectionTable.H"
00029
00030
00031
00032 namespace Foam
00033 {
00034 namespace laminarFlameSpeedModels
00035 {
00036 defineTypeNameAndDebug(GuldersEGR, 0);
00037
00038 addToRunTimeSelectionTable
00039 (
00040 laminarFlameSpeed,
00041 GuldersEGR,
00042 dictionary
00043 );
00044 }
00045 }
00046
00047
00048
00049 Foam::laminarFlameSpeedModels::GuldersEGR::GuldersEGR
00050 (
00051 const dictionary& dict,
00052 const hhuCombustionThermo& ct
00053 )
00054 :
00055 laminarFlameSpeed(dict, ct),
00056
00057 coeffsDict_(dict.subDict(typeName + "Coeffs").subDict(fuel_)),
00058 W_(readScalar(coeffsDict_.lookup("W"))),
00059 eta_(readScalar(coeffsDict_.lookup("eta"))),
00060 xi_(readScalar(coeffsDict_.lookup("xi"))),
00061 f_(readScalar(coeffsDict_.lookup("f"))),
00062 alpha_(readScalar(coeffsDict_.lookup("alpha"))),
00063 beta_(readScalar(coeffsDict_.lookup("beta")))
00064 {}
00065
00066
00067
00068
00069 Foam::laminarFlameSpeedModels::GuldersEGR::~GuldersEGR()
00070 {}
00071
00072
00073
00074
00075 inline Foam::scalar Foam::laminarFlameSpeedModels::GuldersEGR::SuRef
00076 (
00077 scalar phi
00078 ) const
00079 {
00080 if (phi > SMALL)
00081 {
00082 return W_*pow(phi, eta_)*exp(-xi_*sqr(phi - 1.075));
00083 }
00084 else
00085 {
00086 return 0.0;
00087 }
00088 }
00089
00090
00091 inline Foam::scalar Foam::laminarFlameSpeedModels::GuldersEGR::Su0pTphi
00092 (
00093 scalar p,
00094 scalar Tu,
00095 scalar phi,
00096 scalar Yres
00097 ) const
00098 {
00099 static const scalar Tref = 300.0;
00100 static const scalar pRef = 1.013e5;
00101
00102 return SuRef(phi)*pow((Tu/Tref), alpha_)*pow((p/pRef), beta_)*(1 - f_*Yres);
00103 }
00104
00105
00106 Foam::tmp<Foam::volScalarField>
00107 Foam::laminarFlameSpeedModels::GuldersEGR::Su0pTphi
00108 (
00109 const volScalarField& p,
00110 const volScalarField& Tu,
00111 scalar phi
00112 ) const
00113 {
00114 tmp<volScalarField> tSu0
00115 (
00116 new volScalarField
00117 (
00118 IOobject
00119 (
00120 "Su0",
00121 p.time().timeName(),
00122 p.db(),
00123 IOobject::NO_READ,
00124 IOobject::NO_WRITE
00125 ),
00126 p.mesh(),
00127 dimensionedScalar("Su0", dimVelocity, 0.0)
00128 )
00129 );
00130
00131 volScalarField& Su0 = tSu0();
00132
00133 forAll(Su0, celli)
00134 {
00135 Su0[celli] = Su0pTphi(p[celli], Tu[celli], phi, 0.0);
00136 }
00137
00138 forAll(Su0.boundaryField(), patchi)
00139 {
00140 forAll(Su0.boundaryField()[patchi], facei)
00141 {
00142 Su0.boundaryField()[patchi][facei] =
00143 Su0pTphi
00144 (
00145 p.boundaryField()[patchi][facei],
00146 Tu.boundaryField()[patchi][facei],
00147 phi,
00148 0.0
00149 );
00150 }
00151 }
00152
00153 return tSu0;
00154 }
00155
00156
00157 Foam::tmp<Foam::volScalarField>
00158 Foam::laminarFlameSpeedModels::GuldersEGR::Su0pTphi
00159 (
00160 const volScalarField& p,
00161 const volScalarField& Tu,
00162 const volScalarField& phi,
00163 const volScalarField& egr
00164 ) const
00165 {
00166 tmp<volScalarField> tSu0
00167 (
00168 new volScalarField
00169 (
00170 IOobject
00171 (
00172 "Su0",
00173 p.time().timeName(),
00174 p.db(),
00175 IOobject::NO_READ,
00176 IOobject::NO_WRITE
00177 ),
00178 p.mesh(),
00179 dimensionedScalar("Su0", dimVelocity, 0.0)
00180 )
00181 );
00182
00183 volScalarField& Su0 = tSu0();
00184
00185 forAll(Su0, celli)
00186 {
00187 Su0[celli] = Su0pTphi(p[celli], Tu[celli], phi[celli], egr[celli]);
00188 }
00189
00190 forAll(Su0.boundaryField(), patchi)
00191 {
00192 forAll(Su0.boundaryField()[patchi], facei)
00193 {
00194 Su0.boundaryField()[patchi][facei] =
00195 Su0pTphi
00196 (
00197 p.boundaryField()[patchi][facei],
00198 Tu.boundaryField()[patchi][facei],
00199 phi.boundaryField()[patchi][facei],
00200 egr.boundaryField()[patchi][facei]
00201 );
00202 }
00203 }
00204
00205 return tSu0;
00206 }
00207
00208
00209 Foam::tmp<Foam::volScalarField>
00210 Foam::laminarFlameSpeedModels::GuldersEGR::operator()() const
00211 {
00212 if
00213 (
00214 hhuCombustionThermo_.composition().contains("ft")
00215 && hhuCombustionThermo_.composition().contains("egr")
00216 )
00217 {
00218 return Su0pTphi
00219 (
00220 hhuCombustionThermo_.p(),
00221 hhuCombustionThermo_.Tu(),
00222 dimensionedScalar
00223 (
00224 hhuCombustionThermo_.lookup("stoichiometricAirFuelMassRatio")
00225 )/
00226 (
00227 scalar(1)/hhuCombustionThermo_.composition().Y("ft")
00228 - scalar(1)
00229 ),
00230 hhuCombustionThermo_.composition().Y("egr")
00231 );
00232 }
00233 else
00234 {
00235 return Su0pTphi
00236 (
00237 hhuCombustionThermo_.p(),
00238 hhuCombustionThermo_.Tu(),
00239 equivalenceRatio_
00240 );
00241 }
00242 }
00243
00244
00245