Hi everyone,
I am investigating if it is possible to integrate a scalar field stored in a rectangular grid over a volume defined with a CAD file. This cad file can be easily imported in ParaView as .stl but I wonder if I could use it to clip a region of the rectangular grid and later integrate over the resulting region. I am not sure if this could be done with some programmable filter/vtk programming or if it could be done at all. Any suggestion would be greatly appreciated!
I have a data set which describe a scalar field of a variable(let’s say temperature). This data set is organized as a rectilinear grid (see here: https://vtk.org/wp-content/uploads/2015/04/file-formats.pdf ). I am trying to understand if the volume, over which integrate this variable, could be defined by importing a CAD file. Hope this clarifes a bit
Thanks Mordecai, It is indeed a workable solution. Unfortunately I have to repeat this process for a large number of solids in an ordered manner. In fact I need to take the result of these integrations and pipeline it into another script and I am not sure I can mesh all of them in a scripted manner from the original CADs. I will investigate, thanks for now
Not needed, paraview can read in several mesh types. In my workflow that I discovered/developed this approach, I used gmshtofoam and opened the .foam in paraview.
Gmshtofoam is a command line till that is party of openfoam tools. You should be able to use it as a standalone tool if you need it without getting into the madness that is openFOAM. Are you working in Linux?
@momentumv@MarcDP : There is a GMSH reader plugin in ParaView since 5.6.
It is not available in the release (yet), but if you build ParaView from sources, you can enable it.
@momentumv almost I’m using WSL …I think It would be interesting to do it in a single script, first with the gmsh api which should be able to export the mesh in vtk according to the manual and then finish the job with the paraview python module