multiphase (VoF): Added support for general turbulence models

Required the addition of the divDevRhoR function to all incompressible turbulence models
This commit is contained in:
Henry
2012-07-27 14:56:01 +01:00
parent ccba34694d
commit 1464c4ff5c
91 changed files with 774 additions and 146 deletions

View File

@ -1,17 +1,8 @@
surfaceScalarField muEff
(
"muEff",
twoPhaseProperties.muf()
+ fvc::interpolate(rho*turbulence->nut())
);
fvVectorMatrix UEqn
(
fvm::ddt(rho, U)
+ fvm::div(phi, U)
- fvm::laplacian(muEff, U)
//- (fvc::grad(U) & fvc::grad(muf))
- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf()))
+ turbulence->divDevRhoReff(rho, U)
);
UEqn.relax();

View File

@ -1,17 +1,8 @@
surfaceScalarField muEff
(
"muEff",
twoPhaseProperties.muf()
+ fvc::interpolate(rho*turbulence->nut())
);
fvVectorMatrix UEqn
(
fvm::ddt(rho, U)
+ fvm::div(rhoPhi, U)
- fvm::laplacian(muEff, U)
- (fvc::grad(U) & fvc::grad(muEff))
//- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf()))
+ turbulence->divDevRhoReff(rho, U)
);
UEqn.relax();

View File

@ -1,17 +1,8 @@
surfaceScalarField muEff
(
"muEff",
twoPhaseProperties.muf()
+ fvc::interpolate(rho*turbulence->nut())
);
fvVectorMatrix UEqn
(
fvm::ddt(rho, U)
+ fvm::div(rhoPhi, U)
- fvm::laplacian(muEff, U)
- (fvc::grad(U) & fvc::grad(muEff))
//- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf()))
+ turbulence->divDevRhoReff(rho, U)
);
UEqn.relax();

View File

@ -1,18 +1,9 @@
surfaceScalarField muEff
(
"muEff",
twoPhaseProperties->muf()
+ fvc::interpolate(rho*turbulence->nut())
);
fvVectorMatrix UEqn
(
fvm::ddt(rho, U)
+ fvm::div(rhoPhi, U)
- fvm::Sp(fvc::ddt(rho) + fvc::div(rhoPhi), U)
- fvm::laplacian(muEff, U)
- (fvc::grad(U) & fvc::grad(muEff))
//- fvc::div(muEff*(fvc::interpolate(dev2(fvc::grad(U))) & mesh.Sf()))
+ turbulence->divDevRhoReff(rho, U)
);
UEqn.relax();

View File

@ -1,17 +1,8 @@
surfaceScalarField muEff
(
"muEff",
mixture.muf()
+ fvc::interpolate(rho*turbulence->nut())
);
fvVectorMatrix UEqn
(
fvm::ddt(rho, U)
+ fvm::div(mixture.rhoPhi(), U)
- fvm::laplacian(muEff, U)
- (fvc::grad(U) & fvc::grad(muEff))
//- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf()))
+ turbulence->divDevRhoReff(rho, U)
);
UEqn.relax();

View File

@ -11,7 +11,6 @@
)
- fvm::laplacian(muEff, U, "laplacian(muEff,U)")
- (fvc::grad(U) & fvc::grad(muEff))
//- fvc::div(muEff*dev2(T(fvc::grad(U))))
);
UEqn.relax();

View File

@ -1,17 +1,8 @@
surfaceScalarField muEff
(
"muEff",
twoPhaseProperties.muf()
+ fvc::interpolate(rho*turbulence->nut())
);
fvVectorMatrix UEqn
(
fvm::ddt(rho, U)
+ fvm::div(rhoPhi, U)
- fvm::laplacian(muEff, U)
- (fvc::grad(U) & fvc::grad(muEff))
//- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf()))
+ turbulence->divDevRhoReff(rho, U)
);
UEqn.relax();

View File

@ -66,14 +66,14 @@ Foam::tmp<Foam::volSymmTensorField> Foam::forces::devRhoReff() const
const compressible::LESModel& les =
obr_.lookupObject<compressible::LESModel>("LESProperties");
return les.devRhoBeff();
return les.devRhoReff();
}
else if (obr_.foundObject<incompressible::LESModel>("LESProperties"))
{
const incompressible::LESModel& les
= obr_.lookupObject<incompressible::LESModel>("LESProperties");
return rho()*les.devBeff();
return rho()*les.devReff();
}
else if (obr_.foundObject<basicThermo>("thermophysicalProperties"))
{

View File

@ -87,17 +87,34 @@ tmp<volSymmTensorField> GenEddyVisc::B() const
}
tmp<volSymmTensorField> GenEddyVisc::devBeff() const
tmp<volSymmTensorField> GenEddyVisc::devReff() const
{
return -nuEff()*dev(twoSymm(fvc::grad(U())));
}
tmp<fvVectorMatrix> GenEddyVisc::divDevBeff(volVectorField& U) const
tmp<fvVectorMatrix> GenEddyVisc::divDevReff(volVectorField& U) const
{
return
(
- fvm::laplacian(nuEff(), U) - fvc::div(nuEff()*dev(T(fvc::grad(U))))
- fvm::laplacian(nuEff(), U)
- fvc::div(nuEff()*dev(T(fvc::grad(U))))
);
}
tmp<fvVectorMatrix> GenEddyVisc::divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const
{
volScalarField muEff("muEff", rho*nuEff());
return
(
- fvm::laplacian(muEff, U)
- fvc::div(muEff*dev(T(fvc::grad(U))))
);
}

View File

@ -118,11 +118,19 @@ public:
//- Return the effective sub-grid turbulence stress tensor
// including the laminar stress
virtual tmp<volSymmTensorField> devBeff() const;
virtual tmp<volSymmTensorField> devReff() const;
//- Return the deviatoric part of the effective sub-grid
// turbulence stress tensor including the laminar stress
virtual tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const;
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
//- Return the deviatoric part of the effective sub-grid
// turbulence stress tensor including the laminar stress
virtual tmp<fvVectorMatrix> divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const;
//- Correct Eddy-Viscosity and related properties
virtual void correct(const tmp<volTensorField>& gradU);

View File

@ -115,7 +115,7 @@ GenSGSStress::GenSGSStress
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
tmp<volSymmTensorField> GenSGSStress::devBeff() const
tmp<volSymmTensorField> GenSGSStress::devReff() const
{
return tmp<volSymmTensorField>
(
@ -135,7 +135,7 @@ tmp<volSymmTensorField> GenSGSStress::devBeff() const
}
tmp<fvVectorMatrix> GenSGSStress::divDevBeff
tmp<fvVectorMatrix> GenSGSStress::divDevReff
(
volVectorField& U
) const
@ -164,6 +164,38 @@ tmp<fvVectorMatrix> GenSGSStress::divDevBeff
}
tmp<fvVectorMatrix> GenSGSStress::divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const
{
volScalarField muEff("muEff", rho*nuEff());
if (couplingFactor_.value() > 0.0)
{
return
(
fvc::div(rho*B_ + couplingFactor_*rho*nuSgs_*fvc::grad(U))
+ fvc::laplacian
(
(1.0 - couplingFactor_)*rho*nuSgs_, U, "laplacian(muEff,U)"
)
- fvm::laplacian(muEff, U)
);
}
else
{
return
(
fvc::div(rho*B_)
+ fvc::laplacian(rho*nuSgs_, U, "laplacian(muEff,U)")
- fvm::laplacian(muEff, U)
);
}
}
bool GenSGSStress::read()
{
if (LESModel::read())

View File

@ -128,11 +128,19 @@ public:
//- Return the effective sub-grid turbulence stress tensor
// including the laminar stress
virtual tmp<volSymmTensorField> devBeff() const;
virtual tmp<volSymmTensorField> devReff() const;
//- Returns div(B).
// This is the additional term due to the filtering of the NSE.
virtual tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const;
//- Return the deviatoric part of the effective sub-grid
// turbulence stress tensor including the laminar stress
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
//- Return the deviatoric part of the effective sub-grid
// turbulence stress tensor including the laminar stress
virtual tmp<fvVectorMatrix> divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const;
//- Read LESProperties dictionary
virtual bool read();

View File

@ -202,14 +202,6 @@ public:
//- Return the sub-grid stress tensor.
virtual tmp<volSymmTensorField> B() const = 0;
//- Return the deviatoric part of the effective sub-grid
// turbulence stress tensor including the laminar stress
virtual tmp<volSymmTensorField> devBeff() const = 0;
//- Returns div(dev(Beff)).
// This is the additional term due to the filtering of the NSE.
virtual tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const = 0;
// RAS compatibility functions for the turbulenceModel base class
@ -225,18 +217,6 @@ public:
return B();
}
//- Return the effective stress tensor including the laminar stress
virtual tmp<volSymmTensorField> devReff() const
{
return devBeff();
}
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const
{
return divDevBeff(U);
}
//- Correct Eddy-Viscosity and related properties.
// This calls correct(const tmp<volTensorField>& gradU) by supplying

View File

