# Computational astrophysics

Computational astrophysics refers to the methods and computing tools developed and used in astrophysics research. Like computational chemistry or computational physics, it is both a specific branch of theoretical astrophysics and an interdisciplinary field relying on computer science, mathematics, and wider physics. Computational astrophysics is most often studied through an applied mathematics or astrophysics programme at PhD level.
Well-established areas of astrophysics employing computational methods include magnetohydrodynamics, astrophysical radiative transfer, stellar and galactic dynamics, and astrophysical fluid dynamics. A recently developed field with interesting results is numerical relativity.

## Research

Many astrophysicists use computers in their work, and a growing number of astrophysics departments now have research groups specially devoted to computational astrophysics. Important research initiatives include the US Department of Energy (DoE) SciDAC collaboration for astrophysics and the now defunct European AstroSim collaboration. A notable active project is the international Virgo Consortium, which focuses on cosmology.
In August 2015 during the general assembly of the International Astronomical Union a new commission C.B1 on Computational Astrophysics was inaugurated, therewith recognizing the importance of astronomical discovery by computing.
Important techniques of computational astrophysics include particle-in-cell (PIC) and the closely related particle-mesh (PM), N-body simulations, Monte Carlo methods, as well as grid-free (with smoothed particle hydrodynamics (SPH) being an important example) and grid-based methods for fluids. In addition, methods from numerical analysis for solving ODEs and PDEs are also used.
Simulation of astrophysical flows is of particular importance as many objects and processes of astronomical interest such as stars and nebulae involve gases. Fluid computer models are often coupled with radiative transfer, (Newtonian) gravity, nuclear physics and (general) relativity to study highly energetic phenomena such as supernovae, relativistic jets, active galaxies and gamma-ray bursts and are also used to model stellar structure, planetary formation, evolution of stars and of galaxies, and exotic objects such as neutron stars, pulsars, magnetars and black holes. Computer simulations are often the only means to study stellar collisions, galaxy mergers, as well as galactic and black hole interactions.
In recent years the field has made increasing use of parallel and high performance computers.

## Tools

Computational astrophysics as a field makes extensive use of software and hardware technologies. These systems are often highly specialized and made by dedicated professionals, and so generally find limited popularity in the wider (computational) physics community.

### Hardware

Like other similar fields, computational astrophysics makes extensive use of supercomputers and computer clusters . Even on the scale of a normal desktop it is possible to accelerate the hardware. Perhaps the most notable such computer architecture built specially for astrophysics is the GRAPE (gravity pipe) in Japan.
As of 2010, the biggest N-body simulations, such as DEGIMA, do general-purpose computing on graphics processing units.

### Software

Many codes and software packages, exist along with various researchers and consortia maintaining them. Most codes tend to be n-body packages or fluid solvers of some sort. Examples of n-body codes include ChaNGa, MODEST, nbodylab.org and Starlab.
For hydrodynamics there is usually a coupling between codes, as the motion of the fluids usually has some other effect (such as gravity, or radiation) in astrophysical situations. For example, for SPH/N-body there is GADGET and SWIFT; for grid-based/N-body RAMSES, ENZO, FLASH, and ART.
AMUSE , takes a different approach (called Noah's Ark) than the other packages by providing an interface structure to a large number of publicly available astronomical codes for addressing stellar dynamics, stellar evolution, hydrodynamics and radiative transport.