38 namespace combustionModels
50 const word& modelType,
53 const word& combustionProperties
63 reactionRateFlameArea_
76 this->
thermo().phasePropertyName(
"ft"),
77 this->mesh().time().
name(),
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();
149 const scalar ftStoich =
150 YO2OxiStream_.value()
152 s.value()*YFuelFuelStream_.value() + YO2OxiStream_.value()
159 this->
thermo().phasePropertyName(
"Pc"),
171 this->
thermo().phasePropertyName(
"omegaFuelBar"),
183 momentumTransportModel::typeName
200 scalar deltaFt = 1.0/ftDim_;
204 if (ft_[celli] > ftMin_ && ft_[celli] < ftMax_)
206 scalar ftCell = ft_[celli];
208 if (ftVar[celli] > ftVarMin_)
210 scalar ftVarc = ftVar[celli];
212 max(ftCell*(ftCell*(1.0 - ftCell)/ftVarc - 1.0), 0.0);
213 scalar
b =
max(a/ftCell - a, 0.0);
215 for (
int i=1; i<ftDim_; i++)
217 scalar ft = i*deltaFt;
218 pc[celli] +=
pow(ft, a-1.0)*
pow(1.0 - ft,
b - 1.0)*deltaFt;
221 for (
int i=1; i<ftDim_; i++)
223 scalar ft = i*deltaFt;
224 omegaFuelBar[celli] +=
225 omegaFuel[celli]/omegaF[celli]
229 /(2.0*
sqr(0.01*omegaF[celli]))
232 *
pow(1.0 - ft,
b - 1.0)
235 omegaFuelBar[celli] /=
max(pc[celli], 1
e-4);
239 omegaFuelBar[celli] =
240 omegaFuel[celli]/omegaF[celli]
241 *
exp(-
sqr(ftCell - ftStoich)/(2.0*
sqr(0.01*omegaF[celli])));
246 omegaFuelBar[celli] = 0.0;
253 List<label> productsIndex(2,
label(-1));
256 forAll(this->specieProd(), specieI)
258 if (this->specieProd()[specieI] < 0)
260 productsIndex[i] = specieI;
268 scalar YprodTotal = 0;
271 YprodTotal += this->Yprod0()[productsIndex[j]];
276 if (ft_[celli] < ftStoich)
278 pc[celli] = ft_[celli]*(YprodTotal/ftStoich);
282 pc[celli] = (1.0 - ft_[celli])*(YprodTotal/(1.0 - ftStoich));
286 tmp<volScalarField> tproducts
290 this->
thermo().phasePropertyName(
"products"),
300 label specieI = productsIndex[j];
307 max(scalar(1) - products/
max(pc, scalar(1
e-5)), scalar(0))
310 pc =
min(C_*
c, scalar(1));
314 this->wFuel_ == mgft*pc*omegaFuelBar;
323 calculateSourceNorm();
331 this->coeffs().lookup(
"Cv") >> Cv_ ;
332 this->coeffs().lookup(
"ftVarMin") >> ftVarMin_;
333 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, PatchField, GeoMesh > > New(const word &name, const Internal &, const PtrList< PatchField< Type >> &, 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 keyword definitions, which are a keyword followed by any number of values (e....
Base-class for multi-component fluid thermodynamic properties.
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.
Calculate the divergence of the given field.
Calculate the gradient of the given field.
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.name(), 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.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar pow3(const dimensionedScalar &ds)
word name(const bool)
Return a word representation of a bool.
const dimensionSet dimless
const dimensionSet dimLength
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
const dimensionSet dimTime
VolField< scalar > volScalarField
dimensioned< scalar > mag(const dimensioned< Type > &)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
const dimensionSet dimMass
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
fluidMulticomponentThermo & thermo