Documentation

Introduction

The NCLASS module calculates the neoclassical transport properties of a multi-species axisymmetric plasma of arbitrary aspect ratio, geometry and collisionality. It is designed to be called from a transport code that provides the plasma density and temperature profiles as well as a number of flux surface averaged geometric quantities.

The NCLASS_PT stand-alone driver supplied with the NCLASS module provides sample input for a single call to NCLASS (a single flux surface). It uses a simplified large aspect ratio elongated plasma approximation to generate the required geometric input. It then gives examples of reconstructing the fluxes, bootstrap current, and rotation velocities from the NCLASS module output and writes a summary of the results of the test case. If the user is interested in incorporating NCLASS as a module in another code, the driverroutine provides valuable examples of how to manipulate the output to generate other related quantities.

For inclusion of the NCLASS module in a transport or other analysis code, there are additional modules available from the author for reading VMEC or EFIT output files, and others for calculating the required flux surface averaged geometric quantities from either of those representations.

Significant effort has gone into making the NCLASS module computationally efficient so it can be used for routine analysis in transport codes. It has been incorporated into several transport codes (e.g., TRANSP, ONETWO, ASTRA) and also used extensively in another stand-alone form (FORCEBAL code) for analysis of data (e.g., at PPPL, GA, JET, TEXTOR, Tore Supra). Although the numerical procedures are rather sophisticated, it is computationally robust.

All units are in mks with temperatures in keV. The radial variable can be in any unit of the user's choice as long as all input to NCLASS is consistent (see Radial grid). There is no way to check this consistency inside NCLASS. Many of the output quantities also carry the arbitrary unit of the radial variable (see NCLASS Variables or the comment blocks at the beginning of each routine).

File names and routines are rendered as bold uppercase in a typewriter font: FILENAME.EXT

Coding and variable names are rendered as bold lowercase in a typewriter font: p_ft

Greek characters appear as (if the Symbol font is available these are greek letters): abcd

Help files

The Help files describing the various features are accessed through the multiple frame HTML file README_NCLASS_PT.HTML:
          README_NCLASS_PT.HTML
          |
          |--NCLASS_PT_TOP.HTML
          |
          |--NCLASS_PT_INFO.HTML
          |
          |--NCLASS_PT_INDEX.HTML
             |
             |--COMPUTER.GIF
             |
             |--COUNTER.GIF
      
The GIF files have been added for entertainment, courtesy of my daughter, Michele, who convinced me HTML was a snap to learn. In fact, it is almost as easy as LaTeX.

FORTRAN sources

The FORTRAN sources consist of the NCLASS module,
          NCLASS_MOD.FOR
        
the driver,
          NCLASS_PT_DR.FOR
        
three PARAMETER 'include' files,
          PAMX_MI.INC
          PAMX_MS.INC
          PAMX_MZ.INC
        
a few auxiliary function routines,
          U_ERF.FOR
          U_LU_BACKSUB.FOR
          U_LU_DECOMP.FOR
        
array manipulation routines,
          RARRAY_COPY.FOR
          RARRAY_SUM.FOR
          RARRAY_ZERO.FOR
        
and a module that control the 'write' formats,
          WRITE_MOD.FOR
        
Each routine has a description block at the beginning that covers functionality, and all I/O. A flow and dependency diagram for NCLASS_PT is shown under Flow Diagram

The parameters have been set up to handle a maximum of nine isotopes at a time, a maximum of forty species (populated charge states of all isotopes) and Z up to 18. Although this is more than adequate for most problems, NCLASS has been applied to problems that exceed each of these limits. A diagnostic error is generated by NCLASS if the problem calls for exceeding any of these limits.

Makefile

A UNIX 'makefile' is included, but it has only had limited testing:
          MAKEFILE
        

NAMELIST input

All input to NCLASS_PT is provided via a NAMELIST in the file:
          IN_NCLASS_PT.NML
        
All input variables are set to the test case values as defaults in the driver. Below is a description of the NAMELIST variables, and whether they are used directly for input to NCLASS (see NCLASS input) or used by the driver routine (see Driver input) to generate other required NCLASS input, control the output, etc.

Local to driver

          k_out-option for output to nout (-)
               =1 errors only
               =2 errors and results 
               =else no output
          p_eps-inverse aspect ratio (-)
          p_q-safety factor (-)
          r0-major radius (m)
          a0-minor radius, scale length for rho (m)
          e0-axial elongation (-)
          bt0-axial toroidal field (T)
          q0-axial safety factor (-)
        

