34 namespace combustionModels
39 template<
class ReactionThermo,
class ThermoType>
42 const word& modelType,
43 const ReactionThermo& thermo,
45 const word& combustionProperties
55 reactionRateFlameArea_
68 this->
thermo().phasePropertyName(
"ft"),
79 Cv_(this->coeffs().template lookup<scalar>(
"Cv")),
84 ftVarMin_(this->coeffs().
template lookup<scalar>(
"ftVarMin"))
90 template<
class ReactionThermo,
class ThermoType>
97 template<
class ReactionThermo,
class ThermoType>
102 const label fuelI = this->fuelIndex();
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()
153 this->
thermo().phasePropertyName(
"Pc"),
165 this->
thermo().phasePropertyName(
"omegaFuelBar"),
177 momentumTransportModel::typeName
194 scalar deltaFt = 1.0/ftDim_;
198 if (ft_[celli] > ftMin_ && ft_[celli] < ftMax_)
200 scalar ftCell = ft_[celli];
202 if (ftVar[celli] > ftVarMin_)
204 scalar ftVarc = ftVar[celli];
206 max(ftCell*(ftCell*(1.0 - ftCell)/ftVarc - 1.0), 0.0);
207 scalar
b =
max(a/ftCell - a, 0.0);
209 for (
int i=1; i<ftDim_; i++)
211 scalar ft = i*deltaFt;
212 pc[celli] +=
pow(ft, a-1.0)*
pow(1.0 - ft, b - 1.0)*deltaFt;
215 for (
int i=1; i<ftDim_; i++)
217 scalar ft = i*deltaFt;
218 omegaFuelBar[celli] +=
219 omegaFuel[celli]/omegaF[celli]
223 /(2.0*
sqr(0.01*omegaF[celli]))
226 *
pow(1.0 - ft, b - 1.0)
229 omegaFuelBar[celli] /=
max(pc[celli], 1
e-4);
233 omegaFuelBar[celli] =
234 omegaFuel[celli]/omegaF[celli]
235 *
exp(-
sqr(ftCell - ftStoich)/(2.0*
sqr(0.01*omegaF[celli])));
240 omegaFuelBar[celli] = 0.0;
250 forAll(this->specieProd(), specieI)
252 if (this->specieProd()[specieI] < 0)
254 productsIndex[i] = specieI;
262 scalar YprodTotal = 0;
265 YprodTotal += this->Yprod0()[productsIndex[j]];
270 if (ft_[celli] < ftStoich)
272 pc[celli] = ft_[celli]*(YprodTotal/ftStoich);
276 pc[celli] = (1.0 - ft_[celli])*(YprodTotal/(1.0 - ftStoich));
284 this->
thermo().phasePropertyName(
"products"),
294 label specieI = productsIndex[j];
301 max(scalar(1) - products/
max(pc, scalar(1
e-5)), scalar(0))
304 pc =
min(C_*c, scalar(1));
308 this->wFuel_ == mgft*pc*omegaFuelBar;
312 template<
class ReactionThermo,
class ThermoType>
318 calculateSourceNorm();
322 template<
class ReactionThermo,
class ThermoType>
327 this->coeffs().lookup(
"Cv") >> Cv_ ;
328 this->coeffs().lookup(
"ftVarMin") >> ftVarMin_;
329 reactionRateFlameArea_->read(this->coeffs());
Flame Surface Density (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.
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/m^2/K^4].
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, const Internal &, const PtrList< fvPatchField< scalar >> &)
Return a temporary field constructed from name,.
LESModel< momentumTransportModel > LESModel
rhoReactionThermo & thermo
const dimensionedScalar & c
Speed of light in a vacuum.
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))
dimensionedScalar exp(const dimensionedScalar &ds)
const dimensionedScalar & b
Wien displacement law constant: default SI units: [m K].
Calculate the gradient of the given field.
A class for handling words, derived from string.
const Type & value() const
Return const reference to value.
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.
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 multiComponentMixture.
FSD(const word &modelType, const ReactionThermo &thermo, const compressibleMomentumTransportModel &turb, const word &combustionProperties)
Construct from components.
const doubleScalar e
Elementary charge.
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)
Abstract base class for turbulence models (RAS, LES and laminar).
virtual ~FSD()
Destructor.