Commit 711ef825 authored by Andrew Heather's avatar Andrew Heather
Browse files

updated yPlusRAS utility

parent 040962d6
...@@ -2,7 +2,7 @@ EXE_INC = \ ...@@ -2,7 +2,7 @@ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \ EXE_LIBS = \
......
...@@ -35,16 +35,20 @@ Description ...@@ -35,16 +35,20 @@ Description
#include "RASModel.H" #include "RASModel.H"
#include "wallFvPatch.H" #include "wallFvPatch.H"
#include "wallDist.H" #include "wallDist.H"
#include "nutWallFunctionFvPatchScalarField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
typedef incompressible::RASModels::nutWallFunctionFvPatchScalarField
wallFunctionPatchField;
timeSelector::addOptions(); timeSelector::addOptions();
#include "setRootCase.H" #include "setRootCase.H"
# include "createTime.H" #include "createTime.H"
instantList timeDirs = timeSelector::select0(runTime, args); instantList timeDirs = timeSelector::select0(runTime, args);
# include "createMesh.H" #include "createMesh.H"
forAll(timeDirs, timeI) forAll(timeDirs, timeI)
{ {
...@@ -90,7 +94,7 @@ int main(int argc, char *argv[]) ...@@ -90,7 +94,7 @@ int main(int argc, char *argv[])
mesh mesh
); );
# include "createPhi.H" #include "createPhi.H"
singlePhaseTransportModel laminarTransport(U, phi); singlePhaseTransportModel laminarTransport(U, phi);
...@@ -99,26 +103,28 @@ int main(int argc, char *argv[]) ...@@ -99,26 +103,28 @@ int main(int argc, char *argv[])
incompressible::RASModel::New(U, phi, laminarTransport) incompressible::RASModel::New(U, phi, laminarTransport)
); );
const fvPatchList& patches = mesh.boundary(); const volScalarField::GeometricBoundaryField nutPatches =
RASModel->nut()().boundaryField();
forAll(patches, patchi) forAll(nutPatches, patchi)
{ {
const fvPatch& currPatch = patches[patchi]; if (isA<wallFunctionPatchField>(nutPatches[patchi]))
if (typeid(currPatch) == typeid(wallFvPatch))
{ {
yPlus.boundaryField()[patchi] = RASModel->yPlus(patchi); const wallFunctionPatchField& nutPw =
dynamic_cast<const wallFunctionPatchField&>
(nutPatches[patchi]);
yPlus.boundaryField()[patchi] = nutPw.yPlus();
const scalarField& Yp = yPlus.boundaryField()[patchi]; const scalarField& Yp = yPlus.boundaryField()[patchi];
Info<< "Patch " << patchi Info<< "Patch " << patchi
<< " named " << currPatch.name() << " named " << nutPw.patch().name()
<< " y+ : min: " << min(Yp) << " max: " << max(Yp) << " y+ : min: " << min(Yp) << " max: " << max(Yp)
<< " average: " << average(Yp) << nl << endl; << " average: " << average(Yp) << nl << endl;
} }
} }
Info<< "Writing yPlus to field " Info<< "Writing yPlus to field " << yPlus.name() << nl << endl;
<< yPlus.name() << nl << endl;
yPlus.write(); yPlus.write();
} }
...@@ -128,4 +134,5 @@ int main(int argc, char *argv[]) ...@@ -128,4 +134,5 @@ int main(int argc, char *argv[])
return 0; return 0;
} }
// ************************************************************************* // // ************************************************************************* //
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