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();
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;
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));
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());
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.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
fluidReactionThermo & thermo
virtual bool read()
Update properties.
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)
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, const Internal &, const PtrList< fvPatchField< scalar >> &)
Return a temporary field constructed from name,.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m K].
Base-class for multi-component fluid thermodynamic properties.
const dimensionSet dimless
LESModel< momentumTransportModel > LESModel
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
const dimensionedScalar c
Speed of light in a vacuum.
Macros for easy insertion into run-time selection tables.
const dimensionSet dimLength
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m^2/K^4].
const dimensionSet dimTime
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))
FSD(const word &modelType, const fluidReactionThermo &thermo, const compressibleMomentumTransportModel &turb, const word &combustionProperties)
Construct from components.
dimensionedScalar exp(const dimensionedScalar &ds)
Calculate the gradient of the given field.
A class for handling words, derived from string.
const Type & value() const
Return const reference to value.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
Calculate the divergence of the given field.
const Mesh & mesh() const
Return mesh.
const dimensionSet dimMass
Internal & ref()
Return a reference to the dimensioned internal field.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar pow3(const dimensionedScalar &ds)
virtual bool read()
Update properties from given dictionary.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
virtual void correct()
Correct combustion rate.
dimensioned< scalar > mag(const dimensioned< Type > &)
Base class for combustion models using basicSpecieMixture.
const doubleScalar e
Elementary charge.
A class for managing temporary objects.
const objectRegistry & db() const
Return the local objectRegistry.
defineTypeNameAndDebug(diffusion, 0)
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)
Base class for single-phase compressible turbulence models.
addToRunTimeSelectionTable(combustionModel, diffusion, dictionary)
virtual ~FSD()
Destructor.