Simulation

class dustpy.Simulation(**kwargs)[source]

Bases: Frame

The main simulation class for running dust coagulation simulations.

dustpy.Simulation` is a child of simframe.Frame.

For setting simple initial conditions use Simulation.ini, For making the simulation grids use Simulation.makegrids(), For initialization use Simulation.initialize(), For running simulations use Simulation.run().

Please have a look at the documentation of simframe for further details.

Attributes Summary

ini

Parameter set for setting the initial conditions.

Methods Summary

checkmassconservation()

Function checks for mass conservation and prints the maximum relative mass error.

initialize()

Function initializes the simulation frame.

makegrids()

Function creates radial and mass grid.

run()

This functions runs the simulation.

setdustintegrator([scheme, method])

Function sets the dust integrator.

Attributes Documentation

ini

Parameter set for setting the initial conditions.

Methods Documentation

checkmassconservation()[source]

Function checks for mass conservation and prints the maximum relative mass error.

initialize()[source]

Function initializes the simulation frame.

Function sets all fields that are None with a standard value. If the grids are not set, it will call Simulation.makegrids() first.

makegrids()[source]

Function creates radial and mass grid.

Notes

The grids are set up with the parameters given in Simulation.ini. If you want to have a custom radial grid you have to set the array of grid cell interfaces Simulation.grid.ri, before calling Simulation.makegrids(). You cannot have a customized mass grid, because the coagulation alorithm strictly needs a logarithmic grid. Always set your mass grid parameters with Simulation.ini.

run()[source]

This functions runs the simulation.

setdustintegrator(scheme='explicit', method='cash-karp')[source]

Function sets the dust integrator.

Parameters:
  • scheme (string, optional, default : "explicit") –

    Possible values

    {“explicit”, “implicit”}

  • method (string, optional, default : "cash-karp") –

    Possible values for explicit integration

    {“cash-karp”}

    Possible values for implicit integration

    {“direct”, “gmres”, “bicgstab}