mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: improvements in the surface sampling infrastructure
- improvement documentation for surface sampling.
- can now specify alternative sampling scheme for obtaining the
face values instead of just using the "cell" value. For example,
sampleScheme cellPoint;
This can be useful for cases when the surface is close to a boundary
cell and there are large gradients in the sampled field.
- distanceSurface now handles non-closed surfaces more robustly.
Unknown regions (not inside or outside) are marked internally and
excluded from consideration. This allows use of 'signed' surfaces
where not previously possible.
This commit is contained in:
@ -0,0 +1,11 @@
|
||||
# An angled plane that extends beyond the geometry
|
||||
o angledPlane
|
||||
|
||||
v -0.03 -0.08 -0.03
|
||||
v -0.03 -0.08 0.03
|
||||
v -0.07 -0.02 0.03
|
||||
v -0.07 -0.02 -0.03
|
||||
|
||||
f 1 2 4
|
||||
f 2 3 4
|
||||
# EOF
|
||||
@ -45,7 +45,19 @@ fieldTransfer
|
||||
${_plane}
|
||||
bounds (-1 -1 -1) (0 0 1);
|
||||
}
|
||||
|
||||
// Angled plane - for general testing
|
||||
plane3
|
||||
{
|
||||
type distanceSurface;
|
||||
distance 0;
|
||||
signed true;
|
||||
|
||||
surfaceType triSurfaceMesh;
|
||||
surfaceName angledPlane.obj;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -54,6 +54,19 @@ UI2
|
||||
}
|
||||
|
||||
|
||||
// Uniformity on sampled surface
|
||||
UI3
|
||||
{
|
||||
${__surfaceFieldValue}
|
||||
|
||||
regionType surface;
|
||||
name plane3;
|
||||
|
||||
operation uniformity;
|
||||
fields ( U T );
|
||||
}
|
||||
|
||||
|
||||
// Inflow uniformity, but use a scalar field for weighting
|
||||
// Since this field is quite uniform, there should be no difference
|
||||
T_UI1
|
||||
@ -96,4 +109,5 @@ rhoU_UI2
|
||||
fields ( p rho U rhoU );
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -0,0 +1,51 @@
|
||||
// -*- C++ -*-
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
debug
|
||||
{
|
||||
type surfaces;
|
||||
libs ("libsampling.so");
|
||||
log true;
|
||||
writeControl timeStep;
|
||||
writeInterval 1;
|
||||
|
||||
fields (rho U);
|
||||
|
||||
sampleScheme cellPoint;
|
||||
interpolationScheme cellPoint;
|
||||
surfaceFormat ensight;
|
||||
|
||||
formatOptions
|
||||
{
|
||||
ensight
|
||||
{
|
||||
collateTimes true;
|
||||
}
|
||||
}
|
||||
|
||||
surfaces
|
||||
(
|
||||
angledPlane
|
||||
{
|
||||
type distanceSurface;
|
||||
distance 0;
|
||||
signed true;
|
||||
regularise true;
|
||||
surfaceType triSurfaceMesh;
|
||||
surfaceName angledPlane.obj;
|
||||
}
|
||||
|
||||
iso
|
||||
{
|
||||
type isoSurface;
|
||||
isoField p;
|
||||
isoValue 1e5;
|
||||
regularise true;
|
||||
interpolate true;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user