EFITtime

Contacts: Orso Meneghini, Sterling Smith, Lang Lao, Steve Sabbagh

Short Description

Run the EFIT equilibrium solver for multiple time slices

Keywords

Equilibrium, MHD, Grad Shafranov

Long Description

EFIT (Equilibrium Fitting) is a computer code developed to translate measurements from plasma diagnostics into useful information like plasma geometry, stored energy, and current profiles. The measurements are obtained from diagnostics such as external magnetic probes, external poloidal flux loops, and the Motional Stark Effect (MSE), which measures the direction of the magnetic field lines inside the plasma. The Grad-Shafranov equilibrium equation, which describes the force balance in a plasma, is solved using the available measurements as constraints on the toroidal current density. Since the current also depends on the solution of the equation, the poloidal flux function, this is a nonlinear optimization problem. The equilibrium constraint allows the two-dimensional current density to be represented by two one-dimensional stream functions (functions only of flux), which significantly reduces the complexity of the problem.

EFIT can be run in either the fitting mode or the equilibrium mode.

  • equilibrium mode: EFIT solves the 2D equilibrium Grad-Shafranov equation.

  • reconstruction mode: EFIT solves a non-linear optimization problem, trying to minimize a cost function that depends on a series of constraints derived from either experimental measurements (magnetic probes, flux loops, MSE, kinetic pressure, ECE, CER) or models (q-on axis, bootstrap-current). Kinetic-EFIT refers to the ability of EFIT to include internal constraints (namely pressure and the current). EFIT efficiency derives from it’s numerical scheme which transforms the original non-linear optimization problem into a sequence of linearized minimizations interleaved with the equilibrium iterations.

EFIT can be run as a free or fixed boundary equilibrium solver. In the latter case the location of the last closed flux surface is externally specified (in practice EFIT works by enforcing constant poloidal flux at those points). EFIT can also be run with a mixed free and fixed boundary constraints.

EFIT is computationally not expensive, requiring only few seconds on a single CPU (few minutes at highest resolutions 513x513). For plasma control applications, there is a real-time C++ EFIT version RT-EFIT available with algorithms designed to allow real-time equilibrium reconstructions. A MPI version is also available to support parallelized multi-timeslice equilibrium reconstructions. There has also been an effort aimed at using GPU acceleration: parallelized-EFIT (P-EFIT) on EAST and DIII-D. Calculation of the Green’s function tables is computationally intensive but are pre-comnputed (with the EFUND code) and stored as look-up tables.

EFIT expects an interactive input for setting it’s main mode of operation; after that the input parameters are passed through a namelist file: k-file or snap file. When in reconstruction mode, EFIT can take as an input a snap file to generate a k-file with the experimental data (this feature is obviously machine dependent). When run with a snap file, the experimental data are looked up directly from experimental databases. When in equilibrium mode, the k-file is referred to as the r-file. The three most important EFIT output are two ASCII files g-file, a-file, and a NetCDF file m-file (when operating in reconstruction mode). Other diagnostics and plotting files are also generated.

Typical workflows

  • Generate equilibrium from experimental data
    • Free-bondary a/g-files from k-file

    • Free-bondary g-files from snap-file

    • Fetch existing g-files

  • Generate equilibria from kinetic file (see kineticEFIT and kineticEFITtime modules)
    • Magnetics, pressure, current, MSE, boundary, on-axis q constraints

    • E_r correction of MSE signal from measurement (e.g. GAprofiles) or model (e.g. NEO)

    • Auto-knotting of P’ and FF’ spline basis functions

  • Plotting
    • Equilibrium

    • Flux surface and flux surface averaged quantities

    • Constraints

    • Quality of reconstruction metrics

    • efitviewer mk.2: rapid MDS lookup and switching between time-slices, diagnostic overlays, time-slice overlays

  • DIII-D specific goodies:
    • Query DIII-D SQL database for available SNAP files and retrieve them from DIII-D MDS+

    • Save run to DIII-D MDS+

Supported devices

  • DIII-D, NSTX, C-Mod, EAST

Contributors

List of contributors sorted by number of lines authored:

3590 Tomas Odstrcil
2774 David Eldon
1888 Orso Meneghini
1117 Joseph McClenaghan
1036 Torrin Bechtel
1011 Fusion Bot
 644 Z. Anthony Xing
 617 Nikolas Logan
 569 Myungwon Lee
 500 Galina Avdeeva
 335 Brian Grierson
 176 Sterling Smith
 172 Shaun Haskey
 171 Siye Ding
  78 Brian Victor
  41 Devon Battaglia
  40 Cami Collins
  17 Kathreen Thome
   5 Matthew Lanctot
   4 Matthijs Roelofs
   3 Will DeShazer
   3 Igor Bykov
   1 Severin Denk
   1 Gregorio L. Trevisan

Users

List of usernames sorted by number of module imports: bechtelt, nelsonand, mcclenaghanj, gavdeeva, gibsons, victorb, eldond, meneghini, marinoni, xingz, tbechtel, james.bland, lindan, burkem, wangy, huqiming, odstrcilt, deshazere, ql0457, grierson, abbatej, myersr, prattq, smithsp, smunaret, vailp, yangseongmoo, dingsiye, thomek, benedettt, chrystal, akcayc, hongrongjie, liud, jmcclena, logannc, wehnerw, yuguanying, lvovskiya, avdeevag, kinsey, guizzos, kthome, laggnerf, lib, bgriers, cotet, glassera, razor, lestzj, parkjk, boyesw, lizj, stewarts, tomas, bgrierson, choiwilkie, vanzee, panicid, bykovi, gagek, munarettos, taylornz, churchillr, ernst, majorm, marinic, pandyam, roelofsm, xier, yeoha, apankin, batteya, choudhuryh, dambaj, jiangy, schaeferc, tema, waij, fujia, howardnt, kaye, nurgalievm, odstrcil, qinx, razord, chenj, cuil, degrandchampg, francisco, goodmana, jberkery, jwai, pipern, richnern, weixishuo, wilkstm, Trevisan, anelson, brookmanmw, dolbyi, emdeee, fernico, galinaavdeeva, hanxiang, houshman, jrbland, khabanovf, thomas.ogorman, traversop, weisbergd, xc2135, yun, ashourvana, chabanr, crocker, denks, duxiaodi, edeshaze, fernandezp, fleishhackerj, paz-soldan, psinha, shoushar, storments, truongd, user1, wakatsukit, zhaob, adwiteey, andreavergara, barrj, burgessd, camicollins, chowdhurys, curiem, dbattagl, eggertw, eskewj, feyrera, garofalo, haskeysr, hinsone, holcomb, istewart, izacardo, jamiexia, jpark, kh5639, kimsang, kwonk, leem, lijx, macwant, mordijck, pbonofig, qingyunhu, ramanr, shis, spangherl, sunxuan, tangt, todstrci, turcof, balbinj, bernardt, boedo, bogark, chungy, collinscs, duhl, eemdee, glassf, groth, guowf, hallchenv, jianx, jparisi, jsachdev, leppinke, liuchang, lix, lterzolo, luniap, luoc, morbeym, nlogan, pankin, perillor, rhodes, rothsteina, schmitzl, simeonnachmannn, sizheyuan, sunap, trhodes, turnbull, wuyifan, yangjeong, aglasser, ailianiv, alarconp, albostar, ashtonkeya, austinm, baradakk, bardoczil, bortolon, bursche, bzhu, callahank, cameronmedleyk, cengher, degrassi, denk, dernst, dpalade, effenbergf, eidietis, evans, faurie, fhaoc, flaggner, gdong0807, ghiozzia, gonzalezj, hhwang, holland, huangj, huwen, jacksona, jalalvanda, joeschm, jorge, jurban, kangj, kathreenthome, kleijwegtk, kyungjin, lanctot, leekuanwei, leutholdn, lig, lishimin, liul, liuy, lunsfordr, mcclenaghan, mfitz, michaelc, millerm, mlampert, moynihanc, nazikian, ncrocker, okabay, onom, orso, panck, peter.buxton, prabhudesaig, qpratt2, reusl, rfitzp, rosenthala, ryoneda, shenders, shilin, sinclairg, sliefj, smuna, snoepg, soukhan, ssmith, stephanet, sweeneyrm, syang, taoyuqiang, tengfeitang, tmacwan2, ulbl_p, vincenas, wangg, wangzhirui, wangzibo, wangzw, wilcoxr, willensdorferm, williamsds, wwallace, xiangjian, yadavn, yanz, zaxing, zeng, ziegelj