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

Add reflective boundary conditions for BBMBBMEquations1D #104

Merged
merged 8 commits into from
May 11, 2024

Conversation

JoshuaLampert
Copy link
Owner

As a start for supporting reflecting bc, I implemented them for the BBMBBMEquations1D as proposed in H. Ranocha, D. Mitsotakis, D. Ketcheson, A Broad Class of Conservative Numerical Methods for Dispersive Wave Equations (2021).
Convergence study looks fine, I think. We get something like $p/2 + 1$ for $\eta$ and $p$ for $v$, which is expected due to the reduced order at the boundary, right @ranocha?

p = 2:
julia> convergence_test("examples/bbm_bbm_1d/bbm_bbm_1d_basic_reflecting.jl", 4, N = 16, accuracy_order = 2)
[...]
####################################################################################################
l2
η                        v                        
N    error     EOC       N    error     EOC       
16   1.18e-01  -         16   1.01e-01  -         
32   2.68e-02  2.14      32   2.26e-02  2.15      
64   6.43e-03  2.06      64   5.43e-03  2.06      
128  1.58e-03  2.03      128  1.33e-03  2.03      

mean           2.08      mean           2.08      
----------------------------------------------------------------------------------------------------
linf
η                        v                        
N    error     EOC       N    error     EOC       
16   2.37e-01  -         16   2.15e-01  -         
32   5.15e-02  2.20      32   4.87e-02  2.14      
64   1.23e-02  2.07      64   1.18e-02  2.05      
128  3.00e-03  2.03      128  2.89e-03  2.03      

mean           2.10      mean           2.07      
----------------------------------------------------------------------------------------------------
p = 4:
julia> convergence_test("examples/bbm_bbm_1d/bbm_bbm_1d_basic_reflecting.jl", 4, N = 16, accuracy_order = 4)
[...]
####################################################################################################
l2
η                        v                        
N    error     EOC       N    error     EOC       
16   2.15e-02  -         16   3.16e-03  -         
32   4.26e-03  2.34      32   2.07e-04  3.93      
64   6.49e-04  2.71      64   1.16e-05  4.15      
128  8.78e-05  2.88      128  6.74e-07  4.11      

mean           2.65      mean           4.07      
----------------------------------------------------------------------------------------------------
linf
η                        v                        
N    error     EOC       N    error     EOC       
16   5.38e-02  -         16   7.70e-03  -         
32   9.30e-03  2.53      32   4.83e-04  4.00      
64   1.30e-03  2.84      64   2.62e-05  4.20      
128  1.69e-04  2.94      128  1.47e-06  4.15      

mean           2.77      mean           4.12      
----------------------------------------------------------------------------------------------------
p = 6:
julia> convergence_test("examples/bbm_bbm_1d/bbm_bbm_1d_basic_reflecting.jl", 4, N = 16, accuracy_order = 6)
[...]
####################################################################################################
l2
η                        v                        
N    error     EOC       N    error     EOC       
16   1.76e-01  -         16   2.87e-03  -         
32   1.35e-02  3.71      32   3.60e-05  6.32      
64   7.96e-04  4.08      64   6.38e-07  5.82      
128  4.67e-05  4.09      128  2.73e-08  4.55      

mean           3.96      mean           5.56      
----------------------------------------------------------------------------------------------------
linf
η                        v                        
N    error     EOC       N    error     EOC       
16   3.63e-01  -         16   7.56e-03  -         
32   3.17e-02  3.52      32   1.13e-04  6.06      
64   2.00e-03  3.98      64   1.69e-06  6.07      
128  1.22e-04  4.04      128  5.02e-08  5.07      

mean           3.85      mean           5.73      
----------------------------------------------------------------------------------------------------

@JoshuaLampert JoshuaLampert requested a review from ranocha May 10, 2024 14:11
@JoshuaLampert JoshuaLampert added the enhancement New feature or request label May 10, 2024
Copy link

codecov bot commented May 10, 2024

Codecov Report

Attention: Patch coverage is 85.24590% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 96.17%. Comparing base (c9f4530) to head (650c787).

Files Patch % Lines
src/equations/bbm_bbm_1d.jl 88.88% 6 Missing ⚠️
src/equations/bbm_bbm_variable_bathymetry_1d.jl 0.00% 2 Missing ⚠️
src/equations/svaerd_kalisch_1d.jl 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #104      +/-   ##
==========================================
- Coverage   96.18%   96.17%   -0.01%     
==========================================
  Files          17       17              
  Lines        1074     1125      +51     
==========================================
+ Hits         1033     1082      +49     
- Misses         41       43       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@ranocha ranocha left a comment

Choose a reason for hiding this comment

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

Thanks a lot! This looks quite good to me. And yes, the EOC is reasonable 👍

@JoshuaLampert JoshuaLampert merged commit 7f0168e into main May 11, 2024
12 of 14 checks passed
@JoshuaLampert JoshuaLampert deleted the reflective-bc branch May 11, 2024 09:28
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