@ -81,7 +81,7 @@ tmp<volSymmTensorField> Smagorinsky2::B() const
}
tmp<fvVectorMatrix> Smagorinsky2::divDevBeff
tmp<fvVectorMatrix> Smagorinsky2::divDevReff
(
volVectorField& U
) const
@ -101,6 +101,28 @@ tmp<fvVectorMatrix> Smagorinsky2::divDevBeff
}
tmp<fvVectorMatrix> Smagorinsky2::divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const
{
volTensorField gradU(fvc::grad(U));
volSymmTensorField aniMuEff
(
"muEff",
I*(rho*nuEff()) + (cD2_*rho*delta())*symm(gradU)
);
return
(
- fvm::laplacian(aniMuEff, U)
- fvc::div(rho*nuEff()*dev(T(fvc::grad(U))))
);
}
bool Smagorinsky2::read()
{
if (Smagorinsky::read())

View File

@ -109,9 +109,17 @@ public:
//- Return B.
virtual tmp<volSymmTensorField> B() const;
//- Returns div(B).
// This is the additional term due to the filtering of the NSE.
virtual tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const;
//- Return the deviatoric part of the effective sub-grid
// turbulence stress tensor including the laminar stress
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
//- Return the deviatoric part of the effective sub-grid
// turbulence stress tensor including the laminar stress
virtual tmp<fvVectorMatrix> divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const;
//- Read LESProperties dictionary
virtual bool read();

View File

@ -338,17 +338,34 @@ tmp<volSymmTensorField> SpalartAllmaras::B() const
}
tmp<volSymmTensorField> SpalartAllmaras::devBeff() const
tmp<volSymmTensorField> SpalartAllmaras::devReff() const
{
return -nuEff()*dev(twoSymm(fvc::grad(U())));
}
tmp<fvVectorMatrix> SpalartAllmaras::divDevBeff(volVectorField& U) const
tmp<fvVectorMatrix> SpalartAllmaras::divDevReff(volVectorField& U) const
{
return
(
- fvm::laplacian(nuEff(), U) - fvc::div(nuEff()*dev(T(fvc::grad(U))))
- fvm::laplacian(nuEff(), U)
- fvc::div(nuEff()*dev(T(fvc::grad(U))))
);
}
tmp<fvVectorMatrix> SpalartAllmaras::divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const
{
volScalarField muEff("muEff", rho*nuEff());
return
(
- fvm::laplacian(muEff, U)
- fvc::div(muEff*dev(T(fvc::grad(U))))
);
}

View File

@ -172,11 +172,19 @@ public:
//- Return the effective sub-grid turbulence stress tensor
// including the laminar stress
virtual tmp<volSymmTensorField> devBeff() const;
virtual tmp<volSymmTensorField> devReff() const;
//- Return the deviatoric part of the divergence of Beff
// i.e. the additional term in the filtered NSE.
virtual tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const;
//- Return the deviatoric part of the effective sub-grid
// turbulence stress tensor including the laminar stress
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
//- Return the deviatoric part of the effective sub-grid
// turbulence stress tensor including the laminar stress
virtual tmp<fvVectorMatrix> divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const;
//- Correct nuTilda and related properties
virtual void correct(const tmp<volTensorField>& gradU);

View File

@ -425,17 +425,34 @@ tmp<volSymmTensorField> kOmegaSSTSAS::B() const
}
tmp<volSymmTensorField> kOmegaSSTSAS::devBeff() const
tmp<volSymmTensorField> kOmegaSSTSAS::devReff() const
{
return -nuEff()*dev(twoSymm(fvc::grad(U())));
}
tmp<fvVectorMatrix> kOmegaSSTSAS::divDevBeff(volVectorField& U) const
tmp<fvVectorMatrix> kOmegaSSTSAS::divDevReff(volVectorField& U) const
{
return
(
- fvm::laplacian(nuEff(), U) - fvc::div(nuEff()*dev(T(fvc::grad(U))))
- fvm::laplacian(nuEff(), U)
- fvc::div(nuEff()*dev(T(fvc::grad(U))))
);
}
tmp<fvVectorMatrix> kOmegaSSTSAS::divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const
{
volScalarField muEff("muEff", rho*nuEff());
return
(
- fvm::laplacian(muEff, U)
- fvc::div(muEff*dev(T(fvc::grad(U))))
);
}

View File

@ -249,11 +249,19 @@ public:
//- Return the effective sub-grid turbulence stress tensor
// including the laminar stress
virtual tmp<volSymmTensorField> devBeff() const;
virtual tmp<volSymmTensorField> devReff() const;
//- Return the deviatoric part of the divergence of Beff
// i.e. the additional term in the filtered NSE.
virtual tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const;
//- Return the deviatoric part of the effective sub-grid
// turbulence stress tensor including the laminar stress
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
//- Return the deviatoric part of the effective sub-grid
// turbulence stress tensor including the laminar stress
virtual tmp<fvVectorMatrix> divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const;
//- Solve the turbulence equations (k-w) and correct the turbulence
// viscosity

View File

@ -136,17 +136,34 @@ tmp<volSymmTensorField> laminar::B() const
}
tmp<volSymmTensorField> laminar::devBeff() const
tmp<volSymmTensorField> laminar::devReff() const
{
return -nu()*dev(twoSymm(fvc::grad(U())));
}
tmp<fvVectorMatrix> laminar::divDevBeff(volVectorField& U) const
tmp<fvVectorMatrix> laminar::divDevReff(volVectorField& U) const
{
return
(
- fvm::laplacian(nu(), U) - fvc::div(nu()*dev(T(fvc::grad(U))))
- fvm::laplacian(nu(), U)
- fvc::div(nu()*dev(T(fvc::grad(U))))
);
}
tmp<fvVectorMatrix> laminar::divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const
{
volScalarField muEff("muEff", rho*nuEff());
return
(
- fvm::laplacian(muEff, U)
- fvc::div(muEff*dev(T(fvc::grad(U))))
);
}

