Boundary conditions for individual surfaces in EB #3728
Replies: 5 comments 10 replies
-
So, essentially a single watertight surface with triangle subsets associated with their own BC? With EB, a cut-cell will have a single EB face but the cell may intersect or contain multiple triangles. Would that be a problem for you? |
Beta Was this translation helpful? Give feedback.
-
I guess another question (or approach) would be; can I find the facet index (or indicies) used for a cut-cell? Then I can have a separate mapping for BCs... |
Beta Was this translation helpful? Give feedback.
-
Sorry for being unresponsive - AFAIK the STL stuff is buried inside the EB generation code. One option is to copy/paste it and load the STL as triangles, and then work your way through it from there. Another option is to apply a utility code (https://github.com/rmrsk/EBGeometry) that's a bit more clever about the data structure representation of surface meshes. The bad news is that I did not attach meta-data to the facets at the time that I wrote this code. In hindsight I now feel stupid about that, but the extension was fairly straightforward so that it now runs also with meta-data. The figure below shows an example where the triangle ID is mapped to cut-cells, but the interface is sufficiently abstract that you can attach most C++ types to the facets (e.g., a boundary condition type, or even a std::map<std::string, std::function<...> if you want to go completely nuts) If this is something that sounds interesting, I would need a bit more information about how you wish to parse data into EBGeometry. Breaking up watertight surfaces into subsurfaces is not something I thought people would do, but STLs are triangle soups anyways so that might be one way of doing it. The code has also not been hardened with this feature in mind, so having a beta-tester would be very useful. There are other options too, like using CGAL/libigl/embree or any computational graphics library, but starting from those and getting to where you want will involve much more work on your end. |
Beta Was this translation helpful? Give feedback.
-
There is also the matter of what kind of solver you're applying. Coarsening of complex geometries is not something that AMReX always handles, and some algorithms (geometric multigrid or sub-cycling) might choke on them. |
Beta Was this translation helpful? Give feedback.
-
Ok, I did not know that STLs supported "components". Can you share the file or at least the format for one of the triangles? |
Beta Was this translation helpful? Give feedback.
-
Is there an example that shows the index space layout for embedded boundaries in AMReX? Is it possible to load multiple STL files that individually do not represent a manifold but together form a water tight surface? Ideally I would like to tag the surfaces and apply boundary conditions such specific to the surface features.
Beta Was this translation helpful? Give feedback.
All reactions