mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: output filtering of vtkCloud by user selection (#1056)
- can filter by stride or field information.
For example,
selection
{
stride
{
// every 10th parcelId
action add;
source stride;
stride 10;
}
Umin
{
// Remove slow parcels
action subtract;
source field;
field U;
accept (less 1e-3);
}
diam
{
// Only particular diameter ranges
action subset;
source field;
field d;
accept (greater 1e-3) and (less 1e-3);
}
}
This commit is contained in:
@ -54,6 +54,7 @@ maxDeltaT 1;
|
||||
functions
|
||||
{
|
||||
#include "vtkCloud"
|
||||
#include "vtkWrite"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -6,6 +6,9 @@ cloudWrite
|
||||
libs ("liblagrangianFunctionObjects.so");
|
||||
log true;
|
||||
|
||||
// Nothing happens before this anyhow
|
||||
timeStart 0.5;
|
||||
|
||||
writeControl writeTime;
|
||||
|
||||
// cloud reactingCloud1;
|
||||
@ -15,16 +18,68 @@ cloudWrite
|
||||
fields ( U T d "Y.*" );
|
||||
|
||||
//- Output format (ascii | binary) - default = binary
|
||||
// format binary;
|
||||
// format ascii;
|
||||
|
||||
// format ascii;
|
||||
// writePrecision 12;
|
||||
// precision 12;
|
||||
|
||||
//- Suppress writing of empty clouds - default = false
|
||||
// prune true;
|
||||
// Suppress writing of empty clouds - default = false
|
||||
prune true;
|
||||
|
||||
//- Output directory name - default = "VTK"
|
||||
//- Output directory name - Default postProcessing
|
||||
// directory "VTK";
|
||||
|
||||
selection
|
||||
{
|
||||
all
|
||||
{
|
||||
action all;
|
||||
}
|
||||
|
||||
none
|
||||
{
|
||||
action clear;
|
||||
}
|
||||
|
||||
// Reduced number of output parcels
|
||||
stride
|
||||
{
|
||||
action add;
|
||||
source stride;
|
||||
stride 4;
|
||||
}
|
||||
|
||||
T
|
||||
{
|
||||
action subset;
|
||||
source field;
|
||||
field T;
|
||||
accept (greater 280) and (less 300);
|
||||
}
|
||||
|
||||
YH2O
|
||||
{
|
||||
action subset;
|
||||
source field;
|
||||
field YH2O(l);
|
||||
accept (greater 0.5);
|
||||
}
|
||||
|
||||
diameter
|
||||
{
|
||||
action subset;
|
||||
source field;
|
||||
field d;
|
||||
accept (greater 1e-10);
|
||||
}
|
||||
|
||||
Umin
|
||||
{
|
||||
action subtract;
|
||||
source field;
|
||||
field U;
|
||||
accept (less 0.1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,35 @@
|
||||
// -*- C++ -*-
|
||||
// Minimal example of using the vtkWrite function object.
|
||||
vtkWrite
|
||||
{
|
||||
type vtkWrite;
|
||||
libs ("libutilityFunctionObjects.so");
|
||||
log true;
|
||||
|
||||
// Nothing happens before this anyhow
|
||||
timeStart 0.4;
|
||||
writeControl writeTime;
|
||||
|
||||
boundary false;
|
||||
|
||||
interpolate true;
|
||||
|
||||
fields (U);
|
||||
// format ascii;
|
||||
|
||||
// Region of interest
|
||||
selection
|
||||
{
|
||||
inletRegion
|
||||
{
|
||||
action add;
|
||||
source zone;
|
||||
zones (leftFluid);
|
||||
}
|
||||
}
|
||||
|
||||
// Write cell ids as field - Default=true
|
||||
writeIds false;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user