Computational Physics

(Rick Simeone) #1
13.2 The Poisson equation 427

φa,φbandφcthese values at the corresponding vertices, the solution inside the
triangle is given by


φ( ̃r)=φaξa+φbξb+φcξc. (13.12)

In order to evaluate integrals over the triangular element, we use the following
formula: ∫


A

ξakξblξcmd= 2 A

k!l!m!
( 2 +k+l+m)!

(13.13)


for non-negative integersk,landm, and fora,bandcassuming values 1, 2 and 3.
Remember, dis the volume element.
We now have all the ingredients for solving the Laplace equation using triangular
finite elements. First, note that the integral(13.4)now becomes a quadratic expres-
sion in the valuesφiat the grid points. This quadratic expression can be written in
the form


J[φφφ]=−φφφTKφφφ−rTφφφ (13.14)

(we work out the specific form of the expressions below). Here,φφφis the vector
whose elements are the values of the solutions at the grid points,Kis a symmetric
matrix, andris a vector. Minimising this expression leads to the matrix equation


Kφφφ=r. (13.15)

The matrix–vector product on the left hand side can be evaluated as a sum over all
triangles. Within a triangle, we deal with the values on its vertices.
To be more specific, let us calculate


elem

(∇φ)^2 d. (13.16)

Using(13.11)we have


∇ξa=

1


2 A


(ybc,xcb) (13.17)

and similar expressions for the other two natural coordinates. From these we have,
with the parametrisation(13.12),


∇φ ̃=

1


2 A


[φa(ybc,xcb)+φb(yca,xac)+φc(yab,xba)]. (13.18)

Note that on the left and right hand side, we have two-dimensional vectors, which
are given in row form on the right hand side. Also note that the components of the
vector are constant over the triangle, which is natural as the solution is assumed to
be linear within the triangle. The integral is the norm of this constant vector squared
times the surface area of the triangle. Obviously this yields a quadratic expression in
φa,φbandφcof a form similar to(13.14), but now formulated for a single triangle.

Free download pdf