gr-qc0012059/ch3.t
1: %you need to reset the counters for every chapter.
2: %this means your equations will be label ed by chapter number
3: \resetcounters
4: 
5: \chapter{Checks}
6: \label{ch3}
7: In this chapter we explain different checks we have performed to test that we have properly
8: implemented the algorithm.
9: The first of these test was checking if the 
10: quantity given by equation (\ref{flat_conser}) was conserved in the flat spacetime case.  
11: In our code this value was conserved up to the tolerance of the {\tt LSODA} integrator
12: for initial data which was gaussian in both the radial and velocity distributions. We have also checked that 
13: a test particle moving in a fixed background follows the geodesic of the background, and that its energy is conserved. 
14:  
15: 
16: The rest of the checks that we describe here are for the fully 
17: coupled problem. In section \ref{mass_conser} we discuss the conservation of 
18: the mass aspect function at the outer boundary ($r=r_{\mathrm max}$).
19: We also have simulated certain clusters of particles in circular motion known as
20: Einstein clusters;
21: results from these simulations are discussed in \ref{einstein_clusters} 
22: %We include the results we have obtain simulating these clusters 
23: in section \ref{einstein_clusters}. 
24: At the end of the chapter we study how the numerical errors scale with the number 
25: of particles we use to sample the distribution function $f$,
26: and as well as with the mesh spacing $h$.
27: %with the size of discretization of the mesh $h$.
28: \section{Mass Conservation}
29: \label{mass_conser}
30: The value of the mass function given by equation (\ref{mass}) at 
31: infinity should be a conserved quantity if the spacetime is asymptotically
32: flat (see for instance \cite{MTW}).
33: As an approximation to the value at infinity we can monitor 
34: the value at the maximum value of the radial coordinate, $M(t,r_{\mathrm max})$.
35:  This
36: check will make sense as long as no matter leaves the 
37: range of integration (note that energy cannot escape in the form of radiation since that 
38: is forbidden in spherical symmetry). In Figure \ref{mass_conservation}
39: we plot $M(t,r_{\mathrm max})$ 
40: for three different mesh scales ($N_r=64$, $N_r=128$ and
41: $N_r=256$) and with a fixed number of particles, $N=10 000$.  
42: \begin{figure}[htbp]
43: \epsfxsize=3.0in
44: \centerline{\epsfbox[100 180 600 700]{mass_conser.ps}}
45: \caption[Value of $2M(r,t)/r$ at $r=r_{\mathrm max}$ as a function of time.]
46: {Value of $2M(t,r)/r$ at $r=r_{\mathrm max}$ as a function of time.}
47: \label{mass_conservation}
48: \end{figure}
49: 
50: We observe that the value of $M$ is conserved until $t \approx 40$ which s the time 
51: when the particles begin to leave the range of integration. In the inset we see a detail
52: of the function between $t=0$ and $t=40$ showing that the conservation 
53: is better than $1 \%$ for $N_r = 64 $ and improves somewhat as we increase the 
54: number of grid points. Theoretically (and in the limit $N \to \infty$) we should observe 
55: that the variation of the value of mass 
56: should decrease linearly with the number of points, i.e. first order. Although the convergence test 
57: here is not as definitive as it tends to be for pure finite-difference methods, the inset of 
58: Fig.~\ref{mass_conservation} provides fairly good evidence that our code's mass 
59: conservation {\em would} converge linearly with $h$ in the continuum limit.
60: 
61: \section{Einstein Clusters}
62: \label{einstein_clusters}
63: Probably the strongest check of the reliability of our code is 
64: its ability to simulate clusters of particles that only have rotational motion 
65: (zero radial component of the 4-momentum). Let us calculate what 
66: initial conditions we must set in order to obtain such a cluster.
67:  
68: Assuming we know what the energy density of the cluster of particles is,
69: let us calculate the velocity profiles  required in order to produce a cluster in 
70: equilibrium. In the process of obtaining the velocity profiles, we will also 
71: find the geometry of the spacetime created by the cluster. 
72: The metric coefficient $a(r)$ can be calculated using equation (\ref{mass}). If the
73: spacetime is static then $\beta(r)=0$ and the resulting equation is:  
74: \begin{equation}
75: a(r) =\left( 1-2\frac{M(r)}{r} \right)^{-1},
76: \end{equation}  
77: where we calculate $M(r)$ by integrating the density $\rho(r)$ over the radial coordinate,
78: \newline
79: $M(r)=\int 4 \pi r^2 \rho(r) dr$.
80: To calculate the lapse function we can make use of the evolution equation 
81: for the extrinsic curvature (\ref{evolK}), which in this case reduces to:
82: \begin{equation}
83: \left(\frac{\alpha r}{a}\right)^\prime=\alpha a
84: - 4 \pi \alpha a r^2 \rho.
85: \end{equation}
86: After a little bit of manipulation this equation can be written as:
87: \begin{equation}
88: \label{stat_alpha}
89: \frac{\alpha^\prime}{\alpha}=-\frac{1-a^2}{2r}=
90: \frac{M(r)}{r^2}\frac{1}{\left(1-2M(r)/r\right)}.
91: \end{equation}
92: We want to find the angular momentum $l(r)$ needed to get the particles
93: rotating with zero radial component of the 4 momentum. Imposing that 
94: condition ($p_r=0$ and $\partial p_r /\partial t = 0$) on the geodesic equation 
95: for $p_r$, equation (\ref{evol1}), we obtain:
96: \begin{equation}
97: -\frac{\partial \alpha}{\partial r} \bar p^t + \frac{l^2 \alpha}{r^3 \bar p^t}=0
98: \end{equation}
99: Taking into account that  
100: \begin{equation}
101: \bar p^t = \sqrt{m^2 + \frac{l^2}{r^2}}\ ,
102: \end{equation}
103: and using equation (\ref{stat_alpha}), we find the equation for $l(r)$:
104: \begin{equation}
105: \label{angularm}
106: l^2(r) = m^2 r^2 \left(\frac{M(r)}{r}\right)
107: \frac{1}{\left(1-3 M(r)/r\right)}
108: \end{equation}
109: This is the same expression as the angular momentum for a particle in
110: circular orbit around a Schwarzschild black hole with mass $M(r)$ (see \cite{Wald}).    
111: In Figure \ref{trayectories} we have plotted the areal coordinate for 
112: some particles in a cluster with gaussian energy density profile and total mass 
113: $M \approx 0.57$ as a function of time. Further we can see that the particles retain 
114: roughly the same radial coordinate for a time longer than $500 M$ (2 complete orbits).  
115: Also, the motion appears to be stable since the particles oscillate radially with roughly constant amplitude 
116: (see inset).
117: \begin{figure}[htbp]
118: \epsfxsize=3.0in
119: \centerline{\epsfbox[100 150 600 700]{tray.ps}}
120: \caption[Radial coordinate of 7 particles as a function of time for a cluster
121: with gaussian energy density profile.]
122: {Radial coordinates of 7 particles as a function of time for a static cluster with gaussian
123: energy density profile.}
124: \label{trayectories}
125: \end{figure}
126: We found that for clusters with gaussian energy densities and initial maximum $6 M/r = 1.01$, 
127: the cluster becomes unstable and formed
128: a black hole, whereas for clusters with initial maximum $6 M/r= 0.97$ the cluster was 
129: stable\footnote{This cluster actually achieves  gets $6 M/r > 1$ during certain parts of 
130: the evolution.}. This result
131: agrees with the result that Einstein clusters become unstable for $6M/r=1$ (see
132: \cite{Shapiro:1985a} and references therein).  
133: 
134: We have also simulated distorted static clusters for which we specify $(1-\epsilon)$ 
135: times the angular momentum fixed by (\ref{angularm}); this allows us to control 
136: the deviation from the {\em ideal} static case. We have observed results similar  
137: to the case just described where the perturbation is effectively introduced by the numerical approximation 
138: itself;
139: i.e. our distorted clusters tend to be stable when 
140: \begin{equation}
141: \max_{t,r} \left(6 M(t,r)/r \right) < 1.
142: \end{equation}
143: \section{Numerical Errors.} 
144: \label{errors}
145: There are two principal sources of numerical errors in our code:
146: 1) sampling of the initial distribution function
147: with a finite number of particles (statistical error), and 
148: 2) approximation of the derivatives in the field equations 
149: by finite-difference operators
150: (truncation error).
151: 
152: In the continuum limit --- where the number of particles, $N$, approaches infinity, 
153: and the mesh spacing, $h$, goes to $0$ --- 
154: we need to check that these numerical errors
155: go to zero to establish that, in this limit, we {\em are} solving the continuum 
156: system of equations (\Vlasov\ equation coupled with Einstein's equations). 
157: 
158: First let us study how the statistical error varies with the number of particles. 
159: We can estimate the statistical error in one function by subtracting  
160: the functions computed using two different initial sets of particles
161: (two different sets, each sampled using a Monte Carlo method and the same 
162: distribution function).
163: Here, the specific function which we monitor is $2M(t,r)/r$, and we take the $L_2$ norm of
164: the difference to be an estimate of the statistical error at each time.
165: In other words, if 
166: ${}^{(1)}\left(2M(t,r)/r \right)$ and
167: ${}^{(2)}\left(2M(t,r)/r\right)$ are calculated from two different sets of particles
168: (generated from the same distribution function), then
169: the statistical error estimate at a given time $t_o$ is computed by:
170: \begin{equation}
171: \Delta s(t_o,r) = {}^{(1)}\left(2M(t_o,r)/r\right) - {}^{(2)}\left(2M(t_o,r)/r\right).
172: \end{equation}  
173: Furthermore, we take the $L_2$ norm of this function:
174: \begin{equation}
175: \Delta s(t_o)= \sqrt{\sum_{i=1}^{N_r} \Delta s(t_o,r_i)^2 / N_r}
176: \end{equation}  
177: \begin{figure}[htbp]
178: \epsfxsize=3.0in
179: \centerline{\epsfbox[80 200 600 700]{stat.ps}}
180: \caption[Statistical Error.]
181: {Statistical Error.}
182: \label{mc_err}
183: \end{figure}
184: In Figure \ref{mc_err} we have plotted these estimates as a function of the 
185: number of particles at the initial time $t_o=0$ and for fixed mesh spacing, h. 
186: We have displayed 9 different estimates for the statistical error, and the shaded area of the graph
187: shows bounds for the ensemble.
188: The average slope is $m=-0.44 \pm 0.08$ where the
189: uncertainty is the standard deviation calculated from the individual slopes. 
190: We see that these results roughly agree with the expectation that the statistical 
191: error should scale as $N^{-1/2}$. 
192: 
193: \begin{figure}[htbp]
194: \epsfxsize=3.0in
195: \centerline{\epsfbox[80 200 600 700]{te_t0.ps}}
196: \caption[Truncation (dotted lines) and statistical error estimates (dashed lines) at t=0.]
197: {Truncation (dotted lines) and statistical error estimates (dashed lines) at t=0.}
198: \label{te_t0}
199: \end{figure}
200: 
201: Let us turn our attention now to the truncation error.
202: We assume a Richardson expansion for a mesh function $q^h(t,r)$, calculated with
203: a given mesh spacing $h$:
204: \begin{equation}
205: q^h(t,r)=q(t,r)+\Delta q_s(t,r)+h^p e_p(t,r)+O(h^{p+1})
206: \end{equation}
207: where $\Delta q_s$ is the statistical error. We estimate the truncation error in $q^h(t,r)$ 
208: via
209: \begin{equation}
210: q^h(t,r)-q^{h^\prime}(t,r)
211: \end{equation}
212: where $h^\prime < h$, specifically we have used log$(h^\prime)\approx-2.4$).
213: In this way we use the function calculated with $h^\prime$
214: as a better approximation (a reference) to the analytic solution than the one with larger $h$. 
215: It is important that the statistical error $\Delta q_s \ll h^p e_p$
216: otherwise this recipe to calculate the estimate
217: for the truncation error is meaningless since $q^h(t,r)-q^{h^\prime}(t,r)$ 
218: would be dominated by the statistical error.  
219: 
220: In Figure \ref{te_t0} we show the base ten logarithm  of the $L_2$ norm of the 
221: estimates of both the truncation and the statistical errors at $t=0$. 
222: We have plotted the truncation error estimates with dotted lines, 
223: and the statistical ones with dashed lines. 
224: 
225: In these calculations
226: we have not fixed the total number of particles, but rather the number of particles per grid cell
227: (the value we use in this particular case is 500 particles per grid cell on average). 
228: The reason for fixing the number of 
229: particles per cell, rather than the total number of particles, is that the statistical
230:  error scales with $h$ (for the total number 
231: of particles fixed) roughly as $h^{-1}$. Increasing the 
232: number of particles as we decrease $h$, we compensate for this bias by 
233: maintaining roughly constant and small statistical error.
234: 
235: In the part of the Figure where the statistical error is much smaller than the truncation error
236: we have calculated the average slope for the truncation error (the solid line in the Figure).
237: The resulting slope is $m=2.02 \pm 0.08$ where
238: again the uncertainty is the standard deviation. At $t=0$ we thus observe 
239: second order convergence which is in
240: agrement with the scheme that we have used to compute the geometric quantities.
241: 
242: \begin{figure}[htbp]
243: \epsfxsize=3.0in
244: \centerline{\epsfbox[80 200 600 700]{te_t20.ps}}
245: \caption[Truncation (dotted lines) and statistical error estimates (dashed lines) at t=20.]
246: {Truncation (dotted lines) and statistical error estimates (dashed lines) at t=20.}
247: \label{te_t20}
248: \end{figure}
249: Figure \ref{te_t20} shows the results of our error analysis at $t=20$. 
250: We see that in this case the slope
251: is not $2$ but smaller, $m=1.36 \pm 0.08$. This is consistent with the observation made in section \ref{evolution} that the numerical scheme that we have used
252: for the evolution is only first order accurate in $h$.
253: 
254: % This provides a probable explanation for why the slope is not $2$,
255: %but closer to $1$.
256: