I2MEX: ideal 2-d Magnetohydrodynamic Equilibrium on Xplasma

I2MEX, by providing a standard equilibrium representation, allows stability codes to obtain metric information from a variety of equilibrium sources. These include GEQDSK (EFIT format), INP1/inp1.cdf (CHEASE), eqdsk.cdf (JSOLVER) as well as TRANSP run data stored on local file system or in the MDSPlus tree.

I2MEX is based on a minimal set of data: the scalar pressure, safety factor, covariant toroidal B field plus the (X, Z) coordinates which are loaded-in at initialization. All metric quantities are computed on the fly on arbitrary, user-specified grids (poloidal angle, poloidal flux/2*pi), using bi-cubic splines.

Units used throughout

Common symbols used throughout:

Sequence of calls

The i2mex object should first be initialized. Then use any 'get' access data routine. Finally, the object should be freed:

Error handling

It is recommended to follow each i2mex call by

This will print an error message to standard output if ier /= 0.


Most radial and 2-d quantities XXX are computed by calling

To compute the derivative of XXX with respect to the poloidal angle, use Likewise, the derivative of XXX with respect to psi can be obtained by

Test run

The test driver drive.f90 offers a quick tour of i2mex's capabilities.

List of files and available methods therein:

Use your web browser search key to locate the routine of your choice (Alt-f on netscape).

Send comments about this document to Alexander Pletzer. Thu Jan 26 12:43:47 2006