pyvista / pyvista-support

[moved] Please head over to the Discussions tab of the PyVista repository
https://github.com/pyvista/pyvista/discussions
59 stars 4 forks source link

matching multiblock boundaries to internal points #393

Open bigfooted opened 3 years ago

bigfooted commented 3 years ago

Hi! I have a multiblock vtu file of a 2D mesh with data. So multiblock is basically a collection of vtu files. I have a 2D vtu for the 'internal' points (including boundary points) and 1D vtu's for the 'boundary' points (top, bottom, left, right). The boundary vtu files have their own independent point list and connectivity information. Is there a way to match the boundary points and connectivities to the ones in the internal data mesh? In that way, I can construct a closed loop around my mesh using the boundary line definitions from the multiblock file for some pygmsh remeshing. There is probably a simple way to do this, but I couldn't find it.

banesullivan commented 3 years ago

Could you share one of the file pairs?

bigfooted commented 3 years ago

I created a simple square geometry and put it here: https://github.com/bigfooted/su2cases/tree/master/validation/square

So my goal is to have a simple local mesh refinement routine using a CFD solution and mesh coming from SU2. We refine based on some local gradients, and then save a new mesh and a new solution file. The simplest way I came up with is to only keep the points and throw away the connectivity and then add some points in the refinement region and remesh.

I would like to do a remeshing with pygmsh, using the original point locations + user-defined new point locations. I therefore need the internal points and the boundary points separated, and the boundary points need to be in order to form a closed loop around the internal points. I want to use the boundary vtu data because I also want to be able to remesh based on boundary type later. In the end, I also want to interpolate the solution fields of the old mesh onto the new mesh.