Radmc3dDefaults

class sf3dmodels.rt.Radmc3dDefaults(GRID, nphot=None)[source] [edit on github]

Bases: sf3dmodels.rt.Radmc3d

Hosts predefined radiative transfer modes for RADMC-3D: freefree, recombination lines.

Parameters:
GRID : Struct

Grid structure in which the model was computed.

Methods Summary

freefree(self, prop[, fmt, folder, …]) Writes the files required by RADMC-3D to compute free-free emission from the input model.
recomblines(self, prop, transition[, fmt, …]) Writes the files required by RADMC-3D to compute recombination lines emission from the input model.

Methods Documentation

freefree(self, prop, fmt='%13.6e', folder='./', kwargs_control={'scattering_mode_max': 0, 'camera_incl_stars': 0, 'incl_dust': 0}, kwargs_wavelength={'lam': [0.1, 500.0, 20000.0, 40000.0, 300000.0], 'nxx': [20, 20, 20, 20]})[source] [edit on github]

Writes the files required by RADMC-3D to compute free-free emission from the input model.

Parameters:
prop : dict

Dictionary containing the model physical properties.

Mandatory keys: ‘dens_e’, ‘dens_ion’, ‘temp_gas’.

Optional keys: ‘temp_dust’.

Additional keys will not be taken into account.

fmt : str, optional

Format string for numbers.

folder : str, optional

Sets the folder to write the files in.

kwargs_control : dict, optional

Optional dictionary containing additional keys to be written into the radmc3d control file ‘radmc3d.inp’.

  • If you set ‘incl_dust’: 1, then prop[‘dens_dust’] and prop[‘temp_dust’] must be provided.
  • Fixed keys for this method: ‘incl_freefree’: 1

Have a look at the RADMC-3D docs for all the available control commands.

kwargs_wavelength : {‘nxx’: array_like, ‘lam’: array_like}, optional

Optional dictionary containing the number of points and boundaries for the grid of wavelengths to consider. For further information and default values take a look at the method write_wavelength_micron.

Returns:
data files : files

amr_grid.inp, electron_numdens.inp, ion_numdens.inp, gas_temperature.inp [, dust_temperature.inp]

Examples

Have a look at the following folders on the GitHub repository:

examples/ionized_constant/

examples/ionized_powerlaw/

examples/ionized_env+disc/

examples/outflows/

../_images/img_HII_env+disc_.png ../_images/sed_env+disc.png ../_images/img_outflows.png
recomblines(self, prop, transition, fmt='%13.6e', folder='./', kwargs_control={}, kwargs_wavelength={'lam': [0.1, 500.0, 20000.0, 40000.0, 300000.0], 'nxx': [20, 20, 20, 20]})[source] [edit on github]

Writes the files required by RADMC-3D to compute recombination lines emission from the input model.

Parameters:
prop : dict

Dictionary containing the model physical properties.

Mandatory keys: ‘dens_e’, ‘dens_ion’, ‘temp_gas’, ‘vel’.

Optional keys: ‘temp_dust’, ‘microturbulence’.

Additional keys will not be taken into account.

transition : [level_up, level_down]

array_like object of scalar integers.

Upper and lower levels of the transition to be computed.

fmt : str, optional

Format string for numbers.

folder : str, optional

Sets the folder to write the files in.

kwargs_control : dict, optional

Dictionary containing additional keys to be written into the radmc3d control file ‘radmc3d.inp’.

  • If you set ‘incl_dust’: 1, then prop[‘temp_dust’] and prop[‘dens_dust’] must be provided, and you need to have a dustopac.inp file as well.
  • Default keys for this method: ‘scattering_mode_max’: 0, ‘camera_incl_stars’: 0, ‘incl_dust’: 0, ‘incl_freefree’: 1, ‘incl_lines’: 1, ‘lines_profile’: 1,’userdef_nonlte’: 1

Have a look at the RADMC-3D docs for all the available control commands.

kwargs_wavelength : {‘nxx’: array_like, ‘lam’: array_like}, optional

Dictionary containing the desired range of wavelengths to be written into file. For further information and default values take a look at the method write_wavelength_micron.

Returns:
data files : files

amr_grid.inp, radmc3d.inp, electron_numdens.inp, ion_numdens.inp, gas_temperature.inp, gas_velocity.inp [, dust_temperature.inp, microturbulence.inp]

Warning

The free version of radmc3d does not include the recombination lines module. If you want to get this extension you will need to request it directly to the developer: Peters+2012.

Examples

Have a look at the examples/recomblines/ folder on the GitHub repository.

../_images/img_channel.png ../_images/img_spectrum.png