Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new feature 'overset grids' #186

Merged
merged 17 commits into from
Mar 10, 2022
Merged

new feature 'overset grids' #186

merged 17 commits into from
Mar 10, 2022

Conversation

nfehn
Copy link
Member

@nfehn nfehn commented Mar 7, 2022

This PR introduces the feature of overset grids by the example of the Poisson module. Two domains overlap and ExaDG's interface coupling functionality is used to couple the two domains via Dirichlet BCs. A very simple outer iteration is currently used to obtain convergence for the coupled problem.

This PR is currently a draft, since several aspects have been encountered which first need to be generalized in ExaDG. Here is a list of main points:

  • InterfaceCoupling/FunctionCached does currently not work for scalar quantities. -> see commit 69a89d8
  • Hence, I set up a vectorial Poisson problem. However, I had to deactivate the error calculation in Poisson::Postprocessor since this seems to work only for scalar problems. <\del>
  • The setup of multigrid (map of dirichlet boundary IDs passed to MultigridPreconditionerBase) does not take into account Dirichlet cached BCs. In case all boundary conditions are of type DirichletCached, multigrid even crashes. It is remarkable that multigrid seems to work if we have both Dirichlet and DirichletCached BCs (as in some FSI examples). This is a bug. -> See PR take DirichletCached BCs into account for multigrid setup #188.
  • InterfaceCoupling needs to be generalized in case that the two domains do not touch each other along a boundary, but intersect each other (-> marked_vertices and setup of InterfaceCoupling needs to be generalized). -> See PR improve robustness of InterfaceCoupling regarding marked_vertices #187 as a first remedy.
  • The design of the related base application class and the driver class needs to be improved to avoid code duplication. -> first part resolved in commit f469412, second part in commit 7cb2daa

Example: Scalar Poisson problem with constant right-hand side, homogeneous DBC's, DirichletCachedBC's at the overlapping boundaries: Domain1 = [0,1]^2; Domain2 = [0.5, 1.5] x [0, 1]. -> overlap from x_1 = 0.5 to 1.0.

Solution after initialization with zero
fig0
and after 1, 2, 3 iterations (visually converged after 3 iterations).
fig1
fig2
fig3

@nfehn nfehn added the new feature New feature is implemented or requested label Mar 7, 2022
@nfehn nfehn marked this pull request as draft March 7, 2022 09:41
@nfehn nfehn removed the request for review from bergbauer March 7, 2022 09:42
@nfehn nfehn force-pushed the overset_grids branch 2 times, most recently from 539183c to 41769fa Compare March 8, 2022 16:27
@peterrum
Copy link
Member

peterrum commented Mar 9, 2022

Nice, some domain-decomposition method! The next step would be to compute the traditional Schwarz setup: union of rectangle and circle. That was one of the first tests of RPE. I'll try to take a look at the PR later today.

@nfehn
Copy link
Member Author

nfehn commented Mar 9, 2022

Nice, some domain-decomposition method! The next step would be to compute the traditional Schwarz setup: union of rectangle and circle. That was one of the first tests of RPE. I'll try to take a look at the PR later today.

Yes, I already thought of this setup, did not realize it so far since some functionality is missing. Can you point me to that test case? Is it part of deal.II? I need functionality like tria_1->contains(face) (in the bangerth-favorite naming ;) and interpreted purely geometrically; face belonging to another triangulation tria_2) to detect automatically on which boundary faces to set DirichletCached boundary conditions.

@peterrum
Copy link
Member

peterrum commented Mar 9, 2022

This is the test: https://github.com/dealii/dealii/blob/master/tests/remote_point_evaluation/vector_tools_evaluate_at_points_02.cc

Not very nice. What I do is to only check if the quadrature points are inside of the domain or not.

@nfehn
Copy link
Member Author

nfehn commented Mar 9, 2022

This is the test: https://github.com/dealii/dealii/blob/master/tests/remote_point_evaluation/vector_tools_evaluate_at_points_02.cc

Not very nice. What I do is to only check if the quadrature points are inside of the domain or not.

I do not find the place where you check whether the q-points are inside the other triangulation. Does this happen inside RemotePointEvaluation? For me the code looks like you are collecting all points on the boundary, do the evaluation, and set constraints for all the points afterwards?

@nfehn nfehn marked this pull request as ready for review March 9, 2022 12:31
@peterrum
Copy link
Member

peterrum commented Mar 9, 2022

Does this happen inside RemotePointEvaluation? For me the code looks like you are collecting all points on the boundary, do the evaluation, and set constraints for all the points afterwards?

Yes. If the point is not found in the other domain, the value has its default value (0.0).

Copy link
Member

@peterrum peterrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@nfehn
Copy link
Member Author

nfehn commented Mar 10, 2022

Yes. If the point is not found in the other domain, the value has its default value (0.0).

Does this mean that you impose a constraint with a value of 0.0 for faces that are not found? This would be restrictive since one might want to impose other inhomogeneous boundary conditions for those faces that are outside the other tria.

@nfehn
Copy link
Member Author

nfehn commented Mar 10, 2022

i would merge once the checks completed

@nfehn nfehn merged commit 49cb20d into exadg:master Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature is implemented or requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants