Computational Modeling of Fully Ionized Magnetized Plasmas Using the Fluid Approximation Dalton D. Schnack Center for Energy and Space Science Center for Magnetic Self-Organization in Space and Laboratory Plasmas Science Applications International Corp. San Diego, CA 92121 USA
Co-conspirators D. C. Barnes, Univ. Colorado, Boulder D. P. Brennan, MIT and GA C. Hegna, Univ. Wisconsin, Madison E. Held, Utah State Univ., Logan C. Kim, Univ. Washington, Seattle S. E. Kruger, TechX Corp., Boulder A. Y. Pankin, SAIC, San Diego C. R. Sovinec, Univ. Wisconsin, Madison + The NIMROD Team
Acknowledgements E. Belova A. Glasser S. Jardin J-N. Leboeuf J. Ramos L. Sugiyama CEMM Pioneering work: Theory J. Callen Multi-level modeling G. Fu W. Park S. Parker H. Strauss
Special Acknowledgement Prof. John Killeen Pioneer in computational physics Proponent of using implicit methods and primitive equations Founding Director of NERSC (CTRCC) Leader and mentor
The Problem Compute the low frequency dynamics of hot magnetized plasmas in realistic geometry in the presence of high frequency oscillations Incorporate the effects of lowest order kinetic corrections to the usual MHD equations Develop accurate and efficient algorithms that enable these goals
Modeling Magnetized Plasmas Plasma kinetic equation d dt f " (x,v,t) = #f " + v$ %f " + q " #t Maxwell s equations m " "B "t = #$ % E $ & E = ' q ( E + v & B)$ % v f " = ( C ",' ( f ", f ' ) ' q = * q ( ) f ( d 3 v $ % B # "E "t = µ 0J J = * q ( ) f ( vd 3 v ( ( Contains all information about plasma dynamics Impossible to solve analytically except in special cases Impractical for low frequencies, global geometry '
Fluid equations defined by taking moments of distribution function Define moments of distribution function M n (x, t) = # $ f (x, v, t)v n dv "# Knowledge of N moments allows (in principle) reconstruction of f at N points in velocity space N moments of plasma kinetic equation => N fluid equations satisfied by M N+1 Each additional moment equation yields more information about velocity distribution Must truncate moment equation hierarchy Approximate solution of kinetic equation
Closure of Moment Equations Use low-order truncation and closures Need to express high-order moments in terms of low-order moments q = q[ n,t,... ], " = "( p, V,...) Must be obtained from approximate solution of kinetic equation Analytical Numerical There is no general agreement on the closure of the moment equations for hot, magnetized plasmas!
Two-fluid Equations (m e ~ 0, n e ~ n i ) Lowest order moments for ions and electrons: "n "t = #$ % nv e = #$ % nv i = #$p i + ne( E + V i & B) # $ % ' i + R mn dv i dt 0 = #$p e # ne E + V e & B + Energy equation (+??) ( ) # $ % ' e # R ( ) J = ne V i # V e + Maxwell s equations (V 2 /c 2 <<1) + Closure expressions
Two-Fluid Equations Present Challenges for Computation Extreme separation of time scales { " A Alfvén transit time < { " S Sound transit time << " evol MHD evolution time { << { " R Extreme separation of spatial scales Internal boundary layers, localized and extended along magnetic field lines δ /L ~ S -α << 1 for S >> 1 Extreme anisotropy E.g., accurate treatment of B., χ /χ ~ 10 10, etc. Parasitic modes S = τ R /τ A Resistive diffusion time High frequency modes inherent in the formulation that may affect the low frequency dynamics
Dealing with Parasitic Modes The fundamental problem of computational MHD: Compute low frequency dynamics in presence of high frequency parasitic modes Reduction of mathematical model Eliminate parasitic modes analytically Example: V = 0 eliminates sound waves Strong toroidal field allows elimination of fast waves from MHD model Primitive equations and strongly implicit methods No analytic reduction of equations Use algorithms that allow very large time steps (CFL ~ 10 4-5 ) Will concentrate on the second approach
There are Different Fluid Models Within fluid formulation, different terms are important in different parameter regimes Leads to different fluid models of plasmas MHD Hall MHD Drift MHD Transport Models distinguished by degree of force balance Obtained by non-dimensionalizing equations and systematically ordering small parameters: " = # i / L << 1, $ = % / & i, ' = V /V thi
Non-dimensional Equations Continuity: Ion momentum: Electron momentum: Pre-Maxwell: Orderings: Normalizations: "% #V i #t " #n #t = $%&'( nv i = $%&'( nv e +% 2 &V i ( 'V i = $ 1 n & * 'p i + ) i0 -, '( ) i / +% ( E+ V i 0 B), + p 0. %E= $%V e 0 B$ 1 n & * 'p e + ) e0 -, '( ) e / + p 0. " #B #t = $%&'0 E, J =%'0 B, J = n ( V i $ V e ) " = 1 2, % = V 0, & = 3 i V thi L << 1 time flow length 2 E 0 =V 0 B 0, J 0 = n 0 ev 0, p 0 = mn 0 V thi
Equation of Motion and Generalized Ohm s Law Adding and subtracting ion and electron equations: "J # B $ 1 n %&p * = n '" (V i +" 2 -, %V i ) &V i / $ 1 14 2443 + (t. n % 0 i0 & ) 0 i p 1444444 244444 0 443 "Equilibrium" forces Dynamical response "( E + V i # B) 1 42 44 3 = " 1 n J # B $% 1 ) n &p e + ' e0, + & ( ' e. * p 144444 2444 0 4443 - Ideal MHD 2- fluid and FLR effects V B and J B enter at same order in ξ
Stress Tensor Scaling " = " + "^ + " # " = bb# " "^ = (I $ b) # " " % = (I & bb) # " Component Scaling Remarks " / p 0 (Braginskii) #$ /(% / &) D iverges for low collisionality ( % / & ~ $ 2 ) " / p 0 (Neo-classical) " ' / p 0 (# /$)(% / &) #$(% / &) "^ / p 0 (Gyro-viscosity) #$ O(#$) at low collisionality R emains in scale Vanishingly small at low collisionality Ignore Independent of collisionality Not dissipative Important FLR effects
Different Orderings Yield Different Fluid Models "J # B $ 1 n %&p * = n '" (V i + " 2 -, %V i ) &V i / $ 1 14 2443 + (t. n % 0 i0 & ) 0 i p 1444444 244444 0 443 " Equilibrium" forces Dynamical response "( E + V i # B) 1 42 44 3 = " 1 n J # B $% 1 ) n &p e + ' e0, + & ( ' e. * p 0 - Ideal MHD 144444 24444443 2- fluid and FLR effects Model V Force Balance Ohm s Law J $ B = n dv i dt E + V i $ B = Hall MHD V th /" # ci MHD V th "# ci Drift MHD "V th " 2 # ci + 1 n "2 (%p + % & ' gv ) + O(" 3 ) ( J $ B = " n dv i + * + %p- ) dt, + " 2 % & ' i gv + O(" 4 )..%p + J $ B = " 2 ( n dv i gv+ * + % & ' ) dt i -, + O(" 4 ) 1 n J $ B + O(" 2 ) E + V i $ B = 1 n J 12 $ 3 B." 1 n %p e O(") = O(") E + V i $ B = 1 ( n J $ B. %p e)
The Standard Drift Model In MHD, V i = E B/ B 2 = V E In drift ordering, V i = V E + V * + O(δ 2 ) Write drift equations in terms of V E : Ohm s Law $ E = " V E + V *i " 1 n J ' & #) * B " 1 % ( n +p e + O(, 2 ), ( ) = "V E * B " 1 n + p e + 1 n "+ # p + J * B 144 2443 + O(,2 ), O(, 2 ) = "V E * B " 1 n + p e Valid only for slight deviations from equilibrium & " 2 ( ( n d ( dt ' Equation of Motion ( ) + n dv *i V i + V E ) gv + + # $ % dt i ( Vi ) + = 1444 24443 + * GVC, #p + J - B + O(" 4 ) Gyro-viscous cancellation gives simplified equations Exact form uncertain Only applicable to slight deviations from equilibrium We ignore for general application
Extended MHD Model Mn dv dt = "#p + J $ B " # % & i " # % & gvi E = "V $ B + 1 ( ne J $ B " #p e " # % & e ) + 'J (B (t = "# $ E, µ 0J = # $ B + Continuity and Energy equations + Closure expressions Encompasses Hall, MHD, and Drift models Terms can be selected by the user GV cancellation not explicitly implemented
Extended MHD Properties Dispersion Contains all MHD modes (ω 2 ~ k 2 ) Introduces dispersive modes (ω 2 ~ k 4 ) Electrons (whistlers) Ions + electrons (kinetic Alfvén wave) Ions only ( gyro-viscous waves) If extended MHD just produced more troublesome parasitic modes, who cares? However.. Stability Drift stabilization at moderate to high k Neo-classical de-stabilization of magnetic islands ++++?
Dispersion in Extended MHD Mode Origin Wave Equation Dispersion Comments Whistler J " B in Ohm # 2 B & #t 2 = $ V 2 ) A ( ' % + * 2 ( b, -) 2-2 B. 2 2 = V Ak 21 1 3 1+ / 0 ik 2 ( ) 2 4 6 5 finite k electron response KAW - p e in Ohm # 2 B #t 2 = & V AV th* ) ( + ' % * 2 ( b, -) 2 [ ] - " bb, - " B. 2 2 2 = V 1 Ak 1+ 0s k 23 7 ( ) 2 4 56 finite k, k 7 ion and electron response Parallel ion GV Perp. ion GV 8 4 term in -, 9 GV 0 #2 V 7 #t 2 = $8 4 2-4 V7 8 3 term in -, 9 GV 0 #V 7 #t 1. L± = V A k ±1+ 1+ / 4 3 ( 0 i k ) 6 2 2 / 5 1. R± = V A k ±1$ 1+ / 4 3 ( 0 i k ) 6 2 2 / 5 = $8 2 3-4 7 V 7. 2 2 21 :/ = V Ak7 3 1+ 2 + / 16 0 ik 7 2 ( ) 2 4 6 5 finite k ion response finite k 7 ion response Notation: 0 i = V th i / % is the ion gyro-radius; V th* = T e / m i ; 0 s = V th* / %; 8 4 = nt i / 2%; 8 3 = 28 4 ω 2 ~ k 4 Δt ~ Δx 2 Requires implicit methods
x Stability: Gravitational Interchange K. V. Roberts and J. B. Taylor, Phys. Rev. Letters 8, 197 (1962). "# "t + $ % #V = 0 ρ k B g y (" # $ ) = % & x 0 ' 0 # dv ' * B2 = &$ p + dt ) ( 2µ, + #g & $ % - 0 + E = &V. B + M / #e # dv dt + $p 2 1 i & #g + $ % -4 0 3 Assume electrostatic: " # E = 0 $ Gyro-viscosity: ( ) ( ikv x + & 0 ' 0 k 2 V y (" # $ ) = % & y ( 0 ' 0 ) ( ikv y % & 0 ' 0 k 2 V x " % V + 1 & " # dv dt ' 1 &( 2 "( # " % ) 14444244443 Extended MHD = 0
G-mode stabilization Dispersion Relation Solution Stabilizing Wave Number MHD (" = 0, # = 0) $ 2 + g% = 0 $ = i g% None 2-Fluid (" = 0, # = 1) Gyro-Viscosity (" = 1, # = 0) $ 2 & gk ' 0 $ + g% = 0 $ 2 &. 0 %k$ + g% = 0 2$ = gk ' 0 ± 2$ =. 0 %k ( gk + * - ), ' 0 2 & 4g% ± (. 0 %k) 2 & 4g% k 2 > 4%' 0 2 g k 2 > 4g. 0 2 % Full Extended MHD (" =1, # =1) $ 2 ( & gk + * +. 0 %k - $ + g% = 0 )' 0, 2$ = gk ' 0 +. 0 %k ± ( gk + * +. 0 %k - )' 0, 2 & 4g% k 2 > 4g% ( g + * +. 0 %- )' 0, 2
Form of the Gyro-viscous Stress (Hooke s Law for a Magnetized Plasma) Braginskii: " ^ = " gv = p ( 4# b$ W )% I + 3bb [ ( ) + transpose] W = "V + "V T # 2 3 I"$ V Suggested modifications for consistency (Mikhailovskii and Tsypin, Hazeltine and Meiss, Simakov and Catto, Ramos) involve adding term proportional to the ion heat rate of strain: "^q = 2 [ 5# b $W q % ( I + 3bb) + transpose] W q = &q i + &q i T ' 2 3 I& % q i Implicit numerical treatment difficult What is the effect of this term on dispersion and stability? Does it introduce new normal modes? Does it alter stability properties?
Ion Heat Stress Has Little Effect on Important Dynamics [ ( ) + transpose] " ^ q = 2 5# b$ W q % I + 3bb W q = &q i + &q i T ' 2 3 I&%q i q = '( & T '( ) & ) T '(^ b$ & ) T " 2 2 =C s k 2 % 1+ f (# ) $i k &' " 0 #V #t = $%p$ %& ' ^ q #p #t = $(p 0 %& V ( ) 2 ( )* f (0) = 0 f (+ / 2) = 1 Dispersive effect on compressional waves, but Negligible effect on g-mode stability Simplification: ignore these terms (for now!)
Careful Computational Approach is Required Spatial approximation Must capture anisotropy and global geometry Flux aligned grids High order finite elements Temporal approximation Must compute for long times Require implicit methods Semi-implicit methods have proven useful
Solenoidal Constraint Faraday: "B "t = #$ % E & " "t $ ' B = 0 Depends on " # "$ = 0 Different discrete approximations Modified wave system Projection Diffusion "U "t + # $ F = R# $ B B " = B + #$ # 2 $ = %# & B "B "t = #$ % E + &$$ ' B, " "t $ ' B = $ '&$$ ' B Grid properties " a # " b $ % 0 E.g., staggered grid, dual mesh
Galerkin Methods Finite differences and finite volumes minimize error locally Based on Taylor series expansion Galerkin methods minimize weighted error Based on expansion in basis functions Solve weak form of problem "u(x,t) "t % = Lu(x,t) # v ' "u &"t $ Lu ( + * dx = 0 ) Minimize error by expansion in basis functions and determining coefficients
Galerkin Discrete Approximation M ij du j dt = L ij u j M ij = $ dv" i # 14 243 j Mass Matrix L ij = Solution generally requires inverting the mass matrix, even for explicit methods Different basis functions give different methods Usually: β i = α i α i =exp(ikx) => Fourier spectral methods α i =localized polynomial => finite element methods $ dv" i L# 142 43 j Response Matrix
Finite Elements Project onto basis of locally defined polynomials of degree p Polynomials of degree p can converge as fast as h p+1 Integrate by parts: dv j ' " i " j dv = #' " i $% &(" j V j ) dv = ' $" i % &(" j V j )dv dt 1444 24443 # ' " jn % &(" j V j )ds S Evaluate & only 144 24443 Boundary condition Simplifies implementation of complex closure relations Natural implementation of boundary conditions Automatically preserves self-adjointness Works well with arbitrary grid shapes
Three Examples of Favorable Properties of High Order Elements 1 0.5 0 Z -0.5-2 -3 ln[ div(b) / b ] -4-5 -6 h 1 h 2 h 3 bilinear biquadratic bicubic 7 sim. data & fit 6 analytic W c 5 4 3 w (cm) 2-1 -7 1 1 1.5 2 2.5 R -8-5 -4-3 -2 ln(h) 10 8 10 9 10 10! /! perp Grid used for ELM studies Non-uniform meshes retain high-order convergence rate Magnetic divergence constraint Scalings show expected convergence rates Critical island width for temperature flattening Dealing with extreme anisotropy Agreement on scaling
Multiple Time Scales (Parasitic Waves) MHD contains widely separated time scales (eigenvalues) "u "t = #u { = Fu { + Su { Full MHD operator Fast time scales: Alfvén waves, soundwaves, etc (parasitic waves) Slow time scales: Resistive instabilities, island evolution, (interesting physics) Parasitic waves are properties of the physics problem but are not the dynamics of interest Treat only fast part of operator implicitly to avoid time step restriction u n+1 " u n #t = Fu n+1 + Su n Precise decomposition of Ω for complex nonlinear system is often difficult or impractical to achieve algebraicly
Dealing with Parasitic Waves Original idea from André Robert (1971) Gravity waves in climate modeling F and Ω are often known, but an expression for S is difficult to achieve Ω: full MHD operator F: linearized MHD operator Use operator splitting: u n+1 " u n #t = Fu n+1 + ($ " F)u n = $u n % + #tf un+1 " u n ( ' * & #t ) Expression for S not needed " = F + S # S = " $ F
Semi-Implicit Method u n+1 " u n #t = Fu n+1 + ($ " F)u n = $u n % + #tf un+1 " u n ( ' * & #t ) Recognize that the operator F is completely arbitrary!! (I " #tg { )u n+1 = (I 1 " 4 #t$)u 243 n " #tgu 12 3 n S. I. operator Explicit S. I. operator G can be chosen for accuracy and ease of inversion G should be easier to invert than F (or Ω, e.g., toroidal coupling) G should approximate F for modes of interest Some choices are better than others! Has proven to be very useful for resistive and extended MHD Used for spheromak, RFP, tokamak, and solar corona modeling
SI Operator for MHD "B "t = # $ ( V $ B %&J ) "' = %# ( 'V "t "p = %# ( pv % () %1) p# ( V "t 2 ' "V "t = %'V ( #V % #p + J $ B + *+t 4, 2 # $ # $. "V "t $ B / 4 01 $ B - 0 0 4144 42 4444 3 3 Alfvén waves 5 + #)P 0 # ( "V 7 7 142 4 "t 37 Sound waves 6 Ideal MHD operator (Lerbinger and Luciani) Anisotropic, self-adjoint Avoids implicit toroidal coupling (great simplification) Accurate linear results for CFL ~ 10 4-5 (=> Condition number ~ 10 10!!) kv"t <1
Semi-Implicit Leap Frog t Variables staggered at different time levels SI operator on velocity "V =V j #V j#1 "p = p j+1/2 # p j#1/2 Δt t j+1/2 "V "t = #$p j#1/ 2 & +%"ts ( "V ' "t ) + * V p Δt t j t j-1/2 t j-1 V j = V + "V "p "t = #$P 0 %&V j p j+1/2 = p j#1/2 + "p
Extended MHD Time Advance Implicit leap-frog (also used in MHD) Maintains numerical stability without introducing numerical dissipation MHD advance unchanged (semi-implicit self-adjoint operators) Need to invert non-self-adjoint operators at each step for dispersive modes Requires high performance parallel linear algebra software
Implicit Leap Frog for Extended MHD % ( m i n j+1/ 2 ' "V + 1 "t 2 V j # $"V + 1 * ' j "V # $V * + "tl j+1/ 2 ("V) 14444242 ' 4443 14 2443 + $ #, i ("V) = 142 43 * & Implicit advection ) SI MHD Includes ALL stresses "n "t + 1 2 V j+1 # $"n = %$ # ( V j+1 # n j+1/ 2 ) 3n &"T # ( 2 ' "t ( ) J j+1/ 2 - B j+1/ 2 + m i n j+1/ 2 V j # $V j + $p j+1/ 2 + $ #, i V j + 1 2 V # j+1 ) $ %"T # + + 1 % $ q # ("T # ) = * 2 14243 Anisotropic thermal conduction, 3n 2 V # j+1 $ %T # j+1/ 2, nt# j+1/ 2 % $ V# j+1, % $ q# T # j+1/ 2 ( ) ( ) + Q # j+1/ 2 "B "t + 1 2 V j+1 # $"B + 1 2 $ % 1 ne J j+1/ 2 % "B + "J % B j+1/ 2 1 + 144444 42 444444 3 2 $ % &"J = 14 243 Implicit HALL term Implicit resistive term ( ' $ % 1 ( ne J j+1/ 2 % B j+1/ 2 ' $p e ) ' V j+1 % B j+1/ 2 + &J j+1/ 2 + * - ), Momentum Continuity Energy Maxwell/Ohm
Nonlinear ELM Evolution Anisotropic thermal conduction ELM interaction with wall 70 kj lost in 60 µsec 2-fluid and gyro-viscosity have little effect on linear properties
Two-fluid Reconnection GEM Problem 2-D slab η = 0.005 Good agreement with many other calculations Computed with same code used for tokamaks, spheromaks, RFPs
Heuristic Closure Captures Essential Neoclassical Physics Neo-classical theory gives flux surface average Local form for stress tensor forces: (Gianakon et.al., Phys. Plasmas 9, 536 (2002) "# $ % = & % µ % B 2 V % # e ' ( ) 2 e ' B % # e ' Valid for both ion and electrons Energy conserving and entropy producing Gives: bootstrap current neoclassical resistivity polarization current enhancement
Beyond Extended MHD: Parallel Kinetic closures Parallel closures for q and Π derived using Chapman-Enskog-like approach. Non-local; requires integration along perturbed field lines. General closures map continuously from collisional to nearly collisionless regime. General q closure predicts collisional response for heat flow inside magnetic island. As plasma becomes moderately collisional (T > 50 ev), general closure predicts correct flux limited response. Incorporated into global extended MHD algorithms. Thermal diffusivity as function of T showing T 5/2 response of Braginskii and general closure.
Beyond Extended MHD: Kinetic Minority ions species affects bulk evolution: Minority Species n h << n 0, " h ~ " 0 Mn dv dt = J " B # $ { % & Bulk Plasma # $ % & 12 3 h Hot Minority Ion Species "# h = % M (v $ V h )(v $ V h )"f (x,v)d 3 v δf determined by kinetic particle simulation in evolving fields Demonstrated transition from internal kink to fishbone Benchmark of three codes
Constraints on Modeling Balance of algorithm performance and problem requirements with available cycles N " Q 12 #t 3 Algorithms Algorithms: N - # of meshpoints for each dimension α - # of dimensions 1.5 - transport 3 (spatial) fluid 5-6 kinetic (spatial + velocity) Q - code-algorithm requirements (Tflop / meshpoint / timestep) Δt - time step (seconds) = 3 $10 7 %P CT { Constraints Constraints: P - peak hardware performance (Tflop/sec) ε - hardware efficiency εp - delivered sustained performance T - problem time duration (seconds) C - # of cases / year 1 case / week ==> C ~ 50
The Future???? N " Q = 3 $10 7 %P 12 #t 3 { Algorithms CT Constraints Assumptions: Performance is delivered Implicit algorithm Q ind. of Δt (!!) Requirements: At least 3-D physics required Required problem time: 1 msec - 1 sec Conclusions: 3-D (i.e., fluid) calculations for times of ~ 10 msec within reach Longer times require next generation computers (or better algorithms) Higher dimensional (kinetic) long time calculations unrealistic Integrated kinetic effects must come through low dimensionality fluid closures
Summary Fluid models are an approximation to the plasma kinetic equation, but are required for modeling low frequency response of hot, magnetized plasmas with global geometry Direct kinetic calculations are impractical Primitive equations and implicit methods have proven successful in modeling a variety of plasmas Implicit methods are required for handling the dispersive terms of MHD. An understanding of the dispersive characteristics of discretized equations needed. Kinetic effects must be captured through fluid closures Best form of fluid equations still unknown Often problem dependent Next step is direct coupling of kinetic/fluid/transport models