Skip to content

Commit

Permalink
25th commit
Browse files Browse the repository at this point in the history
  • Loading branch information
danehkar committed Nov 15, 2016
1 parent 637f354 commit 701ff00
Show file tree
Hide file tree
Showing 443 changed files with 631,722 additions and 0 deletions.
43 changes: 43 additions & 0 deletions accessories/makeGrainSizeDistribution.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
!
! this program greates a grain size distribution file for use
! by the MOCASSIN code
! it creates nsizes equally spaced bins in log10 space from
! amin and amax
!
! B. Ercolano 23/09/04
program makeGrainSizeDistribution
implicit none

character(len=50) :: outfile
integer :: nsizes, i
real :: slope, amin, amax, astep

print*, 'how many bins?'
read*, nsizes
print*, 'what is the exponential giving the slope of the distribution? (p)'
read*, slope
print*, 'what are amin and amax in microns?'
read*, amin, amax
print*, 'what should the output file be called?'
read*, outfile

astep = (log10(amax)-log10(amin))/real(nsizes-1)

open(unit=10,file=outfile,status='unknown')

write(10,*) nsizes, ' sizes '
do i=1,nsizes
write(10,*) i, 10.**(log10(amin)+(i-1)*astep), (10.**(log10(amin)+(i-1)*astep))**(-slope)
end do

write(10,*)
write(10,*)
write(10,*) 'slope (p): ', slope


end program makeGrainSizeDistribution





62 changes: 62 additions & 0 deletions accessories/plotSED.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
function sm,tab
coeff=5
n_interm=n_elements(reform(tab[*,0,0]))*coeff
return,smooth(rebin(reform(tab[*,0,0]),n_interm),coeff)
end

defsysv,'!col',EXISTS = col_exists
if not col_exists then $
defsysv,'!col',{black : 0, $
white : 1, $
red : 2, $
green : 3, $
blue : 4, $
yellow : 5, $
magenta : 6, $
cyan : 7, $
orange : 8, $
l_green : 9, $
violet : 10,$
turquoise : 11,$
l_blue : 12,$
l_red : 13 $
}
; 0 1 2 3 4 5 6 7 8 9 10 11 12 13
tvlct,[ 0,255, 255, 0, 0,255,255, 0,255,125,125, 0, 0,255],$ ;red
[ 0,255, 0,255, 0,255, 0,255,125,255, 0,255,125, 0],$ ;green
[ 0,255, 0, 0,255, 0,255,255, 0, 0,255,125,255,125] ;blue


;********** MODIFY BELOW ***************
mocassinfile='SED.out' ; file name
n = 1 ; inclination angles
D=1000. ; distance in pc
;********** END MODIFICATION ***********

data=fltarr(3+n,215)

deltanu=fltarr(1,215)
openr,lun,mocassinfile,/get_lun
nothing=' '
readf, lun, nothing
readf, lun, nothing
readf, lun, nothing
readf, lun, nothing
readf,lun,data
close,lun
free_lun,lun


set_plot, 'ps'
device, file='SEDnew.ps',/color

plot,data(1,*), data(2,*)/D^2 ,psym=0,xrange=[.3,350.],/xs,/ys,/xlog,/ylog, xtitle= "Wavelength [um]", ytitle = 'Flux Density [Jy]', symsize = 1.5, thick=5, yrange = [max(data(2,*)/D^2)/1.e4, 2.*max(data(2,*)/D^2)]
if (n gt 0) then begin
oplot, data(1,*), data(3,*)/D^2, color = !col.red, line = 2, thick = 5
endif
if (n gt 1) then begin
oplot, data(1,*), data(4,*)/D^2, color = !col.green, line = 3, thick = 5
endif

device, /close
end
19 changes: 19 additions & 0 deletions benchmarks/dust/1D/p0tau1/input.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
autoPackets 0.20 2. 10000000
output
symmetricXYZ
contShape blackbody
nebComposition noGas
maxIterateMC 30 95.
nPhotons 100000
nx 16
ny 16
nz 16
LStar 38.26
Rin 0.
Rout 2.1800001e17
TStellar 2500.
Ndust file 'input/p0tau1.ndust'
dustFile 'input/p0tau1_grainspecies.dat' 'input/p0tau1_grainsizes.dat'
writeGrid 80.
convLimit 0.05

4,096 changes: 4,096 additions & 0 deletions benchmarks/dust/1D/p0tau1/p0tau1.ndust

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions benchmarks/dust/1D/p0tau1/p0tau1_grainsizes.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1 size
1 0.16 1.0
2 changes: 2 additions & 0 deletions benchmarks/dust/1D/p0tau1/p0tau1_grainspecies.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1
'dustData/sil-dlee.nk' 1.0
19 changes: 19 additions & 0 deletions benchmarks/dust/1D/p0tau10/input.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
autoPackets 0.20 2. 10000000
output
symmetricXYZ
contShape blackbody
nebComposition noGas
maxIterateMC 30 95.
nPhotons 100000
nx 17
ny 17
nz 17
LStar 38.26
Rin 0.
Rout 2.2000001e17
TStellar 2500.
Ndust file 'input/p0tau10.ndust'
dustFile 'input/p0tau10_grainspecies.dat' 'input/p0tau10_grainsizes.dat'
writeGrid 5.
convLimit 0.03

Loading

0 comments on commit 701ff00

Please sign in to comment.