Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • openfoam openfoam
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 381
    • Issues 381
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 6
    • Merge requests 6
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • openfoamopenfoam
  • Issues
  • #2393
Closed
Open
Created Mar 06, 2022 by Thorsten Zirwes@g3

vtkWrite creates artifacts in parallel

Summary

I find the ability of writing a single VTK file during the simulation in parallel very convenient. However, VTK files written in parallel by the function object vtkWrite contain artifacts at process boundaries. This makes further post-processing of the VTK files difficult.

Steps to reproduce

In v2112, copy, run and decompose the cavity tutorial case:

cp -r $FOAM_TUTORIALS/incompressible/icoFoam/cavity .
cd cavity/cavity
blockMesh
icoFoam
decomposePar -latestTime

Create a new file in system/ called writeVTK with the following content:

    type            vtkWrite;
    libs            (utilityFunctionObjects);
    writeControl    writeTime;
    writeInterval   1;
    format          binary;
    legacy          false;
    decompose       false;
    fields          (U p);

Create VTK file in parallel:

mpirun -np 9 postProcess -func writeVTK -parallel

Load postProcessing/VTK/cavity.vtm.series in paraview

Apply the Cell Data to Point Data filter and look at the interpolated point data velocity field. The process boundaries of the nine sub domains are clearly visible. This is a problem when e.g. computing derivatives as a post-processing step.

Example case

The following figure compares the results from foamToVTK (serial and parallel) and the writeVTK function object (serial and parallel). Only for the parallel writeVTK case (bottom right in the figure), the process boundaries in the velocity field become visible.

vtkResults Figure: Velocity magnitude (interpolated point data) at t=0.5 s of the standard cavity tutorial case.

Environment information

  • OpenFOAM version : v2112
  • Operating system : ubuntu, RedHat
  • Compiler : gcc
Assignee
Assign to
Time tracking