ASCL.net

Astrophysics Source Code Library

Making codes discoverable since 1999

Searching for 'GADGET'

[ascl:0003.001] GADGET-2: A Code for Cosmological Simulations of Structure Formation

The cosmological simulation code GADGET-2, a new massively parallel TreeSPH code, is capable of following a collisionless fluid with the N-body method, and an ideal gas by means of smoothed particle hydrodynamics (SPH). The implementation of SPH manifestly conserves energy and entropy in regions free of dissipation, while allowing for fully adaptive smoothing lengths. Gravitational forces are computed with a hierarchical multipole expansion, which can optionally be applied in the form of a TreePM algorithm, where only short-range forces are computed with the `tree'-method while long-range forces are determined with Fourier techniques. Time integration is based on a quasi-symplectic scheme where long-range and short-range forces can be integrated with different timesteps. Individual and adaptive short-range timesteps may also be employed. The domain decomposition used in the parallelisation algorithm is based on a space-filling curve, resulting in high flexibility and tree force errors that do not depend on the way the domains are cut. The code is efficient in terms of memory consumption and required communication bandwidth. It has been used to compute the first cosmological N-body simulation with more than 10^10 dark matter particles, reaching a homogeneous spatial dynamic range of 10^5 per dimension in a 3D box. It has also been used to carry out very large cosmological SPH simulations that account for radiative cooling and star formation, reaching total particle numbers of more than 250 million. GADGET-2 is publicly released to the research community.

[ascl:1108.005] Gaepsi: Gadget Visualization Toolkit

Gaepsi is a PYTHON extension for visualizing cosmology simulations produced by Gadget. Visualization is the most important facet of Gaepsi, but it also allows data analysis on GADGET simulations with its growing number of physics related subroutines and constants. Unlike mesh based scheme, SPH simulations are directly visible in the sense that a splatting process is required to produce raster images from the simulations. Gaepsi produces images of 2-dimensional line-of-sight projections of the simulation. Scalar fields and vector fields are both supported.

Besides the traditional way of slicing a simulation, Gaepsi also has built-in support of 'Survey-like' domain transformation proposed by Carlson & White. An improved implementation is used in Gaepsi. Gaepsi both implements an interactive shell for plotting and exposes its API for batch processing. When complied with OpenMP, Gaepsi automatically takes the advantage of the multi-core computers. In interactive mode, Gaepsi is capable of producing images of size up to 32000 x 32000 pixels. The user can zoom, pan and rotate the field with a command in on the finger tip. The interactive mode takes full advantages of matplotlib's rich annotating, labeling and image composition facilities. There are also built-in commands to add objects that are commonly used in cosmology simulations to the figures.

[ascl:1110.008] Glnemo2: Interactive Visualization 3D Program

Glnemo2 is an interactive 3D visualization program developed in C++ using the OpenGL library and Nokia QT 4.X API. It displays in 3D the particles positions of the different components of an nbody snapshot. It quickly gives a lot of information about the data (shape, density area, formation of structures such as spirals, bars, or peanuts). It allows for in/out zooms, rotations, changes of scale, translations, selection of different groups of particles and plots in different blending colors. It can color particles according to their density or temperature, play with the density threshold, trace orbits, display different time steps, take automatic screenshots to make movies, select particles using the mouse, and fly over a simulation using a given camera path. All these features are accessible from a very intuitive graphic user interface.

Glnemo2 supports a wide range of input file formats (Nemo, Gadget 1 and 2, phiGrape, Ramses, list of files, realtime gyrfalcON simulation) which are automatically detected at loading time without user intervention. Glnemo2 uses a plugin mechanism to load the data, so that it is easy to add a new file reader. It's powered by a 3D engine which uses the latest OpenGL technology, such as shaders (glsl), vertex buffer object, frame buffer object, and takes in account the power of the graphic card used in order to accelerate the rendering. With a fast GPU, millions of particles can be rendered in real time. Glnemo2 runs on Linux, Windows (using minGW compiler), and MaxOSX, thanks to the QT4API.

[ascl:1110.017] POWMES: Measuring the Power Spectrum in an N-body Simulation

POWMES is a F90 program to measure very accurately the power spectrum in a N-body simulation, using Taylor expansion of some order on the cosine and sine transforms. It can read GADGET format and requires FFTW2 to be installed.

[ascl:1303.030] Sunrise: Radiation transfer through interstellar dust

Sunrise is a Monte Carlo radiation transfer code for calculating absorption and scattering of light to study the effects of dust in hydrodynamic simulations of interacting galaxies. It uses an adaptive mesh refinement grid to describe arbitrary geometries of emitting and absorbing/scattering media, with spatial dynamical range exceeding 104; it can efficiently generate images of the emerging radiation at arbitrary points in space and spectral energy distributions of simulated galaxies run with the Gadget (ascl:0003.001), Gasoline (ascl:1710.019), Arepo (ascl:1909.010), Enzo (ascl:1010.072) or ART codes. In addition to the monochromatic radiative transfer typically used by Monte Carlo codes, Sunrise can propagate a range of wavelengths simultaneously. This "polychromatic" algorithm gives significant improvements in efficiency and accuracy when spectral features are calculated.

[ascl:1305.002] pynbody: N-Body/SPH analysis for python

Pynbody is a lightweight, portable, format-transparent analysis package for astrophysical N-body and smooth particle hydrodynamic simulations supporting PKDGRAV/Gasoline, Gadget, N-Chilada, and RAMSES AMR outputs. Written in python, the core tools are accompanied by a library of publication-level analysis routines.

[ascl:1305.006] Pressure-Entropy SPH: Pressure-entropy smooth-particle hydrodynamics

Pressure-Entropy SPH, a modified version of GADGET-2, uses the Lagrangian “Pressure-Entropy” formulation of the SPH equations. This removes the spurious “surface tension” force substantially improving the treatment of fluid mixing and contact discontinuities. Pressure-Entropy SPH shows good performance in mixing experiments (e.g. Kelvin-Helmholtz & blob tests), with conservation maintained even in strong shock/blastwave tests, where formulations without manifest conservation produce large errors. This improves the treatment of sub-sonic turbulence and lessens the need for large kernel particle numbers.

[ascl:1403.015] computePk: Power spectrum computation

ComputePk computes the power spectrum in cosmological simulations. It is MPI parallel and has been tested up to a 4096^3 mesh. It uses the FFTW library. It can read Gadget-3 and GOTPM outputs, and computes the dark matter component. The user may choose between NGP, CIC, and TSC for the mass assignment scheme.

[ascl:1408.008] GALIC: Galaxy initial conditions construction

GalIC (GALaxy Initial Conditions) is an implementation of an iterative method to construct steady state composite halo-disk-bulge galaxy models with prescribed density distribution and velocity anisotropy that can be used as initial conditions for N-body simulations. The code is parallelized for distributed memory based on MPI. While running, GalIC produces "snapshot files" that can be used as initial conditions files. GalIC supports the three file formats ('type1' format, the slightly improved 'type2' format, and an HDF5 format) of the GADGET (ascl:0003.001) code for its output snapshot files.

[ascl:1410.003] GIZMO: Multi-method magneto-hydrodynamics+gravity code

GIZMO is a flexible, multi-method magneto-hydrodynamics+gravity code that solves the hydrodynamic equations using a variety of different methods. It introduces new Lagrangian Godunov-type methods that allow solving the fluid equations with a moving particle distribution that is automatically adaptive in resolution and avoids the advection errors, angular momentum conservation errors, and excessive diffusion problems that seriously limit the applicability of “adaptive mesh” (AMR) codes, while simultaneously avoiding the low-order errors inherent to simpler methods like smoothed-particle hydrodynamics (SPH). GIZMO also allows the use of SPH either in “traditional” form or “modern” (more accurate) forms, or use of a mesh. Self-gravity is solved quickly with a BH-Tree (optionally a hybrid PM-Tree for periodic boundaries) and on-the-fly adaptive gravitational softenings. The code is descended from P-GADGET, itself descended from GADGET-2 (ascl:0003.001), and many of the naming conventions remain (for the sake of compatibility with the large library of GADGET work and analysis software).

[ascl:1411.001] pyGadgetReader: GADGET snapshot reader for python

pyGadgetReader is a universal GADGET snapshot reader for python that supports type-1, type-2, HDF5, and TIPSY (ascl:1111.015) binary formats. It additionally supports reading binary outputs from FoF_Special, P-StarGroupFinder, Rockstar (ascl:1210.008), and Rockstar-Galaxies.

[ascl:1502.003] N-GenIC: Cosmological structure initial conditions

N-GenIC is an initial conditions code for cosmological structure formation that can be used to set-up random N-body realizations of Gaussian random fields with a prescribed power spectrum in a homogeneously sampled periodic box. The code creates cosmological initial conditions based on the Zeldovich approximation, in a format directly compatible with GADGET (ascl:0003.001) or AREPO (ascl:1909.010).

[ascl:1502.012] SPHGR: Smoothed-Particle Hydrodynamics Galaxy Reduction

SPHGR (Smoothed-Particle Hydrodynamics Galaxy Reduction) is a python based open-source framework for analyzing smoothed-particle hydrodynamic simulations. Its basic form can run a baryonic group finder to identify galaxies and a halo finder to identify dark matter halos; it can also assign said galaxies to their respective halos, calculate halo & galaxy global properties, and iterate through previous time steps to identify the most-massive progenitors of each halo and galaxy. Data about each individual halo and galaxy is collated and easy to access.

SPHGR supports a wide range of simulations types including N-body, full cosmological volumes, and zoom-in runs. Support for multiple SPH code outputs is provided by pyGadgetReader (ascl:1411.001), mainly Gadget (ascl:0003.001) and TIPSY (ascl:1111.015).

[ascl:1511.002] JSPAM: Interacting galaxies modeller

JSPAM models galaxy collisions using a restricted n-body approach to speed up computation. Instead of using a softened point-mass potential, the software supports a modified version of the three component potential created by Hernquist (1994, ApJS 86, 389). Although spherically symmetric gravitationally potentials and a Gaussian model for the bulge are used to increase computational efficiency, the potential mimics that of a fully consistent n-body model of a galaxy. Dynamical friction has been implemented in the code to improve the accuracy of close approaches between galaxies. Simulations using this code using thousands of particles over the typical interaction times of a galaxy interaction take a few seconds on modern desktop workstations, making it ideal for rapidly prototyping the dynamics of colliding galaxies. Extensive testing of the code has shown that it produces nearly identical tidal features to those from hierarchical tree codes such as Gadget but using a fraction of the computational resources. This code was used in the Galaxy Zoo: Mergers project and is very well suited for automated fitting of galaxy mergers with automated pattern fitting approaches such as genetic algorithms. Java and Fortran versions of the code are available.

[ascl:1511.022] ZInCo: Zoomed Initial Conditions

ZInCo manipulates existing initial conditions (ICs) compatible with GADGET-2/3 (ascl:0003.001) ICs, allowing different flavors of zoom-in simulations rather then producing new ICs from scratch. The code can manipulate initial conditions with multiple types of particles, unlike the vast majority of zoom-in ICs codes available, preserving their properties and random field. This allows ZInCo to take advantage of other codes that produce ICs featuring a broad range of different cosmologies; it can be used also on existing ICs even in the unlikely case nothing is known about their properties. The code is written in C++ and parallelized using MPI.

[ascl:1605.003] Shadowfax: Moving mesh hydrodynamical integration code

Shadowfax simulates galaxy evolution. Written in object-oriented modular C++, it evolves a mixture of gas, subject to the laws of hydrodynamics and gravity, and any collisionless fluid only subject to gravity, such as cold dark matter or stars. For the hydrodynamical integration, it makes use of a (co-) moving Lagrangian mesh. The code has a 2D and 3D version, contains utility programs to generate initial conditions and visualize simulation snapshots, and its input/output is compatible with a number of other simulation codes, e.g. Gadget2 (ascl:0003.001) and GIZMO (ascl:1410.003).

[ascl:1607.002] DICE: Disk Initial Conditions Environment

DICE models initial conditions of idealized galaxies to study their secular evolution or their more complex interactions such as mergers or compact groups using N-Body/hydro codes. The code can set up a large number of components modeling distinct parts of the galaxy, and creates 3D distributions of particles using a N-try MCMC algorithm which does not require a prior knowledge of the distribution function. The gravitational potential is then computed on a multi-level Cartesian mesh by solving the Poisson equation in the Fourier space. Finally, the dynamical equilibrium of each component is computed by integrating the Jeans equations for each particles. Several galaxies can be generated in a row and be placed on Keplerian orbits to model interactions. DICE writes the initial conditions in the Gadget1 or Gadget2 (ascl:0003.001) format and is fully compatible with Ramses (ascl:1011.007).

[ascl:1608.002] pyXSIM: Synthetic X-ray observations generator

pyXSIM simulates X-ray observations from astrophysical sources. X-rays probe the high-energy universe, from hot galaxy clusters to compact objects such as neutron stars and black holes and many interesting sources in between. pyXSIM generates synthetic X-ray observations of these sources from a wide variety of models, whether from grid-based simulation codes such as FLASH (ascl:1010.082), Enzo (ascl:1010.072), and Athena (ascl:1010.014), to particle-based codes such as Gadget (ascl:0003.001) and AREPO (ascl:1909.010), and even from datasets that have been created “by hand”, such as from NumPy arrays. pyXSIM can also manipulate the synthetic observations it produces in various ways and export the simulated X-ray events to other software packages to simulate the end products of specific X-ray observatories. pyXSIM is an implementation of the PHOX (ascl:1112.004) algorithm and was initially the photon_simulator analysis module in yt (ascl:1011.022); it is dependent on yt.

[ascl:1811.014] pygad: Analyzing Gadget Simulations with Python

pygad provides a framework for dealing with Gadget snapshots. The code reads any of the many different Gadget (ascl:0003.001) formats, allows easy masking snapshots to particles of interest, decorates the data blocks with units, allows to add automatically updating derived blocks, and provides several binning and plotting routines, among other tasks, to provide convenient, intuitive handling of the Gadget data without the need to worry about technical details. pygad provides access to single stellar population (SSP) models, has an interface to Rockstar (ascl:1210.008) output files, provides its own friends-of-friends (FoF) finder, calculates spherical overdensities, and has a sub-module to generate mock absorption lines.

[ascl:1703.007] sidm-nbody: Monte Carlo N-body Simulation for Self-Interacting Dark Matter

Self-Interacting Dark Matter (SIDM) is a hypothetical model for cold dark matter in the Universe. A strong interaction between dark matter particles introduce a different physics inside dark-matter haloes, making the density profile cored, reduce the number of subhaloes, and trigger gravothermal collapse. sidm-nbody is an N-body simulation code with Direct Simulation Monte Carlo scattering for self interaction, and some codes to analyse gravothermal collapse of isolated haloes. The N-body simulation is based on GADGET 1.1.

[ascl:1706.006] GenPK: Power spectrum generator

GenPK generates the 3D matter power spectra for each particle species from a Gadget snapshot. Written in C++, it requires both FFTW3 and GadgetReader.

[ascl:1710.012] FSFE: Fake Spectra Flux Extractor

The fake spectra flux extractor generates simulated quasar absorption spectra from a particle or adaptive mesh-based hydrodynamic simulation. It is implemented as a python module. It can produce both hydrogen and metal line spectra, if the simulation includes metals. The cloudy table for metal ionization fractions is included. Unlike earlier spectral generation codes, it produces absorption from each particle close to the sight-line individually, rather than first producing an average density in each spectral pixel, thus substantially preserving more of the small-scale velocity structure of the gas. The code supports both Gadget (ascl:0003.001) and AREPO (ascl:1909.010).

[ascl:1711.007] galstep: Initial conditions for spiral galaxy simulations

galstep generates initial conditions for disk galaxy simulations with GADGET-2 (ascl:0003.001), RAMSES (ascl:1011.007) and GIZMO (ascl:1410.003), including a stellar disk, a gaseous disk, a dark matter halo and a stellar bulge. The first two components follow an exponential density profile, and the last two a Dehnen density profile with gamma=1 by default, corresponding to a Hernquist profile.

[ascl:1711.008] clustep: Initial conditions for galaxy cluster halo simulations

clustep generates a snapshot in GADGET-2 (ascl:0003.001) format containing a galaxy cluster halo in equilibrium; this snapshot can also be read in RAMSES (ascl:1011.007) using the DICE patch. The halo is made of a dark matter component and a gas component, with the latter representing the ICM. Each of these components follows a Dehnen density profile, with gamma=0 or gamma=1. If gamma=1, then the profile corresponds to a Hernquist profile.

[ascl:2008.024] MUSIC2-monofonIC: 3LPT initial condition generator

The original MUSIC code (ascl:1311.011) was designed to provide initial conditions for zoom initial conditions and is limited for applications to large-scale cosmological simulations. MUSIC2-monofonIC generates high order LPT/PPT cosmological initial conditions for single resolution cosmological simulations, and can be used for rapid predictions of large-scale structure. MUSIC2-monofonIC offers support for up to 3rd order Lagrangian perturbation theory, PPT (Semiclassical PT for Eulerian grids) up to 2nd order, and for mixed CDM+baryon sims. It direct interfaces with CLASS and can use file input from CAMB; it offers multiple output modules for RAMSES (ascl:1011.007), Arepo (ascl:1909.010), Gadget-2/3 (ascl:0003.001), and HACC via plugins, and new modules/plugins can be easily added.

[ascl:2101.001] 3LPT-init: Initial conditions with third-order Lagrangian perturbation for cosmological N-body simulations

In cosmological N-body simulations, higher-order Lagrangian perturbation on the initial condition affects the formation of nonlinear structure. Using this code, the initial condition generated by Zel'dovich approximation (Lagrangian linear perturbation) for Gadget-2 code to initial condition with second- or third-order Lagrangian perturbation (2LPT, 3LPT).

[ascl:2105.004] TesseRACt: Tessellation-based Recovery of Amorphous halo Concentrations

TesseRACt computes concentrations of simulated dark matter halos from volume information for particles generated using Voronoi tesselation. This technique is advantageous as it is non-parametric, does not assume spherical symmetry, and allows for the presence of substructure. TesseRACt accepts data in a number of formats, including Gadget-2 (ascl:0003.001), Gasoline (ascl:1710.019), and ASCII, and computes concentrations using particles volumes, traditional fitting to an NFW profile, and non-parametric techniques that assume spherical symmetry.

[ascl:2202.006] FIRE Studio: Movie making utilities for the FIRE simulations

FIRE Studio is a Python interface for C libraries that project Smoothed Particle Hydrodynamic (SPH) datasets. These C libraries can, in principle, be applied to any SPH dataset; the Python interface is specialized to conveniently load and format Gadget-derivative datasets such as GIZMO (ascl:1410.003). FIRE Studio is fast, memory efficient, and parallelizable. In addition to producing "1-color" projection maps for SPH datasets, the interface can produce "2-color" maps, where the pixel saturation is set by one projected quantity and the hue is set by another, and "3-color" maps, where three quantities are projected simultaneously and remapped into an RGB colorspace. FIRE Studio can model stellar emission and dust extinction to produce mock Hubble images (by default) or to model surface brightness maps for thirteen of the most common bands (plus the bolometric luminosity). It produces publication quality static images of simulation datasets and provides interpolation scripts to create movies that smoothly evolve in time (provided multiple snapshots in time of the data exist), view the dataset from different perspectives (taking advantage of shared memory buffers to allow massive parallelization), or both.

[ascl:2204.001] TG: Turbulence Generator

Turbulence Generator generates a time sequence of random Fourier modes via an Ornstein-Uhlenbeck (OU) process, used to drive turbulence in hydrodynamical simulation codes. It can also generate single turbulent realizations. Turbulence driving based on this method is currently supported by implementations in AREPO (ascl:1909.010), FLASH (ascl:1010.082), GADGET (ascl:0003.001), PHANTOM (ascl:1709.002), PLUTO (ascl:1010.045), and Quokka (ascl:2110.009).

[ascl:2204.014] GADGET-4: Parallel cosmological N-body and SPH code

GADGET-4 (GAlaxies with Dark matter and Gas intEracT) is a parallel cosmological N-body and SPH code that simulates cosmic structure formation and calculations relevant for galaxy evolution and galactic dynamics. It is massively parallel and flexible, and can be applied to a variety of different types of simulations, offering a number of sophisticated simulation algorithms. GADGET-4 supports collisionless simulations and smoothed particle hydrodynamics on massively parallel computers.

The code can be used for plain Newtonian dynamics, or for cosmological integrations in arbitrary cosmologies, both with or without periodic boundary conditions. Stretched periodic boxes, and special cases such as simulations with two periodic dimensions and one non-periodic dimension are supported as well. The modeling of hydrodynamics is optional. The code is adaptive both in space and in time, and its Lagrangian character makes it particularly suitable for simulations of cosmic structure formation. Several post-processing options such as group- and substructure finding, or power spectrum estimation are built in and can be carried out on the fly or applied to existing snapshots. Through a built-in cosmological initial conditions generator, it is also particularly easy to carry out cosmological simulations. In addition, merger trees can be determined directly by the code.

[ascl:2212.004] FastDF: Integrating neutrino geodesics in linear theory

FastDF (Fast Distribution Function) integrates relativistic particles along geodesics in a comoving periodic volume with forces determined by cosmological linear perturbation theory. Its main application is to set up accurate particle realizations of the linear phase-space distribution of massive relic neutrinos by starting with an analytical solution deep in radiation domination. Such particle realizations are useful for Monte Carlo experiments and provide consistent initial conditions for cosmological N-body simulations. Gravitational forces are calculated from three-dimensional potential grids, which are obtained by convolving random phases with linear transfer functions using Fast Fourier Transforms. The equations of motion are solved using a symplectic leapfrog integration scheme to conserve phase-space density and prevent the build-up of errors. Particles can be exported in different gauges and snapshots are provided in the HDF5 format, compatible with N-body codes like SWIFT (ascl:1805.020) and Gadget-4 (ascl:2204.014). The code has an interface with CLASS (ascl:1106.020) for calculating transfer functions and with monofonIC (ascl:2008.024) for setting up initial conditions with dark matter, baryons, and neutrinos.

[ascl:2305.022] GrGadget: Evolve metric perturbations in the weak field limit

GrGadget merges the Particle-Mesh (PM) relativistic GEVOLUTION code (ascl:1608.014) with the TreePM GADGET-4 code (ascl:2204.014) to create a TreePM simulation code that represents metric perturbations at the scales where they are relevant while resolving non-linear structures. The better resolution of the highly non-linear regime improves the representation of the relativistic fields sampled on the mesh with respect to PM-only simulations.

[ascl:2407.003] pycosie: Python analysis code used on Technicolor Dawn

pycosie is analysis code used for Technicolor Dawn (TD), a Gadget-3 derived cosmological radiative SPH simulation suite. The target analyses are to complement what is done with TD and other analysis software in its suite. pycosie creates power spectrum from generated Lyman-alpha forests spectra, links absorbers to potential host galaxies, grids gas information for each galaxy, and reads specific output files from software such as Rockstar (ascl:1210.008) and SKID (ascl:1102.020).