Commit 671f46c6 authored by Rainer Weinberger's avatar Rainer Weinberger

Updated example reference solutions to cosmological simulaitons; resolves issue #2.

Updated documentation according to latest Config-option changes and fixed some typos.
Minor changes in examples/cosmo_box_gravity_only_3d/check.py and examples/cosmo_zoom_gravity_only_3d/check.py
Fixed runParent option in examples/cosmo_zoom_gravity_only_3d/create.py.
parent 5761afd4
......@@ -368,13 +368,6 @@ testing global energy conservation.
-----
**RANDOMIZE_DOMAINCENTER**
Random displacement to position of domain center; avoids correlated
force-errors, important mainly for isolated systems (which otherwise might
start to drift in some direction).
-----
TreePM
==============
......
This diff is collapsed.
4.222264453125000000e+14
1.860935937500000000e+14
9.680791992187500000e+13
9.419149414062500000e+13
8.993979492187500000e+13
8.568809570312500000e+13
4.160124218750000000e+14
1.795525195312500000e+14
1.772631445312500000e+14
1.000784570312500000e+14
8.961273437500000000e+13
8.372577148437500000e+13
7.293299316406250000e+13
6.671896972656250000e+13
6.606486328125000000e+13
6.148611328125000000e+13
6.115905761718750000e+13
4.578752929687500000e+13
4.088172363281250000e+13
3.957350830078125000e+13
3.761118408203125000e+13
3.630297119140625000e+13
7.031656250000000000e+13
6.410254394531250000e+13
6.344843261718750000e+13
6.181316406250000000e+13
5.723441406250000000e+13
4.349815429687500000e+13
4.120877441406250000e+13
3.990056152343750000e+13
3.728413085937500000e+13
3.139716308593750000e+13
2.878073242187500000e+13
2.420197998046875000e+13
3.074305664062500000e+13
2.387492675781250000e+13
2.354787353515625000e+13
2.256671142578125000e+13
2.289376464843750000e+13
2.223965820312500000e+13
2.191260253906250000e+13
2.093144287109375000e+13
2.093144287109375000e+13
2.223965820312500000e+13
2.060438720703125000e+13
2.060438720703125000e+13
2.027733520507812500e+13
1.995028076171875000e+13
1.962322753906250000e+13
1.962322753906250000e+13
1.929617309570312500e+13
1.929617309570312500e+13
1.929617309570312500e+13
1.896911987304687500e+13
1.831501220703125000e+13
1.831501220703125000e+13
1.733385009765625000e+13
1.733385009765625000e+13
1.896911987304687500e+13
1.864206542968750000e+13
1.798795776367187500e+13
1.733385009765625000e+13
1.700679687500000000e+13
1.700679687500000000e+13
1.667974243164062500e+13
1.602563598632812500e+13
1.602563598632812500e+13
1.602563598632812500e+13
1.569858154296875000e+13
1.537152832031250000e+13
1.504447387695312500e+13
1.504447387695312500e+13
1.373625854492187500e+13
1.275509765625000000e+13
1.471742065429687500e+13
1.471742065429687500e+13
1.439036621093750000e+13
1.308215087890625000e+13
1.275509765625000000e+13
1.242804321289062500e+13
1.242804321289062500e+13
1.210098999023437500e+13
1.210098999023437500e+13
1.144688232421875000e+13
1.144688232421875000e+13
1.144688232421875000e+13
1.111982910156250000e+13
1.111982910156250000e+13
1.111982910156250000e+13
1.046572143554687500e+13
1.079277465820312500e+13
1.079277465820312500e+13
1.046572143554687500e+13
1.046572143554687500e+13
1.046572143554687500e+13
1.040031054687500000e+14
6.868129394531250000e+13
6.606486328125000000e+13
5.429092773437500000e+13
3.663002441406250000e+13
3.466770019531250000e+13
2.976189453125000000e+13
2.910778564453125000e+13
2.845367919921875000e+13
7.195183105468750000e+13
7.129772460937500000e+13
5.396387207031250000e+13
3.859234619140625000e+13
3.368654052734375000e+13
3.335948486328125000e+13
2.943484130859375000e+13
2.616430175781250000e+13
2.191260253906250000e+13
2.060438720703125000e+13
2.093144287109375000e+13
2.027733520507812500e+13
1.929617309570312500e+13
1.896911987304687500e+13
1.700679687500000000e+13
1.635268920898437500e+13
1.504447387695312500e+13
1.504447387695312500e+13
1.504447387695312500e+13
1.733385009765625000e+13
1.504447387695312500e+13
1.308215087890625000e+13
1.275509765625000000e+13
1.242804321289062500e+13
1.242804321289062500e+13
1.210098999023437500e+13
1.210098999023437500e+13
1.177393676757812500e+13
1.144688232421875000e+13
1.111982910156250000e+13
1.079277465820312500e+13
1.046572143554687500e+13
1.046572143554687500e+13
......@@ -26,6 +26,7 @@ Redshifts = [1, 0]
status = 0
CompareAgainstReferenceRun = True ## comparison for small L50m32 box; deactivate this when comparing against self-created ICs
CreateReferenceSolution = False
makeplots = True
if len(sys.argv) > 2:
if sys.argv[2] == "True":
......@@ -51,6 +52,9 @@ for i_file, z in enumerate(Redshifts):
M200c = np.sort(M200c)[::-1]
CumMassFunction = np.cumsum(np.ones(M200c.shape) ) / Volume
if CreateReferenceSolution:
np.savetxt(simulation_directory+"/Masses_L50n32_z%.1d.txt"% z, M200c)
if CompareAgainstReferenceRun:
## comparison to reference run (sorted list of M200)
M200c_ref = np.loadtxt(simulation_directory+"/Masses_L50n32_z%.1d.txt"% z)
......
7.051804088933790625e+13
1.851817588029021729e+12
1.123913657112673340e+12
5.412134689182386475e+11
4.950123266868264771e+11
3.837524067169450684e+11
3.733807268978959961e+11
3.535802293253184204e+11
3.234080519336917725e+11
3.196365192008997192e+11
2.762640194798557739e+11
2.687209821711749268e+11
2.206340594949150696e+11
1.980049334904209290e+11
7.071604924389209375e+13
1.852760393780735596e+12
1.429407048232442139e+12
5.911861720393461914e+11
5.166986047042517700e+11
4.318393293932049561e+11
3.828095446514245605e+11
3.601804045684787598e+11
3.149221244025870972e+11
2.828641947230160522e+11
2.555206598417576599e+11
2.470347323106529846e+11
1.914047723257122803e+11
1.895190059593162537e+11
1.876332395929201965e+11
1.866903634489479980e+11
1.631183472220299988e+11
1.536895435469531250e+11
1.404892071390841675e+11
1.329461698304033508e+11
1.310604034640073090e+11
1.272888848096669006e+11
1.159743147681939850e+11
1.037168685827489014e+11
9.805958356201243591e+10
9.145942239730380249e+10
8.863077988693557739e+10
1.848045970825519714e+11
1.848045970825519714e+11
1.574610622012935486e+11
1.555752958348974915e+11
1.499180248926127319e+11
1.395463309951119995e+11
1.254031184432708588e+11
1.235173661553264923e+11
1.093741536034853516e+11
1.084312704202873230e+11
1.046597517659469147e+11
9.051653921410577393e+10
8.485925419336932373e+10
8.108773553902891541e+10
7.071604868075401306e+10
6.883028231435797119e+10
6.411588047681954193e+10
6.128723796645131683e+10
6.034436182247913361e+10
5.657283612891287994e+10
5.562995646532778168e+10
5.468707680174267578e+10
5.468707680174267578e+10
4.902979178100621796e+10
6.317300433284735870e+10
5.751571931211090088e+10
5.374419361854465485e+10
5.280131395495954895e+10
5.280131395495954895e+10
4.620114927063799286e+10
4.620114927063799286e+10
4.525826960705288696e+10
4.431538994346778870e+10
4.431538994346778870e+10
4.431538994346778870e+10
4.242962709668466187e+10
4.337250676026976776e+10
4.337250676026976776e+10
4.148674743309955597e+10
4.054386776951445770e+10
4.054386776951445770e+10
4.054386776951445770e+10
4.054386776951445770e+10
3.960098458631643677e+10
3.865810492273133087e+10
3.865810492273133087e+10
3.771522525914622498e+10
3.771522525914622498e+10
3.677234559556112671e+10
3.677234559556112671e+10
3.488658274877799988e+10
3.582946241236310577e+10
3.582946241236310577e+10
3.394370308519289780e+10
3.300081990199487305e+10
3.300081990199487305e+10
3.205794023840977097e+10
3.111506057482466888e+10
3.111506057482466888e+10
3.111506057482466888e+10
3.017218091123956680e+10
3.017218091123956680e+10
2.922929948784800339e+10
2.922929948784800339e+10
2.828641806445643997e+10
2.828641806445643997e+10
2.734353840087133789e+10
2.734353840087133789e+10
2.828641806445643997e+10
2.828641806445643997e+10
2.734353840087133789e+10
2.640065697747977448e+10
2.640065697747977448e+10
2.640065697747977448e+10
2.545777731389467239e+10
2.545777731389467239e+10
2.451489589050310898e+10
2.451489589050310898e+10
2.357201622691800690e+10
2.357201622691800690e+10
2.357201622691800690e+10
2.357201622691800690e+10
2.357201622691800690e+10
2.262913480352644348e+10
2.168625338013488388e+10
1.980049229315821838e+10
1.980049229315821838e+10
1.885761262957311249e+10
2.262913480352644348e+10
2.262913480352644348e+10
2.074337371654977798e+10
2.074337371654977798e+10
2.074337371654977798e+10
2.074337371654977798e+10
2.074337371654977798e+10
1.064267082203092656e+14
2.644780184056226074e+12
1.144657073064578369e+12
7.891910914513154297e+11
6.977316690540117188e+11
3.865810492273132935e+11
3.507515868149501953e+11
3.450943017942137451e+11
2.847499470109604492e+11
2.423203093554370422e+11
2.055479707991017456e+11
1.923476484696844788e+11
1.734900270410790710e+11
1.725471508971068726e+11
1.536895435469531250e+11
1.338890459743755341e+11
1.058553240100014688e+14
2.891814888209975586e+12
1.243659560927466309e+12
8.834791563589874268e+11
6.487018843122313232e+11
4.488111844554143066e+11
3.771522596306881104e+11
3.347226219751646729e+11
2.555206598417576599e+11
2.460918420882291260e+11
2.017764521447613220e+11
1.810330784282115479e+11
1.772615597738711548e+11
1.555752958348974915e+11
1.282317609536390839e+11
1.254031184432708588e+11
1.159743147681939850e+11
1.037168685827489014e+11
9.805958356201243591e+10
9.711670037881442261e+10
7.825909302866067505e+10
1.056026279099190979e+11
9.994534288918264771e+10
9.334518172447399902e+10
8.485925419336932373e+10
8.391637804939714050e+10
8.297349486619911194e+10
8.108773553902891541e+10
7.825909302866067505e+10
7.731620984546266174e+10
7.260180800792422485e+10
7.165892482472621155e+10
7.165892482472621155e+10
7.731620984546266174e+10
7.071604868075401306e+10
6.600163980398974609e+10
6.788740617038579559e+10
6.694452298718776703e+10
6.411588047681954193e+10
6.317300433284735870e+10
6.223012114964933777e+10
5.657283612891287994e+10
5.562995646532778168e+10
5.374419361854465485e+10
5.280131395495954895e+10
5.280131395495954895e+10
5.280131395495954895e+10
4.997267144459132385e+10
4.997267144459132385e+10
4.902979178100621796e+10
6.128723796645131683e+10
5.845859897569600677e+10
5.468707680174267578e+10
4.620114927063799286e+10
4.337250676026976776e+10
4.242962709668466187e+10
4.525826960705288696e+10
4.148674743309955597e+10
4.148674743309955597e+10
3.960098458631643677e+10
3.771522525914622498e+10
3.771522525914622498e+10
3.677234559556112671e+10
3.771522525914622498e+10
3.677234559556112671e+10
3.582946241236310577e+10
3.488658274877799988e+10
3.394370308519289780e+10
3.394370308519289780e+10
3.300081990199487305e+10
3.300081990199487305e+10
3.205794023840977097e+10
3.111506057482466888e+10
3.017218091123956680e+10
3.017218091123956680e+10
2.922929948784800339e+10
2.922929948784800339e+10
2.922929948784800339e+10
2.922929948784800339e+10
2.828641806445643997e+10
2.828641806445643997e+10
2.734353840087133789e+10
2.734353840087133789e+10
2.734353840087133789e+10
2.734353840087133789e+10
2.640065697747977448e+10
2.640065697747977448e+10
2.545777731389467239e+10
2.545777731389467239e+10
2.451489589050310898e+10
2.451489589050310898e+10
2.451489589050310898e+10
2.451489589050310898e+10
2.357201622691800690e+10
2.262913480352644348e+10
2.168625338013488388e+10
2.168625338013488388e+10
2.168625338013488388e+10
2.168625338013488388e+10
2.168625338013488388e+10
2.168625338013488388e+10
2.074337371654977798e+10
1.980049229315821838e+10
1.980049229315821838e+10
2.074337371654977798e+10
2.074337371654977798e+10
1.980049229315821838e+10
1.885761262957311249e+10
1.885761262957311249e+10
4.187615763166150000e+13
1.683041955786255371e+12
1.614211617158090576e+12
7.005603115643798828e+11
6.515305268225994873e+11
5.242416138560292358e+11
4.112373669660650781e+13
1.670784467365455322e+12
1.475608134150047607e+12
8.014485235583088379e+11
5.911861720393461914e+11
5.063268967282993774e+11
4.101530795326829834e+11
3.828095446514245605e+11
2.724924867470636902e+11
2.611779448624941101e+11
2.366630243347005920e+11
2.281771108820475769e+11
2.140338983302064209e+11
2.988931595628015747e+11
2.536348793969099426e+11
2.394916668450688171e+11
2.046050946551295471e+11
2.036622185111573792e+11
1.546324196909253235e+11
1.404892071390841675e+11
1.188029572785622253e+11
1.140885554410237885e+11
1.027739853995508728e+11
9.145942239730380249e+10
9.051653921410577393e+10
7.260180800792422485e+10
6.883028231435797119e+10
6.883028231435797119e+10
6.883028231435797119e+10
1.197458334225344086e+11
1.008882260723806610e+11
8.768789670373754883e+10
8.108773553902891541e+10
6.411588047681954193e+10
6.317300433284735870e+10
6.317300433284735870e+10
6.223012114964933777e+10
5.940147863928111267e+10
5.845859897569600677e+10
5.374419361854465485e+10
5.751571931211090088e+10
5.091555462778934479e+10
5.091555462778934479e+10
4.902979178100621796e+10
4.902979178100621796e+10
5.091555462778934479e+10
4.808691211742111969e+10
4.714403245383601379e+10
4.714403245383601379e+10
4.431538994346778870e+10
4.337250676026976776e+10
4.337250676026976776e+10
4.242962709668466187e+10
4.714403245383601379e+10
4.620114927063799286e+10
4.525826960705288696e+10
4.148674743309955597e+10
4.148674743309955597e+10
4.054386776951445770e+10
3.960098458631643677e+10
3.865810492273133087e+10
3.771522525914622498e+10
3.582946241236310577e+10
3.488658274877799988e+10
3.488658274877799988e+10
3.394370308519289780e+10
3.300081990199487305e+10
3.205794023840977097e+10
3.205794023840977097e+10
3.111506057482466888e+10
3.111506057482466888e+10
3.111506057482466888e+10
3.111506057482466888e+10
3.017218091123956680e+10
2.922929948784800339e+10
2.828641806445643997e+10
2.734353840087133789e+10
2.734353840087133789e+10
2.640065697747977448e+10
2.640065697747977448e+10
2.545777731389467239e+10
2.545777731389467239e+10
2.640065697747977448e+10
2.451489589050310898e+10
2.357201622691800690e+10
2.357201622691800690e+10
2.262913480352644348e+10
2.262913480352644348e+10
2.262913480352644348e+10
2.262913480352644348e+10
1.885761262957311249e+10
2.168625338013488388e+10
2.168625338013488388e+10
2.168625338013488388e+10
2.074337371654977798e+10
1.499840212952326953e+13
2.762640194798557739e+11
1.527466533245292664e+11
1.414320973615080261e+11
1.301175273200351257e+11
1.301175273200351257e+11
1.467688002697584570e+13
3.677234418771595459e+11
1.678327560987942810e+11
1.310604034640073090e+11
1.216315997889304504e+11
8.863077988693557739e+10
8.768789670373754883e+10
8.674501352053953552e+10
7.920196917263287354e+10
6.505876366001756287e+10
5.845859897569600677e+10
5.657283612891287994e+10
4.431538994346778870e+10
3.771522525914622498e+10
1.131456722578257599e+11
9.994534288918264771e+10
9.805958356201243591e+10
8.391637804939714050e+10
7.448756733509443665e+10
7.165892482472621155e+10
6.977316549755599976e+10
6.883028231435797119e+10
6.600163980398974609e+10
4.148674743309955597e+10
3.865810492273133087e+10
3.582946241236310577e+10
3.582946241236310577e+10
3.300081990199487305e+10
3.017218091123956680e+10
3.111506057482466888e+10
2.922929948784800339e+10
2.922929948784800339e+10
2.828641806445643997e+10
2.640065697747977448e+10
2.262913480352644348e+10
1.885761262957311249e+10
2.734353840087133789e+10
1.980049229315821838e+10
7.730678291422166016e+12
3.252938042216361694e+11
8.957365603090776062e+10
8.108773553902891541e+10
8.014485235583088684e+10
6.600163980398974609e+10
4.242962709668466187e+10
3.111506057482466888e+10
7.638275894331727539e+12
3.111505916697949829e+11
7.637332666226463318e+10
7.260180800792422485e+10
6.223012114964933777e+10
5.751571931211090088e+10
4.902979178100621796e+10
2.828641806445643997e+10
2.357201622691800690e+10
2.168625338013488388e+10
1.885761262957311249e+10
2.757925884470955078e+12
2.489204845985973511e+11
3.677234559556112671e+10
2.545777731389467239e+10
1.885761262957311249e+10
2.895586336472057617e+12
3.149221244025870972e+11
4.148674743309955597e+10
2.357201622691800690e+10
......@@ -88,7 +88,7 @@ for i_file, z in enumerate(Redshifts):
cont_dist += (pos2[:,1] - GrpPos[0,1])**2
cont_dist += (pos2[:,2] - GrpPos[0,2])**2
cont_dist = np.sqrt(cont_dist)
print('minimum distance of contaminating (low-res) particle: %g'%np.min(cont_dist) )
print('minimum distance of contaminating (low-res) particle: %g Mpc'%np.min(cont_dist) )
i_issue = np.where(cont_dist < GrpR200c[0])[0]
if len(i_issue) > 0:
......@@ -108,8 +108,8 @@ for i_file, z in enumerate(Redshifts):
particle_select = np.where( (pos[:,2]>zpos-2.5) & (pos[:,2]<zpos+2.5) )[0]
particle2_select = np.where( (pos2[:,2]>zpos-2.5) & (pos2[:,2]<zpos+2.5) )[0]
ax.scatter(pos[particle_select, 0], pos[particle_select, 1], marker='.', s=0.05, alpha=0.5)
ax.scatter(pos2[particle2_select, 0],pos2[particle2_select,1], marker='.', s=0.05, c='r', alpha=0.5)
ax.scatter(pos[particle_select, 0], pos[particle_select, 1], marker='.', s=0.05, alpha=0.5, rasterized=True)
ax.scatter(pos2[particle2_select, 0],pos2[particle2_select,1], marker='.', s=5, c='r', alpha=0.5, rasterized=True)
if i_file != 0:
......
......@@ -2,7 +2,7 @@
Code that creates ics and outuput list for a cosmological zoom
simulaiton;
created by Rainer Weinberger, last modified 05.03.2019
created by Rainer Weinberger, last modified 12.08.2019
"""
""" load libraries """
......@@ -50,7 +50,7 @@ else:
sys.exit(status)
cwd = os.getcwd()
os.chdir(simulation_directory+'/music/')
status = call(['make'])
status = call(['make','-j'])
if status != 0:
print('CREATE: ERROR: make failed!')
sys.exit(status)
......@@ -59,29 +59,34 @@ os.chdir(cwd)
if runParent:
""" parent simulation """
# execute ic generating code for parent box ICs (change working directory to do this)