Changed turbulence model interface to remove non-const access to U

This commit is contained in:
Hrvoje Jasak 2016-06-06 14:59:41 +01:00
parent 3ea2cb128c
commit 4f1adadf23
140 changed files with 256 additions and 253 deletions

View file

@ -215,11 +215,12 @@ tmp<volSymmTensorField> PDRkEpsilon::devRhoReff() const
}
tmp<fvVectorMatrix> PDRkEpsilon::divDevRhoReff(volVectorField& U) const
tmp<fvVectorMatrix> PDRkEpsilon::divDevRhoReff() const
{
return
(
- fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(T(fvc::grad(U))))
- fvm::laplacian(muEff(), U_)
- fvc::div(muEff()*dev2(T(fvc::grad(U_))))
);
}

View file

@ -174,7 +174,7 @@ public:
tmp<volSymmTensorField> devRhoReff() const;
//- Return the source term for the momentum equation
tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
tmp<fvVectorMatrix> divDevRhoReff() const;
//- Solve the turbulence equations and correct the turbulence viscosity
void correct();

View file

@ -2,7 +2,7 @@
(
betav*fvm::ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
+ turbulence->divDevRhoReff()
==
betav*rho*g
);

View file

@ -2,7 +2,7 @@
(
fvm::ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
+ turbulence->divDevRhoReff()
==
rho*g
);

View file

