thePPOLsCode module

class thePPOLsCode.Disk(name='Unnamed', alpha=0.001, vfrag=1000, vfin=100, vfout=1000, rcrit=30, snowmode='none', MSol=1.0, dmf=0.2, z0=0.0134, movetemp=False, tmode='simp')

Bases: object

Creates protoplanetary disk object and pebble parameters.

Calculates and records disk properties, as well as pebble flux and St values based on input parameters. Disk object attributes are recorded at each space on AU grid, and time. Here it is possible to see how pebbles coagulate and drift without any protoplanets. Calculations related to placement and growth of seeds are handled via Seeds object.

Parameters:
namestring, default ‘Unnamed’

Name used in some plotting and inspection methods.

alphafloat

Unitless viscosity parameter as per Shakura & Sunyaev. Default is \(10^{-3}\).

vfrag, vfin, vfoutfloat

Fragmentation velocity threshold (cm/s) for pebbles. If snowmode is None, then vfrag is used. Otherwise, vfin and vfout refer to values inside and outside the snow line. Defaults are 1000, 100, 1000.

rcritfloat

Critical radius (au) of disk gas surface density distribution, beyond which the surface density drops exponentially. Default is 30.

snowmode{‘none’, ‘evol’, ‘temp’, float}

Method used to determine location of the snow line, and where dust, solid composition, and pebble properties differ.

‘none’str

There is no snow line.

‘evol’str

Sets and evolves position according to disk properties like the alpha, \(Sigma_0, gas\) Sigma Gas, and decreasing dust/gas fraction. Scaled from Savvidou et. al. 2020 Eq 8.

‘temp’str

Sets position based on disk temperature >= 160 K. If ‘movetemp’ is True, the disk temperature will decrease by (a pseudo-physical) scaling with the dust/gas fraction.

float

Sets the position directly (au). If ‘movetemp’ is True, the disk temperature will decrease by (a pseudo-physical) scaling with the dust/gas fraction.

movetempbool, default False

Experimental: determines if the snow line evolves when snowmode is ‘temp’ or float. Currently an arbitrary function of fDG to approximate evolution calculated with ‘evol’.

MSolfloat

Stellar mass, in solar mass units. Default is 1.0.

dmffloat

Disk mass fraction. If dmf < 1.0, then sets the total (gas + solid) initial mass of disk as fraction of the stellar mass. If dmf > 1.0, then it represents the total starting solid mass, in Earth masses, and calculates the full disk mass using ‘z0’. Setting the solid (dust) mass directly may be useful for other model comparison. Default is 0.2.

z0float

Metallicity of the disk, specifically - the initial dust/gas fraction. Default is 0.0134.

tmode{‘simp’, ‘ida2016’}

Change temperature profiles between a simple power law that scales with stellar mass (default), or based on Ida et al. 2016 that accounts for viscous/irradation mechanisms. See Ida et al. 2016 Eq 7 and Eq 8.

Attributes:
stndarray

Flux-averaged Stokes number of pebbles at given [t,r].

fluxndarray

Mass flux of pebbles at given [t,r].

rgrid, tgridndarray

Array containing positions and times across disk lifetime. Typically define shape for other disk property arrays (i.e. over the disk radius and with time). Units cgs.

SigmaGas, SigmaDustndarray

Describing the gas and dust surface density. Units of g/cm2.

msolidsfloat

Initial total solid dust mass of disk, in grams.

mdiskfloat

Initial total disk mass (gas + solids), in grams.

Tempndarray

Temperature profile, units K.

Mstarfloat

Stellar mass in grams.

etandarray

Gas pressure gradient - r only.

Hgasndarray

Gas scale height - r only.

fDGfloat

Disk average dust/gas fraction. Set with instance creation, decreases if snowmode is evol.

snowline_i, snowline_aundarray

Position of the snow line at each time (i.e. len(tgrid)), as the closest index in rgrid, or in au.

compndarray

Density of solids at each [t,r], in g/cm3. Used to initialize seed compositional density.

namestr

Name that can be separate from that of Disk, used in some plotting.

alphafloat

Alpha-viscosity parameter.

snowmodestr or float

Records which setting was used to set the snow line.

MSolfloat

Stellar mass in solar mass units.

dmffloat

Disk mass fraction.

fullHgas, fulletasndarray

