Postprocessing
Moderator: bernd
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
Postprocessing
Hello,
I'm really impressed by the work you guys currently do on the FEM workbench, such fast progress is awesome! So I thought a bit about possibilities to help out on this.
The current postprocessing (displacement and stress) works with a custom coin3d implementation, but honestly creating all postprocessing like this directly in coin is a tremendous amount of work. The de facto standard toolkit for this in the open source world is vtk (this is what powers paraview). It offers tremendous amounts of data processing power and visualisation capabilities. So why not try to use it for freecad, the philosophy here is reusing of existing stuff. So I came up with a way to use vtk for data processing while doing the visualisation in coin 3d: Currently it is a proof of concept, but maybe you are interested? I do not have the time to work on the postprocessing infrastructure myself, but I can provide the vtk render integration. I think I can do a pretty efficient vtk-coin mapping for most visualization types.
The pros:
1. Tremendous possibilities with little effort for postprocessing
2. Unified postprocessing: all tools work with 1D, 2D and 3D data
2. The vtk filter approach can be utilized in freecad the same way as in paraview and hence offers a universal postprocessing tool (think thermal, electromagnetics, fluid...)
3. The filter approach would work very well with our document object structure (compare paraview)
4. State of the art technology used instead of self implemented hard to maintain code
5. Importer and exporter for numerous formats
The cons:
1. Not all vtk visualisation modes can be easily mapped to coin3d, but the most important ones (PolyData) works very well
2. There is overhead n the vtk - coin mapping. But IMHO the speed gain we get from the professional vtk data processing capabilities will outnumber the little transfer overhead
So let me know what you think and if this is useful for you, than we can decide if it is worth to work longer on the integration of vtk.
Stefan
I'm really impressed by the work you guys currently do on the FEM workbench, such fast progress is awesome! So I thought a bit about possibilities to help out on this.
The current postprocessing (displacement and stress) works with a custom coin3d implementation, but honestly creating all postprocessing like this directly in coin is a tremendous amount of work. The de facto standard toolkit for this in the open source world is vtk (this is what powers paraview). It offers tremendous amounts of data processing power and visualisation capabilities. So why not try to use it for freecad, the philosophy here is reusing of existing stuff. So I came up with a way to use vtk for data processing while doing the visualisation in coin 3d: Currently it is a proof of concept, but maybe you are interested? I do not have the time to work on the postprocessing infrastructure myself, but I can provide the vtk render integration. I think I can do a pretty efficient vtk-coin mapping for most visualization types.
The pros:
1. Tremendous possibilities with little effort for postprocessing
2. Unified postprocessing: all tools work with 1D, 2D and 3D data
2. The vtk filter approach can be utilized in freecad the same way as in paraview and hence offers a universal postprocessing tool (think thermal, electromagnetics, fluid...)
3. The filter approach would work very well with our document object structure (compare paraview)
4. State of the art technology used instead of self implemented hard to maintain code
5. Importer and exporter for numerous formats
The cons:
1. Not all vtk visualisation modes can be easily mapped to coin3d, but the most important ones (PolyData) works very well
2. There is overhead n the vtk - coin mapping. But IMHO the speed gain we get from the professional vtk data processing capabilities will outnumber the little transfer overhead
So let me know what you think and if this is useful for you, than we can decide if it is worth to work longer on the integration of vtk.
Stefan
Re: Postprocessing
This is quite impressive and it seems it could be of great help to the workbench. I'm not actively working on FreeCAD so my opinion might not be useful, but thinking on the KISS philosophy it would be a great jump forward in postprocessing work.
Need help? Feel free to ask, but please read the guidelines first
Re: Postprocessing
I don't know much about FEM and vtk. But when you say it's the de-facto standard in FEM then it probably makes sense to use it therefore.So let me know what you think and if this is useful for you, than we can decide if it is worth to work longer on the integration of vtk.
Re: Postprocessing
VTK is in the Debian (hence Ubuntu) repositories. That's mostly the only thing I care about: not to have to create new debian packages for the PPA!
It also seems to be included in the Fedora and Open Suse package databases. This is good.
But trying to install the libvtk6 package on Ubuntu 14.04 adds 147MB of files (decompressed) to the system! I'm OK with that, but this needs to be considered as optional install, for those who do not need FEM.
Might not that also make the Windows installer bigger?
It also seems to be included in the Fedora and Open Suse package databases. This is good.
But trying to install the libvtk6 package on Ubuntu 14.04 adds 147MB of files (decompressed) to the system! I'm OK with that, but this needs to be considered as optional install, for those who do not need FEM.
Might not that also make the Windows installer bigger?
VTK is developed by Kitware, which also develops CMake and ParaView. http://en.wikipedia.org/wiki/VTKwmayer wrote:I don't know much about FEM and vtk.
Re: Postprocessing
Then we maybe should pick up the idea to split the freecad package into smaller ones. So, we can separate modules into their own package which needs heavy-weighted libraries.issue #857But trying to install the libvtk6 package on Ubuntu 14.04 adds 147MB of files (decompressed) to the system! I'm OK with that, but this needs to be considered as optional install, for those who do not need FEM.
Re: Postprocessing
Good idea, but maybe that will be needed for Windows and Mac as well? As plugins.
With a freecad-fem package on Debian/Ubuntu, then we could make calculix-ccx a dependency.
With a freecad-fem package on Debian/Ubuntu, then we could make calculix-ccx a dependency.
Re: Postprocessing
wmayer wrote:I don't know much about FEM and vtk. But when you say it's the de-facto standard in FEM then it probably makes sense to use it therefore.So let me know what you think and if this is useful for you, than we can decide if it is worth to work longer on the integration of vtk.
VTK library and ParaView software are universal technology / solutions, not specific only to CAE, but this visualization engine was made for every app which has something common with data manipulation.
I don't know many FEM apps which use VTK for postprocessing (I remember only SALOME MECA), but it is heavily used in other visualization environments (I think mostly medical imaging with conjuction with ITK). In CFD it is used in OpenFoam (ParaFoam is special version of ParaView).
You can use Calculix results in FC+VTK easily with this:
http://sourceforge.net/projects/exodusii/ - Exodus II - file format made mainly for FEM data
Here:
http://homepages.wmich.edu/~pjm8969/res ... as-dl.html
is example how to use it with Calculix.
( another interesting thing on the last website I mentioned are CUDA-enabled solvers which allow to make calculations on GPU(s) ).
Re: Postprocessing
Good idea checking that, I did not know it is that much! This is definitly something to consider.But trying to install the libvtk6 package on Ubuntu 14.04 adds 147MB of files (decompressed) to the system!
That is because AFAIK most of them write their own postprcessing like gmsh. This is of course an option for freecad too, IMHO however way more work. I do not know of many annother open soruce c++ library next to vtk which can be used for fem postprocessing, opendx comes to mind but looks rather old (only know the homepage). But having Salome and Paraview use it does already account for a large amount of the open source post processing world. (and most solvers do export vtk format)I don't know many FEM apps which use VTK for postprocessing
It is true that we would only need a subset of vtk abilities and using it only for processing and not for rendering reduces the reused amount further. But I still have the feeling that using its data structures and processing / filter abilities would highly benefit the rapid postprocessing development.
But again, that is only a offer to the people actually programming the postprocessing stuff in FreeCAD, I won't do it. If they want to go a different route it would be fine.
Re: Postprocessing
Stefan, thanks for pointing to vtk and paraview. I had heard about them not more. Have been reading about them on the weekend. Seams for sure a way we need to check if it's worth to go! And we for sure need more and better postprossesing!!
Mhh I still have a few things in mind for preprossesing (mainly support for more than one material (short term) and beam and shell element FEM (long term)). As soon as these things are gone work with FEM I will be really interested in better postprocessing for FEMWB!!!
@TT-RS: Thanks for sharing the links
Mhh I still have a few things in mind for preprossesing (mainly support for more than one material (short term) and beam and shell element FEM (long term)). As soon as these things are gone work with FEM I will be really interested in better postprocessing for FEMWB!!!
@TT-RS: Thanks for sharing the links
Re: Postprocessing
InVesalius is uses python/VTK
http://www.cti.gov.br/invesalius/
The source code is here: https://github.com/invesalius/invesalius3
http://www.cti.gov.br/invesalius/
The source code is here: https://github.com/invesalius/invesalius3