@ -2,7 +2,7 @@
(
fvm::ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
+ turbulence->divDevRhoReff()
==
rho*g
+ dieselSpray.momentumSource()

View file

@ -2,7 +2,7 @@
(
fvm::ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
+ turbulence->divDevRhoReff()
);
if (piso.momentumPredictor())

View file

@ -2,7 +2,7 @@ fvVectorMatrix UEqn
(
fvm::ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
+ turbulence->divDevRhoReff()
);
UEqn.relax();

View file

@ -2,7 +2,7 @@
(
fvm::ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
+ turbulence->divDevRhoReff()
==
rho*g
);

View file

@ -2,7 +2,7 @@
(
fvm::ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
+ turbulence->divDevRhoReff()
==
rho*g
);

View file

@ -4,7 +4,7 @@ tmp<fvVectorMatrix> UEqn
(
fvm::ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
+ turbulence->divDevRhoReff()
);
UEqn().relax

View file

@ -2,7 +2,7 @@
(
fvm::ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
+ turbulence->divDevRhoReff()
);
if (piso.momentumPredictor())

View file

@ -4,7 +4,7 @@ tmp<fvVectorMatrix> UEqn
(
pZones.ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
+ turbulence->divDevRhoReff()
);
UEqn().relax

View file

@ -3,7 +3,7 @@
tmp<fvVectorMatrix> UEqn
(
fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
+ turbulence->divDevRhoReff()
);
UEqn().relax();

View file

@ -3,7 +3,7 @@
tmp<fvVectorMatrix> UEqn
(
fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
+ turbulence->divDevRhoReff()
);
UEqn().relax();

View file

@ -2,7 +2,7 @@
(
fvm::ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
+ turbulence->divDevRhoReff()
);
UEqn.relax

View file

@ -2,7 +2,7 @@
(
fvm::ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
+ turbulence->divDevRhoReff()
);
UEqn.relax

View file

@ -5,7 +5,7 @@
(
fvm::ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
+ turbulence->divDevRhoReff()
);
UEqn.relax();

View file

@ -5,7 +5,7 @@
(
fvm::ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
+ turbulence->divDevRhoReff()
);
// MRF: add Coriolis force

View file

@ -5,7 +5,7 @@
(
fvm::ddt(rho, Urel)
+ fvm::div(phi, Urel)
+ turbulence->divDevRhoReff(Urel)
+ turbulence->divDevRhoReff()
+ rho*SRF->Su()
);

View file

@ -5,7 +5,7 @@
(
fvm::ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
+ turbulence->divDevRhoReff()
);
UEqn.relax();

View file

@ -5,7 +5,7 @@
(
fvm::ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
+ turbulence->divDevRhoReff()
);
// MRF: add Coriolis force

View file

@ -9,7 +9,7 @@
fvVectorMatrix UEqn
(
fvm::div(phi, U)
+ turbulence->divDevReff(U)
+ turbulence->divDevReff()
);
// Add MRF sources

View file

@ -4,7 +4,7 @@
(
fvm::ddt(U)
+ fvm::div(phi, U)
+ turbulence->divDevReff(U)
+ turbulence->divDevReff()
);
UEqn.relax();

View file

@ -3,7 +3,7 @@
tmp<fvVectorMatrix> UEqn
(
fvm::div(phi, U)
+ turbulence->divDevReff(U)
+ turbulence->divDevReff()
+ fvm::SuSp(-fvc::div(phi), U)
);

View file

@ -9,7 +9,7 @@
fvVectorMatrix UEqn
(
fvm::div(phi, U)
+ turbulence->divDevReff(U)
+ turbulence->divDevReff()
);
rAU = 1.0/UEqn.A();

View file

@ -3,7 +3,7 @@
(
fvm::ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
+ turbulence->divDevRhoReff()
);
UEqn.relax

View file

@ -2,7 +2,7 @@
(
fvm::ddt(U)
+ fvm::div(phi, U)
+ turbulence->divDevReff(U)
+ turbulence->divDevReff()
);
if (piso.momentumPredictor())

View file

@ -3,7 +3,7 @@
tmp<fvVectorMatrix> UEqn
(
fvm::div(phi, U)
+ turbulence->divDevReff(U)
+ turbulence->divDevReff()
);
UEqn().relax();

View file

@ -4,7 +4,7 @@
(
fvm::ddt(U)
+ fvm::div(phi, U)
+ turbulence->divDevReff(U)
+ turbulence->divDevReff()
);
UEqn.relax();

View file

@ -3,7 +3,7 @@
tmp<fvVectorMatrix> UEqn
(
fvm::div(phi, U)
+ turbulence->divDevReff(U)
+ turbulence->divDevReff()
);
UEqn().relax();

View file

@ -4,7 +4,7 @@
(
fvm::ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
+ turbulence->divDevRhoReff()
);
UEqn.relax();

View file

@ -3,7 +3,7 @@
tmp<fvVectorMatrix> UEqn
(
fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
+ turbulence->divDevRhoReff()
);
UEqn().relax();

View file

@ -3,7 +3,7 @@
(
fvm::ddt(rho, U)
+ fvm::div(phi, U)
+ turb.divDevRhoReff(U)
+ turb.divDevRhoReff()
);
UEqn().relax();

View file

@ -3,7 +3,7 @@
(
fvm::div(phi, U)
- fvm::Sp(fvc::div(phi), U)
+ turb.divDevRhoReff(U)
+ turb.divDevRhoReff()
);
UEqn().relax();

View file

@ -2,7 +2,7 @@
tmp<fvVectorMatrix> UEqn
(
fvm::div(phi, U)
+ turbulence->divDevReff(U)
+ turbulence->divDevReff()
);
UEqn().relax();

View file

@ -2,7 +2,7 @@
tmp<fvVectorMatrix> UEqn
(
fvm::div(phi, U)
+ turbulence->divDevReff(U)
+ turbulence->divDevReff()
);
UEqn().relax();

View file

@ -66,7 +66,7 @@ int main(int argc, char *argv[])
tmp<fvVectorMatrix> UEqn
(
fvm::div(phi, U)
+ turbulence->divDevReff(U)
+ turbulence->divDevReff()
);
mrfZones.addCoriolis(UEqn());

View file

@ -60,7 +60,7 @@ int main(int argc, char *argv[])
{
Info<< "Time = " << runTime.timeName() << nl << endl;
fvVectorMatrix divR = turbulence->divDevReff(U);
fvVectorMatrix divR = turbulence->divDevReff();
divR.source() = flowMask & divR.source();
fvVectorMatrix UEqn

View file

@ -70,7 +70,7 @@ int main(int argc, char *argv[])
fvVectorMatrix HUEqn
(
fvm::div(phi, U)
+ sgsModel->divDevBeff(U)
+ sgsModel->divDevBeff()
==
flowDirection*gradP
);

View file

@ -2,7 +2,7 @@
fvVectorMatrix HUEqn
(
fvm::div(phi, U)
+ turbulence->divDevReff(U)
+ turbulence->divDevReff()
);
// Time derivative matrix

View file

@ -2,7 +2,7 @@
fvVectorMatrix HUEqn
(
fvm::div(phi, U)
+ turbulence->divDevReff(U)
+ turbulence->divDevReff()
);
// Time derivative matrix

View file

@ -67,7 +67,7 @@ int main(int argc, char *argv[])
(
fvm::ddt(U)
+ fvm::div(phi, U)
+ turbulence->divDevReff(U)
+ turbulence->divDevReff()
);
UEqn.relax();

View file

@ -3,7 +3,7 @@
tmp<fvVectorMatrix> UEqn
(
fvm::div(phi, U)
+ turbulence->divDevReff(U)
+ turbulence->divDevReff()
);
UEqn().relax();

View file

@ -3,7 +3,7 @@
tmp<fvVectorMatrix> HUEqn
(
fvm::div(phi, U)
+ turbulence->divDevReff(U)
+ turbulence->divDevReff()
);
// Get under-relaxation factor

View file

@ -3,12 +3,13 @@
tmp<fvVectorMatrix> HUrelEqn
(
fvm::div(phi, Urel)
+ turbulence->divDevReff(Urel)
+ turbulence->divDevReff()
+ SRF->Su()
);
// Get under-relaxation factor
const scalar UUrf = mesh.solutionDict().equationRelaxationFactor(Urel.name());
const scalar UUrf =
mesh.solutionDict().equationRelaxationFactor(Urel.name());
// Momentum solution
solve(relax(HUrelEqn(), UUrf) == -fvc::grad(p));

View file

@ -69,7 +69,7 @@ int main(int argc, char *argv[])
tmp<fvVectorMatrix> UrelEqn
(
fvm::div(phi, Urel)
+ turbulence->divDevReff(Urel)
+ turbulence->divDevReff()
+ SRF->Su()
);

View file

@ -2,7 +2,7 @@
(
fvm::ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
+ turbulence->divDevRhoReff()
==
rho.dimensionedInternalField()*g
+ coalParcels.SU()

View file

@ -3,7 +3,7 @@
// fvm::ddt(rho, U)
pZones.ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
+ turbulence->divDevRhoReff()
==
rho.dimensionedInternalField()*g
+ parcels.SU()

View file

@ -2,7 +2,7 @@
(
fvm::ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
+ turbulence->divDevRhoReff()
==
rho.dimensionedInternalField()*g
+ parcels.SU()

View file

@ -124,11 +124,12 @@ tmp<volSymmTensorField> GenEddyVisc::devRhoBeff() const
}
tmp<fvVectorMatrix> GenEddyVisc::divDevRhoBeff(volVectorField& U) const
tmp<fvVectorMatrix> GenEddyVisc::divDevRhoBeff() const
{
return
(
- fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(T(fvc::grad(U))))
- fvm::laplacian(muEff(), U_)
- fvc::div(muEff()*dev2(T(fvc::grad(U_))))
);
}

View file

@ -143,7 +143,7 @@ public:
//- Returns div(rho*dev(B)).
// This is the additional term due to the filtering of the NSE.
virtual tmp<fvVectorMatrix> divDevRhoBeff(volVectorField& U) const;
virtual tmp<fvVectorMatrix> divDevRhoBeff() const;
//- Correct Eddy-Viscosity and related properties
virtual void correct(const tmp<volTensorField>& gradU);

View file

@ -136,14 +136,14 @@ tmp<volSymmTensorField> GenSGSStress::devRhoBeff() const
}
tmp<fvVectorMatrix> GenSGSStress::divDevRhoBeff(volVectorField& U) const
tmp<fvVectorMatrix> GenSGSStress::divDevRhoBeff() const
{
return
(
fvc::div(rho()*B_ + 0.05*muSgs_*fvc::grad(U))
+ fvc::laplacian(0.95*muSgs_, U, "laplacian(muEff,U)")
- fvm::laplacian(muEff(), U)
- fvc::div(mu()*dev2(T(fvc::grad(U))))
fvc::div(rho()*B_ + 0.05*muSgs_*fvc::grad(U_))
+ fvc::laplacian(0.95*muSgs_, U_, "laplacian(muEff,U)")
- fvm::laplacian(muEff(), U_)
- fvc::div(mu()*dev2(T(fvc::grad(U_))))
);
}

View file

@ -147,7 +147,7 @@ public:
//- Returns divergence of B : i.e. the additional term in the
// filtered NSE
virtual tmp<fvVectorMatrix> divDevRhoBeff(volVectorField& U) const;
virtual tmp<fvVectorMatrix> divDevRhoBeff() const;
//- Correct Eddy-Viscosity and related properties
virtual void correct(const tmp<volTensorField>& gradU);

View file

@ -222,7 +222,7 @@ public:
//- Returns div(rho*dev(B)).
// This is the additional term due to the filtering of the NSE.
virtual tmp<fvVectorMatrix> divDevRhoBeff(volVectorField& U) const = 0;
virtual tmp<fvVectorMatrix> divDevRhoBeff() const = 0;
// RAS compatibility functions for the turbulenceModel base class
@ -252,9 +252,9 @@ public:
}
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const
virtual tmp<fvVectorMatrix> divDevRhoReff() const
{
return divDevRhoBeff(U);
return divDevRhoBeff();
}