View File

@ -104,13 +104,21 @@ public:
//- Return the sub-grid stress tensor B.
virtual tmp<volSymmTensorField> B() const;
//- Return the effective sub-grid turbulence stress tensor
// including the laminar stress
virtual tmp<volSymmTensorField> devReff() const;
//- Return the deviatoric part of the effective sub-grid
// turbulence stress tensor including the laminar stress
virtual tmp<volSymmTensorField> devBeff() const;
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
//- Return the deviatoric part of the divergence of Beff
// i.e. the additional term in the filtered NSE.
virtual tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const;
//- Return the deviatoric part of the effective sub-grid
// turbulence stress tensor including the laminar stress
virtual tmp<fvVectorMatrix> divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const;
//- Read LESProperties dictionary
bool read();

View File

@ -91,25 +91,39 @@ tmp<volSymmTensorField> mixedSmagorinsky::B() const
}
tmp<volSymmTensorField> mixedSmagorinsky::devBeff() const
tmp<volSymmTensorField> mixedSmagorinsky::devReff() const
{
return
(
scaleSimilarity::devBeff()
+ Smagorinsky::devBeff()
scaleSimilarity::devReff()
+ Smagorinsky::devReff()
);
}
tmp<fvVectorMatrix> mixedSmagorinsky::divDevBeff
tmp<fvVectorMatrix> mixedSmagorinsky::divDevReff
(
volVectorField& U
) const
{
return
(
scaleSimilarity::divDevBeff(U)
+ Smagorinsky::divDevBeff(U)
scaleSimilarity::divDevReff(U)
+ Smagorinsky::divDevReff(U)
);
}
tmp<fvVectorMatrix> mixedSmagorinsky::divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const
{
return
(
scaleSimilarity::divDevRhoReff(rho, U)
+ Smagorinsky::divDevRhoReff(rho, U)
);
}

View File

@ -129,11 +129,19 @@ public:
//- Return the effective sub-grid turbulence stress tensor
// including the laminar stress
virtual tmp<volSymmTensorField> devBeff() const;
virtual tmp<volSymmTensorField> devReff() const;
//- Implementation of div(B). This is necessary to override
// (and include) the div(B) terms from both the parent classes.
virtual tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const;
//- Return the deviatoric part of the effective sub-grid
// turbulence stress tensor including the laminar stress
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
//- Return the deviatoric part of the effective sub-grid
// turbulence stress tensor including the laminar stress
virtual tmp<fvVectorMatrix> divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const;
//- Correct Eddy-Viscosity and related properties
virtual void correct(const tmp<volTensorField>& gradU);

View File

@ -79,15 +79,25 @@ tmp<volSymmTensorField> scaleSimilarity::B() const
}
tmp<volSymmTensorField> scaleSimilarity::devBeff() const
tmp<volSymmTensorField> scaleSimilarity::devReff() const
{
return dev(B());
}
tmp<fvVectorMatrix> scaleSimilarity::divDevBeff(volVectorField& U) const
tmp<fvVectorMatrix> scaleSimilarity::divDevReff(volVectorField& U) const
{
return fvm::Su(fvc::div(devBeff()), U);
return fvm::Su(fvc::div(devReff()), U);
}
tmp<fvVectorMatrix> scaleSimilarity::divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const
{
return fvm::Su(fvc::div(rho*devReff()), U);
}

View File

@ -106,13 +106,21 @@ public:
//- Return the sub-grid stress tensor.
virtual tmp<volSymmTensorField> B() const;
//- Return the effective sub-grid turbulence stress tensor
// including the laminar stress
virtual tmp<volSymmTensorField> devReff() const;
//- Return the deviatoric part of the effective sub-grid
// turbulence stress tensor including the laminar stress
virtual tmp<volSymmTensorField> devBeff() const;
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
//- Return the deviatoric part of the divergence of Beff
// i.e. the additional term in the filtered NSE.
virtual tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const;
//- Return the deviatoric part of the effective sub-grid
// turbulence stress tensor including the laminar stress
virtual tmp<fvVectorMatrix> divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const;
//- Correct Eddy-Viscosity and related properties
virtual void correct(const tmp<volTensorField>&);

View File

