34 namespace combustionModels
39 template<
class CombThermoType,
class ThermoType>
40 FSD<CombThermoType, ThermoType>::FSD
42 const word& modelType,
53 reactionRateFlameArea_
88 template<
class CombThermoType,
class ThermoType>
95 template<
class CombThermoType,
class ThermoType>
98 this->singleMixturePtr_->fresCorrect();
100 const label fuelI = this->singleMixturePtr_->fuelIndex();
102 const volScalarField& YFuel = this->thermoPtr_->composition().Y()[fuelI];
104 const volScalarField& YO2 = this->thermoPtr_->composition().Y(
"O2");
109 (s*YFuel - (YO2 - YO2OxiStream_))/(s*YFuelFuelStream_ + YO2OxiStream_);
121 (ft_*cAux*mgft)().weightedAverage(this->
mesh().V())
122 /((ft_*cAux)().weightedAverage(this->
mesh().V()) + SMALL)
136 reactionRateFlameArea_->correct(sigma);
138 const volScalarField& omegaFuel = reactionRateFlameArea_->omega();
141 const scalar ftStoich =
142 YO2OxiStream_.value()
144 s.
value()*YFuelFuelStream_.value() + YO2OxiStream_.value()
208 scalar deltaFt = 1.0/ftDim_;
212 if (ft_[cellI] > ftMin_ && ft_[cellI] < ftMax_)
214 scalar ftCell = ft_[cellI];
216 if (ftVar[cellI] > ftVarMin_)
218 scalar ftVarc = ftVar[cellI];
220 max(ftCell*(ftCell*(1.0 - ftCell)/ftVarc - 1.0), 0.0);
221 scalar
b =
max(a/ftCell - a, 0.0);
223 for (
int i=1; i<ftDim_; i++)
225 scalar ft = i*deltaFt;
226 pc[cellI] +=
pow(ft, a-1.0)*
pow(1.0 - ft, b - 1.0)*deltaFt;
229 for (
int i=1; i<ftDim_; i++)
231 scalar ft = i*deltaFt;
232 omegaFuelBar[cellI] +=
233 omegaFuel[cellI]/omegaF[cellI]
237 /(2.0*
sqr(0.01*omegaF[cellI]))
240 *
pow(1.0 - ft, b - 1.0)
243 omegaFuelBar[cellI] /=
max(pc[cellI], 1
e-4);
247 omegaFuelBar[cellI] =
248 omegaFuel[cellI]/omegaF[cellI]
249 *
exp(-
sqr(ftCell - ftStoich)/(2.0*
sqr(0.01*omegaF[cellI])));
254 omegaFuelBar[cellI] = 0.0;
264 forAll(this->singleMixturePtr_->specieProd(), specieI)
266 if (this->singleMixturePtr_->specieProd()[specieI] < 0)
268 productsIndex[i] = specieI;
276 scalar YprodTotal = 0;
279 YprodTotal += this->singleMixturePtr_->Yprod0()[productsIndex[j]];
284 if (ft_[cellI] < ftStoich)
286 pc[cellI] = ft_[cellI]*(YprodTotal/ftStoich);
290 pc[cellI] = (1.0 - ft_[cellI])*(YprodTotal/(1.0 - ftStoich));
315 label specieI = productsIndex[j];
316 const volScalarField& Yp = this->thermoPtr_->composition().Y()[specieI];
322 max(scalar(1) - products/
max(pc, scalar(1
e-5)), scalar(0))
325 pc =
min(C_*c, scalar(1));
329 this->wFuel_ == mgft*pc*omegaFuelBar;
333 template<
class CombThermoType,
class ThermoType>
341 calculateSourceNorm();
346 template<
class CombThermoType,
class ThermoType>
351 this->coeffs().lookup(
"Cv") >> Cv_ ;
352 this->coeffs().lookup(
"ftVarMin") >> ftVarMin_;
353 reactionRateFlameArea_->read(this->coeffs());
dimensionedScalar pow3(const dimensionedScalar &ds)
Mesh data needed to do the Finite Volume discretisation.
Flame Surface Dennsity (FDS) combustion model.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject( name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE ))
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
dimensioned< scalar > mag(const dimensioned< Type > &)
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m2/K4].
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Base class for combustion models using singleStepReactingMixture.
static autoPtr< reactionRateFlameArea > New(const dictionary &dict, const fvMesh &mesh, const combustionModel &combModel)
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
virtual void correct()
Correct combustion rate.
dimensionedScalar exp(const dimensionedScalar &ds)
const Mesh & mesh() const
Return mesh.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
static word groupName(Name name, const word &group)
Calculate the gradient of the given field.
const double e
Elementary charge.
stressControl lookup("compactNormalStress") >> compactNormalStress
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
Macros for easy insertion into run-time selection tables.
const dimensionSet & dimensions() const
Return dimensions.
Calculate the divergence of the given field.
const Time & time() const
Return time.
const dimensionedScalar c
Speed of light in a vacuum.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
virtual bool read()
Update properties.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
const objectRegistry & db() const
Return the local objectRegistry.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
A class for managing temporary objects.
const Type & value() const
Return const reference to value.
LESModel< EddyDiffusivity< turbulenceModel > > LESModel
Typedefs for turbulence, RAS and LES models for compressible flow based on the standard laminar trans...