Passed to NCLASS

          k_order-order of v moments to be solved (-)
                 =2 u and q									
                 =3 u, q, and u2
                 =else error
          k_potato-option to include potato orbits (-)
                  =0 off
                  =else on
          c_den-density cutoff below which species is ignored (/m3)
          p_grphi-radial electric field Phi' (V/rho)
          p_gr2phi-radial electric field gradient Psi'(Phi'/Psi')' (V/rho2)
          amu_i(i)-atomic mass number of i (-)
          temp_i(i)-temperature of i (keV)
          den_iz(i,z)-density of i,z (/m3)
        
The p_* values are for the flux surface of interest, i.e., radial variables when NCLASS is called in a loop over radial nodes. (For a discussion of naming conventions, see Name Conventions). The *0 values are global or axial values to generate the potato orbit parameters and other approximate geometric quantities. a0 is used to generate characteristic gradient scales. Phi denotes the electric potential. The radial electric field and its derivative are expressed in terms of the electric potential because NCLASS uses flux surface averaged quantities in its equations. Psi is the poloidal flux contained within the flux surface of interest (not divided by 2p).

NCLASS_PT sets up the gradients and metrics using a radial grid, r, that is proportional to the square root of the toroidal flux and normalized to a0 so that it has units of meters, and 'designates derivatives with respect to r.

NCLASS_PT cases

Generally, NCLASS has been run with electrons as the first isotope, although that is arbitrary. Because of the possibility that the thermal species are not in charge balance (e.g., with neutral beam injection, a tail population of ions from RF heating, runaway electrons, etc.), NCLASS does not impose charge neutrality. However, ambipolarity should be a consequence of the properties of the collision operator. The viscosity or its individual components can also be turned off by modifiying the driver. This flexibility allows the user to test various limits against other models.

Multiple charge state default case

The sample NAMELIST solves for six species (e, H, C+2, C+4, O+5, and O+7), representing four isotopes (e, H, C, and O) to illustrate the multiple charge state treatment. The specification of isotopes is governed by the amu_i and temp_i input, and the isotopic populations by den_iz.

Ion-ion problem

NCLASS can be run without electrons (negative charge is assigned to species with amu_i < 0.5) to calculate the transport resulting from ion-impurity collisions only. The resulting fluxes should be ambipolar. This case can be run by modifying the input in the IN_NCLASS_PT.NML file.

Two temperature distribution

NCLASS can accept a two temperature distribution by specifying two isotopes with the same mass and charge (e.g., amu_i(2) = amu_i(3) = 2.0 with different temperatures and densities for isotopes 2 and 3 governed by den_iz and temp_i input). This case can be run by modifying the input in the IN_NCLASS_PT.NML file.

Axial bootstrap current/potato orbits

Potato orbit effects can be turned on with the switch k_potato = 1. This provides an empirical modification of the viscosity near the magnetic axis to match theoretical limits. With large potato orbit corrections, the trapped fraction does not vanish at the axis. Although the potato orbit results have appeared reasonable in various tests and applications to TFTR, DIII-D and ITER the viscosity has not been benchmarked against more detailed kinetic calculations to verify either the radial extent of the orbit corrections or the form.

Beyond NCLASS_PT

These cases are within the realm of NCLASS capabilities, but the NCLASS_PT driver would have to be modified to accomodate them.

Banana-only viscosity

The Pfirsch-Schlüter contribution to viscosity can be turned of by setting all poloidal elements of the geometric factor p_fm to zero.

Pfirsch-Schlüter-only viscosity

The banana regime contributon to the viscosity can be turned off by setting the trapped particle fraction (p_ft) to zero.

Spitzer problem (no viscosity)

The Spitzer problem is solved by setting both p_fm and p_ft to zero.

Removing axial singluarity

Choose r (see Radial grid) proportional to the poloidal flux, Y to remove an axial singularity in p_fhat. (dY/dr enters through the denominator of the NCLASS input variable p_fhat). For other grid representations (e.g., where r is proportional to the square root of the toroidal flux as in NCLASS_PT), avoid calling NCLASS at the origin where the variable p_fhat is singular. The simple geometry and choice of grid in NCLASS_PT do not allow the user to calculate axial modifications without revising the driver.

