mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Changes to input for the PDR models
This commit is contained in:
@ -81,7 +81,7 @@ bool Foam::PDRDragModel::read(const dictionary& PDRProperties)
|
||||
{
|
||||
PDRDragModelCoeffs_ = PDRProperties.subDict(type() + "Coeffs");
|
||||
|
||||
PDRDragModelCoeffs_.lookup("PDRDragModel") >> on_;
|
||||
PDRDragModelCoeffs_.lookup("drag") >> on_;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -91,24 +91,79 @@ Foam::PDRDragModels::basic::~basic()
|
||||
|
||||
Foam::tmp<Foam::volSymmTensorField> Foam::PDRDragModels::basic::Dcu() const
|
||||
{
|
||||
tmp<volSymmTensorField> tDragDcu
|
||||
(
|
||||
new volSymmTensorField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"tDragDcu",
|
||||
U_.mesh().time().constant(),
|
||||
U_.mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
U_.mesh(),
|
||||
dimensionedSymmTensor
|
||||
(
|
||||
"zero",
|
||||
dimMass/dimTime/pow(dimLength, 3),
|
||||
pTraits<symmTensor>::zero
|
||||
),
|
||||
zeroGradientFvPatchSymmTensorField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
volSymmTensorField& DragDcu = tDragDcu();
|
||||
|
||||
if (on_)
|
||||
{
|
||||
const volScalarField& betav =
|
||||
U_.db().lookupObject<volScalarField>("betav");
|
||||
|
||||
return (0.5*rho_)*CR_*mag(U_) + (Csu*I)*betav*turbulence_.muEff()*sqr(Aw_);
|
||||
DragDcu = (0.5*rho_)*CR_*mag(U_) + (Csu*I)*betav*turbulence_.muEff()*sqr(Aw_);
|
||||
}
|
||||
|
||||
return tDragDcu;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::PDRDragModels::basic::Gk() const
|
||||
{
|
||||
tmp<volScalarField> tGk
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"tGk",
|
||||
U_.mesh().time().constant(),
|
||||
U_.mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
U_.mesh(),
|
||||
dimensionedScalar("zero", dimMass/dimLength/pow(dimTime, 3), 0.0),
|
||||
zeroGradientFvPatchVectorField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField& Gk = tGk();
|
||||
|
||||
if (on_)
|
||||
{
|
||||
const volScalarField& betav =
|
||||
U_.db().lookupObject<volScalarField>("betav");
|
||||
|
||||
const volSymmTensorField& CT =
|
||||
U_.db().lookupObject<volSymmTensorField>("CT");
|
||||
|
||||
return
|
||||
Gk =
|
||||
(0.5*rho_)*mag(U_)*(U_ & CT & U_)
|
||||
+ Csk*betav*turbulence_.muEff()*sqr(Aw_)*magSqr(U_);
|
||||
}
|
||||
|
||||
return tGk;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -50,7 +50,12 @@ Foam::XiEqModels::Gulder::Gulder
|
||||
:
|
||||
XiEqModel(XiEqProperties, thermo, turbulence, Su),
|
||||
XiEqCoef_(readScalar(XiEqModelCoeffs_.lookup("XiEqCoef"))),
|
||||
SuMin_(0.01*Su.average())
|
||||
SuMin_(0.01*Su.average()),
|
||||
uPrimeCoef_(readScalar(XiEqModelCoeffs_.lookup("uPrimeCoef"))),
|
||||
subGridSchelkin_
|
||||
(
|
||||
readBool(XiEqModelCoeffs_.lookup("subGridSchelkin"))
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
@ -67,9 +72,9 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::Gulder::XiEq() const
|
||||
volScalarField up(sqrt((2.0/3.0)*turbulence_.k()));
|
||||
const volScalarField& epsilon = turbulence_.epsilon();
|
||||
|
||||
if (subGridSchelkin())
|
||||
if (subGridSchelkin_)
|
||||
{
|
||||
up.internalField() += calculateSchelkinEffect();
|
||||
up.internalField() += calculateSchelkinEffect(uPrimeCoef_);
|
||||
}
|
||||
|
||||
volScalarField tauEta(sqrt(mag(thermo_.muu()/(thermo_.rhou()*epsilon))));
|
||||
|
||||
@ -61,6 +61,12 @@ class Gulder
|
||||
//- Minimum laminar burning velocity
|
||||
const dimensionedScalar SuMin_;
|
||||
|
||||
//- Schelkin effect Model constant
|
||||
scalar uPrimeCoef_;
|
||||
|
||||
//- Use sub-grid Schelkin effect
|
||||
bool subGridSchelkin_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
|
||||
@ -53,6 +53,11 @@ Foam::XiEqModels::SCOPEXiEq::SCOPEXiEq
|
||||
XiEqExp_(readScalar(XiEqModelCoeffs_.lookup("XiEqExp"))),
|
||||
lCoef_(readScalar(XiEqModelCoeffs_.lookup("lCoef"))),
|
||||
SuMin_(0.01*Su.average()),
|
||||
uPrimeCoef_(readScalar(XiEqModelCoeffs_.lookup("uPrimeCoef"))),
|
||||
subGridSchelkin_
|
||||
(
|
||||
readBool(XiEqModelCoeffs_.lookup("subGridSchelkin"))
|
||||
),
|
||||
MaModel
|
||||
(
|
||||
IOdictionary
|
||||
@ -84,9 +89,9 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::SCOPEXiEq::XiEq() const
|
||||
const volScalarField& epsilon = turbulence_.epsilon();
|
||||
|
||||
volScalarField up(sqrt((2.0/3.0)*k));
|
||||
if (subGridSchelkin())
|
||||
if (subGridSchelkin_)
|
||||
{
|
||||
up.internalField() += calculateSchelkinEffect();
|
||||
up.internalField() += calculateSchelkinEffect(uPrimeCoef_);
|
||||
}
|
||||
|
||||
volScalarField l(lCoef_*sqrt(3.0/2.0)*up*k/epsilon);
|
||||
|
||||
@ -70,6 +70,12 @@ class SCOPEXiEq
|
||||
//- Minimum Su
|
||||
dimensionedScalar SuMin_;
|
||||
|
||||
//- Schelkin effect Model constant
|
||||
scalar uPrimeCoef_;
|
||||
|
||||
//- Use sub-grid Schelkin effect
|
||||
bool subGridSchelkin_;
|
||||
|
||||
//- The SCOPE laminar flame speed model used to obtain the
|
||||
// Marstein number. Note: the laminar flame speed need not be
|
||||
// obtained form the same model.
|
||||
|
||||
@ -119,7 +119,7 @@ void Foam::XiEqModel::writeFields() const
|
||||
}
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::XiEqModel::calculateSchelkinEffect() const
|
||||
Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const
|
||||
{
|
||||
const fvMesh& mesh = Su_.mesh();
|
||||
|
||||
@ -188,7 +188,7 @@ Foam::XiEqModel::calculateSchelkinEffect() const
|
||||
|
||||
const scalarField cellWidth(pow(mesh.V(), 1.0/3.0));
|
||||
|
||||
const scalarField upLocal(uPrimeCoef_*sqrt((U & CT & U)*cellWidth));
|
||||
const scalarField upLocal(uPrimeCoef*sqrt((U & CT & U)*cellWidth));
|
||||
|
||||
const scalarField deltaUp(upLocal*(max(scalar(1.0), pow(nr, 0.5)) - 1.0));
|
||||
|
||||
|
||||
@ -80,12 +80,6 @@ protected:
|
||||
//
|
||||
volSymmTensorField nsv_;
|
||||
|
||||
//- Schelkin effect Model constant
|
||||
scalar uPrimeCoef_;
|
||||
|
||||
//- Use sub-grid Schelkin effect
|
||||
bool subGridSchelkin_;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@ -162,14 +156,9 @@ public:
|
||||
return turbulence_.muEff();
|
||||
}
|
||||
|
||||
//- Return state of the sub-grid Schelkin effect
|
||||
bool subGridSchelkin() const
|
||||
{
|
||||
return subGridSchelkin_;
|
||||
}
|
||||
|
||||
//- Return the sub-grid Schelkin effect
|
||||
tmp<volScalarField> calculateSchelkinEffect() const;
|
||||
tmp<volScalarField> calculateSchelkinEffect(const scalar) const;
|
||||
|
||||
//- Update properties from given dictionary
|
||||
virtual bool read(const dictionary& XiEqProperties) = 0;
|
||||
|
||||
@ -50,26 +50,26 @@ instabilityCoeffs
|
||||
XiEqModelL
|
||||
{
|
||||
XiEqModel Gulder;
|
||||
uPrimeCoef 1.0;
|
||||
subGridSchelkin true;
|
||||
|
||||
GulderCoeffs
|
||||
{
|
||||
XiEqCoef 0.62;
|
||||
uPrimeCoef 1.0;
|
||||
subGridSchelkin true;
|
||||
}
|
||||
}
|
||||
|
||||
XiEqModelH
|
||||
{
|
||||
XiEqModel SCOPEXiEq;
|
||||
uPrimeCoef 1.0;
|
||||
subGridSchelkin true;
|
||||
|
||||
SCOPEXiEqCoeffs
|
||||
{
|
||||
XiEqCoef 1.6;
|
||||
XiEqExp 0.33333;
|
||||
lCoef 0.336;
|
||||
uPrimeCoef 1.0;
|
||||
subGridSchelkin true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ laplacianSchemes
|
||||
laplacian(muEff,U) Gauss linear limited 0.333;
|
||||
laplacian(DkEff,k) Gauss linear limited 0.333;
|
||||
laplacian(DepsilonEff,epsilon) Gauss linear limited 0.333;
|
||||
laplacian((rho*inv((((1)*A(U))+((((0.5*rho)*CR)*mag(U))+((((Csu*(1))*betav)*muEff)*sqr(Aw)))))),p) Gauss linear limited 0.333;
|
||||
laplacian((rho*inv((((1)*A(U))+tDragDcu))),p) Gauss linear limited 0.333;
|
||||
laplacian(Db,b) Gauss linear limited 0.333;
|
||||
laplacian(Db,ft) Gauss linear limited 0.333;
|
||||
laplacian(Db,h) Gauss linear limited 0.333;
|
||||
|
||||
Reference in New Issue
Block a user