Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F86003859
example11.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Oct 3, 14:50
Size
489 B
Mime Type
text/x-python
Expires
Sat, Oct 5, 14:50 (2 d)
Engine
blob
Format
Raw Data
Handle
21319031
Attached To
rPNBODY pNbody
example11.py
View Options
from
pNbody
import
*
from
pNbody
import
ic
'''
create a multi component model
'''
ftype
=
'gadget'
nb_gas
=
ic
.
miyamoto_nagai
(
1000
,
3
,
0.1
,
30
,
2
,
ftype
=
ftype
)
nb_disk
=
ic
.
expd
(
n
=
2000
,
Hr
=
3.
,
Hz
=
0.3
,
Rmax
=
20
,
Zmax
=
2
,
irand
=
1
,
ftype
=
ftype
)
nb_halo
=
ic
.
plummer
(
3000
,
1
,
1
,
1
,
10
,
40
,
ftype
=
ftype
)
nb_gas
.
set_tpe
(
0
)
nb_halo
.
set_tpe
(
1
)
nb_disk
.
set_tpe
(
2
)
#nb = nb_gas + nb_halo + nb_disk
nb
=
nb_gas
+
nb_disk
+
nb_halo
nb
.
rename
(
'snap.dat'
)
nb
.
write
()
nb
.
show
(
obs
=
None
,
view
=
'yz'
,
size
=
[
50
,
50
])
Event Timeline
Log In to Comment