Instructions to build Paraview FoamReader plugin
Hello,
I've compiled OpenFOAM v2006 on Ubuntu 20.04. However, I have already Paraview 5.7 installed on my machine, so I didn't compile Paraview, because that will take more than 10 hours on my machine.
I can't figure out how to compile the Paraview Foam Reader Plugin alone to be able to use paraFoam
, I can't find instructions on your website.
Thank you
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Activity
- Developer
Dear User,
You can point to your central installation by setting appropriate config at etc/config.sh/paraview.
Then ensure you compile paraview-plugin from visualization modules e.g. https://develop.openfoam.com/modules/visualization/-/tree/v2006/src/paraview-plugins
- Maintainer
Hi @significantcell2 (some user),
There are a number of bits about building, some people complain it about there generally being too much information, but also the general README has notes.
For paraview specifically, the first question to ask: "do I really need plugins?". For most regular cases, the builtin (native) readers are our preference. Either use
paraFoam -vtk
, or make an alias. Eg,alias parafoam='touch log.foam; paraview log.foam'
The only things covered by the plugins are less common:
- face/cell sets : can use foamToVTK if these are needed
- blockMesh visualization : generally get quite far with
blockMesh -write-vtk
Of course, for Catalyst/Paraview insitu, you will need to build with the visualization module.
On Ubuntu 20.04, you can try with installing
paraview-dev
and then specify "system" in the etc/config.sh/paraview. The reason that it is not well documented, is that we are still experiencing a number of issues.- https://salsa.debian.org/science-team/paraview/-/merge_requests/1
- https://discourse.paraview.org/t/proper-paraview-development-build-on-debian-ubuntu/4334
With openSUSE, there are/were other issues that will likely be resolved in leap15.2 but still don't work in leap15.1.
If you are able to help with pushing the paraview-dev updates for Ubuntu (eg, via launchpad), this would really help everyone wishing to build against a system paraview.
Assuming that is all working, the creating of the plugins should be straightforward:
cd your-openfoam-directory cd modules/visualization ./Allwmake -j -prefix=some-location
Note that part of the reason we have split of the visualisation was to make it easier to handle such changes. You can also download the module separately (from gitlab) or use a checkout.
Assuming you are using our debian repos, just make certain that you have installed
openfoam2006-dev
first. When recompiling the visualization module, it can be located in any other directory (doesn't have to be located within the OpenFOAM source tree)./mark
- Author
@mark Thank you very much for the details. I had some problems with the installation. I have just a question: I cannot find the package
openfoam2006-dev
, I googled it but with no results. How can I install it? - Maintainer
In this case google is not your friend, but the wiki is: precompiled debian/ubuntu
After you use the add-debian-repo.sh installer script, you should be able to apt get openfoam2006-dev (or at least the last time I checked).
- Author
Thank you for the links. Now, when I try to build the visualization modules, it fails because cmake cannot find VTK However, I am sure it is installed and I can find it in the following path:
/usr/local/lib/cmake/vtk-8.1/VTKConfig.cmake
- Maintainer
Take a look at the merge request that I put on salsa - this will show you what they (debian) have missed when packaging. This is related to the changed directory CMake structure for paraview 5.7 - similar issue hit the centos and opensuse builds.
You will bite out your teeth with it at the moment.
- Maintainer
assuming @significantcell2 is happy.
- Kutalmış Berçin closed
closed