|
|
<!-- --- title: Visualization -->
|
|
|
|
|
|
[![home](/icons/home.svg "wiki home")](/home)
|
|
|
[![modules](/icons/layers.svg "modules")](/modules)
|
|
|
[![build](/icons/cpu.svg "build")](/building)
|
|
|
[![repos](/icons/gitlab.svg "repos")][all-repos]
|
|
|
|
|
|
|
|
|
**![>](/icons/eye.svg) Visualization**
|
|
|
|
|
|
The [visualization module](https://develop.openfoam.com/modules/visualization)
|
|
|
is a collection of visualization interfaces for OpenFOAM, primarily
|
|
|
VTK/ParaView based.
|
|
|
It is provided as a _module_ to isolate library dependencies and support
|
|
|
multi-build paradigms (eg, different VTK or ParaView versions,
|
|
|
different rendering types etc).
|
|
|
|
|
|
|
|
|
[[_TOC_]]
|
|
|
|
|
|
## Before starting
|
|
|
|
|
|
Incorporating visualization increases the complexity (potential
|
|
|
difficulty and issues) of the software build. It is considered
|
|
|
an _intermediate_ to _advanced_ topic and should be avoided by first-time
|
|
|
OpenFOAM users.
|
|
|
|
|
|
Things to consider:
|
|
|
- hardware vs. software rendering
|
|
|
- llvm pipelines
|
|
|
- mpi flavours
|
|
|
- what do I _really_ need?
|
|
|
|
|
|
Building **VTK** libraries for use with OpenFOAM is relative
|
|
|
straightforward, as is using pre-compiled VTK libraries.
|
|
|
|
|
|
Building **ParaView** becomes more complex, since it involves many more
|
|
|
software components (the QT dependencies are often the ones that cause
|
|
|
the most difficulty). Even using a pre-compiled set of ParaView
|
|
|
binaries may prove difficult, since they often lack the necessary
|
|
|
development headers for creating additional plugins.
|
|
|
|
|
|
In light of these potential difficulties, it is worthwhile carefully
|
|
|
examining the following section.
|
|
|
|
|
|
|
|
|
### Do I _really_ need the ParaView plugins?
|
|
|
|
|
|
Before blindly launching into compiling ParaView with the idea that
|
|
|
this is simply necessary for a _complete_ software stack, you should
|
|
|
examine your actual requirements.
|
|
|
Note that the term _paraFoam_ is often used loosely to mean the reader
|
|
|
plugins, but it is merely a small wrapper script.
|
|
|
|
|
|
|
|
|
| Native reader | OpenFOAM Plugin | Functionality |
|
|
|
|---------------|-----------------|---------------|
|
|
|
| [+] | [-] | Does not require OpenFOAM installation
|
|
|
| [+] | [-] | No duplicate of the OpenFOAM mesh in memory
|
|
|
| [+] | [-] | Supports decomposed cases (without reconstructPar)
|
|
|
| [+] | [-] | Supports parallel rendering
|
|
|
| [-] | [+] | Handles collated file formats
|
|
|
| [-] | [+] | Additional faceSet, faceZones selection
|
|
|
| [-] | [+] | Additional patch names, patch groups
|
|
|
|
|
|
Workarounds:
|
|
|
- Use `foamToVTK` for faceSets, faceZones as required and load
|
|
|
the generated VTK files in ParaView as usual.
|
|
|
|
|
|
|
|
|
| Native reader | blockMeshDict Plugin | Functionality |
|
|
|
|---------------|---------------|----------------------|
|
|
|
| n/a | [+] | Explore block structures
|
|
|
|
|
|
Alternatives:
|
|
|
- Use `blockMesh -write-vtk` to generate the block topology as a VTK
|
|
|
file that can be explored in ParaView as required.
|
|
|
|
|
|
|
|
|
**Summary**:
|
|
|
Recommend using the native (builtin) ParaView/VTK reader for
|
|
|
most normal cases. For example,
|
|
|
```
|
|
|
paraFoam -vtk
|
|
|
```
|
|
|
If you do this frequently enough, the following alias can be quite
|
|
|
convenient:
|
|
|
```
|
|
|
alias parafoam='touch log.foam; paraview log.foam'
|
|
|
```
|
|
|
|
|
|
|
|
|
----
|
|
|
|
|
|
Copyright (C) 2020 OpenCFD Ltd.
|
|
|
|
|
|
[all-repos]: https://develop.openfoam.com/Development/
|
|
|
[all-modules]: https://develop.openfoam.com/Development/openfoam/-/tree/develop/modules |