Other cases

If you wish to apply NCLASS to unusual cases, or if you obtain a strange result from one of the above cases, consult the author. Although NCLASS has undergone extensive testing, not all possible cases have been explored.

NCLASS_PT output

A single output file is generated by the driver:
          OUT_NCLASS_PT.DAT
        
If k_out = 1 is selected, the only output will be warnings and error messages. For k_out = 2, warnings and error messages plus results will be output. Other choices of k_out eliminate all output.

Precision

NCLASS runs in single precision on 32-bit machines and yields at least four digit accuracy, which is several orders of magnitude more accurate than the physics representation.

Known problems

NCLASS in its various forms has been run on dozens of platforms. NCLASS_PT may have two I/O difficulties that are easy to correct. NAMELIST input formats are not standard and neither are OPEN statements in FORTRAN 77. In that regard NCLASS_PT uses the FORTRAN 90 standard. Otherwise, NCLASS and NCLASS_PT are essentially written in FORTRAN 77 except for a few items of style that all FORTRAN 77 compilers (that the author has used) have adopted. Symptoms of the NAMELIST problem are an inability to read the input because of the beginning and ending symbols. Errors in the OPEN statement can occur on some platforms when generating the output file if an output file already exists. The forms used for the NAMELIST file and OPEN statements have worked with all FORTRAN 90 compilers the author has used.

Revisions

NCLASS_PT 1.1

Extensive revisions have been made to this version of NCLASS and its 'single spatial point' driver NCLASS_PT to:

Extended physics

Potato orbit effects are included as an option through the switch k_potato.

The parallel current response to the external force has been added. An example of the use of this feature is that it gives the response current to neutral beam current drive when the beam parallel forces are input through fex_iz.

Simplified interface

The sequential calls to five NCLASS routines have been wrapped into a single interface routine in the NCLASS module. The interface calculates dependent variables and hides many of the internal variables.

The calculations of one of the internal routines that had minimal functionality have been absorbed by the interface routine.

All I/O for the NCLASS module is now passed as arguments through the interface routine. This facilitated the removal of all COMMON blocks.

Efficiency

Although earlier versions of NCLASS allowed the user to specify the order of the viscosity and friction matrices (i.e., use of either 2 or 3 velocity moments) the full 3x3 matrices of friction and viscosity coeffcients were being calculated. Now the matrices are calculated as 2x2 when the option k_order = 2 is specified, reducing the computational time by nearly a factor of two. For most applications only two moments are necessary. In collisional plasmas (Pfirsch-Schlüter regime) it can be important to include the third moment terms. Not all the important third moment terms have been implemented in NCLASS (see closure discussion in the Hirshman and Sigmar review, it's messy). The retention of the third order terms is to accomodate further development, primarily for edge plasmas.

Some of the internal variables have been redefined as 'species' arrays to reduce the checking for significantly populated states. The mapping from (mass, charge state) to populated species is done in the interface, used extensively internally, and then passed out to help the user interpret the results. Because the (mass,charge state) arrays are typically very sparse (usually only a single charge state is used for each isotope) this eliminates a lot of unnecessary storage, time consumption in passing arrays through arguments, and zeroing out large arrays.

NTCC standards

All I/O to and from external files is handled by the driver, NCLASS_PT, so there are no calls to access external files from within the NCLASS module.

All variables are declared and identified as either input, output, or local in all routines in both NCLASS and NCLASS_PT.

All COMMON blocks have been removed.

Error checking of input has been provided so that array limits governed by PARAMETER statements are not exceeded.

Error messages are all passed by a flag from NCLASS to the driver routine.

All WRITE formats are isolated in separate routines and controlled by a user option k_out to NCLASS_PT.

Extensive use has been made of variable and routine naming conventions (see Name Conventions).

Although it is not possibe to adhere to the goal of dynamic allocation of variables in FORTRAN 77, NCLASS and NCLASS_PT do make use of PARAMETER statements to allocate the storage needed for all major arrays. In NCLASS this is a fairly important consideration because of the potentially large arrays when multiple charge states of several impurities are of interest. These limits are checked during each calculation and error messages are generated if the calculation will exceed a limiting parameter.

NCLASS_PT 1.2

This version of NCLASS has been modified in response to suggestions by R. Cohen and D. Pearlstein to:

Friction coefficient

The field particle friction coefficient N_22, capn_ii(3,3,i1,i2), was corrected to obey the required symmetry constraint for unequal temperatures. The expression is correct in the primary NCLASS reference (see NCLASS equations).

Electrical resistivity

The parallel flow velocity for evaluating the electrical resistivity in all earlier versions of NCLASS did not include the field particle friction contributions. This has been corrected by using the u_E,1 solution, as given by Eqn (37) in the NCLASS reference, instead of r_E(1) as incorrectly stated in the paper following Eqn (37). Eqns (38) and (39) of the paper are correct if u_E,1 is used instead of r_E(1).

Viscosity in various limits

The user can now call NCLASS at extreme limits without the code failing. The error flag iflag is set to a negative value to warn the user in case the null or unity input values were input by mistake (see NCLASS output). Such limits include calculations at the axis (no trapped particles, p_ft=0) or at the edge of a unity aspect ratio plasma (no circulating particles, p_ft=1.0). The banana contributions can be turned off at any radius with p_ft=0 to facilitate a calculation with only Pfirsch-Schlüter contributions to the viscosity. The Pfirsch-Schlüter contribution to viscosity can be turned off by setting all three poloidal moments of p_fm(j)=0.0. If both p_ft=0 and p_fm(j)=0.0, the Spitzer problem is solved.

NCLASS Physics

NCLASS solves the radial and parallel force balance equations for the flows within a flux surface using the multiple species, reduced charge state approach given in Hirshman and Sigmar's 1981 review paper. The radial fluxes in the banana regime are related to these flows and the neoclassical viscosities. The bootstrap current and electrical resistivity are also derived from these flows. The classical and Pfirsch-Schlüter fluxes, as well as the fluxes driven by a user specified parallel force are also calculated.

The viscosities are calculated by numerically integrating over velocity space and are continuous over all collisionality regimes and aspect ratios. In that regard the model is more advanced than the one presented in Hirshman and Sigmar's review paper and other codes that use the matrix approach for calculating neoclassical properties (e.g., work by Tani, et al., Kessel, Ernst and a few others). Other advanced features include banana orbit squeezing, potato orbit effects and additional force terms to accomodate neutral beam, charge exchange, toroidal field ripple and anomalous toroidal drag forces. Nonetheless, the model must still be considered only an approximation to the physics of transport by drift and orbit scattering effects, which are still under development and called 'advanced neoclassical' theory. See the reference under NCLASS equations for a more complete discussion of the model.

Geometry

NCLASS_PT uses simple geometric approximations to the various parameters required by NCLASS. Modules are available from the FORCEBAL code to read VMEC 'wout' files, EFIT 'g' files, EFIT results stored in MDS+ at MIT for CMOD, and EFIT results stored as PPFs at JET for a more accurate representation of the geometric quantities. Modules are also available to generate the required geometric parameters from either VMEC or EFIT solutions. These modules can be modified for any other inverse coordinate representation (as VMEC) or poloidal flux grid representation (as EFIT).

The signs of the magnetic fields and flows are consistent with the right-handed cylindrical coordinate system (R,f,Z) where R is measured from the major axis and Z is up. So the toroidal angle f runs counter-clockwise when viewed from the top of the torus. The same toroidal angle f is used for the right-handed (r,q,f) curvilinear coordinates so q runs downward on the outside midplane.

Most TFTR and DIII-D data have negative toroidal magnetic fields and positive toroidal currents and poloidal magnetic fields. The safety factor 'q' should be negative (as in the test case) if it is to be consistent with this definition of coordinates, but it is usually reported as positive in databases by long-standing convention. JET with its iron core typically operates with toroidal field and current in the same direction. NCLASS gives correct signs for the flows and radial electric field if the input obeys the above sign conventions.

Radial grid

The radial grid, r, for NCLASS can be anything the user desires. The only requirement is that all derivatives consistently use the same definition. NCLASS_PT uses r proportional to the square root of the toroidal flux and scaled to the minor radius, a0.

The grid units are represented as 'rho' inside NCLASS.

To resolve the axial singularity, choose r proportional to the poloidal flux, Y. See the discussion under NCLASS_PT cases.

Particle fluxes

The particle flux is returned in three forms. The total flux is reconstructed in NCLASS_PT as a consistency check on the three forms.

The form of the diffusion term in the continuity equation is assumed to not contain <grad(r)2> or similar geometric factors. This is because the geometry is built into the calculation of the fluxes and transport coefficients through the drifts, which are related to the required flux surface averaged input quantities. If the user has <grad(r)2> in the transport equations, then the transport coefficients from NCLASS must be divided by that same factor.

No diffusivities or convective velocities are presently returned for the external force (component 5). The user can create them from the returned flux of species s, gfl_s(5,s).

The addition of a radial electric field, -F', does not affect the radial particle or conduction fluxes. The forces from F' are included in NCLASS. Their lack of influence on the poloidal rotation velocities and fluxes can be used as a check on the computations. A radial electric field gradient does, however, modify the flows and fluxes through 'orbit squeezing.'

For the continuity equation,

          dni/dt = 1/V'[V'Gi]' + Si,   i = species,   ' = d/dr
        
