foamToVTK.C File Reference

General OpenFOAM to VTK file writer. More...

Go to the source code of this file.

Detailed Description

General OpenFOAM to VTK file writer.

Original source file foamToVTK.C

Other bits

  • Handles volFields, pointFields, surfaceScalarField, surfaceVectorField fields.
  • Mesh topo changes.
  • Output legacy or xml VTK format in ascii or binary.
  • Single time step writing.
  • Write subset only.
  • Optional decomposition of cells.
Usage
foamToVTK [OPTION]

Options:

  • -ascii
    Write VTK data in ASCII format instead of binary.
  • -legacy
    Write VTK data in legacy format instead of XML format
  • -fields <fields>
    Specify single or multiple fields to write (all by default) For example,
          -fields T
          -fields '(p T U \"alpha.*\")'
    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>
  • -cellZone <name>
    Restrict conversion to either the cellSet or the cellZone.
  • -faceSet <name>
  • -pointSet <name>
    Restrict conversion to the faceSet or pointSet.
  • -faceZones zone or zone list
    Specify single faceZone or or multiple faceZones (name or regex) to write
  • -nearCellValue
    Output cell value on patches instead of patch value itself
  • -no-boundary
    Suppress output for all boundary patches
  • -no-internal
    Suppress output for internal (volume) mesh
  • -no-lagrangian
    Suppress writing Lagrangian positions and fields.
  • -no-point-data
    Suppress conversion of pointFields. No interpolated PointData.
  • -with-ids
    Additional mesh id fields (cellID, procID, patchID)
  • -with-point-ids
    Additional pointID field for internal mesh
  • -poly-decomp
    Decompose polyhedral cells into tets/pyramids
  • -one-boundary
    Combine all patches into a single boundary file
  • -patches NAME | LIST
    Specify single patch or multiple patches (name or regex) to write For example,
          -patches top
          -patches '( front \".*back\" )'
  • -exclude-patches NAME | LIST
    Exclude single or multiple patches (name or regex) from writing. For example,
          -exclude-patches '( inlet_1 inlet_2 "proc.*")'
    Note
    The mesh subset is handled by fvMeshSubsetProxy. 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.