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’|’bdm-dg’|’dg-cg’

Finite element family

2D solver supports ‘dg-dg’, ‘rt-dg’, ‘bdm-dg’, or ‘dg-cg’ velocity-pressure pairs. 3D solver supports ‘dg-dg’, ‘rt-dg’, or ‘bdm-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_diffusivity_scaleFiredrakeConstantTraitlet

Maximum horizontal diffusivity

Used to compute the mesh Peclet number in the 2D tracer SUPG stabilization scheme.

Default:

Constant(1.0)

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

No description

Default:

<thetis.options.NonhydrostaticModelOptions object at 0x7ff63dac9310>

CommonModelOptions.nikuradse_bed_roughnessFiredrakeScalarExpression

Nikuradse bed roughness length used to construct the 2D quadratic drag parameter \(C_D\).

In sediment transport this term is usually three times the average sediment diameter size.

Default:

UFL scalar 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.norm_smootherFiredrakeConstantTraitlet
Coefficient used to avoid non-differentiable functions in the continuous formulation of the velocity norm in

the quadratic bottom drag term in the momentum equation. This replaces the velocity norm in the quadratic bottom drag term with \(\|u\| \approx \sqrt{\|u\|^2 + \alpha^2}\)

Default:

Constant(0.0)

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_dateDatetimeTraitlet

Simulation end date

Default:

None

CommonModelOptions.simulation_end_timePositiveFloat

Simulation duration in seconds

Default:

None

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

Model initialization date. Corresponds to zero in simulation time.

Default:

None

CommonModelOptions.sipg_factorFiredrakeScalarExpression

Penalty parameter scaling factor for horizontal viscosity terms.

Default:

Constant(1.0)

CommonModelOptions.sipg_factor_tracerFiredrakeScalarExpression

Penalty parameter scaling factor for horizontal diffusivity terms.

Default:

Constant(1.0)

CommonModelOptions.timestepPositiveFloat

Time step

Default:

10.0

CommonModelOptions.use_grad_depth_viscosity_termBool

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

Default:

True

CommonModelOptions.use_grad_div_viscosity_termBool

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

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

No description

Default:

<thetis.options.SedimentModelOptions object at 0x7ff658ba9c70>

ModelOptions2d.swe_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.swe_timestepper_options:

‘SSPRK33’:

ModelOptions2d.swe_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.swe_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.swe_timestepper_options.solver_parametersPETScSolverParameters

No description

Default:

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

‘CrankNicolson’:

ModelOptions2d.swe_timestepper_options.implicitness_thetaBoundedFloat

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

Default:

0.5

‘DIRK22’:

ModelOptions2d.swe_timestepper_options.solver_parametersPETScSolverParameters

No description

Default:

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

‘DIRK33’:

ModelOptions2d.swe_timestepper_options.solver_parametersPETScSolverParameters

No description

Default:

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

‘SteadyState’:

ModelOptions2d.swe_timestepper_options.solver_parametersPETScSolverParameters

No description

Default:

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

‘PressureProjectionPicard’:

ModelOptions2d.swe_timestepper_options.implicitness_thetaBoundedFloat

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

Default:

0.5

ModelOptions2d.swe_timestepper_options.solver_parameters_momentumPETScSolverParameters

No description

Default:

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

ModelOptions2d.swe_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_pc_type’: ‘gamg’}}

ModelOptions2d.swe_timestepper_options.use_semi_implicit_linearizationBool

Use linearized semi-implicit time integration

Default:

True

‘SSPIMEX’:

ModelOptions2d.swe_timestepper_options.solver_parametersPETScSolverParameters

No description

Default:

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

ModelOptions2d.tracer_advective_velocity_factorFiredrakeScalarExpression

Custom factor multiplied to the velocity variable in tracer advection equation.

Used to account for mismatch between depth-averaged product of velocity with tracer and product of depth-averaged velocity with depth-averaged tracer

Default:

Constant(1.0)

ModelOptions2d.tracer_element_family‘dg’|’cg’

Finite element family for tracer transport

2D solver supports ‘dg’ or ‘cg’.

Default:

‘dg’

ModelOptions2d.tracer_onlyBool

Hold shallow water variables in initial state

Advects tracer in the associated (constant) velocity field.

Default:

False

ModelOptions2d.tracer_picard_iterationsPositiveInteger

Number of Picard iterations taken for tracer equations.

Default:

1

ModelOptions2d.tracer_timestepper_type‘SSPRK33’|’ForwardEuler’|’BackwardEuler’|’CrankNicolson’|’DIRK22’|’DIRK33’|’SteadyState’

Name of the tracer time integrator

Default:

‘CrankNicolson’

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

‘SSPRK33’:

ModelOptions2d.tracer_timestepper_options.solver_parametersPETScSolverParameters

No description

Default:

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

‘ForwardEuler’:

ModelOptions2d.tracer_timestepper_options.solver_parametersPETScSolverParameters

No description

Default:

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

‘BackwardEuler’:

ModelOptions2d.tracer_timestepper_options.solver_parametersPETScSolverParameters

No description

Default:

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

‘CrankNicolson’:

ModelOptions2d.tracer_timestepper_options.implicitness_thetaBoundedFloat

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

Default:

0.5

‘DIRK22’:

ModelOptions2d.tracer_timestepper_options.solver_parametersPETScSolverParameters

No description

Default:

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

‘DIRK33’:

ModelOptions2d.tracer_timestepper_options.solver_parametersPETScSolverParameters

No description

Default:

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

‘SteadyState’:

ModelOptions2d.tracer_timestepper_options.solver_parametersPETScSolverParameters

No description

Default:

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

ModelOptions2d.use_automatic_wetting_and_drying_alphaBool

Toggle automatic computation of the alpha parameter used in wetting and drying schemes.

By default, this parameter is set to 0.5.

For problems whose bathymetry varies wildly in coastal regions, it is advisable to use the automatic wetting and drying parameter, rather than the default.

Default:

False

ModelOptions2d.use_supg_tracerBool

Use SUPG stabilisation in tracer advection

Default:

False

ModelOptions2d.use_tracer_conservative_formBool

Solve 2D tracer transport in the conservative form

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_alphaFiredrakeScalarExpression

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

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

Default:

Constant(0.5)

ModelOptions2d.wetting_and_drying_alpha_maxFiredrakeScalarExpression

Maximum value to be taken by wetting and drying parameter \(\alpha\).

Note this is only relevant if use_automatic_wetting_and_drying_alpha is set to True.

Default:

Constant(2.0)

ModelOptions2d.wetting_and_drying_alpha_minFiredrakeScalarExpression

Minimum value to be taken by wetting and drying parameter \(\alpha\).

Note this is only relevant if use_automatic_wetting_and_drying_alpha is set to True.

Default:

UFL scalar expression