#------------------- #PHYSICAL PROPERTIES #------------------- density = Model.density_Constant(r_max, GRID, envDens = dens_e) temperature = Model.temperature_Constant(density, GRID, envTemp = t_e, backTemp = 2.725) Model.PrintProperties(density, temperature, GRID) #Printing resultant properties (mass, mean temperature, etc) #---------------------- #WRITING RADMC-3D FILES #---------------------- prop = {'dens_e': density.total, 'dens_ion': density.total, 'temp_gas': temperature.total} Rad = rt.Radmc3dDefaults(GRID) Rad.freefree(prop) #------------------------------------ #3D PLOTTING (weighting with density) #------------------------------------ tag = 'ctsphere_HII' weight = dens_e """ Plot_model.scatter3D(GRID, density.total, weight, power=0, NRand = 4000, colordim = density.total / 1e6 / 1e5, axisunit = u.au, cmap = 'winter', marker = 'o', colorlabel = r'$n_{\rm e}$ [cm$^{-3}$] x $10^5$', output = '3Ddens_%s.png'%tag, show = True) Plot_model.scatter3D(GRID, density.total, weight, power=0, NRand = 4000, colordim = temperature.total, axisunit = u.au, cmap = 'winter', marker = 'o', colorlabel = r'$T_{\rm e}$ [Kelvin]', output = '3Dtemp_%s.png'%tag, show = True) """
#COMMON GRID TO MERGE THE SUBMODELS IN #************************************* sizex = 3000 * u.au sizey = sizez = sizex Nx = 125 Ny = Nz = Nx GRID = Model.grid([sizex, sizey, sizez], [Nx, Ny, Nz], rt_code='radmc3d') #********************************** #MERGING PARABOLOID ONLY + SED #********************************** globalA = Overlap(GRID) prop_globalA = globalA.fromfiles(columns, submodels=['paraboloid0.dat'], rt_code='radmc3d') A = rt.Radmc3dDefaults(GRID) files_ff(A, prop_globalA) cmd_check_call('radmc3d sed dpc 5410') shutil.move('spectrum.out', 'spectrum_parab.out') print( '-------------------------------------------------\n-------------------------------------------------' ) #********************************** #MERGING SHELL ONLY + SED #********************************** globalB = Overlap(GRID) prop_globalB = globalB.fromfiles(columns, submodels=['shell0.dat'], rt_code='radmc3d')