Re: need help on isothermal galaxy simulation with Gadget2

From: Sander Valcke <Sander.Valcke_at_UGent.be>
Date: Tue, 24 Nov 2009 14:01:52 +0100

Dear Yang,

I believe the correct flag to use is -DISOTHERM_EQS?

regards,

Sander

yanbin YANG wrote:
>
> Dear all,
>
> I'm testing galaxy simulations with gadget2, the public version of 2.0.4.
>
> When I run an isolate galaxy with *isothermal* gas, I find that, the
> mean internal
> energy of gas is kept increasing quickly, i.e., over 1 Gyr, by a
> factor of >1000.
> I think the gas in the simulation is not "isothermal". The situation
> is even worse
> when I run a galaxy collision, all the gas particle were so heated and
> pushed out.
>
> I have compile the code with option of "-DISOTHERMAL". Could anyone help
> me on this? Or point out where I have made a mistake. I have paste the
> detailed
> information of simulation below in case you have time to check.
>
>
> Many thanks in advance!
>
> Yanbin YANG.
>
>
>
> PS, details of my simulation.
>
> ======================
> CONTENT below
> - Sect. 1) Setup of IC
> - Sect. 2) Makefile I used.
> - Sect. 3) parameter file for gadget.
> ======================
>
>
> Sect. 1) Setup of IC
> --------------------
> IC is an isolate galaxy that have been reached equilibrium. According
> to the manual,
> I have set the block of "u" to be zero. Actually, I set all gas
> properties to be zero,
> except the positions and velocities. Then specify the initial
> temperature in
> the parameter file.
>
>
> Sect. 2) Make file I used.
> #----------------------------------------------------------------------
> # From the list below, please activate/deactivate the options that
> # apply to your run. If you modify any of these options, make sure
> # that you recompile the whole code by typing "make clean; make".
> #
> # Look at end of file for a brief guide to the compile-time options.
> #----------------------------------------------------------------------
>
>
> #--------------------------------------- Basic operation mode of code
> #OPT += -DPERIODIC
> OPT += -DUNEQUALSOFTENINGS
>
> #--------------------------------------- Things that are always
> recommended
> OPT +=
> -DPEANOHILBERT OPT
> += -DWALLCLOCK
>
> #--------------------------------------- TreePM Options
> #OPT += -DPMGRID=256 #OPT +=
> -DPLACEHIGHRESREGION=3 #OPT +=
> -DENLARGEREGION=1.2 #OPT +=
> -DASMTH=1.25 #OPT +=
> -DRCUT=4.5
>
> #--------------------------------------- Single/Double Precision
> #OPT += -DDOUBLEPRECISION #OPT
> += -DDOUBLEPRECISION_FFTW
>
> #--------------------------------------- Time integration options
> OPT += -DSYNCHRONIZATION #OPT
> += -DFLEXSTEPS #OPT +=
> -DPSEUDOSYMMETRIC OPT +=
> -DNOSTOP_WHEN_BELOW_MINTIMESTEP #OPT +=
> -DNOPMSTEPADJUSTMENT
>
> #--------------------------------------- Output options
> #OPT += -DHAVE_HDF5 #OPT +=
> -DOUTPUTPOTENTIAL #OPT +=
> -DOUTPUTACCELERATION #OPT +=
> -DOUTPUTCHANGEOFENTROPY #OPT +=
> -DOUTPUTTIMESTEP
>
> #--------------------------------------- Things for special behaviour
> #OPT += -DNOGRAVITY
> #OPT += -DNOTREERND
> #OPT += -DNOTYPEPREFIX_FFTW
> #OPT += -DLONG_X=60
> #OPT += -DLONG_Y=5
> #OPT += -DLONG_Z=0.2
> #OPT += -DTWODIMS
> #OPT += -DSPH_BND_PARTICLES
> #OPT += -DNOVISCOSITYLIMITER
> OPT += -DCOMPUTE_POTENTIAL_ENERGY
> #OPT += -DLONGIDS
> OPT += -DISOTHERMAL
> #OPT += -DSELECTIVE_NO_GRAVITY=2+4+8+16
> #--------------------------------------- Testing and Debugging options
> #OPT += -DFORCETEST=0.1
>
> #--------------------------------------- Glass making
> #OPT += -DMAKEGLASS=262144
>
> #----------------------------------------------------------------------
> # Here, select compile environment for the target machine. This may need
> # adjustment, depending on your local system. Follow the examples to add
> # additional target platforms, and to get things properly
> compiled.
> #----------------------------------------------------------------------
> #--------------------------------------- Select some defaults
>
> CC = mpicc # sets the C-compiler
> OPTIMIZE = -O2 -Wall -g # sets optimization and warning flags
> MPICHLIB = -lmpich
>
> #--------------------------------------- Select target computer
>
> SYSTYPE="MPA"
> #SYSTYPE="Mako"
> #SYSTYPE="Regatta"
> #SYSTYPE="RZG_LinuxCluster"
> #SYSTYPE="RZG_LinuxCluster-gcc"
> #SYSTYPE="Opteron"
> #--------------------------------------- Adjust settings for target
> computer
>
> ifeq ($(SYSTYPE),"MPA")
> CC = mpicc OPTIMIZE = -O3 -Wall GSL_INCL = -I/usr/include
> GSL_LIBS = -L/usr/lib FFTW_INCL=
> FFTW_LIBS= MPICHLIB = #HDF5INCL =
> -I/opt/hdf5/include
> #HDF5LIB = -L/opt/hdf5/lib -static -lhdf5 -lz
> endif
>
> ifeq ($(SYSTYPE),"Opteron")
> CC = mpicc OPTIMIZE = -O3 -Wall -m64
> GSL_INCL = -L/usr/local/include
> GSL_LIBS = -L/usr/local/lib -static
> FFTW_INCL= FFTW_LIBS=
> MPICHLIB = HDF5INCL = -I/opt/hdf5/include
> HDF5LIB = -L/opt/hdf5/lib -static -lhdf5 -lz
> endif
>
> ifeq ($(SYSTYPE),"Mako")
> CC = mpicc # sets the C-compiler
> OPTIMIZE = -O3 -march=athlon-mp -mfpmath=sse
> GSL_INCL = GSL_LIBS
> =
> FFTW_INCL=
> FFTW_LIBS= MPICHLIB
> =
> endif
>
> ifeq ($(SYSTYPE),"Regatta")
> CC = mpcc_r OPTIMIZE = -O5 -qstrict -qipa -q64
> GSL_INCL = -I/afs/rzg/u/vrs/gsl_psi64/include
> GSL_LIBS = -L/afs/rzg/u/vrs/gsl_psi64/lib FFTW_INCL=
> -I/afs/rzg/u/vrs/fftw_psi64/include FFTW_LIBS=
> -L/afs/rzg/u/vrs/fftw_psi64/lib -q64 -qipa MPICHLIB
> = HDF5INCL =
> -I/afs/rzg/u/vrs/hdf5_psi64/include HDF5LIB =
> -L/afs/rzg/u/vrs/hdf5_psi64/lib -lhdf5 -lz
> endif
>
> ifeq ($(SYSTYPE),"RZG_LinuxCluster")
> CC = mpicci OPTIMIZE = -O3 -ip # Note:
> Don't use the "-rcd" optimization of Intel's compiler! (causes code
> crashes)
> GSL_INCL =
> -I/afs/rzg/u/vrs/gsl_linux/include
>
> GSL_LIBS = -L/afs/rzg/u/vrs/gsl_linux/lib
> -static
> FFTW_INCL=
> -I/afs/rzg/u/vrs/fftw_linux/include
>
> FFTW_LIBS=
> -L/afs/rzg/u/vrs/fftw_linux/lib
>
> HDF5INCL =
> -I/afs/rzg/u/vrs/hdf5_linux/include
>
> HDF5LIB = -L/afs/rzg/u/vrs/hdf5_linux/lib -static -lhdf5
> -L/afs/rzg/u/vrs/zlib_linux/lib -lz
> endif
>
>
>
> ifeq ($(SYSTYPE),"RZG_LinuxCluster-gcc")
> CC = mpiccg OPTIMIZE = -Wall -g -O3
> -march=pentium4
> GSL_INCL = -I/afs/rzg/u/vrs/gsl_linux_gcc3.2/include
> GSL_LIBS = -L/afs/rzg/u/vrs/gsl_linux_gcc3.2/lib FFTW_INCL=
> -I/afs/rzg/u/vrs/fftw_linux_gcc3.2/include
> FFTW_LIBS= -L/afs/rzg/u/vrs/fftw_linux_gcc3.2/lib HDF5INCL =
> -I/afs/rzg/u/vrs/hdf5_linux/include HDF5LIB =
> -L/afs/rzg/u/vrs/hdf5_linux/lib -static -lhdf5
> -L/afs/rzg/u/vrs/zlib_linux/lib -lz
> endif
>
>
>
> ifneq (HAVE_HDF5,$(findstring HAVE_HDF5,$(OPT)))
> HDF5INCL = HDF5LIB
> =
> endif
>
> OPTIONS = $(OPTIMIZE) $(OPT)
>
> EXEC = Gadget2
>
> OBJS = main.o run.o predict.o begrun.o endrun.o global.o \
> timestep.o init.o restart.o io.o \
> accel.o read_ic.o ngb.o \ system.o
> allocate.o density.o \ gravtree.o hydra.o
> driftfac.o \ domain.o allvars.o
> potential.o \ forcetree.o peano.o
> gravtree_forcetest.o \ pm_periodic.o pm_nonperiodic.o
> longrange.o
> INCL = allvars.h proto.h tags.h Makefile
>
>
> CFLAGS = $(OPTIONS) $(GSL_INCL) $(FFTW_INCL) $(HDF5INCL)
>
>
> ifeq (NOTYPEPREFIX_FFTW,$(findstring NOTYPEPREFIX_FFTW,$(OPT))) #
> fftw installed with type prefix?
> FFTW_LIB = $(FFTW_LIBS) -lrfftw_mpi -lfftw_mpi -lrfftw
> -lfftw
> else
>
> ifeq (DOUBLEPRECISION_FFTW,$(findstring
> DOUBLEPRECISION_FFTW,$(OPT))) FFTW_LIB
> = $(FFTW_LIBS) -ldrfftw_mpi -ldfftw_mpi -ldrfftw
> -ldfftw
> else
>
> FFTW_LIB = $(FFTW_LIBS) -lsrfftw_mpi -lsfftw_mpi -lsrfftw
> -lsfftw
> endif
>
> endif
>
>
>
> LIBS = $(HDF5LIB) -g $(MPICHLIB) $(GSL_LIBS) -lgsl -lgslcblas
> -lm $(FFTW_LIB)
>
> $(EXEC): $(OBJS)
> $(CC) $(OBJS) $(LIBS) -o $(EXEC)
> $(OBJS): $(INCL)
>
>
> clean:
> rm -f $(OBJS) $(EXEC)
>
>
>
>
>
> Sect. 3) my parameter file
>
> % Relevant
> files
>
>
> InitCondFile gdMRv9Ae.go.10.00C
> OutputDir gdMRv9Ae/
> EnergyFile energy.txt
> InfoFile info.txt TimingsFile timings.txt
> CpuFile cpu.txt
> RestartFile restart
> SnapshotFileBase gdMRv9Ae
>
> OutputListFilename gdMRv9Ae/output_list.txt
>
> % CPU time -limit
>
> TimeLimitCPU 360000 % = 10 hours
> ResubmitOn 0 ResubmitCommand my-scriptfile
>
> % Code options
>
>
> ICFormat 1
> SnapFormat 1
> ComovingIntegrationOn 0
>
> TypeOfTimestepCriterion 0
> OutputListOn 0
> PeriodicBoundariesOn 0
>
> % Caracteristics of run
>
> TimeBegin 0.0 % Begin of the simulation
> TimeMax 3.0 % End of the simulation
> Omega0 0
> OmegaLambda 0
> OmegaBaryon 0
> HubbleParam 0.7
> BoxSize 0
>
> % Output frequency
>
> TimeBetSnapshot 0.006
> TimeOfFirstSnapshot 0
> CpuTimeBetRestartFile 3600.0 ; here in seconds
> TimeBetStatistics 0.05
> NumFilesPerSnapshot 1
> NumFilesWrittenInParallel 1
>
>
>
> % Accuracy of time integration
>
> ErrTolIntAccuracy 0.025
>
> CourantFac 0.15
> MaxSizeTimestep 0.005
> MinSizeTimestep 0.0001
>
>
>
>
> % Tree algorithm, force accuracy, domain update frequency
>
> ErrTolTheta 0.3 TypeOfOpeningCriterion
> 1 ErrTolForceAcc 0.005
>
> TreeDomainUpdateFrequency 0.1
>
>
> % Further parameters of SPH
>
> DesNumNgb 40
> MaxNumNgbDeviation 2
> ArtBulkViscConst 3.8
> InitGasTemp 10000 % always ignored if set to 0
> MinGasTemp 10000
>
> % Memory allocation
>
> PartAllocFactor 9.5
> TreeAllocFactor 9.5
> BufferSize 100 % in MByte
>
>
> % 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
>
> % Softening lengths
>
> MinGasHsmlFractional 0.25
>
> SofteningGas 0.5
> SofteningHalo 0.5
> SofteningDisk 0.5
> SofteningBulge 0.5 SofteningStars 0.5
> SofteningBndry 0.5
> SofteningGasMaxPhys 0.5
> SofteningHaloMaxPhys 0.5
> SofteningDiskMaxPhys 0.5
> SofteningBulgeMaxPhys 0.5
> SofteningStarsMaxPhys 0.5
> SofteningBndryMaxPhys 0.5
>
>
>
>
> MaxRMSDisplacementFac 0.2
>
>
>
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> minimalist_at_MPA-Garching.MPG.de with a subject of: unsubscribe
> gadget-list
> A web-archive of this mailing list is available here:
> http://www.mpa-garching.mpg.de/gadget/gadget-list

-- 
--------------------------------------------------
| Sander Valcke                                  |
| Sterrenkundig Observatorium, Universiteit Gent |
| Krijgslaan 281 S9, B-9000 Gent, Belgium        |
| phone +32-9-264-4796  |  fax +32-9-264-4989    |
| https://sourceforge.net/projects/hyplot/       |
--------------------------------------------------
Captain Penny's Law:
	You can fool all of the people some of the
	time, and some of the people all of the
	time, but you can't fool mom.
--------------------------------------------------
Received on 2009-11-24 14:18:54

This archive was generated by hypermail 2.3.0 : 2022-09-01 14:03:42 CEST