Download My title - Numerical Relativity Group at UBC
Transcript
This property of the functions at inner boundaries allows a discretization technique known as “ghost cells” in finite difference method. For example, consider the second and first derivative of the function with 4’th order accuracy: # FD Updated to 4’th order before... > A:=Gen_Sten(diff(f(x),x,x)); f(i - 2) - 16 f(i - 1) + 30 f(i) - 16 f(i + 1) + f(i + 2) A := -1/12 --------------------------------------------------------2 hx > B:=Gen_Sten(diff(f(x),x)); f(i - 2) - 8 f(i - 1) + 8 f(i + 1) - f(i + 2) B := 1/12 --------------------------------------------hx Obviously, these terms cannot be used at i = 1, the left boundary point, and also the point next to it i = 2. However, if we impose the even or odd behaviour on the function, the values f(i-1) and f(i-2) are known from the symmetry. For example, assuming that i is the point of symmetry, i.e the FDA will be used at i=1, then for an even function: f(i-1) = f(i+1). This condition is illustrated in the following diagram (a). Similarly, for an odd function we have: f(i-2) = -f(i+2). Consider another example where f is odd, and the FDA will be used at i=2, the point next to the inner boundary point. The out-of-bound term in the FDA in this case is only f(i-2) and from the symmetry we must have: f(i-2) = -f(i). The following diagram (b) clarifies this condition: Fi−1= Fi+1 = (a): F i−2 F F i−1 i+1 F i+2 i+3 i F = −Fi i−2 (b): F F i−3 i−2 i−1 F i F i+1 One standard method to implement this symmetry is to actually extend the numerical domain to have extra points outside the physical domain. These points, namely ghost cells, are updated via the symmetry, and allow FDA operations at the boundary point. FD provides a tool equivalent to the ghost cell technique. One can directly manipulate the FDA 28