mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user