Computational Physics

(Rick Simeone) #1
A7 Differential equations 583

This leads to the discretised form of(A.86):


∇^2 Dψij=−ρij. (A.88)

The grid on which the Laplace operator is discretised is called afinite difference
grid. An obvious approach to solving (A.88) is to use a relaxation method. We can
interpret (A.88) as a self-consistency equation forψ: on every grid point(i,j), the
valueψijmust be equal to the average of its four neighbours, plusx^2 ρij/4. So, if
we start with an arbitrary trial functionψ^0 , we can generate a sequence of potentials
ψnaccording to


ψin,j+^1 =

1


4


(ψin+1,j+ψin−1,j+ψin,j+ 1 +ψni,j− 1 )+

x^2
4

ρij. (A.89)

If we interpret the upper indexnas the time, we recognise in this equation an initial
value problem. Indeed, the stationary solutions of the initial value problem,


∂ψ
∂t

(r,t)=∇^2 ψ(r,t)+ρ(r,t), (A.90)

is a solution to(A.86). Equation(A.89)is the discretised version of(A.90)with
x^2 = 4 t. In fact, we have turned the boundary value problem into an initial value
problem, and we are now after the stationary solution of the latter. The method given
in(A.89)is called theJacobi method.
Unfortunately, the relaxation to the stationary solution is very slow. For anL×L
lattice with periodic boundary conditions, and takingρ≡0, we can find solutions
similar to the Von Neumann modes of the previous subsection. These are given as:


ψ(j,l;t)=e−αte±ikxje±ikyl; (A.91)

kx=
2 n
L

π; ky=
2 m
L

π; n,m=0, 1, 2,...

e−α=[cos(kx)+cos(ky)]/2.

Obviously, the mode withkx=ky=0 remains constant in time, as it is a solution
of the stationary equation. From the last equation we see that whenkxandky
are not both zero,αis positive, so that stability is guaranteed. We see that the
nontrivial modes with slowest relaxation (smallestα) occur for(n,m)=(1, 0),
(0, 1),(L−1, 0),or(0,L− 1 ). For these modes, we haveα=O( 1 /L^2 ). This shows
that if we discretise our problem on a finer grid in order to achieve a more accurate
representation of the continuum solution, we pay a price not only via an increase in
the time per iteration but also in the convergence rate, which forces us to perform
more iterations before the solutions converge satisfactorily. Doubling ofLcauses
the relaxation time to be increased by a factor of four.

Free download pdf