FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

foamToVTK.C File Reference

Legacy VTK file format writer. More...


Detailed Description

Legacy VTK file format writer.

- handles volScalar, volVector, pointScalar, pointVector, surfaceScalar fields.

  • mesh topo changes.
  • both ascii and binary.
  • single time step writing.
  • write subset only.
  • automatic decomposition of cells; polygons on boundary undecomposed since handled by vtk.
Usage
  • foamToVTK [OPTION]
Parameters:
-ascii
Write VTK data in ASCII format instead of binary.
-mesh<name>
Use a different mesh name (instead of -region)
-fields<fields>
Convert selected fields only. For example,

 -fields "( p T U )"

The quoting is required to avoid shell expansions and to pass the information as a single argument.

-surfaceFields
Write surfaceScalarFields (e.g., phi)
-cellSet<name>
-faceSet<name>
-pointSet<name>
. Restrict conversion to the cellSet, faceSet or pointSet.
-nearCellValue
Output cell value on patches instead of patch value itself.
-noInternal
Do not generate file for mesh, only for patches.
-noPointValues
No pointFields.
-noFaceZones
No faceZones.
-noLinks
(in parallel) do not link processor files to master.
-allPatches
Combine all patches into a single file.
-excludePatches<patchNames>
Specify patches to exclude. For example,

 -excludePatches "( inlet_1 inlet_2 )"

The quoting is required to avoid shell expansions and to pass the information as a single argument.

-useTimeName
use the time index in the VTK file name instead of the time index
-case<dir>
Case directory.
-noZero
Ignore time step 0.
-constant
Include the constant directory.
-latestTime
Only apply to the latest time step.
-time<time>
Apply only to specified time.
-parallel
Run in parallel.
-help
Display help message.
-doc
Display Doxygen API documentation page for this application.
-srcDoc
Display Doxygen source documentation page for this application.
Note:
mesh subset is handled by vtkMesh. Slight inconsistency in interpolation: on the internal field it interpolates the whole volfield to the whole-mesh pointField and then selects only those values it needs for the subMesh (using the fvMeshSubset cellMap(), pointMap() functions). For the patches however it uses the fvMeshSubset.interpolate function to directly interpolate the whole-mesh values onto the subset patch.

Definition in file foamToVTK.C.

#include "src/finiteVolume/cfdTools/general/include/fvCFD.H"
#include "src/OpenFOAM/meshes/pointMesh/pointMesh.H"
#include "src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.H"
#include "src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/empty/emptyPolyPatch.H"
#include "src/OpenFOAM/fields/Fields/labelField/labelIOField.H"
#include "src/OpenFOAM/fields/Fields/scalarField/scalarIOField.H"
#include "src/OpenFOAM/fields/Fields/sphericalTensorField/sphericalTensorIOField.H"
#include "src/OpenFOAM/fields/Fields/symmTensorField/symmTensorIOField.H"
#include "src/OpenFOAM/fields/Fields/tensorField/tensorIOField.H"
#include "src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/faceZoneMesh.H"
#include "src/lagrangian/basic/Cloud/Cloud.H"
#include "src/lagrangian/basic/passiveParticle/passiveParticle.H"
#include "applications/utilities/postProcessing/dataConversion/foamToVTK/vtkMesh.H"
#include "applications/utilities/postProcessing/dataConversion/foamToVTK/readFields.H"
#include "applications/utilities/postProcessing/dataConversion/foamToVTK/writeFuns.H"
#include "applications/utilities/postProcessing/dataConversion/foamToVTK/internalWriter.H"
#include "applications/utilities/postProcessing/dataConversion/foamToVTK/patchWriter.H"
#include "applications/utilities/postProcessing/dataConversion/foamToVTK/lagrangianWriter.H"
#include "applications/utilities/postProcessing/dataConversion/foamToVTK/writeFaceSet.H"
#include "applications/utilities/postProcessing/dataConversion/foamToVTK/writePointSet.H"
#include "applications/utilities/postProcessing/dataConversion/foamToVTK/writePatchGeom.H"
#include "applications/utilities/postProcessing/dataConversion/foamToVTK/writeSurfFields.H"
#include "src/OpenFOAM/include/addRegionOption.H"
#include "src/OpenFOAM/include/setRootCase.H"
#include "src/OpenFOAM/include/createTime.H"
#include "src/OpenFOAM/include/createNamedMesh.H"
Include dependency graph for foamToVTK.C:

Go to the source code of this file.