Reading M3D C1 files

M3C C1 Reader and Fieldline Integration Notes

READER

Within Visit there is a database reader for loading the higher order elements used with the M3D C1 code. The reader supports both the 2D and 3D versions of the elements.

To pop up the “File open” dialog use the main drop down menu "File" and select the "Open file" option.

File->Open file

Within the “File open”dialog, set the

  • “Open file as type” to be
“M3DC1”

After which one can set default open options by selecting the button:

  • Set default open options …

After which point another dialog will appear with the following options:

  • Mesh refinement – (Default 2) the only rendering option once the data has been read it to use linear interpolation the high order mesh must be refined and overlaid onto a linear mesh. A mesh refinement of 1 will result in no refinement with the data at the original element nodes.

Note: At the present time the scaling is only in the 2D phi plane.

  • Linear mesh data location – after refinement the data can be placed at the Nodes or on the Elements.
Node - (Default) place the data at the nodes.
Element - place the data at the elements.
  • Perturbation Scaling - (Default ‘1.0” no scaling.) For the 2D case, where the real and imaginary magnetic field variables f and psi are scaled by the value.

VARIABLES

  • Scalar - Scalar values are calculated using the higher order elements with resulting value placed on the refined linear mesh at the data location specified in the reader.
  • Complex - There is currently no mechanism for viewing complex variables. In the case two vector variables:
  • Vector -
B_C1_Elements – These vector values are calculated using the higher order elements and should be used for plots that require integration such as Streamline and Poincaré. If used otherwise the values will be placed on the original higher order mesh elements (mesh refinement = 1, with data at the elements).
B_Interpolated – These vector values are calculated using the higher order elements with resulting value placed on the refined linear mesh at the data location specified in the reader. These values can be used for integration but the interpolation will be linear.

Streamline Plot/Poincaré Plot

To utilize the higher order elements, for integration it is necessary to select not only the variable “B_C1_Elements” but one of two M3D C1 Integrators within the Streamline and Poincaré plots:

M3D-C1 2D Integrator (M3D-C1 2D data only)
M3D-C1 3D Integrator (M3D-C1 3D data only)

When selecting one of the above for both the 2d and 3d elements the higher order interpolation will be used. In addition, for the 2d element, a variant of Newton’s method will be used for the integration. For the 3d elements Adams-Bashforth will be used for the integration.


When selecting the vector variable “B_C1_Elements” you must use the correct integration option for the data dimension otherwise the integration will fail. Similarly these two options can only be used with M3D C1 data.

If you have selected “B_Intepolated” you may use either:

Dorman_Prince (Runga-Kutta)
Adams Bathforth (Mutli-step)

However, linear interpolation will be used for the data which can often be useful for quick and dirty plots.

Visualization

When displaying the mesh or other plots cylindrical coordinates will be used and mapped into cartesian space. That is R->x, phi->y, and z->z. To see the toroidal geometry once can apply a Transform operator to the data. When displaying streamlines (fieldlines) one can change the coordinate system during their generation.


For more information on using the Streamline and Poincaré plots [[1]] referrer to the user’s guide.