This option is selected with LEVGEO=8
The information that must be provided to TRANSP to represent an equilibrium solution includes the 2D flux surface
geometry as a function of minor radius (toroidal flux), poloidal angle, and time; 1D profiles for $q$, $R\cdot Btoroidal$, and pressure $p$
as functions of minor radius and time; and 0D time histories of total toroidal and poloidal flux. A TRANSP utility called scrunch2
can
extract this data from EFIT equilibria in an MDS+ database tree and write them to legacy format UFiles that can be read by the TRANSP
preprocessor trdat. The trdat utility now also has the ability to retrieve this information from an IMAS database, without the
need for scrunch2 or UFiles. Because TRANSP was co-developed with PPPL’s TFTR tokamak, which had a circular plasma cross-section,
it made sense at the time to use a moments representation of the equilibrium geometry, with cylindrical $R$ and $Z$ for a
plasma surface provided as cosine and sine expansions in poloidal mode number respectively (or full sine and cosine for
both $R$ and $Z$ for non-up-down-symmetric surfaces). This moments representation is still supported by the code.
Since 2002, however, TRANSP has also supported the alternative to read in and use $R(x,\theta,t)$ and $Z(x,\theta,t)$, which avoids
truncation errors in the representation of the more highly-shaped cross-sections of modern tokamaks. TRANSP can also read
the poloidal flux function $\psi $𝜓(R,Z,t), which provides the field solution outside the last closed flux surface.
These last three functions are always present in the representation read from IMAS.
When $\psi(R,Z,t)$ is provided, TRANSP performs additional analysis on the equilibrium. It attempts to locate all X-points,
the magnetic axis, and the bounding point of the plasma, which may be either an X-point or a location on the limiter.
For X-point-bounded plasmas, it has the option to trace the separatrix for interface with scrape-off-layer codes.
It can also compute the normalized inductances at the analysis boundary and the separatrix.
In addition, if logical variable NLPSIRZ_FLUX
is set to .TRUE. in the input namelist, the function $\psi(R,Z,t)$ will be
used to compute the locations of the flux surfaces (overriding the provided geometry data) and the enclosed poloidal flux within
each surface. When this poloidal flux profile is combined with the provided $q$ and $R\cdot B_{toroidal}$ profiles, the equilibrium
is overdetermined, which can be resolved in a number of ways determined by the choice of input variable NPSIRZ_MODE
.
By default (NPSIRZ_MODE=102
),
TRANSP will use its self-evolved q profile combined with $\psi(R,Z,t)$ to recalculate the toroidal flux profile, which in turn affects the
geometry mapping. If instead NPSIRZ_MODE=-102
, the input $q$ profile will be used for this calculation. To give priority to $R\cdot B_{toroidal}$,
choose NPSIRZ_MODE=103, which will recompute q based on the poloidal and toroidal fluxes; or NPSIRZ_MODE=-103
, which uses the provided
$R\cdot B_{toroidal}$ and $q$ and recomputes the equilibrium to match $\psi(R,Z,t)$, ignoring the provided pressure profile.
The input UFILES can be generated running scrunch2
.
LEVGEO=8 needs either the PREMMX/EXTMMX UFILE or the {RFS,ZFS} UFILES for the magnetic equilibrium evolution, but not both.
Below is a list of the UFILES and namelist variables. Out of all UFILES generated by scrunch2, only the MMX, QPR and LIM files are needed to run LEVGEO=8, others are optional.
NOTE: the output of scrunch2 is in MKS units, unless otherwise specified. Need to set LFIXUP=2 in the namelist to inform TRANSP that units must be converted and that the radial and time coordinates sequence in the UFILE should be checked and swapped, if needed (i.e. whether the profile array needs to be transposed).
- PREMMX/EXTMMX
- Magnetic equilibrium moments.
- PRERFS,EXTRFS
- Magnetic equilibrium geometry described with explicit flux surfaces R(t,theta,x)
- PREZFS,EXTZFS
- Magnetic equilibrium geometry described with explicit flux surfaces Z(t,theta,x)
- PREQPR/EXTPQR
- Safety factor profile. Define also NRIQPR=5 in the namelist. Important: Contrary to other profiles, the q profile in TRANSP MUST be provided as a function of the sqrt of normalized toroidal flux. No other coordinate is accepted when using LEVGEO=8.
- PREGBR/EXTGBR
- (RBT) profile. If this UFILES is provided together with the 1D UFILE PRERBZ/EXTRBZ, the 2D data will overwrite the 1D data. Include also NRIGRB=5 in the namelist. This UFILE is optional.
- PREPRS/EXTPRS
- Pressure profile generated by scrunch2. If density and temperature profiles from Thomson scattering are available, then it is advised to use these, since the pressure profiles generated by scrunch2 come directly from EFIT or equivalent. Unless the EFIT (or equivalent) equilibrium has been contrained by kinetic profiles and MSE data, it is not advised to use the PREPRS/EXTPRS UFILE. Also, this file is not necessary to use LEVGEO=8.
- PRETRF/EXTTRF
- Total enclosed toroidal flux vs time.
- PREPLF/EXTPLF
- Total enclosed poloidal flux vs time.
- PREPSI/EXTPSI
- External field evolution from EFIT (or equivalent equilibrium reconstruction), ψ(t,R,Z). By convention ψ=0 on the magnetic axis. This UFILE is optional.
- PREPF0/EXTPF0
- ψ(t) on the magnetic axis. Together with the PREPSI/EXTPSI for ψ(t,R,Z), this file is used to generate the poloidal flux ψ=RAφ. This file is optional, but is required if the PREPSI/EXTPSI UFILE is provided.
- PRELIM/EXTLIM
- Limiter location from EFIT, time invariant contour (R,z) expressed as a Z vs R UFILE.