-
Notifications
You must be signed in to change notification settings - Fork 1
/
Idk13X
272 lines (237 loc) · 10.6 KB
/
Idk13X
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
# ~/coll/idkit/InitialData: make models for IDKIT experiments.
########################################################################
# Runs 131 - 138: unequal-mass experiments using models 02 and 04,
# for comparison with randmerge experiments and general model matching.
# These runs use biased disks; jhat13X includes the weight factors.
r131/i131.dat:
$(MAKE) -f InitialData testdisks_02a OUT=r131/i131a.dat \
NDISK=256k SEED=13101
$(MAKE) -f InitialData testdisks_04a OUT=r131/i131b.dat \
NDISK=128k SEED=13102
kepsnap out=r131/orbit.dat mass1=1.25 mass2=0.625 \
r_peri=0.0625 eccent=1.0 t_peri=2.0 nsteps=32k
cat r131/i131[ab].dat | csf - - exclude=History | \
snapcons - r131/i131.dat produce=Position,Velocity,Mass \
frame=r131/orbit.dat
r132/i132.dat:
$(MAKE) -f InitialData testdisks_02a OUT=r132/i132a.dat \
NDISK=256k SEED=13101
$(MAKE) -f InitialData testdisks_04a OUT=r132/i132b.dat \
NDISK=128k SEED=13102
kepsnap out=r132/orbit.dat mass1=1.25 mass2=0.625 \
r_peri=0.1250 eccent=1.0 t_peri=2.0 nsteps=32k
cat r132/i132[ab].dat | csf - - exclude=History | \
snapcons - r132/i132.dat produce=Position,Velocity,Mass \
frame=r132/orbit.dat
r133/i133.dat:
$(MAKE) -f InitialData testdisks_02a OUT=r133/i133a.dat \
NDISK=256k SEED=13101
$(MAKE) -f InitialData testdisks_04a OUT=r133/i133b.dat \
NDISK=128k SEED=13102
kepsnap out=r133/orbit.dat mass1=1.25 mass2=0.625 \
r_peri=0.1875 eccent=1.0 t_peri=2.0 nsteps=32k
cat r133/i133[ab].dat | csf - - exclude=History | \
snapcons - r133/i133.dat produce=Position,Velocity,Mass \
frame=r133/orbit.dat
r134/i134.dat:
$(MAKE) -f InitialData testdisks_02a OUT=r134/i134a.dat \
NDISK=256k SEED=13101
$(MAKE) -f InitialData testdisks_04a OUT=r134/i134b.dat \
NDISK=128k SEED=13102
kepsnap out=r134/orbit.dat mass1=1.25 mass2=0.625 \
r_peri=0.2500 eccent=1.0 t_peri=2.0 nsteps=32k
cat r134/i134[ab].dat | csf - - exclude=History | \
snapcons - r134/i134.dat produce=Position,Velocity,Mass \
frame=r134/orbit.dat
r135/i135.dat:
$(MAKE) -f InitialData testdisks_02a OUT=r135/i135a.dat \
NDISK=256k SEED=13101
$(MAKE) -f InitialData testdisks_04a OUT=r135/i135b.dat \
NDISK=128k SEED=13102
kepsnap out=r135/orbit.dat mass1=1.25 mass2=0.625 \
r_peri=0.3125 eccent=1.0 t_peri=2.0 nsteps=32k
cat r135/i135[ab].dat | csf - - exclude=History | \
snapcons - r135/i135.dat produce=Position,Velocity,Mass \
frame=r135/orbit.dat
r136/i136.dat:
$(MAKE) -f InitialData testdisks_02a OUT=r136/i136a.dat \
NDISK=256k SEED=13101
$(MAKE) -f InitialData testdisks_04a OUT=r136/i136b.dat \
NDISK=128k SEED=13102
kepsnap out=r136/orbit.dat mass1=1.25 mass2=0.625 \
r_peri=0.3750 eccent=1.0 t_peri=2.0 nsteps=32k
cat r136/i136[ab].dat | csf - - exclude=History | \
snapcons - r136/i136.dat produce=Position,Velocity,Mass \
frame=r136/orbit.dat
r137/i137.dat:
$(MAKE) -f InitialData testdisks_02a OUT=r137/i137a.dat \
NDISK=256k SEED=13101
$(MAKE) -f InitialData testdisks_04a OUT=r137/i137b.dat \
NDISK=128k SEED=13102
kepsnap out=r137/orbit.dat mass1=1.25 mass2=0.625 \
r_peri=0.4375 eccent=1.0 t_peri=2.0 nsteps=32k
cat r137/i137[ab].dat | csf - - exclude=History | \
snapcons - r137/i137.dat produce=Position,Velocity,Mass \
frame=r137/orbit.dat
r138/i138.dat:
$(MAKE) -f InitialData testdisks_02a OUT=r138/i138a.dat \
NDISK=256k SEED=13101
$(MAKE) -f InitialData testdisks_04a OUT=r138/i138b.dat \
NDISK=128k SEED=13102
kepsnap out=r138/orbit.dat mass1=1.25 mass2=0.625 \
r_peri=0.5000 eccent=1.0 t_peri=2.0 nsteps=32k
cat r138/i138[ab].dat | csf - - exclude=History | \
snapcons - r138/i138.dat produce=Position,Velocity,Mass \
frame=r138/orbit.dat
########################################################################
jhat13X.dat: r131/i131a.dat r131/i131b.dat
cat r131/i131[ab].dat | csf - - exclude=History | \
snapcons - - | \
snapset - out=jhat13X.dat passall=false \
require=Position,Velocity,Mass produce=AuxVec,Aux \
auxvx="m==0 ? jx/jtot : 0" \
auxvy="m==0 ? jy/jtot : 0" \
auxvz="m==0 ? jz/jtot : 0" \
aux="8.0 / MAX(1.0, rsqr((i<344064?12.0:16.97) * r))"
########################################################################
# Runs 221 - 228: high-resolution runs using galaxy model 02 for one disk
########################################################################
# Galaxy model 02: high-resolution model (eps = 0.0075) with NFW halo. #
# #
# Bulge: M_b = 0.0625 a = 0.02 gamma = 1.0 #
# Disk: M_d = 0.1875 alpha = 12.0 z0 = 0.0075 #
# Halo: M_h = 1.0 a = 0.25 b = 0.98015 #
########################################################################
bulge_02.dat:
gammagsp - gamma=1.0 mtot=0.0625 a=0.02 | \
gsptrun - bulge_02.dat rtrun=4.0
disk_02.dat:
expdgsp disk_02.dat mtot=0.1875 alpha=12.0
halo_02.dat:
halogsp halo_02.dat m_a=0.16 a=0.25 b=0.98015 taper=sw \
rrange=1/16384:4
mass_02.dat: bulge_02.dat disk_02.dat halo_02.dat
gspadd bulge_02.dat,disk_02.dat,halo_02.dat mass_02.dat
# Smooth for EPS = 0.0075 with parameters used in randmerge/GalaxyModels.
mass_02s.dat: mass_02.dat
gspsmooth mass_02.dat mass_02s.dat eps=0.0115 kappa=1.975
########################################################################
# testdisks_02: build galaxy model with all possible disks. Note: the
# number of "disk" particles is (2/3) * NDISK; the inner 1/3 is excluded.
testdisks_02: mass_02s.dat
$(MAKE) -f InitialData spheroid_02 OUT=tmp0.dat NSPHR=40k SEED=$(SEED)
gspdisk mass_02s.dat tmp1.dat mdisk=0.0001 alpha=12.0 z0=0.0001 \
rcut=0.5 ndisk=$(NDISK) seed=$(SEED) zerocm=f > /dev/null
makesnap - shape=shell nbody=$(NDISK) seed=$(SEED) | \
snapset - tmp2.dat produce=AuxVec \
auxvx="racos(z)" auxvy="ratan2(x,y)"
(cat tmp2.dat ; csf tmp1.dat - exclude=History) | \
snapcollect - tmp3.dat
snapset tmp3.dat tmp4.dat m=0 \
x=x \
y="y*rcos(auxvx) + z*rsin(auxvx)" \
z="z*rcos(auxvx) - y*rsin(auxvx)" \
vx=vx \
vy="vy*rcos(auxvx) + vz*rsin(auxvx)" \
vz="vz*rcos(auxvx) - vy*rsin(auxvx)"
snapset tmp4.dat tmp5.dat \
x="x*rcos(auxvy) + y*rsin(auxvy)" \
y="y*rcos(auxvy) - x*rsin(auxvy)" \
z=z \
vx="vx*rcos(auxvy) + vy*rsin(auxvy)" \
vy="vy*rcos(auxvy) - vx*rsin(auxvy)" \
vz=vz
snapsift tmp5.dat tmp6.dat sieve="i >= n/3"
snapstack tmp0.dat tmp6.dat $(OUT) produce=Position,Velocity,Mass
rm -f tmp?.dat
spheroid_02: mass_02.dat mass_02s.dat
gsprealize mass_02.dat $(OUT) mass_02s.dat \
nbody=$(NSPHR) zerocm=f seed=$(SEED)
########################################################################
# testdisks_02a: build galaxy model with all possible disks. The radial
# mass distribution is biased (R^2 Exp[-alpha R]) to improve sampling in
# the outer regions.
testdisks_02a: mass_02s.dat
$(MAKE) -f InitialData spheroid_02a \
OUT=tmp0.dat NSPHR=80k SEED=$(SEED)
gsptestdisk mass_02s.dat tmp1.dat model=2 alpha=12.0 \
rcut=1.0 ndisk=$(NDISK) seed=$(SEED) > /dev/null
makesnap - shape=shell nbody=$(NDISK) seed=$(SEED) | \
snapset - tmp2.dat produce=AuxVec \
auxvx="racos(z)" auxvy="ratan2(x,y)"
(cat tmp2.dat ; csf tmp1.dat - exclude=History) | \
snapcollect - tmp3.dat
snapset tmp3.dat tmp4.dat m=0 \
x=x \
y="y*rcos(auxvx) + z*rsin(auxvx)" \
z="z*rcos(auxvx) - y*rsin(auxvx)" \
vx=vx \
vy="vy*rcos(auxvx) + vz*rsin(auxvx)" \
vz="vz*rcos(auxvx) - vy*rsin(auxvx)"
snapset tmp4.dat tmp5.dat \
x="x*rcos(auxvy) + y*rsin(auxvy)" \
y="y*rcos(auxvy) - x*rsin(auxvy)" \
z=z \
vx="vx*rcos(auxvy) + vy*rsin(auxvy)" \
vy="vy*rcos(auxvy) - vx*rsin(auxvy)" \
vz=vz
snapstack tmp0.dat tmp5.dat $(OUT) produce=Position,Velocity,Mass
rm -f tmp?.dat
spheroid_02a: mass_02.dat mass_02s.dat
gsprealize mass_02.dat - mass_02s.dat \
nbody=$(NSPHR) zerocm=f seed=$(SEED) | \
snapset - $(OUT) m="1.25 / n"
########################################################################
# Galaxy model 04: half-mass version of model 02. #
# #
# Bulge: M_b = 0.03125 a = 0.01414214 gamma = 1.0 #
# Disk: M_d = 0.09375 alpha = 16.97056 z0 = 0.0075 #
# Halo: M_h = 0.5 a = 0.1767767 b = 0.69307 #
########################################################################
bulge_04.dat:
gammagsp - gamma=1.0 mtot=0.03125 a=0.01414214 | \
gsptrun - bulge_04.dat rtrun=4.0
disk_04.dat:
expdgsp disk_04.dat mtot=0.09375 alpha=16.97056
halo_04.dat:
halogsp halo_04.dat m_a=0.08 a=0.1767767 b=0.69307 taper=sw \
rrange=1/16384:4
mass_04.dat: bulge_04.dat disk_04.dat halo_04.dat
gspadd bulge_04.dat,disk_04.dat,halo_04.dat mass_04.dat
# Smooth for EPS = 0.0075 with parameters used in randmerge/GalaxyModels.
mass_04s.dat: mass_04.dat
gspsmooth mass_04.dat mass_04s.dat eps=0.0120 kappa=1.975
########################################################################
# testdisks_04a: build galaxy model with all possible disks. The radial
# mass distribution is biased (R^2 Exp[-alpha R]) to improve sampling in
# the outer regions.
testdisks_04a: mass_04s.dat
$(MAKE) -f InitialData spheroid_04a \
OUT=tmp0.dat NSPHR=80k SEED=$(SEED)
gsptestdisk mass_04s.dat tmp1.dat model=2 alpha=16.97056 \
rcut=1.0 ndisk=$(NDISK) seed=$(SEED) > /dev/null
makesnap - shape=shell nbody=$(NDISK) seed=$(SEED) | \
snapset - tmp2.dat produce=AuxVec \
auxvx="racos(z)" auxvy="ratan2(x,y)"
(cat tmp2.dat ; csf tmp1.dat - exclude=History) | \
snapcollect - tmp3.dat
snapset tmp3.dat tmp4.dat m=0 \
x=x \
y="y*rcos(auxvx) + z*rsin(auxvx)" \
z="z*rcos(auxvx) - y*rsin(auxvx)" \
vx=vx \
vy="vy*rcos(auxvx) + vz*rsin(auxvx)" \
vz="vz*rcos(auxvx) - vy*rsin(auxvx)"
snapset tmp4.dat tmp5.dat \
x="x*rcos(auxvy) + y*rsin(auxvy)" \
y="y*rcos(auxvy) - x*rsin(auxvy)" \
z=z \
vx="vx*rcos(auxvy) + vy*rsin(auxvy)" \
vy="vy*rcos(auxvy) - vx*rsin(auxvy)" \
vz=vz
snapstack tmp0.dat tmp5.dat $(OUT) produce=Position,Velocity,Mass
rm -f tmp?.dat
spheroid_04a: mass_04.dat mass_04s.dat
gsprealize mass_04.dat - mass_04s.dat \
nbody=$(NSPHR) zerocm=f seed=$(SEED) | \
snapset - $(OUT) m="0.625 / n"