Skip to content

Commit

Permalink
SWFlow solver fixes. (#1247)
Browse files Browse the repository at this point in the history
* Updated SWFlow solvers to fix bugs + minor clean up.
  • Loading branch information
ejtovar authored Mar 5, 2021
1 parent 11d8749 commit 7f4f32b
Show file tree
Hide file tree
Showing 32 changed files with 1,717 additions and 1,464 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Proteus: Computational Methods and Simulation Toolkit [![Build Status](https://travis-ci.com/erdc/proteus.svg?branch=master)](https://travis-ci.com/erdc/proteus) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/erdc/proteus_tutorial/master?filepath=index.ipynb) [![DOI](https://zenodo.org/badge/2212385.svg)](https://zenodo.org/badge/latestdoi/2212385)
# Proteus: Computational Methods and Simulation Toolkit [![Build Status](https://travis-ci.com/erdc/proteus.svg?branch=main)](https://travis-ci.com/erdc/proteus) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/erdc/proteus_tutorial/master?filepath=index.ipynb) [![DOI](https://zenodo.org/badge/2212385.svg)](https://zenodo.org/badge/latestdoi/2212385)


Proteus (http://proteustoolkit.org) is a Python package for
Expand Down
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

0 comments on commit 7f4f32b

Please sign in to comment.