2.4 Time Domain Finite Element Method
2.4.2 Formulation
The formulation used for the calculations in this thesis proceeds by applying Galerkin’s procedure to the equation wave equation (2.6): pre-multiplying by a weighting function ψ ∈ H0(curl) and integrating over the volume Ω, gives
Z
Ω{ψ· ∇ × ∇ ×E} dΩ +µ0
Z
Ωσeψ· ∂E
∂t dΩ +²0µ0
Z
Ω²0ψ· ∂2E
∂t2 dΩ
=−
Z
Ωψ· ∂Js
∂t dΩ. (2.21) The using Green’s vector identity and the divergence theorem yields
Z
Ω(∇ ×ψ)·(∇ ×E) dΩ + µ0
Z
Ωσeψ ·∂E
∂t dΩ +²0µ0
Z
Ω²0ψ· ∂2E
∂t2 dΩ +
Z
Ωψ· ∂Js
∂t dΩ =
ZZ
Γψ·(n× ∇ ×E) dΓ
= −µ0
ZZ
Γψ·
Ã
n× ∂H
∂t
!
dΓ. (2.22)
Since both H and ∂H/∂t are continuous, the surface integral on the right of equation (2.22) will cancel at all inter-element boundaries. The system is discretized in the same fashion as before, with the field quantities and weighting function replaced respectively by,
E=
XN
i=1
wiei and ψ =
XN
i=1
wi. (2.23)
This leads to the matrix equation
[S]e+ [Tσ]∂e
∂t + [T²]∂2e
∂t2 =b, (2.24)
where the element matrices are defined by [S]ei,j =
Z
Ωe
(∇ ×wi)·(∇ ×wj) dΩe, (2.25)
[Tσ]ei,j = σeµ0
Z
Ωe
(wi·wj) dΩe, (2.26)
[T²]ei,j = ²0²0µ0
Z
Ωe
(wi ·wj) dΩe. (2.27)
Matrices (2.25) to (2.27) are similar to the matrices (2.19) and (2.20) obtained for the frequency domain discretisation of the vector Helmholtz equation. The matrix [S]
is identical, whereas [T²] is the real part of (2.20) multiplied by µ0 and [Tσ] is the imaginary part multiplied by −µ0²0ω. Finally, the vector b in equation (2.24) is the forcing vector which represents the surface integral term of equation (2.22) and the source current density terms. In practice the surface integral is only evaluated where an absorbing boundary condition is required (see §2.5.1).
To solve the equations (2.24) it is necessary to discretise the temporal derivatives.
Lee [1994] uses the θ–method when using the time domain finite element method to find the resonances of a lossless cavity. This method produces a system which is only conditionally stable, which makes it necessary to choose a very small time step in order to obtain convergence. If an implicit scheme is used for the discretisation a much greater choice over the time step is allowed. The Newmark method, which is commonly used for the solution of the dynamic vibration equation [Wood, 1990], was chosen because the algorithm can be controlled through two parameters,γ and β to give either an implicit or an explicit scheme. With an appropriate choice of these parameters the system is unconditionally stable and has second order accuracy in time. This allows the time step to be chosen in order to give a particular accuracy without being constrained by the stability criteria. It is to be noted that the time domain finite element method requires the solution of a set of simultaneous equations at each time step for both implicit and explicit methods unless lumping (see§2.4.4) is used. The use of an implicit scheme does not significantly increase the computational effort required at each time step over that required for an explicit scheme. This is contrary to the FDTD methods based on Yee’s scheme which do not require any matrix inversions when used with an explicit method, consequently an implicit scheme is rarely used with such methods.
The choice of γ = 0.5 and β = 0.25 produces a system that is unconditionally stable with an accuracy ofO(∆t2) (see §2.4.3). The time step, ∆t, can then be chosen to provide the accuracy required. With γ = 0.5 and β = 0 the Newmark method is equivalent to using central differences for the temporal derivatives which have second order accuracy but only conditional stability, however, since the method is explicit
2.4 Time Domain Finite Element Method 37
lumping can be used to diagonalize the matrices [Tσ] and [T²] so reducing the effort required at each time step.
The Newmark method uses the following approximations, en+1 = en+ ∆tfn+∆t2
2 (1−2β)gn+ ∆t2βgn+1, (2.28) fn+1 = fn+ ∆t(1−γ)gn+ ∆t γgn+1, (2.29) wherefnandgnare the approximations to the first and second order temporal derivatives of en at time t =n∆t, and whereγ and β are the Newmark parameters. Substituting the derivatives in (2.24) by f and g at time t= (n+ 1)∆t produces
[S]en+1+ [Tσ]fn+1+ [T²]gn+1 =bn+1. (2.30) Substitution of (2.28) and (2.29) into (2.30) gives
{[T²] +γ∆t[Tσ] +β∆t2[S]}gn+1 =
bn+1−[Tσ]{fn+ ∆t(1−γ)gn}
−[S]{en+ ∆tfn+ ∆t2
2 (1−2γ)gn}.
(2.31)
which relates g at time step n+ 1 to quantities at the previous time step. Once gn+1 has been foundfn+1 and en+1 can be determined from (2.28) and (2.29). This method is a single step, three stage algorithm and requires the first and second derivatives to be carried at each time step. It is also necessary to specifyf0 and g0 as initial conditions.
In practice it is more desirable to use a single stage algorithm which only uses values of the field, e. This is given by the two step recurrence relation2,
{[T²] +γ∆t[Tσ] +β∆t2[S]}en+1 =
{2[T²]−(1−2γ)∆t[Tσ]−(0.5 +γ−2β)∆t2[S]}en +{−[T²]−(γ−1)∆t[Tσ]−(0.5−γ+β)∆t2[S]}en−1 +∆t2{βbn+1+ (0.5 +γ−2β)bn+ (0.5−γ+β)bn−1}.
(2.32)
2A full derivation of (2.32) is given by Wood [1990].
As mentioned previously it is necessary to solve a matrix equation at each time step, with the matrix being given by {[T²] +γ∆t[Tσ] +β∆t2[S]}. This is of the same order as the number of degrees of freedom. For a small number of unknowns an initial LU factorization means that only a single forward and backward substitution is required at each time step, however, in practical cases the number of unknowns makes factorization of the matrix unworkable so an iterative method is called for. Unlike the matrix pro- duced by the frequency domain discretisation (2.18) this matrix is both real and well conditioned so that the pre-conditioned conjugate gradient method can be used to solve the matrix equation in as few as 10 iterations, even for systems which have in excess of 100,000 unknowns. It is found that diagonal pre-conditioning works extremely well in this case [Wathen, 1987]. The number of iterations required by the conjugate gradient method is dependent upon the eigenvalues of the system, a mesh having elements of roughly equal shape will produce a matrix with very few distinct eigenvalues, enabling very fast solution. The Gauss-Seidel method has also been used to solve the equations at each time step. A good approximation to the solution can be obtained from the field values at previous time steps,
en+1 ≈2en−en−1, (2.33)
for use as an initial guess which allows rapid solution with this technique. Also, since the matrix is well-conditioned it can be stored using single precision numbers, reducing the computer memory requirements. The different techniques that were used to solve (2.32) are described more fully in Chapter 3.