# Astrophysical fluid dynamics

Astrophysical fluid dynamics is a branch of modern astronomy which deals with the motion of fluids in outer space using fluid mechanics, such as those that make up the Sun and other stars. The subject covers the fundamentals of fluid mechanics using various equations, such as continuity equations, the Navier–Stokes equations, and Euler's equations of collisional fluids. Some of the applications of astrophysical fluid dynamics include dynamics of stellar systems, accretion disks, astrophysical jets, Newtonian fluids, and the fluid dynamics of galaxies.

## Introduction

Astrophysical fluid dynamics applies fluid dynamics and its equations to the movement of the fluids in space. The applications are different from regular fluid mechanics in that nearly all calculations take place in a vacuum with zero gravity.
Most of the interstellar medium is not at rest, but is in supersonic motion due to supernova explosions, stellar winds, radiation fields and a time dependent gravitational field caused by spiral density waves in the stellar discs of galaxies. Since supersonic motions almost always involve shock waves, shock waves must be accounted for in calculations. The galaxy also contains a dynamically significant magnetic field, meaning that the dynamics are governed by the equations of compressible magnetohydrodynamics. In many cases, the electrical conductivity is large enough for the ideal MHD equations to be a good approximation, but this is not true in star forming regions where the gas density is high and the degree of ionization is low.

### Star formation

An example problem is that of star formation. Stars form out of the interstellar medium, with this formation mostly occurring in giant molecular clouds such as the Rosette Nebula. An interstellar cloud can collapse due to its self-gravity if it is large enough; however, in the ordinary interstellar medium this can only happen if the cloud has a mass of several thousands of solar masses—much larger than that of any star. Stars may still form, however, from processes that occur if the magnetic pressure is much larger than the thermal pressure, which is the case in giant molecular clouds. These processes rely on the interaction of magnetohydrodynamic waves with a thermal instability. A magnetohydrodynamic wave in a medium in which the magnetic pressure is much larger than the thermal pressure can produce dense regions, but they cannot by themselves make the density high enough for self-gravity to act. However, the gas in star forming regions is heated by cosmic rays and is cooled by radiative processes. The net result is that a gas in a thermal equilibrium state in which heating balances cooling can exist in three different phases at the same pressure: a warm phase with a low density, an unstable phase with intermediate density and a cold phase at low temperature. An increase in pressure due to a supernova or a spiral density wave can shift the gas from the warm phase to the unstable phase, with a magnetohydrodynamic wave then being able to produce dense fragments in the cold phase whose self-gravity is strong enough for them to collapse into stars.

## Basic concepts
### Concepts of fluid dynamics

Many regular fluid dynamics equations are used in astrophysical fluid dynamics. Some of these equations are:
* Continuity equations
* The Navier–Stokes equations
* Euler's equations
Conservation of mass
The continuity equation is an extension of conservation of mass to fluid flow. Consider a fluid flowing through a fixed volume tank having one inlet and one outlet. If the flow is steady (no accumulation of fluid within the tank), then the rate of fluid flow at entry must be equal to the rate of fluid flow at the exit for mass conservation. If, at an entry (or exit) having a cross-sectional area $A$ m$^2$, a fluid parcel travels a distance $dL$ in time $dt$, then the volume flow rate ($V$ m$^3$$\cdot$s$^{−1}$) is given by: $V=A\cdot {\frac {dL}{\Delta t}}$
but since ${\frac {dL}{\Delta t}}$ is the fluid velocity ($v$ m$\cdot$s$^{−1}$) we can write:
$Q=V\times A$
The mass flow rate ($m$ kg$\cdot$s$^{−1}$) is given by the product of density and volume flow rate
$m=\rho \cdot Q=\rho \cdot V\cdot A$
Because of conservation of mass, between two points in a flowing fluid we can write $m_{1}=m_{2}$. This is equivalent to:
$\rho _{1}V_{1}A_{1}=\rho _{2}V_{2}A_{2}$
If the fluid is incompressible, ($\rho _{1}=\rho _{2}$) then:
$V_{1}A_{1}=V_{2}A_{2}$
This result can be applied to many areas in astrophysical fluid dynamics, such as neutron stars.