Supplying element-neighbor pairs for (periodic) interface calculations #22948
-
I am planning some implementations regarding periodic boundary conditions. Though there are several existing methods for them in MOOSE, I feel that adding the weak enforcement using surface integrals has some benefits not yet realized. To start out, I studied the behavior of input files having My question is, is the only information I would be required to read in through a text file, the element-neighbor pairing (element ID and faces)? Or is there some other orientation information needed to update the Libmesh quadrature point projections? @arovinelli Alternatively, I saw a discussion here, #18580 (reply in thread), about Libmesh periodic features. Are those periodic listings node-based (like multi-point conditions) or face-based? From this discussion #20232, it sounds like they are face-based. I can't easily tell from the source code https://mooseframework.inl.gov/docs/doxygen/libmesh/periodic__boundaries_8C_source.html#l00038 what kind of periodic treatment Libmesh is doing (nodal, penalty, mortar, Nitsche); so suggested reading would help here as well. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 32 replies
-
Question at the bottom about So I was able to verify that reassigning the element-neighbor pair through a Mesh-Generator class was able to restore the connection needed for the cohesive simulation. On the second topic for periodic BC, I spent an hour looking through the code for how Is anyone familiar with the source code of |
Beta Was this translation helpful? Give feedback.
-
Do you not want to use mortar? |
Beta Was this translation helpful? Give feedback.
-
Good question! So, I had forgotten my notes from the summer when talking with @reverendbedford that the Mortar objects don't allow stateful materials. This is an issue for applying PBC using the Nitsche/DG method for Tensor Mechanics using the Mortar approach. So I was developing for the heat conduction/diffusion case using the mortar objects up to now (which you're familiar with that), and then we tried porting to Tensor Mechanics and hit the stateful error message. I can add more details later. What the two paths are for getting to our formulation goal is:
It seemed to me that, option 2 would require less implementation (as I have existing codes that generates all the needed element-neighbor pairs; just need a |
Beta Was this translation helpful? Give feedback.
-
I'm not sure how inverse_map() works, but if it has access to either the coordinates of 1. nodes of the face or 2. the quadrature points of the face or else 3. the centroid of the face, then the easy way to compute the offset is just to average them and subtract them. That can be done at EVERY interface, since for adjacent ones the offset will be (0,0,0). That way, no flags have to get passed in, at the expense of some vector additions/divisions for each element pair. |
Beta Was this translation helpful? Give feedback.
Question at the bottom about
inverse_map
.So I was able to verify that reassigning the element-neighbor pair through a Mesh-Generator class was able to restore the connection needed for the cohesive simulation.
Elem * current_elem = mesh->elem_ptr(elem_id);
Elem * neighbor_elem = mesh->elem_ptr(neighbor_id);
current_elem->set_neighbor(elem_side, neighbor_elem);
neighbor_elem->set_neighbor(neighbor_side, current_elem);
Thus, maybe on day in the future, we could add a feature to
BreakMeshByBlockGenerator
to export a CSV list of this data while running, and having another mesh class that reads it back in.On the second topic for periodic BC, I spent an hour looking through the code for how
n…