radmc3dPy.models package

Submodules

radmc3dPy.models.lines_nlte_lvg_1d_1 module

A 1D simple velocity gradient model to calculate lines with the LVG method

Original IDL model by Kees Dullemond, Python translation by Attila Juhasz

radmc3dPy.models.lines_nlte_lvg_1d_1.getDefaultParams()

Provides default parameter values

Returns a list whose elements are also lists with three elements: 1) parameter name, 2) parameter value, 3) parameter description All three elements should be strings. The string of the parameter value will be directly written out to the parameter file if requested, and the value of the string expression will be evaluated and be put to radmc3dData.ppar. The third element contains the description of the parameter which will be written in the comment field of the line when a parameter file is written.

radmc3dPy.models.lines_nlte_lvg_1d_1.getDustDensity(grid=None, ppar=None)

Calculates the dust density distribution

Parameters:

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and wavelength grid

ppar : dictionary

Dictionary containing all parameters of the model

Returns:

Returns the dust volume density in g/cm^3

radmc3dPy.models.lines_nlte_lvg_1d_1.getDustTemperature(grid=None, ppar=None)

Calculates/sets the dust temperature

Parameters:

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and wavelength grid

ppar : dictionary

Dictionary containing all parameters of the model

Returns:

Returns the dust temperature in K

radmc3dPy.models.lines_nlte_lvg_1d_1.getGasAbundance(grid=None, ppar=None, ispec='')

Calculates/sets the molecular abundance of species ispec The number density of a molecule is rhogas * abun

Parameters:

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and wavelength grid

ppar : dictionary

Dictionary containing all parameters of the model

ispec : str

The name of the gas species whose abundance should be calculated

Returns:

Returns the abundance as an ndarray

radmc3dPy.models.lines_nlte_lvg_1d_1.getGasDensity(grid=None, ppar=None)

Calculates the total gas density distribution

Parameters:

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and wavelength grid

ppar : dictionary

Dictionary containing all parameters of the model

Returns:

Returns the gas volume density in g/cm^3

radmc3dPy.models.lines_nlte_lvg_1d_1.getGasTemperature(grid=None, ppar=None)

Calculates the gas temperature

Parameters:

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and wavelength grid

ppar : dictionary

Dictionary containing all parameters of the model

Returns:

Returns the gas temperature in K

radmc3dPy.models.lines_nlte_lvg_1d_1.getModelDesc()

Provides a brief description of the model

radmc3dPy.models.lines_nlte_lvg_1d_1.getVTurb(grid=None, ppar=None)

Calculates/sets the turbulent velocity field

Parameters:

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and wavelength grid

ppar : dictionary

Dictionary containing all parameters of the model

Returns:

Returns the turbulent velocity in cm/s

radmc3dPy.models.lines_nlte_lvg_1d_1.getVelocity(grid=None, ppar=None)

Calculates/sets the gas velocity field

Parameters:

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and wavelength grid

ppar : dictionary

Dictionary containing all parameters of the model

Returns:

Returns the turbulent velocity in cm/s

radmc3dPy.models.ppdisk module

Generic protoplanetary disk model

The density is given by

\[\rho = \frac{\Sigma(r,\phi)}{H_p\sqrt{(2\pi)}} \exp{\left(-\frac{z^2}{2H_p^2}\right)}\]
  • \(\Sigma\) - surface density
  • \(H_{\rm p}\) - Pressure scale height

There are two options for the functional form of surface density as a function of radius. For a simple power-law the surface density is given by

  • \(\Sigma(r) = \Sigma_0\left(\frac{r}{r_{\rm out}}\right)^p\)

alternatively the surface density can also have an exponential outer tapering:

  • \(\Sigma(r) = \Sigma_0\left(\frac{r}{r_{\rm out}}\right)^p\exp{\left\{-\left(\frac{r}{r_{\rm out}}\right)^{2+p}\right\}}\)

The molecular abundance function takes into account dissociation and freeze-out of the molecules For photodissociation only the continuum (dust) shielding is taken into account in a way that whenever the continuum optical depth radially drops below a threshold value the molecular abundance is dropped to zero. For freeze-out the molecular abundance below a threshold temperature is decreased by a given fractor.

radmc3dPy.models.ppdisk.getDefaultParams()

Function to provide default parameter values of the model.

Returns a list whose elements are also lists with three elements: 1) parameter name, 2) parameter value, 3) parameter description All three elements should be strings. The string of the parameter value will be directly written out to the parameter file if requested, and the value of the string expression will be evaluated and be put to radmc3dData.ppar. The third element contains the description of the parameter which will be written in the comment field of the line when a parameter file is written.

radmc3dPy.models.ppdisk.getDustDensity(grid=None, ppar=None)

Calculates the dust density distribution in a protoplanetary disk.

Parameters:

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and frequency/wavelength grid

ppar : dictionary

A dictionary containing all parameters of the model

Returns:

Returns the volume density in g/cm^3

radmc3dPy.models.ppdisk.getGasAbundance(grid=None, ppar=None, ispec='')

Calculates the molecular abundance.

The number density of a molecule is rhogas * abun

Parameters:

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and wavelength grid

ppar : dictionary

Dictionary containing all parameters of the model

ispec : str

The name of the gas species whose abundance should be calculated

Returns:

Returns an ndarray containing the molecular abundance at each grid point

radmc3dPy.models.ppdisk.getGasDensity(grid=None, ppar=None)

Calculates the gas density distribution in a protoplanetary disk.

Parameters:

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and frequency/wavelength grid

ppar : dictionary

A dictionary containing all parameters of the model

Returns:

Returns the volume density in g/cm^3

radmc3dPy.models.ppdisk.getModelDesc()

Returns the brief description of the model.

radmc3dPy.models.ppdisk.getVTurb(grid=None, ppar=None)

Calculates the turbulent velocity field

Parameters:

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and frequency/wavelength grid

ppar : dictionary

A dictionary containing all parameters of the model

Returns:

Returns an ndarray with the turbulent velocity in cm/s

radmc3dPy.models.ppdisk.getVelocity(grid=None, ppar=None)

Calculates the velocity field in a protoplanetary disk.

Parameters:

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and frequency/wavelength grid

ppar : dictionary

A dictionary containing all parameters of the model

Returns:

Returns the gas velocity in cm/s

radmc3dPy.models.ppdisk_acc module

Generic protoplanetary disk model

The density is given by

\[\rho = \frac{\Sigma(r,\phi)}{H_p\sqrt{(2\pi)}} \exp{\left(-\frac{z^2}{2H_p^2}\right)}\]
  • \(\Sigma\) - surface density
  • \(H_{\rm p}\) - Pressure scale height

The molecular abundance function takes into account dissociation and freeze-out of the molecules For photodissociation only the continuum (dust) shielding is taken into account in a way that whenever the continuum optical depth radially drops below a threshold value the molecular abundance is dropped to zero. For freeze-out the molecular abundance below a threshold temperature is decreased by a given fractor.

radmc3dPy.models.ppdisk_acc.getDefaultParams()

Function to provide default parameter values of the model.

Returns a list whose elements are also lists with three elements: 1) parameter name, 2) parameter value, 3) parameter description All three elements should be strings. The string of the parameter value will be directly written out to the parameter file if requested, and the value of the string expression will be evaluated and be put to radmc3dData.ppar. The third element contains the description of the parameter which will be written in the comment field of the line when a parameter file is written.

radmc3dPy.models.ppdisk_acc.getDustDensity(grid=None, ppar=None)

Calculates the dust density distribution in a protoplanetary disk.

Parameters:

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and frequency/wavelength grid

ppar : dictionary

A dictionary containing all parameters of the model

Returns:

Returns the volume density in g/cm^3

radmc3dPy.models.ppdisk_acc.getGasAbundance(grid=None, ppar=None, ispec='')

Calculates the molecular abundance.

The number density of a molecule is rhogas * abun

Parameters:

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and wavelength grid

ppar : dictionary

Dictionary containing all parameters of the model

ispec : str

The name of the gas species whose abundance should be calculated

Returns:

Returns an ndarray containing the molecular abundance at each grid point

radmc3dPy.models.ppdisk_acc.getGasDensity(grid=None, ppar=None)

Calculates the gas density distribution in a protoplanetary disk.

Parameters:

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and frequency/wavelength grid

ppar : dictionary

A dictionary containing all parameters of the model

Returns:

Returns the volume density in g/cm^3

radmc3dPy.models.ppdisk_acc.getModelDesc()

Returns the brief description of the model.

radmc3dPy.models.ppdisk_acc.getStellarsrcDensity(grid=None, ppar=None)

Function to calculate the stellar density for a continuous starlike source when modeling a viscous accretion disk

The stellar density is defined as:

L_nu / (4*pi) = St_temp * rho_stellar * dV

where

L_nu is the frequency dependent luminosity of a grid cell St_temp is the stellar template (as given by getStellarsrcTemplates()) rho_stellar is the stellar density dV is the volume of the cell

Parameters:

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and frequency/wavelength grid

ppar : dictionary

A dictionary containing all parameters of the model mandatory keys for an accretion disk: ‘mstar’ - stellar mass ‘rstar’ - stellar radius ‘accrate’ - accretion rate

NOTE, that for the calculation of the effective disk temperature only the first

star is used if more than one values are given in mstar and rstar.

radmc3dPy.models.ppdisk_acc.getStellarsrcTemplates(grid=None, ppar=None)

Function to calculate the stellar density for a continuous starlike source when modeling a viscous accretion disk

The stellar template can be defined in two ways:

  1. by Tstar, Rstar, Mstar assuming it radiates as a blackbody
    In this case, similar to the definitions in the stars.inp file the temperature has to be a negative number.
  2. by a full frequency-dependent spectru given in erg / sec / Hz / gram-of-star .
    So multiply this by the stellar density in units of gram-of-star / cm^3, and divide by 4*pi to get the stellar source function in units of erg / src / Hz / cm^3 / steradian.

The model setup functions (problemSetupDust() and problemSetupGas()) will check the sign of the first element with indices (0,0) of the array returned by this function to decide which way the stellar template is defined. If the first element is negative, the template is defined by Tstar, Rstar, Mstar, while if it is positive the returned array contains frequency dependent spectra.

Parameters:

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and frequency/wavelength grid

ppar : dictionary

A dictionary containing all parameters of the model mandatory keys for an accretion disk: ‘mstar’ - stellar mass ‘rstar’ - stellar radius ‘accrate’ - accretion rate

NOTE, that for the calculation of the effective disk temperature only the first

star is used if more than one values are given in mstar and rstar.

Returns:

Returns an array with the stellar templates

If the stellar template is defined by the temperature, radius and mass of the stars the returned array

must have a dimensions [Ntemplate, 3]. The [i,0], [i,1] and [i,2] elements of the array contain the

stellar temperature, radius and mass of the ith template, respectively. NOTE, that in this case the

stellar temperatures needs to be negative!

If the stellar template is defined by the full frequency dependent spectra the returned array should

have [Ntemplate, Nwavelength] dimension.

radmc3dPy.models.ppdisk_acc.getVTurb(grid=None, ppar=None)

Calculates the turbulent velocity field

Parameters:

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and frequency/wavelength grid

ppar : dictionary

A dictionary containing all parameters of the model

Returns:

Returns an ndarray with the turbulent velocity in cm/s

radmc3dPy.models.ppdisk_acc.getVelocity(grid=None, ppar=None)

Calculates the velocity field in a protoplanetary disk.

Parameters:

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and frequency/wavelength grid

ppar : dictionary

A dictionary containing all parameters of the model

Returns:

Returns the gas velocity in cm/s

radmc3dPy.models.ppdisk_amr module

Generic protoplanetary disk model with a gap - octree AMR example

The density is given by

\[\rho = \frac{\Sigma(r,\phi)}{H_p\sqrt{(2\pi)}} \exp{\left(-\frac{z^2}{2H_p^2}\right)}\]
  • \(\Sigma\) - surface density
  • \(H_{\rm p}\) - Pressure scale height

There are two options for the functional form of surface density as a function of radius. For a simple power-law the surface density is given by

  • \(\Sigma_{\rm c}(r) = \Sigma_0\left(\frac{r}{r_{\rm out}}\right)^p\)

alternatively the surface density can also have an exponential outer tapering:

  • \(\Sigma_{\rm c}(r) = \Sigma_0\left(\frac{r}{r_{\rm out}}\right)^p\exp{\left\{-\left(\frac{r}{r_{\rm out}}\right)^{2+p}\right\}}\)

The \({\rm c}\) index refers to the continuous, unperturbed surface density as the final surface density may contain perturbations due to the presence of gaps. Arbitrary number of gaps can be placed in the surface density of the disk. The gap is implemented as a radial gaussian depletion in the form

  • \(G(r) = \frac{1}{\delta-1}\exp{(-\left((r-r_{\rm c})^2/\sigma^2\right)}\)

where \(\delta\) is the density recution in the center of the gap, \(r_{\rm c}\) is the distance of the gap center from the star, and \(\sigma\) is the standard deviation of the gaussian in the radial direction. The final surface density including the gaps will then be calculated as

  • \(\Sigma(r) =\Sigma_{\rm c}(r) / (1 + \sum_{i=1}^{N}G_{\rm i}(r))\)

The molecular abundance function takes into account the freeze-out of the molecules For freeze-out the molecular abundance below a threshold temperature is decreased by a given fractor.

radmc3dPy.models.ppdisk_amr.decisionFunction(x=None, y=None, z=None, dx=None, dy=None, dz=None, model=None, ppar=None, **kwargs)

Example function to be used as decision function for resolving cells in tree building. It calculates the gas density at a random sample of coordinates within a given cell than takes the quantity \((\max{\rho_{\rm i}} - \min{\rho_\rm{i}})/\max{\rho_{\rm i}}\). If it is larger than a certain threshold value it will return True (i.e. the cell should be resolved) if the density variation is less than the threshold it returns False (i.e. the cell should not be resolved)

Parameters:

x : ndarray

Cell centre coordinates of the cells in the first dimension

y : ndarray

Cell centre coordinates of the cells in the second dimension

z : ndarray

Cell centre coordinates of the cells in the third dimension

dx : ndarray

Half size of the cells in the first dimension

dy : ndarray

Half size of the cells in the second dimension

dz : ndarray

Half size of the cells in the third dimension

model : object

A radmc3dPy model (must contain a getGasDensity() function)

ppar : dictionary

All parameters of the problem (from the problem_params.inp file). It is not used here, but must be present for compatibility reasons.

**kwargs: dictionary

Parameters used to decide whether the cell should be resolved. It should contain the following keywords; ‘nsample’, which sets the number of random points the gas desity is sampled at within the cell and ‘threshold’ that sets the threshold value for max(gasdens)/min(gasdens) above which the cell should be resolved.

radmc3dPy.models.ppdisk_amr.getDefaultParams()

Function to provide default parameter values of the model.

Returns a list whose elements are also lists with three elements: 1) parameter name, 2) parameter value, 3) parameter description All three elements should be strings. The string of the parameter value will be directly written out to the parameter file if requested, and the value of the string expression will be evaluated and be put to radmc3dData.ppar. The third element contains the description of the parameter which will be written in the comment field of the line when a parameter file is written.

radmc3dPy.models.ppdisk_amr.getDustDensity(x=None, y=None, z=None, ppar=None, grid=None)

Calculates the dust density distribution in a protoplanetary disk.

Parameters:

x : ndarray

Coordinate of the cell centers in the first dimension

y : ndarray

Coordinate of the cell centers in the second dimension

z : ndarray

Coordinate of the cell centers in the third dimension

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and frequency/wavelength grid

ppar : dictionary

A dictionary containing all parameters of the model

Returns:

Returns the volume density in g/cm^3

radmc3dPy.models.ppdisk_amr.getGasAbundance(x=None, y=None, z=None, grid=None, ppar=None, ispec='')

Calculates the molecular abundance.

The number density of a molecule is rhogas * abun

Parameters:

x : ndarray

Coordinate of the cell centers in the first dimension

y : ndarray

Coordinate of the cell centers in the second dimension

z : ndarray

Coordinate of the cell centers in the third dimension

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and wavelength grid

ppar : dictionary

Dictionary containing all parameters of the model

ispec : str

The name of the gas species whose abundance should be calculated

Returns:

Returns an ndarray containing the molecular abundance at each grid point

radmc3dPy.models.ppdisk_amr.getGasDensity(x=None, y=None, z=None, ppar=None, grid=None)

Calculates the gas density distribution in a protoplanetary disk.

Parameters:

x : ndarray

Coordinate of the cell centers in the first dimension

y : ndarray

Coordinate of the cell centers in the second dimension

z : ndarray

Coordinate of the cell centers in the third dimension

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and frequency/wavelength grid

ppar : dictionary

A dictionary containing all parameters of the model

Returns:

Returns the volume density in g/cm^3

radmc3dPy.models.ppdisk_amr.getModelDesc()

Returns the brief description of the model.

radmc3dPy.models.ppdisk_amr.getVTurb(x=None, y=None, z=None, grid=None, ppar=None)

Calculates the turbulent velocity field

Parameters:

x : ndarray

Coordinate of the cell centers in the first dimension

y : ndarray

Coordinate of the cell centers in the second dimension

z : ndarray

Coordinate of the cell centers in the third dimension

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and frequency/wavelength grid

ppar : dictionary

A dictionary containing all parameters of the model

Returns:

Returns an ndarray with the turbulent velocity in cm/s

radmc3dPy.models.ppdisk_amr.getVelocity(x=None, y=None, z=None, grid=None, ppar=None)

Calculates the velocity field in a protoplanetary disk.

Parameters:

x : ndarray

Coordinate of the cell centers in the first dimension

y : ndarray

Coordinate of the cell centers in the second dimension

z : ndarray

Coordinate of the cell centers in the third dimension

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and frequency/wavelength grid

ppar : dictionary

A dictionary containing all parameters of the model

Returns:

Returns the gas velocity in cm/s

radmc3dPy.models.simple_1 module

A 3D spherical Gaussian blob in a 3D cartesian grid

Original IDL model by Kees Dullemond, Python translation by Attila Juhasz

radmc3dPy.models.simple_1.getDefaultParams()

Provides default parameter values

Returns a list whose elements are also lists with three elements: 1) parameter name, 2) parameter value, 3) parameter description All three elements should be strings. The string of the parameter value will be directly written out to the parameter file if requested, and the value of the string expression will be evaluated and be put to radmc3dData.ppar. The third element contains the description of the parameter which will be written in the comment field of the line when a parameter file is written.

radmc3dPy.models.simple_1.getDustDensity(grid=None, ppar=None)

Calculates the dust density distribution

Parameters:

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and wavelength grid

ppar : dictionary

Dictionary containing all parameters of the model

Returns:

Returns the dust volume density in g/cm^3

radmc3dPy.models.simple_1.getModelDesc()

Provides a brief description of the model

radmc3dPy.models.spher1d_1 module

A 1D spherical envelope with powerlaw radial density in spherical grid

Original IDL model by Kees Dullemond, Python translation by Attila Juhasz

radmc3dPy.models.spher1d_1.getDefaultParams()

Provides default parameter values

Returns a list whose elements are also lists with three elements: 1) parameter name, 2) parameter value, 3) parameter description All three elements should be strings. The string of the parameter value will be directly written out to the parameter file if requested, and the value of the string expression will be evaluated and be put to radmc3dData.ppar. The third element contains the description of the parameter which will be written in the comment field of the line when a parameter file is written.

radmc3dPy.models.spher1d_1.getDustDensity(grid=None, ppar=None)

Calculates the dust density distribution

Parameters:

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and wavelength grid

ppar : dictionary

Dictionary containing all parameters of the model

Returns:

Returns the dust volume density in g/cm^3

radmc3dPy.models.spher1d_1.getModelDesc()

Provides a brief description of the model

radmc3dPy.models.spher2d_1 module

A 2D envelope with density dependence on the theta coordinate in spherical grid

Original IDL model by Kees Dullemond, Python translation by Attila Juhasz

radmc3dPy.models.spher2d_1.getDefaultParams()

Provides default parameter values

Returns a list whose elements are also lists with three elements: 1) parameter name, 2) parameter value, 3) parameter description All three elements should be strings. The string of the parameter value will be directly written out to the parameter file if requested, and the value of the string expression will be evaluated and be put to radmc3dData.ppar. The third element contains the description of the parameter which will be written in the comment field of the line when a parameter file is written.

radmc3dPy.models.spher2d_1.getDustDensity(grid=None, ppar=None)

Calculates the dust density distribution

Parameters:

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and wavelength grid

ppar : dictionary

Dictionary containing all parameters of the model

Returns:

Returns the dust volume density in g/cm^3

radmc3dPy.models.spher2d_1.getModelDesc()

Provides a brief description of the model

radmc3dPy.models.template module

This is a radmc3dPy model template

This template is an empty model, i.e. all model functions return zeros in the appropriate arrays and dimensions. The purpose of this model is to illustrate the names and syntax of the model functions. Hence, this file can be a starting point for implementing new models in the library.

A radmc3dPy model file can contain any / all of the functions below

  • getDefaultParams()
  • getModelDesc()
  • getDustDensity()
  • getDustTemperature()
  • getGasAbundance()
  • getGasDensity()
  • getGasTemperature()
  • getVelocity()
  • getVTurb()

The description of the individual functions can be found in the docstrings below the function name. If a model does not provide a variable or the variable should be calculated by RADMC-3D (e.g. dust temperature) the corresponding function (e.g. get_dust_temperature) should be removed from or commented out in the model file.

NOTE: When using this template it is strongly advised to rename the template model (to e.g. mydisk.py) as the get_model_names() function in the setup module removes the name ‘template’ from the list of available models.

radmc3dPy.models.template.getDefaultParams()

Provides default parameter values

Returns a list whose elements are also lists with three elements: 1) parameter name, 2) parameter value, 3) parameter description All three elements should be strings. The string of the parameter value will be directly written out to the parameter file if requested, and the value of the string expression will be evaluated and be put to radmc3dData.ppar. The third element contains the description of the parameter which will be written in the comment field of the line when a parameter file is written.

radmc3dPy.models.template.getDustDensity(grid=None, ppar=None)

Calculates the dust density distribution

Parameters:

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and wavelength grid

ppar : dictionary

Dictionary containing all parameters of the model

Returns:

Returns the dust volume density in g/cm^3

radmc3dPy.models.template.getDustTemperature(grid=None, ppar=None)

Calculates/sets the dust temperature

Parameters:

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and wavelength grid

ppar : dictionary

Dictionary containing all parameters of the model

Returns:

Returns the dust temperature in K

radmc3dPy.models.template.getGasAbundance(grid=None, ppar=None, ispec='')

Calculates/sets the molecular abundance of species ispec The number density of a molecule is rhogas * abun

Parameters:

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and wavelength grid

ppar : dictionary

Dictionary containing all parameters of the model

ispec : str

The name of the gas species whose abundance should be calculated

Returns:

Returns the abundance as an ndarray

radmc3dPy.models.template.getGasDensity(grid=None, ppar=None)

Calculates the total gas density distribution

Parameters:

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and wavelength grid

ppar : dictionary

Dictionary containing all parameters of the model

Returns:

Returns the gas volume density in g/cm^3

radmc3dPy.models.template.getGasTemperature(grid=None, ppar=None)

Calculates/sets the gas temperature

Parameters:

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and wavelength grid

ppar : dictionary

Dictionary containing all parameters of the model

Returns:

Returns the gas temperature in K

radmc3dPy.models.template.getModelDesc()

Provides a brief description of the model

radmc3dPy.models.template.getVTurb(grid=None, ppar=None)

Calculates/sets the turbulent velocity field

Parameters:

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and wavelength grid

ppar : dictionary

Dictionary containing all parameters of the model

Returns:

Returns the turbulent velocity in cm/s

radmc3dPy.models.template.getVelocity(grid=None, ppar=None)

Calculates/sets the gas velocity field

Parameters:

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and wavelength grid

ppar : dictionary

Dictionary containing all parameters of the model

Returns:

Returns the turbulent velocity in cm/s

radmc3dPy.models.test_scattering_1 module

A 3D spherical Gaussian blob in a 3D cartesian grid

Original IDL model by Kees Dullemond, Python translation by Attila Juhasz

radmc3dPy.models.test_scattering_1.getDefaultParams()

Provides default parameter values

Returns a list whose elements are also lists with three elements: 1) parameter name, 2) parameter value, 3) parameter description All three elements should be strings. The string of the parameter value will be directly written out to the parameter file if requested, and the value of the string expression will be evaluated and be put to radmc3dData.ppar. The third element contains the description of the parameter which will be written in the comment field of the line when a parameter file is written.

radmc3dPy.models.test_scattering_1.getDustDensity(grid=None, ppar=None)

Calculates the dust density distribution

Parameters:

grid : radmc3dGrid

An instance of the radmc3dGrid class containing the spatial and wavelength grid

ppar : dictionary

Dictionary containing all parameters of the model

Returns:

Returns the dust volume density in g/cm^3

radmc3dPy.models.test_scattering_1.getModelDesc()

Provides a brief description of the model

Module contents

This module contains models and functions to manage the library/list of models

radmc3dPy.models.updateModelList()

Updates the list of models in the library.

This function gets the names of all .py files in the radmc3dPy/models directory. Then tries to import them as a rought check for consistency. If the content of the file can be imported, the name of the model file is added to the model list. The model modules are then added to the _modellist.py in the radmc3dPy/models directory and can be used from that point on.

NOTE 1 : Write permissions is needed to update the list of models as the radmc3dPy/models/_modellist.py file
has to be re-written.
NOTE 2 : After the updateModelList has been run the module must be either reloaded or one has to exit the current
python session and relaunch it to see the effect of the updated model list.
radmc3dPy.models.getModelNames()

Returns the name of the available models.

radmc3dPy.models.getModelDesc(model=None)

Returns a brief description of the selected model.

Parameters:

model : str

Name of the model to get the description of

Returns:

A string with the description of the model