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()
211 scalar deltaFt = 1.0/ftDim_;
215 if (ft_[celli] > ftMin_ && ft_[celli] < ftMax_)
217 scalar ftCell = ft_[celli];
219 if (ftVar[celli] > ftVarMin_)
221 scalar ftVarc = ftVar[celli];
223 max(ftCell*(ftCell*(1.0 - ftCell)/ftVarc - 1.0), 0.0);
224 scalar
b =
max(a/ftCell - a, 0.0);
226 for (
int i=1; i<ftDim_; i++)
228 scalar ft = i*deltaFt;
229 pc[celli] +=
pow(ft, a-1.0)*
pow(1.0 - ft, b - 1.0)*deltaFt;
232 for (
int i=1; i<ftDim_; i++)
234 scalar ft = i*deltaFt;
235 omegaFuelBar[celli] +=
236 omegaFuel[celli]/omegaF[celli]
240 /(2.0*
sqr(0.01*omegaF[celli]))
243 *
pow(1.0 - ft, b - 1.0)
246 omegaFuelBar[celli] /=
max(pc[celli], 1
e-4);
250 omegaFuelBar[celli] =
251 omegaFuel[celli]/omegaF[celli]
252 *
exp(-
sqr(ftCell - ftStoich)/(2.0*
sqr(0.01*omegaF[celli])));
257 omegaFuelBar[celli] = 0.0;
267 forAll(this->singleMixturePtr_->specieProd(), specieI)
269 if (this->singleMixturePtr_->specieProd()[specieI] < 0)
271 productsIndex[i] = specieI;
279 scalar YprodTotal = 0;
282 YprodTotal += this->singleMixturePtr_->Yprod0()[productsIndex[j]];
287 if (ft_[celli] < ftStoich)
289 pc[celli] = ft_[celli]*(YprodTotal/ftStoich);
293 pc[celli] = (1.0 - ft_[celli])*(YprodTotal/(1.0 - ftStoich));
318 label specieI = productsIndex[j];
319 const volScalarField& Yp = this->thermoPtr_->composition().Y()[specieI];
325 max(scalar(1) - products/
max(pc, scalar(1
e-5)), scalar(0))
328 pc =
min(C_*c, scalar(1));
332 this->wFuel_ == mgft*pc*omegaFuelBar;
336 template<
class CombThermoType,
class ThermoType>
344 calculateSourceNorm();
349 template<
class CombThermoType,
class ThermoType>
354 this->coeffs().lookup(
"Cv") >> Cv_ ;
355 this->coeffs().lookup(
"ftVarMin") >> ftVarMin_;
356 reactionRateFlameArea_->read(this->coeffs());
Flame Surface Dennsity (FDS) combustion model.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
virtual bool read()
Update properties.
const objectRegistry & db() const
Return the local objectRegistry.
const double e
Elementary charge.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m2/K4].
const Type & value() const
Return const reference to value.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
Macros for easy insertion into run-time selection tables.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
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))
stressControl lookup("compactNormalStress") >> compactNormalStress
dimensionedScalar exp(const dimensionedScalar &ds)
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
Calculate the gradient of the given field.
static const word propertiesName
Default name of the turbulence properties dictionary.
A class for handling words, derived from string.
const Time & time() const
Return time.
static word groupName(Name name, const word &group)
LESModel< EddyDiffusivity< turbulenceModel > > LESModel
Typedefs for turbulence, RAS and LES models for compressible flow based on the standard laminar trans...
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
const dimensionSet & dimensions() const
Return dimensions.
Calculate the divergence of the given field.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
Internal & ref()
Return a reference to the dimensioned internal field.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar pow3(const dimensionedScalar &ds)
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const Mesh & mesh() const
Return mesh.
Mesh data needed to do the Finite Volume discretisation.
const dimensionedScalar c
Speed of light in a vacuum.
virtual void correct()
Correct combustion rate.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
dimensioned< scalar > mag(const dimensioned< Type > &)
Base class for combustion models using singleStepReactingMixture.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
static autoPtr< reactionRateFlameArea > New(const dictionary &dict, const fvMesh &mesh, const combustionModel &combModel)