View file

@ -279,11 +279,12 @@ tmp<volScalarField> SpalartAllmaras::epsilon() const
}
tmp<fvVectorMatrix> SpalartAllmaras::divDevRhoBeff(volVectorField& U) const
tmp<fvVectorMatrix> SpalartAllmaras::divDevRhoBeff() const
{
return
(
- fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(T(fvc::grad(U))))
- fvm::laplacian(muEff(), U_)
- fvc::div(muEff()*dev2(T(fvc::grad(U_))))
);
}

View file

@ -166,7 +166,7 @@ public:
//- Returns div(rho*dev(B)).
// This is the additional term due to the filtering of the NSE.
virtual tmp<fvVectorMatrix> divDevRhoBeff(volVectorField& U) const;
virtual tmp<fvVectorMatrix> divDevRhoBeff() const;
//- Correct nuTilda and related properties
virtual void correct(const tmp<volTensorField>& gradU);

View file

@ -260,16 +260,16 @@ tmp<volSymmTensorField> LRR::devRhoReff() const
}
tmp<fvVectorMatrix> LRR::divDevRhoReff(volVectorField& U) const
tmp<fvVectorMatrix> LRR::divDevRhoReff() const
{
if (couplingFactor_.value() > 0.0)
{
return
(
fvc::div(rho_*R_ + couplingFactor_*mut_*fvc::grad(U))
+ fvc::laplacian((1.0 - couplingFactor_)*mut_, U)
- fvm::laplacian(muEff(), U)
- fvc::div(mu()*dev2(T(fvc::grad(U))))
fvc::div(rho_*R_ + couplingFactor_*mut_*fvc::grad(U_))
+ fvc::laplacian((1.0 - couplingFactor_)*mut_, U_)
- fvm::laplacian(muEff(), U_)
- fvc::div(mu()*dev2(T(fvc::grad(U_))))
);
}
else
@ -277,9 +277,9 @@ tmp<fvVectorMatrix> LRR::divDevRhoReff(volVectorField& U) const
return
(
fvc::div(rho_*R_)
+ fvc::laplacian(mut_, U)
- fvm::laplacian(muEff(), U)
- fvc::div(mu()*dev2(T(fvc::grad(U))))
+ fvc::laplacian(mut_, U_)
- fvm::laplacian(muEff(), U_)
- fvc::div(mu()*dev2(T(fvc::grad(U_))))
);
}
}

View file

@ -183,7 +183,7 @@ public:
virtual tmp<volSymmTensorField> devRhoReff() const;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
virtual tmp<fvVectorMatrix> divDevRhoReff() const;
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct();

View file

@ -289,16 +289,16 @@ tmp<volSymmTensorField> LaunderGibsonRSTM::devRhoReff() const
}
tmp<fvVectorMatrix> LaunderGibsonRSTM::divDevRhoReff(volVectorField& U) const
tmp<fvVectorMatrix> LaunderGibsonRSTM::divDevRhoReff() const
{
if (couplingFactor_.value() > 0.0)
{
return
(
fvc::div(rho_*R_ + couplingFactor_*mut_*fvc::grad(U))
+ fvc::laplacian((1.0 - couplingFactor_)*mut_, U)
- fvm::laplacian(muEff(), U)
- fvc::div(mu()*dev2(T(fvc::grad(U))))
fvc::div(rho_*R_ + couplingFactor_*mut_*fvc::grad(U_))
+ fvc::laplacian((1.0 - couplingFactor_)*mut_, U_)
- fvm::laplacian(muEff(), U_)
- fvc::div(mu()*dev2(T(fvc::grad(U_))))
);
}
else
@ -306,9 +306,9 @@ tmp<fvVectorMatrix> LaunderGibsonRSTM::divDevRhoReff(volVectorField& U) const
return
(
fvc::div(rho_*R_)
+ fvc::laplacian(mut_, U)
- fvm::laplacian(muEff(), U)
- fvc::div(mu()*dev2(T(fvc::grad(U))))
+ fvc::laplacian(mut_, U_)
- fvm::laplacian(muEff(), U_)
- fvc::div(mu()*dev2(T(fvc::grad(U_))))
);
}
}

