ENH: additional handling for out-of-range sampling (#1891)

- when sampling onto a meshed surface, the sampling surface may be
  outside of the mesh region, or simply too far away to be considered
  reasonable.

  Can now specify a max search distance and default values for samples
  that are too distant.
  If a default value is not specified, uses Type(Zero).

  Eg,

      maxDistance     0.005;
      defaultValue
      {
          "p.*"   1e5;
          T       273.15;
          U       (-100 -100 -100);
      }
This commit is contained in:
Mark Olesen
2020-10-21 22:10:41 +02:00
parent a947e9ddcf
commit f8d08a805b
6 changed files with 250 additions and 116 deletions

View File

@ -121,6 +121,44 @@ sampled
}
// Sample and write for meshed surfaces
sampleMesh
{
type surfaces;
libs (sampling);
log true;
writeControl writeTime;
writeInterval 1;
surfaceFormat vtk;
fields (p rho U T);
surfaces
{
// Oversized sampling - for general testing
meshed_sample
{
type meshedSurface;
surface oversized_sample.obj;
source cells;
maxDistance 0.0025;
defaultValue
{
T 273;
}
}
meshed_interpolate
{
$meshed_sample;
interpolate true;
}
}
}
// * * * * * * * * * * * * * * * Calculations * * * * * * * * * * * * * * * //
massflow