-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_disc.py
55 lines (48 loc) · 1.63 KB
/
test_disc.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
from hyperion.model import AnalyticalYSOModel
from hyperion.util.constants import pc, lsun, rsun, msun, au,pi
from hyperion.model import ModelOutput
import numpy as np
m = AnalyticalYSOModel()
m.set_n_photons(initial=100000, imaging=100000)
m.star.luminosity = 5 * lsun
m.star.radius = 2 * rsun
m.star.temperature = 6000.
disk = m.add_flared_disk()
disk.mass = 0.01 * msun # Disk mass
disk.rmin = 10 * rsun # Inner radius
disk.rmax = 300 * au # Outer radius
disk.r_0 = 100. * au # Radius at which h_0 is defined
disk.h_0 = 5 * au # Disk scaleheight at r_0
disk.p = -1 # Radial surface density exponent
disk.beta = 1.25 # Disk flaring power
#envelope = m.add_power_law_envelope()
#envelope.mass = 0.001 * msun # Envelope mass
#envelope.rmin = au # Inner radius
#envelope.rmax = 10000 * au # Outer radius
#envelope.power = -2 # Radial power
#envelope.r_0 = au # Inner density radius
#dust
disk.dust = 'www003.hdf5'
#envelope.dust = 'kmh.hdf5'
#cavity.dust = 'kmh_hdf5'
#coordinates
n_w = 200
n_z = 200
n_phi = 1
m.set_cylindrical_polar_grid_auto(n_w, n_z, n_phi)
#viewing angles
image = m.add_peeled_images(image=False)
# Set number of viewing angles
n_view = 10
# Generate the viewing angles
theta = np.linspace(0., 90., n_view)
phi = np.repeat(45., n_view)
# Set the viewing angles
image.set_viewing_angles(theta, phi)
#sed interval
n_wav=250
wav_min=0.1
wav_max=1000
image.set_wavelength_range(n_wav, wav_min, wav_max)
#write out hyperion input
m.write('test_disc.rtin')