Configuration FileΒΆ

The config file acts as the sole input for TTiP and has many customisable options.

These options can be seen below. After an example config which describes the options, some information is given on how to input complex functions which may be required for your problem.

To create a local copy of this to edit, the gen_conf option can be used:

ttip --gen_conf

Each section is defined properly in the example config:

[PHYSICS]
# The physics section is used to enable/disable physical limits.

# limit_conductivity (bool): Enable the lower limit on conductivity?
# limit_flux (bool): Enable flux limiting?
limit_conductivity: on
limit_flux: on

[SOLVER]
# The solver section defines which solver to use and where to store the
# results.

# file_path (string): The path to store the result in.
# method (string): The method to use for time dependant problems.
#     Avalilable options are: ForwardEuler, BackwardEuler, CrankNicolson, and Theta.
# theta (float): **Theta method only** The theta parameter for a theta model solve.
file_path: ttip_results/result.pvd
method: CrankNicolson

[MESH]
# The mesh is defined by a type and parameters.
# Mesh types include all UtilityMeshes in firedrake as well as the option to
# read from a file.
#
# To create a mesh from file, stored at <filename>, use:
# type: Mesh
# params: <filename>
#
# For information on Utility meshes, see the firedrake docs:
# https://firedrakeproject.org/firedrake.html#module-firedrake.utility_meshes

# type (string): Which Mesh builder to use.
# params (comma seperated list): The params for the given mesh builder.
# element (string): The type of element to use in the mesh. CG should be fine for most cases.
# order (int): The order of the element to use in the mesh.
#              This is the complexity of each element, in most cases 1 will suffice.
#              Increasing this can slow down runtimes.
type: Box
params: 20, 20, 20, 4e-5, 4e-5, 4e-5

element: CG
order: 1


[PARAMETERS]
# Any parameters are defined by name.
# For example the below defines the density parameter.
# A parameter will only be used if one of the mixins requests it.
# Parameters follow the same pattern as other functions which can be read about
# below.
#
# Defining the ionisation parameter will use the constant iononisation formulation,
# whereas if it is not defined, TTiP will use the non-constant ionisation formula.
#
# No defaults are provided. Options are given below:
# atomic_number
# coulomb_ln
# electron_density
# ion_density
# ionisation

[SOURCES]
# Any sources that are defined here will be summed to produce a final source
# term.
# Sources follow the same pattern as other functions which can be read about
# below.
#
# The default is no source term.
# default_source: 0

[BOUNDARIES]
# Boundary conditions can be defined for each boundary surface in the mesh.
# Problems can have no boundary conditions by leaving this section empty,
# otherwise each surface must have 1 boundary condition, to define a condition
# on all surfaces use 'all'.

# <name>.boundary_type (string): The type of boundary condition
#                                (dirichlet, neuman, robin)
# <name>.surface (comma separated list or 'all'): The surface the condition
#                                                 applies for.
# If using dirichlet, you should also define:
#     - g (the value on the boundary). This should be either a scalar value,
#       or a function defined as described at the bottom of this document.
#       e.g. bound.g.type: Constant ...
# If using neuman (not available yet!), you should also define:
#     - g (the derivative on the boundary). This should be a scalar or
#       function.
# If using robin (not available yet!), you should also define:
#     - alpha
#     - g
#fixed.boundary_type: dirichlet
#fixed.g: 100
#fixed.surface: 1, 2, 3, 4, 5, 6

[TIME]
# Time is used to define any time dependency in the problem.
# If this section is left blank, the problem is assumed to be steady state.
# Only 2 (any 2) of the settings in this section are needed, and the third can
# be calculated.

# steps (int): The number of steps to take.
# dt (float): The length of each time step.
# max_t (float): The maximum time to step until.
#steps: 10
#dt: 1e-12
#max_t: 1e-13

[INITIALVALUE]
# Initial values follow the same pattern as sources.
#
# Defaults to 0 across the mesh.
# default_initial_value: 0


# Functions:
# To define a function in TTiP, we use the following format
# <name>.type: <type>
# <name>.<param1>: <value1>
# ...
#
# For details on available functions and their parameters, please see the main
# documentation for TTiP.