yPlusLES: Corrected conversion of dynamic to kinematic viscosity
This commit is contained in:
parent
ddc1b8fe0a
commit
6656daf4a2
@ -31,7 +31,6 @@ License
|
|||||||
#include "wallFvPatch.H"
|
#include "wallFvPatch.H"
|
||||||
#include "nearWallDist.H"
|
#include "nearWallDist.H"
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
@ -72,23 +71,23 @@ void Foam::yPlusLES::calcIncompressibleYPlus
|
|||||||
const volScalarField nuLam(model.nu());
|
const volScalarField nuLam(model.nu());
|
||||||
|
|
||||||
bool foundPatch = false;
|
bool foundPatch = false;
|
||||||
forAll(patches, patchI)
|
forAll(patches, patchi)
|
||||||
{
|
{
|
||||||
const fvPatch& currPatch = patches[patchI];
|
const fvPatch& currPatch = patches[patchi];
|
||||||
|
|
||||||
if (isA<wallFvPatch>(currPatch))
|
if (isA<wallFvPatch>(currPatch))
|
||||||
{
|
{
|
||||||
foundPatch = true;
|
foundPatch = true;
|
||||||
yPlus.boundaryField()[patchI] =
|
yPlus.boundaryField()[patchi] =
|
||||||
d[patchI]
|
d[patchi]
|
||||||
*sqrt
|
*sqrt
|
||||||
(
|
(
|
||||||
nuEff.boundaryField()[patchI]
|
nuEff.boundaryField()[patchi]
|
||||||
*mag(U.boundaryField()[patchI].snGrad())
|
*mag(U.boundaryField()[patchi].snGrad())
|
||||||
)
|
)
|
||||||
/nuLam.boundaryField()[patchI];
|
/nuLam.boundaryField()[patchi];
|
||||||
|
|
||||||
const scalarField& Yp = yPlus.boundaryField()[patchI];
|
const scalarField& Yp = yPlus.boundaryField()[patchi];
|
||||||
|
|
||||||
scalar minYp = gMin(Yp);
|
scalar minYp = gMin(Yp);
|
||||||
scalar maxYp = gMax(Yp);
|
scalar maxYp = gMax(Yp);
|
||||||
@ -129,6 +128,7 @@ void Foam::yPlusLES::calcCompressibleYPlus
|
|||||||
|
|
||||||
volScalarField::GeometricBoundaryField d = nearWallDist(mesh).y();
|
volScalarField::GeometricBoundaryField d = nearWallDist(mesh).y();
|
||||||
volScalarField muEff(model.muEff());
|
volScalarField muEff(model.muEff());
|
||||||
|
const volScalarField& rho(model.rho());
|
||||||
|
|
||||||
const fvPatchList& patches = mesh.boundary();
|
const fvPatchList& patches = mesh.boundary();
|
||||||
|
|
||||||
@ -137,23 +137,23 @@ void Foam::yPlusLES::calcCompressibleYPlus
|
|||||||
Info<< type() << " output:" << nl;
|
Info<< type() << " output:" << nl;
|
||||||
|
|
||||||
bool foundPatch = false;
|
bool foundPatch = false;
|
||||||
forAll(patches, patchI)
|
forAll(patches, patchi)
|
||||||
{
|
{
|
||||||
const fvPatch& currPatch = patches[patchI];
|
const fvPatch& currPatch = patches[patchi];
|
||||||
|
|
||||||
if (isA<wallFvPatch>(currPatch))
|
if (isA<wallFvPatch>(currPatch))
|
||||||
{
|
{
|
||||||
foundPatch = true;
|
foundPatch = true;
|
||||||
yPlus.boundaryField()[patchI] =
|
yPlus.boundaryField()[patchi] =
|
||||||
d[patchI]
|
d[patchi]
|
||||||
*sqrt
|
*sqrt
|
||||||
(
|
(
|
||||||
muEff.boundaryField()[patchI]
|
(muEff.boundaryField()[patchi]/rho.boundaryField()[patchi])
|
||||||
*mag(U.boundaryField()[patchI].snGrad())
|
*mag(U.boundaryField()[patchi].snGrad())
|
||||||
)
|
)
|
||||||
/muLam.boundaryField()[patchI];
|
/(muLam.boundaryField()[patchi]/rho.boundaryField()[patchi]);
|
||||||
|
|
||||||
const scalarField& Yp = yPlus.boundaryField()[patchI];
|
const scalarField& Yp = yPlus.boundaryField()[patchi];
|
||||||
|
|
||||||
scalar minYp = gMin(Yp);
|
scalar minYp = gMin(Yp);
|
||||||
scalar maxYp = gMax(Yp);
|
scalar maxYp = gMax(Yp);
|
||||||
|
@ -28,17 +28,15 @@ License
|
|||||||
|
|
||||||
#include "incompressible/RAS/RASModel/RASModel.H"
|
#include "incompressible/RAS/RASModel/RASModel.H"
|
||||||
#include "nutWallFunction/nutWallFunctionFvPatchScalarField.H"
|
#include "nutWallFunction/nutWallFunctionFvPatchScalarField.H"
|
||||||
|
|
||||||
#include "compressible/RAS/RASModel/RASModel.H"
|
#include "compressible/RAS/RASModel/RASModel.H"
|
||||||
#include "mutWallFunction/mutWallFunctionFvPatchScalarField.H"
|
#include "mutWallFunction/mutWallFunctionFvPatchScalarField.H"
|
||||||
|
|
||||||
#include "wallDist.H"
|
#include "wallDist.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(yPlusRAS, 0);
|
defineTypeNameAndDebug(yPlusRAS, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -73,17 +71,17 @@ void Foam::yPlusRAS::calcIncompressibleYPlus
|
|||||||
nut.boundaryField();
|
nut.boundaryField();
|
||||||
|
|
||||||
bool foundPatch = false;
|
bool foundPatch = false;
|
||||||
forAll(nutPatches, patchI)
|
forAll(nutPatches, patchi)
|
||||||
{
|
{
|
||||||
if (isA<wallFunctionPatchField>(nutPatches[patchI]))
|
if (isA<wallFunctionPatchField>(nutPatches[patchi]))
|
||||||
{
|
{
|
||||||
foundPatch = true;
|
foundPatch = true;
|
||||||
|
|
||||||
const wallFunctionPatchField& nutPw =
|
const wallFunctionPatchField& nutPw =
|
||||||
dynamic_cast<const wallFunctionPatchField&>(nutPatches[patchI]);
|
dynamic_cast<const wallFunctionPatchField&>(nutPatches[patchi]);
|
||||||
|
|
||||||
yPlus.boundaryField()[patchI] = nutPw.yPlus();
|
yPlus.boundaryField()[patchi] = nutPw.yPlus();
|
||||||
const scalarField& Yp = yPlus.boundaryField()[patchI];
|
const scalarField& Yp = yPlus.boundaryField()[patchi];
|
||||||
|
|
||||||
scalar minYp = gMin(Yp);
|
scalar minYp = gMin(Yp);
|
||||||
scalar maxYp = gMax(Yp);
|
scalar maxYp = gMax(Yp);
|
||||||
@ -130,17 +128,17 @@ void Foam::yPlusRAS::calcCompressibleYPlus
|
|||||||
mut.boundaryField();
|
mut.boundaryField();
|
||||||
|
|
||||||
bool foundPatch = false;
|
bool foundPatch = false;
|
||||||
forAll(mutPatches, patchI)
|
forAll(mutPatches, patchi)
|
||||||
{
|
{
|
||||||
if (isA<wallFunctionPatchField>(mutPatches[patchI]))
|
if (isA<wallFunctionPatchField>(mutPatches[patchi]))
|
||||||
{
|
{
|
||||||
foundPatch = true;
|
foundPatch = true;
|
||||||
|
|
||||||
const wallFunctionPatchField& mutPw =
|
const wallFunctionPatchField& mutPw =
|
||||||
dynamic_cast<const wallFunctionPatchField&>(mutPatches[patchI]);
|
dynamic_cast<const wallFunctionPatchField&>(mutPatches[patchi]);
|
||||||
|
|
||||||
yPlus.boundaryField()[patchI] = mutPw.yPlus();
|
yPlus.boundaryField()[patchi] = mutPw.yPlus();
|
||||||
const scalarField& Yp = yPlus.boundaryField()[patchI];
|
const scalarField& Yp = yPlus.boundaryField()[patchi];
|
||||||
|
|
||||||
scalar minYp = gMin(Yp);
|
scalar minYp = gMin(Yp);
|
||||||
scalar maxYp = gMax(Yp);
|
scalar maxYp = gMax(Yp);
|
||||||
|
Loading…
Reference in New Issue
Block a user