ENH: extended runTimePostProcessing (#1206)

- Extended runTimePostProcessing to include access to "live"
  simulation objects such a geometry patches and sampled surfaces
  stored on the "functionObjectObjects" registry.

- Add 'live' runTimePostProcessing of cloud data.
  Extracts position and fields from the cloud via its objectRegistry writer

- For the "live" simulation objects, there are two new volume filters
  that work directly with the OpenFOAM volume fields:
      * iso-surface
      * cutting planes
  Both use the VTK algorithms directly and support multiple values.
  Eg, can make multiple iso-levels or multiple planes parallel to each
  other.

- When VTK has been compiled with MPI-support, parallel rendering will
  be used.

- Additional title text properties (shadow, italic etc)

- Simplified handling of scalar-bar and visibility switches

- Support multiple text positions. Eg, for adding watermark text.
This commit is contained in:
Mark Olesen
2019-02-13 11:22:46 +01:00
committed by Andrew Heather
parent 03e6aa1a6d
commit 42fbf6d38c
68 changed files with 7123 additions and 847 deletions

View File

@ -53,9 +53,8 @@ maxCo 0.2;
functions
{
#include "sampling"
#include "streamLines"
#include "runTimePostProcessing"
// Demonstrate runTimePostProcessing
#include "visualization"
}
// ************************************************************************* //

View File

@ -8,15 +8,21 @@
postPro1
{
type runTimePostProcessing;
libs ("librunTimePostProcessing.so");
writeControl writeTime;
#includeEtc "caseDicts/postProcessing/visualization/runTimePostPro.cfg"
// Time control etc
${_visualization};
// debug true;
// parallel true;
output
{
name image;
width 800;
height 600;
}
camera
{
// If camera is moving, optionally provide start and end times
@ -42,14 +48,10 @@ postPro1
// they are locally overridden
colours
{
background (0.317647 0.341176 0.431373);
background2 ${background};
text (0.75 0.75 0.75);
edge (1 0 0);
surface (0.5 0.5 0.5);
line (1 0 0);
${..colourScheme.paraview};
}
// Line data
lines
{
streamline
@ -70,11 +72,11 @@ postPro1
}
}
_plane
// Surface data
_surface
{
type functionObjectSurface;
functionObject cuttingPlane;
colourMap blueWhiteRed;
colourMap coolToWarm;
representation glyph;
maxGlyphLength 0.1;
visible yes;
@ -83,13 +85,8 @@ postPro1
field U;
range (0 10);
opacity 1;
scalarBar
{
visible no;
}
}
surfaces
{
geom
@ -102,26 +99,51 @@ postPro1
visible yes;
featureEdges no;
opacity 0.8;
visible false;
}
patches
{
type patches;
patches (hole);
renderMode phong;
representation surface;
colourMap coolToWarm;
colourBy field;
field U;
range (0 10);
nearCellValue true;
smooth true;
}
plane0
{
${_plane};
functionObject plane0;
${_surface};
functionObject planes.plane0;
}
plane1
{
${_plane};
functionObject plane1;
${_surface};
functionObject planes.plane1;
}
plane2
cutting
{
${_plane};
functionObject plane2;
}
plane3
{
${_plane};
functionObject plane3;
// Same colours and scaling as surface
${_surface};
type plane;
planeType pointAndNormal;
pointAndNormalDict
{
point (0 0 0);
normal (1 0 0);
}
offsets (0.1 0.2 0.3 0.4 0.5);
colourMap coolToWarm;
}
}

View File

@ -6,94 +6,58 @@
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
plane0
planes
{
type surfaces;
libs ("libsampling.so");
writeControl writeTime;
surfaceFormat vtk;
// Time control etc
${_visualization};
fields ( p U );
// surfaceFormat vtk;
surfaceFormat none;
store true;
interpolationScheme cellPoint;
_plane
{
type plane; //cuttingPlane;
planeType pointAndNormal;
interpolate false;
pointAndNormalDict
{
point (0 0 0);
normal (1 0 0);
}
}
surfaces
(
{
plane0
{
type cuttingPlane;
planeType pointAndNormal;
interpolate true;
${_plane}
pointAndNormalDict
{
point (0 0 0);
normal (1 0 0);
}
}
);
}
plane1
{
${plane0}
surfaces
(
plane1
{
type cuttingPlane;
planeType pointAndNormal;
interpolate true;
${_plane}
pointAndNormalDict
{
point (0.1 0 0);
normal (1 0 0);
point (-0.1 0 0);
}
}
);
}
}
plane2
{
${plane0}
surfaces
(
plane2
{
type cuttingPlane;
planeType pointAndNormal;
interpolate true;
pointAndNormalDict
{
point (0.2 0 0);
normal (1 0 0);
}
}
);
}
plane3
{
${plane0}
surfaces
(
plane3
{
type cuttingPlane;
planeType pointAndNormal;
interpolate true;
pointAndNormalDict
{
point (0.3 0 0);
normal (1 0 0);
}
}
);
#remove _plane
}

View File

@ -10,7 +10,8 @@ streamLines
{
type streamLine;
writeControl writeTime;
// Time control etc
${_visualization};
setFormat vtk;

View File

@ -0,0 +1,29 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1812 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
// Demonstrate runTimePostProcessing
// Timing
_visualization
{
writeControl writeTime;
// enabled true;
// Debug: writeControl timeStep;
// Debug: writeInterval 4;
}
#include "streamLines"
#include "sampling"
#include "runTimePostProcessing"
#remove _visualization
// ************************************************************************* //