tkeskita / BVtkNodes

Create and execute VTK pipelines in Blender Node Editor
GNU General Public License v3.0
119 stars 20 forks source link

Foam reader #21

Open rgsouthall opened 4 years ago

rgsouthall commented 4 years ago

Hello. I've opened a case.foam with BVtkNodes but only the internal mesh seems to be available in the drop-downs. The boundary regions, which I can extract in Paraview, are not showing up. Am I missing something obvious. My node set-up is below. Cheers Ryan

image

tkeskita commented 4 years ago

You seem to be missing custom code, pls see Extract Boundary Surfaces in https://bvtknodes.readthedocs.io/en/latest/ug_nodes.html

rgsouthall commented 4 years ago

I had tried a GeometryFilter but it didn't create a correct mesh. Turns out that turning off 'Decompose Polyhedra' does not work on my polyhedral meshes. With it turned on works fine. Would be nice to not have to decompose my meshes though. Cheers Ryan

tkeskita commented 4 years ago

Hi, can you please elaborate how created mesh was incorrect exactly? What kind of cells?

rgsouthall commented 4 years ago

Sorry. Got a bit side-tracked. I have attached a zip of an OpenFOAM case with a polygonal mesh. This is generated within OpenFOAM with the command polyDualMesh from a tetrahedral mesh generated with Netgen. Works fine in Paraview and in works fine in BVTKNodes if I turn on decomposePolyhedra. If I turn off decompose I get only the corners of the domain as in the image below. Hope this helps. Cheers Ryan Openfoam.zip

image

tkeskita commented 4 years ago

Hi,

ok! Thanks for test case. Interesting meshing technique, must check out this polyDualMesh.

Without DecomposePolyhedra I get error image

I wonder if your mesh is fully OK, running checkMesh gives error ***Error in face pyramids: 115 faces are incorrectly oriented. but that's not explaining this.

This might actually have to do with the unconventional polyhedrons of your honeycomb mesh. I'm currently working on an polyhedron converter, I'll get back to this when it should be working and try this again.

tkeskita commented 4 years ago

Oh, FYI: According to info node it seems the data is read in (22412 cells). So even when vtkGeometryFilter results for full mesh are not shown correctly, you should be able to postprocess data (as long as the result gets converted correctly for VTK To Blender node).

rgsouthall commented 4 years ago

OK Great. Not sure where the cells/points error comes from. Paraview can spit that out if the results from an old mesh configuration are present in the case directory but there were no old results in the case I sent and Paraview doesn't moan about it. The case I sent was a coarsened version, to not upload a huge file, but the more refined meshes I have simulated in OpenFOAM worked fine and I get the same mesh display problem with those, so as far as I can tell the meshes are valid. I have the fixed the face orientation issue caused by polydualmesh. The way I fixed it generated some quad boundary faces and these do get visualised when turning off decompose polyhedra, but only those.

tkeskita commented 4 years ago

FYI I added polyhedron faces to VTK To Blender Mesh node, seems to work. Can you please test latest add-on version?

rgsouthall commented 4 years ago

Just tried it. Same problem. image image

tkeskita commented 4 years ago

Please remove vtkGeometryFilter when using VTK To Blender Mesh node. Does that help?

rgsouthall commented 4 years ago

Marvellous. Thanks for the fix. While I'm here I'm the author of the VI-Suite: A Blender node-based addon that now does OpenFOAM simulations. Might be nice to talk at some point about how BVTKNodes and the VI-Suite can place nicely together. At the moment I'm using Paraview but I could imagine that the VI-Suite automatically opens up some core elements of BVTKNodes for OpenFOAM visualisation.

image

tkeskita commented 4 years ago

Hi, thanks for mentioning VI-Suite, that seems nice! Integrating BVTKNodes would be possible but ambitious endeavour, since BVTKNodes is unstable in many places. Maybe it could be worthwhile for some very specific often used case which could be thoroughly tested, but I would not recommend to try making it a generic integration. The BVTKNodes user experience currently has quite some room for improvement. I'd say it's now more of a speciality expert tool for e.g. photorealistic visualizations.

rgsouthall commented 4 years ago

Fair enough.