34 namespace combustionModels
39 template<
class CombThermoType,
class ThermoType>
40 FSD<CombThermoType, ThermoType>::FSD
42 const word& modelType,
44 const word& combustionProperties,
55 reactionRateFlameArea_
90 template<
class CombThermoType,
class ThermoType>
97 template<
class CombThermoType,
class ThermoType>
100 this->singleMixturePtr_->fresCorrect();
102 const label fuelI = this->singleMixturePtr_->fuelIndex();
104 const volScalarField& YFuel = this->thermoPtr_->composition().Y()[fuelI];
106 const volScalarField& YO2 = this->thermoPtr_->composition().Y(
"O2");
111 (s*YFuel - (YO2 - YO2OxiStream_))/(s*YFuelFuelStream_ + YO2OxiStream_);
123 (ft_*cAux*mgft)().weightedAverage(this->
mesh().V())
124 /((ft_*cAux)().weightedAverage(this->
mesh().V()) + SMALL)
138 reactionRateFlameArea_->correct(sigma);
140 const volScalarField& omegaFuel = reactionRateFlameArea_->omega();
143 const scalar ftStoich =
144 YO2OxiStream_.value()
146 s.
value()*YFuelFuelStream_.value() + YO2OxiStream_.value()
213 scalar deltaFt = 1.0/ftDim_;
217 if (ft_[celli] > ftMin_ && ft_[celli] < ftMax_)
219 scalar ftCell = ft_[celli];
221 if (ftVar[celli] > ftVarMin_)
223 scalar ftVarc = ftVar[celli];
225 max(ftCell*(ftCell*(1.0 - ftCell)/ftVarc - 1.0), 0.0);
226 scalar
b =
max(a/ftCell - a, 0.0);
228 for (
int i=1; i<ftDim_; i++)
230 scalar ft = i*deltaFt;
231 pc[celli] +=
pow(ft, a-1.0)*
pow(1.0 - ft, b - 1.0)*deltaFt;
234 for (
int i=1; i<ftDim_; i++)
236 scalar ft = i*deltaFt;
237 omegaFuelBar[celli] +=
238 omegaFuel[celli]/omegaF[celli]
242 /(2.0*
sqr(0.01*omegaF[celli]))
245 *
pow(1.0 - ft, b - 1.0)
248 omegaFuelBar[celli] /=
max(pc[celli], 1
e-4);
252 omegaFuelBar[celli] =
253 omegaFuel[celli]/omegaF[celli]
254 *
exp(-
sqr(ftCell - ftStoich)/(2.0*
sqr(0.01*omegaF[celli])));
259 omegaFuelBar[celli] = 0.0;
269 forAll(this->singleMixturePtr_->specieProd(), specieI)
271 if (this->singleMixturePtr_->specieProd()[specieI] < 0)
273 productsIndex[i] = specieI;
281 scalar YprodTotal = 0;
284 YprodTotal += this->singleMixturePtr_->Yprod0()[productsIndex[j]];
289 if (ft_[celli] < ftStoich)
291 pc[celli] = ft_[celli]*(YprodTotal/ftStoich);
295 pc[celli] = (1.0 - ft_[celli])*(YprodTotal/(1.0 - ftStoich));
320 label specieI = productsIndex[j];
321 const volScalarField& Yp = this->thermoPtr_->composition().Y()[specieI];
327 max(scalar(1) - products/
max(pc, scalar(1
e-5)), scalar(0))
330 pc =
min(C_*c, scalar(1));
334 this->wFuel_ == mgft*pc*omegaFuelBar;
338 template<
class CombThermoType,
class ThermoType>
346 calculateSourceNorm();
351 template<
class CombThermoType,
class ThermoType>
356 this->coeffs().lookup(
"Cv") >> Cv_ ;
357 this->coeffs().lookup(
"ftVarMin") >> ftVarMin_;
358 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 double e
Elementary charge.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
T & ref() const
Return non-const reference or generate a fatal error.
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].
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
Macros for easy insertion into run-time selection tables.
const dimensionSet & dimensions() const
Return dimensions.
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.
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...
const Type & value() const
Return const reference to value.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
Calculate the divergence of the given field.
const Mesh & mesh() const
Return mesh.
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 Time & time() const
Return time.
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.
const objectRegistry & db() const
Return the local objectRegistry.
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)
virtual ~FSD()
Destructor.