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