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 useSimulation.makegrids()
, For initialization useSimulation.initialize()
, For running simulations useSimulation.run()
.Please have a look at the documentation of
simframe
for further details.Attributes Summary
Parameter set for setting the initial conditions.
Methods Summary
Function checks for mass conservation and prints the maximum relative mass error.
Function initializes the simulation frame.
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 interfacesSimulation.grid.ri
, before callingSimulation.makegrids()
. You cannot have a customized mass grid, because the coagulation alorithm strictly needs a logarithmic grid. Always set your mass grid parameters withSimulation.ini
.
- 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}