Mesh Outputs

This page is generated from in-code XGC I/O metadata by utils/python/document_outputs.py.

Mesh, geometry, and f0 mesh-context outputs.

xgc.mesh.bp

Variable

Units

Description

PEST_angle

rad

PEST coordinate on the mesh nodes (only written for stellarator simulations).

VMEC_angle

rad

VMEC coordinate on the mesh nodes (only written for stellarator simulations).

epsilon

dimensionless

Inverse aspect ratio \(r_{\min}/R_{\maj}\) for the flux surface.

ff_1dp_p

dimensionless

Barycentric interpolation weights at the full-plane field-following projection of each mesh node.

ff_hdp_p

dimensionless

Barycentric interpolation weights at the half-plane field-following projection of each mesh node.

grid_nwall

Positive integer

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

grid_wall_nodes

Positive integer

Node index for each wall node (0-indexed). Currently not “ordered”, but in the order specified in .node file.

m_max_surf

Positive integer

Maximum resolvable poloidal mode number on each flux surface, defined from the largest spacing in straight-field-line poloidal angle between adjacent vertices: \(2\pi/[sml\_mode\_select\_cutoff \, \max_j(\theta_{j+1}-\theta_j)]\).

n_geo

Positive integer

Number of flux surfaces; same value as nsurf.

n_n

Positive integer

Number of mesh vertices (per plane).

n_t

Positive integer

Number of mesh triangles (per plane).

nd_connect_list

index

Triangle connectivity list for the poloidal plane mesh; each triplet contains zero-based mesh-node indices.

nextnode

Positive integer

Vertex indices closest to the intersection of the field line through vertex i on plane j with plane j+1 for rightward projection (tokamak only).

node_vol

m^3

Voronoi volume of the mesh vertices under linear interpolation and toroidal projection. The volume of the whole torus is \(N_{\mathrm{wedge}} N_{\phi,\mathrm{tot}} \sum_k V_k\), where \(V_k\) is node_vol(k).

node_vol_ff0

m^3

Voronoi volume of the mesh vertices under linear interpolation and field-following projection (full toroidal step) from the midplane to the left.

node_vol_ff0_l

m^3

Voronoi volume of the mesh vertices under linear interpolation and field-following projection (full toroidal step) from the left plane to the left.

node_vol_ff0_r

m^3

Voronoi volume of the mesh vertices under linear interpolation and field-following projection (full toroidal step) from the right plane to the left.

node_vol_ff1

m^3

Voronoi volume of the mesh vertices under linear interpolation and field-following projection (full toroidal step) from the midplane to the right.

node_vol_ff1_l

m^3

Voronoi volume of the mesh vertices under linear interpolation and field-following projection (full toroidal step) from the left plane to the right.

node_vol_ff1_r

m^3

Voronoi volume of the mesh vertices under linear interpolation and field-following projection (full toroidal step) from the right plane to the right.

node_vol_nearest

m^3

Voronoi volume of the mesh vertices under nearest neighbor interpolation and field-following projection.

nphi

Positive integer

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

nsurf

Positive integer

Number of flux surfaces.

one_per_dx

m

Distance traveled along the magnetic field line to adjacent full toroidal mesh planes.

prefix+"delta_phi"

rad

Toroidal angular spacing between neighboring mesh planes.

prefix+"mapping"

[1/m, 1/m, m]

Per-triangle affine mapping coefficients from physical (R,Z) coordinates to local barycentric triangle coordinates; entries 0 and 1 store the inverse edge matrix and entry 2 stores the reference vertex position.

prefix+"nd_connect_list"

index

Triangle connectivity list for each plane (multiple planes in case of stellarators); each triplet contains zero-based mesh-node indices.

prefix+"region"

index

Region identifier for each mesh vertex.

prefix+"rz"

m

Spatial location in (R,Z) coordinates of each mesh vertex in each stellarator plane.

prefix+"wedge_angle"

rad

Toroidal wedge angle represented by this simulation.