@ -259,6 +259,44 @@ tmp<fvVectorMatrix> LRR::divDevReff(volVectorField& U) const
}
tmp<fvVectorMatrix> LRR::divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const
{
volScalarField muEff("muEff", rho*nuEff());
if (couplingFactor_.value() > 0.0)
{
return
(
fvc::div
(
rho*R_ + couplingFactor_*(rho*nut_)*fvc::grad(U),
"div((rho*R))"
)
+ fvc::laplacian
(
(1.0 - couplingFactor_)*rho*nut_,
U,
"laplacian(muEff,U)"
)
- fvm::laplacian(muEff, U)
);
}
else
{
return
(
fvc::div(rho*R_)
+ fvc::laplacian(rho*nut_, U, "laplacian(muEff,U)")
- fvm::laplacian(muEff, U)
);
}
}
bool LRR::read()
{
if (RASModel::read())

View File

@ -173,6 +173,13 @@ public:
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const;
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct();

View File

@ -204,6 +204,22 @@ tmp<fvVectorMatrix> LamBremhorstKE::divDevReff(volVectorField& U) const
}
tmp<fvVectorMatrix> LamBremhorstKE::divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const
{
volScalarField muEff("muEff", rho*nuEff());
return
(
- fvm::laplacian(muEff, U)
- fvc::div(muEff*dev(T(fvc::grad(U))))
);
}
bool LamBremhorstKE::read()
{
if (RASModel::read())

View File

@ -147,6 +147,13 @@ public:
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const;
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct();

View File

@ -276,7 +276,12 @@ tmp<fvVectorMatrix> LaunderGibsonRSTM::divDevReff(volVectorField& U) const
return
(
fvc::div(R_ + couplingFactor_*nut_*fvc::grad(U), "div(R)")
+ fvc::laplacian((1.0-couplingFactor_)*nut_, U, "laplacian(nuEff,U)")
+ fvc::laplacian
(
(1.0 - couplingFactor_)*nut_,
U,
"laplacian(nuEff,U)"
)
- fvm::laplacian(nuEff(), U)
);
}
@ -292,6 +297,44 @@ tmp<fvVectorMatrix> LaunderGibsonRSTM::divDevReff(volVectorField& U) const
}
tmp<fvVectorMatrix> LaunderGibsonRSTM::divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const
{
volScalarField muEff("muEff", rho*nuEff());
if (couplingFactor_.value() > 0.0)
{
return
(
fvc::div
(
rho*R_ + couplingFactor_*(rho*nut_)*fvc::grad(U),
"div((rho*R))"
)
+ fvc::laplacian
(
(1.0 - couplingFactor_)*rho*nut_,
U,
"laplacian(muEff,U)"
)
- fvm::laplacian(muEff, U)
);
}
else
{
return
(
fvc::div(rho*R_)
+ fvc::laplacian(rho*nut_, U, "laplacian(muEff,U)")
- fvm::laplacian(muEff, U)
);
}
}
bool LaunderGibsonRSTM::read()
{
if (RASModel::read())

View File

@ -184,6 +184,13 @@ public:
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const;
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct();

View File

@ -210,6 +210,22 @@ tmp<fvVectorMatrix> LaunderSharmaKE::divDevReff(volVectorField& U) const
}
tmp<fvVectorMatrix> LaunderSharmaKE::divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const
{
volScalarField muEff("muEff", rho*nuEff());
return
(
- fvm::laplacian(muEff, U)
- fvc::div(muEff*dev(T(fvc::grad(U))))
);
}
bool LaunderSharmaKE::read()
{
if (RASModel::read())

View File

@ -164,6 +164,13 @@ public:
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const;
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct();

View File

@ -298,6 +298,23 @@ tmp<fvVectorMatrix> LienCubicKE::divDevReff(volVectorField& U) const
}
tmp<fvVectorMatrix> LienCubicKE::divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const
{
volScalarField muEff("muEff", rho*nuEff());
return
(
fvc::div(rho*nonlinearStress_)
- fvm::laplacian(muEff, U)
- fvc::div(muEff*dev(T(fvc::grad(U))))
);
}
bool LienCubicKE::read()
{
if (RASModel::read())

View File

@ -159,6 +159,13 @@ public:
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const;
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct();

View File

@ -365,6 +365,23 @@ tmp<fvVectorMatrix> LienCubicKELowRe::divDevReff(volVectorField& U) const
}
tmp<fvVectorMatrix> LienCubicKELowRe::divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const
{
volScalarField muEff("muEff", rho*nuEff());
return
(
fvc::div(rho*nonlinearStress_)
- fvm::laplacian(muEff, U)
- fvc::div(muEff*dev(T(fvc::grad(U))))
);
}
bool LienCubicKELowRe::read()
{
if (RASModel::read())

View File

@ -186,6 +186,13 @@ public:
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const;
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct();

View File

@ -243,12 +243,27 @@ tmp<fvVectorMatrix> LienLeschzinerLowRe::divDevReff(volVectorField& U) const
return
(
- fvm::laplacian(nuEff(), U)
//- (fvc::grad(U) & fvc::grad(nuEff()))
- fvc::div(nuEff()*T(fvc::grad(U)))
);
}
tmp<fvVectorMatrix> LienLeschzinerLowRe::divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const
{
volScalarField muEff("muEff", rho*nuEff());
return
(
- fvm::laplacian(muEff, U)
- fvc::div(muEff*dev(T(fvc::grad(U))))
);
}
bool LienLeschzinerLowRe::read()
{
if (RASModel::read())

View File

@ -156,6 +156,13 @@ public:
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const;
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct();

View File

@ -287,6 +287,23 @@ tmp<fvVectorMatrix> NonlinearKEShih::divDevReff(volVectorField& U) const
}
tmp<fvVectorMatrix> NonlinearKEShih::divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const
{
volScalarField muEff("muEff", rho*nuEff());
return
(
fvc::div(rho*nonlinearStress_)
- fvm::laplacian(muEff, U)
- fvc::div(muEff*dev(T(fvc::grad(U))))
);
}
bool NonlinearKEShih::read()
{
if (RASModel::read())

View File

@ -162,6 +162,13 @@ public:
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const;
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct();

View File

@ -220,6 +220,22 @@ tmp<fvVectorMatrix> RNGkEpsilon::divDevReff(volVectorField& U) const
}
tmp<fvVectorMatrix> RNGkEpsilon::divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const
{
volScalarField muEff("muEff", rho*nuEff());
return
(
- fvm::laplacian(muEff, U)
- fvc::div(muEff*dev(T(fvc::grad(U))))
);
}
bool RNGkEpsilon::read()
{
if (RASModel::read())

View File

@ -161,6 +161,13 @@ public:
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const;
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct();

View File

@ -337,6 +337,22 @@ tmp<fvVectorMatrix> SpalartAllmaras::divDevReff(volVectorField& U) const
}
tmp<fvVectorMatrix> SpalartAllmaras::divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const
{
volScalarField muEff("muEff", rho*nuEff());
return
(
- fvm::laplacian(muEff, U)
- fvc::div(muEff*dev(T(fvc::grad(U))))
);
}
bool SpalartAllmaras::read()
{
if (RASModel::read())

View File

@ -184,6 +184,13 @@ public:
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const;
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct();

View File

@ -192,6 +192,22 @@ tmp<fvVectorMatrix> kEpsilon::divDevReff(volVectorField& U) const
}
tmp<fvVectorMatrix> kEpsilon::divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const
{
volScalarField muEff("muEff", rho*nuEff());
return
(
- fvm::laplacian(muEff, U)
- fvc::div(muEff*dev(T(fvc::grad(U))))
);
}
bool kEpsilon::read()
{
if (RASModel::read())

View File

@ -155,6 +155,13 @@ public:
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const;
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct();

View File

@ -201,6 +201,22 @@ tmp<fvVectorMatrix> kOmega::divDevReff(volVectorField& U) const
}
tmp<fvVectorMatrix> kOmega::divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const
{
volScalarField muEff("muEff", rho*nuEff());
return
(
- fvm::laplacian(muEff, U)
- fvc::div(muEff*dev(T(fvc::grad(U))))
);
}
bool kOmega::read()
{
if (RASModel::read())

View File

@ -188,6 +188,13 @@ public:
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const;
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct();

View File

@ -308,6 +308,22 @@ tmp<fvVectorMatrix> kOmegaSST::divDevReff(volVectorField& U) const
}
tmp<fvVectorMatrix> kOmegaSST::divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const
{
volScalarField muEff("muEff", rho*nuEff());
return
(
- fvm::laplacian(muEff, U)
- fvc::div(muEff*dev(T(fvc::grad(U))))
);
}
bool kOmegaSST::read()
{
if (RASModel::read())

View File

@ -258,6 +258,13 @@ public:
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const;
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct();

View File

@ -570,6 +570,22 @@ tmp<fvVectorMatrix> kkLOmega::divDevReff(volVectorField& U) const
}
tmp<fvVectorMatrix> kkLOmega::divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const
{
volScalarField muEff("muEff", rho*nuEff());
return
(
- fvm::laplacian(muEff, U)
- fvc::div(muEff*dev(T(fvc::grad(U))))
);
}
bool kkLOmega::read()
{
if (RASModel::read())

View File

@ -276,6 +276,13 @@ public:
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const;
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct();

View File

@ -177,6 +177,22 @@ tmp<fvVectorMatrix> laminar::divDevReff(volVectorField& U) const
}
tmp<fvVectorMatrix> laminar::divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const
{
volScalarField muEff("muEff", rho*nuEff());
return
(
- fvm::laplacian(muEff, U)
- fvc::div(muEff*dev(T(fvc::grad(U))))
);
}
bool laminar::read()
{
return RASModel::read();

View File

@ -105,6 +105,13 @@ public:
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const;
//- Correct the laminar viscosity
virtual void correct();

View File

@ -262,6 +262,22 @@ tmp<fvVectorMatrix> qZeta::divDevReff(volVectorField& U) const
}
tmp<fvVectorMatrix> qZeta::divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const
{
volScalarField muEff("muEff", rho*nuEff());
return
(
- fvm::laplacian(muEff, U)
- fvc::div(muEff*dev(T(fvc::grad(U))))
);
}
bool qZeta::read()
{
if (RASModel::read())

View File

@ -211,6 +211,13 @@ public:
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const;
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct();

View File

@ -246,6 +246,22 @@ tmp<fvVectorMatrix> realizableKE::divDevReff(volVectorField& U) const
}
tmp<fvVectorMatrix> realizableKE::divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const
{
volScalarField muEff("muEff", rho*nuEff());
return
(
- fvm::laplacian(muEff, U)
- fvc::div(muEff*dev(T(fvc::grad(U))))
);
}
bool realizableKE::read()
{
if (RASModel::read())

View File

@ -180,6 +180,13 @@ public:
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const;
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct();

View File

@ -203,6 +203,22 @@ tmp<fvVectorMatrix> laminar::divDevReff(volVectorField& U) const
}
tmp<fvVectorMatrix> laminar::divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const
{
volScalarField muEff("muEff", rho*nuEff());
return
(
- fvm::laplacian(muEff, U)
- fvc::div(muEff*dev(T(fvc::grad(U))))
);
}
void laminar::correct()
{
turbulenceModel::correct();

View File

@ -111,6 +111,13 @@ public:
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const;
//- Correct the laminar viscosity
virtual void correct();

View File

@ -204,6 +204,13 @@ public:
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const = 0;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const = 0;
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct() = 0;

View File

@ -32,6 +32,7 @@ divSchemes
div(phirb,alpha) Gauss interfaceCompression;
div(phi,k) Gauss upwind;
div(phi,omega) Gauss upwind;
div((muEff*dev(T(grad(U))))) Gauss linear;
}
laplacianSchemes

View File

@ -30,6 +30,7 @@ divSchemes
div(rho*phi,U) Gauss linear;
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss interfaceCompression;
div((muEff*dev(T(grad(U))))) Gauss linear;
}
laplacianSchemes

View File

@ -30,6 +30,7 @@ divSchemes
div(rho*phi,U) Gauss limitedLinearV 1;
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss interfaceCompression;
div((muEff*dev(T(grad(U))))) Gauss linear;
}
laplacianSchemes

View File

@ -31,6 +31,7 @@ divSchemes
div(phiv,rho) Gauss limitedLinear 0.2;
div(phi,U) Gauss filteredLinear2V 0.2 0;
div(phiv,k) Gauss filteredLinear2 0.2 0;
div((muEff*dev(T(grad(U))))) Gauss linear;
}
gradSchemes

View File

@ -31,6 +31,7 @@ divSchemes
div(phiv,rho) Gauss limitedLinear 0.2;
div(phi,U) Gauss filteredLinear2V 0.2 0;
div(phiv,k) Gauss filteredLinear2 0.2 0;
div((muEff*dev(T(grad(U))))) Gauss linear;
}
gradSchemes

View File

@ -32,6 +32,7 @@ divSchemes
div(phi,U) Gauss limitedLinearV 1;
div(phiv,omega) Gauss limitedLinear 1;
div(phiv,k) Gauss limitedLinear 1;
div((muEff*dev(T(grad(U))))) Gauss linear;
}
gradSchemes

View File

@ -34,7 +34,7 @@ divSchemes
div(phid2,p_rgh) Gauss upwind;
div(rho*phi,T) Gauss upwind;
div(phi,k) Gauss vanLeer;
div((nuEff*dev(T(grad(U))))) Gauss linear;
div((muEff*dev(T(grad(U))))) Gauss linear;
}
laplacianSchemes

View File

@ -34,7 +34,7 @@ divSchemes
div(phid2,p_rgh) Gauss upwind;
div(rho*phi,T) Gauss upwind;
div(phi,k) Gauss vanLeer;
div((nuEff*dev(T(grad(U))))) Gauss linear;
div((muEff*dev(T(grad(U))))) Gauss linear;
}
laplacianSchemes

View File

@ -30,6 +30,7 @@ divSchemes
div(rho*phi,U) Gauss upwind;
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss interfaceCompression;
div((muEff*dev(T(grad(U))))) Gauss linear;
}
laplacianSchemes

View File

@ -32,6 +32,7 @@ divSchemes
div(phirb,alpha) Gauss interfaceCompression;
div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div((muEff*dev(T(grad(U))))) Gauss linear;
}
laplacianSchemes

View File

@ -30,6 +30,7 @@ divSchemes
div(rho*phi,U) Gauss vanLeerV;
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss vanLeer;
div((muEff*dev(T(grad(U))))) Gauss linear;
}
laplacianSchemes

View File

