2D model options

This page lists all available options for the 2D model.

CommonModelOptions.atmospheric_pressure : FiredrakeCoefficient

Atmospheric pressure at free surface, in pascals

Default:

Function

CommonModelOptions.cfl_2d : PositiveFloat

Factor to scale the 2d time step OBSOLETE

Default:

1.0

CommonModelOptions.cfl_3d : PositiveFloat

Factor to scale the 2d time step OBSOLETE

Default:

1.0

CommonModelOptions.check_volume_conservation_2d : Bool

Compute volume of the 2D mode at every export

2D volume is defined as the integral of the water elevation field. Prints deviation from the initial volume to stdout.

Default:

False

CommonModelOptions.coriolis_frequency : FiredrakeCoefficient

2D Coriolis parameter

Default:

Function

CommonModelOptions.element_family : ‘dg-dg’|’rt-dg’|’dg-cg’

Finite element family

2D solver supports ‘dg-dg’, ‘rt-dg’, or ‘dg-cg’ velocity-pressure pairs. 3D solver supports ‘dg-dg’, or ‘rt-dg’ velocity-pressure pairs.

Default:

‘dg-dg’

CommonModelOptions.export_diagnostics : Bool

Store diagnostic variables to disk in HDF5 format

Default:

True

CommonModelOptions.fields_to_export : List

Fields to export in VTK format

Default:

[‘elev_2d’, ‘uv_2d’, ‘uv_3d’, ‘w_3d’]

CommonModelOptions.fields_to_export_hdf5 : List

Fields to export in HDF5 format

Default:

[]

CommonModelOptions.horizontal_velocity_scale : FiredrakeConstant

Maximum horizontal velocity magnitude

Used to compute max stable advection time step.

Default:

Constant(0.1)

CommonModelOptions.horizontal_viscosity : FiredrakeCoefficient

Horizontal viscosity

Default:

Function

CommonModelOptions.horizontal_viscosity_scale : FiredrakeConstant

Maximum horizontal viscosity

Used to compute max stable diffusion time step.

Default:

Constant(1.0)

CommonModelOptions.lax_friedrichs_velocity_scaling_factor : FiredrakeConstant

Scaling factor for Lax Friedrichs stabilisation term in horiozonal momentum advection.

Default:

Constant(1.0)

CommonModelOptions.linear_drag_coefficient : FiredrakeCoefficient

2D linear drag parameter \(L\)

Bottom stress is \(\tau_b/\rho_0 = -L \mathbf{u} H\)

Default:

Function

CommonModelOptions.log_output : Bool

Redirect all output to log file in output directory

Default:

True

CommonModelOptions.manning_drag_coefficient : FiredrakeCoefficient

Manning-Strickler 2D quadratic drag parameter \(\mu\)

Bottom stress is \(\tau_b/\rho_0 = -g \mu^2 |\mathbf{u}|\mathbf{u}/H^{1/3}\)

Default:

Function

CommonModelOptions.momentum_source_2d : FiredrakeCoefficient

Source term for 2D momentum equation

Default:

Function

CommonModelOptions.no_exports : Bool

Do not store any outputs to disk

Disables VTK and HDF5 field outputs. and HDF5 diagnostic outputs. Used in CI test suite.

Default:

False

CommonModelOptions.output_directory : Unicode

Directory where model output files are stored

Default:

‘outputs’

CommonModelOptions.polynomial_degree : NonNegativeInteger

Polynomial degree of elements

Default:

1

CommonModelOptions.quadratic_drag_coefficient : FiredrakeCoefficient

Dimensionless 2D quadratic drag parameter \(C_D\)

Bottom stress is \(\tau_b/\rho_0 = -C_D |\mathbf{u}|\mathbf{u}\)

Default:

Function

CommonModelOptions.simulation_end_time : PositiveFloat

Simulation duration in seconds

Default:

1000.0

CommonModelOptions.simulation_export_time : PositiveFloat

Export interval in seconds

All fields in fields_to_export list will be stored to disk and diagnostics will be computed

Default:

100.0

CommonModelOptions.timestep : PositiveFloat

Time step

Default:

10.0

CommonModelOptions.use_grad_depth_viscosity_term : Bool

Include \(\nabla H\) term in the depth-averaged viscosity

See shallowwater_eq.HorizontalViscosityTerm for details.

Default:

True

CommonModelOptions.use_grad_div_viscosity_term : Bool

Include \(\nabla (\nu_h \nabla \cdot \bar{\textbf{u}})\) term in the depth-averaged viscosity

See shallowwater_eq.HorizontalViscosityTerm for details.

Default:

False

CommonModelOptions.use_lax_friedrichs_velocity : Bool

use Lax Friedrichs stabilisation in horizontal momentum advection.

Default:

True

CommonModelOptions.use_nonlinear_equations : Bool

Use nonlinear shallow water equations

Default:

True

CommonModelOptions.verbose : Int

Verbosity level

Default:

0

CommonModelOptions.volume_source_2d : FiredrakeCoefficient

Source term for 2D continuity equation

Default:

Function

CommonModelOptions.wind_stress : FiredrakeCoefficient

Stress at free surface (2D vector function)

Default:

Function

ModelOptions2d.timestepper_type : ‘SSPRK33’|’SSPRK33Semi’|’ForwardEuler’|’BackwardEuler’|’CrankNicolson’|’DIRK22’|’DIRK33’|’SteadyState’|’PressureProjectionPicard’|’SSPIMEX’

Name of the time integrator

Default:

‘CrankNicolson’

Setting value implies configuration of sub-tree ModelOptions2d.timestepper_options:

‘DIRK22’:

ModelOptions2d.timestepper_options.solver_parameters : PETScSolverParameters

No description

Default:

{‘pc_type’: ‘fieldsplit’, ‘pc_fieldsplit_type’: ‘multiplicative’, ‘ksp_type’: ‘gmres’}

‘SteadyState’:

ModelOptions2d.timestepper_options.solver_parameters : PETScSolverParameters

No description

Default:

{‘pc_type’: ‘lu’, ‘mat_type’: ‘aij’, ‘ksp_type’: ‘preonly’}

‘DIRK33’:

ModelOptions2d.timestepper_options.solver_parameters : PETScSolverParameters

No description

Default:

{‘pc_type’: ‘fieldsplit’, ‘pc_fieldsplit_type’: ‘multiplicative’, ‘ksp_type’: ‘gmres’}

‘SSPRK33Semi’:

ModelOptions2d.timestepper_options.implicitness_theta : BoundedFloat

implicitness parameter theta. Value 0.5 implies Crank-Nicolson scheme, 1.0 implies fully implicit formulation.

Default:

0.5

ModelOptions2d.timestepper_options.use_semi_implicit_linearization : Bool

Use linearized semi-implicit time integration

Default:

False

‘PressureProjectionPicard’:

ModelOptions2d.timestepper_options.implicitness_theta : BoundedFloat

implicitness parameter theta. Value 0.5 implies Crank-Nicolson scheme, 1.0 implies fully implicit formulation.

Default:

0.5

ModelOptions2d.timestepper_options.solver_parameters_momentum : PETScSolverParameters

No description

Default:

{‘pc_type’: ‘bjacobi’, ‘ksp_converged_reason’: True, ‘sub_pc_type’: ‘sor’, ‘sub_ksp_type’: ‘preonly’, ‘ksp_type’: ‘gmres’}

ModelOptions2d.timestepper_options.solver_parameters_pressure : PETScSolverParameters

No description

Default:

{‘fieldsplit_H_2d’: {‘schur_ksp_type’: ‘gmres’, ‘schur_ksp_converged_reason’: True, ‘schur_ksp_max_it’: 100, ‘pc_type’: ‘python’, ‘schur_pc_type’: ‘gamg’, ‘pc_python_type’: ‘thetis.AssembledSchurPC’, ‘ksp_type’: ‘preonly’}, ‘mat_type’: ‘matfree’, ‘pc_fieldsplit_schur_fact_type’: ‘full’, ‘pc_type’: ‘fieldsplit’, ‘pc_fieldsplit_type’: ‘schur’, ‘fieldsplit_U_2d’: {‘assembled_pc_type’: ‘bjacobi’, ‘assembled_sub_pc_type’: ‘ilu’, ‘assembled_ksp_type’: ‘preonly’, ‘pc_type’: ‘python’, ‘pc_python_type’: ‘firedrake.AssembledPC’, ‘ksp_type’: ‘gmres’}, ‘ksp_type’: ‘preonly’}

ModelOptions2d.timestepper_options.use_semi_implicit_linearization : Bool

Use linearized semi-implicit time integration

Default:

True

‘SSPRK33’:

ModelOptions2d.timestepper_options.solver_parameters : PETScSolverParameters

No description

Default:

{‘snes_type’: ‘ksponly’, ‘sub_pc_type’: ‘ilu’, ‘pc_type’: ‘bjacobi’, ‘mat_type’: ‘aij’, ‘sub_ksp_type’: ‘preonly’, ‘ksp_type’: ‘cg’}

‘SSPIMEX’:

ModelOptions2d.timestepper_options.solver_parameters : PETScSolverParameters

No description

Default:

{‘pc_type’: ‘fieldsplit’, ‘pc_fieldsplit_type’: ‘multiplicative’, ‘ksp_type’: ‘gmres’}

‘ForwardEuler’:

ModelOptions2d.timestepper_options.solver_parameters : PETScSolverParameters

No description

Default:

{‘snes_type’: ‘ksponly’, ‘sub_pc_type’: ‘ilu’, ‘pc_type’: ‘bjacobi’, ‘mat_type’: ‘aij’, ‘sub_ksp_type’: ‘preonly’, ‘ksp_type’: ‘cg’}

‘BackwardEuler’:

ModelOptions2d.timestepper_options.solver_parameters : PETScSolverParameters

No description

Default:

{‘pc_type’: ‘fieldsplit’, ‘pc_fieldsplit_type’: ‘multiplicative’, ‘ksp_type’: ‘gmres’}

‘CrankNicolson’:

ModelOptions2d.timestepper_options.implicitness_theta : BoundedFloat

implicitness parameter theta. Value 0.5 implies Crank-Nicolson scheme, 1.0 implies fully implicit formulation.

Default:

0.5

ModelOptions2d.timestepper_options.use_semi_implicit_linearization : Bool

Use linearized semi-implicit time integration

Default:

False

ModelOptions2d.use_wetting_and_drying : Bool

bool: Turn on wetting and drying

Uses the wetting and drying scheme from Karna et al (2011). If True, one should also set wetting_and_drying_alpha to control the bathymetry displacement.

Default:

False

ModelOptions2d.wetting_and_drying_alpha : FiredrakeConstant

Coefficient: Wetting and drying parameter \(\alpha\).

Used in bathymetry displacement function that ensures positive water depths. Unit is meters.

Default:

Constant(0.5)