psi

Wb/rad

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

psi_surf

Wb/rad

Toroidal magnetic flux for the flux surface.

qsafety

dimensionless

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

rmaj

m

Major radius of flux surface.

rmin

m

Minor radius of the flux surface.

rz

m

Spatial location of each mesh node in the poloidal plane; the first index selects the node and the second index selects the R or Z coordinate.

surf_arc_len

m

Poloidal arc-length of the complete flux surface.

surf_idx

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

Positive integer

Number of nodes in each flux surface.

surf_maxlen

Positive integer

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

theta

rad

Straight-field-line poloidal angle. Core: \(\theta=0\) on the outer midplane; SOL: zero on the outer target and \(2\pi\) on the inner target.

tr_area

m^2

Surface area of the triangles.

trapped

dimensionless

Trapped particle fraction for the flux surface.

wedge_n

Positive integer

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

xgc.f0.mesh.bp

Variable

Units

Description

f0_T_ev

eV

Initial temperature for electrons (0) and ions (1).

f0_den

m^-3

Initial density in the simulation (currently only electrons and main ions).

f0_dsmu

species thermal speed sqrt(T_s/m_s)

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

f0_dvp

species thermal speed sqrt(T_s/m_s)

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

f0_fg_T_ev

eV

Temperature used for calculating the thermal speed used to normalize velocities.

f0_flow

m/s

Initial parallel bulk flow of the plasma. Positive flow implies motion in the direction of the magnetic field.

f0_grid_vol_vonly

eV

Prefactor for calculating velocity-space moments: \(T_s/\sqrt{2\pi} \, dsmu_n \, dvp_n\). This assumes that the distribution function \(f\) has absorbed the \(v_{\perp}\) Jacobian factor and that the velocity-boundary coefficients mu_vol and vp_vol (0.5 on the boundary, 1 otherwise) are not included. For example, the density moment is \(n_s(k)=f0\_grid\_vol\_vonly(k) \sum_{i,j} mu\_vol(i) vp\_vol(j) f(i,j,k)\).

f0_nmu

Positive integer

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

f0_nvp

Positive integer

Number of grid points in \(v_{\parallel}\) in the 2D velocity grid; equal to \(2 f0\_nvp + 1\). Same as input parameter f0_nvp.

f0_smu_max

species thermal speed sqrt(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

species thermal speed sqrt(T_s/m_s)

Maximum absolute \(v_{\parallel}\) in the 2D velocity grid; the minimum is the negative of this value. Same as input parameter f0_vp_max.

gradpsi

T m

Poloidal magnetic flux gradient at each mesh node.

gvid0_pid

Positive integer

Poloidal mesh partition table. It has length pe_per_plane + 1 and stores the first global vertex ID owned by each rank within a toroidal plane, using XGC’s legacy 1-based convention.

inode1m1

Positive integer

Legacy decomposition metadata: offset of the first vertex on the last MPI rank that wrote to this file.

n_n

Positive integer

Number of mesh nodes per plane.

nb_curl_nb

m^-1

Part of the phase space Jacobian (D in XGC’s equations), hat{boldsymbol{b}}cdotnablatimeshat{boldsymbol{b}}.

ndata

Positive integer

Legacy decomposition metadata: number of mesh vertices assigned to the last MPI rank that wrote to this file.

nsp

Positive integer

Number of species in the output.

pe_per_plane

Positive integer

Number of MPI ranks per plane.

v_curv

radial: T^2, poloidal and toroidal: T m^-1

Factors for curvature drift, \(\nabla\times B\), in radial, poloidal, and toroidal components. The radial component includes a factor \(\|\nabla\psi\|=R B_P\), hence the different units.

v_gradb

radial: T^3, poloidal and toroidal: T^2 m^-1

Factors for grad-B drift, \(B\times\nabla \|B\|\), in radial, poloidal, and toroidal components. The radial component includes a factor \(\|\nabla\psi\|=R B_P\), hence the different units.