diff --git a/examples/galaxy_merger_star_formation_3d/Config.sh b/examples/galaxy_merger_star_formation_3d/Config.sh new file mode 100755 index 0000000000000000000000000000000000000000..8006d6d89faa857a2521df4661af115fa25453d2 --- /dev/null +++ b/examples/galaxy_merger_star_formation_3d/Config.sh @@ -0,0 +1,63 @@ +#!/bin/bash # this line only there to enable syntax highlighting in this file + +######################################################### +# Enable/Disable compile-time options as needed # +# examples/galaxy_merger_star_formation_3d/Config.sh # +######################################################### + + +#--------------------------------------- Mesh motion and regularization +REGULARIZE_MESH_CM_DRIFT # Mesh regularization; Move mesh generating point towards center of mass to make cells rounder. +REGULARIZE_MESH_CM_DRIFT_USE_SOUNDSPEED # Limit mesh regularization speed by local sound speed +REGULARIZE_MESH_FACE_ANGLE # Use maximum face angle as roundness criterion in mesh regularization + + +#--------------------------------------- Refinement and derefinement +REFINEMENT_SPLIT_CELLS # Refinement +REFINEMENT_MERGE_CELLS # Derefinement +REFINEMENT_VOLUME_LIMIT # Limit the volume of cells and the maximum volume difference between neighboring cels +NODEREFINE_BACKGROUND_GRID # Do not de-refine low-res gas cells in zoom simulations + + +#--------------------------------------- Time integration options +TREE_BASED_TIMESTEPS # non-local timestep criterion (take 'signal speed' into account) + + +#--------------------------------------- Gravity treatment +SELFGRAVITY # gravitational intraction between simulation particles/cells +HIERARCHICAL_GRAVITY # use hierarchical splitting of the time integration of the gravity +CELL_CENTER_GRAVITY # uses geometric centers to calculate gravity of cells, only possible with HIERARCHICAL_GRAVITY +ALLOW_DIRECT_SUMMATION # Performed direct summation instead of tree-based gravity if number of active particles < DIRECT_SUMMATION_THRESHOLD (= 3000 unless specified differently here) +DIRECT_SUMMATION_THRESHOLD=500 # Overrides maximum number of active particles for which direct summation is performed instead of tree based calculation +GRAVITY_NOT_PERIODIC # gravity is not treated periodically +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). + + +#--------------------------------------- Gravity softening +NSOFTTYPES=2 # Number of different softening values to which particle types can be mapped. +MULTIPLE_NODE_SOFTENING # If a tree node is to be used which is softened, this is done with the softenings of its different mass components +INDIVIDUAL_GRAVITY_SOFTENING=32 # bitmask with particle types where the softenig type should be chosen with that of parttype 1 as a reference type +ADAPTIVE_HYDRO_SOFTENING # Adaptive softening of gas cells depending on their size + + +#--------------------------------------- Single/Double Precision +DOUBLEPRECISION=1 # Mode of double precision: not defined: single; 1: full double precision 2: mixed, 3: mixed, fewer single precisions; unless short of memory, use 1. +NGB_TREE_DOUBLEPRECISION # if this is enabled, double precision is used for the neighbor node extension + + +#-------------------------------------------- Things for special behaviour +PROCESS_TIMES_OF_OUTPUTLIST # goes through times of output list prior to starting the simulaiton to ensure that outputs are written as close to the desired time as possible (as opposed to at next possible time if this flag is not active) + + +#--------------------------------------- Output/Input options +HAVE_HDF5 # needed when HDF5 I/O support is desired (recommended) + + +#--------------------------------------- Testing and Debugging options +DEBUG # enables core-dumps + + +#--------------------------------------- non-standard phyiscs +ENFORCE_JEANS_STABILITY_OF_CELLS # this imposes an adaptive floor for the temperature +COOLING # Simple primordial cooling +USE_SFR # Star formation model, turning dense gas into collisionless partices diff --git a/examples/galaxy_merger_star_formation_3d/Config_ADDBACKGROUNDGRID.sh b/examples/galaxy_merger_star_formation_3d/Config_ADDBACKGROUNDGRID.sh new file mode 100755 index 0000000000000000000000000000000000000000..bda330cea5e7fd73da6421e97b4572dd027d7bd6 --- /dev/null +++ b/examples/galaxy_merger_star_formation_3d/Config_ADDBACKGROUNDGRID.sh @@ -0,0 +1,23 @@ +#!/bin/bash # this line only there to enable syntax highlighting in this file + +########################################################################## +# Enable/Disable compile-time options as needed # +# examples/galaxy_merger_star_formation_3d/Config_ADDBACKGROUNDGRID.sh # +########################################################################## + + +#--------------------------------------- Basic operation mode of code +ADDBACKGROUNDGRID=16 # Re-grid hydrodynamics quantities on a Oct-tree AMR grid. This does not perform a simulation. + + +#--------------------------------------- Mesh motion and regularization +REGULARIZE_MESH_FACE_ANGLE # Use maximum face angle as roundness criterion in mesh regularization + + +#--------------------------------------- Gravity softening +NSOFTTYPES=2 # Number of different softening values to which particle types can be mapped. + + +#--------------------------------------- output options +HAVE_HDF5 # needed when HDF5 I/O support is desired (recommended) + diff --git a/examples/galaxy_merger_star_formation_3d/ICs_1_1_merger_30_15_45_0_rmin10_start320_lowres.dat b/examples/galaxy_merger_star_formation_3d/ICs_1_1_merger_30_15_45_0_rmin10_start320_lowres.dat new file mode 100644 index 0000000000000000000000000000000000000000..078e47b1c16a792864a2f8e2bcc131ad66a666a3 Binary files /dev/null and b/examples/galaxy_merger_star_formation_3d/ICs_1_1_merger_30_15_45_0_rmin10_start320_lowres.dat differ diff --git a/examples/galaxy_merger_star_formation_3d/check.py b/examples/galaxy_merger_star_formation_3d/check.py new file mode 100644 index 0000000000000000000000000000000000000000..0ff44dc803cf493e676b15b2aa52e7dd4e16ffcb --- /dev/null +++ b/examples/galaxy_merger_star_formation_3d/check.py @@ -0,0 +1,171 @@ +""" @package ./examples/galaxy_merger_star_formation_3d/check.py +Code that checks results of 3d galaxy merger problem + +created by Rainer Weinberger, last modified 09.03.2019 +""" + + +""" load libraries """ +import sys ## system calls +import numpy as np ## load numpy +import h5py ## load h5py; needed to read snapshots +import matplotlib.pyplot as plt ## plot stuff +from scipy.interpolate import interp1d ## inetrpolation + +simulation_directory = str(sys.argv[1]) +print("examples/galaxy_merger_star_formation_3d/check.py: checking simulation output in directory " + simulation_directory) + +createReferenceSolution = False +createFigures = False + +FloatType = np.float64 # double precision: np.float64, for single use np.float32 +Gcgs = 6.6738e-8 + + +""" compare to reference output """ +data = np.loadtxt(simulation_directory+"/output/sfr.txt") +if createReferenceSolution: + np.savetxt("./examples/galaxy_merger_star_formation_3d/sfr_reduced_ref.txt", data[::50,:]) + +data_ref = np.loadtxt("./examples/galaxy_merger_star_formation_3d/sfr_reduced_ref.txt") +time_ref = data_ref[:,0] +mstar_ref = data_ref[:,5] + +time = data[:,0] +mstar = data[:,5] + +time_probe = np.linspace(0.5,2.8,10) +delta_mass_stars = np.zeros(time_probe.shape) +avg_mass_stars = np.zeros(time_probe.shape) + +for i, t in enumerate(time_probe): + delta_mass_stars[i] = np.interp(t, time, mstar) + delta_mass_stars[i] -= np.interp(t, time_ref, mstar_ref) + avg_mass_stars[i] = 0.5 * np.interp(t, time, mstar) + avg_mass_stars[i] += 0.5 * np.interp(t, time_ref, mstar_ref) + + +if createFigures: + fig, ax = plt.subplots(2,3, figsize=np.array([6.9,5.35]), sharex=True, sharey=True ) + fig.subplots_adjust(hspace=0.0, wspace=0.0, left=0.1,right=0.98, bottom=0.1, top=0.98) + + ax[0, 0].set_xticks([300,320,340]) + ax[0, 0].set_yticks([300,325,350]) + +for i_plot, i_snap in enumerate([10,11,12,21,22,24]): + filename = '/output/snap_%03d.hdf5'%i_snap + print(simulation_directory+filename) + try: + data = h5py.File(simulation_directory+filename, "r") + except: + break + ## figure + pos1 = np.array( data['PartType1']['Coordinates'], dtype=np.float64 ) + pos2 = np.array( data['PartType2']['Coordinates'], dtype=np.float64 ) + pos3 = np.array( data['PartType3']['Coordinates'], dtype=np.float64 ) + pos4 = np.array( data['PartType4']['Coordinates'], dtype=np.float64 ) + + ix = np.int(i_plot % 3) + iy = np.int(i_plot / 3) + + if createFigures: + ax[iy,ix].scatter(pos2[:, 0], pos2[:, 1], marker='.', c='k', s=0.05, alpha=0.5, rasterized=True, zorder=2) + ax[iy,ix].scatter(pos3[:, 0], pos3[:, 1], marker='.', c='k', s=0.05, alpha=0.5, rasterized=True, zorder=2) + ax[iy,ix].scatter(pos4[:, 0], pos4[:, 1], marker='.', c='red', s=0.05, alpha=0.2, rasterized=True, zorder=3) + ax[iy,ix].set_aspect('equal') + ax[iy,ix].set_xlim([295,355]) + ax[iy,ix].set_ylim([290,360]) + + +if createFigures: + ## trajectory + filename = '/output/snap_%03d.hdf5'%0 + data = h5py.File(simulation_directory+filename, "r") + pos2 = np.array( data['PartType2']['Coordinates'], dtype=np.float64 ) + ids2 = np.array( data['PartType2']['ParticleIDs'], dtype=np.int32 ) + i_gal1 = np.where(pos2[:,0] < 320)[0] + i_gal2 = np.where(pos2[:,0] > 330)[0] + id_gal1 = ids2[i_gal1] + id_gal2 = ids2[i_gal2] + + + pos_gal1 = np.zeros([32,3], dtype=np.float64) + pos_gal2 = np.zeros([32,3], dtype=np.float64) + + for i_snap in np.arange(32): + filename = '/output/snap_%03d.hdf5'%i_snap + try: + data = h5py.File(simulation_directory+filename, "r") + except: + break + pos2 = np.array( data['PartType2']['Coordinates'], dtype=np.float64 ) + ids2 = np.array( data['PartType2']['ParticleIDs'], dtype=np.int32 ) + ids, i_gal1, dummy = np.intersect1d(ids2, id_gal1, return_indices=True) + ids, i_gal2, dummy = np.intersect1d(ids2, id_gal2, return_indices=True) + + pos_gal1[i_snap,:] = np.average(pos2[i_gal1,:], axis=0) + pos_gal2[i_snap,:] = np.average(pos2[i_gal2,:], axis=0) + + p1x = interp1d(np.arange(32), pos_gal1[:,0], kind='cubic') + p1y = interp1d(np.arange(32), pos_gal1[:,1], kind='cubic') + p2x = interp1d(np.arange(32), pos_gal2[:,0], kind='cubic') + p2y = interp1d(np.arange(32), pos_gal2[:,1], kind='cubic') + + + interp = np.linspace(0,10,1000) + ax[0,0].plot(p1x(interp), p1y(interp), 'b:', alpha=0.5, lw=4, zorder=1) + ax[0,0].plot(p2x(interp), p2y(interp), 'b--', alpha=0.5, lw=4, zorder=1) + + interp = np.linspace(0,11,1000) + ax[0,1].plot(p1x(interp), p1y(interp), 'b:', alpha=0.5, lw=4, zorder=1) + ax[0,1].plot(p2x(interp), p2y(interp), 'b--', alpha=0.5, lw=4, zorder=1) + + interp = np.linspace(0,12,1000) + ax[0,2].plot(p1x(interp), p1y(interp), 'b:', alpha=0.5, lw=4, zorder=1) + ax[0,2].plot(p2x(interp), p2y(interp), 'b--', alpha=0.5, lw=4, zorder=1) + + interp = np.linspace(11,21,1000) + ax[1,0].plot(p1x(interp), p1y(interp), 'b:', alpha=0.5, lw=4, zorder=1) + ax[1,0].plot(p2x(interp), p2y(interp), 'b--', alpha=0.5, lw=4, zorder=1) + + interp = np.linspace(12,22,1000) + ax[1,1].plot(p1x(interp), p1y(interp), 'b:', alpha=0.5, lw=4, zorder=1) + ax[1,1].plot(p2x(interp), p2y(interp), 'b--', alpha=0.5, lw=4, zorder=1) + + interp = np.linspace(14,24,1000) + ax[1,2].plot(p1x(interp), p1y(interp), 'b:', alpha=0.5, lw=4, zorder=1) + ax[1,2].plot(p2x(interp), p2y(interp), 'b--', alpha=0.5, lw=4, zorder=1) + + ax[0,0].set_ylabel("[kpc]") + ax[1,0].set_ylabel("[kpc]") + ax[1,0].set_xlabel("[kpc]") + ax[1,1].set_xlabel("[kpc]") + ax[1,2].set_xlabel("[kpc]") + + fig.savefig(simulation_directory+'./stars_evolution.pdf') + + """ figure -- optional """ + fig=plt.figure() + ax = plt.axes([0.15,0.15,0.8,0.8]) + ax.plot(time, mstar * 1e10/0.6774, label="new") + ax.plot(time_ref, mstar_ref * 1e10/0.6774, label="ref") + ax.set_xlabel(r"time") + ax.set_ylabel(r"Stellar mass formed [M$_\odot$]") + ax.legend(loc=2) + fig.savefig(simulation_directory+"./Mstar_time.pdf") + + +""" check if deviations within tolerance """ +abs_tolerance = 3.e8 / (1.e10 / 0.6774) +if np.max( np.abs(delta_mass_stars ) ) > abs_tolerance: + print("Error: stellar mass deviaties from reference more than %g (Msun/Mpc^3): "% abs_tolerance ) + print("times:") + print(time_probe) + print("relative deviation:") + print(delta_mass_stars / avg_mass_stars) + print("absolute deviation (1e6 Msun):") + print(delta_mass_stars*1.0e4/0.6774) + sys.exit(1) + +""" if everything is ok """ +sys.exit(0) diff --git a/examples/galaxy_merger_star_formation_3d/create.py b/examples/galaxy_merger_star_formation_3d/create.py new file mode 100644 index 0000000000000000000000000000000000000000..467c9dd2b66ee8ae46da5f34600789620b2f28f8 --- /dev/null +++ b/examples/galaxy_merger_star_formation_3d/create.py @@ -0,0 +1,61 @@ +""" @package examples/galaxy_merger_star_formation_3d/create.py +Code creates the output list; ICs need to be present already +galaxy_merger_star_formation_3d uses MakeNewDisk and CombineGalaxies codes +to create the initial conditions + +created by Rainer Weinberger, last modified 09.03.2019 +""" + + +""" load libraries """ +import sys # system calls +import numpy as np # scientific computing package +import h5py # hdf5 format +from subprocess import call # execute shell commands + + +""" input """ +simulation_directory = str(sys.argv[1]) +print("examples/collisionless_galaxy_3d/create.py " + simulation_directory) + + +""" set output times """ +outputTimes = np.linspace(0.0,3.0,32, dtype=np.float64) +ones = np.ones(outputTimes.shape, dtype=np.int) + + +""" write output list file """ +data = np.array([outputTimes, ones]).T +np.savetxt(simulation_directory+"/output_list.txt",data, fmt="%g %1.f" ) + + +""" create backgroundgrid ICs from SPH ICs """ +## compile Arepo with ADDBACKGROUNDGRID +res = call(["make", "CONFIG=./examples/galaxy_merger_star_formation_3d/Config_ADDBACKGROUNDGRID.sh", \ + "BUILD_DIR=./run/examples/galaxy_merger_star_formation_3d/build_ADDBACKGROUNDGRID", \ + "EXEC=./run/examples/galaxy_merger_star_formation_3d/Arepo_ADDBACKGRUNDGRID"]) +if res != 0: + sys.exit( np.int(res) ) + +## copy ICs to run directory +res = call(["cp", "./examples/galaxy_merger_star_formation_3d/ICs_1_1_merger_30_15_45_0_rmin10_start320_lowres.dat", \ + "./run/examples/galaxy_merger_star_formation_3d/"]) +if res != 0: + sys.exit( np.int(res) ) + +## execute Arepo with ADDBACKGROUNDGRID +res = call(["mpiexec", "-np", "1","./run/examples/galaxy_merger_star_formation_3d/Arepo_ADDBACKGRUNDGRID", "./examples/galaxy_merger_star_formation_3d/param_ADDBACKGROUNDGRID.txt"]) +if res != 0: + sys.exit( np.int(res) ) + +## clean up +res = call(["make", "CONFIG=./examples/galaxy_merger_star_formation_3d/Config_ADDBACKGROUNDGRID.sh", "clean"]) +if res != 0: + sys.exit( np.int(res) ) +res = call(["rm", "./examples/galaxy_merger_star_formation_3d/param_ADDBACKGROUNDGRID.txt-usedvalues"]) +if res != 0: + sys.exit( np.int(res) ) + + +""" normal exit """ +sys.exit(0) diff --git a/examples/galaxy_merger_star_formation_3d/param.txt b/examples/galaxy_merger_star_formation_3d/param.txt new file mode 100644 index 0000000000000000000000000000000000000000..793a94e94f755ffe74646a0e449b7a4588c8681f --- /dev/null +++ b/examples/galaxy_merger_star_formation_3d/param.txt @@ -0,0 +1,122 @@ +%---- Relevant files +InitCondFile run/examples/galaxy_merger_star_formation_3d/ICs_1_1_merger_30_15_45_0_rmin10_start320_lowres.dat-with-grid +OutputDir run/examples/galaxy_merger_star_formation_3d/output +SnapshotFileBase snap +OutputListFilename run/examples/galaxy_merger_star_formation_3d/output_list.txt + +%---- File formats +ICFormat 3 +SnapFormat 3 + +%---- CPU-time limits +TimeLimitCPU 93000 +CpuTimeBetRestartFile 12000 +ResubmitOn 0 +ResubmitCommand my-scriptfile + +%----- Memory alloction +MaxMemSize 2500 + +%---- Caracteristics of run +TimeBegin 0.0 +TimeMax 3.0 % End of the simulation + +%---- Basic code options that set the type of simulation +ComovingIntegrationOn 0 +PeriodicBoundariesOn 0 +CoolingOn 1 +StarformationOn 1 + +%---- Cosmological parameters (Planck cosmology) +Omega0 0.0 +OmegaLambda 0.0 +OmegaBaryon 0.0 %0.0486 +HubbleParam 0.6774 +BoxSize 649.201 + +%---- Output frequency and output parameters +OutputListOn 1 +TimeBetSnapshot 0.0 +TimeOfFirstSnapshot 0.0 +TimeBetStatistics 0.0234375 +NumFilesPerSnapshot 1 +NumFilesWrittenInParallel 1 + +%---- Accuracy of time integration +TypeOfTimestepCriterion 0 +ErrTolIntAccuracy 0.012 +CourantFac 0.3 +MaxSizeTimestep 0.0234375 +MinSizeTimestep 2.0e-8 + + +%---- Treatment of empty space and temperature limits +InitGasTemp 244.8095 +MinGasTemp 5.0 +MinimumDensityOnStartUp 1.0e-10 %% very important for this setup! +LimitUBelowThisDensity 0.0 +LimitUBelowCertainDensityToThisValue 0.0 +MinEgySpec 0.0 + +%---- Tree algorithm, force accuracy, domain update frequency +TypeOfOpeningCriterion 1 +ErrTolTheta 0.7 +ErrTolForceAcc 0.0025 +MultipleDomains 8 +TopNodeFactor 2.5 +ActivePartFracForNewDomainDecomp 0.01 + +%---- Initial density estimate +DesNumNgb 64 +MaxNumNgbDeviation 4 + +%---- System of units +UnitLength_in_cm 3.085678e21 % 1.0 kpc +UnitMass_in_g 1.989e43 % 1.0e10 solar masses +UnitVelocity_in_cm_per_s 1e5 % 1 km/sec +GravityConstantInternal 0 + +%---- Gravitational softening lengths +SofteningComovingType0 2.0 +SofteningComovingType1 2.0 + +SofteningMaxPhysType0 2.0 +SofteningMaxPhysType1 2.0 + +GasSoftFactor 2.5 + +SofteningTypeOfPartType0 0 +SofteningTypeOfPartType1 1 +SofteningTypeOfPartType2 1 +SofteningTypeOfPartType3 1 +SofteningTypeOfPartType4 1 +SofteningTypeOfPartType5 1 + + +MinimumComovingHydroSoftening 1.0 +AdaptiveHydroSofteningSpacing 1.2 + +%----- Mesh regularization options +CellShapingSpeed 0.5 +CellMaxAngleFactor 2.25 +ReferenceGasPartMass 9.76211e-05 +TargetGasMassFactor 1 +RefinementCriterion 1 +DerefinementCriterion 1 +MeanVolume 66800.2 +MaxVolumeDiff 10 % avoid strong resolution gradients +MinVolume 1 +MaxVolume 1.0e9 % no limits + +%---- Parameters for star formation model +CritPhysDensity 0 % critical physical density for star formation (in cm^(-3)) +MaxSfrTimescale 2.27 % in internal time units +CritOverDensity 57.7 % overdensity threshold value +TempSupernova 5.73e7 % in Kelvin +TempClouds 1000.0 % in Kelvin +FactorEVP 573.0 +TemperatureThresh 1e+06 +FactorSN 0.1 + +TreecoolFile ./data/TREECOOL_ep + diff --git a/examples/galaxy_merger_star_formation_3d/param_ADDBACKGROUNDGRID.txt b/examples/galaxy_merger_star_formation_3d/param_ADDBACKGROUNDGRID.txt new file mode 100644 index 0000000000000000000000000000000000000000..7338ecb623941463123ca392b98476d62a6a3599 --- /dev/null +++ b/examples/galaxy_merger_star_formation_3d/param_ADDBACKGROUNDGRID.txt @@ -0,0 +1,100 @@ +%---- Relevant files +InitCondFile run/examples/galaxy_merger_star_formation_3d/ICs_1_1_merger_30_15_45_0_rmin10_start320_lowres.dat +OutputDir run/examples/galaxy_merger_star_formation_3d/output +SnapshotFileBase snap +OutputListFilename run/examples/galaxy_merger_star_formation_3d/output_list.txt + +%---- File formats +ICFormat 1 +SnapFormat 3 + +%---- CPU-time limits +TimeLimitCPU 93000 +CpuTimeBetRestartFile 12000 + +ResubmitOn 0 +ResubmitCommand my-scriptfile + +%----- Memory alloction +MaxMemSize 2500 + +%---- Caracteristics of run +TimeBegin 0.0 +TimeMax 1.0 % End of the simulation + +%---- Basic code options that set the type of simulation +ComovingIntegrationOn 0 +PeriodicBoundariesOn 1 +CoolingOn 0 +StarformationOn 0 + +%---- Cosmological parameters (Planck cosmology) +Omega0 0.3089 +OmegaLambda 0.6911 +OmegaBaryon 0.0 %0.0486 +HubbleParam 0.6774 +BoxSize 200.0 + +%---- Output frequency and output parameters +OutputListOn 0 +TimeBetSnapshot 0.0 +TimeOfFirstSnapshot 0.0 +TimeBetStatistics 0.01 +NumFilesPerSnapshot 1 +NumFilesWrittenInParallel 1 + +%---- Accuracy of time integration +TypeOfTimestepCriterion 0 +ErrTolIntAccuracy 0.012 +CourantFac 0.3 +MaxSizeTimestep 0.05 +MinSizeTimestep 2.0e-9 + + +%---- Treatment of empty space and temperature limits +InitGasTemp 244.8095 +MinGasTemp 5.0 +MinimumDensityOnStartUp 1.0e-20 +LimitUBelowThisDensity 0.0 +LimitUBelowCertainDensityToThisValue 0.0 +MinEgySpec 0.0 + +%---- Tree algorithm, force accuracy, domain update frequency +TypeOfOpeningCriterion 1 +ErrTolTheta 0.7 +ErrTolForceAcc 0.0025 +MultipleDomains 8 +TopNodeFactor 2.5 +ActivePartFracForNewDomainDecomp 0.01 + +%---- Initial density estimate +DesNumNgb 64 +MaxNumNgbDeviation 4 + +%---- System of units +UnitLength_in_cm 3.085678e21 % 1.0 kpc +UnitMass_in_g 1.989e43 % 1.0e10 solar masses +UnitVelocity_in_cm_per_s 1e5 % 1 km/sec +GravityConstantInternal 0 + +%---- Gravitational softening lengths +SofteningComovingType0 2.0 +SofteningComovingType1 2.0 + +SofteningMaxPhysType0 2.0 +SofteningMaxPhysType1 2.0 + +GasSoftFactor 2.5 + +SofteningTypeOfPartType0 0 +SofteningTypeOfPartType1 1 +SofteningTypeOfPartType2 1 +SofteningTypeOfPartType3 1 +SofteningTypeOfPartType4 1 +SofteningTypeOfPartType5 1 + +%----- Mesh regularization options +CellShapingSpeed 0.5 +CellMaxAngleFactor 2.25 + +GridSize 16 \ No newline at end of file diff --git a/examples/galaxy_merger_star_formation_3d/sfr_reduced_ref.txt b/examples/galaxy_merger_star_formation_3d/sfr_reduced_ref.txt new file mode 100644 index 0000000000000000000000000000000000000000..1a88bf2ecba3ab5b847ffab38fdc100692bee3b8 --- /dev/null +++ b/examples/galaxy_merger_star_formation_3d/sfr_reduced_ref.txt @@ -0,0 +1,114 @@ +0.000000000000000000e+00 0.000000000000000000e+00 6.687901000000000096e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 +1.171875000000000000e-02 4.120856999999999905e-04 3.608833000000000180e+00 1.150825999999999993e+01 3.311821999999999748e-04 4.553007000000000408e-03 +4.248046999999999934e-02 4.274562999999999887e-04 2.997526000000000135e+00 5.968754999999999811e+00 8.785899000000000226e-04 1.583669999999999869e-02 +7.910156000000000132e-02 4.880926000000000166e-04 3.449573000000000000e+00 6.815445999999999671e+00 4.881055000000000246e-04 2.657502000000000128e-02 +1.149902000000000007e-01 2.597613000000000061e-06 3.523702000000000112e+00 3.627158999999999939e-02 0.000000000000000000e+00 3.788819999999999688e-02 +1.516113000000000044e-01 2.166697000000000069e-06 3.160305999999999838e+00 3.025452000000000002e-02 0.000000000000000000e+00 5.057894999999999752e-02 +1.882323999999999942e-01 2.820598000000000095e-06 3.295647999999999911e+00 3.938520999999999689e-02 0.000000000000000000e+00 6.004819000000000129e-02 +2.248535000000000117e-01 4.582658000000000297e-06 3.039509999999999934e+00 6.398961999999999706e-02 0.000000000000000000e+00 6.961506000000000638e-02 +2.614746000000000015e-01 5.139569000000000089e-06 3.020582000000000100e+00 7.176599999999999646e-02 0.000000000000000000e+00 7.976764999999999550e-02 +2.980957000000000190e-01 3.307233000000000138e-06 2.814296999999999827e+00 4.618031000000000219e-02 0.000000000000000000e+00 9.079884000000000566e-02 +3.347167999999999810e-01 3.026473999999999867e-06 2.669601999999999808e+00 4.225994999999999752e-02 0.000000000000000000e+00 1.001704999999999957e-01 +3.713378999999999985e-01 1.817236000000000087e-06 2.667021999999999782e+00 2.537483999999999920e-02 0.000000000000000000e+00 1.093467999999999940e-01 +4.079590000000000161e-01 4.065479000000000349e-06 2.590796999999999795e+00 5.676802999999999710e-02 0.000000000000000000e+00 1.188160999999999939e-01 +4.445800999999999781e-01 1.699082999999999916e-06 2.451243999999999978e+00 2.372501999999999944e-02 0.000000000000000000e+00 1.282852999999999910e-01 +4.812011999999999956e-01 2.210798999999999837e-06 2.409694000000000003e+00 3.087033000000000138e-02 0.000000000000000000e+00 1.372665000000000135e-01 +5.178222999999999576e-01 3.016655999999999904e-06 2.304377999999999815e+00 4.212285000000000335e-02 0.000000000000000000e+00 1.465404999999999902e-01 +5.544434000000000307e-01 2.981036999999999882e-06 2.198404000000000025e+00 4.162550000000000278e-02 0.000000000000000000e+00 1.554240000000000066e-01 +5.910644999999999927e-01 1.591673000000000041e-06 2.016941999999999791e+00 2.222522000000000039e-02 0.000000000000000000e+00 1.636241999999999974e-01 +6.276855000000000073e-01 1.153402999999999916e-06 1.998695000000000110e+00 1.610545999999999853e-02 0.000000000000000000e+00 1.702624000000000082e-01 +6.643065999999999693e-01 1.472845000000000084e-06 2.008786000000000183e+00 2.056596999999999939e-02 0.000000000000000000e+00 1.760220999999999869e-01 +7.009277000000000424e-01 3.337705000000000174e-06 2.089989999999999792e+00 4.660580999999999752e-02 0.000000000000000000e+00 1.816840999999999873e-01 +7.375488000000000044e-01 1.681286999999999959e-06 1.956836000000000020e+00 2.347652999999999893e-02 0.000000000000000000e+00 1.895913999999999933e-01 +7.741698999999999664e-01 2.718496000000000204e-06 1.766572000000000031e+00 3.795951999999999660e-02 0.000000000000000000e+00 1.954487000000000030e-01 +8.107910000000000394e-01 2.712430000000000049e-06 1.745937000000000072e+00 3.787482999999999822e-02 0.000000000000000000e+00 2.013059000000000098e-01 +8.474121000000000015e-01 1.314014000000000003e-06 1.829765000000000086e+00 1.834813999999999889e-02 0.000000000000000000e+00 2.064797999999999911e-01 +8.840331999999999635e-01 2.878127999999999949e-06 1.715024000000000104e+00 4.018853000000000009e-02 0.000000000000000000e+00 2.126300000000000134e-01 +9.206543000000000365e-01 2.323804000000000206e-06 1.578446999999999933e+00 3.244827000000000128e-02 0.000000000000000000e+00 2.181944000000000106e-01 +9.565430000000000321e-01 2.167950999999999938e-04 1.521549000000000040e+00 3.027203000000000088e+00 9.762109999999999950e-05 2.242468999999999990e-01 +9.862060999999999744e-01 0.000000000000000000e+00 1.637674999999999992e+00 0.000000000000000000e+00 0.000000000000000000e+00 2.285422000000000009e-01 +1.006714000000000109e+00 0.000000000000000000e+00 1.701057000000000041e+00 0.000000000000000000e+00 0.000000000000000000e+00 2.313732000000000011e-01 +1.026122999999999896e+00 1.520441999999999977e-06 1.654025999999999996e+00 4.246115000000000306e-02 0.000000000000000000e+00 2.341065999999999980e-01 +1.044434000000000085e+00 2.255636999999999898e-04 1.601401999999999992e+00 6.299286000000000385e+00 9.762109999999999950e-05 2.380114999999999870e-01 +1.062743999999999911e+00 5.418381999999999582e-06 1.626648000000000094e+00 1.513183999999999918e-01 0.000000000000000000e+00 2.406472000000000055e-01 +1.081055000000000099e+00 2.209446000000000055e-04 1.616317999999999921e+00 6.170288000000000217e+00 9.762109999999999950e-05 2.441616000000000064e-01 +1.112182999999999922e+00 0.000000000000000000e+00 1.810257000000000005e+00 0.000000000000000000e+00 0.000000000000000000e+00 2.492379000000000122e-01 +1.146973000000000020e+00 2.173506999999999924e-04 1.539757000000000042e+00 3.034959999999999880e+00 9.762109999999999950e-05 2.547047000000000061e-01 +1.182128999999999985e+00 1.830985999999999888e-04 1.295449000000000073e+00 2.556684000000000179e+00 9.762109999999999950e-05 2.602690999999999755e-01 +1.213622999999999896e+00 1.119012999999999937e-06 1.234804999999999930e+00 1.562525000000000025e-02 0.000000000000000000e+00 2.637834000000000012e-01 +1.248046999999999906e+00 1.693874999999999905e-04 1.192793999999999910e+00 2.365229999999999944e+00 9.762109999999999950e-05 2.672001999999999988e-01 +1.282470999999999917e+00 5.983664000000000475e-07 1.151780999999999944e+00 8.355246999999999674e-03 0.000000000000000000e+00 2.706168999999999936e-01 +1.317627000000000104e+00 9.512473999999999897e-07 1.192498000000000058e+00 1.328266999999999989e-02 0.000000000000000000e+00 2.755955999999999961e-01 +1.352050999999999892e+00 1.659294999999999976e-04 1.166690000000000005e+00 2.316943999999999892e+00 2.928633000000000256e-04 2.798908999999999980e-01 +1.384276999999999980e+00 1.634609999999999991e-04 1.148123999999999922e+00 2.282475999999999949e+00 9.762109999999999950e-05 2.818433000000000188e-01 +1.417235999999999940e+00 1.699635999999999934e-06 1.180252000000000079e+00 2.373273999999999870e-02 0.000000000000000000e+00 2.851623999999999826e-01 +1.453856999999999955e+00 1.439642000000000048e-06 1.110384999999999955e+00 2.010233999999999979e-02 0.000000000000000000e+00 2.895554000000000183e-01 +1.488280999999999965e+00 1.495869000000000094e-04 1.053709999999999924e+00 2.088745999999999992e+00 1.952421999999999990e-04 2.944364999999999899e-01 +1.520507999999999971e+00 1.506477000000000044e-04 1.062100999999999962e+00 2.103558000000000039e+00 0.000000000000000000e+00 2.969745999999999775e-01 +1.555663999999999936e+00 1.439826000000000062e-04 1.009104000000000001e+00 2.010491000000000028e+00 9.762109999999999950e-05 3.003913000000000277e-01 +1.590819999999999901e+00 1.343511999999999886e-04 9.479258999999999880e-01 1.876004000000000005e+00 9.762109999999999950e-05 3.030270999999999937e-01 +1.625977000000000006e+00 1.487900999999999970e-04 1.046950999999999965e+00 2.077620000000000022e+00 1.952421999999999990e-04 3.073223999999999956e-01 +1.661864999999999926e+00 1.453200999999999991e-07 9.721501000000000170e-01 2.029167000000000123e-03 0.000000000000000000e+00 3.100557999999999925e-01 +1.698485999999999940e+00 6.689590000000000016e-07 9.040599000000000274e-01 9.340960000000000582e-03 0.000000000000000000e+00 3.137654000000000276e-01 +1.735106999999999955e+00 1.188934000000000050e-06 8.807009999999999561e-01 1.660158999999999940e-02 0.000000000000000000e+00 3.174750000000000072e-01 +1.771729000000000109e+00 1.966551000000000071e-06 8.606226999999999627e-01 2.745979999999999949e-02 0.000000000000000000e+00 3.207941000000000265e-01 +1.807982999999999896e+00 0.000000000000000000e+00 8.782999000000000223e-01 0.000000000000000000e+00 0.000000000000000000e+00 3.232346999999999859e-01 +1.844238000000000044e+00 1.257247000000000128e-04 8.810814999999999619e-01 1.755548000000000108e+00 9.762109999999999950e-05 3.254799999999999915e-01 +1.880127000000000104e+00 6.659232999999999766e-07 8.094407999999999603e-01 9.298572999999999214e-03 0.000000000000000000e+00 3.279205000000000036e-01 +1.916015999999999941e+00 1.144250000000000031e-04 8.129250000000000087e-01 1.597766000000000020e+00 0.000000000000000000e+00 3.313371999999999984e-01 +1.951171999999999906e+00 1.141466999999999959e-04 7.972255999999999787e-01 1.593879000000000046e+00 9.762109999999999950e-05 3.341682000000000263e-01 +1.972045999999999966e+00 0.000000000000000000e+00 7.913548000000000249e-01 0.000000000000000000e+00 0.000000000000000000e+00 3.365111000000000074e-01 +1.990356000000000014e+00 2.717786000000000193e-07 8.015944000000000402e-01 7.589923000000000156e-03 0.000000000000000000e+00 3.379754999999999843e-01 +2.007568000000000019e+00 7.593486000000000094e-05 1.091078999999999910e+00 2.120622000000000007e+00 9.762109999999999950e-05 3.398302999999999741e-01 +2.025879000000000207e+00 1.631206999999999915e-04 1.723764999999999992e+00 4.555449000000000304e+00 1.952421999999999990e-04 3.421732000000000107e-01 +2.043823000000000167e+00 0.000000000000000000e+00 1.279112000000000027e+00 0.000000000000000000e+00 0.000000000000000000e+00 3.448088999999999738e-01 +2.062133999999999912e+00 0.000000000000000000e+00 9.163765000000000382e-01 0.000000000000000000e+00 0.000000000000000000e+00 3.462733000000000061e-01 +2.081176999999999833e+00 0.000000000000000000e+00 8.195807000000000508e-01 0.000000000000000000e+00 0.000000000000000000e+00 3.477375999999999800e-01 +2.101318000000000019e+00 6.968020999999999976e-06 9.147674999999999557e-01 1.945948999999999873e-01 0.000000000000000000e+00 3.496900000000000008e-01 +2.120360999999999940e+00 7.994742999999999156e-06 9.894986000000000059e-01 2.232679999999999942e-01 0.000000000000000000e+00 3.511542999999999748e-01 +2.139403999999999861e+00 1.523120999999999981e-05 1.216992999999999991e+00 2.126799000000000051e-01 0.000000000000000000e+00 3.525209999999999733e-01 +2.158081000000000138e+00 0.000000000000000000e+00 1.687381000000000020e+00 0.000000000000000000e+00 0.000000000000000000e+00 3.552544000000000257e-01 +2.176757999999999971e+00 2.449857999999999745e-04 1.772923000000000027e+00 6.841681999999999597e+00 2.928633000000000256e-04 3.578901999999999917e-01 +2.196166999999999980e+00 0.000000000000000000e+00 1.846818000000000071e+00 0.000000000000000000e+00 0.000000000000000000e+00 3.616974000000000022e-01 +2.213744999999999852e+00 1.850454999999999929e-06 2.699117999999999906e+00 5.167739999999999834e-02 0.000000000000000000e+00 3.644307999999999992e-01 +2.231323000000000167e+00 1.553889999999999894e-07 4.162353000000000414e+00 4.339525999999999800e-03 0.000000000000000000e+00 3.704833000000000154e-01 +2.248168999999999862e+00 0.000000000000000000e+00 2.626250999999999891e+00 0.000000000000000000e+00 0.000000000000000000e+00 3.758524999999999783e-01 +2.266478999999999910e+00 0.000000000000000000e+00 1.722938999999999998e+00 0.000000000000000000e+00 0.000000000000000000e+00 3.784881999999999969e-01 +2.285521999999999831e+00 0.000000000000000000e+00 1.481112999999999902e+00 0.000000000000000000e+00 0.000000000000000000e+00 3.821002000000000010e-01 +2.304199000000000108e+00 2.013154999999999871e-04 1.495630000000000015e+00 5.622110000000000163e+00 9.762109999999999950e-05 3.860049999999999870e-01 +2.322509999999999852e+00 1.713670999999999944e-04 2.419865000000000155e+00 4.785744000000000220e+00 2.928633000000000256e-04 3.896169999999999911e-01 +2.340819999999999901e+00 3.613776999999999875e-04 3.060808000000000195e+00 1.009214000000000055e+01 0.000000000000000000e+00 3.949862000000000095e-01 +2.359131000000000089e+00 3.436988999999999696e-05 2.065093000000000067e+00 9.598430000000000017e-01 0.000000000000000000e+00 3.986957999999999891e-01 +2.383666999999999980e+00 0.000000000000000000e+00 2.796177000000000135e+00 0.000000000000000000e+00 0.000000000000000000e+00 4.028935000000000155e-01 +2.402343999999999813e+00 3.288257000000000051e-04 2.797318999999999889e+00 9.183068000000000453e+00 2.928633000000000256e-04 4.072863999999999929e-01 +2.421387000000000178e+00 2.826619000000000050e-04 2.560119999999999951e+00 7.893856999999999680e+00 4.881055000000000246e-04 4.115817999999999977e-01 +2.442626999999999882e+00 7.091987999999999699e-05 2.600133000000000028e+00 1.980569000000000024e+00 0.000000000000000000e+00 4.166580999999999757e-01 +2.460938000000000070e+00 3.208484000000000162e-04 2.796638000000000179e+00 8.960286999999999225e+00 6.833476999999999694e-04 4.211485999999999841e-01 +2.479614000000000207e+00 0.000000000000000000e+00 2.677178000000000058e+00 0.000000000000000000e+00 0.000000000000000000e+00 4.251511000000000040e-01 +2.498291000000000039e+00 8.086695999999999392e-05 2.620093999999999923e+00 2.258360000000000145e+00 9.762109999999999950e-05 4.295440999999999843e-01 +2.516601999999999784e+00 2.980869999999999939e-04 2.528001999999999860e+00 8.324633999999999645e+00 4.881055000000000246e-04 4.350107999999999753e-01 +2.535277999999999921e+00 0.000000000000000000e+00 2.368824000000000041e+00 0.000000000000000000e+00 0.000000000000000000e+00 4.391109000000000262e-01 +2.553589000000000109e+00 0.000000000000000000e+00 2.383681999999999856e+00 0.000000000000000000e+00 0.000000000000000000e+00 4.429180999999999813e-01 +2.572265999999999941e+00 2.452592000000000183e-04 2.162951000000000068e+00 6.849318000000000239e+00 0.000000000000000000e+00 4.462373000000000034e-01 +2.591674999999999951e+00 0.000000000000000000e+00 2.272034000000000109e+00 0.000000000000000000e+00 0.000000000000000000e+00 4.501420999999999895e-01 +2.609984999999999999e+00 0.000000000000000000e+00 2.291802999999999813e+00 0.000000000000000000e+00 0.000000000000000000e+00 4.536565000000000181e-01 +2.628296000000000188e+00 0.000000000000000000e+00 2.265839999999999854e+00 0.000000000000000000e+00 0.000000000000000000e+00 4.579518000000000200e-01 +2.646605999999999792e+00 0.000000000000000000e+00 2.227756999999999987e+00 0.000000000000000000e+00 0.000000000000000000e+00 4.608804000000000234e-01 +2.664916999999999980e+00 0.000000000000000000e+00 2.414976999999999929e+00 0.000000000000000000e+00 0.000000000000000000e+00 4.642972000000000210e-01 +2.683228000000000169e+00 0.000000000000000000e+00 2.253216000000000108e+00 0.000000000000000000e+00 0.000000000000000000e+00 4.681043999999999761e-01 +2.701538000000000217e+00 0.000000000000000000e+00 2.229376999999999942e+00 0.000000000000000000e+00 0.000000000000000000e+00 4.722045000000000270e-01 +2.719848999999999961e+00 0.000000000000000000e+00 2.317495999999999778e+00 0.000000000000000000e+00 0.000000000000000000e+00 4.765974000000000044e-01 +2.738159000000000010e+00 0.000000000000000000e+00 2.486426999999999943e+00 0.000000000000000000e+00 0.000000000000000000e+00 4.806974999999999998e-01 +2.756470000000000198e+00 0.000000000000000000e+00 2.147381000000000206e+00 0.000000000000000000e+00 0.000000000000000000e+00 4.838214000000000126e-01 +2.774779999999999802e+00 0.000000000000000000e+00 2.095832999999999835e+00 0.000000000000000000e+00 0.000000000000000000e+00 4.886048000000000058e-01 +2.793457000000000079e+00 2.295041000000000106e-04 1.926978999999999997e+00 6.409328000000000358e+00 0.000000000000000000e+00 4.917287000000000186e-01 +2.812133999999999912e+00 0.000000000000000000e+00 1.958069000000000059e+00 0.000000000000000000e+00 0.000000000000000000e+00 4.955358999999999736e-01 +2.830443999999999960e+00 0.000000000000000000e+00 1.846246999999999971e+00 0.000000000000000000e+00 0.000000000000000000e+00 4.990503000000000022e-01 +2.848755000000000148e+00 0.000000000000000000e+00 1.626324000000000103e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.016859999999999653e-01 +2.868895999999999891e+00 4.161009000000000262e-05 1.576276999999999928e+00 1.162039000000000044e+00 1.952421999999999990e-04 5.048099000000000336e-01 +2.887573000000000167e+00 0.000000000000000000e+00 1.612994999999999957e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.073480999999999685e-01 +2.905883999999999912e+00 0.000000000000000000e+00 1.460466000000000042e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.103742999999999475e-01 +2.924193999999999960e+00 0.000000000000000000e+00 1.598017000000000021e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.123267000000000237e-01 +2.942505000000000148e+00 0.000000000000000000e+00 1.481239999999999890e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.152554000000000300e-01 +2.961548000000000069e+00 0.000000000000000000e+00 1.432088999999999945e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.174029999999999463e-01 +2.981323000000000167e+00 0.000000000000000000e+00 1.585787000000000058e+00 0.000000000000000000e+00 0.000000000000000000e+00 5.204292999999999836e-01 diff --git a/test.sh b/test.sh index ee69420419a1fc8f8e328a8add459ad83a115b89..e9b0f12e6ba986952eabae594cff232cc52f8b7b 100644 --- a/test.sh +++ b/test.sh @@ -28,6 +28,7 @@ TESTS+="noh_3d " TESTS+="cosmo_box_gravity_only_3d " TESTS+="cosmo_box_star_formation_3d " #TESTS+="cosmo_zoom_gravity_only_3d " +TESTS+="galaxy_merger_star_formation_3d " ## loop over all tests for TEST in $TESTS