Computational
Methods in
Plasma Physics
Chapman & Hall/CRC
Computational Science Series
PUBLISHED TITLES
PETASCALE COMPUTING: Algorithms and Applications
Edited by David A. Bader
PROCESS ALGEBRA FOR PARALLEL AND DISTRIBUTED PROCESSING
Edited by Michael Alexander and William Gardner
GRID COMPUTING: TECHNIQUES AND APPLICATIONS
Barry Wilkinson
INTRODUCTION TO CONCURRENCY IN PROGRAMMING LANGUAGES
Matthew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen
INTRODUCTION TO SCHEDULING
Yves Robert and Frédéric Vivien
SCIENTIFIC DATA MANAGEMENT: CHALLENGES, TECHNOLOGY, AND DEPLOYMENT
Edited by Arie Shoshani and Doron Rotem
COMPUTATIONAL METHODS IN PLASMA PHYSICS
Stephen Jardin
SERIES EDITOR
Horst Simon
Associate Laboratory Director, Computing Sciences
Lawrence Berkeley National Laboratory
Berkeley, California, U.S.A.
AIMS AND SCOPE
This series aims to capture new developments and applications in the eld of computational
science through the publication of a broad range of textbooks, reference works, and handbooks.
Books in this series will provide introductory as well as advanced material on mathematical, sta-
tistical, and computational methods and techniques, and will present researchers with the latest
theories and experimentation. The scope of the series includes, but is not limited to, titles in the
areas of scientic computing, parallel and distributed computing, high performance computing,
grid computing, cluster computing, heterogeneous computing, quantum computing, and their
applications in scientic disciplines such as astrophysics, aeronautics, biology, chemistry, climate
modeling, combustion, cosmology, earthquake prediction, imaging, materials, neuroscience, oil
exploration, and weather forecasting.
Computational
Methods in
Plasma Physics
Stephen Jardin
Chapman & Hall/CRC
Computational Science Series
A CHAPMAN & HALL BOOK
CRC Press is an imprint of the
Taylor & Francis Group, an informa business
Boca Raton London New York
On the cover is a computed iso-contour surface for the toroidal current density in the nonlinear phase of an
internal instability of a tokamak plasma. Contours on one toroidal plane and one mid-section plane are also
shown. (Courtesy of Dr. J. Breslau and the M3D team.)
CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742
© 2010 by Taylor and Francis Group, LLC
CRC Press is an imprint of Taylor & Francis Group, an Informa business
No claim to original U.S. Government works
Printed in the United States of America on acid-free paper
10 9 8 7 6 5 4 3 2 1
International Standard Book Number-13: 978-1-4398-1095-8 (Ebook-PDF)
This book contains information obtained from authentic and highly regarded sources. Reasonable efforts
have been made to publish reliable data and information, but the author and publisher cannot assume
responsibility for the validity of all materials or the consequences of their use. The authors and publishers
have attempted to trace the copyright holders of all material reproduced in this publication and apologize to
copyright holders if permission to publish in this form has not been obtained. If any copyright material has
not been acknowledged please write and let us know so we may rectify in any future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmit-
ted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented,
including photocopying, microfilming, and recording, or in any information storage or retrieval system,
without written permission from the publishers.
For permission to photocopy or use material electronically from this work, please access www.copyright.
com ( or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood
Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and
registration for a variety of users. For organizations that have been granted a photocopy license by the CCC,
a separate system of payment has been arranged.
Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used
only for identification and explanation without intent to infringe.
Visit the Taylor & Francis Web site at
and the CRC Press Web site at
to Marilyn
Contents
List of Figures xiii
List of Tables xvii
Preface xix
List of Symbols xxi
1 Introduction to Magnetohydrodynamic Equations 1
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Magnetohydro dynamic (MHD) Equations . . . . . . . . . . . 4
1.2.1 Two-Fluid MHD . . . . . . . . . . . . . . . . . . . . . 6
1.2.2 Resistive MHD . . . . . . . . . . . . . . . . . . . . . . 8
1.2.3 Ideal MHD . . . . . . . . . . . . . . . . . . . . . . . . 9
1.2.4 Other Equation Sets for MHD . . . . . . . . . . . . . 10
1.2.5 Conservation Form . . . . . . . . . . . . . . . . . . . . 10
1.2.6 Boundary Conditions . . . . . . . . . . . . . . . . . . 12
1.3 Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.3.1 Characteristics in Ideal MHD . . . . . . . . . . . . . . 16
1.3.2 Wave Dispersion Relation in Two-Fluid MHD . . . . . 23
1.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2 Introduction to Finite Difference Equations 27
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.2 Implicit and Explicit Methods . . . . . . . . . . . . . . . . . 29
2.3 Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
2.4 Consistency, Convergence, and Stability . . . . . . . . . . . 31
2.5 Von Neumann Stability Analysis . . . . . . . . . . . . . . . 32
2.5.1 Relation to Truncation Error . . . . . . . . . . . . . . 36
2.5.2 Higher-Order Equations . . . . . . . . . . . . . . . . . 37
2.5.3 Multiple Space Dimensions . . . . . . . . . . . . . . . 39
2.6 Accuracy and Conservative Differencing . . . . . . . . . . . 39
2.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
vii
viii Table of Contents
3 Finite Difference Methods for Elliptic Equations 45
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
3.2 One-Dimensional Poisson’s Equation . . . . . . . . . . . . . 46
3.2.1 Boundary Value Problems in One Dimension . . . . . 46
3.2.2 Tridiagonal Algorithm . . . . . . . . . . . . . . . . . 47
3.3 Two-Dimensional Poisson’s Equation . . . . . . . . . . . . . 48
3.3.1 Neumann Boundary Conditions . . . . . . . . . . . . 50
3.3.2 Gauss Elimination . . . . . . . . . . . . . . . . . . . . 53
3.3.3 Block-Tridiagonal Method . . . . . . . . . . . . . . . 56
3.3.4 General Direct Solvers for Sparse Matrices . . . . . . . 57
3.4 Matrix Iterative Approach . . . . . . . . . . . . . . . . . . . 57
3.4.1 Convergence . . . . . . . . . . . . . . . . . . . . . . . 59
3.4.2 Jacobi’s Method . . . . . . . . . . . . . . . . . . . . . 60
3.4.3 Gauss–Seidel Method . . . . . . . . . . . . . . . . . . 60
3.4.4 Successive Over-Relaxation Method (SOR) . . . . . . 61
3.4.5 Convergence Rate of Jacobi’s Method . . . . . . . . . 61
3.5 Physical Approach to Deriving Iterative Methods . . . . . . 62
3.5.1 First-Order Methods . . . . . . . . . . . . . . . . . . 63
3.5.2 Accelerated Approach: Dynamic Relaxation . . . . . 65
3.6 Multigrid Methods . . . . . . . . . . . . . . . . . . . . . . . 66
3.7 Krylov Space Methods . . . . . . . . . . . . . . . . . . . . . 70
3.7.1 Steepest Descent and Conjugate Gradient . . . . . . 72
3.7.2 Generalized Minimum Residual (GMRES) . . . . . . 76
3.7.3 Preconditioning . . . . . . . . . . . . . . . . . . . . . 80
3.8 Finite Fourier Transform . . . . . . . . . . . . . . . . . . . . 82
3.8.1 Fast Fourier Transform . . . . . . . . . . . . . . . . . 83
3.8.2 Application to 2D Elliptic Equations . . . . . . . . . 86
3.9 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
4 Plasma Equilibrium 93
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
4.2 Derivation of the Grad–Shafranov Equation . . . . . . . . . 93
4.2.1 Equilibrium with Toroidal Flow . . . . . . . . . . . . . 95
4.2.2 Tensor Pressure Equilibrium . . . . . . . . . . . . . . 97
4.3 The Meaning of Ψ . . . . . . . . . . . . . . . . . . . . . . . . 99
4.4 Exact Solutions . . . . . . . . . . . . . . . . . . . . . . . . . 102
4.4.1 Vacuum Solution . . . . . . . . . . . . . . . . . . . . 102
4.4.2 Shafranov–Solov´ev Solution . . . . . . . . . . . . . . . 104
4.5 Variational Forms of the Equilibrium Equation . . . . . . . 105
4.6 Free Boundary Grad–Shafranov Equation . . . . . . . . . . 106
4.6.1 Inverting the Elliptic Operator . . . . . . . . . . . . . 107
4.6.2 Iterating on J
φ
(R, Ψ) . . . . . . . . . . . . . . . . . . 107
4.6.3 Determining Ψ on the Boundary . . . . . . . . . . . . 109
4.6.4 Von Hagenow’s Method . . . . . . . . . . . . . . . . . 111
4.6.5 Calculation of the Critical Points . . . . . . . . . . . 113
Table of Contents ix
4.6.6 Magnetic Feedback Systems . . . . . . . . . . . . . . 114
4.6.7 Summary of Numerical Solution . . . . . . . . . . . . 116
4.7 Experimental Equilibrium Reconstruction . . . . . . . . . . . 116
4.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
5 Magnetic Flux Coordinates in a Torus 121
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
5.2 Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
5.2.1 Jacobian . . . . . . . . . . . . . . . . . . . . . . . . . 122
5.2.2 Basis Vectors . . . . . . . . . . . . . . . . . . . . . . . 124
5.2.3 Grad, Div, Curl . . . . . . . . . . . . . . . . . . . . . 125
5.2.4 Metric Tensor . . . . . . . . . . . . . . . . . . . . . . . 127
5.2.5 Metric Elements . . . . . . . . . . . . . . . . . . . . . 127
5.3 Magnetic Field, Current, and Surface Functions . . . . . . . 129
5.4 Constructing Flux Coordinates from Ψ(R, Z) . . . . . . . . . 131
5.4.1 Axisymmetric Straight Field Line Coordinates . . . . 133
5.4.2 Generalized Straight Field Line Coordinates . . . . . 135
5.5 Inverse Equilibrium Equation . . . . . . . . . . . . . . . . . 136
5.5.1 q-Solver . . . . . . . . . . . . . . . . . . . . . . . . . . 137
5.5.2 J-Solver . . . . . . . . . . . . . . . . . . . . . . . . . . 138
5.5.3 Expansion Solution . . . . . . . . . . . . . . . . . . . . 139
5.5.4 Grad–Hirshman Variational Equilibrium . . . . . . . . 140
5.5.5 Steepest Descent Method . . . . . . . . . . . . . . . . 144
5.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
6 Diffusion and Transport in Axisymmetric Geometry 149
6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
6.2 Basic Equations and Orderings . . . . . . . . . . . . . . . . 149
6.2.1 Time-Dependent Coordinate Transformation . . . . . 151
6.2.2 Evolution Equations in a Moving Frame . . . . . . . 153
6.2.3 Evolution in Toroidal Flux Coordinates . . . . . . . . 155
6.2.4 Specifying a Transport Model . . . . . . . . . . . . . 158
6.3 Equilibrium Constraint . . . . . . . . . . . . . . . . . . . . . 162
6.3.1 Circuit Equations . . . . . . . . . . . . . . . . . . . . . 163
6.3.2 Grad–Hogan Method . . . . . . . . . . . . . . . . . . . 163
6.3.3 Taylor Method (Accelerated) . . . . . . . . . . . . . . 164
6.4 Time Scales . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
6.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
7 Numerical Methods for Parabolic Equations 171
7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
7.2 One-Dimensional Diffusion Equations . . . . . . . . . . . . . 171
7.2.1 Scalar Methods . . . . . . . . . . . . . . . . . . . . . . 172
7.2.2 Non-Linear Implicit Methods . . . . . . . . . . . . . . 175
7.2.3 Boundary Conditions in One Dimension . . . . . . . . 179
x Table of Contents
7.2.4 Vector Forms . . . . . . . . . . . . . . . . . . . . . . . 180
7.3 Multiple Dimensions . . . . . . . . . . . . . . . . . . . . . . . 183
7.3.1 Explicit Methods . . . . . . . . . . . . . . . . . . . . . 183
7.3.2 Fully Implicit Methods . . . . . . . . . . . . . . . . . 184
7.3.3 Semi-Implicit Method . . . . . . . . . . . . . . . . . . 184
7.3.4 Fractional Steps or Splitting . . . . . . . . . . . . . . . 185
7.3.5 Alternating Direction Implicit (ADI) . . . . . . . . . 186
7.3.6 Douglas–Gunn Method . . . . . . . . . . . . . . . . . 187
7.3.7 Anisotropic Diffusion . . . . . . . . . . . . . . . . . . 188
7.3.8 Hybrid DuFort–Frankel/Implicit Method . . . . . . . 190
7.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
8 Methods of Ideal MHD Stability Analysis 195
8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
8.2 Basic Equations . . . . . . . . . . . . . . . . . . . . . . . . . 195
8.2.1 Linearized Equations about Static Equilibrium . . . . 195
8.2.2 Methods of Stability Analysis . . . . . . . . . . . . . . 199
8.2.3 Self-Adjointness of F . . . . . . . . . . . . . . . . . . . 200
8.2.4 Spectral Properties of F . . . . . . . . . . . . . . . . . 201
8.2.5 Linearized Equations with Equilibrium Flow . . . . . 203
8.3 Variational Forms . . . . . . . . . . . . . . . . . . . . . . . . 204
8.3.1 Rayleigh Variational Principle . . . . . . . . . . . . . . 204
8.3.2 Energy Principle . . . . . . . . . . . . . . . . . . . . . 205
8.3.3 Proof of the Energy Principle . . . . . . . . . . . . . . 206
8.3.4 Extended Energy Principle . . . . . . . . . . . . . . . 207
8.3.5 Useful Identities . . . . . . . . . . . . . . . . . . . . . 208
8.3.6 Physical Significance of Terms in δW
f
. . . . . . . . . 210
8.3.7 Comparison Theorem . . . . . . . . . . . . . . . . . . 211
8.4 Cylindrical Ge ometry . . . . . . . . . . . . . . . . . . . . . . 213
8.4.1 Eigenmode Equations and Continuous Spectra . . . . 214
8.4.2 Vacuum Solution . . . . . . . . . . . . . . . . . . . . 215
8.4.3 Reduction of δW
f
. . . . . . . . . . . . . . . . . . . . 216
8.5 Toroidal Geometry . . . . . . . . . . . . . . . . . . . . . . . 219
8.5.1 Eigenmode Equations and Continuous Spectra . . . . 220
8.5.2 Vacuum Solution . . . . . . . . . . . . . . . . . . . . 223
8.5.3 Global Mode Reduction in Toroidal Geometry . . . . 225
8.5.4 Ballooning Modes . . . . . . . . . . . . . . . . . . . . 226
8.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
9 Numerical Methods for Hyperbolic Equations 235
9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
9.2 Explicit Centered-Space Methods . . . . . . . . . . . . . . . 235
9.2.1 Lax–Friedrichs Method . . . . . . . . . . . . . . . . . 236
9.2.2 Lax–Wendroff Methods . . . . . . . . . . . . . . . . . 237
9.2.3 MacCormack Differencing . . . . . . . . . . . . . . . . 238
Table of Contents xi
9.2.4 Leapfrog Method . . . . . . . . . . . . . . . . . . . . 239
9.2.5 Trapezoidal Leapfrog . . . . . . . . . . . . . . . . . . . 241
9.3 Explicit Upwind Differencing . . . . . . . . . . . . . . . . . 242
9.3.1 Beam–Warming Upwind Method . . . . . . . . . . . . 244
9.3.2 Upwind Methods for Systems of Equations . . . . . . 245
9.4 Limiter Methods . . . . . . . . . . . . . . . . . . . . . . . . . 247
9.5 Implicit Methods . . . . . . . . . . . . . . . . . . . . . . . . 249
9.5.1 θ-Implicit Method . . . . . . . . . . . . . . . . . . . . 251
9.5.2 Alternating Direction Implicit (ADI) . . . . . . . . . 252
9.5.3 Partially Implicit 2D MHD . . . . . . . . . . . . . . . 253
9.5.4 Reduced MHD . . . . . . . . . . . . . . . . . . . . . . 256
9.5.5 Method of Differential Approximation . . . . . . . . . 257
9.5.6 Semi-Implicit Method . . . . . . . . . . . . . . . . . . 260
9.5.7 Jacobian-Free Newton–Krylov Method . . . . . . . . . 262
9.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
10 Spectral Methods for Initial Value Problems 267
10.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
10.1.1 Evolution Equation Example . . . . . . . . . . . . . . 268
10.1.2 Classification . . . . . . . . . . . . . . . . . . . . . . . 269
10.2 Orthogonal Expansion Functions . . . . . . . . . . . . . . . . 269
10.2.1 Continuous Fourier Expansion . . . . . . . . . . . . . 270
10.2.2 Discrete Fourier Expansion . . . . . . . . . . . . . . . 272
10.2.3 Chebyshev Polynomials in (−1, 1) . . . . . . . . . . . 273
10.2.4 Discrete Chebyshev Series . . . . . . . . . . . . . . . 277
10.3 Non-Linear Problems . . . . . . . . . . . . . . . . . . . . . . 278
10.3.1 Fourier Galerkin . . . . . . . . . . . . . . . . . . . . . 278
10.3.2 Fourier Collocation . . . . . . . . . . . . . . . . . . . . 279
10.3.3 Chebyshev Tau . . . . . . . . . . . . . . . . . . . . . . 280
10.4 Time Discre tization . . . . . . . . . . . . . . . . . . . . . . . 281
10.5 Implicit Example: Gyrofluid Magnetic Reconnection . . . . . 283
10.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
11 The Finite Element Method 289
11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
11.2 Ritz Method in One Dimension . . . . . . . . . . . . . . . . 289
11.2.1 An Example . . . . . . . . . . . . . . . . . . . . . . . 290
11.2.2 Linear Elements . . . . . . . . . . . . . . . . . . . . . 290
11.2.3 Some Definitions . . . . . . . . . . . . . . . . . . . . . 293
11.2.4 Error with Ritz Method . . . . . . . . . . . . . . . . . 294
11.2.5 Hermite Cubic Elements . . . . . . . . . . . . . . . . 295
11.2.6 Cubic B-Splines . . . . . . . . . . . . . . . . . . . . . 298
11.3 Galerkin Method in One Dimension . . . . . . . . . . . . . . 301
11.4 Finite Elements in Two Dimensions . . . . . . . . . . . . . . 304
11.4.1 High-Order Nodal Elements in a Quadrilateral . . . . 305
xii Table of Contents
11.4.2 Spectral Elements . . . . . . . . . . . . . . . . . . . . 309
11.4.3 Triangular Elements with C
1
Continuity . . . . . . . 310
11.5 Eigenvalue Problems . . . . . . . . . . . . . . . . . . . . . . 316
11.5.1 Spectral Pollution . . . . . . . . . . . . . . . . . . . . 318
11.5.2 Ideal MHD Stability of a Plasma Column . . . . . . . 320
11.5.3 Accuracy of Eigenvalue Solution . . . . . . . . . . . . 322
11.5.4 Matrix Eigenvalue Problem . . . . . . . . . . . . . . . 323
11.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
Bibliography 325
Index 341
List of Figures
1.1 Gaussian pill box is used to derive jump conditions between
two regions. . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.2 Characteristic curves dx/dt = u. All information is propagated
along these lines. . . . . . . . . . . . . . . . . . . . . . . . . 14
1.3 Space is divided into two regions by characteristic curves. . . 15
1.4 Domain of dependence (l) and domain of influence (r). . . . 16
1.5 Characteristics in two spatial dimensions. . . . . . . . . . . . 17
1.6 Reciprocal normal surface diagram in low-β limit. . . . . . . 20
1.7 Ray surface diagram in low-β limit. . . . . . . . . . . . . . . 21
1.8 Typical dispersion relation for low-β two-fluid MHD for differ-
ent angles of propagation relative to the background magnetic
field. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.1 Space time discrete points. . . . . . . . . . . . . . . . . . . . 28
2.2 Domain of dependence of the point (x
j
, t
n
) for an (a) explicit
and (b) implicit finite difference method. . . . . . . . . . . . 30
2.3 Amplification factor, r (solid), must lie within the unit circle
(dashed) in the complex plane for stability. . . . . . . . . . . 35
2.4 Density and velocity variables are defined at staggered
locations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
2.5 Finite volume method. . . . . . . . . . . . . . . . . . . . . . 41
3.1 Computational grid for Neumann boundary conditions. . . . 52
3.2 Multigrid method sequence of grids. . . . . . . . . . . . . . . 67
3.3 Basic coarse grid correction. . . . . . . . . . . . . . . . . . . 68
3.4 Full Multigrid V-cycle (FMV). . . . . . . . . . . . . . . . . . 69
4.1 Cylindrical coordinates (R, φ, Z). . . . . . . . . . . . . . . . 94
4.2 Calculate magnetic flux associated with disk in the z = 0 plane
as shown. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
4.3 Poloidal magnetic flux contours for a typical tokamak dis-
charge at three times. . . . . . . . . . . . . . . . . . . . . . . 101
4.4 For an axisymmetric system, the vacuum toroidal field con-
stant g
0
is proportional to the total current in the toroidal
field coils, I
T F
. . . . . . . . . . . . . . . . . . . . . . . . . . 104
xiii
xiv List of Figures
4.5 Poloidal flux Ψ on the boundary of the computational domain
is obtained from a Green’s function. External coils are repre-
sented as discrete circular current loops. . . . . . . . . . . . 110
4.6 Singularity due to self-field term is resolved by taking the limit
as approaches zero from the outside . . . . . . . . . . . . . 112
4.7 Poloidal flux at magnetic axis, Ψ
0
, is a local minimum. Limiter
value of flux, Ψ
, is the minimum of the value of the flux at
the limiter points and at the saddle points. . . . . . . . . . . 113
4.8 A double-nested iteration loop is used to converge the interior
and boundary values. . . . . . . . . . . . . . . . . . . . . . . 116
5.1 Flux coordinates ψ and θ. . . . . . . . . . . . . . . . . . . . 122
5.2 Two definitions of the angle θ are illustrated. Many more are
possible. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
5.3 Choosing the Jacobian determines both the (a) ψ and the (b)
θ coordinate. . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
5.4 The vector
∂f
∂ψ
is proportional to the projection of ∇f in the
direction orthogonal to the other remaining coordinates, and
not in the ∇ψ direction. . . . . . . . . . . . . . . . . . . . . 126
5.5 In the inverse representation we consider the cylindrical coor-
dinates R and Z to be functions of ψ and θ. . . . . . . . . . 128
5.6 Points on a constant Ψ contour are found using root-finding
techniques. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
5.7 With straight field line angular coordinates, magnetic field
lines on a surface ψ=const. appear as straight lines when plot-
ted in (θ, φ) space. . . . . . . . . . . . . . . . . . . . . . . . 134
6.1 u
C
is the velocity of a fluid element with a given ψ,θ value
relative to a fixed Cartesian frame. . . . . . . . . . . . . . . 152
7.1 Comparison of the convergence properties of the Backward
Euler method (BTCS) and the non-linear implicit Newton it-
erative method. . . . . . . . . . . . . . . . . . . . . . . . . . 179
7.2 Cylindrical symmetry restricts the allowable terms in a Taylor
series expansion in x and y about the origin. . . . . . . . . . 180
7.3 Temperatures are defined at equal intervals in δΦ, offset
1
2
δΦ
from the origin so that the condition of zero flux can be im-
posed there. . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
7.4 Hybrid DuFort–Frankel/implicit method. . . . . . . . . . . . 191
8.1 In ideal MHD, plasma is surrounded by either a vacuum region
or a pressureless plasma, which is in turn surrounded by a
conducting wall. . . . . . . . . . . . . . . . . . . . . . . . . . 196
8.2 ξ(x, t) is the displacement field. . . . . . . . . . . . . . . . . 197
List of Figures xv
8.3 The physical boundary conditions are applied at the per-
turb e d boundary, which is related to the unperturbed bound-
ary through the displacement field ξ(x, t). . . . . . . . . . . 198
8.4 A typical ideal MHD spectrum. . . . . . . . . . . . . . . . . 202
8.5 Straight circular cylindrical geometry with periodicity length
2πR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
8.6 All physical quantities must satisfy periodicity requirements
Φ(ψ, θ, β) = Φ(ψ, θ, β + 2π)= Φ(ψ, θ + 2π, β −2πq). . . . . . 229
8.7 A solution with the correct periodicity properties is con-
structed by taking a linear superposition of an infinite number
of offset aperiodic solutions. . . . . . . . . . . . . . . . . . . 230
9.1 In the combined DuFort–Frankel/leapfrog method, the space-
time points at odd and even values of n + j are completely
decoupled. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
9.2 Staggering variables in space and time can remove the decou-
pled grid problem from leapfrog. . . . . . . . . . . . . . . . . 241
9.3 The upwind method corresponds to linear interpolation for
the point where the characteristic curve intersects time level
n as long as s ≡ uδt/δx ≤ 1 . . . . . . . . . . . . . . . . . . 243
9.4 Characteristics for the Alfv´en and fast magnetoacoustic waves
for fully explicit and partially implicit m ethods. . . . . . . . 250
10.1 Example of a k = 2 and k = 2 + N mode aliasing on a grid
with N = 8. The two modes take on the same values at the
grid points. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
11.1 Linear finite elements φ
j
equals 1 at node j, 0 at all others,
and are linear in between. A half element is associated with
the boundary nodes at j = 0 and j = N. . . . . . . . . . . . 291
11.2 Expressions needed for overlap integrals for functions (a) and
derivatives (b) for linear elements. . . . . . . . . . . . . . . . 292
11.3 C
1
Hermite cubic functions enforce continuity of v(x) and
v
(x). A linear combination of these two functions is associated
with node j. . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
11.4 The basic cubic B-spline is a piecewise cubic with continuous
value, first, and se cond derivatives. . . . . . . . . . . . . . . 299
11.5 Overlapping elements for cubic B-spline. A given element over-
laps with itself and six neighbors. . . . . . . . . . . . . . . . 300
11.6 Boundary conditions at x = 0 are set by specifying φ
−1
(Dirichlet) or constraining a linear combination of φ
−1
and
φ
0
(Neumann). . . . . . . . . . . . . . . . . . . . . . . . . . 301
11.7 Band structure of the matrix g
kj
that arises when the Galerkin
method for a second-order differential equation is implemented
using cubic B-spline elements. . . . . . . . . . . . . . . . . . 304
xvi List of Figures
11.8 Rectangular elements cannot be lo cally refined without in-
troducing hanging nodes. Triangular elements can be locally
refined, but require unstructured mesh data structures in pro-
gramming. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
11.9 Each arbitrary quadrilateral element in the Cartesian space
(x, y) is mapped into the unit square in the logical space for
that element, (ξ, η). . . . . . . . . . . . . . . . . . . . . . . . 306
11.10 Relation between global numbering and local numbering in
one dimension. . . . . . . . . . . . . . . . . . . . . . . . . . . 307
11.11 Reduced quintic finite element. . . . . . . . . . . . . . . . . 311
List of Tables
5.1 The poloidal angle θ is determined by the function h(ψ, θ) in
the Jacobian as defined in Eq. (5.40). . . . . . . . . . . . . . 133
5.2 Once the θ coordinate is determined, the ψ coordinate can be
determined by the function f (ψ) in the Jacobian definition,
Eq. (5.40). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
11.1 Exponents of ξ and η for the reduced quintic expansion
φ(ξ, η) =
20
i=1
a
i
ξ
m
i
η
n
i
. . . . . . . . . . . . . . . . . . . . . 312
xvii
Preface
What is computational physics? Here, we take it to mean techniques for simu-
lating continuous physical systems on computers. Since mathematical physics
expresses these systems as partial differential equations, an equivalent state -
ment is that computational physics involves solving systems of partial differ-
ential equations on a computer.
This book is meant to provide an introduction to computational physics
to students in plasma physics and related disciplines. We present most of the
basic concepts needed for numerical solution of partial differential equations.
Besides numerical stability and accuracy, we go into many of the algorithms
used today in enough depth to be able to analyze their stability, efficiency,
and scaling properties. We attempt to thereby provide an introduction to and
working knowledge of most of the algorithms presently in use by the plasma
physics community, and hope that this and the references can point the way
to more advanced study for those interested in pursuing such endeavors.
The title of the book starts with Computational Methods , not All Com-
putational Methods Perhaps it should be Some Computational Methods
because it admittedly does not cover all computational methods being used
in the field. The material emphasizes m athematical models where the plasma
is treated as a conducting fluid and not as a kinetic gas. This is the most ma-
ture plasma model and also arguably the one most applicable to experiments.
Many of the basic numerical techniques covered here are also appropriate
for the equations one encounters when working in a higher-dimensional phase
space. The book also emphasizes toroidal confinement geometries, particularly
the tokamak, as this is the most mature and most successful configuration for
confining a high-temperature plasma.
There is not a clear dividing line between computational and theoretical
plasma physics. It is not possible to perform meaningful numerical simulations
if one does not start from the right form of the equations for the questions
being asked, and it is not possible to develop new advanced algorithms unless
one has some understanding of the underlying mathematical and physical
prop e rties of the equation systems being solved. Therefore, we include in this
book many topics that are not always considered “com putational physics,”
but which are esse ntial for a computational plasma physicist to understand.
This more theoretical material, such as oc curs in Chapters 1, 6, and 8 as well
as parts of Chapters 4 and 5, can be skipped if students are exposed to it in
other courses, but they may still find it useful for reference and context.
xix
xx Computational Methods in Plasma Physics
The author has taught a semester class with the title of this book to
graduate students at Princeton University for over 20 years. The students
are mostly from the Plasma Physics, Physics, Astrophysics, and Mechanical
and Aerospace Engineering departments. There are no prerequisites, and most
students have very little prior exposure to numerical methods, especially for
partial differential equations. The material in the book has grown considerably
during the 20-plus years, and there is now too much material to cover in a
one-semester class. Chapters 2, 3, 7, 9, and perhaps 10 and 11 form the core
of the material, and an instructor can choose which material from the other
chapters would be suitable for his students and their needs and interests. A
two-semester course covering most of the material is also a possibility.
Computers today are incredibly powerful, and the types of e quations we
need to solve to model the dynamics of a fusion plasma are quite complex.
The challenge is to be able to develop suitable algorithms that lead to stable
and accurate solutions that can span the relevant time and space scales. This
is one of the most challenging research topics in modern-day science, and the
payoffs are enormous. It is hoped that this book will help students and young
researchers embark on productive careers in this area.
The author is indebted to his many colleagues and associates for innu-
merable suggestions and other contributions. He acknowledges in particular
M. Adams, R. Andre, J. Breslau, J. Callen, M. Chance, J. Chen, C. Cheng,
C. Chu, J. DeLucia, N. Ferraro, G. Fu, A. Glasser, J. Greene, R. Grimm, G.
Hammett, T. Harley, S. Hirshman, R. Hofmann, J. Johnson, C. Kessel, D.
Keyes, K. Ling, S. Lukin, D. McCune, D. Monticello, W. Park, N. Pomphrey,
J. Ramos, J. Richter, K. Sakaran, R. Samtaney, D. Schnack, M. Sekora, S.
Smith, C. Sovinec, H. Strauss, L. Sugiyama, D. Ward, and R. White.
Stephen C. Jardin
Princeton, NJ
List of Symbols
x position coordinate
v velocity coordinate
t time
f
j
probability distribution
function for species j
q
j
electrical charge of species j
m
j
mass of species j
E electric field
B magnetic field
µ
0
permeability of free space
0
permittivity of free space
c speed of light in vacuum
ρ
q
electrical charge density
C
j
net effect of scattering on
species j
C
jj
effect of scattering due to
collisions betwen particles
of species j and j
S
j
source of particles, momen-
tum, or energy for species j
n
j
numb e r density of species j
u
j
fluid velocity of species j
p
j
pressure of species j
π
j
stress tensor for species j
Q
j
external source of energy
density for species j
ˆ
M
j
external source of momen-
tum density for species j
Q
∆j
collisional source of energy
density for species j
q
j
random heat flux vector for
species j
k
B
Boltzmann constant
ω
pe
electron plasma frequency
λ
D
Debye length
ρ mass density
n number density when quasi-
neutrality is assumed
e electron charge
u fluid (mass) velocity
p sum of electron and ion
pressures
J electrical current density
q sum of electron and ion ran-
dom heat fluxes
W rate of strain tensor
π
gyr
i
ion gyroviscous stress tensor
I identity matrix
u
∗
ion magnetization velocity
q
∧j
collision-indep e ndent
heat flux for species j
µ isotropic shear viscosity
µ
c
isotropic volume viscosity
µ
parallel viscosity
η
parallel resistivity
η
⊥
perpendicular resistivity
η average (isotropic) resistiv-
ity
Z charge state of ion
ln λ Coulomb logarithm
T
j
temperature of species j
κ
j
parallel thermal conductiv-
ity of species j
κ
j
⊥
perpendicular thermal con-
ductivity of species j
R
j
plasma friction force acting
on species j
λ
H
hyper-resistivity coefficient
τ
R
resistive diffusion time
τ
A
Alfv´en transit time
xxi
xxii Computational Methods in Plasma Physics
S magnetic Lundquist num-
ber
γ adiabatic index
s entropy density
ˆ
x
i
unit vector associated with
Cartesian coordinate x
i
B
i
i
th
Cartesian component of
the magnetic field
c
S
sound speed
V
A
Alfv´en velocity
Chapter 1
Introduction to
Magnetohydrodynamic Equations
1.1 Introduction
A high-temperature magnetized plasma such as exists in modern magnetic
fusion experiments is one of the most complex media in existence. Although
adequately described by classical physics (augmented with atomic and nuclear
physics as required to describe the possible interaction with neutral atoms and
the energy release due to nuclear reactions), the wide range of time scales and
space scales present in the most general mathematical description of plasmas
make meaningful numerical simulations which span these scales enormously
difficult. This is the motivation for deriving and solving reduced systems of
equations that purport to describe plasma phenomena over restricted ranges
of time and space scales, but are more amenable to numerical solution.
The most basic set of equations describing the six dimension plus time
(x, v, t) phase space probability distribution function f
j
(x, v, t) for species j
of indistinguishable charged particles (electrons or a particular species of ions)
is a system of Boltzmann equations for each species:
∂f
j
(x, v, t)
∂t
+ ∇ ·(vf
j
(x, v, t)) + ∇
v
·
q
j
m
j
(E + v × B)f
j
(x, v, t)
= C
j
+ S
j
. (1.1)
Here m
j
is the particle mass and q
j
is the particle charge for species j. The
collision operator C
j
=
j
C
jj
represents the effect of scattering due to
collisions between particles of species j and j. External sources of particles,
momentum, and energy are represented by S
j
. The electric and magnetic fields
E(x, t) and B(x, t) are obtained by solving the free space Maxwell’s equations
1
2 Computational Methods in Plasma Physics
(SI units):
∂B
∂t
= −∇× E, (1.2)
∇ × B =
1
c
2
∂E
∂t
+ µ
0
J, (1.3)
∇ · E =
1
0
ρ
q
, (1.4)
∇ · B = 0, (1.5)
with charge and current density given by the following integrals over velocity
space:
ρ
q
=
j
q
j
d
3
vf
j
(x, v, t), (1.6)
J =
j
q
j
d
3
vvf
j
(x, v, t). (1.7)
Here
0
= 8.8542×10
−12
F m
−1
and µ
0
= 4π ×10
−7
Hm
−1
are the permittivity
and permeability of free space, and c = (
0
µ
0
)
−1/2
= 2.9979 ×10
8
ms
−1
is the
speed of light.
These equations form the starting point for some studies of fine-scale
plasma turbulence and for studies of the interaction of imposed radio-
frequency (RF) electromagnetic waves with plasma. However, the focus here
will be to take velocity moments of Eq. (1.1), and appropriate sums over
species, so as to obtain fluid-like equations that describe the macroscopic dy-
namics of magnetized high-temperature plasma, and to discuss techniques for
their numerical solution.
The first three velocity moments correspond to conservation of particle
numb e r, momentum, and energy. Operating on Eq. (1.1) with the velocity
space integrals
d
3
v,
d
3
vm
j
v, and
d
3
vm
j
v
2
/2 yields the following mo-
ment equations:
∂n
j
∂t
+ ∇ ·(n
j
u
j
) =
ˆ
S
j
, (1.8)
∂
∂t
(m
j
n
j
u
j
) + ∇· (m
j
n
j
u
j
u
j
) + ∇p
j
+ ∇ ·π
j
= q
j
n
j
(E + u
j
× B) + R
j
+
ˆ
M
j
, (1.9)
∂
∂t
3
2
p
j
+
1
2
m
j
n
j
u
2
j
+ ∇·
1
2
m
j
n
j
u
2
j
u
j
+
5
2
p
j
u
j
+ π
j
· u
j
+ q
j
= (R
j
+ q
j
n
j
E) · u
j
+ Q
j
+ Q
∆j
. (1.10)