# Milky Way 3D

## February 22, 2017

Once we add a third dimension, the initial conditions for an isothermal disk get a bit more complex. In addition to balancing the radial components of the gravitational potential with circular velocity, I now need to balance the vertical acceleration via a pressure gradient, i.e. I need to make sure the disk is in hydrostatic balance. Given that the pressure and density can be related for an isothermal gas via the expression $P = \rho c_{s}^{2}$, this translates to calculating the vertical density profile at each radial location in the disk.

The gravitational potential

The static potential for the disk will once again be based on the Milky Way. Because it is spherically symmetric, the NFW halo can thus be expressed in exactly the same way as the 2D case, but for reasons that will become clear momentarily, I will express it in cylindrical coordinates, $(r, z)$:

Again, $f(y) = \mathrm{ln}(1+y) - \frac{y}{1+y}$, $x = \sqrt(r^2 + z^2) / r_{h}$, and $r{_h}$ is the halo scale length (see previous post for variable values).

The potential of the disk now has a vertical component, and becomes a Miyamoto-Nagai profile:

where $r_{d} = 3.5$ kpc is the disk scale length and $z_{d} = 0.2 r_{d}$ is the disk scale height. From these potentials, I can calculate the radial acceleration and associated circular velocity at every value of $z$, exactly as I did in the 2D case, as well as the vertical acceleration, $g_{z}$, at any point in $r$.

Hydrostatic Equilibrium

The potential described above gives the circular motion of the gas in the disk. For the disk surface density profile, I will again use an exponential in the radial direction:

where $r_{g}$ is the gas disk scale length. I thus have the boundary conditions required in order to calculate the vertical density profile at each location in radius, as follows. I start with the equation for hydrostatic equilibrium in the vertical direction,

where $g_{z}$ is the vertical acceleration due to the combined halo+disk potential ($\frac{\mathrm{d}\Phi}{\mathrm{d}z}$). Given $P = \rho c_{s}^{2}$, I can solve for $\rho(z)$, the density profile as a function of $z$, at a given $r$. First, I substitue in $\rho$ for $P$,

Then, I rearrange and integrate both sides:

where I have substituted $\Phi$ for the integral of $g_{z}\mathrm{d}z$. Exponentiating and rewriting the constant of integration, I get

To solve for the constants, we need boundary conditions. We can set $B$ by saying that $\rho = \rho_{0}$ when $z = 0$, where $\rho_{0}$ is the central density at a given $r$. Then we have

where $\Phi_{0}$ is just the value of $\Phi$ evaluated at $z = 0$. To solve for $\rho_0$, we apply the constraint that the integral of the density profile over $z$ must equal the surface density,

Generally, this integral will need to be evaluated numerically.