EFIT¶
Contacts: Orso Meneghini, Sterling Smith, Lang Lao, Steve Sabbagh
Short Description¶
Run the EFIT equilibrium solver
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
Closed-bondary a/g-files from r-file
Free-bondary g-files from snap-file
Modify k-file with constraints
Fetch an existing g-file
- Modify existing equilibrium
Current, magnetic field, plasma position, and shape
Reduce resolution of existing g-file
- 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
Monte-Carlo uncertainty quantification analysis
- Plotting
Equilibrium
Flux surface and flux surface averaged quantities
Constraints
Quality of reconstruction metrics
- 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
External resources¶
Official webpage: https://efit-ai.gitlab.io/efit/
Contributors¶
List of contributors sorted by number of lines authored:
2891 Orso Meneghini
839 Fusion Bot
648 Torrin Bechtel
180 Joseph McClenaghan
167 Brian Grierson
162 Sterling Smith
140 Gregorio L. Trevisan
133 Brendan Lyons
125 Z. Anthony Xing
81 Siye Ding
71 Nikolas Logan
65 David Eldon
43 Tomas Odstrcil
29 Brian Victor
19 Galina Avdeeva
3 Zhixuan Wang
3 Shaun Haskey
1 Christopher Holland
Submodules¶
None
Users¶
List of usernames sorted by number of module imports: meneghini, mcclenaghanj, bechtelt, dorr, nelsonand, marinoni, victorb, lizeyu, wangy, lyonsbc, roelofsm, renq, dingsiye, panck, grierson, smithsp, pankin, houshman, guowf, lijx, denk, benedettt, istewart, chenj, snoepg, fernandezp, lindan, rutherfordg, jacksona, reimana, wilkstm, zamperinis, barrj, wanghuiqian, thomek, yuguanying, knolkerm, cotet, pablorf, reiman, elmitra, vancompernolle, Trevisan, liuy_dlut, denks, myersr, anelson, bgrierson, churchillr, eldond, guizzos, weisbergd, chenly_dut, huqiming, burkem, hinsone, logannc, trevisan, xiangjian, bykovi, chabanr, wehnerw, ashourvana, lig, lizj, schaeferc, ulbl_p, wangqi, weixishuo, xuemiao, casalil, mingsheng.yu, rosenthala, sontag, wangyuanzhen, jiangy, xugl, abbatej, chenxi, duhl, liud, luoc, merlog, stephanet, taylornz, akcayc, cuil, gdong0807, howardnt, jsachdev, kinsey, liuchang, peretm, songxiao, atom, fernico, jparisi, likai, macwant, matejaj, pandyam, prechelg, richnern, rovetoj, ryoneda, schmitzl, smunaret, stewarts, xc2135, adwiteey, beidlerm, fujia, hongrongjie, jayesh, laggnerf, ohtaniy, rkalling, yadavn, zhaoc, andreavergara, ashtonkeya, francisco, halfmoon, holcomb, jlchen, johnsonc, kostukm, lanting, lib, lvovskiya, nlogan, odstrcilt, paz-soldan, ramanr, tbechtel, yonedar, bursche, choiwilkie, guterlj, jianx, liuy, majorm, marinic, mattesr, molesworths, munarettos, pipern, razor, shoushar, teklua, tomas, vanzee, zyli, boutpb, callahank, clau, duxiaodi, holland, lestzj, lfluo, luniap, lupinl, qinx, rothsteina, saarelma, turcof, xugs, zhuyiren, anetepen, apankin, batteya, boses, boyesw, chenji, chenm, dunnc, duranj, fila, gavdeeva, guanqidong, jxliu, leppinke, linami, lishimin, liu, luoyiming, luxin, mccoyl, messers, mlampert, mortonl, prattq, rfitzp, saarelmas, shihl, sliefj, sweeneyrm, tangt, user, wangjun, wmq, zhaodeng, zywickib, blyons, brookmanmw, dongg, evans, gagek, hansonm, izzov, jiahongray, jmcclena, krietedm, kripner, leekuanwei, leutholdn, masliner, mcclenaghan, nanshi, nurgalievm, ql0457, rbrzozow, samuellc, shenders, study, tangs, turnbull, wilcoxr, wrightw, xliu, xug, zhangjie, zhuzj, abramst, alarconp, bodnerg, boedo, burgessd, chenjia, choudhuryh, chowdhurys, flaggner, gibsons, gonzalezj, groebner, hanxiang, haskeysr, huanga, joeschm, junge, khabanovf, lterzolo, marshalli, millerm, morbeym, prabhudesaig, qingyunhu, rchurchi, sciortinof, sunxuan, traversop, tsingh, verao, waij, wangf, zeng, zhangp, 11029, Morton, adishcheve, akleiner, albostar, austinm, avdeevag, bernardt, buckj, capitainetema, chrystal, coburnj, crocker, d3dsf, david, degrandchampg, delcastilloc, eskewj, fhaoc, galinaavdeeva, gerrur, ghiozzia, glassf, gm7685, guptaa, halfmoonm, halpernf, herfindalj, horvathl, huangjh, inyong, jpark, kalling, kongd, lao, nave, nornbergm, orlov, orso, parisij, snyder, ssmith, suzukiy, swjtang, tang31, truongd, unterbee, vailp, wuyifan, yeoha, yfwang, yun, zhhwang, aaronsontag, aashourv, asperdut, balbinj, baradakk, bgriers, cappellil, carbinj, carlos, cavallaroa, clementm, cn8435, collinscs, colmenaresj, curiem, davdak, deshazere, dongge, eidietis, ernst, feyrera, ffu, fitzpatrickr, fleishhackerj, fscotti, g2tbarbe, glassera, goodmana, gpaganin, gugliadav, hallchenv, halpernj, hengl, huwen, huxing, izacardo, james.bland, jeon, jinbm, joungs, jqw5960, kleijwegtk, kxf, lanzratha, lix, makowski, margomw, mboyer, mitrae, neisert, odstrcil, pacedc, pbonofig, perillor, peter, pierrenc, poulosm, prangrye, psinha, qianjp, rabinowitzj, renql, root, sapna, shilin, shisy, sinclairg, soukhan, sungc, syang, tengfeitang, tobiasb, trhodes, wangzibo, wangzw, wchoi, welsha, willensdorferm, xiafan, xier, xingz, yang.ye, yangseongmoo, yanz, yuxin, zhanghongming, zhangx, zhen.zhou, zhuyilun, zyunpeng, DarkConscript, MHalfmoon, aaron, aedmonds, afil, agnewb, amaan, anandh, andris, anyanetui, benjamins, bilgilis, binchen, bortolon, brauna, briesemeister, buttj, bzhu, canal, candy, carpanesef, chenluoyu, chenran, chenwj, cianciosa, curtis, dambaj, dboyle, debouchaudn, degrassi, dernst, devillerochea, diems, dingrui, dpalade, drsmith, dunsmorej, effenbergf, elder, epaul, farreh, fenster, fordb, fyang, g2egiova, garnier, garofalo, gbodner, hhwang, howelle, huangj, hughesjw, hwong, hyueheng, idesjard, jberkery, jessicafu232, jgchen, jhughes, jmlmir, jorge, josephi, jsh8708, jvanblar, kangj, kessel, kh5639, kimcc, kimkyungjin, kimsang, kkirov, kq9832, krogenk, kthome, kuber, kwonk, labbatej, lammersj, lanctot, lawson, leem, lgarzot, linshih, linwenhao, liua, liudingyun, liuzefang, lmorton, markovic, maxinxing, mclement, mfitz, millerma, montesk, mordijck, mpharr, mroelofs, mscottod, nakeva, nchaubey, ncrocker, nfil, nicholsj, nthoward, oasunta, okabay, omenegh2, panicid, petty, pharr, qianzh, qiushi.li, ravi, razord, rea, reac, renyang, riggsg, rodriguezsanchezc, ronchig, rraman, rrma, sangcf, sdiem, sfreethy, shafer, shaskey, shibatay, shin, shis, shiyf, singhr, sizheyuan, sjhan00, slendebroekt, smiskeyj, smithdr, smordijc, squirej, ssaar, subboting, sunap, taeyeong, tema, terranova, timslendebroek, tmacwan2, u10198, vaezip, vallar, vankampenr, vincenas, wakatsukit, wanghui, wangzhirui, wdp504, weiyumou, wigram, wudonggui, wukitchj, wumuq, wuxuemin, wwehner, xiayanbo, xuelei, xuxinliang, xzhang, yangchen, yfu, yjeon, yoshidam, yujh, zhang, zhangdk, zhangjiayuan, zhangjy, zhangw, zhangxx, zhaob, zhaol, zhwang, zibow, zpw001