libMesh / libmesh

libMesh github repository
http://libmesh.github.io
GNU Lesser General Public License v2.1
651 stars 285 forks source link

Add capability to construct dual meshes, relevant to saddle-point problems #3319

Open lindsayad opened 2 years ago

lindsayad commented 2 years ago

A reference for dual mesh construction is Busto's article, titled "Staggered Semi-Implicit Hybrid Finite Volume/Finite Element Schemes for Turbulent and Non-Newtonian Flows". Cross-referenced on https://github.com/libMesh/libmesh/issues/3318#issuecomment-1154489757. This would obviously be very useful for staggered hybrid finite element/finite volume schemes as well as pure staggered finite volume schemes

roystgnr commented 2 years ago

How well does this work on a general unstructured grid? The dual mesh for a cartesian mesh is another nice cartesian mesh, but the dual of triangles is arbitrary polygons and for 3D non-hexes you can get arbitrary polyhedra. We're looking to support the former soon but we won't be doing the latter for the forseeable future.

Actually ... looking at that paper is interesting; their idea of "dual elements" doesn't match mine. They're doing a element dual to each edge, not one for each vertex?

lindsayad commented 2 years ago

@tanoret what do you think of something like in the above reference?

lindsayad commented 2 years ago

Actually ... looking at that paper is interesting; their idea of "dual elements" doesn't match mine. They're doing a element dual to each edge, not one for each vertex?

This is what we would want for CFD ... dual cells/elements centered around primal mesh face centers

roystgnr commented 2 years ago

Their treatment of cartesian vs triangle meshes seems a bit inconsistent - for triangles their dual of each edge is a quad (with the edge as one diagonal and the two triangle centers as the other two vertices), but for cartesian meshes they have two cartesian mesh duals, one for the "x" edges and a different one for the "y" edges? I guess that's better in some way than just applying the general unstructured 2D solution (the same one as for triangles) to the structured case?

lindsayad commented 2 years ago

Yea in general I always like solutions that aren't specially cased, e.g. it would be somewhat unsatisfactory to have different treatments for simplex meshes vs. quad/hex meshes

lindsayad commented 2 years ago

I don't see why you couldn't give the same style of treatment by drawing other triangle sides from the quad edge vertices to quad centroid and identically having the quad edge be the third triangle side (and then form a dual quad from two such triangles)