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

SWFlow solver fixes. #1247

Merged
merged 12 commits into from
Mar 5, 2021
2 changes: 1 addition & 1 deletion proteus/SWFlow/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Proteus -- SWFlow API

The SWFlow API contains solvers for the the 2D nonlinear Shallow Water Equations, and the 2D dispersive Serre--Saint-Venant equations (also known as Green-Naghdi equations, nonlinear Boussinesq, etc.). Both models are
The SWFlow API contains solvers for the the 2D nonlinear Shallow Water Equations, and the 2D dispersive Serre-Green-Naghdi equations (also known as Green-Naghdi equations, nonlinear Boussinesq, etc.). Both models are
numerically solved using continuous, linear finite elements as seen in
[Guermond, *et al* 2018](https://doi.org/10.1137/17M1156162), [Guermond *et al* 2019](https://doi.org/10.1016/j.jcp.2019.108917) and [Guermond *et al* 2020].

Expand Down
10 changes: 5 additions & 5 deletions proteus/SWFlow/SWFlowProblem.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __init__(self,
""" Constructor for structured meshes """
# ***** SET OF ASSERTS ***** #
assert sw_model in [
0, 1], "sw_model={0,1} for shallow water equations or dispersive shallow water equations respectively"
0, 1], "sw_model={0,1} for shallow water equations or dispersive Serre-Green-Nagdhi respectively"
assert cfl <= 1, "Choose cfl <= 1"
assert isinstance(
outputStepping, OutputStepping), "Provide an object from the OutputStepping class"
Expand Down Expand Up @@ -87,8 +87,8 @@ def __init__(self,

def assert_initialConditions(self, sw_model, initialConditions):
assert 'water_height' in initialConditions, 'Provide water_height in initialConditions'
assert 'x_mom' in initialConditions, 'Provide y_mom in initialConditions'
assert 'y_mom' in initialConditions, 'Provide x_mom in initialConditions'
assert 'x_mom' in initialConditions, 'Provide x_mom in initialConditions'
assert 'y_mom' in initialConditions, 'Provide y_mom in initialConditions'
if sw_model == 1: # dispersive SWEs
assert 'h_times_eta' in initialConditions, 'Provide auxiliary function h_eta in initialConditions'
assert 'h_times_w' in initialConditions, 'Provide auxiliary function h_w in initialConditions'
Expand Down Expand Up @@ -170,8 +170,8 @@ def getFESpace(self):
default_swe_parameters = {'LUMPED_MASS_MATRIX': 0,
'cfl': 0.33,
'SSPOrder': 3,
'cE': 1}
'cE': 1.0}
default_GN_swe_parameters = {'LUMPED_MASS_MATRIX': 0,
'cfl': 0.33,
'SSPOrder': 3,
'cE': 1}
'cE': 1.0}
2 changes: 1 addition & 1 deletion proteus/SWFlow/models/GN_sw_n.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
# ******************************** #
# ********** TOLERANCES ********** #
# ******************************** #
nl_atol_res = 1.0e-5
nl_atol_res = 1.0e-7
nl_rtol_res = 0.0
l_atol_res = 1.0e-7
l_rtol_res = 0.0
Expand Down
1,491 changes: 775 additions & 716 deletions proteus/mprans/GN_SW2DCV.h

Large diffs are not rendered by default.

250 changes: 152 additions & 98 deletions proteus/mprans/GN_SW2DCV.py

Large diffs are not rendered by default.

Loading