@ -30,6 +30,7 @@ divSchemes
div(rho*phi,U) Gauss vanLeerV;
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss vanLeer;
div((muEff*dev(T(grad(U))))) Gauss linear;
}
laplacianSchemes

View File

@ -30,6 +30,7 @@ divSchemes
div(rho*phi,U) Gauss vanLeerV;
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss vanLeer;
div((muEff*dev(T(grad(U))))) Gauss linear;
}
laplacianSchemes

View File

@ -30,6 +30,7 @@ divSchemes
div(rho*phi,U) Gauss vanLeerV;
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss vanLeer;
div((muEff*dev(T(grad(U))))) Gauss linear;
}
laplacianSchemes

View File

@ -30,6 +30,7 @@ divSchemes
div(rho*phi,U) Gauss vanLeerV;
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss vanLeer;
div((muEff*dev(T(grad(U))))) Gauss linear;
}
laplacianSchemes

View File

@ -30,6 +30,7 @@ divSchemes
div(rho*phi,U) Gauss vanLeerV;
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss vanLeer;
div((muEff*dev(T(grad(U))))) Gauss linear;
}
laplacianSchemes

View File

@ -30,6 +30,7 @@ divSchemes
div(rho*phi,U) Gauss upwind;
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss interfaceCompression;
div((muEff*dev(T(grad(U))))) Gauss linear;
}
laplacianSchemes

View File

@ -30,6 +30,7 @@ divSchemes
div(rho*phi,U) Gauss limitedLinearV 1;
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss interfaceCompression;
div((muEff*dev(T(grad(U))))) Gauss linear;
}
laplacianSchemes

View File

@ -34,7 +34,7 @@ divSchemes
div(phi,B) Gauss limitedLinear 1;
div(B) Gauss linear;
div(phi,nuTilda) Gauss limitedLinear 1;
div((nuEff*dev(T(grad(U))))) Gauss linear;
div((muEff*dev(T(grad(U))))) Gauss linear;
}
laplacianSchemes

View File

@ -35,7 +35,7 @@ divSchemes
div(phi,R) Gauss upwind;
div(R) Gauss linear;
div(phi,nuTilda) Gauss upwind;
div((nuEff*dev(T(grad(U))))) Gauss linear;
div((muEff*dev(T(grad(U))))) Gauss linear;
}
laplacianSchemes

View File

@ -35,7 +35,7 @@ divSchemes
div(phi,R) Gauss upwind;
div(R) Gauss linear;
div(phi,nuTilda) Gauss upwind;
div((nuEff*dev(T(grad(U))))) Gauss linear;
div((muEff*dev(T(grad(U))))) Gauss linear;
}
laplacianSchemes

View File

@ -32,6 +32,7 @@ divSchemes
div(phirb,alpha) Gauss interfaceCompression;
div(phi,k) Gauss upwind;
div(phi,omega) Gauss upwind;
div((muEff*dev(T(grad(U))))) Gauss linear;
}
laplacianSchemes

View File

@ -33,6 +33,7 @@ divSchemes
div(phi,k) Gauss upwind;
div(phi,omega) $div(phi,k);
div((muEff*dev(T(grad(U))))) Gauss linear;
}
laplacianSchemes

View File

@ -35,7 +35,7 @@ divSchemes
div(phi,R) Gauss upwind;
div(R) Gauss linear;
div(phi,nuTilda) Gauss upwind;
div((nuEff*dev(T(grad(U))))) Gauss linear;
div((muEff*dev(T(grad(U))))) Gauss linear;
}
laplacianSchemes

View File

@ -30,6 +30,7 @@ divSchemes
div(rho*phi,U) Gauss limitedLinearV 1;
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss interfaceCompression;
div((muEff*dev(T(grad(U))))) Gauss linear;
}
laplacianSchemes

View File

@ -30,9 +30,9 @@ divSchemes
div(rhoPhi,U) Gauss linearUpwind grad(U);
div(phi,omega) Gauss linearUpwind grad(omega);
div(phi,k) Gauss linearUpwind grad(k);
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss interfaceCompression;
div((muEff*dev(T(grad(U))))) Gauss linear;
}
gradSchemes

View File

@ -32,6 +32,7 @@ divSchemes
div(rho*phi,U) Gauss upwind;
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss interfaceCompression;
div((muEff*dev(T(grad(U))))) Gauss linear;
}
laplacianSchemes

View File

@ -32,6 +32,7 @@ divSchemes
div(rho*phi,U) Gauss upwind;
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss interfaceCompression;
div((muEff*dev(T(grad(U))))) Gauss linear;
}
laplacianSchemes

View File

@ -33,7 +33,7 @@ divSchemes
div(rho*phi,U) Gauss linear;
div(phi,alpha1) Gauss vanLeer;
div(phi,k) Gauss limitedLinear 1;
div(((rho*nuEff)*dev(grad(U).T()))) Gauss linear;
div((muEff*dev(T(grad(U))))) Gauss linear;
}
laplacianSchemes