# Presentation: 329610

## Nonlinear Extended MHD Simulation Using High-Order Finite Elements

- C. Sovinec, C. Kim, H. Tian, *Univ. of WI-Madison*
- D. Schnack, A. Pankin, *Science Apps. Intl. Corp.-San Diego*
- D. Brennan, *MIT**	**	**	*S. Kruger, *Tech-X Corp.*
- E. Held, *Utah State University**	**	*X. Li, *Lawrence-Berkeley Lab.*
- D. Kaushik, *Argonne Nat. Lab.**	**	*S. Jardin, *Princeton Pl. Phys. Lab.*
*and the *NIMROD Team
**Scientific Discovery through Advanced Computing**
- July 26-30, 2005
- San Francisco, California

## As the development of magnetic plasma confinement approaches conditions for ignition, ...

**Joint European Torus**,
- European Fusion Development Agreement

**DIII-D**,
- General Atomics Corporation

**Alcator C-mod**,
- Massachusetts Institute of Technology

**TFTR**,
- Princeton Plasma Physics Laboratory

**Notes:**
TFTR: 11 MW fusion power in 1993.
JET: 16 MW fusion power in 1997.

## ... the need for predictive simulation  increases.

- proposed International Thermonuclear Experimental Reactor (ITER)
-  Fusion power: 500 MW
-  Stored thermal energy: 10s of MJ

**Critical ‘macroscopic’ topics include:**
-  Internal kink stability
-  Neoclassical tearing excitation and control
-  Edge localized mode control
-  Wall-mode feedback
- [2002 Snowmass Fusion Summer Study]

- planned

**Notes:**
Define ‘macroscopic’   other topics & integrated simulation
Thermal energy density ~ 10x standard atmosphere, but not distributed uniformly and contained in number densities ~ 1/100000
Not just one defining problem.

## Outline

**Outline**

**Introduction**
**Macroscopic plasma dynamics**
**Characteristics**
**Simulation examples**
**Computational modeling**
**Numerical methods**
**High-order spatial representation**
**Time-advance for drift effects**
**Implementation**
**Conclusions**

## Macroscopic Plasma Dynamics

**Macroscopic Plasma Dynamics**

** ****Magnetohydrodynamic (MHD) or MHD-like activity limits operation or affects performance in all magnetically confined configurations.**
** ****Analytical theory has taught us which physical effects are important and how they can be described mathematically.**
** ****Understanding consequences in experiments (and predicting future experiments) requires numerical simulation:**
** ****Sensitivity to equilibrium profiles and geometry**
** ****Strong nonlinear effects**
** ****Competition among physical effects**

**Notes:**
Based on fluid equations (velocity moments of particle distribution fns) + Maxwell’s

## Fusion plasmas exhibit enormous ranges of temporal and spatial scales.

**Fusion plasmas exhibit enormous ranges of temporal and spatial scales.**

** ****Nonlinear MHD-like behavior couples many of the time- & length-scales.**
** ****Even within the context of resistive MHD modeling, there is stiffness and anisotropy in the system of equations.**

**Notes:**
Waves!
Nonlinear evolution is much slower than wave propagation and is influenced by two-fluid & kinetic effects.
MHD activity largely originates from rational surfaces, where forces are ~shearing with k perp to B.

## Examples of Nonlinear Macroscopic Simulation

**MHD evolution of the tokamak internal kink mode (m=1, n=1)**
- Plasma core is exchanged with cooler surrounding plasma.

**M3D simulation of NSTX** [W. Park]

**Evolution of pressure and magnetic topology from a NIMROD simulation of DIII-D**

**Notes:**
HOWEVER, two-fluid reconnection and fast particles are now thought to have qualitative influences on the 1,1.
EXAMPLES ARE NOT COMPREHENSIVE

## Examples of Nonlinear Macroscopic Simulation (continued)

**2) Disruption (Loss of Confinement) events**

-  Understanding and mitigation are critical for a device the size of ITER.

**Simulated event in DIII-D starts from an MHD equilibrium fitted to laboratory data.**

**Resulting magnetic topology allows parallel heat flow to the wall.**

- simulation & graphics by S. Kruger and A. Sanderson

## Examples of Nonlinear Macroscopic Simulation (continued)

**3) Helical island formation from tearing modes**

-   Being weaker instabilities, tearing modes are heavily influenced by non-MHD effects.
-   Tearing modes are usually non-disruptive but lead to significant performance loss.
-   Slow evolution makes the system very stiff.

**Resistive tearing evolution in toroidal geometry generating coupled island chains.**

**Magnetic Island Width vs. Time**

**Notes:**
In this case, the global Alfven propagation time is sub microsecond—explicit time-step is 4 orders of magnitude smaller.

## Examples of Nonlinear Macroscopic Simulation (continued)

**4) Edge localized modes**

