Commit 59ebf74e authored by Henry Weller's avatar Henry Weller
Browse files

TurbulenceModels: Reorder stress component evaluation

This ensures the U boundary conditions are updated before the explicit
parts of the stress are evaluated.

Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1988
parent e457b3cd
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -238,43 +238,43 @@ Foam::ReynoldsStress<BasicTurbulenceModel>::divDevRhoReff
{
return
(
fvc::div
fvc::laplacian
(
(1.0 - couplingFactor_)*this->alpha_*this->rho_*this->nut(),
U,
"laplacian(nuEff,U)"
)
+ fvc::div
(
this->alpha_*this->rho_*R_
+ couplingFactor_
*this->alpha_*this->rho_*this->nut()*fvc::grad(U),
"div(devRhoReff)"
)
+ fvc::laplacian
(
(1.0 - couplingFactor_)*this->alpha_*this->rho_*this->nut(),
U,
"laplacian(nuEff,U)"
)
- fvm::laplacian(this->alpha_*this->rho_*this->nuEff(), U)
- fvc::div(this->alpha_*this->rho_*this->nu()*dev2(T(fvc::grad(U))))
- fvm::laplacian(this->alpha_*this->rho_*this->nuEff(), U)
);
}
else
{
return
(
fvc::div(this->alpha_*this->rho_*R_)
+ fvc::laplacian
fvc::laplacian
(
this->alpha_*this->rho_*this->nut(),
U,
"laplacian(nuEff,U)"
)
- fvm::laplacian(this->alpha_*this->rho_*this->nuEff(), U)
+ fvc::div(this->alpha_*this->rho_*R_)
- fvc::div(this->alpha_*this->rho_*this->nu()*dev2(T(fvc::grad(U))))
- fvm::laplacian(this->alpha_*this->rho_*this->nuEff(), U)
);
}
return
(
- fvm::laplacian(this->alpha_*this->rho_*this->nuEff(), U)
- fvc::div((this->alpha_*this->rho_*this->nuEff())*dev2(T(fvc::grad(U))))
- fvm::laplacian(this->alpha_*this->rho_*this->nuEff(), U)
);
}
......@@ -289,8 +289,8 @@ Foam::ReynoldsStress<BasicTurbulenceModel>::divDevRhoReff
{
return
(
- fvm::laplacian(this->alpha_*rho*this->nuEff(), U)
- fvc::div((this->alpha_*rho*this->nuEff())*dev2(T(fvc::grad(U))))
- fvm::laplacian(this->alpha_*rho*this->nuEff(), U)
);
}
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -97,8 +97,8 @@ Foam::linearViscousStress<BasicTurbulenceModel>::divDevRhoReff
{
return
(
- fvm::laplacian(this->alpha_*this->rho_*this->nuEff(), U)
- fvc::div((this->alpha_*this->rho_*this->nuEff())*dev2(T(fvc::grad(U))))
- fvm::laplacian(this->alpha_*this->rho_*this->nuEff(), U)
);
}
......@@ -113,8 +113,8 @@ Foam::linearViscousStress<BasicTurbulenceModel>::divDevRhoReff
{
return
(
- fvm::laplacian(this->alpha_*rho*this->nuEff(), U)
- fvc::div((this->alpha_*rho*this->nuEff())*dev2(T(fvc::grad(U))))
- fvm::laplacian(this->alpha_*rho*this->nuEff(), U)
);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment