SMITER: A field-line tracing environment for ITER
L. Kos R. A. Pitts G. Simic M. Brank H. Anand W. Arter







lecad]L. Kos
leon.kos@lecad.fs.uni-lj.si
iter]R. A. Pitts
lecad]G. Simič
lecad]M. Brank
iter]H. Anand
culham]W. Arter
[lecad]LECAD laboratory, Mech.Eng., University of Ljubljana, Aškerčeva 6, 1000 Ljubljana, Slovenia
[iter]ITER Organization, Route de Vinon-sur-Verdon, CS 90 046, 13067 St. Paul Lez Durance Cedex, France
[culham]Culham Centre for Fusion Energy, Culham Science Centre, Abingdon, OX14 3DB, Oxfordshire, U.K.


Built around the SMARDDA modules for magnetic field-line tracing [IEEE Tr. Plasma Sc. 42 (2014) 1932], the SMITER code package (SMARDDA for ITER) is a new graphical user interface (GUI) framework for power deposition mapping on tokamak plasma-facing components (PFC) in the full 3-D CAD geometry of the machine, taking as input a user-defined specification for parallel heat flux in the scrape-off layer (SOL) and a description of the equilibrium magnetic flux. The software package provides CAD model import and integration with the ITER Integrated Modelling and Analysis Suite (IMAS), parametric CAD components catalogue and modelling, CAD de-featuring for PFC surface extraction, meshing, visualization (using an integrated ParaView module), Python scripting and batch processing, storage in hierarchical data files, with several simulation cases in one study running in parallel and using message passing interface (MPI) for code speed-up. An integrated ParaView module can combine CAD geometry, magnetic field equilibrium, meshes and results for detailed setup analysis and a module is under development for full finite element computation of surface temperatures resulting from the power deposition patterns on 3-D PFCs. The code package has been developed for ITER, but can be deployed for similar modelling of any tokamak. This paper presents and discusses key features of this field-line tracing environment, demonstrates benchmarking against existing field-line tracing code and provides specific examples of power deposition mapping in ITER for different plasma configurations.



plasma-facing components, SALOME, SMARDDA, first wall








§ INTRODUCTION


The ITER plasma-facing components (PFC) are now fully designed and procurement is underway. A key utility in such design is field-line tracing for different magnetic field equilibria which allows the definition of component front surface shaping. On ITER, this design phase has deployed both analytic theory <cit.> and the field-line tracing code PFCFLUX <cit.>. Attention is now turning towards the critical issue of management and control of PFC heat fluxes in an actively cooled device such as ITER. To facilitate the development of control algorithms, particularly for protection of the beryllium main chamber first wall panels  <cit.>, a new field-line tracing environment, SMITER, has been developed, featuring a sophisticated graphical user interface (GUI) that uses the SMARDDA  <cit.> kernel and has been thoroughly benchmarked against PFCFLUX for specific cases of first wall panel and divertor target loading <cit.>. 
 
The main difficulty in field-line simulations is run-case setup which usually involves different commercial packages starting with CAD models mostly targeted at representation and manufacture. Simulations require defeatured models resulting in higher quality meshing and consequently fewer numerical problems in simulations. 

Field-line traces require only an exact PFC surface representation and a magnetic equilibrium as input. However, “exact” representation of the PFC surface using triangular grids requires a large number of triangles which are limited by memory and processor capabilities. Moreover, the magnetic equilibrium input is often prescribed on a low resolution grid which requires “smooth” interpolation of derivatives for every point of the field-line trace on a given magnetic field line. Pseudo-time integration of each field-line needs to be quite precise since the field-line angles of incidence on PFCs are generally low in tokamaks owing to the strong toroidal field in comparison to the poloidal field produced by the plasma current. In turn, these low incidence angles mean that PFC surfaces are typically shaped to ensure that leading edges arising as a consequence of assembly and manufacturing tolerance cannot be accessed by field lines on which high plasma power flux densities can flow. Such leading edge protection is even more important on an actively cooled device like ITER.



 §.§ Field-line tracing


The approach is to use the standard field-line equation

    x = d𝐱/dt=𝐁(𝐱),

where the dot denotes differentiation with respect to pseudo-time t measured along the fieldline <cit.>, assuming the guiding centre approximation (neglecting the ion Larmor radius). The term "pseudo-time" refers to solving the steady-state solution of differential equation (<ref>) by prescribing small enough particle time step to maintain fieldline accuracy. 

The magnetic field 𝐁 in SMITER can be fully 3-D or can be assumed
axisymmetric, independent of toroidal angle ϕ, and thus
described by a (poloidal) flux function ψ, together with a toroidal
component specified by the flux function I(ψ). Pseudo-time t can be
considered as field-line length.
In cylindrical coordinates the magnetic field components can be written as

    B_R=-1/R∂ψ/∂ Z,  
      B_T=I(ψ)/R,  
      B_Z=1/R∂ψ/∂ R ,

where B_T is the toroidal component of the field, directed along the ϕ coordinate. In flux coordinates (ψ, θ, ϕ) the field-line equation simplifies to dθ/dϕ=(1/I)R/J(ψ, θ), where J(ψ, θ) is the Jacobian of the mapping transformation. However, this simplified equation in flux coordinates can only be used where simple 2D mapping from/to global space exists thus field lines must not intercept X-points. Generally, this means that for diverted configurations, the standard field-line equation in a “global” calculation must intercept one of a set of surfaces specified by the “termplane” data structure to count as illuminated, whereas for limiter cases a “local” escape calculation implies that the triangle is illuminated if the field-line starting from it leaves the computational domain without intersecting another triangle in the shadowing set.



 §.§ Power deposition model

[23]r0.38
  

  

    
    < g r a p h i c s >

  

  
  
  Illustrating the definition of primary (blue) and secondary (red) separatrices for  the ITER baseline burning plasma magnetic equilibrium.
  

SMITER maps profiles of scrape-off layer (SOL) heat flux density flowing parallel to the magnetic field lines q_|| onto PFC surfaces.
 
Generally, the heat flux parallel to the magnetic field lines is assumed to fall off exponentially radially into the SOL from the primary separatrix (diverted configurations) or from the last closed flux surface (LCFS) in limiter configurations: 

    q_||(R)=q_||ompe^-(R-R_m)/λ_q ,

where q_||omp is the parallel heat flow at the outer midplane (omp) separatrix (m) or LCFS (blue line in Fig. <ref>), with radius R_m and λ_q is the characteristic width of this exponential decrease (the distance over which q_||omp falls to 1/e of its value).

The Z-position of the omp is defined by the centre of the magnetic equilibrium flux function ψ. The second separatrix, applicable to diverted configurations (red line in Fig. <ref>), is defined as the first flux surface to contact any part of the wall contour (black lines in Fig. <ref>) before reaching the divertor targets. In the case of the equilibrium in Fig. <ref>, the second separatrix contacts the first wall at the top of the chamber and the upper part of the outer divertor baffle. 

It is convenient to use flux coordinates ψ in Eq. (<ref>) by introducing approximation for

    Δ R = R-R_m ≈∂ R/∂ψΔψ 
      = ∂ R/∂ψ (ψ - ψ_m)  = ψ-ψ_m/R_m B_pm ,

where the poloidal component of 𝐁 at the midplane is given by B_pm = (1/R_m)(∂ψ/∂ R) [cf. Eqs. (<ref>)] assuming radial component of the field is small.

Power deposition q_PFC∝𝐁·𝐧, with surface normal 𝐧, assumes flux conservation ∇·𝐁 = 0 that results (see Ref. <cit.>) in 

    q_PFC(ψ) = P_SOL/4π R_mλ_q B_pm𝐁·𝐧exp(-ψ-ψ_m/R_m B_pmλ_q) ,

where P_SOL is the power flowing into the SOL across the separatrix/LCFS (assumed to enter the SOL at the omp). SMITER can also include alternative models for the radial profile of parallel heat flow, such as double exponentials <cit.>, the divertor spreading formula defined in Ref. <cit.> or more complex expressions which properly take into account the variation of field line connection length in the SOL (see for example the application of the ELM parallel loss model <cit.>).



§ SMITER SIMULATION PRINCIPLES




To map a specified omp power deposition radial profile on PFCs, magnetic field lines on flux surfaces within the magnetic equilibrium need to be followed in 3D space until they intersect a solid surface. The PFC geometry is obtained from CAD models of the structure converted to a high precision triangular mesh. In practice, field lines are followed backwards from the surface in question, with proper mapping of the heat flux profile specified in the free SOL.

The field-line tracing must take into the account the neighbouring structures around the object of interest in order to ensure that the field lines are not intersected by other solid surfaces. If this does occur, zero heat flux density is associated with the point on the surface at which the field line originated. 

SMITER algorithms are programmed for limiter and divertor cases.  The geometry for both of them is separated into two types, taking into account of the wetted and shadowed
regions.

The SMITER framework is composed of several modules for pre- and post- processing. Pre-processing provides transformation of input CAD surfaces into meshes required by the main SMITER module which performs the field line trace. Post-processing allows analysis of the results with a ParaView visualization module and exporting data to other formats.

Data workflow between modules is based on Common Object Request Broker Architecture (CORBA) inter-process communication which provides methods and objects for scripting in Python programming language. The SMITER module is a main CORBA component that runs several external FORTRAN codes. Meshing of the CAD model built from curves and surfaces which are precisely defined by the bicubic splines can be performed within SMITER meshing module. Alternatively, externally generated triangular meshes can be imported/exported in Nastran/Patran format or from/to IMAS Wall Interface Data Structure (IDS). The magnetic equilibrium required by SMITER for the field line trace can be read as a standard equilibrium (EQDSK) file format (the output of the EFIT code widely used in the tokamak community) or imported from an IMAS equilibrium IDS. SMITER module runs external FORTRAN codes in the following order: 


  * The geometry and equilibrium processing code (GEOQ) is used to
analyse the flux function usually defined in the EQDSK file and
prepares the bicubic spline-interpolated flux function. 

  * The hybrid data structure generator code (HDSGEN) computes the multi-octree
hierarchical data structure (HDS) <cit.>, which is designed to accelerate the
computation of field line-triangle intersection.

  * The power calculator code (POWCAL) performs the power surface deposition calculation, following the field lines using the transformed geometry from GEOQ and the HDS from HDSGEN. POWCAL uses MPI parallelism to speed up field line tracing.






§ GRAPHICAL USER INTERFACE


The SMITER graphical user interface (GUI) shown in Fig. <ref> uses several modules (or components) which may be used independently and interoperably in the workflow based on the SALOME pre-post processing framework <cit.>. Modules create data which is usually stored into a study that is saved into hierarchical data format (HDF) file for reuse. The geometry module (GEOM) provides basic CAD operations for creation, extraction, healing, and modification of CAD models. It can import CAD files in many different formats, including standard CAD formats for data exchange – STEP and IGES and permitting the creation of geometrical and topological objects with different modelling operations.

A key element for mesh preparation is the generation of PFC surface models
from imported CAD models. GEOM provides explosion of the assembly into faces and grouping back into compounds for the building of a complete PFC model. The meshing module uses a set of meshing algorithms and their corresponding conditions (hypotheses) to generate  meshes from geometrical models created in or imported into GEOM. The main functionalities are creation of meshes, grouping, transformations, and mesh modifications. Meshing of CAD models can be modified by a density parameter change upon user request allowing gradual increase of precision during the preparation of cases.  ParaViS is a data analysis post-processing module which embeds ParaView visualization tool inside the SMITER GUI. Through the CORBA interface CAD models or meshes can be directly imported for compound representation as shown in Fig. <ref>(b). For such visualization purposes the SMITER module includes parametric CAD component generation scripts with dialogs which build assemblies of cryostat, magnets, vacuum vessel, divertor, monoblocks, blanket, panels and other CAD modeling examples at different levels of detail for future expansion to other codes beyond field-line tracing. Additionally, SMITER includes ELMER finite elements modelling (FEM) module that enables calculation of stationary PFC surface temperature distributions. This module includes routines for thermal calculation including the full sub-structure of the temperature field resulting from a given heat flux density distribution on the top surface of the PFC.




§ BENCHMARKS

SMITER has been extensively verified and validated for both divertor and limiter configurations. The ensemble of these ready-to-run HDF studies are part of the ITER software distribution. Two particular examples are highlighted here for the purposes of demonstration using previous studies with the PFCFLUX <cit.> field-line tracing code. The first is the case of an ITER inner wall limiter start-up equilibrium on FWP 4 examined with PFCFLUX in Ref. <cit.>. Adopting the same case setup parameters (a single exponential omp q_|| profile with λ_q = 50 mm and the same P_SOL - see Fig. 11(b) in Ref. <cit.>) and identical meshes, the maximum heat load obtained with PFCFLUX is q_PFC∼ 2.26 MW/m^2, while SMITER computes the maximum heat load of q_PFC∼ 2.27 MW/m^2. The surface heat loads (Fig. <ref>) are within 1 % between the two codes. 

Subtle differences between the codes observed as red peaks correspond to sharp surface variations. Closer examination reveals red bands of a few triangle in width which are caused by PFCFLUX averaging surface normals from nodes while SMITER computes normals from a single triangle. Therefore, SMITER is more accurate on edges and has some oscillation of normals on smooth surfaces. More details can be found in the discussion of surface accuracy in Section II-C3 and Support Section II of Ref. <cit.>. Magnetic field interpolation differences are in the range of 0.006 % following the slow vertical variations observed in Fig. <ref>.

The second benchmark example is more complex and concerns the heat loads during the current quench (CQ) phase of an upward going vertical displacement event on ITER at baseline (15 MA) performance. Here, the loads are mainly concentrated on FWP 8-10 and were first estimated using PFCFLUX to provide the estimates of the likely extent of CQ driven beryllium wall evaporation and melting first shown in Ref. <cit.>.   

Fig. <ref> compares the SMITER and PFCFLUX traces for the same magnetic equilibrium and input assumptions (see caption of Fig. <ref>), although the geometry models used for the full poloidal sector differ in meshing. 
The target geometry in SMITER is at a different toroidal angle as compared to PFCFLUX. However, this has no impact on the heat transfer calculations due to the assumption of axisymmetric magnetic field.
PFCFLUX case setup uses complete panels, while SMITER uses two halves of the panels (wings) on the inboard side for target and complete panels on the outboard side, where mounting holes in the centre of the panels are clearly visible. 
Given these differences in the geometry, both the magnitude and wetted area distribution of the two tracers are similar and are in good agreement in terms of the magnitude of the deposited power density and the integrated value across all panels. 

The framework has also been utilized extensively for the development of real-time wall heat flux control algorithm for ITER <cit.>. Furthermore, the power flux density distribution estimated by the GUI framework has been successfully benchmarked against experimental IR diagnostic data on TCV tokamak <cit.>.



§ CONCLUSION


A new field-line tracing code SMITER has been developed primarily for ITER but can be used generally used on any tokamak. It allows power deposition mapping in the full 3-D CAD geometry of the machine taking as input a description of the radial profile of heat flow parallel to the magnetic field at the outer midplane of the  magnetic equilibrium.

It is embedded in a sophisticated, Python based GUI and incorporates state-of-the-art meshing capability, allowing the user to develop defeatured surface meshes of imported CAD models. Finite element thermal modelling tools are also being added allowing the computation of self-consistent temperature maps from the calculated surface power density distributions. The SMITER package is fully  integrated into the ITER Integrated Modelling Analysis Suite and is hosted (GIT version control) by the ITER Organization, available for use (and development) by all members of the ITER Parties. The code is already being actively employed for the development of simplified real time wall heat flux control algorithms <cit.> and is expected to play an important role in the production of synthetic diagnostic signals for the testing of ITER systems being prepared for PFC power flux control and monitoring.



§ ACKNOWLEDGEMENTS


The work on SMITER was carried under contracts
ITER/RT/ 14/4300000958a1 and IO/16/CT/4300001401. The first
author has been partially supported for the MPI work that has been performed 
under the (HPC-EUROPA3 H2020 INFRAIA-2016-1-730897) 
programme. The views and opinions expressed herein do not necessarily
reflect those of the ITER Organization.


9
natexlab#1#1









[#1],#1
[Stangeby(2011)]Stangeby
authorP. Stangeby,
titleAnalytic expressions for shaping analysis of the
  ITER outer wall,
journalNuclear Fusion volume51

[Firdaouss et al.(2013)Firdaouss, Riccardo, Martin, Arnoux, and
  Reux]Firdaouss
authorM. Firdaouss, authorV. Riccardo,
  authorV. Martin, authorG. Arnoux,
  authorC. Reux,
titleModelling of power deposition on the JET ITER
  like wall using the code PFCFlux,
journalJ. Nucl. Mat. volume438
  (year2013) pagesS536 – S539.

[Anand et al.(2018)Anand, Pitts et al.]Anand
authorH. Anand, authorR. A. Pitts, et al.,
titleImplementation of 3-D effects of the plasma-facing
  components in a 2-D real-time model based approach for wall heat flux
  control on ITER,
in: booktitle27th IAEA Fusion Energy Conference,
  addressGandhinagar, India, year2018, pp.
  pages1–8 (EX/P7–24). <https://conferences.iaea.org/indico/event/151/contributions/6441/>.

[Arter et al.(2014)Arter, Riccardo, and Fishpool]Arter
authorW. Arter, authorV. Riccardo,
  authorG. Fishpool,
titleA CAD-based tool for calculating power deposition
  on tokamak plasma-facing components,
journalIEEE Transactions on Plasma Science
  volume42 (year2014) pages1932–1942.

[Kocan et al.(2015)]Kocan
authorM. Kocan, et al.,
titleImpact of a narrow limiter SOL heat flux channel on
  the ITER first wall panel shaping,
journalNuclear Fusion volume55
  (year2015) pages033019.

[sal(2018)]salome
titleSALOME: The open source integration platform for numerical
  simulation, howpublished<http://www.salome-platform.org/>,
  year2018. noteAccessed: 2018-09-30.

[Lehnen et al.(2015)]Lehnen
authorM. Lehnen, et al.,
titleDisruptions in ITER and strategies for their
  control and mitigation,
journalJ. Nucl. Mat. volume463
  (year2015) pages39–48.

[Anand et al.(2018a)]ANAND2018143
authorH. Anand, et al.,
titleModel-based real-time power flux estimator for the
  ITER first wall,
journalFus. Eng. Des. volume137
  (year2018a) pages143–151.

[Anand
  et al.(2018b)]anand18:_validation_realtime_iter_tcv
authorH. Anand, et al.,
titleValidation of a real-time model-based approach for
  ITER first wall heat flux control on the TCV tokamak,
in: booktitle25th EPS Conf. Plasma Phys.,
  addressPrague, year2018b, p.
  pagesP2.1074. <http://ocs.ciemat.es/EPS2018PAP/pdf/P2.1074.pdf>.



