Sie sind auf Seite 1von 4

J. Plasma Physics (2003), vol. 38, part 3, pp. 119126.

DOI: 10.1017/S0000000000000000

c 2003 Cambridge University Press119


Printed in the United Kingdom

Adaptive finite elements for a set of 2nd


order ODEs
J A K U B U R B A N, J O S E F P R E I N H A E L T E R
EURATOM/IPP.CR Association, Institute of Plasma Physics, Prague, Czech Republic
(Received 1 July 1994 and in revised form 30 October 1998)

Abstract. A Hermite finite elements approach with adaptive mesh refinement for
solution of a set of 2nd order ordinary differential equations (ODEs) is described
in the paper. The main advantage of the method is its usability for stiff equations
with boundary conditions. For cases where exponentially growing solutions can exist, the method overcomes common problems of initial value solvers. The method
was successfully used for full-wave solution of wave propagation in inhomogeneous
plasma where mode conversion process between ordinary, extraordinary and electron Bernstein waves occurs.

1. Hermite finite elements for 2nd order ODEs


Besides more commonly used ODE solvers (e.g. Runge-Kutta), the finite elements
(FEM) method can be used to solve ODEs as well. Though it is generally more
complicated, it brings several advantages and can overcome some problems of other
methods. In particular, since it is a naturally boundary value problem, we dont
need any special technique for adapting an initial values solver. This is a valuable
advantage for problems where more solutions may exist, e.g. exponentially growing
and decaying waves. The method is also suitable for stiff equations.
For ODEs with solutions continuous up to the first derivative, the cubic Hermite
polynomials provide adequate discretization [1]. To solve a set of m 2nd order ODEs
with an n-node mesh x1 . . . xn , the unknown functions fk are discretized as
fk (x) =

n
X
i=1
2


Kki G0 (i ) + Lik G1 (i ) , k = 1 . . . m,

(1.1)

where G0 (i ) = (|i | 1) (2 |i | + 1), G1 (i ) = (|i | 1) i hi are the Hermite


and
FEM, Kki , Lik are the unknown coefficients, i = (x xi ) h1
i

xi xi1 , x hxi1 , xi i
hi =
.
(1.2)
xi+1 xi , x ( xi , xi+1 i
Using the Galerkin approach, the ODEs are transformed to linear algebraic
equations for the Kki , Lik coefficients. The matrix of the problem is a 2mn 2mn
(6m 1)-diagonal matrix. Such a system can be solved efficiently by LU decomposition. Implementations can be found in various numerical libraries, e.g. DLSLCB
from the IMSL Fortran Library (used in our code) or ZGBSV from LAPACK. In
fact, the matrix contains only 8m2 n non-zero elements, but a special solver for such
a matrix would be needed to take advantage of that.

120

J. Urban, J. Preinhaelter

G0
0.5

G1
0

xi-1

xi

xi+1

Figure 1. Cubic Hermite finite elements.

In the computation, much more computer time is used for the matrix elements
evaluation, whereas the solution of the band matrix is very fast. Each matrix element is computed separately, with no interaction with the other elements. Thus,
the algorithm can be easily parallelized by using different processors for different
parts of the computational mesh.

2. Adaptive mesh refinement


An algorithm for the adaptive mesh refinement based on the local error estimation
has been developed [2]. The error estimates are computed as the maximum norm of
the difference of two solutions computed on different meshes. In detail, we construct
a local deviation vector for the (l) mesh





(l) (l)
(l)
(l1)
xi
xi fk
f
k
(l)



,
(2.1)
di = max
(l) (l)
k=1...m
max fk xi
(l)
i=1...n

(l)

(l)

where i = 1 . . . n(l) , xi are the (l) mesh nodes and fk are solutions on the (l)
mesh. If the global error



(l)
(l)
(2.2)
= di
(l) = max
di
i=1...n(l)

is greater than the desired accuracy , d is transformed in the following way:




(l)
max
d

,
0
i
(l)
d i =
(1 0 ) + 0 ,
(2.3)
(l)

where 0 > 1, 1 > 0 . Then the new (l+1) mesh is constructed with node distances
(l)

(l+1)

xj

(l+1)

xj1 =

(l)

xi xi1
(l)

d i

(l)

(l+1)

(l)

, xi1 6 xj1 6 xi .

(2.4)

Thus, 0 and 1 determine the node distance reduction in the lowest and in the
highest error regions respectively. These numbers must be adjusted according to
the specific problem, but the method is not very sensitive to their small variations
and values usable for wide range of similar problems can be found.

Adaptive finite elements for a set of 2nd order ODEs

121

3. Wave propagation in cold magnetized plasma


3.1. EBW-X-O mode conversion
For propagation of a harmonic plane wave
~
~
E(x,
y, z, t) = E(x,
Ny , Nz ) exp[i (Ny y + Nz z t)]
in cold magnetized plasma slab, inhomogeneous in the x direction, the following
two ODEs for Ey , Ez must be solved:

iNy Ex + xy Ex Ey + Nz2 yy Ey (Ny Nz + yz ) Ez = 0
iNz Ex + xz Ex Ez + Ny2 zz Ez (Ny Nz + yz ) Ey = 0 ,
(3.1)

1
Ex = iNy Ey iNz Ez + xy Ey + xz Ez Ny2 + Nz2 xx

where is the cold plasma dielectric tensor. These equations can be used to
estimate the vacuum X and O modes to electron Bernstein waves (EBW) conversion
efficiency [3]. By introducing weak collisions, the singularity at the upper hybrid
resonance (UHR) can be avoided and the energy collisionally absorbed at the UHR
region equals the energy of the EBW. Nevertheless, the solution is almost singular
at the UHR and very fine mesh must be used there in the numerical solution. The
O-X-EBW and EBW-X-O linear mode conversions are reciprocal processes; thus,
this way we can estimate the EBW-X-O conversion efficiency as well and use the
results in EBW emission simulations [4,5]. Beyond the singularity at the UHR, the
equations (3.1) have an exponentially growing solution behind the UHR, which must
be eliminated in our case [2]. For these reasons, it is troublesome to use standard
ODE solvers, whereas the FEM method described before fits well for this problem.
3.2. Properties of the adaptive method

(a)
(b)
(c)

1x10-1

(d)
(e)
1x100

1x10-2

' - accuracy

(f)
(g)

1x10-1

-3

-2

1x10

1x10

1x10-4

1x10-3

1x10-5

1x10-4

-6

-5

1x10

1x10

1x10-7

1x10-6
100

1000

10000

100

1000

10000

total number of nodes


Figure 2. Convergence for NSTX shot 113544, 0.325 s. Left: f =10.5 GHz, =0.0005f ;
(a) n0 =300, uniform initial mesh; (b) n0 =300, =0.015; (c) n0 =400, =0.035. Right:
f =16.5 GHz; (d) =0.0005f , n0 =400, uniform initial mesh; (e) =0.0005f , n0 =400,
=0.035; (f) =0.0001f , n0 =300, =0.015; (g) =0.0005f , n0 =300, =0.015. In all the
computations, =7.5, 0 =1.2, 1 =1.8.

To speed up the convergence, the initial mesh is proposed not uniform, but a
Gaussian peak is added in the UHR vicinity, so the initial mesh density is

i
h
f
2
2
,
(3.2)
n0 1 + exp (x xU HR )

122

J. Urban, J. Preinhaelter

mesh density [nodes/domain]

1x10

1x105

1x10

1x103
2

UHR 4
3
5
x [cm] - depth in the plasma slab

Figure 3. Mesh density for the cases (d,e,g) from figure 2 for
= 104 .

where x is the depth in the plasma slab, xU HR is the position of the UHR, f is the
wave frequency, is the collision frequency, n0 is an uniform mesh density, and
, are the Gaussian shaping parameters. With such initial mesh, the convergence
can be considerably faster, as shown in fig. 2.
The mesh property, which mostly determines the accuracy, is the peak at the
UHR. For different initial meshes, the peak height is about the same for given
accuracy (fig. 3), whereas the mesh density significantly differs in the rest of the
domain.

4. Summary
A robust and effective FEM method with adaptive mesh refinement algorithm for
2nd order ODE sets was developed. The method is suitable especially for problems
with strongly nonuniform mesh density requirements. Its good usability and performance was shown for wave propagation in inhomogeneous cold plasma slab, where
studying EBW-X-O mode conversion requires solving almost singular ODEs.
Acknowledgements
This work was supported by the Academy of Sciences of the Czech Republic, project
AV0Z-20430508.

References
[1]
[2]
[3]
[4]
[5]

Appert, K., Hellsten, T., Vaclavik, J. & Villard, L. 1986 Computer physics
Communication 40, 7393.
Urban, J. & Preinhaelter, J. 2004 Czech. J. Phys. 54, Suppl. C, C109C115.
Irzak, M. & Shcherbinin, O. N. 1995 Nuclear Fusion 35, 13411356.
Preinhaelter, J., Urban, J. et al. 2004 Rev. Sci. Inst. 75, 38043806.
Taylor, G. et al. 2005 Phys. Plasma 12, 052511.

Das könnte Ihnen auch gefallen