logo

TRANSP How To

Back

How do I...

Solve for q predictively?

The template namelist provided in the TRANSP namelist section is set up to read in data for the q profile over the entire run duration and use this profile to solve for the equilibrium. Alternatively one can predictively evaluate q by solving the poloidal field diffusion equation. To solve the PFDE set the namelist variable NLMDIF = .TRUE.. Further to this it is necessary to specify the boundary conditions to be used when solving the equation. To constrain the solution to match the measured plasma current set NLPCUR = .TRUE. (this is commonly done). To match the measured surface loop voltage instead set NLVSUR = .TRUE.. If both of these options are set .TRUE. then the resistivity ZEff will be varied to match both conditions. Furthermore an initial condition for the solver is required. This is set using the NEFLD variable. When set to 3 an analytic voltage profile is used, when set to 7 input data for q is used. For more information on this see the magnetics section. Note that if the NQMODA variable is set then the behaviour set by this will overwrite the behaviour specified by the NLMDIF control.

Switch between different methods for determining q?

It is possible to switch between different methods of determining the q profile over the course of a single run. This is achieved using the namelist switches TQMODA, NQMODA and NQMODB. The TQMODA variable allows the user to provide a set of transition times between different regimes. The NQMODA variable then allows the user to specify which method of determining q is to be used in each time interval, 1 indicates solution of the PFDE while 4 indicates the use of input data. NQMODB allows the user to specify the boundary conditions in each interval. For instance the following selections would solve the PFDE from 15.0s to 17.0s, use input data from 17.0s to 18.0s and then solve the PFDE again from 18.0s to 20.0s. For each interval the total current is used as a boundary condition:

TINIT = 15.0
FTIME = 20.0
TQMODA = 17.0, 18.0
NQMODA = 1, 4, 1
NQMODB = 1, 1, 1

Note that these settings overwrite those specified by NLMDIF etc. For more information refer to the magnetics section.

Use ion temperature data?

The template namelist provided in the TRANSP namelist section is configured to set the ion temperature equal to the electron temperature at all times. To use ion temperature profile data, leave NLTIPRO = .TRUE. but also set NLTI2 = .TRUE. to indicate that profile data is to be read in. This data must be provided via the trigraph TI2. See the ion temperature controls section for more information.

Solve for the ion temperature predictively?

Setting NLTIPRO = .FALSE. in the namelist will result in TRANSP calculating the ion temperature profile using the ion power balance equation. The ion thermal conductivity is given by the product of a fit to the neoclassical conductivity and an anomalous multiplier. The choice of which neoclassical fit to use is made by setting the namelist variable NKIMOD to an appropriate value. The various options are described in the ion power balance section. The anomalous multiplier can either be set directly in the namelist or data can be read in from a Ufile. Note that it is also necessary to set the boundary conditions for the power balance equation using the MODIEDG variable. The choices for this are described here.

Switch between different methods for determining the ion temperature?

Switching between different methods for determining the ion temperature over the course of a run is possible in a similar manner to how it is implemented for the q profile. In the case of the ion temperature one specifies transition times between regimes using the variable TKIMOD and then specifies the procedure for determining the ion temperature in the different regimes using the variable NKIMODA. This variable can be set to the same values as NKIMOD (described in the section above) to select a conductivity model to use when solving the ion power balance equation predictively or it can be set to 100 to set NLTIPRO = .TRUE. in the corresponding interval allowing ion or electron temperature data to be used. For example the settings below would solve the power balance equation predictively in the intervals 15.0s to 17.0s and 18.0s to 20.0s using the Chang-Hinton neoclassical fit and use ion temperature data provided via trigraph TI2 in the interval 17.0s to 18.0s.

TINIT = 15.0
FTIME = 20.0
TKIMOD = 17.0, 18.0
NKIMODA = 4, 100, 4
NLTI2 = .T

Full details can be found in the power balance section. Note that the behaviour specified by NKIMODA overwrites the behaviour specified by NLTIPRO etc.

Use ZEff profile data?

To read in and use ZEff profile data set the namelist switch NLZFI2 = .TRUE. and specify an input data set using the trigraph ZF2. For further information see the plasma composition section.

Switch between different methods for determining ZEff?

As with the q profile and the ion temperature it is possible to configure TRANSP to use different methods for determining the ZEff profile over the course of a run. Transition times are specified using the variable TZEFMOD and the methods to use in the different intervals are set using NZEFMOD. For example the following code snippet would use a constant value of ZEff given by the namelist variable XZEFFI in the interval from 15.0s to 17.0s and from 18.0s to 20.0s and would use a constant ZEff value taken from input data provided via trigraph ZEF in the interval from 17.0s to 18.0s.

TINIT = 15.0
FTIME = 20.0
TZEFMOD = 17.0, 18.0
NZEFMOD = 0, 2, 0

For full information on the available options see the plasma composition section.

Extract TRANSP equilibrium using TRXPL?

It is possible to extract the equilbrium from TRANSP in eqdsk format - this is especially useful when part of the equilibrium is prescribed through EFIT, but there are some aspects that are being calculated for within TRANSP, such as the evolution of the q-profile or using the TEQ solver. In order to produce the equlibrium outputs one needs to execute the TRXPL code. At JET this can be either done through OMFIT (within TRANSP module) or ran by hand from the terminal on heimdall. The terminal procedure goes as follows:
Prepare the TRXPL input file trxpl.in and save it in the directory where the TRANSP run output is stored. Content of trxpl.in:
P # Define path to CDF output
./99224Y02 # Define TRANSP RunID in local folder
A
5.8 # Define time slice of interest in TRANSP (JET -40s)
0.05 # Define +/- time averaging interval
151 # Define number of theta points
101 # Define number of R points
101 # Define number of Z points
-1 # Define direction of Btor
-1 # Define direction of Current
Y
X
H
W
state99224Y02_45800 # Define output name
W


Open a terminal, cd into the TRANSP results directory, and run the following commands:
module purge
module load ntcc
trxpl < trxpl.in
which should produce the following output files: state99224Y02_45800.cdf, state99224Y02_45800.geq, state99224Y02_45800.mdescr, state99224Y02_45800.sconfig.
The state file stateXXX.cdf is what goes into i.e. profiles_gen for TGLF and (C)GYRO. The .geq is a gEQDSK file, but often it is quite crude, due to TRANSP interpolation, it is not typically used, and an EFIT output is preferred.

Treat Sawteeth?

In order to treat Sawteeth it is necessary to first produce a Ufile containing a set of Sawtooth times which can then be read into TRANSP using the trigraph SAW. This can be produced from any signal in which the sawteeth are clearly visible, for instance KK3. Instructions on how to make this Ufile by running the SAWTOO program can be found in these slides by Hyun-Tae Kim.

Once the output Ufile has been created, copy it to the TRANSP data directory for the run ( $TWD/data ) and name it for instance 'ASAW65432.SAW_0000' (assuming the run number is 65432). The Ufile can then be read into TRANSP by adding the following entries to the TRDAT namelist:

PRESAW='ASAW'
EXTSAW='SAW_0000 UFL:1:<user>:0000:$TDD'

Where <user> denotes your user ID (e.g. buchanj). Note that the user ID, sequence number & directory specifications are required so that the file may be copied to the PPF system at the end of the run. This is important for data provenance.

Setting the namelist variable DTSAWD will then ensure that data within +/-DTSAWD of a sawtooth event will not be used and the data outside this window will be extrapolated inwards to the sawtooth time.

To turn on the sawtooth model for TRANSP set NLSAW = .TRUE.. There are then separate switches to turn on the effect of the sawteeth on different species. If one only wished to model the effect on the beam ion population one would set NLSAWB = .TRUE. and set all the others to .FALSE. (note the default here is .TRUE.). The model to use is set by the variable NMIX_KDSAW, a value of 1 for instance sets the standard Kadomtsev model. The details of using the sawtooth model are described further in the sawtooth section.

Model pellets?

See the section on pellet modelling.

Produce fast particle output?

March 2023: Compiled ntcc lacks pspline library. In order to run get_fbm, load
$module purge
$module load ntcc/1.0.2

July 2023: Before extracting the fast ion distributions with get_fbm, one has to reorder the entries present in a <TRANSPrunID>.DATAX, (X=1,2,3...) by running
$python /common/cmg/mporad/TRANSP/TRANSPhub/05_Utilities/acsort.py <TRANSPrunID>.DATAX
with python 3.X. Python 3.7 can be loaded with omfit environment by typing
$module purge
$modue load omfit

NUBEAM: Details on how to extract the fast ion distribution function from the TRANSP beam module, including beam fast ions and ions affected by beam and RF synergy, are available in this talk by Hyun-Tae Kim.

FPP: Details on how to extract the fast ion distribution function from the TRANSP Fokker-Planck RF module, including RF minority ions, are available in these documents: FPP description, FPP thesis and FPP distribution function.

Use private PPF data?

In order to use a private PPF created by a particular TRANSP user it is necessary to append their username to the EXT card for the relevant input trigraph. So for instance if one wanted to use the datatype NE contained within a private PPF named DENS created by user buchanj for the electron density, one would include the following lines in the TRDAT namelist:

PRENER='DENS'
EXTNER='NE PPF:buchanj'

In this case the sequence number would default to 0. If a specific earlier sequence number, say 51, is required it must be appended after the user name as follows:

EXTNER='NE PPF:buchanj:51'

This results in the creation of a corresponding user Ufile in the TRANSP Data Directory (TDD) for the run.

Find or recover an old run?

See this section.

Back