Example #1
0
from mcrt3d.constants.astronomy import M_sun, R_sun, AU
from mcrt3d.constants.physics import c
from numpy import array, arange, pi, zeros, logspace
from time import time

# Create a model class.

model = MCRT()

# Set up the dust.

dust = Dust(filename="dustkappa_yso.inp", radmc3d=True)

# Set up the star.

star = Star(0.0, 0.0, 0.0, M_sun, R_sun, 4000.0)
star.set_blackbody_spectrum(dust.nu)

# Set up the grid.

nx = 10
ny = 10
nz = 10

x = (arange(nx) - (float(nx) - 1) / 2) * AU / 1
y = (arange(ny) - (float(ny) - 1) / 2) * AU / 1
z = (arange(nz) - (float(nz) - 1) / 2) * AU / 1

density = zeros((nx - 1, ny - 1, nz - 1)) + 1.0e-16

model.set_cartesian_grid(x, y, z)