-
Notifications
You must be signed in to change notification settings - Fork 1
/
Idk12X
319 lines (283 loc) · 12.7 KB
/
Idk12X
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
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
# ~/coll/idkit/InitialData: make models for IDKIT experiments.
########################################################################
# Runs 121 - 128: high-resolution runs using galaxy model 02, for
# comparison with randmerge experiments and general model matching.
# These runs use biased disks; jhat12X includes the weight factors.
r120/i120.dat:
$(MAKE) -f InitialData testdisks_02a OUT=r120/i120a.dat \
NDISK=256k SEED=12001
$(MAKE) -f InitialData testdisks_02a OUT=r120/i120b.dat \
NDISK=256k SEED=12002
kepsnap out=r120/orbit.dat mass1=1.25 mass2=1.25 \
r_peri=0.0 eccent=1.0 t_peri=2.0 nsteps=32k
cat r120/i120[ab].dat | csf - - exclude=History | \
snapcons - r120/i120.dat produce=Position,Velocity,Mass \
frame=r120/orbit.dat
r121/i121.dat:
$(MAKE) -f InitialData testdisks_02a OUT=r121/i121a.dat \
NDISK=256k SEED=12101
$(MAKE) -f InitialData testdisks_02a OUT=r121/i121b.dat \
NDISK=256k SEED=12102
kepsnap out=r121/orbit.dat mass1=1.25 mass2=1.25 \
r_peri=0.0625 eccent=1.0 t_peri=2.0 nsteps=32k
cat r121/i121[ab].dat | csf - - exclude=History | \
snapcons - r121/i121.dat produce=Position,Velocity,Mass \
frame=r121/orbit.dat
r122/i122.dat:
$(MAKE) -f InitialData testdisks_02a OUT=r122/i122a.dat \
NDISK=256k SEED=12101
$(MAKE) -f InitialData testdisks_02a OUT=r122/i122b.dat \
NDISK=256k SEED=12102
kepsnap out=r122/orbit.dat mass1=1.25 mass2=1.25 \
r_peri=0.1250 eccent=1.0 t_peri=2.0 nsteps=32k
cat r122/i122[ab].dat | csf - - exclude=History | \
snapcons - r122/i122.dat produce=Position,Velocity,Mass \
frame=r122/orbit.dat
r123/i123.dat:
$(MAKE) -f InitialData testdisks_02a OUT=r123/i123a.dat \
NDISK=256k SEED=12101
$(MAKE) -f InitialData testdisks_02a OUT=r123/i123b.dat \
NDISK=256k SEED=12102
kepsnap out=r123/orbit.dat mass1=1.25 mass2=1.25 \
r_peri=0.1875 eccent=1.0 t_peri=2.0 nsteps=32k
cat r123/i123[ab].dat | csf - - exclude=History | \
snapcons - r123/i123.dat produce=Position,Velocity,Mass \
frame=r123/orbit.dat
r124/i124.dat:
$(MAKE) -f InitialData testdisks_02a OUT=r124/i124a.dat \
NDISK=256k SEED=12101
$(MAKE) -f InitialData testdisks_02a OUT=r124/i124b.dat \
NDISK=256k SEED=12102
kepsnap out=r124/orbit.dat mass1=1.25 mass2=1.25 \
r_peri=0.2500 eccent=1.0 t_peri=2.0 nsteps=32k
cat r124/i124[ab].dat | csf - - exclude=History | \
snapcons - r124/i124.dat produce=Position,Velocity,Mass \
frame=r124/orbit.dat
r124m/i124.dat:
$(MAKE) -f InitialData testdisks_02a OUT=r124m/i124a.dat \
NDISK=256k SEED=12101
$(MAKE) -f InitialData testdisks_02a OUT=r124m/i124b.dat \
NDISK=256k SEED=12102
kepsnap out=r124m/orbit.dat mass1=1.25 mass2=1.25 \
r_peri=0.2500 eccent=1.0 t_peri=2.0 nsteps=32k
cat r124m/i124[ab].dat | csf - - exclude=History | \
snapcons - r124m/i124.dat produce=Position,Velocity,Mass \
frame=r124m/orbit.dat
r125/i125.dat:
$(MAKE) -f InitialData testdisks_02a OUT=r125/i125a.dat \
NDISK=256k SEED=12101
$(MAKE) -f InitialData testdisks_02a OUT=r125/i125b.dat \
NDISK=256k SEED=12102
kepsnap out=r125/orbit.dat mass1=1.25 mass2=1.25 \
r_peri=0.3125 eccent=1.0 t_peri=2.0 nsteps=32k
cat r125/i125[ab].dat | csf - - exclude=History | \
snapcons - r125/i125.dat produce=Position,Velocity,Mass \
frame=r125/orbit.dat
r126/i126.dat:
$(MAKE) -f InitialData testdisks_02a OUT=r126/i126a.dat \
NDISK=256k SEED=12101
$(MAKE) -f InitialData testdisks_02a OUT=r126/i126b.dat \
NDISK=256k SEED=12102
kepsnap out=r126/orbit.dat mass1=1.25 mass2=1.25 \
r_peri=0.3750 eccent=1.0 t_peri=2.0 nsteps=32k
cat r126/i126[ab].dat | csf - - exclude=History | \
snapcons - r126/i126.dat produce=Position,Velocity,Mass \
frame=r126/orbit.dat
r127/i127.dat:
$(MAKE) -f InitialData testdisks_02a OUT=r127/i127a.dat \
NDISK=256k SEED=12101
$(MAKE) -f InitialData testdisks_02a OUT=r127/i127b.dat \
NDISK=256k SEED=12102
kepsnap out=r127/orbit.dat mass1=1.25 mass2=1.25 \
r_peri=0.4375 eccent=1.0 t_peri=2.0 nsteps=32k
cat r127/i127[ab].dat | csf - - exclude=History | \
snapcons - r127/i127.dat produce=Position,Velocity,Mass \
frame=r127/orbit.dat
r128/i128.dat:
$(MAKE) -f InitialData testdisks_02a OUT=r128/i128a.dat \
NDISK=256k SEED=12101
$(MAKE) -f InitialData testdisks_02a OUT=r128/i128b.dat \
NDISK=256k SEED=12102
kepsnap out=r128/orbit.dat mass1=1.25 mass2=1.25 \
r_peri=0.5000 eccent=1.0 t_peri=2.0 nsteps=32k
cat r128/i128[ab].dat | csf - - exclude=History | \
snapcons - r128/i128.dat produce=Position,Velocity,Mass \
frame=r128/orbit.dat
r129/i129.dat:
$(MAKE) -f InitialData testdisks_02a OUT=r129/i129a.dat \
NDISK=256k SEED=12101
$(MAKE) -f InitialData testdisks_02a OUT=r129/i129b.dat \
NDISK=256k SEED=12102
kepsnap out=r129/orbit.dat mass1=1.25 mass2=1.25 \
r_peri=0.5625 eccent=1.0 t_peri=2.0 nsteps=32k
cat r129/i129[ab].dat | csf - - exclude=History | \
snapcons - r129/i129.dat produce=Position,Velocity,Mass \
frame=r129/orbit.dat
r1210/i1210.dat:
$(MAKE) -f InitialData testdisks_02a OUT=r1210/i1210a.dat \
NDISK=256k SEED=12101
$(MAKE) -f InitialData testdisks_02a OUT=r1210/i1210b.dat \
NDISK=256k SEED=12102
kepsnap out=r1210/orbit.dat mass1=1.25 mass2=1.25 \
r_peri=0.6250 eccent=1.0 t_peri=2.0 nsteps=32k
cat r1210/i1210[ab].dat | csf - - exclude=History | \
snapcons - r1210/i1210.dat produce=Position,Velocity,Mass \
frame=r1210/orbit.dat
r1211/i1211.dat:
$(MAKE) -f InitialData testdisks_02a OUT=r1211/i1211a.dat \
NDISK=256k SEED=12101
$(MAKE) -f InitialData testdisks_02a OUT=r1211/i1211b.dat \
NDISK=256k SEED=12102
kepsnap out=r1211/orbit.dat mass1=1.25 mass2=1.25 \
r_peri=0.6875 eccent=1.0 t_peri=2.0 nsteps=32k
cat r1211/i1211[ab].dat | csf - - exclude=History | \
snapcons - r1211/i1211.dat produce=Position,Velocity,Mass \
frame=r1211/orbit.dat
r1212/i1212.dat:
$(MAKE) -f InitialData testdisks_02a OUT=r1212/i1212a.dat \
NDISK=256k SEED=12101
$(MAKE) -f InitialData testdisks_02a OUT=r1212/i1212b.dat \
NDISK=256k SEED=12102
kepsnap out=r1212/orbit.dat mass1=1.25 mass2=1.25 \
r_peri=0.7500 eccent=1.0 t_peri=2.0 nsteps=32k
cat r1212/i1212[ab].dat | csf - - exclude=History | \
snapcons - r1212/i1212.dat produce=Position,Velocity,Mass \
frame=r1212/orbit.dat
r1213/i1213.dat:
$(MAKE) -f InitialData testdisks_02a OUT=r1213/i1213a.dat \
NDISK=256k SEED=12101
$(MAKE) -f InitialData testdisks_02a OUT=r1213/i1213b.dat \
NDISK=256k SEED=12102
kepsnap out=r1213/orbit.dat mass1=1.25 mass2=1.25 \
r_peri=0.8125 eccent=1.0 t_peri=2.0 nsteps=32k
cat r1213/i1213[ab].dat | csf - - exclude=History | \
snapcons - r1213/i1213.dat produce=Position,Velocity,Mass \
frame=r1213/orbit.dat
r1214/i1214.dat:
$(MAKE) -f InitialData testdisks_02a OUT=r1214/i1214a.dat \
NDISK=256k SEED=12101
$(MAKE) -f InitialData testdisks_02a OUT=r1214/i1214b.dat \
NDISK=256k SEED=12102
kepsnap out=r1214/orbit.dat mass1=1.25 mass2=1.25 \
r_peri=0.8750 eccent=1.0 t_peri=2.0 nsteps=32k
cat r1214/i1214[ab].dat | csf - - exclude=History | \
snapcons - r1214/i1214.dat produce=Position,Velocity,Mass \
frame=r1214/orbit.dat
r1215/i1215.dat:
$(MAKE) -f InitialData testdisks_02a OUT=r1215/i1215a.dat \
NDISK=256k SEED=12101
$(MAKE) -f InitialData testdisks_02a OUT=r1215/i1215b.dat \
NDISK=256k SEED=12102
kepsnap out=r1215/orbit.dat mass1=1.25 mass2=1.25 \
r_peri=0.9375 eccent=1.0 t_peri=2.0 nsteps=32k
cat r1215/i1215[ab].dat | csf - - exclude=History | \
snapcons - r1215/i1215.dat produce=Position,Velocity,Mass \
frame=r1215/orbit.dat
r1216/i1216.dat:
$(MAKE) -f InitialData testdisks_02a OUT=r1216/i1216a.dat \
NDISK=256k SEED=12101
$(MAKE) -f InitialData testdisks_02a OUT=r1216/i1216b.dat \
NDISK=256k SEED=12102
kepsnap out=r1216/orbit.dat mass1=1.25 mass2=1.25 \
r_peri=1.0000 eccent=1.0 t_peri=2.0 nsteps=32k
cat r1216/i1216[ab].dat | csf - - exclude=History | \
snapcons - r1216/i1216.dat produce=Position,Velocity,Mass \
frame=r1216/orbit.dat
########################################################################
jhat12X.dat: r121/i121a.dat r121/i121b.dat
cat r121/i121[ab].dat | csf - - exclude=History | \
snapcons - - | \
snapset - out=jhat12X.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(12.0 * 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"