the radial fluxes are returned from NCLASS in three different forms:

Conduction fluxes

The conduction heat flux is returned by NCLASS in two forms (the same forms as for the particle flux but without the 'diagonal' form).

The same comment about including a geometric factor in the particle fluxes also applies to the conduction fluxes.

If all the ions have the the same temperature and the user wants to combine the conduction heat fluxes into a single effective ion thermal conductivity plus a velocity component (as in the second option above for the particle fluxes), that can be done externally to NCLASS. This reconstruction is done in the stand-alone driver, NCLASS_PT, and presented as the second form below).

The energy balance equation

        1.5 d(niTi)/dt = 1/V'[V'(Qi + 2.5 TiGi)]' + ...
        
The three forms of the conduction heat fluxes are:

Bootstrap current

The total bootstrap current density is given as the flux surface averaged quantity, p_bsjb. The bootstrap current is also returned as a set of coefficients of the pressure and temperature gradients of each species, bsjbt_s and bsjbp_s:
          <Jbs.B> = p_bsjb
          <Jbs.B> = Si [bsjbt_s(i)Ti'/Ti + bsjbp_s(i)pi'/pi]
        

External force current

The current response to the external source is returned as the flux surface averaged quantity, p_exjb. An example of such a current is the electron response current from neutral beam injection, which can be entered through fex_iz.
          <Jex.B> = p_exjb
        

Flow velocities

Flux surface averaged poloidal and parallel flow velocities are output from NCLASS. The flows at any point in the surface can be calculated from these, the local magnetic field components, the pressure gradients and the radial electric field. An example of the local flow velocities on the outside midplane are given in NCLASS_PT. It is also possible to modify the calculation to obtain the radial electric field if the toroidal flow velocity of any ion species is known. In the FORCEBAL and TRANSP implementations of NCLASS this iteration is done externally, but could be incorporated in the new NCLASS interface routine as an option.

References

NCLASS equations

Multi-species

Reduced charge state

Friction coefficients

Viscosity coefficients

Orbit squeezing

Trapped fraction

Similar codes

Applications

Name Conventions

Routines

Extensive use is made of 'module' or 'family' names for routines:

Variable prefixes

Prefixes designate general types of variables:

Variable suffixes

First a clarification of terminology is in order. An 'isotope' may have one or more populated states - e.g., electrons, deuterium, carbon are isotopes. A 'charge state' dependence means a variable is doubly dimensioned by parameters for both isotopes and charge states; such matrices are sparsely populated. A 'species' is a populated charge state.

NCLASS Variables

NCLASS input

Options:

          k_order-order of v moments to be solved (-)
                 =2 u and q									
                 =3 u, q, and u2
                 =else error
          k_potato-option to include potato orbits (-)
                  =0 off
                  =else on
        

Numbers limited by dimensioning parameters:

          m_i-number of isotopes (1 < m_i < mx_mi+1)
          m_z-highest charge state of all species (0 < m_z < mx_mz+1)
        

Constants:

          c_den-density cutoff below which species is ignored (/m3)
          c_potb-kappa(0)*Bt(0)/[2*q(0)2] (T)
          c_potl-q(0)*R(0) (m)
        

Parameters representing the selected flux surface:

          p_b2-<B2> (T2)
          p_bm2-<1/B2> (/T2)
          p_eb-<E.B> (V*T/m)
          p_fhat-mu_0*F/(dPsi/dr) (rho/m)
          p_fm(3)-poloidal moments of geometric factor for PS viscosity (-)
          p_ft-trapped fraction (-)
          p_grbm2-<grad(rho)2/B2> (rho2/m2/T2)
          p_grphi-radial electric field Phi' (V/rho)
          p_gr2phi-radial electric field gradient Psi'(Phi'/Psi')' (V/rho2)
          p_ngrth-<n.grad(Theta)> (1/m)
        

Isotope arrays:

          amu_i(i)-atomic mass number of i (-)
          grt_i(i)-temperature gradient of i (keV/rho)
          temp_i(i)-temperature of i (keV)
        

Charge state arrays:

          den_iz(i,z)-density of i,z (/m3)
          fex_iz(3,i,z)-moments of external parallel force on i,z (T*j/m3)
          grp_iz(i,z)-pressure gradient of i,z (keV/m3/rho)
        

NCLASS output

Any of the output from NCLASS can easily be eliminated by removing the arguments from both the calling routine and NCLASS. This is allowed because all the variables are fully declared and dimensioned within NCLASS, so that their removal from the argument list converts them to local variables. Although this feature is not important for NCLASS_PT, much of the returned information is either redundant or not of interest if NCLASS is to be installed as a module within another code. By the same token, other output could also be easily generated as the code evolves.

Error flag:

          iflag-warning and error flag
               =-4 warning: no viscosity
               =-3 warning: no banana viscosity
               =-2 warning: no Pfirsch-Schluter viscosity
               =-1 warning: no potato orbit viscosity
               =0 no warnings or errors
               =1 error: order of v moments to be solved must be 2 or 3
               =2 error: number of species must be 1< m_i < mx_mi+1
               =3 error: number of species must be 0 < m_z < mx_mz+1
               =4 error: number of species must be 1 < m_s < mx_ms+1
               =5 error: inversion of flow matrix failed
               =6 error: trapped fraction must be 0.0.le.p_ft.le.1.0
        

Numbers limited by dimensioning parameters:

          m_s-number of species (1 < m_s < mx_ms+1)
        

Parameters representing the selected flux surface:

          p_bsjb-<J_bs.B> (A*T/m2)
          p_etap-parallel electrical resistivity (Ohm*m)
          p_exjb-<J_ex.B> current response to fex_iz (A*T/m2)
        

Isotope arrays:

          calm_i(3,3,i)-tp eff friction matrix for i (kg/m3/s)
          caln_ii(3,3,i1,i2)-fp eff friction matrix for i1 on i2 (kg/m3/s)
          capm_ii(3,3,i1,i2)-test part (tp) friction matrix for i1 on i2 (-)
          capn_ii(3,3,i1,i2)-field part (fp) friction matrix for i1 on i2 (-)
        

Species arrays:

          bsjbp_s(s)-<J_bs.B> driven by unit p'/p of s (A*T*rho/m3)
          bsjbt_s(s)-<J_bs.B> driven by unit T'/T of s (A*T*rho/m3)
          chip_ss(s1,s2)-heat cond coefficient of s2 on p'/p of s1 (rho2/s)
          chit_ss(s1,s2)-heat cond coefficient of s2 on T'/T of s1 (rho2/s)
          dn_s(s)-diffusion coefficient (diag comp) of s (rho2/s)
          dp_ss(s1,s2)-diffusion coefficient of s2 on p'/p of s1 (rho2/s)
          dt_ss(s1,s2)-diffusion coefficient of s2 on T'/T of s1 (rho2/s)
          gfl_s(m,s)-radial particle flux comps of s (rho/m3/s)
                     m=1, banana-plateau, p' and T'
                     m=2, Pfirsch-Schlüter
                     m=3, classical
                     m=4, banana-plateau, <E.B>
                     m=5, banana-plateau, external parallel force fex_iz
          jm_s(s)-isotope number of s (-)
          jz_s(s)-charge state of s (-)
          qeb_s(s)-<E.B> heat convection velocity of s (rho/s)
          qfl_s(m,s)-radial heat conduction flux comps of s (W*rho/m3)
                     m=1, banana-plateau, p' and T'
                     m=2, Pfirsch-Schlüter
                     m=3, classical
                     m=4, banana-plateau, <E.B>
                     m=5, banana-plateau, external parallel force fex_iz
          sqz_s(s)-orbit squeezing factor for s (-)
          upar_s(3,m,s)-parallel flow of s from force m (T*m/s)
                        m=1, p' and T'
                        m=2, <E.B>
                        m=3, fex_iz
          utheta_s(3,m,s)-poloidal flow of s from force m (m/s/T)
                          m=1, p', T'
                          m=2, <E.B>
                          m=3, fex_iz
          vn_s(s)-convection velocity (off diag comps-p', T') of s (rho/s)
          veb_s(s)-<E.B> particle convection velocity of s (rho/s)
          xi_s(s)-charge weighted density factor of s (-)
          ymu_s(s)-normalized viscosity for s (kg/m3/s)
        

