Tracer particle model

The tracer particle model was written in order to illustrate the usage of TracerParticleSolver. The module can trace particles passively in a fixed velocity fieldk.`).

Tip

The source code is located in $DISCHARGE_HOME/Physics/TracerParticle.

The model consists of the following implementation files:

  • CD_TracerParticleStepper.H, which implements TimeStepper as a subclass TracerParticleStepper.

Note

The current implementation does not incorporate solver-based adaptive mesh refinement, so refinement is restricted to refinement and coarsening through the Driver interface.

Basic problem

Currently, TracerParticleStepper simply instantiates a TracerParticleSolver the particles in a fixed velocity field. There is currently no handling of particles that fall off the domain.

Initial conditions

The user can set the velocity field, which is either a velocity field that is diagonal to the Cartesian mesh, or a rotational flow. Likewise, the user can set the number of particles, which are sampled uniformly across the domain.

Integration algorithm

TracerParticleStepper implements the following algorithms for the particle advection: The explicit Euler method, Heun’s method, and the classical fourth order Runge-Kutta method.

Solver configuration

The TracerParticleStepper class comes with user-configurable input options that can be adjusted at runtime. These configuration options are given below.

# ====================================================================================================
# TracerParticleStepper class options
# ====================================================================================================
TracerParticleStepper.initial_particles     = 10000    ## Number of uniformly distributed initial particles
TracerParticleStepper.integration           = euler    ## 'euler', 'rk2', or 'rk4'
TracerParticleStepper.verbosity             = -1       ## Verbosity level
TracerParticleStepper.cfl                   = 1.0      ## "CFL" number.
TracerParticleStepper.velocity_field        = 0        ## Velocity field to use.
                                                       # 0 => Diagonal translation
                                                       # 1 => Rotational flow

Setting up a new problem

To set up a new problem, using the Python setup tools in $DISCHARGE_HOME/Physics/TracerParticle is the simplest way. A full description is available in the README.md contained in the folder:

# Physics/TracerParticle
This physics module solves for an tracer particle solver.
This module contains files for setting up the initial conditions and advected species, basic integrators, and a cell tagger for refining grid cells.

The source files consist of the following:

* **CD_TracerParticleStepper.H**  Implementation of TimeStepper, for advancing a tracer particle solver. 

## Setting up a new application
To set up a new problem, use the Python script. For example:

```shell
python setup.py -base_dir=/home/foo/MyApplications -app_name=MyTracerParticle -geometry=Vessel
```

To install within chombo-discharge:

```shell
python setup.py -base_dir=$DISCHARGE_HOME/MyApplications -app_name=MyTracerParticle -geometry=Vessel
```

The application will then be installed to $DISCHARGE_HOME/MyApplications/TracerParticle.
The user will need to modify the geometry and set the initial conditions through the inputs file. 

## Modifying the application
The application is simply set up to track particles in various flow fields. 
Users are free to modify this application, e.g. adding new initial conditions and flow fields. 

To see available setup options, use

python setup.py --help