Mesh Outputs

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

Mesh, geometry, and f0 mesh-context outputs.

xgc.mesh.bp

Variable

Units

Description

Context

PEST_angle

rad

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

context

VMEC_angle

rad

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

context

epsilon

dimensionless

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

context

ff_1dp_p

dimensionless

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

context

ff_hdp_p

dimensionless

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

context

grid_nwall

Non-negative integer

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

context

grid_wall_nodes

Integer index

Zero-based mesh-node indices ordered along the domain boundary by boundary-edge adjacency. The setup orients the boundary clockwise and, when the magnetic-axis-height crossing exists, starts near its inboard crossing.

context

m_max_surf

Non-negative integer

Poloidal mode cutoff obtained by integer truncation of 2*pi/(sml_mode_select_cutoff*selected delta-theta). The selected straight-field-line angle spacing is the maximum adjacent-node spacing by default, or the spacing at the maximum-B node for sml_mode_select_cutoff_mode=2. Unprocessed surfaces retain zero. The primary-separatrix value is replaced using the smaller neighboring cutoff scaled by the ratio of q values.

context

n_geo

Positive integer

Number of flux surfaces; same value as nsurf.

context

n_n

Positive integer

Number of mesh vertices (per plane).

context

n_t

Positive integer

Number of mesh triangles (per plane).

context

nd_connect_list

index

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

context

nextnode

Integer index

Zero-based destination mesh-node index with the largest barycentric weight in the forward full-plane field-line projection of each source node.

context

node_vol

m^3

Nodal volume weight for linear barycentric interpolation and straight toroidal extrusion over one local toroidal slab of angular width delta_phi. For axisymmetric geometry the full-torus volume is wedge_n*nphi*sum(node_vol); for varying stellarator geometry sum the corresponding per-plane slab volumes before multiplying by wedge_n.

context

node_vol_ff0

m^3

Field-following nodal volume weight on the midplane geometry for toroidal deposition side 0 (left). The weight integrates linear barycentric and toroidal deposition over one local slab.

context

node_vol_ff0_l

m^3

Field-following nodal volume weight on the left-plane geometry for toroidal deposition side 0 (left). The weight integrates linear barycentric and toroidal deposition over one local slab.

context

node_vol_ff0_r

m^3

Field-following nodal volume weight on the right-plane geometry for toroidal deposition side 0 (left). The weight integrates linear barycentric and toroidal deposition over one local slab.

context

node_vol_ff1

m^3

Field-following nodal volume weight on the midplane geometry for toroidal deposition side 1 (right). The weight integrates linear barycentric and toroidal deposition over one local slab.

context

node_vol_ff1_l

m^3

Field-following nodal volume weight on the left-plane geometry for toroidal deposition side 1 (right). The weight integrates linear barycentric and toroidal deposition over one local slab.

context

node_vol_ff1_r

m^3

Field-following nodal volume weight on the right-plane geometry for toroidal deposition side 1 (right). The weight integrates linear barycentric and toroidal deposition over one local slab.

context

node_vol_nearest

m^3

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

context

nphi

Positive integer

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

context

nsurf

Positive integer

Number of flux surfaces.

context

one_per_dx

m

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

context

prefix+"delta_phi"

rad

Toroidal angular spacing between neighboring mesh planes.

context

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.

context

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.

context

prefix+"region"

index

Region identifier for each mesh vertex.

context

prefix+"rz"

m

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

context

prefix+"wedge_angle"

rad

Toroidal wedge angle represented by this simulation.

context

psi

Wb/rad

Equilibrium magnetic-flux label evaluated at mesh vertices; axisymmetric runs use poloidal flux divided by 2*pi.

context

psi_surf

Wb/rad

Aligned-node volume-weighted equilibrium flux label for each mesh-file surface, toroidally combined for stellarators; axisymmetric runs use poloidal flux divided by 2*pi.

context

qsafety

dimensionless

Nonnegative winding measure abs(surf_arc_len)/(2*pi); interpreted as the safety-factor magnitude on processed closed surfaces and as a connection-integral measure on processed open surfaces. Unprocessed surfaces retain zero.

context

rmaj

m

Radial midpoint of the sampled right-plane flux-surface nodes, (max(R)+min(R))/2.

context

rmin

m

Radial half-width of the sampled right-plane flux-surface nodes, (max(R)-min(R))/2.

context

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.

context

surf_arc_len

dimensionless

Signed field-line toroidal advance integral over the processed poloidal surface segment: integral B_phi/(R*|B_p|) d l_p. Closed surfaces give 2*pi times the signed field-line winding measure; unprocessed surfaces retain zero.

context

surf_idx

Integer index

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.

context

surf_len

Positive integer

Number of nodes in each flux surface.

context

surf_maxlen

Positive integer

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

context

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.

context

tr_area

m^2

Surface area of the triangles.

context

trapped

dimensionless

Trapped-particle fraction calculated on processed closed flux surfaces; entries for open, excluded, or too-short surfaces remain zero and are not computed trapped-fraction estimates.

context

wedge_n

Positive integer

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

context

xgc.f0.mesh.bp

Variable

Units

Description

Context

f0_T_ev

eV

Initial analytic-background temperature for each species with a dynamic f0 and mesh node.

context

f0_den

m^-3

Initial analytic-background density for each species with a dynamic f0 and mesh node.

context

f0_dsmu

dimensionless

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

context

f0_dvp

dimensionless

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

context

f0_fg_T_ev

eV

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

context

f0_flow

m/s

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

context

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)\).

context

f0_nmu

Positive integer

Number of intervals from zero to f0_smu_max in the normalized perpendicular-velocity grid. Equal to input f0_nmu; the stored distribution has f0_nmu + 1 perpendicular grid vertices.

context

f0_nvp

Positive integer

Number of intervals from zero to f0_vp_max on each half of the normalized parallel-velocity grid. Equal to input f0_nvp; the stored distribution has 2*f0_nvp + 1 parallel grid vertices.

context

f0_smu_max

dimensionless

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

context

f0_vp_max

dimensionless

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

context

gradpsi

T m

Poloidal magnetic flux gradient at each mesh node.

context

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.

context

inode1m1

Non-negative integer

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

context

n_n

Positive integer

Number of mesh nodes per plane.

context

nb_curl_nb

m^-1

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

context

ndata

Positive integer

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

context

nsp

Positive integer

Number of species with a dynamic f0 in the output.

context

pe_per_plane

Positive integer

Number of MPI ranks per plane.

context

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.

context

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.

context