-   Strong gradients at the open/closed flux boundary drive localized modes.
-   Heat transport to the wall occurs in periodic events—can be damaging if not controlled.

**Nonlinear coupling in MHD simulation leads to localized structures that are suggestive of bursty transport.**** **

**Medium-wavenumber modes are unstable.**

- simulation by D. Brennan

**MHD description is insufficient, however.**

**Notes:**
H-mode leads to strong gradients.

## Computational Modeling

- Important considerations:
-  Stiffness arising from multiple time-scales
-  Fastest propagation is determined by linear behavior
-  Anisotropy relative to the strong magnetic field
-  Distinct shear and compressive behavior
-  Extremely anisotropic heat flow
-  Magnetic divergence constraint
-  Weak resistive dissipation
-   Typically free of shocks

**Notes:**
Low beta, low Rm
f.e. in favor (US) at present

## Equations (for the mathematicians if not the physicists)

***=i,e*

## Modeling: Spatial Representation

-  The NIMROD code (_http://nimrodteam.org_) uses finite elements to represent the poloidal plane and finite Fourier series for the periodic direction.
-  Polynomial basis functions may be Lagrange or Gauss-Lobatto-Legendre.  Degree>1 provides
** ****High-order convergence without uniform meshing**
** ****Curved isoparametric mappings**

**SSPX**

**Packed mesh for DIII-D ELM study**

**LDX**

**Notes:**
SCIDAC & pre-SCIDAC PSACI program supported this extensive upgrade.
Geometric flexibility for other devices/applications

## Modeling: Spatial Representation (continued)

-  Polynomials of degree>1 also provide
-  **Control of magnetic divergence error**
** ****Resolution of extreme anisotropies (Lorentz force and diffusion)**

**Critical island width vs. **perp**  **
- Wc shows where diffusion time-scales match [Fitzpatrick, PoP **2**, 825 (1995)].

**Magnetic divergence constraint    **
- Scalings show the convergence rates expected for first derivatives.

- See JCP **195**, 355 (2004).

**Notes:**
Aniso conduction—numerical is inflection in temperature profile

## Modeling: Time-advance algorithms

-  Stiffness from fast parallel transport and wave propagation requires implicit methods.
-  Semi-implicit methods for MHD have been refined over the last two decades.
-  Time-centered implicit methods are becoming more practical with matrix-free Newton-Krylov solves.
-  A new implicit leapfrog advance is being developed for NIMROD modeling of two-fluid effects (drifts and dispersive waves).

-  Matrices are sparse and ill-conditioned.
-  They are solved during each time-step (~10,000s over a nonlinear simulation).
-  Factoring is less frequent.

**Example sparsity pattern for a small mesh of biquartic elements**

**Notes:**
Analytic separation of time-scales is possible in some cases, but it’s perp compressibility.
Condition number is larger than Laplacian.
Sparsity—with domain decomposition and after static condensation

## Modeling: Implementation

-  Solving algebraic systems is the dominant performance issue.
-  Iterative methods scale well but tend to perform poorly on ill-conditioned systems.
-  Collaborations with **TOPS** Center researchers Kaushik and Li led us to parallel direct methods with reorderingSuperLU (_http://crd.lbl.gov/~xiaoye/SuperLU/_).

- SuperLU improves NIMROD performance by a factor of **5** in nonlinear simulations.

**Notes:**
Linear calculations—absolutely no comparison—factor of 100 not uncommon
Some matrices require matrix-free solves, and SuperLU is used for preconditioning.
Nonsymmetric systems.

## Initial Application of the Two-Fluid Model to ELMs

**The two-fluid model (including Hall and gyroviscous effects) shifts the mode downward and induces rotation.**

**MHD**

**Two-fluid**

- peak  amplitude

- peak  amplitude

**Nonetheless, preliminary scans are indicating that anisotropic conduction is more important for stabilizing short wavelengths.**
- calculations by A. Pankin

- Also see two-fluid modeling by Sugiyama in poster WED08.

**Notes:**
1/16 of torus, inner segment cut away to show the linear mode structure.
Outermost point has largest gradients.
Further convergence testing still needed.

## Conclusions

**Conclusions**

- The challenges of macroscopic modeling are being met by developments in numerical and computational techniques, as well as advances in hardware.
-  High-order spatial representation controls magnetic divergence error and allows resolution of anisotropies that were previously considered beyond reach.
-  SciDAC-fostered collaborations have resulted in huge performance gains through sparse parallel direct solves (with SuperLU).

-  SciDAC support for computing and collaborations is benefiting the fusion program at an opportune time.
-  Integrated modeling (macro+turbulence+RF+edge) is the new horizon.
-  The macroscopic modeling tools are also applicable to problems in space and astrophysical plasmas.

- Other Remarks

**Notes:**
Complicated algorithms need balanced hardware!