mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: improvements for vtkWrite function object (issue #926)
- parallel output. The output is now postProcessing/<name> for similar reasoning as mentioned in #866 - better alignment with other function objects, no collision with foamToVTK output. - align the input parameters with those of vtkCloud so that we can specify the ASCII precision and the padding width for the output file names as well. - emit TimeValue field, support file series generation - support internal or boundary meshes, combining the result into a vtm file. - can restrict conversion based on zone names, enclosing volumes, bounding box
This commit is contained in:
@ -52,4 +52,9 @@ maxDi 10.0;
|
||||
|
||||
adjustTimeStep yes;
|
||||
|
||||
functions
|
||||
{
|
||||
#include "vtkWrite"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -0,0 +1,62 @@
|
||||
// -*- C++ -*-
|
||||
// Use the vtkWrite function object
|
||||
|
||||
vtkWrite
|
||||
{
|
||||
type vtkWrite;
|
||||
libs ("libutilityFunctionObjects.so");
|
||||
log true;
|
||||
|
||||
writeControl writeTime;
|
||||
writeInterval 1;
|
||||
|
||||
// Fields to output (words or regex)
|
||||
regions (".*");
|
||||
|
||||
internal true;
|
||||
|
||||
boundary true;
|
||||
|
||||
single false;
|
||||
|
||||
interpolate true;
|
||||
|
||||
// Fields to output (words or regex)
|
||||
fields (".*");
|
||||
|
||||
//- Output format (ascii | binary) - Default=binary
|
||||
// format binary;
|
||||
|
||||
//- Use legacy output format - Default=false
|
||||
// legacy false;
|
||||
|
||||
//- Output directory name - Default="postProcessing/<name>"
|
||||
// directory "VTK";
|
||||
|
||||
//- Write cell ids as field - Default=true
|
||||
writeIds false;
|
||||
}
|
||||
|
||||
|
||||
// Solid walls only
|
||||
walls
|
||||
{
|
||||
type vtkWrite;
|
||||
libs ("libutilityFunctionObjects.so");
|
||||
log true;
|
||||
|
||||
writeControl writeTime;
|
||||
writeInterval 1;
|
||||
|
||||
internal false;
|
||||
|
||||
// single true;
|
||||
|
||||
regions ( heater "(?i).*solid" );
|
||||
patches ( "(?i).*solid_to.*" "heater.*(Air|Water)" );
|
||||
|
||||
fields (T);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -15,15 +15,69 @@ vtkWrite
|
||||
//- Use legacy output format - Default=false
|
||||
// legacy false;
|
||||
|
||||
//- Output directory name - Default="VTK"
|
||||
//- Output directory name - Default="postProcessing/<name>"
|
||||
// directory "VTK";
|
||||
|
||||
//- Write cell ids as field - Default=true
|
||||
writeIds false;
|
||||
writeIds false;
|
||||
|
||||
//- Write more frequent than fields
|
||||
writeControl timeStep;
|
||||
writeInterval 25;
|
||||
}
|
||||
|
||||
subset
|
||||
{
|
||||
type vtkWrite;
|
||||
libs ("libutilityFunctionObjects.so");
|
||||
log true;
|
||||
|
||||
// boundary false;
|
||||
|
||||
interpolate true;
|
||||
|
||||
// Fields to output (words or regex)
|
||||
fields (U p);
|
||||
|
||||
//- Write cell ids as field - Default=true
|
||||
writeIds false;
|
||||
|
||||
//- Write more frequent than fields
|
||||
writeControl timeStep;
|
||||
writeInterval 25;
|
||||
|
||||
// Region of interest
|
||||
selection
|
||||
{
|
||||
dome
|
||||
{
|
||||
action add;
|
||||
source sphere;
|
||||
origin (125 100 0);
|
||||
radius 100;
|
||||
}
|
||||
cylinder
|
||||
{
|
||||
action subtract;
|
||||
source cylinder;
|
||||
p1 (125 100 0);
|
||||
p2 (125 100 100);
|
||||
radius 20;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
action add;
|
||||
source box;
|
||||
box (300 -100 -100) (330 250 100);
|
||||
}
|
||||
clipping
|
||||
{
|
||||
action subset;
|
||||
source box;
|
||||
box (-1000 -1000 -1000) (1000 1000 50);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
Reference in New Issue
Block a user