Future: same as eta and Hgas above, except for all [t,r]. Intended for development of gas evolution.

Methods

inspect(plots=False)

Prints basic informaiton about Disk, option to create plots.

inspect(plots=False)

Convenience function to print basic disk properties.

Quickly prints basic physical properties of the disk. Option to create plots of st, flux, and surface density profiles.

Parameters:
plotsbool, default=False

If True, plots 1) st, flux every 10 timesteps, 2) Gas and dust surface density profiles.

thePPOLsCode.Miso(ms=1.0, lociso=10, hgasiso=0.03, pref=20)

Returns pebble isolation mass, Earth masses.

Prefactor set to 20 Em, but see literature for discussion between 20 or 40 for prefactor.

thePPOLsCode.RfromD(m, d)

Calculate radius from mass and density i.e. d=m/v.

class thePPOLsCode.Seeds(disk, seeds_au, mass, tintro=1, scale=False)

Bases: object

Methods

grow([mode, epmode, pref])

Grows protoplanet seed masses by pebble accretion.

gtplot([xlim, ylim, ysnow])

Convenience plotter for single a single run.

grow(mode='isocutfiltfrac', epmode='setf', pref=20)

Grows protoplanet seed masses by pebble accretion.

Grows the protoplanet seeds described by Seeds in the disk described by Disk. See theory and description in paper. Protoplanets are grown at each time step, starting from the outside in. This facilitates calculation of filtering.

Parameters:
mode{‘isocutfiltfrac’, ‘filtfrac’, ‘filtraw’, ‘isocut’}

Sets certain growth modes regarding filtering of inward pebbles, and whether to truncate protoplanet growth at the pebble isolation mass. Strings can be combined in any order but must be exact. Ex. to filter the physical amount of pebbles and cut off growth at isolation mass, use ‘filtrawisocut’.

epmodestring, default=’setf’

Accretion mode used in epsilon to specifiy, e.g. 2dset, 3dbalf.

preffloat, default=20

Mathematical prefactor (Earth masses) used to calculate pebble isolation mass, as values differ among literature.

Attributes:
massgainedndarray [s,t]

New mass accreted per seed per time step, Earth masses.

cumulmassndarray [s,t]

Total cumulative mass of seed per time step, Earth masses.

finalmassndarray [s]

Final masses of each seed, Earth masses.

preflux, fluxpastndarray [s,t]

Represents the time-integrated mass in pebbles drifting past a given seed mass location. preflux corresponds to mass before any pebbles are removed from flux (filtering); fluxpast describes the actual mass in pebbles that make it past a seed, accounting for filtering.

effndarray [s,t]

Fraction of drifting pebbles that accrete onto seed. Calculated via epsilon.

isosndarray [s,t]

Pebble isolation mass threshold per seed, Earth masses.

madeiso, isotimendarray [s]

Indices of seeds_au that reached their pebble isolation mass and at which index of tgrid did that occur. These are recorded “backwards”, but since they refer to the seed_au and time index.

qpsndarray [s,t]

Protoplanet seed:stellar mass ratio, per seed per time. Quantity used in pebble_predictor.

radsndarray [s,t]

Future: Protoplanet radii, cm, used for some varitions of epmode. Currently stops recording a seeds radius after it reaches iso.

epmodestring

Records the epmode used to run grow.

seedcompndarray [s,t]

Per seed bulk density, g/cm3.

wmfndarray [s,t]

Per seed water mass fraction, i.e. fraction of total mass that is water. Unitless.

tpmassndarray [t]

Total mass contained in protoplanet seeds per time, Earth masses.

gtplot(xlim=[0.07, 25], ylim=[0.00075, 40], ysnow=0.105, **kwargs)

Convenience plotter for single a single run.

Quick plotting feature to show protoplanet masses, water mass fraction, pebble isolation mass at each seed location, and the position/evolution of the snow line (if applicable).

Parameters:
xlim, ylim[min, max]

Sets axis limits for plot, au.

ysnowfloat

Fine placement control of the label and arrow for the snow line. Arrow will be -0.015 label, in axis units.

**kwargs
titlestr

User can specify a title of any string text. Default title displays the stellar mass / dmf / number of seeds.

thePPOLsCode.lumscale(msol=1.0)

Luminosity based on stellar mass, currently L ~ M^3.