Treating Cyclic Boundary Conditions #20
JanGaertner
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
Hello, Jan. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the current implementation, the stencil collection algorithm cannot handle cyclic boundary conditions. This means that for cells at at cyclic boundary condition, cells on the other side of the boundary will not be considered.
Stencil Collection with Cyclic Boundaries
To collect the cells for the stencil the
cellCells()
function is used recursively to get all neighboring cells inWENOBase::createStencilID()
. This function however, does not return cells beyond any boundary condition even if they are at a cyclic or processor boundary.A possibility to collect all cells even at a cyclic boundary condition could be the usage of a getNeighbourCells() function:
This function can get all the neighbor cells, however within the sort stencil function the distance to the reference cell is calculated with the absolute position of the cells, which does not know that some cells are collected over the cyclic boundary. This could in theory be also solved by tracking an additional list in which the positions of the cells in the stencil list are saved. For cells that are collected over a cyclic boundary the
transform()
function ofcyclicPolyPatch
could be used to get the correct, virtual, cell position.However, for the geometryWENO functions, especially the
transformIntegral
function the cells on the mesh are required. Here, all points that are calculated with thepolyMeshTetDecomposition::cellTetIndices
would needed to be transformed as well. Yet, at this point in the code it is not known from which cyclic boundary the transformation should be taken, unless this information is tracked as well.In conclusion. adding the function to calculate the stencil list and matrices over cyclic boundaries would require a lot of communication and tracking overhead, which introduce a lot of complexity, and possible errors.
Therefore, I have decided to not include this function.
If anyone sees, a simpler and effective way to integrate the stencil collection for coupled boundaries please post an idea here or generate a pull request if you have a proposed solution.
Beta Was this translation helpful? Give feedback.
All reactions