2D tracer formulation¶
Governing equation¶
The two dimensional tracer model solves an advectiondiffusion
equation
(17).
If solved in nonconservative form, the prognostic variable
is the passive tracer concentration,
\(T\). The corresponding field in Thetis is called
'tracer_2d'
.
To activate the 2D tracer model, add tracers using the
ModelOptions2d.add_tracer_2d
method. An example of its usage is provided in the
2D tracer demo.
A conservative tracer model is also available, given by
(1).
In this case, the equation is solved for \(q=HT\), where
\(H\) is the total water depth.
The conservative tracer model is specified by setting the
use_conservative_form
keyword argument of
ModelOptions2d.add_tracer_2d
to True
.
The tracer model may also be run independently
by setting the
ModelOptions2d.tracer_only
option to
True
. The hydrodynamics will be defined by any initial
conditions specified for the horizontal velocity, or any updates
imposed by the user.
Spatial discretization¶
Thetis supports two different tracer finite element discretizations and associated stabilization methods, summarised in the table below.
Element Family 
Name 
Space 
Stabilization 

DG 

P1DG 
LaxFriedrichs 
CG 

P1 
SUPG 
Table 1. Finite element families and stabilization methods.
The element family is set by the
ModelOptions2d.tracer_element_family
option. Polynomial degrees other than one are not currently supported.
LaxFriedrichs stabilization is used by default and may be
controlled using the
ModelOptions2d.use_lax_friedrichs_tracer
option. Note that it is only a valid choice for the 'dg'
element family.
The scaling parameter used by this scheme may be controlled using the
ModelOptions2d.lax_friedrichs_tracer_scaling_factor
option.
If the 'cg'
element family is chosen, then SUPG stabilization is used by
default. It can be controlled using the
ModelOptions2d.use_supg_tracer
option. In that case, it is advisable to set characteristic velocities and
diffusivities for your problem using the
ModelOptions2d.horizontal_velocity_scale
and
ModelOptions2d.horizontal_diffusivity_scale
options.
Temporal discretization¶
Thetis supports different time integration methods, set by the
ModelOptions2d.tracer_timestepper_type
option.
Use the
ModelOptions2d.set_timestepper_type
method to set the same timestepper for all 2D model components.
Time integrator 
Thetis class 
Unconditionally stable 
Description 


No 
Forward Euler method 


Yes 
Backward Euler method 


Yes 
CrankNicolson method 


Yes 
DIRK(2,3,2) method 


Yes 
DIRK(3,4,3) method 


No 
SSPRK(3,3) method 


– 
Solves equations in steady state 
Table 2. Time integration methods for 2D tracer model.