38 namespace combustionModels
50 const word& modelType,
53 const word& combustionProperties
63 reactionRateFlameArea_
76 this->
thermo().phasePropertyName(
"ft"),
87 Cv_(this->coeffs().template lookup<scalar>(
"Cv")),
92 ftVarMin_(this->coeffs().template lookup<scalar>(
"ftVarMin"))
104 void Foam::combustionModels::FSD::calculateSourceNorm()
108 const label fuelI = this->fuelIndex();
117 (
s*YFuel - (YO2 - YO2OxiStream_))/(
s*YFuelFuelStream_ + YO2OxiStream_);
129 (ft_*cAux*mgft)().weightedAverage(this->
mesh().
V())
130 /((ft_*cAux)().weightedAverage(this->
mesh().
V()) + small)
144 reactionRateFlameArea_->correct(
sigma);
146 const volScalarField& omegaFuel = reactionRateFlameArea_->omega();
148 const scalar ftStoich =
149 YO2OxiStream_.value()
151 s.value()*YFuelFuelStream_.value() + YO2OxiStream_.value()
158 this->
thermo().phasePropertyName(
"Pc"),
170 this->
thermo().phasePropertyName(
"omegaFuelBar"),
182 momentumTransportModel::typeName
199 const scalar deltaFt = 1/ftDim_;
203 if (ft_[celli] > ftMin_ && ft_[celli] < ftMax_)
205 const scalar ftCell = ft_[celli];
207 if (ftVar[celli] > ftVarMin_)
209 const scalar ftVarc = ftVar[celli];
211 max(ftCell*(ftCell*(1 - ftCell)/ftVarc - 1), 0);
212 const scalar
b =
max(a/ftCell - a, 0);
214 for (
int i=1; i<ftDim_; i++)
216 const scalar ft = i*deltaFt;
217 pc[celli] +=
pow(ft, a - 1)*
pow(1 - ft,
b - 1)*deltaFt;
220 for (
int i=1; i<ftDim_; i++)
222 const scalar ft = i*deltaFt;
223 omegaFuelBar[celli] +=
224 omegaFuel[celli]/omegaF[celli]
228 /(2*
sqr(0.01*omegaF[celli]))
234 omegaFuelBar[celli] /=
max(pc[celli], 1
e-4);
238 omegaFuelBar[celli] =
239 omegaFuel[celli]/omegaF[celli]
240 *
exp(-
sqr(ftCell - ftStoich)/(2*
sqr(0.01*omegaF[celli])));
245 omegaFuelBar[celli] = 0;
252 List<label> productsIndex(2,
label(-1));
255 forAll(this->specieProd(), specieI)
257 if (this->specieProd()[specieI] < 0)
259 productsIndex[i] = specieI;
267 scalar YprodTotal = 0;
270 YprodTotal += this->Yprod0()[productsIndex[j]];
275 if (ft_[celli] < ftStoich)
277 pc[celli] = ft_[celli]*(YprodTotal/ftStoich);
281 pc[celli] = (1 - ft_[celli])*(YprodTotal/(1 - ftStoich));
285 tmp<volScalarField> tproducts
289 this->
thermo().phasePropertyName(
"products"),
299 const label specieI = productsIndex[j];
306 max(scalar(1) - products/
max(pc, scalar(1
e-5)), scalar(0))
309 pc =
min(C_*
c, scalar(1));
313 this->wFuel_ == mgft*pc*omegaFuelBar;
322 calculateSourceNorm();
330 this->coeffs().lookup(
"Cv") >> Cv_ ;
331 this->coeffs().lookup(
"ftVarMin") >> ftVarMin_;
332 reactionRateFlameArea_->read(this->coeffs());
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
const dimensionSet & dimensions() const
Return dimensions.
Generic GeometricField class.
static tmp< GeometricField< Type, GeoMesh, PrimitiveField > > New(const word &name, const Internal &, const PtrList< Patch > &, const HashPtrTable< Source > &=HashPtrTable< Source >())
Return a temporary field constructed from name,.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const objectRegistry & db() const
Return the local objectRegistry.
Base class for combustion models.
Flame Surface Density (FDS) combustion model.
FSD(const word &modelType, const fluidMulticomponentThermo &thermo, const compressibleMomentumTransportModel &turb, const word &combustionProperties)
Construct from components.
virtual void correct()
Correct combustion rate.
virtual ~FSD()
Destructor.
virtual bool read()
Update properties.
Base class for single-step combustion models.
virtual bool read()
Update properties from given dictionary.
Base class for single-phase compressible turbulence models.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Base-class for multi-component fluid thermodynamic properties.
const DimensionedField< scalar, volMesh > & V() const
Return cell volumes.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type and name.
Abstract class for reaction rate per flame area unit.
A class for managing temporary objects.
A class for handling words, derived from string.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
Calculate the divergence of the given field.
Calculate the gradient of the given field.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(lagrangian::Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(lagrangian::Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(lagrangian::Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.name(), lagrangian::cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
defineTypeNameAndDebug(diffusion, 0)
addToRunTimeSelectionTable(combustionModel, diffusion, dictionary)
LESModel< momentumTransportModel > LESModel
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m^2/K^4].
const dimensionedScalar c
Speed of light in a vacuum.
tmp< VolField< typename outerProduct< vector, Type >::type > > grad(const SurfaceField< Type > &ssf)
tmp< VolField< Type > > div(const SurfaceField< Type > &ssf)
dimensionedScalar exp(const dimensionedScalar &ds)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const dimensionSet dimless
const dimensionSet dimLength
void mag(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
const dimensionSet dimTime
void pow(LagrangianPatchField< typename powProduct< Type, r >::type > &f, const LagrangianPatchField< Type > &f1)
VolField< scalar > volScalarField
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
void pow3(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
void sqr(LagrangianPatchField< typename outerProduct< Type, Type >::type > &f, const LagrangianPatchField< Type > &f1)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
const dimensionSet dimMass
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
fluidMulticomponentThermo & thermo