diff --git a/applications/utilities/postProcessing/wall/checkYPlus/checkYPlus.C b/applications/utilities/postProcessing/wall/checkYPlus/checkYPlus.C index d9752bfe92..0aa95fe7da 100644 --- a/applications/utilities/postProcessing/wall/checkYPlus/checkYPlus.C +++ b/applications/utilities/postProcessing/wall/checkYPlus/checkYPlus.C @@ -23,11 +23,10 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Application - checkYPlus + yPlusRAS Description - Calculates and reports yPlus for all wall patches, for each time in a - database. + Calculates and reports yPlus for all wall patches, for each time. \*---------------------------------------------------------------------------*/ @@ -40,21 +39,20 @@ Description int main(int argc, char *argv[]) { + #include "addTimeOptions.H" + #include "setRootCase.H" -# include "addTimeOptions.H" -# include "setRootCase.H" - -# include "createTime.H" + #include "createTime.H" // Get times list instantList Times = runTime.times(); // set startTime and endTime depending on -time and -latestTime options -# include "checkTimeOptions.H" + #include "checkTimeOptions.H" runTime.setTime(Times[startTime], startTime); -# include "createMesh.H" + #include "createMesh.H" for (label i=startTime; iyPlus(patchI); - const scalarField& Yp = yPlus.boundaryField()[patchI]; + const fvPatchList& patches = mesh.boundary(); - Info<< "Patch " << patchI - << " named " << mesh.boundary()[patchI].name() + forAll(patches, patchi) + { + const fvPatch& currPatch = patches[patchi]; + + if (typeid(currPatch) == typeid(wallFvPatch)) + { + yPlus.boundaryField()[patchi] = turbulence->yPlus(patchi); + const scalarField& Yp = yPlus.boundaryField()[patchi]; + + Info<< "Patch " << patchi + << " named " << currPatch.name() << " y+ : min: " << min(Yp) << " max: " << max(Yp) << " average: " << average(Yp) << nl << endl; } diff --git a/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C b/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C index 1b724fffcb..a39b505488 100644 --- a/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C +++ b/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C @@ -26,7 +26,7 @@ Application yPlusLES Description - Calculates the yPlus of the near-wall cells for an LES. + Calculates and reports yPlus for all wall patches, for each time. \*---------------------------------------------------------------------------*/ @@ -39,21 +39,20 @@ Description int main(int argc, char *argv[]) { + #include "addTimeOptions.H" + #include "setRootCase.H" -# include "addTimeOptions.H" -# include "setRootCase.H" - -# include "createTime.H" + #include "createTime.H" // Get times list instantList Times = runTime.times(); // set startTime and endTime depending on -time and -latestTime options -# include "checkTimeOptions.H" + #include "checkTimeOptions.H" runTime.setTime(Times[startTime], startTime); -# include "createMesh.H" + #include "createMesh.H" for (label i=startTime; inuEff(); - volScalarField yPlus ( IOobject @@ -80,8 +76,34 @@ int main(int argc, char *argv[]) dimensionedScalar("yPlus", dimless, 0.0) ); - const fvPatchList& patches = mesh.boundary(); - + Info<< "Reading field U\n" << endl; + volVectorField U + ( + IOobject + ( + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ), + mesh + ); + + #include "createPhi.H" + + singlePhaseTransportModel laminarTransport(U, phi); + + autoPtr sgsModel + ( + LESmodel::New(U, phi, laminarTransport) + ); + + volScalarField::GeometricBoundaryField d = nearWallDist(mesh).y(); + volScalarField nuEff = sgsModel->nuEff(); + + const fvPatchList& patches = mesh.boundary(); + forAll(patches, patchi) { const fvPatch& currPatch = patches[patchi]; @@ -96,6 +118,11 @@ int main(int argc, char *argv[]) *mag(U.boundaryField()[patchi].snGrad()) ) /sgsModel->nu().boundaryField()[patchi]; + + Info<< "Patch " << patchi + << " named " << currPatch.name() + << " y+ : min: " << min(Yp) << " max: " << max(Yp) + << " average: " << average(Yp) << nl << endl; } }