View file

@ -192,7 +192,7 @@ public:
virtual tmp<volSymmTensorField> devRhoReff() const;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
virtual tmp<fvVectorMatrix> divDevRhoReff() const;
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct();

View file

@ -240,11 +240,12 @@ tmp<volSymmTensorField> LaunderSharmaKE::devRhoReff() const
}
tmp<fvVectorMatrix> LaunderSharmaKE::divDevRhoReff(volVectorField& U) const
tmp<fvVectorMatrix> LaunderSharmaKE::divDevRhoReff() const
{
return
(
- fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(T(fvc::grad(U))))
- fvm::laplacian(muEff(), U_)
- fvc::div(muEff()*dev2(T(fvc::grad(U_))))
);
}

View file

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

View file

@ -302,7 +302,7 @@ public:
virtual tmp<volSymmTensorField> devRhoReff() const = 0;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const = 0;
virtual tmp<fvVectorMatrix> divDevRhoReff() const = 0;
//- Return yPlus for the given patch
virtual tmp<scalarField> yPlus

View file

@ -239,11 +239,12 @@ tmp<volSymmTensorField> RNGkEpsilon::devRhoReff() const
}
tmp<fvVectorMatrix> RNGkEpsilon::divDevRhoReff(volVectorField& U) const
tmp<fvVectorMatrix> RNGkEpsilon::divDevRhoReff() const
{
return
(
- fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(T(fvc::grad(U))))
- fvm::laplacian(muEff(), U_)
- fvc::div(muEff()*dev2(T(fvc::grad(U_))))
);
}

View file

@ -169,7 +169,7 @@ public:
virtual tmp<volSymmTensorField> devRhoReff() const;
//- Return the effective stress tensor including the laminar stress
virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
virtual tmp<fvVectorMatrix> divDevRhoReff() const;
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct();

View file

@ -288,14 +288,14 @@ tmp<volSymmTensorField> SpalartAllmaras::devRhoReff() const
}
tmp<fvVectorMatrix> SpalartAllmaras::divDevRhoReff(volVectorField& U) const
tmp<fvVectorMatrix> SpalartAllmaras::divDevRhoReff() const
{
volScalarField muEff_ = muEff();
return
(
- fvm::laplacian(muEff_, U)
- fvc::div(muEff_*dev2(T(fvc::grad(U))))
- fvm::laplacian(muEff_, U_)
- fvc::div(muEff_*dev2(T(fvc::grad(U_))))
);
}

View file

@ -231,7 +231,7 @@ public:
virtual tmp<volSymmTensorField> devRhoReff() const;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
virtual tmp<fvVectorMatrix> divDevRhoReff() const;
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct();

View file

@ -221,12 +221,12 @@ tmp<volSymmTensorField> kEpsilon::devRhoReff() const
}
tmp<fvVectorMatrix> kEpsilon::divDevRhoReff(volVectorField& U) const
tmp<fvVectorMatrix> kEpsilon::divDevRhoReff() const
{
return
(
- fvm::laplacian(muEff(), U)
- fvc::div(muEff()*dev2(T(fvc::grad(U))))
- fvm::laplacian(muEff(), U_)
- fvc::div(muEff()*dev2(T(fvc::grad(U_))))
);
}

View file

@ -165,7 +165,7 @@ public:
virtual tmp<volSymmTensorField> devRhoReff() const;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
virtual tmp<fvVectorMatrix> divDevRhoReff() const;
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct();

