ENH: snappyHexMesh. Added leak-path detection.

Detects connections (during refinement) between
locationsInsideMesh and locationsOutsideMesh and
writes a sampledSet for postprocessing.
This commit is contained in:
mattijs
2018-08-02 16:39:06 +01:00
parent 8f858af6c8
commit f4ae4f7b2c
47 changed files with 926746 additions and 128 deletions

View File

@ -62,6 +62,7 @@ Description
#include "fvMeshTools.H"
#include "profiling.H"
#include "processorMeshes.H"
#include "vtkSetWriter.H"
using namespace Foam;
@ -788,6 +789,20 @@ int main(int argc, char *argv[])
const bool keepPatches(meshDict.lookupOrDefault("keepPatches", false));
// format to be used for writing lines
const word setFormat
(
meshDict.lookupOrDefault
(
"setFormat",
vtkSetWriter<scalar>::typeName
)
);
const autoPtr<writer<scalar>> setFormatter
(
writer<scalar>::New(setFormat)
);
// Read decomposePar dictionary
dictionary decomposeDict;
@ -1038,7 +1053,7 @@ int main(int argc, char *argv[])
(
100.0, // max size ratio
1e-9, // intersection tolerance
autoPtr<writer<scalar>>(new vtkSetWriter<scalar>()),
setFormatter,
0.01, // min triangle quality
true
);
@ -1476,7 +1491,8 @@ int main(int argc, char *argv[])
decomposer,
distributor,
globalToMasterPatch,
globalToSlavePatch
globalToSlavePatch,
setFormatter
);

View File

@ -785,6 +785,10 @@ meshQualityControls
// layerFields // write volScalarField for layer coverage
//);
//// Format for writing lines. E.g. leak path. Default is vtk format.
//setFormat ensight;
// Merge tolerance. Is fraction of overall bounding box of initial mesh.
// Note: the write tolerance needs to be higher than this.
mergeTolerance 1e-6;