Consistent divDevReff calculation in incompressible turbulence models
Note: a minor bugfix is also included (previously, dev has been used instead of dev2. This is included in the current mathematical reformulation). Tested on cavity case: now simpleFoam with laminar turbulence model gives exactly the same results as icoFoam.
This commit is contained in:
parent
eee9507e55
commit
bee6a2228a
17 changed files with 67 additions and 36 deletions
|
@ -192,10 +192,12 @@ tmp<volSymmTensorField> LamBremhorstKE::devReff() const
|
|||
|
||||
tmp<fvVectorMatrix> LamBremhorstKE::divDevReff() const
|
||||
{
|
||||
const volScalarField nuEffective = nuEff();
|
||||
|
||||
return
|
||||
(
|
||||
- fvm::laplacian(nuEff(), U_)
|
||||
- fvc::div(nuEff()*dev(T(fvc::grad(U_))))
|
||||
- fvm::laplacian(nuEffective, U_)
|
||||
- (fvc::grad(U_) & fvc::grad(nuEffective))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -198,10 +198,12 @@ tmp<volSymmTensorField> LaunderSharmaKE::devReff() const
|
|||
|
||||
tmp<fvVectorMatrix> LaunderSharmaKE::divDevReff() const
|
||||
{
|
||||
const volScalarField nuEffective = nuEff();
|
||||
|
||||
return
|
||||
(
|
||||
- fvm::laplacian(nuEff(), U_)
|
||||
- fvc::div(nuEff()*dev(T(fvc::grad(U_))))
|
||||
- fvm::laplacian(nuEffective, U_)
|
||||
- (fvc::grad(U_) & fvc::grad(nuEffective))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -276,11 +276,13 @@ tmp<volSymmTensorField> LienCubicKE::devReff() const
|
|||
|
||||
tmp<fvVectorMatrix> LienCubicKE::divDevReff() const
|
||||
{
|
||||
const volScalarField nuEffective = nuEff();
|
||||
|
||||
return
|
||||
(
|
||||
fvc::div(nonlinearStress_)
|
||||
- fvm::laplacian(nuEff(), U_)
|
||||
- fvc::div(nuEff()*dev(T(fvc::grad(U_))))
|
||||
- fvm::laplacian(nuEffective, U_)
|
||||
- (fvc::grad(U_) & fvc::grad(nuEffective))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -346,11 +346,13 @@ tmp<volSymmTensorField> LienCubicKELowRe::devReff() const
|
|||
|
||||
tmp<fvVectorMatrix> LienCubicKELowRe::divDevReff() const
|
||||
{
|
||||
const volScalarField nuEffective = nuEff();
|
||||
|
||||
return
|
||||
(
|
||||
fvc::div(nonlinearStress_)
|
||||
- fvm::laplacian(nuEff(), U_)
|
||||
- fvc::div(nuEff()*dev(T(fvc::grad(U_))))
|
||||
- fvm::laplacian(nuEffective, U_)
|
||||
- (fvc::grad(U_) & fvc::grad(nuEffective))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -234,11 +234,12 @@ tmp<volSymmTensorField> LienLeschzinerLowRe::devReff() const
|
|||
|
||||
tmp<fvVectorMatrix> LienLeschzinerLowRe::divDevReff() const
|
||||
{
|
||||
const volScalarField nuEffective = nuEff();
|
||||
|
||||
return
|
||||
(
|
||||
- fvm::laplacian(nuEff(), U_)
|
||||
//- (fvc::grad(U_) & fvc::grad(nuEff()))
|
||||
- fvc::div(nuEff()*T(fvc::grad(U_)))
|
||||
- fvm::laplacian(nuEffective, U_)
|
||||
- (fvc::grad(U_) & fvc::grad(nuEffective))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -264,11 +264,13 @@ tmp<volSymmTensorField> NonlinearKEShih::devReff() const
|
|||
|
||||
tmp<fvVectorMatrix> NonlinearKEShih::divDevReff() const
|
||||
{
|
||||
const volScalarField nuEffective = nuEff();
|
||||
|
||||
return
|
||||
(
|
||||
fvc::div(nonlinearStress_)
|
||||
- fvm::laplacian(nuEff(), U_)
|
||||
- fvc::div(nuEff()*dev(T(fvc::grad(U_))))
|
||||
- fvm::laplacian(nuEffective, U_)
|
||||
- (fvc::grad(U_) & fvc::grad(nuEffective))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -208,10 +208,12 @@ tmp<volSymmTensorField> RNGkEpsilon::devReff() const
|
|||
|
||||
tmp<fvVectorMatrix> RNGkEpsilon::divDevReff() const
|
||||
{
|
||||
const volScalarField nuEffective = nuEff();
|
||||
|
||||
return
|
||||
(
|
||||
- fvm::laplacian(nuEff(), U_)
|
||||
- fvc::div(nuEff()*dev(T(fvc::grad(U_))))
|
||||
- fvm::laplacian(nuEffective, U_)
|
||||
- (fvc::grad(U_) & fvc::grad(nuEffective))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -312,12 +312,12 @@ tmp<volSymmTensorField> SpalartAllmaras::devReff() const
|
|||
|
||||
tmp<fvVectorMatrix> SpalartAllmaras::divDevReff() const
|
||||
{
|
||||
volScalarField nuEff_ = nuEff();
|
||||
const volScalarField nuEffective = nuEff();
|
||||
|
||||
return
|
||||
(
|
||||
- fvm::laplacian(nuEff_, U_)
|
||||
- fvc::div(nuEff_*dev(T(fvc::grad(U_))))
|
||||
- fvm::laplacian(nuEffective, U_)
|
||||
- (fvc::grad(U_) & fvc::grad(nuEffective))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -355,10 +355,12 @@ tmp<volSymmTensorField> blockKOmegaSST::devReff() const
|
|||
|
||||
tmp<fvVectorMatrix> blockKOmegaSST::divDevReff() const
|
||||
{
|
||||
const volScalarField nuEffective = nuEff();
|
||||
|
||||
return
|
||||
(
|
||||
- fvm::laplacian(nuEff(), U_)
|
||||
- fvc::div(nuEff()*dev(T(fvc::grad(U_))))
|
||||
- fvm::laplacian(nuEffective, U_)
|
||||
- (fvc::grad(U_) & fvc::grad(nuEffective))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -194,10 +194,12 @@ tmp<volSymmTensorField> coupledKEpsilon::devReff() const
|
|||
|
||||
tmp<fvVectorMatrix> coupledKEpsilon::divDevReff() const
|
||||
{
|
||||
const volScalarField nuEffective = nuEff();
|
||||
|
||||
return
|
||||
(
|
||||
- fvm::laplacian(nuEff(), U_)
|
||||
- fvc::div(nuEff()*dev(T(fvc::grad(U_))))
|
||||
- fvm::laplacian(nuEffective, U_)
|
||||
- (fvc::grad(U_) & fvc::grad(nuEffective))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -355,10 +355,12 @@ tmp<volSymmTensorField> coupledKOmegaSST::devReff() const
|
|||
|
||||
tmp<fvVectorMatrix> coupledKOmegaSST::divDevReff() const
|
||||
{
|
||||
const volScalarField nuEffective = nuEff();
|
||||
|
||||
return
|
||||
(
|
||||
- fvm::laplacian(nuEff(), U_)
|
||||
- fvc::div(nuEff()*dev(T(fvc::grad(U_))))
|
||||
- fvm::laplacian(nuEffective, U_)
|
||||
- (fvc::grad(U_) & fvc::grad(nuEffective))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -180,10 +180,12 @@ tmp<volSymmTensorField> kEpsilon::devReff() const
|
|||
|
||||
tmp<fvVectorMatrix> kEpsilon::divDevReff() const
|
||||
{
|
||||
const volScalarField nuEffective = nuEff();
|
||||
|
||||
return
|
||||
(
|
||||
- fvm::laplacian(nuEff(), U_)
|
||||
- fvc::div(nuEff()*dev(T(fvc::grad(U_))))
|
||||
- fvm::laplacian(nuEffective, U_)
|
||||
- (fvc::grad(U_) & fvc::grad(nuEffective))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -189,10 +189,12 @@ tmp<volSymmTensorField> kOmega::devReff() const
|
|||
|
||||
tmp<fvVectorMatrix> kOmega::divDevReff() const
|
||||
{
|
||||
const volScalarField nuEffective = nuEff();
|
||||
|
||||
return
|
||||
(
|
||||
- fvm::laplacian(nuEff(), U_)
|
||||
- fvc::div(nuEff()*dev(T(fvc::grad(U_))))
|
||||
- fvm::laplacian(nuEffective, U_)
|
||||
- (fvc::grad(U_) & fvc::grad(nuEffective))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -342,10 +342,12 @@ tmp<volSymmTensorField> kOmegaSST::devReff() const
|
|||
|
||||
tmp<fvVectorMatrix> kOmegaSST::divDevReff() const
|
||||
{
|
||||
const volScalarField nuEffective = nuEff();
|
||||
|
||||
return
|
||||
(
|
||||
- fvm::laplacian(nuEff(), U_)
|
||||
- fvc::div(nuEff()*dev(T(fvc::grad(U_))))
|
||||
- fvm::laplacian(nuEffective, U_)
|
||||
- (fvc::grad(U_) & fvc::grad(nuEffective))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -167,10 +167,12 @@ tmp<volSymmTensorField> laminar::devReff() const
|
|||
|
||||
tmp<fvVectorMatrix> laminar::divDevReff() const
|
||||
{
|
||||
const volScalarField nuEffective = nuEff();
|
||||
|
||||
return
|
||||
(
|
||||
- fvm::laplacian(nuEff(), U_)
|
||||
- fvc::div(nuEff()*dev(T(fvc::grad(U_))))
|
||||
- fvm::laplacian(nuEffective, U_)
|
||||
- (fvc::grad(U_) & fvc::grad(nuEffective))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -245,10 +245,12 @@ tmp<volSymmTensorField> qZeta::devReff() const
|
|||
|
||||
tmp<fvVectorMatrix> qZeta::divDevReff() const
|
||||
{
|
||||
const volScalarField nuEffective = nuEff();
|
||||
|
||||
return
|
||||
(
|
||||
- fvm::laplacian(nuEff(), U_)
|
||||
- fvc::div(nuEff()*dev(T(fvc::grad(U_))))
|
||||
- fvm::laplacian(nuEffective, U_)
|
||||
- (fvc::grad(U_) & fvc::grad(nuEffective))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -233,10 +233,12 @@ tmp<volSymmTensorField> realizableKE::devReff() const
|
|||
|
||||
tmp<fvVectorMatrix> realizableKE::divDevReff() const
|
||||
{
|
||||
const volScalarField nuEffective = nuEff();
|
||||
|
||||
return
|
||||
(
|
||||
- fvm::laplacian(nuEff(), U_)
|
||||
- fvc::div(nuEff()*dev(T(fvc::grad(U_))))
|
||||
- fvm::laplacian(nuEffective, U_)
|
||||
- (fvc::grad(U_) & fvc::grad(nuEffective))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue