mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
combustionModels: Changed volField initialisation to constructors rather than assignments for clang
This commit is contained in:
@ -105,13 +105,13 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm()
|
|||||||
(s*YFuel - (YO2 - YO2OxiStream_))/(s*YFuelFuelStream_ + YO2OxiStream_);
|
(s*YFuel - (YO2 - YO2OxiStream_))/(s*YFuelFuelStream_ + YO2OxiStream_);
|
||||||
|
|
||||||
|
|
||||||
volVectorField nft = fvc::grad(ft_);
|
volVectorField nft(fvc::grad(ft_));
|
||||||
|
|
||||||
volScalarField mgft = mag(nft);
|
volScalarField mgft(mag(nft));
|
||||||
|
|
||||||
surfaceVectorField SfHat = this->mesh().Sf()/this->mesh().magSf();
|
surfaceVectorField SfHat(this->mesh().Sf()/this->mesh().magSf());
|
||||||
|
|
||||||
volScalarField cAux = scalar(1) - ft_;
|
volScalarField cAux(scalar(1) - ft_);
|
||||||
|
|
||||||
dimensionedScalar dMgft = 1.0e-3*
|
dimensionedScalar dMgft = 1.0e-3*
|
||||||
(ft_*cAux*mgft)().weightedAverage(this->mesh().V())
|
(ft_*cAux*mgft)().weightedAverage(this->mesh().V())
|
||||||
@ -124,8 +124,10 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm()
|
|||||||
|
|
||||||
const volVectorField& U = YO2.db().lookupObject<volVectorField>("U");
|
const volVectorField& U = YO2.db().lookupObject<volVectorField>("U");
|
||||||
|
|
||||||
const volScalarField sigma =
|
const volScalarField sigma
|
||||||
(nft & nft)*fvc::div(U) - (nft & fvc::grad(U) & nft);
|
(
|
||||||
|
(nft & nft)*fvc::div(U) - (nft & fvc::grad(U) & nft)
|
||||||
|
);
|
||||||
|
|
||||||
reactionRateFlameArea_->correct(sigma);
|
reactionRateFlameArea_->correct(sigma);
|
||||||
|
|
||||||
@ -186,16 +188,18 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm()
|
|||||||
YO2.db().lookupObject<compressible::LESModel>("LESProperties");
|
YO2.db().lookupObject<compressible::LESModel>("LESProperties");
|
||||||
|
|
||||||
const volScalarField& delta = lesModel.delta();
|
const volScalarField& delta = lesModel.delta();
|
||||||
const volScalarField ftVar = Cv_*sqr(delta)*sqr(mgft);
|
const volScalarField ftVar(Cv_*sqr(delta)*sqr(mgft));
|
||||||
|
|
||||||
// Thickened flame (average flame thickness for counterflow configuration
|
// Thickened flame (average flame thickness for counterflow configuration
|
||||||
// is 1.5 mm)
|
// is 1.5 mm)
|
||||||
|
|
||||||
volScalarField deltaF =
|
volScalarField deltaF
|
||||||
lesModel.delta()/dimensionedScalar("flame",dimLength, 1.5e-3);
|
(
|
||||||
|
lesModel.delta()/dimensionedScalar("flame",dimLength, 1.5e-3)
|
||||||
|
);
|
||||||
|
|
||||||
// Linear correlation between delta and flame thickness
|
// Linear correlation between delta and flame thickness
|
||||||
volScalarField omegaF = max(deltaF*(4.0/3.0) + (2.0/3.0), 1.0);
|
volScalarField omegaF(max(deltaF*(4.0/3.0) + (2.0/3.0), 1.0));
|
||||||
|
|
||||||
scalar deltaFt = 1.0/ftDim_;
|
scalar deltaFt = 1.0/ftDim_;
|
||||||
|
|
||||||
@ -315,11 +319,11 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm()
|
|||||||
products += Yp;
|
products += Yp;
|
||||||
}
|
}
|
||||||
|
|
||||||
volScalarField c = max(scalar(1.0) - products/max(pc, 1e-5), 0.0);
|
volScalarField c(max(scalar(1.0) - products/max(pc, 1e-5), 0.0));
|
||||||
|
|
||||||
pc = min(C_*c, scalar(1.0));
|
pc = min(C_*c, scalar(1.0));
|
||||||
|
|
||||||
const volScalarField fres = this->singleMixture_.fres(fuelI);
|
const volScalarField fres(this->singleMixture_.fres(fuelI));
|
||||||
|
|
||||||
this->wFuel_ == mgft*pc*omegaFuelBar;
|
this->wFuel_ == mgft*pc*omegaFuelBar;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -100,18 +100,22 @@ void Foam::reactionRateFlameAreaModels::relaxation::correct
|
|||||||
omega_.db().lookupObject<compressible::LESModel>("LESProperties");
|
omega_.db().lookupObject<compressible::LESModel>("LESProperties");
|
||||||
|
|
||||||
// Total strain : resolved and sub-grid (just LES for now)
|
// Total strain : resolved and sub-grid (just LES for now)
|
||||||
const volScalarField sigmaTotal =
|
const volScalarField sigmaTotal
|
||||||
sigma + alpha_*lesModel.epsilon()/(lesModel.k() + lesModel.kMin());
|
(
|
||||||
|
sigma + alpha_*lesModel.epsilon()/(lesModel.k() + lesModel.kMin())
|
||||||
|
);
|
||||||
|
|
||||||
const volScalarField omegaInf = correlation_.omega0Sigma(sigmaTotal);
|
const volScalarField omegaInf(correlation_.omega0Sigma(sigmaTotal));
|
||||||
|
|
||||||
dimensionedScalar sigma0("sigma0", sigma.dimensions(), 0.0);
|
dimensionedScalar sigma0("sigma0", sigma.dimensions(), 0.0);
|
||||||
|
|
||||||
const volScalarField tau = C_*mag(sigmaTotal);
|
const volScalarField tau(C_*mag(sigmaTotal));
|
||||||
|
|
||||||
volScalarField Rc =
|
volScalarField Rc
|
||||||
|
(
|
||||||
(tau*omegaInf*(omega0 - omegaInf) + sqr(omegaMin)*sigmaExt)
|
(tau*omegaInf*(omega0 - omegaInf) + sqr(omegaMin)*sigmaExt)
|
||||||
/(sqr(omega0 - omegaInf) + sqr(omegaMin));
|
/(sqr(omega0 - omegaInf) + sqr(omegaMin))
|
||||||
|
);
|
||||||
|
|
||||||
const volScalarField rho(combModel_.rho());
|
const volScalarField rho(combModel_.rho());
|
||||||
const surfaceScalarField phi(combModel_.phi());
|
const surfaceScalarField phi(combModel_.phi());
|
||||||
|
|||||||
Reference in New Issue
Block a user