View file

@ -365,11 +365,12 @@ tmp<volSymmTensorField> kOmegaSST::devRhoReff() const
}
tmp<fvVectorMatrix> kOmegaSST::divDevRhoReff(volVectorField& U) const
tmp<fvVectorMatrix> kOmegaSST::divDevRhoReff() const
{
return
(
- fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(T(fvc::grad(U))))
- fvm::laplacian(muEff(), U_)
- fvc::div(muEff()*dev2(T(fvc::grad(U_))))
);
}

View file

@ -290,7 +290,7 @@ public:
virtual tmp<volSymmTensorField> devRhoReff() const;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
virtual tmp<fvVectorMatrix> divDevRhoReff() const;
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct();

View file

@ -166,12 +166,12 @@ tmp<volSymmTensorField> laminar::devRhoReff() const
}
tmp<fvVectorMatrix> laminar::divDevRhoReff(volVectorField& U) const
tmp<fvVectorMatrix> laminar::divDevRhoReff() const
{
return
(
- fvm::laplacian(muEff(), U)
- fvc::div(muEff()*dev2(T(fvc::grad(U))))
- fvm::laplacian(muEff(), U_)
- fvc::div(muEff()*dev2(T(fvc::grad(U_))))
);
}

View file

@ -110,7 +110,7 @@ public:
virtual tmp<volSymmTensorField> devRhoReff() const;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
virtual tmp<fvVectorMatrix> divDevRhoReff() const;
//- Correct the laminar viscosity
virtual void correct();

View file

@ -256,11 +256,12 @@ tmp<volSymmTensorField> realizableKE::devRhoReff() const
}
tmp<fvVectorMatrix> realizableKE::divDevRhoReff(volVectorField& U) const
tmp<fvVectorMatrix> realizableKE::divDevRhoReff() const
{
return
(
- fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(T(fvc::grad(U))))
- fvm::laplacian(muEff(), U_)
- fvc::div(muEff()*dev2(T(fvc::grad(U_))))
);
}

View file

@ -187,7 +187,7 @@ public:
virtual tmp<volSymmTensorField> devRhoReff() const;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
virtual tmp<fvVectorMatrix> divDevRhoReff() const;
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct();

View file

@ -184,12 +184,12 @@ tmp<volSymmTensorField> laminar::devRhoReff() const
}
tmp<fvVectorMatrix> laminar::divDevRhoReff(volVectorField& U) const
tmp<fvVectorMatrix> laminar::divDevRhoReff() const
{
return
(
- fvm::laplacian(muEff(), U)
- fvc::div(muEff()*dev2(T(fvc::grad(U))))
- fvm::laplacian(muEff(), U_)
- fvc::div(muEff()*dev2(T(fvc::grad(U_))))
);
}

View file

@ -119,7 +119,7 @@ public:
virtual tmp<volSymmTensorField> devRhoReff() const;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
virtual tmp<fvVectorMatrix> divDevRhoReff() const;
//- Correct the laminar viscosity
virtual void correct();

View file

@ -210,7 +210,7 @@ public:
virtual tmp<volSymmTensorField> devRhoReff() const = 0;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const = 0;
virtual tmp<fvVectorMatrix> divDevRhoReff() const = 0;
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct() = 0;

View file

@ -86,11 +86,11 @@ tmp<volSymmTensorField> GenEddyVisc::devBeff() const
}
tmp<fvVectorMatrix> GenEddyVisc::divDevBeff(volVectorField& U) const
tmp<fvVectorMatrix> GenEddyVisc::divDevBeff() 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_))))
);
}

View file

@ -116,7 +116,7 @@ public:
//- 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> divDevBeff() const;
//- Correct Eddy-Viscosity and related properties
virtual void correct(const tmp<volTensorField>& gradU);

View file

