# Presentation: 546454

## Initial 3D MHD Simulation of CHI PlasmaXianzhu TangPlasma Theory Group, Theoretical Division LANLxtang@lanl.gov

## Parallel MHD and 2-Fluids Toroidal Code

- Developed a suite of 3D MHD and two-fluids code for toroidal geometry on massively parallel computers (Implemented with PETSc).
-  Options of both explicit and nonlinearly implicit time stepping.
- 3D structured grids for now.
- Applied to magnetic reconnection, kink, and Co-axial Helicity injection (CHI).

## Design goals

- Nonlinearly implicit time stepping scheme attractive for long time simulation of slow growing resistive modes for high S.
- Explicit scheme is time accurate for studying turbulent relaxation and low S phenomena like CHI.
- Comparative runs provide a check for accuracy and help debugging.
- Tight aspect ratio of NSTX breakdowns the poloidal and toroidal time ordering of conventional TOKAMAK, but poses no problem for fully implicit scheme.

## Newton-Krylov 3D Toroidal Code

- Employs primitive variables to reduce the cost of single function evaluation.
- Nonlinearly implicit via Newton’s method.
- Krylov subspace accelerator as the iterative solver and smoothers.
- 3D Domain decomposition provides parallel preconditioning for smoothers.
- Multi-level scheme for algorithmic scalability.
- Implemented both two level Newton-Krylov-Schwarz and multigrid preconditioning.

## N ln N ScalingV cycle, 2 pre-smooth, 6 post-smoothCircle: MHD; Plus: EMHD

## Parallel Speedup of a Fixed Size Problem193x192, 5 grid levels, V cyclesRed line denotes perfect linear speedup

## T=0, Harris Sheet with an initial perturbation. 
	S=104, 193x192 grids, 5 grid levels, sawtooth cycle

- 	S=104, 193x192 grids, 5 grid levels, sawtooth cycle

- Magnetic Reconnection

**T = 5.6 ********A**

**T = 12.0 ********A**

**Later time whistler wave included**

## Resistive Kink in a Spherical Torus49x49x12 grids, 3 grid levels, full multigrid with V cycle S=104, Pr=0.1, q0=0.7, beta ~ 24%

## Pressure Evolution (100x100x24)

## MHD Simulation of CHI in a Spherical Torus

- MHD is likely an adequate description for Low-S CHI experiments in a spherical torus like NSTX.
- 2-D simulation demonstrates non-inductive toroidal current drive.
- 3-D simulation shows the line-tied kink instability.
- The saturated state with large closed flux surfaces remains to be seen in simulations.

## Specifics about the computation

- Computational domain is a torus with rectangular cross section, a set of PF coils provide plasma shaping for the saturated state (D shape).
- Walls are perfectly conducting except two slit on top and bottom, where a DC electric is applied.
- The injector flux is designed to arch across the bottom gap, the absorber has a vacumm field perpendicular to it, which connects all the way back to the bottom, a configuration significantly reduces the severity of absorber arching.
- MHD equations are solved in dimensionless form, normalized by minor radius and vacuum toroidal field.
- S=2000, Pr=2. 2D run of 500 Alfven time, followed by 3D run of 1800 Alfven time.

## Poloidal flux overlaid with poloidal current densityt=10            100              200             400      

## At t=500 tau_A, injector flux and toroidal current density

## 2D profile at 500 tau_A is restarted in 3D with a small helical perturbation, after 1800 tau_A line-tied kink grows to large amplitude, as shown in the poloidal magnetic field vector plot at different phi section.0                    PI/2                   PI                 3PI/2        

## Poloidal flux of different toroidal mode numbern=0                n=1               n=2

## Poloidal flow field of different toroidal mode numbern=0           n=1           n=2 

## Total poloidal flux and plasma flow at phi=PI/2.

## Summary

- Parallel toroidal MHD code written with both explicit and implicit time stepping.
- Newton-Krylov with multigrid preconditioning for nonlinearly implicit scheme has algorithmic advantages for fusion problems.
- Current studies for CHI demonstrated non-inductive current drive and 3D line-tied kink instability. The saturated state remains to be addressed.
- The NK-multigrid code offers an unique tool to examine two-fluids physics in a spherical torus.