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