@ -128,21 +128,18 @@ tmp<volSymmTensorField> GenSGSStress::devBeff() const
}
tmp<fvVectorMatrix> GenSGSStress::divDevBeff
(
volVectorField& U
) const
tmp<fvVectorMatrix> GenSGSStress::divDevBeff() const
{
if (couplingFactor_.value() > 0.0)
{
return
(
fvc::div(B_ + couplingFactor_*nuSgs_*fvc::grad(U))
fvc::div(B_ + couplingFactor_*nuSgs_*fvc::grad(U_))
+ fvc::laplacian
(
(1.0 - couplingFactor_)*nuSgs_, U, "laplacian(nuEff,U)"
(1.0 - couplingFactor_)*nuSgs_, U_, "laplacian(nuEff,U)"
)
- fvm::laplacian(nuEff(), U)
- fvm::laplacian(nuEff(), U_)
);
}
else
@ -150,8 +147,8 @@ tmp<fvVectorMatrix> GenSGSStress::divDevBeff
return
(
fvc::div(B_)
+ fvc::laplacian(nuSgs_, U, "laplacian(nuEff,U)")
- fvm::laplacian(nuEff(), U)
+ fvc::laplacian(nuSgs_, U_, "laplacian(nuEff,U)")
- fvm::laplacian(nuEff(), U_)
);
}
}

View file

@ -127,7 +127,7 @@ public:
//- Returns div(B).
// This is the additional term due to the filtering of the NSE.
virtual tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const;
virtual tmp<fvVectorMatrix> divDevBeff() const;
//- Read LESProperties dictionary
virtual bool read();

View file

@ -211,7 +211,7 @@ public:
//- Returns div(dev(Beff)).
// This is the additional term due to the filtering of the NSE.
virtual tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const = 0;
virtual tmp<fvVectorMatrix> divDevBeff() const = 0;
// RAS compatibility functions for the turbulenceModel base class
@ -235,9 +235,9 @@ public:
}
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const
virtual tmp<fvVectorMatrix> divDevReff() const
{
return divDevBeff(U);
return divDevBeff();
}

View file

@ -79,20 +79,17 @@ tmp<volSymmTensorField> Smagorinsky2::B() const
}
tmp<fvVectorMatrix> Smagorinsky2::divDevBeff
(
volVectorField& U
) const
tmp<fvVectorMatrix> Smagorinsky2::divDevBeff() const
{
volSymmTensorField aniNuEff
(
"aniNuEff",
I*nuEff() + cD2_*delta()*symm(fvc::grad(U))
I*nuEff() + cD2_*delta()*symm(fvc::grad(U_))
);
return
(
- fvm::laplacian(aniNuEff, U) - fvc::div(nuEff()*dev(T(fvc::grad(U))))
- fvm::laplacian(aniNuEff, U_) - fvc::div(nuEff()*dev(T(fvc::grad(U_))))
);
}

View file

@ -109,7 +109,7 @@ public:
//- Returns div(B).
// This is the additional term due to the filtering of the NSE.
virtual tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const;
virtual tmp<fvVectorMatrix> divDevBeff() const;
//- Read LESProperties dictionary
virtual bool read();

View file

@ -344,11 +344,11 @@ tmp<volSymmTensorField> SpalartAllmaras::devBeff() const
}
tmp<fvVectorMatrix> SpalartAllmaras::divDevBeff(volVectorField& U) const
tmp<fvVectorMatrix> SpalartAllmaras::divDevBeff() 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_))))
);
}

View file

@ -175,7 +175,7 @@ public:
//- 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;
virtual tmp<fvVectorMatrix> divDevBeff() const;
//- Correct nuTilda and related properties
virtual void correct(const tmp<volTensorField>& gradU);

View file

@ -99,12 +99,12 @@ tmp<volSymmTensorField> dynMixedSmagorinsky::devBeff() const
}
tmp<fvVectorMatrix> dynMixedSmagorinsky::divDevBeff(volVectorField& U) const
tmp<fvVectorMatrix> dynMixedSmagorinsky::divDevBeff() const
{
return
(
scaleSimilarity::divDevBeff(U)
+ dynSmagorinsky::divDevBeff(U)
scaleSimilarity::divDevBeff()
+ dynSmagorinsky::divDevBeff()
);
}

View file

@ -126,7 +126,7 @@ public:
//- Returns div(B).
// This is the additional term due to the filtering of the NSE.
tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const;
tmp<fvVectorMatrix> divDevBeff() const;
//- Correct Eddy-Viscosity and related properties
void correct(const tmp<volTensorField>& gradU);

View file

