Mesh

There are two output files containing mesh parameters (the 5D mesh consists of a 3D unstructured triangular mesh in configuration space and a 2D structured rectangular grid in velocity space): xgc.f0.mesh.bp and xgc.mesh.bp.

Remarks

These files contain quantities that can be useful to calculate various averages.

# flux surfaces here includes the scrape-off layer, i.e. the open field-line region.

xgc.f0.mesh.bp
Printed when: sml_f0_grid=.true..   Output frequency: once at start/restart.

Output

Dimension

Units

Description

f0_T_ev

\(N_{\mathrm{species}}~\times\)
# 3D mesh nodes

\(\mathrm{eV}\)

Temperature at start in all configuration space vertices for electrons (0) and ions (1).

f0_den

# 3D mesh nodes

\({\mathrm{m}}^{-3}\)

Density at start in all configuration space vertices. Is n_e = n_i assumed?

f0_dsmu

Scalar

\(v_{Ts} = \sqrt{\frac{T_s}{m_s}}\)

\(\Delta v_{\perp}\) in the 2D velocity grid of species \(s\).

f0_dvp

Scalar

\(v_{Ts} = \sqrt{\frac{T_s}{m_s}}\)

\(\Delta v_{\|}\) in the 2D velocity grid of species \(s\).

f0_grid_vol_vonly

\(N_{\mathrm{species}}~\times\)
# 3D mesh nodes

Units

Prefactor for calculating velocity space moments. \(= \left( T_s/\sqrt{2 \pi} \right) \times \) \(\times\) dvp_n. Note that mu_vol and vp_vol are different and not included. In calculating density moment, for example: \(n_s(k)=\) f0_grid_vol_vonly(k) \(\sum_{i,j}\) mu_vol(i) vp_vol(j) f(i,j,k)

f0_nmu

Scalar

Positive integer

Number of grid points in \(v_{\perp}\) in the 2D velocity grid is f0_nmu + 1. Same as input parameter f0_nmu.

f0_nvp

Scalar

Positive integer

Number of grid points in \(v_{\|}\) in the 2D velocity grid is 2 \(\times\) f0_nvp + 1. Same as input parameter f0_nvp.

f0_smu_max

Scalar

\(v_{Ts} = \sqrt{\frac{T_s}{m_s}}\)

Maximum \(v_{\perp}\) in the 2D velocity grid (minimum is \(0\)). Same as input parameter f0_smu_max.

f0_vp_max

Scalar

\(v_{Ts} = \sqrt{\frac{T_s}{m_s}}\)

Maximum/minimum \(v_{\|}\) (minimum with minus sign) in the 2D velocity grid. Same as input parameter f0_vp_max.

gradpsi

# 3D mesh nodes
\(\times\) 2

Units

Description

inode1m1

Scalar

Units

Description

n_n

Scalar

Positive integer

Number of 3D mesh nodes.

nb_curl_nb

# 3D mesh nodes

Units

Description

ndata

Scalar

Positive integer

Description

nsp

Scalar

Positive integer

Number of kinetic species.

v_curv

# 3D mesh nodes
\(\times\) 3

Units

Description

v_gradb

# 3D mesh nodes
\(\times\) 3

Units

Description


xgc.mesh.bp
Printed when: always.   Output frequency: once at start/restart.

Output

Dimension

Units

Description

epsilon

# flux surfaces

Normalized

Inverse aspect ratio rmin/rmaj for the flux surface.

ff_1dp_p

2 \(\times\) # 3D mesh nodes \(\times\) 3

Units

Description

ff_hdp_p

2 \(\times\) # 3D mesh nodes \(\times\) 3

Units

Description

grid_nwall

Scalar

Positive integer

Number of nodes that make up the boundary of the domain (and represent the wall).

grid_wall_nodes

nwall

Positive integer

Node index for each wall node. Currently not “ordered”, but in the order specified in .node file.

m_max_surf

# flux surfaces

Positive integer

Maximum resolvable poloidal mode number on each flux surface. Defined by field-following alignment when generating the mesh.

mapping

# 3D mesh triangles \(\times\) 3 \(\times\) 2

m

Defines coordinates of triangle vertices.

n_geo

Scalar

Positive integer

Number of flux surfaces. Same as nsurf.

n_n

Scalar

Positive integer

Number of 2D mesh nodes.

n_t

Scalar

Positive integer

Number of 2D mesh triangles.

nd_connect_list

# poloidal planes * \(\times\)
# 3D mesh triangles
\(\times\) 3

Integer

Defines triangular mesh on each poloidal plane (similar to, but indexed differently from .ele file). First index is triangle index and the second index is over the three nodes that make up the triangle’s vertices. These are labelled by the index of the mesh node (from .node file). Index of nodes counts starting from zero.

nextnode

# 3D mesh nodes

Units

Description

node_vol

# 3D mesh nodes

\(\mathrm{m}^{3}\)

Spatial volume of the 3D mesh node. Volume of whole torus is wedge_n \(\times\) n_phi_tot \(\times \sum_k\) node_vol(k).

node_vol_ff0

# 3D mesh nodes

Units

Description

node_vol_ff0_l

# 3D mesh nodes

Units

Description

node_vol_ff0_r

# 3D mesh nodes

Units

Description

node_vol_ff1

# 3D mesh nodes

Units

Description

node_vol_ff1_l

# 3D mesh nodes

Units

Description

node_vol_ff1_r

# 3D mesh nodes

Units

Description

node_vol_nearest

# 3D mesh nodes

\(\mathrm{m}^{3}\)

Description

nphi

Scalar

Positive integer

Number of poloidal planes \(N_{\mathrm{planes}}\) (only written for stellarator simulations).

nsurf

Scalar

Positive integer

Number of flux surfaces.

one_per_dx

2 \(\times\) # 3D mesh nodes

Units

Description

psi

# 3D mesh nodes

Weber/rad

Toroidal magnetic flux for the flux surface that the node is on.

psi_surf

# flux surfaces

Weber/rad

Toroidal magnetic flux for the flux surface.

qsafety

# flux surfaces

Normalized

Safety factor \(q\) for the flux surface.

rmaj

# flux surfaces

m

Major radius of flux surface.

rmin

# flux surfaces

m

Minor radius of flux surface

rz

# poloidal planes * \(\times\)
# 3D mesh nodes
\(\times\) 2

Meters

Defines the spatial location in the poloidal plane for each mesh node. First index defines the node. Second index is the \((R,Z)\) coordinate of the node.

surf_arc_len

# flux surfaces

m

Poloidal arc-length of the complete flux surface.

surf_idx

# flux surfaces
\(\times\) surf_maxlen

Positive integer

Node index for each node on a flux surface. First index is flux surface label and second index is the node on the flux surface. Nodes counted from 1. Filled with zeros beyond surf_len.

surf_len

# flux surfaces

Positive integer

Number of nodes in each flux surface.

surf_maxlen

Scalar

Positive integer

The maximum number of nodes on any flux surface. Used for indexing surf_idx.

theta

# 3D mesh nodes

Normalized

Poloidal coordinate.

tr_area

# 3D mesh triangles

Units

Triangle areas.

trapped

# flux surfaces

Normalized

Trapped particle fraction for flux surface.

wedge_n

Scalar

Positive integer

Torus wedge number or toroidal periodicity (only written for stellarator simulations).

* Dimension only for stellarator simulations.