def SetupGrid(): G = SphericalGrid() # Set up the dust. dust = Dust() dust.set_properties_from_radmc3d("dustkappa_yso.inp") # Set up the star. star = Star() star.set_parameters(0.0,0.0,0.0,M_sun,R_sun,4000.0) star.set_blackbody_spectrum(dust.nu) G.add_source(star) # Set up the grid. nr = 10 nt = 10 np = 10 r = arange(nr)*AU/2 t = arange(nt)/(nt-1.)*pi p = arange(np)/(np-1.)*2*pi G.set_walls(r,t,p) density = zeros((nr-1,nt-1,np-1)) + 1.0e-17 G.add_density(density, dust) return G
def SetupGrid(): G = CartesianGrid() # Set up the dust. dust = Dust() dust.set_properties_from_radmc3d("dustkappa_yso.inp") # Set up the star. star = Star() star.set_parameters(0.0,0.0,0.0,M_sun,R_sun,4000.0) star.set_blackbody_spectrum(dust.nu) G.add_source(star) # 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 G.set_walls(x,y,z) density = zeros((nx-1,ny-1,nz-1)) + 1.0e-17 G.add_density(density, dust) return G
from mcrt3d.grid import CartesianGrid from mcrt3d.dust import Dust from mcrt3d.sources import Star from mcrt3d.camera import Image, Spectrum 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
dpc=1, code="radmc3d", camera_scatsrc_allfreq=True, \ verbose=False) ################################################################################ # # Run the model with MCRT3D # ################################################################################ # Create a model class. model = MCRT() # Set up the dust. dust = Dust(filename="../examples/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