@ -429,11 +429,11 @@ tmp<volSymmTensorField> kOmegaSSTSAS::devBeff() const
}
tmp<fvVectorMatrix> kOmegaSSTSAS::divDevBeff(volVectorField& U) const
tmp<fvVectorMatrix> kOmegaSSTSAS::divDevBeff() 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_))))
);
}

View file

@ -243,7 +243,7 @@ public:
//- 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;
virtual tmp<fvVectorMatrix> divDevBeff() const;
//- Solve the turbulence equations (k-w) and correct the turbulence
// viscosity

View file

@ -140,11 +140,11 @@ tmp<volSymmTensorField> laminar::devBeff() const
}
tmp<fvVectorMatrix> laminar::divDevBeff(volVectorField& U) const
tmp<fvVectorMatrix> laminar::divDevBeff() 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_))))
);
}

View file

@ -108,7 +108,7 @@ public:
//- 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;
virtual tmp<fvVectorMatrix> divDevBeff() const;
//- Read LESProperties dictionary
bool read();

View file

@ -99,15 +99,12 @@ tmp<volSymmTensorField> mixedSmagorinsky::devBeff() const
}
tmp<fvVectorMatrix> mixedSmagorinsky::divDevBeff
(
volVectorField& U
) const
tmp<fvVectorMatrix> mixedSmagorinsky::divDevBeff() const
{
return
(
scaleSimilarity::divDevBeff(U)
+ Smagorinsky::divDevBeff(U)
scaleSimilarity::divDevBeff()
+ Smagorinsky::divDevBeff()
);
}

View file

@ -131,7 +131,7 @@ public:
//- 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;
virtual tmp<fvVectorMatrix> divDevBeff() const;
//- Correct Eddy-Viscosity and related properties
virtual void correct(const tmp<volTensorField>& gradU);

View file

@ -83,9 +83,9 @@ tmp<volSymmTensorField> scaleSimilarity::devBeff() const
}
tmp<fvVectorMatrix> scaleSimilarity::divDevBeff(volVectorField& U) const
tmp<fvVectorMatrix> scaleSimilarity::divDevBeff() const
{
return fvm::Su(fvc::div(devBeff()), U);
return fvm::Su(fvc::div(devBeff()), U_);
}

View file

@ -110,7 +110,7 @@ public:
//- 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;
virtual tmp<fvVectorMatrix> divDevBeff() const;
//- Correct Eddy-Viscosity and related properties
virtual void correct(const tmp<volTensorField>&);

View file

@ -226,20 +226,20 @@ tmp<volSymmTensorField> LRR::devReff() const
}
tmp<fvVectorMatrix> LRR::divDevReff(volVectorField& U) const
tmp<fvVectorMatrix> LRR::divDevReff() const
{
if (couplingFactor_.value() > 0.0)
{
return
(
fvc::div(R_ + couplingFactor_*nut_*fvc::grad(U), "div(R)")
fvc::div(R_ + couplingFactor_*nut_*fvc::grad(U_), "div(R)")
+ fvc::laplacian
(
(1.0 - couplingFactor_)*nut_,
U,
U_,
"laplacian(nuEff,U)"
)
- fvm::laplacian(nuEff(), U)
- fvm::laplacian(nuEff(), U_)
);
}
else
@ -247,8 +247,8 @@ tmp<fvVectorMatrix> LRR::divDevReff(volVectorField& U) const
return
(
fvc::div(R_)
+ fvc::laplacian(nut_, U, "laplacian(nuEff,U)")
- fvm::laplacian(nuEff(), U)
+ fvc::laplacian(nut_, U_, "laplacian(nuEff,U)")
- fvm::laplacian(nuEff(), U_)
);
}
}

View file

@ -167,7 +167,7 @@ public:
virtual tmp<volSymmTensorField> devReff() const;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
virtual tmp<fvVectorMatrix> divDevReff() const;
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct();

View file

@ -190,12 +190,12 @@ tmp<volSymmTensorField> LamBremhorstKE::devReff() const
}
tmp<fvVectorMatrix> LamBremhorstKE::divDevReff(volVectorField& U) const
tmp<fvVectorMatrix> LamBremhorstKE::divDevReff() 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_))))
);
}

Some files were not shown because too many files have changed in this diff Show more