Self Gravity
(This is a skeleton while a new version of this page is under construction.)
Physics
Poisson Equation of Self Gravity
The electric field generated by a point charge Q is
E=\frac{1}{4\pi\epsilon_{0}}\frac{Q}{r^{2}}
On the other hand, the gravitational acceleration by a point mass of M is
g=-G\frac{M}{r^{2}}
The Poisson equation for electrostatic potential \phi_{e} is
\nabla^{2}\phi=-\frac{\rho}{\epsilon_{0}}
Analytically we can get the Poisson equation for the gravity
\nabla^{2}\phi=4\pi G\rho
where \rho is the mass density. This equation describes how the potential \phi is determined by the mass density distribution.
For example, consider the uniform density distribution
begin{equation}\label{eq:uniDensity}
\rho=\begin{cases} \rho_{0}, &r<R \\
0, & r\ge R
\end{cases}
\end{equation}
Use spherical coordinates, the Poisson equation for the density distribution Equation (1) can be written as
begin{equation}\label{eq:poissonSphCoord}\tag{2}
\frac{1}{r^{2}}\frac{\partial }{\partial r}\left(r^{2}\frac{\partial\phi}{\partial r} \right)=4\pi G\rho
\end{equation}
Or
begin{equation}\label{eq:poissonSphCoord1}\tag{3}
\frac{\partial ^{2}\phi }{\partial r^{2}}+\frac{2}{r}\frac{\partial\phi}{\partial r}=4\pi G\rho
\end{equation}
Solving Equation (3) with the density Equation (2), we obtain the solution for the potential for the uniform density sphere:
begin{equation}\label{eq:solUniSphere}\tag{4}
\phi(r)=\begin{cases} -\frac{4\pi}{3} G\rho \frac{R^{3}}{r} & r>R\\
-\frac{2\pi G\rho}{3}\left[R^{2}-r^{2}\right]-\frac{4\pi}{3}G\rho R^{2} &r\ge R
\end{cases}
\end{equation}
Free-fall Time
The free-fall time is the characteristic time that would take a body to collapse under its own gravitational attraction, if no other forces existed to oppose the collapse.
Using the Gauss's theorem, the gravitional acceleration g_{r} is given by
begin{equation}\label{eq:graAcce}\tag{5}
g_{r}=-\frac{GM_{r}}{r^{2}}
\end{equation}
where M_{r} is the mass inside r
begin{equation}\label{eq:insideMass}\tag{6}
M_{r}=\int_{0}^{r}\rho4\pi r^{2}dr
\end{equation}
So the equation of motion for a gas molecule under a control of the self-gravity can be written as
begin{equation}\label{eq:motion}\tag{7}
\frac{d^{2}r}{dt^{2}}=-\frac{GM_{r}}{r^{2}}
\end{equation}
Equation (7) can be written as the form of the conservation of mechanical energy
begin{equation}\label{eq:conserE}\tag{8}
\frac{1}{2}\left(\frac{dr}{dt}\right)^{2}-\frac{GM_{r}}{r}=E
\end{equation}
Suppose the gas molecule is initially located at r=R. So the total energy
begin{equation}\label{eq:totalE}\tag{9}
E=-\frac{GM_{r}(R)}{R}
\end{equation}
Now consider gas collapse. So M_{r}= M_{r}(R). Equation (8) gives
begin{equation}\label{eq:approx1}\tag{10}
\frac{dr}{dt}=-[2GM_{r}(R)]^{\frac{1}{2}}\left(\frac{1}{r}-\frac{1}{R} \right)^{\frac{1}{2}}
\end{equation}
Let
begin{equation}\tag{11}
r=R\cos^{2}\eta
\end{equation}
}}}. From the initial state we have [[latex($\eta(t=0)=0$)]]. So Equation (10) reduces to
{{{
#!latex
\begin{equation}\label{eq:reduced}\tag{12}
\cos^{2}\eta\frac{d\eta}{dt}=\left(\frac{GM_{r}(R)}{2R^{3}}\right)^{\frac{1}{2}}
\end{equation}
}}}
Solve Equation (12) we have
{{{
#!latex
\begin{equation}\label{eq:sol}\tag{13}
t=\left(\frac{R^{3}}{2GM_{r}(R)} \right)^{\frac{1}{2}}\left(\eta+\frac{\sin2\eta}{2} \right)
\end{equation}
}}}
Let [[latex($r=0$)]] or [[latex($\eta=\frac{\pi}{2}$)]]. we have the free-fall time
{{{
#!latex
\begin{equation}\ref{eq:freeFall}\tag{14}
\begin{aligned}
t_{ff}&=\left(\frac{R^{3}}{2GM_{r}(R)}\right)^{\frac{1}{2}}\frac{\pi}{2}\\
&=\left(\frac{3\pi}{32G\rho_{0}}\right)^{\frac{1}{2}}
\end{aligned}
\end{equation}
}}}
where
{{{
#!latex
\begin{equation}\label{rhoBar}\tag{15}
\rho_{0}=\frac{M_{r}(R)}{\frac{4\pi R^{3}}{3}}
\end{equation}
}}}
is the average density of the gas.
== Implementation ==
=== Uniform Density Cloud ===
The definition of [[latex($\eta$)]] in Equation (11) can also be written as
{{{
#!latex
\begin{equation}\tag{16}
\cos\eta=\left(\frac{\rho}{\rho_{0}} \right)^{-\frac{1}{6}}
\end{equation}
}}}
=== Boundary Conditions ===
== Present Considerations ==
=== Some notes on periodic BC's and particles ===
With periodic boundary conditions, we would like the total potential to be unchanged under the conversion of gas to particle. This requires adjusting the particle potential so that it has the same constant of integration as well as being periodic. When hypre solves for the potential, the constant of integration is a free parameter and I believe hypre adjusts it so that [[latex($<\phi>=0$)]]. To calculate the potential of a point charge, we need the Greens function corresponding to
[[latex($\nabla_D^2 G(x,y) = \delta^D(x-y)$)]]
where D is the dimenesion of the problem. For 3D,
[[latex($G(x,y)=\frac{-1}{4\pi|x-y|}$)]]
and for 2D,
[[latex($G(x,y)=\frac{\ln(|x-y|)}{2\pi}$)]]
and for 1D,
[[latex($G(x,y)=\frac{|x-y|}{2}$)]]
Now with periodic BC's, the solution to the gas potential is given by
[[latex($\nabla^2 \phi = 4\pi G (\rho-\bar{\rho})$)]], so the solution to the potential would actually be given by [[latex($\phi(y)=-\int_V{\frac{M\delta(x-y)-M/V}{|x-y|}dx}$)]] where [[latex($M$)]] is the mass of the particle. Note this is not the same as using mirror versions of the particle... An easier way to solve this however, is to use fourier transforms.
[[latex($k^2\hat{\phi}(k)=4\pi G\hat{\rho}(k)$)]] with [[latex($\hat{\phi}(0)=0$)]]. Now [[latex($\hat{\rho}(k)$)]] is just the fourier transform of a delta function times the mass, which is [[latex($M$)]], so [[latex($\hat\phi(k)=\frac{4\pi GM}{k^2}$)]] and [[latex($\phi(x)=4 \pi G M\int{\frac{1}{k^2}e^{ikx} dk}$)]]
This can be discretized as
[[latex($\phi(l)=\frac{4 \pi GM}{\Delta k^2} \displaystyle \sum_{j=-N/2}^{N/2}{\frac{1}{j^2}e^{2\pi ijl/N} \frac{\Delta k}{2\pi}}=\frac{4 \pi GM}{(2 \pi/L)^2}\left(\frac{2 \pi}{L}\right) \displaystyle \sum_{j=1}^{N/2}{\frac{1}{j^2}\cos(2\pi jl/N)}$)]]
This still requires summation over many wave numbers - although the higher wave numbers have less impact because of the [[latex($k^{-2}$)]] dependence. However in 2D this is lessened because there are more wave vectors in each anuli, and in 3D there is equal power in each shell. This then, becomes an order N^6 operation :|
Solutions:
* Don't ever use sink potential?
* Don't use sink potential to update gas potential
* Solve for gas potential after accretion?
*