2D model options

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

CommonModelOptions.atmospheric_pressureFiredrakeScalarExpression

Atmospheric pressure at free surface, in pascals

Default:

UFL scalar expression

CommonModelOptions.cfl_2dPositiveFloat

Factor to scale the 2d time step OBSOLETE

Default:

1.0

CommonModelOptions.cfl_3dPositiveFloat

Factor to scale the 2d time step OBSOLETE

Default:

1.0

CommonModelOptions.check_volume_conservation_2dBool

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_frequencyFiredrakeScalarExpression

2D Coriolis parameter

Default:

UFL scalar expression

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_diagnosticsBool

Store diagnostic variables to disk in HDF5 format

Default:

True

CommonModelOptions.fields_to_exportList

Fields to export in VTK format

Default:

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

CommonModelOptions.fields_to_export_hdf5List

Fields to export in HDF5 format

Default:

[]

CommonModelOptions.horizontal_diffusivityFiredrakeCoefficient

Horizontal diffusivity for tracers

Default:

Function

CommonModelOptions.horizontal_velocity_scaleFiredrakeConstantTraitlet

Maximum horizontal velocity magnitude

Used to compute max stable advection time step.

Default:

Constant(0.1)

CommonModelOptions.horizontal_viscosityFiredrakeScalarExpression

Horizontal viscosity

Default:

UFL scalar expression

CommonModelOptions.horizontal_viscosity_scaleFiredrakeConstantTraitlet

Maximum horizontal viscosity

Used to compute max stable diffusion time step.

Default:

Constant(1.0)

CommonModelOptions.lax_friedrichs_tracer_scaling_factorFiredrakeConstantTraitlet

Scaling factor for tracer Lax Friedrichs stability term.

Default:

Constant(1.0)

CommonModelOptions.lax_friedrichs_velocity_scaling_factorFiredrakeConstantTraitlet

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

Default:

Constant(1.0)

CommonModelOptions.linear_drag_coefficientFiredrakeScalarExpression

2D linear drag parameter \(L\)

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

Default:

UFL scalar expression

CommonModelOptions.log_outputBool

Redirect all output to log file in output directory

Default:

True

CommonModelOptions.manning_drag_coefficientFiredrakeScalarExpression

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:

UFL scalar expression

CommonModelOptions.momentum_source_2dFiredrakeVectorExpression

Source term for 2D momentum equation

Default:

UFL vector expression

CommonModelOptions.no_exportsBool

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_directoryUnicode

Directory where model output files are stored

Default:

‘outputs’

CommonModelOptions.polynomial_degreeNonNegativeInteger

Polynomial degree of elements

Default:

1

CommonModelOptions.quadratic_drag_coefficientFiredrakeScalarExpression

Dimensionless 2D quadratic drag parameter \(C_D\)

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

Default:

UFL scalar expression

CommonModelOptions.simulation_end_timePositiveFloat

Simulation duration in seconds

Default:

1000.0

CommonModelOptions.simulation_export_timePositiveFloat

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.timestepPositiveFloat

Time step

Default:

10.0

CommonModelOptions.tracer_source_2dFiredrakeScalarExpression

Source term for 2D tracer equation

Default:

UFL scalar expression

CommonModelOptions.use_grad_depth_viscosity_termBool

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

See shallowwater_eq.HorizontalViscosityTerm for details.

Default:

True

CommonModelOptions.use_grad_div_viscosity_termBool

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_tracerBool

Use Lax Friedrichs stabilisation in tracer advection.

Default:

False

CommonModelOptions.use_lax_friedrichs_velocityBool

use Lax Friedrichs stabilisation in horizontal momentum advection.

Default:

True

CommonModelOptions.use_limiter_for_tracersBool

Apply P1DG limiter for tracer fields

Default:

True

CommonModelOptions.use_nonlinear_equationsBool

Use nonlinear shallow water equations

Default:

True

CommonModelOptions.verboseInt

Verbosity level

Default:

0

CommonModelOptions.volume_source_2dFiredrakeScalarExpression

Source term for 2D continuity equation

Default:

UFL scalar expression

CommonModelOptions.wind_stressFiredrakeVectorExpression

Stress at free surface (2D vector function)

Default:

UFL vector expression

ModelOptions2d.check_tracer_conservationBool

Compute total tracer mass at every export

Prints deviation from the initial mass to stdout.

Default:

False

ModelOptions2d.check_tracer_overshootBool

Compute tracer overshoots at every export

Prints overshoot values that exceed the initial range to stdout.

Default:

False

ModelOptions2d.solve_tracerBool

Solve tracer transport

Default:

False

ModelOptions2d.timestepper_type‘SSPRK33’|’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:

‘SSPRK33’:

ModelOptions2d.timestepper_options.solver_parametersPETScSolverParameters

No description

Default:

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

‘ForwardEuler’:

ModelOptions2d.timestepper_options.solver_parametersPETScSolverParameters

No description

Default:

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

‘BackwardEuler’:

ModelOptions2d.timestepper_options.solver_parametersPETScSolverParameters

No description

Default:

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

ModelOptions2d.timestepper_options.solver_parameters_tracerPETScSolverParameters

No description

Default:

{‘ksp_type’: ‘gmres’, ‘pc_type’: ‘sor’}

‘CrankNicolson’:

ModelOptions2d.timestepper_options.implicitness_thetaBoundedFloat

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_linearizationBool

Use linearized semi-implicit time integration

Default:

False

‘DIRK22’:

ModelOptions2d.timestepper_options.solver_parametersPETScSolverParameters

No description

Default:

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

ModelOptions2d.timestepper_options.solver_parameters_tracerPETScSolverParameters

No description

Default:

{‘ksp_type’: ‘gmres’, ‘pc_type’: ‘sor’}

‘DIRK33’:

ModelOptions2d.timestepper_options.solver_parametersPETScSolverParameters

No description

Default:

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

ModelOptions2d.timestepper_options.solver_parameters_tracerPETScSolverParameters

No description

Default:

{‘ksp_type’: ‘gmres’, ‘pc_type’: ‘sor’}

‘SteadyState’:

ModelOptions2d.timestepper_options.solver_parametersPETScSolverParameters

No description

Default:

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

‘PressureProjectionPicard’:

ModelOptions2d.timestepper_options.implicitness_thetaBoundedFloat

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

Default:

0.5

ModelOptions2d.timestepper_options.solver_parameters_momentumPETScSolverParameters

No description

Default:

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

ModelOptions2d.timestepper_options.solver_parameters_pressurePETScSolverParameters

No description

Default:

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

ModelOptions2d.timestepper_options.use_semi_implicit_linearizationBool

Use linearized semi-implicit time integration

Default:

True

‘SSPIMEX’:

ModelOptions2d.timestepper_options.solver_parametersPETScSolverParameters

No description

Default:

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

ModelOptions2d.timestepper_options.solver_parameters_tracerPETScSolverParameters

No description

Default:

{‘ksp_type’: ‘gmres’, ‘pc_type’: ‘sor’}

ModelOptions2d.tracer_onlyBool

Hold shallow water variables in initial state

Advects tracer in the associated (constant) velocity field.

Default:

False

ModelOptions2d.use_wetting_and_dryingBool

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_alphaFiredrakeConstantTraitlet

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

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

Default:

Constant(0.5)