VTU file format and Paraview for visualization

The visulization practices of Elmer has undergone large changes over the years. In the early days of Elmer there were no proper open source tools for visualization and there was a separate visualization tool in the Elmer suite – ElmerPost. Situation is now quite different and we now recommend using external software with Elmer.

Of the different software the most widely used is Paraview, and the recommended format is unstructyured XML VTK format in binary i.e. the VTU format.

The nice thing with VTU format is that it is fully supported in parallel. Also it has many features to control the output.

The solver that writes data in VTU format is an atomic solver in the Elmer style called ResultOutputSolver. Here you can see a small piece os sif file used for postprocessing.

Solver 2
  Equation = Result Output
  Procedure = "ResultOutputSolve" "ResultOutputSolver"
  Save Geometry Ids = True
  Output File Name = case
  Output Format = vtu
  Exec Solver = After Saving

For more options look at the section for ResultOutputSolver in Elmer Models Manual.

Adding this to the sif file has become such a standard procedure that there is currently a hack which does exactly the same thing as the above when in the Simulation section you set the suffix of the file to VTU,

  Post File = case.vtu

When using the Simulation section directly you may pass any keyword to the output solver by using the namespace “vtu: “, e.g.

  vtu: Discontinuous Bodies = Logical True

An alternative for Paraview is another VTK based software, ViSit. It may be a better alternative particularly for large datasets.