Grad B Sources and Losses - Antoinehoff/personal_gkyl_scripts GitHub Wiki

Grad-B Sources and Losses

This page analyzes grad-B drift particle flux in post-processing from Gkeyll gyrokinetic turbulence simulations, including source term implementations and energy loss calculations.

Overview

Grad-B source: Source term introduced on the right-hand-side of the gyrokinetic equation
Grad-B loss: Radial flux pointing outward at the lower x boundary where particles are absorbed by zero distribution function ghost cell conditions at f(x = -Δx) = 0

Particle Loss

Grad-B Drift Velocity

The grad-B particle drift is expressed as:

v_{∇B,s} = (μ B × ∇B)/(q_s B²) = (1/2) m_s v_⊥² (b × ∇B)/(q_s B²)

Particle Flux Density

To obtain the grad-B particle flux density, integrate over velocity space with the distribution function f_s:

Γ_{∇B,s}(x,t) = ∫ dv³ v_{∇B} f_s(x, v_∥, μ, t)
             = p_{⊥s}/(q_s) × (b × ∇B)/B²

Where the perpendicular pressure is defined as:

p_{⊥s}(x,t) = ∫ dv³ (1/2) m_s v_⊥² f_s(x, v_∥, μ, t)

Total Particle Flux Through Flux Surface

The total particle flux through a given flux surface is:

S_{∇B,s}(x,t) = ∫∫ dz dy Γ_{∇B,s}(x,t) · ∇x

The integrand can be decomposed as:

Γ_{∇B,s}(x,t) · ∇x = M_s(x,t) G_{∇B}(x)

Where:

  • M_s(x,t) = p_{⊥s}/q_s: Moment part (time and species dependent)
  • G_{∇B}(x) = (b × ∇B)_x/B²: Magnetic equilibrium part

Source Models

Adapted Source Rate

The adapted grad-B source automatically sets source rate to match particle loss rate at initial conditions:

s_{ada}(x) = -S_{∇B,loss,0} × s_{ana}(x,t)/S_{ana}

Where:

S_{∇B,loss,0} = (2 n_{s0} T_{s0})/(3 q_s) × (b × ∇B)_x/B²

Using the relation p_{⊥s} = (2/3) n_s T_s.

True Flux Shape Source Rate

A grad-B source model using the exact shape G_{∇B} instead of the η₂(z) envelope:

s_{tf}(x,t) = -M_s(x,0) G_{∇B}(x) max(-1/((2π v_{t0}²)^{3/2}) exp[-(v_∥-u_{∥0})²+μB/m)/(2v_{t0}²)])

Source Profile Comparison Profile comparison of s_ada and s_tf along radial coordinate (left) and field line (right). Velocity space dependency removed by integration.

Source vs Loss Comparison

Source vs Loss Comparison between losses from simulation without GB source (48×32×16×16×6 TCV PT) and different grad-B source models.

Grad-B Energy Loss

Heat Flux Definition

The grad-B heat flux for species s:

Q_{∇B,s} = n_s T_s u_{∇B,s} = T_s Γ_{∇B,s}

Units: [m/s × J/m³]

Total Energy Loss

Total energy loss due to grad-B loss by integrating heat flux crossing a flux surface:

dW_{∇B,s}/dt = ∫_S Q_{∇B,s} · dσ = ∫∫ dz dy Q_{∇B,s} · ∇x

Generalized Flux Through Any Surface

Heat Flux Components

Heat flux can be generally defined as:

Q_s = n_s · T_s · u_s

Where the total advection velocity includes all drift contributions:

u_s = u_{E×B} + u_{∇B,s} + u_{∥,s}

E×B Drift

u_{E×B} = (E × B)/B² = -(∇φ × B)/B²

Component-wise expression:

(u_{E×B})^i = -(1/JB)(∂_j φ b_k - ∂_k φ b_j)

Grad-B Drift

u_{∇B,s} = (T_{⊥,s})/(q_s B) × (b × ∇B)/B²

Component-wise expression:

(u_{∇B,s})^i = (T_{⊥,s})/(q_s JB) × (b_j ∂B/∂k - b_k ∂B/∂j)

Total Power Through Surface

Total power passing through surface S with normal surface element dσ = dσ ∇i:

P_{S,i} = Σ_s ∫∫_S Q_s · ∇i dσ = Σ_s ∫∫_S (Q_s)^i dσ

Total Domain Power Loss

Total power leaving the numerical domain:

P_{out} = P_{x=0,x} + P_{x=L_x,x} + P_{y=0,y} + P_{y=L_y,y} + P_{z=0,z} + P_{z=L_z,z}

Navigation

Home | Maxwellian Particle Sources | Source Placement and Banana Width


Part of the Gkeyll Theory and Analysis documentation