#!/usr/bin/env python # coding: utf-8 # # The Standard Model # # In this chapter we'll go through all fields in the standard model, explain their meaning and the default functions that calculates them. # In[1]: from dustpy import Simulation # In[2]: sim = Simulation() # In[3]: sim.initialize() # By default the frame object of `DustPy` consists of four groups for **dust**, **gas**, **grid**, and **stellar** parameters, a field for the **time**, which is the integration variable, an **integrator** object, and a **writer** object. # In[4]: sim # ## Dust # In[5]: sim.dust # ### `Simulation.dust.backreaction` # In[6]: sim.dust.backreaction # The backreaction describes the hydrodynamic influence the dust has on the gas. Numerically it consists of two fields `A` and `B` of shape `(Simulation.grid.Nr,)` that describe the pull respectively the push the dust excerts on the gas. # # The details of this mechanism are described in [Gárate et al. (2019)](https://doi.org/10.3847/1538-4357/aaf4fc). # # Backreaction modifies the radial gas velocity as follows # # $v_\mathrm{g} = Av_\mathrm{visc} + 2B\eta v_\mathrm{K}$. # # In the standard model we have `A=1` and `B=0` everywhere, i.e., backreactions is not active. # In[7]: sim.dust.backreaction.A # In[8]: sim.dust.backreaction.B # Depending on the type of backreaction that you want to model, you have to provide functions for `A` and `B`. Have a look at Appendix A of [Gárate et al. (2019)](https://doi.org/10.3847/1538-4357/aaf4fc) for examples. # ### `Simulation.dust.boundary` # In[9]: sim.dust.boundary # By default there are no dust boundary conditions set for the inner and outer grid cells of the dust. # In[10]: sim.dust.boundary.inner # In[11]: sim.dust.boundary.outer # The boundary is indirectly defined by the dust fluxes through the inner and outer grid interfaces, which are by default calculated by assuming constant dust velocities at the boundaries. # # The boundary conditions can be changed via `setcondition()`. # In[12]: help(sim.dust.boundary.outer.setcondition) # ### `Simulation.dust.coagulation` # # The fields in this group define the behavior of dust growth and are discussed in a separate chapter. # ### `Simulation.dust.delta` # In[13]: sim.dust.delta # The $\delta$ parameters control the mixing of dust particles along vertical and radial directions and turbulent mixing. You can see them similar to the turbulent $\alpha$ parameter. And by default they will have the same value as $\alpha$ as given by `Simulation.ini.gas.alpha`. # #### `Simulation.dust.delta.rad` # In[14]: sim.dust.delta.rad # $\delta_\mathrm{rad}$ will be used to calculate the radial, turbulent RMS velocity of the dust. # #### `Simulation.dust.delta.turb` # In[15]: sim.dust.delta.turb # $\delta_\mathrm{turb}$ will be used to calculate the turbulent collision velocities of the dust particles. # #### `Simulation.dust.delta.vert` # In[16]: sim.dust.delta.vert # $\delta_\mathrm{vert}$ will be used to calculate the vertical dust scale heights. # ### `Simulation.dust.Fi` # In[17]: sim.dust.Fi # This is a group of fluxes through the radial grid interfaces for every particle mass of shape `(Simulation.grid.Nr+1,, Simulation.grid.Nm)`. # #### `Simulation.dust.Fi.adv` # # This is the advective flux calculated by $F_\mathrm{adv} = v_\mathrm{d}\Sigma_\mathrm{d}$. # #### `Simulation.dust.Fi.diff` # # This is the diffusive flux calculated by $F_\mathrm{diff} = -D\Sigma_\mathrm{g}\nabla\frac{\Sigma_\mathrm{d}}{\Sigma_\mathrm{gas}}$ for every particle species separately. The diffusive fluxes at the grid boundaries are set to zero to avoid instabilities. # In[18]: sim.dust.Fi.diff # #### `Simulation.dust.Fi.tot` # # This is the total flux through the radial grid interfaces $F_\mathrm{tot} = F_\mathrm{adv} + F_\mathrm{diff}$. # ### `Simulation.dust.p` # In[19]: sim.dust.p # These are the fragmentation and sticking probability of certain particle collisions. # Their shape is `(Simulation.grid.Nr, Simulation.grid.Nm, Simulation.grid.Nm)`. # # The fragmentation probability of particle `i=80`, with particle `j=3` at radial grid cell `ir=30` is given by # In[20]: ir = 30 i = 80 j = 3 sim.dust.p.frag[ir, j, i] # #### `Simulation.dust.p.frag` # # The fragmentation probability has a smooth transition between no fragmentation and fragmentation at the fragmentation velocity. # # $p_\mathrm{f} = # \begin{cases} # 1, & \text{if } v_\mathrm{rel}>v_\mathrm{frag}\\ # 0, & \text{if } v_\mathrm{rel}