General questions about unstructured BC options.
Closed this issue · 2 comments
Hi All,
From a prior discussion, it appears I would possibly have to add in some features to facilitate translational and rotational periodic BCs on unstructured, imported grids.
I was going though the code and it seems in lmr/bc/ that the boundary_interface/flux_effect.d routines should be modified for exact BC specification. However, I guess for my purposes, I would be more interested in the ghost cells and mapping them between two named BC/surface groups; there were a few options I saw in lmr/bc/ghost_cell_effect/ but I would like to ask: what is the distinction between flow_state_copy.d and full_face_copy.d routines? For the latter, it seems it is currently supported for structured grid and this is likely called by ExchangeBC_FullFace:new{otherBlock, otherFace, orientation, reorient_vector_quantities, Rmatrix}
command.
For unstructured grids, I saw there was some option already available in the docs which may have been what I was looking for:
ExchangeBC_MappedCell:new{transform_position, c0, n, alpha, delta, list_mapped_cells, reorient_vector_quantities, Rmatrix}
However, when I had tried to use this prior I was not able to make it work. I tried out where this was defined in the source code, but was not quite able to find it if you may be able to help point out where this may be found as I had tried using it in a pair with another BC tag when defining my bcDict object. Could you explain how one would use this command/option properly?
Else, I will try to define it with the user routines in terms of the unstructured grid class variables to try and copy the flow state/variables from one BC tag to another BC tag to enforce periodicity manually.
Thanks for your help.
Hi plaad,
flow state copy just takes a single, fixed, flow state and applies it to the boundary. full_face_copy is the is the boundary condition that maps one structured block to another, either to create a internal boundary for a multiblock simulation, or to create a periodic boundary between two sides of the domain.
mapped_cell_copy is the unstructured equivalent of full_face_copy. The prep stage creates one or the other at prep time depending on what kind of blocks you need.
I would suggest first studying the full_face_copy routine to understand how it works. There is a routine in there that rotates the vector quantities, which is needed for the periodic use case. You will need to implement this rotation into the unstructured case, if I understand what you want correctly.
Nick,
Thanks for clearing it up. I will look into this, and if I am able to, will make a working example for you all to consider in the future if successful in adding these features for unstructured grids.
I will close this and add any updates in future comments. Thanks again.