Jump to: navigation, search

PLOTMED


INTRODUCTION

SCHAFFER, 30-NOV-1993

PLOTMED calculates and displays various geometric and magnetic results derived from EQDSK mhd equilibrium files generated by EFITD. PLOTMED is interactive, and most input is entered from the user's terminal. Most output is written in files, but some is also sent to the user's terminal.

PLOTMED variables' units are SI (mksA). Spatial points are given in a right-handed cylindrical coordinate system (R,phi,Z), where R is the distance from the major axis, phi is the toroidal angle, and Z is the vertical distance above the midplane. NOTE: Phi in PLOTMED is opposite to the DIII-D "machine coordinate" toroidal angle.

At General Atomics, PLOTMED is on the Vax network in the DIII$NEUT:[EFIT] directory.


RUNNING PLOTMED:

PLOTMED is invoked by
$ RUN EFIT:PLOTMED
PLOTMED then presents the following options, one of which must be selected by typing the appropriate number:
0 = plot 1 = flux & field at a point
2 = plot a surface3 = trace a field line


Next, PLOTMED asks the user to type the name of the EQDSK file from which to get the data. Thee prompts that follow depend on the option selected, as detailed below.


OPTION 0:

This option is not documented. It includes Solovev equilibrium.


OPTION 1:

This option gives the poloidal magnetic flux (psi) and magnetic field components Bpol and Btor at one or several points. This option runs either interactivly or from files.
For interactive use, just respond to the prompt by typing the R and Z coordinates of the point for the calculation, plus an angle value. (The angle feature relates to motional stark diagnostic but is not documented. Just type any number to complete the entry.) All input is free format. The code prints magnetic flux and field data to the terminal. Another (R,Z) pair can then be entered, or one can quit the program.
For file input, the points are specified as free-format sequence of R, Z pairs in a file prepared by the user. This file can have an arbitrary name. There is no header. An example of an input file is:
1.6-1.3
1.6-1.25
1.6-1.2
1.7-1.3
1.7-1.25
1.7-1.2
(The first column are radii in meters, the second column are Z in meters.)
The file mode is activated in Option 1 by typing a value > 10 for R at the usual prompt. (One must type two other numbers, which are ignored, in the Z and angle places to complete the entry.) Output appears in two files. File BPOL.DAT lists R, Z and |Bpol| for each input point. File BTOR.DAT is the same, except it gives Btor.


OPTION 2:

This option draws a specified magnetic surface by interpolating gridded flux data from the EQDSK. Output is written in three files. The first, SURFACE.DAT, contains (R,Z) coordinate pairs of the surface in a format suitable for many graphics programs. The larger file BPOL.DAT contains R points, Z points, plus Bpol and Btor at those points, for both the boundary surface and the specified surface. A graphic metafile 55MFIT.POP is also written, and it can be plotted in any of the usual ways.
There are two prompts. The first asks the user whether the flux surface will be specified by its absolute poloidal flux (Vs/rad) or by its normalized flux (magnetic axis = 0, boundary = 1). One can also choose to plot only the boundary surface. The second prompt asks for the actual numerical flux value in the chosen units.


OPTION 3:

This option traces a single magnetic field line from a specified starting point. Line coordinates, cumulative line length and B components are printed to the screen and written to the file LINE.DAT at uniform steps in toroidal angle. A graphic metafile 55MFIT.POP is also written.
The first input prompt asks for starting coordinates (R,Z,phi), in meters and degrees. The (R,Z) coordinates must lie within the EFITD grid area.
The second prompt asks for the toroidal angle step and number of steps. The step size is used only for data output; the integration step size is adjusted automatically to maintain a high degree of numerical accuracy. The step can be positive or negative, allowing one to choose the direction of the tracing. The final stopping angle is (start angle)+(# steps)*(step size).
The graphic file plots the limiter outline, last closed flux surface, and traced line points (punctures) at each printout step. It also optionally plots an additional magnetic surface at a specified normalized poloidal flux. The normalized flux value is requested in the third prompt; a value 2 or greater skips the optional surface plot.
NOTE: The line integration uses cubic spline fits to evaluate the magnetic flux and its derivatives from the EQDSK file gridded data. In contrast, the surface plots in Options 2 and 3 are calculated by just linear interpolation of the flux. In case of differences between line-traced points and a directly calculated surface, the line-traced points are probably more accurate. Option 3 prints out the poloidal flux (cubic spline fit) at the beginning and end of the line trace, so that one can verify that the tracing accurately followed a magnetic surface.