ENH: checkMesh: write wall distance. See #71

This commit is contained in:
mattijs
2019-09-02 12:40:22 +01:00
committed by Andrew Heather
parent 50eb262c51
commit 1307836caa
2 changed files with 18 additions and 1 deletions

View File

@ -160,7 +160,8 @@ int main(int argc, char *argv[])
"cellVolume", "cellVolume",
"cellVolumeRatio", "cellVolumeRatio",
"minTetVolume", "minTetVolume",
"cellRegion" "cellRegion",
"wallDistance"
}); });
} }

View File

@ -6,6 +6,7 @@
#include "syncTools.H" #include "syncTools.H"
#include "tetPointRef.H" #include "tetPointRef.H"
#include "regionSplit.H" #include "regionSplit.H"
#include "wallDist.H"
using namespace Foam; using namespace Foam;
@ -281,6 +282,7 @@ void Foam::writeFields
// Aspect ratio // Aspect ratio
// ~~~~~~~~~~~~ // ~~~~~~~~~~~~
if (selectedFields.found("aspectRatio")) if (selectedFields.found("aspectRatio"))
{ {
volScalarField aspectRatio volScalarField aspectRatio
@ -498,5 +500,19 @@ void Foam::writeFields
cellRegion.write(); cellRegion.write();
} }
if (selectedFields.found("wallDistance"))
{
// Wall distance
//const volScalarField& y = wallDist::New(mesh).y();
volScalarField y("wallDistance", wallDist::New(mesh).y());
Info<< " Writing wall distance to " << y.name() << endl;
y.write();
// Wall-reflection vectors
//const volVectorField& n = wallDist::New(mesh).n();
//Info<< " Writing wall normal to " << n.name() << endl;
//n.write();
}
Info<< endl; Info<< endl;
} }