BVtkNodes icon indicating copy to clipboard operation
BVtkNodes copied to clipboard

Foam reader

Open rgsouthall opened this issue 4 years ago • 13 comments

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

rgsouthall avatar Sep 08 '20 16:09 rgsouthall

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

tkeskita avatar Sep 08 '20 17:09 tkeskita

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

rgsouthall avatar Sep 09 '20 13:09 rgsouthall

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

tkeskita avatar Sep 09 '20 16:09 tkeskita

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

rgsouthall avatar Sep 21 '20 09:09 rgsouthall

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 avatar Sep 22 '20 15:09 tkeskita

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).

tkeskita avatar Sep 22 '20 16:09 tkeskita

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.

rgsouthall avatar Sep 22 '20 20:09 rgsouthall

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

tkeskita avatar Sep 26 '20 13:09 tkeskita

Just tried it. Same problem. image image

rgsouthall avatar Sep 26 '20 14:09 rgsouthall

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

tkeskita avatar Sep 27 '20 06:09 tkeskita

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

rgsouthall avatar Sep 27 '20 08:09 rgsouthall

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.

tkeskita avatar Sep 27 '20 09:09 tkeskita

Fair enough.

rgsouthall avatar Sep 27 '20 10:09 rgsouthall