SMOOTH(2.0) SMOOTH SMOOTH(2.0) NAME smooth - Calculate smoothed quantities over all particles SYNOPSIS smooth [-s [dgs]] [-b ] [-g] [-o ] [-p ] [-px ] [-py ] [-pz ] [density] [meanvel] [speed] [veldisp] [phase] [mach] [all] [null] Reads particles from stdin in the TIPSY BINARY format. OPTIONS [-s [dgs]]: Default nSmooth = 64 (dgs) Specifies the number of neighbors to smooth over. Directly following the integer any of the letters dgs may follow. A 'd' specifies that smooth consider the dark matter in the input file in its calculations. A 'g' sepecifies that smooth consider the gas in the input file and an 's' specifies that stars are to be considered. For example -s 64dgs (-s 64) would smooth over 64 particles considering all the matter in the simulation (the default). Specifying -s 32gs would con- sider only the gas and the stars and ignore any dark matter in the input file. [-b ]: Default nBucket = 16 Specifies the number of particles in the leaves of the search tree. This number can be changed to improve perfor- mance, but does not influence the calculation. [-g]: specifies that only the 'gather' kernel be used in calculating mean quantities. The default is to use the full SPH gather-scatter kernel. [-o ]: Default output name is "smooth". This argument allows the user to specify an alternate output name to be used for all the smooth outputs. For example -o dark would produce dark.den, dark.mvl, dark.dsp, etc. [-p ]: Default non-periodic in x, y and z dimen- sions Specifies that smoothing take into account periodicity in the all three dimensions given by the same period . This is a shorthand to specifying all three parameters given below. [-px ]: Default non-periodic in x dimension Specifies that smoothing take into account periodicity in the x-dimension given by the period . [-py ] [-pz ]: As above. [density]: produces a density output file (smooth.den) in tipsy ascii array format [meanvel]: produces a mean velocity output file (smooth.mvl) in tipsy ascii vector format [speed]: produces a mean speed output file (smooth.spd) in tipsy array format [veldisp]: produces a velocity dispersion output file (smooth.dsp) in tipsy array format [mach]: produces a mach number output file (smooth.mch) in tipsy array format [phase]: produces a phase density output file (smooth.phs) in tipsy array format [all]: produces all of the above output files [null]: produces no output files but searches for nearest neighbors and then gathers the nearest neighbors (Smoothing and Resmoothing). This is useful for gauging the performance of smooth. DESCRIPTION Smooth can calculate several mean quantities for all parti- cles in an N-Body simulation output file. The program pro- duces a file for each type of output specified on the com- mand line. This output file is in ascii format with one smoothed quantity for each particle. The program uses a sym- metric SPH (Smoothed Particle Hydrodynamics) smoothing ker- nel to find the mean quantities. = SUMj(Aj*Mj/Dj*W(i,j)) over all j where is the smoothed value for particle i of quantity A, Mj is the Mass of particle j, Dj is the density of parti- cle j and W(i,j) is the symmetric smoothing kernel defined by, W(i,j) = 1/2(w(Rij,Hi) + w(Rij,Hj)) and, Rij is the distance from particle i to particle j. Hi is HALF the distance to the k'th most distant neighbor of particle i. w(R,H) = 1/(PI*H^3)*(1 - 0.75*(2 - R/H)*(R/H)^2 if (R/H) < 1 and, w(R,H) = 1/(PI*H^3)*0.25*(2 - R/H)^3 if (R/H) >= 1. The density for particle i is simply, Di = SUMj(Mj*W(i,j)) Quantities which smooth will calculate are density, mean velocity, mean speed, velocity dispersion, mach number and phase density. For simulations which have periodic boundary conditions, the periods in x, y, and z must be specified using the -px, -py and -pz arguments for smooth to produce the correct results at the boundaries. As a shorthand, if the periods in the three dimensions are the same (usual) the -p argument suffices. EXAMPLES > smooth density < tipsy.bin This produces a density output file called smooth.den from the tipsy binary file tipsy.bin. The program has smoothed density over 64 (default) nearest neighbors and over all the particles in the tipsy.bin file. > smooth -s 32g -o tipsy_gas density veldisp mach < tipsy.bin This produces a density output file, tipsy_gas.den, a velo- city dispersion output file, tipsy_gas.dsp and a mach number output file, tipsy_gas.mch. Smoothing has been done over 32 nearest neighbors and taking into account only the gas par- ticles. > smooth -s 64d -px 256 -py 256 -pz 256 density < tipsy.bin (or) > smooth -s 64d -p 256 density < tipsy.bin This produces a density output file, smooth.den, which has been smoothed over a periodic cube of 256 units to a side. Only the dark matter has been considered in calculating the density. NOTE ABOUT OUTPUT It is important to note that the output arrays always correspond to the input file. For example if an input file is given with 32000 dark matter, 32000 gas and 1000 star particles the output tipsy array's will have 65000 entries, even if only the gas particles were smoothed over. The par- ticles which were ignored have a value of zero in the array or vector format. WARNINGS When using periodic boundary conditions assure that the periodicity is identical to that used during the N-Body simulation which generated the input file being used. Smooth output files can be quite large since they are in ascii format. Make sure that sufficient disk space is available. When running smooth on several input files make sure to specify unique output names for the files otherwise these files will simply be over-written. Smoothing time scales slightly worse than linear with number of particles and linear with nSmooth (number of nearest neighbors). BUGS Bugs? Not! SEE ALSO tipsy(1), denmax(1), fof(1) Stadel Release 2.0 Last change: 31 MAY 1994