Skip to content

Conversation

@bennibolm
Copy link
Contributor

@bennibolm bennibolm commented Sep 1, 2025

This PR adds the new mortar type MortarsIDP, which blends high-order and low-order surface fluxes at nonconforming interfaces (mortars).

  • As high-order flux, the existing mortar strategy with L2 projection is used.
  • The low-order flux is computed by interpolating solution values from side to side using nonnegative local weights. Those weights indicate the "influence" between two nodes on different sides of the face. We use piecewise constant basis functions on the LGL subgrid for the computation. The weights are then the integrated product of two such basis functions.

As for the subcell IDP/FCT limiting, we use the low-order variant/fluxes during the call of rhs! and "correct" later in the a-posteriori correction stage.
In this PR, we add a limiting strategy that can ensure positivity of conservative variables. In a later PR, positivity limiting for nonlinear variables will be added.

Convergence test: We use initial_condition_convergence_test with source_terms_convergence_test. To actually have mortars, we use the following manually refined chess-like mesh
RefinedMesh

We get the following EOCs with pure high-order fluxes in the VolInt and the mortars. (We get almost identical results with enabled positivity limiting (VolInt and mortar) due to the smoothness of the solution.)

l2
rho                 rho_v1              rho_v2              rho_e               
error     EOC       error     EOC       error     EOC       error     EOC       
8.49e-02  -         1.03e-01  -         1.03e-01  -         2.55e-01  -         
5.66e-03  3.91      6.73e-03  3.93      6.73e-03  3.93      1.91e-02  3.74      
4.34e-04  3.71      3.59e-04  4.23      3.59e-04  4.23      7.65e-04  4.64      
4.47e-05  3.28      3.71e-05  3.27      3.71e-05  3.27      8.17e-05  3.23      
2.57e-06  4.12      2.16e-06  4.10      2.16e-06  4.10      5.29e-06  3.95      
1.66e-07  3.96      1.38e-07  3.97      1.38e-07  3.97      3.46e-07  3.93      
8.82e-09  4.23      7.58e-09  4.19      7.58e-09  4.19      1.89e-08  4.19      
----------------------------------------------------------------------------------------------------
linf
rho                 rho_v1              rho_v2              rho_e               
error     EOC       error     EOC       error     EOC       error     EOC       
5.91e-01  -         7.60e-01  -         7.60e-01  -         1.61e+00  -         
1.84e-02  5.01      2.44e-02  4.96      2.44e-02  4.96      1.08e-01  3.90      
2.62e-03  2.81      2.14e-03  3.52      2.14e-03  3.52      4.42e-03  4.61      
2.28e-04  3.53      2.00e-04  3.42      2.00e-04  3.42      4.95e-04  3.16      
2.42e-05  3.23      1.98e-05  3.34      1.98e-05  3.34      6.26e-05  2.98      
1.58e-06  3.94      1.26e-06  3.97      1.26e-06  3.97      4.15e-06  3.91      
9.68e-08  4.03      7.74e-08  4.03      7.74e-08  4.03      2.59e-07  4.00 

When using pure low-order fluxes in the mortars (no correction in correction stage), we get the following results:

l2
rho                 rho_v1              rho_v2              rho_e               
error     EOC       error     EOC       error     EOC       error     EOC       
1.68e-03  -         1.37e-03  -         1.37e-03  -         2.95e-03  -         
6.83e-04  1.30      5.68e-04  1.27      5.68e-04  1.27      1.23e-03  1.26      
2.69e-04  1.35      2.25e-04  1.34      2.25e-04  1.34      4.90e-04  1.33      
1.03e-04  1.38      8.70e-05  1.37      8.70e-05  1.37      1.89e-04  1.37      
----------------------------------------------------------------------------------------------------
linf
rho                 rho_v1              rho_v2              rho_e               
error     EOC       error     EOC       error     EOC       error     EOC       
2.67e-02  -         1.84e-02  -         1.84e-02  -         3.74e-02  -         
1.28e-02  1.06      8.83e-03  1.06      8.83e-03  1.06      1.88e-02  0.99      
6.35e-03  1.01      4.34e-03  1.02      4.34e-03  1.02      9.31e-03  1.01      
3.13e-03  1.02      2.13e-03  1.03      2.13e-03  1.03      4.64e-03  1.00      

(This convergence test needs a higher resolution to show the expected results.)

The result of a simulation of the Kelvin-Helmholtz instability with polynomial degree 7, VolInt positivity limiting for rho and pressure and enabled AMR looks like following:

video.mp4

@bennibolm
Copy link
Contributor Author

bennibolm commented Oct 17, 2025

The added KHI example doesn't need much limiting at the mortars. So, it might be better to use another test.
EDIT: It's hard to find an example where mortar positivity limiting for a conservative variable actually uses the low-order mortar flux.
EDIT: Found one: I added a density wave example with no limiting in the VolInt, but positivity limiting for density in the mortars.
EDIT: Added AMR to existing KHI elixir instead of added a whole new elixir.

@bennibolm
Copy link
Contributor Author

Hey there,
I'm about to start implementing this idp mortar type in 3d. I think before that, it would be useful to figure out some issues of the 2d implementation in this PR. @DanielDoehring Could you please take a look at it?

@bennibolm bennibolm removed the request for review from DanielDoehring October 27, 2025 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants