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 "Gulders.H"
00028 #include "addToRunTimeSelectionTable.H"
00029
00030
00031
00032 namespace Foam
00033 {
00034 namespace laminarFlameSpeedModels
00035 {
00036 defineTypeNameAndDebug(Gulders, 0);
00037
00038 addToRunTimeSelectionTable
00039 (
00040 laminarFlameSpeed,
00041 Gulders,
00042 dictionary
00043 );
00044 }
00045 }
00046
00047
00048
00049
00050 Foam::laminarFlameSpeedModels::Gulders::Gulders
00051 (
00052 const dictionary& dict,
00053 const hhuCombustionThermo& ct
00054 )
00055 :
00056 laminarFlameSpeed(dict, ct),
00057
00058 coeffsDict_(dict.subDict(typeName + "Coeffs").subDict(fuel_)),
00059 W_(readScalar(coeffsDict_.lookup("W"))),
00060 eta_(readScalar(coeffsDict_.lookup("eta"))),
00061 xi_(readScalar(coeffsDict_.lookup("xi"))),
00062 f_(readScalar(coeffsDict_.lookup("f"))),
00063 alpha_(readScalar(coeffsDict_.lookup("alpha"))),
00064 beta_(readScalar(coeffsDict_.lookup("beta")))
00065 {}
00066
00067
00068
00069
00070 Foam::laminarFlameSpeedModels::Gulders::~Gulders()
00071 {}
00072
00073
00074
00075
00076 inline Foam::scalar Foam::laminarFlameSpeedModels::Gulders::SuRef
00077 (
00078 scalar phi
00079 ) const
00080 {
00081 if (phi > SMALL)
00082 {
00083 return W_*pow(phi, eta_)*exp(-xi_*sqr(phi - 1.075));
00084 }
00085 else
00086 {
00087 return 0.0;
00088 }
00089 }
00090
00091
00092 inline Foam::scalar Foam::laminarFlameSpeedModels::Gulders::Su0pTphi
00093 (
00094 scalar p,
00095 scalar Tu,
00096 scalar phi,
00097 scalar Yres
00098 ) const
00099 {
00100 static const scalar Tref = 300.0;
00101 static const scalar pRef = 1.013e5;
00102
00103 return SuRef(phi)*pow((Tu/Tref), alpha_)*pow((p/pRef), beta_)*(1 - f_*Yres);
00104 }
00105
00106
00107 Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::Gulders::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> Foam::laminarFlameSpeedModels::Gulders::Su0pTphi
00158 (
00159 const volScalarField& p,
00160 const volScalarField& Tu,
00161 const volScalarField& phi
00162 ) const
00163 {
00164 tmp<volScalarField> tSu0
00165 (
00166 new volScalarField
00167 (
00168 IOobject
00169 (
00170 "Su0",
00171 p.time().timeName(),
00172 p.db(),
00173 IOobject::NO_READ,
00174 IOobject::NO_WRITE
00175 ),
00176 p.mesh(),
00177 dimensionedScalar("Su0", dimVelocity, 0.0)
00178 )
00179 );
00180
00181 volScalarField& Su0 = tSu0();
00182
00183 forAll(Su0, celli)
00184 {
00185 Su0[celli] = Su0pTphi(p[celli], Tu[celli], phi[celli], 0.0);
00186 }
00187
00188 forAll(Su0.boundaryField(), patchi)
00189 {
00190 forAll(Su0.boundaryField()[patchi], facei)
00191 {
00192 Su0.boundaryField()[patchi][facei] =
00193 Su0pTphi
00194 (
00195 p.boundaryField()[patchi][facei],
00196 Tu.boundaryField()[patchi][facei],
00197 phi.boundaryField()[patchi][facei],
00198 0.0
00199 );
00200 }
00201 }
00202
00203 return tSu0;
00204 }
00205
00206
00207 Foam::tmp<Foam::volScalarField>
00208 Foam::laminarFlameSpeedModels::Gulders::operator()() const
00209 {
00210 if (hhuCombustionThermo_.composition().contains("ft"))
00211 {
00212 const volScalarField& ft = hhuCombustionThermo_.composition().Y("ft");
00213
00214 return Su0pTphi
00215 (
00216 hhuCombustionThermo_.p(),
00217 hhuCombustionThermo_.Tu(),
00218 dimensionedScalar
00219 (
00220 hhuCombustionThermo_.lookup("stoichiometricAirFuelMassRatio")
00221 )*ft/((1 + SMALL) - ft)
00222 );
00223 }
00224 else
00225 {
00226 return Su0pTphi
00227 (
00228 hhuCombustionThermo_.p(),
00229 hhuCombustionThermo_.Tu(),
00230 equivalenceRatio_
00231 );
00232 }
00233 }
00234
00235
00236