TWOD_TO_VTK
Write 2D Finite Element Data to VTK File


TWOD_TO_VTK is a MATLAB program which takes a certain set of 2D finite element data and writes it to a VTK "legacy" unstructured grid file for postprocessing by PARAVIEW.

The finite element data is assumed to be given in terms of:

Since the VTK format expects 3D data, this program appends a 0 value to coordinate and vector data, where appropriate. It also changes the triangular element definitions so that the node indices are 0-based.

The "legacy" VTK format is simply an older version of the VTK graphics file format which has been widely used for some time and hence is still popular despite the fact that a more modern VTK format is now also available.

Information about PARAVIEW is available at http://www.paraview.org/ .

Licensing:

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Languages:

TWOD_TO_VTK is available in a MATLAB version.

Related Data and Programs:

NS3D_FEM, a MATLAB program which sets up and solves a finite element formulation of the steady incompressible 3D Navier Stokes equations on a user-defined geometry. The program can output graphics files for TECPLOT, VU or the VTK format used by PARAVIEW.

PARAVIEW, examples which illustrate the use of the paraview graphics program.

THREED_TO_VTK, a MATLAB program which accepts computational data from a 3D finite element fluid flow program and writes it to a VTK "legacy" file for postprocessing by PARAVIEW.

TWOD, a MATLAB library which contains functions useful for 2D finite element calculations.

TWOD_TO_VTU, (archived), a MATLAB program which accepts computational data from a 2D finite element fluid flow program and writes it to a VTK unstructured grid file for postprocessing by PARAVIEW.

VTK, a data directory which contains examples of "legacy" (old style) VTK files, a file format used by the Visual Toolkit, and which can be displayed by the PARAVIEW program;

VTK_IO, a FORTRAN90 library which reads and writes files in the VTK format.

Reference:

  1. Will Schroeder, Ken Martin, Bill Lorensen,
    The Visualization Toolkit, An Object-Oriented Approach to 3D Graphics,
    Prentice Hall, 1998,
    ISBN: 0139546944,
    LC: QA76.64.S36.
  2. Amy Henderson Squillacote,
    The ParaView Guide,
    Kitware Inc, 2007,
    ISBN13: 978-1-930934-21-4.
  3. Will Schroeder, Ken Martin, Lisa Avila, Charles Law,
    The Visualization Toolkit User's Guide,
    Kitware Inc, May 2000,
    ISBN13: 978-1930934030.
  4. http://public.kitware.com/VTK/

Source Code:

Examples and Tests:

CHANNEL is finite element data associated with a 4 by 11 grid of points in a 3x10 rectangular channel, the triangular elements formed from those nodes, and the velocity and pressure of an associated Poiseuille flow solution.

You can go up one level to the MATLAB source codes.


Last modified on 20 December 2010.