NCLASS internal

Isotope arrays:

          amnt_ii(i1,i2)-eff relaxation rate for i1 on i2 (kg/m3/s)
          vt_i(i)-thermal velocity of i (m/s)
        

Species arrays:

          tau_ss(s1,s2)-90 degree scattering time of s1 on s2 (s)
          ykb_s(s)-banana viscosity for s (kg/m3/s)
          ykp_s(s)-Pfirsch-Schlüter viscosity for s (kg/m3/s)
          ykpo_s(s)-potato viscosity for s (kg/m3/s)
          ykpop_s(s)-potato-plateau viscosity for s (kg/m3/s)
          ynud_s(s)-pitch angle diffusion rate for s (/s)
          ynut_s(s)-anisotropy relaxation rate for s (/s)
          ynuti_s(3,s)-PS anisotropy relaxation rates for s (/s)
        

Driver Variables

Driver input

Options:

          k_out-option for output to nout (-)
               =1 errors only
               =2 errors and results 
               =else no output
        

Parameters representing the selected flux surface:

          p_eps-inverse aspect ratio (-)
          p_q-safety factor (-)
        

Other characteristic machine parameters:

          r0-major radius (m)
          a0-minor radius, scale length for rho (m)
          e0-axial elongation (-)
          bt0-axial toroidal field (T)
          q0-axial safety factor (-)
        

Flow Diagram

                                       Parameters          FORTRAN Source

          NCLASS_PT_DR                 mx_mi,mx_ms,mx_mz   NCLASS_PT_DR.FOR
          |							  
          |--NCLASS                                        NCLASS_MOD.FOR
          |  |
          |  |--NCLASS_MN              mx_mi               NCLASS_MOD.FOR
          |  |
          |  |--NCLASS_TAU             mx_mi,mx_ms,mx_mz   NCLASS_MOD.FOR
          |  |  |
          |  |  |--RARRAY_ZERO                             RARRAY_ZERO.FOR
          |  |						   
          |  |--NCLASS_MU              mx_mi,mx_ms,mx_mz   NCLASS_MOD.FOR
          |  |  |
          |  |  |--NCLASS_K            mx_mi,mx_ms         NCLASS_MOD.FOR
          |  |  |  |
          |  |  |  |--NCLASS_NU        mx_mi,mx_ms         NCLASS_MOD.FOR
          |  |  |  |  |
          |  |  |  |  |--U_ERF                             U_ERF.FOR
          |  |  |  |  |
          |  |  |  |  |--RARRAY_ZERO                       RARRAY_ZERO.FOR
          |  |  |  |
          |  |  |  |--RARRAY_ZERO                          RARRAY_ZERO.FOR
          |  |  |
          |  |  |--RARRAY_ZERO                             RARRAY_ZERO.FOR
          |  |
          |  |--NCLASS_FLOW            mx_mi,mx_ms,mx_mz   NCLASS_MOD.FOR
          |     |
          |     |--U_LU_DECOMP                             U_LU_DECOMP.FOR
          |     |
          |     |--U_LU_BACKSUB                            U_LU_BACKSUB.FOR
          |     |
          |     |--RARRAY_ZERO                             RARRAY_ZERO.FOR	 
          |
          |--RARRAY_COPY                                   RARRAY_COPY.FOR
          |					  
          |--RARRAY_SUM                                    RARRAY_SUM.FOR
          |
          |--RARRAY_ZERO                                   RARRAY_ZERO.FOR
          |										 
          |--WRITE_IR                                      WRITE_MOD.FOR
          |
          |--WRITE_LINE                                    WRITE_MOD.FOR
          |
          |--WRITE_LINE_IR                                 WRITE_MOD.FOR