calculate_thermodynamics

Function calculate_thermodynamics 

Source
pub fn calculate_thermodynamics(
    kernel: &FusionKernel,
    p_aux_mw: f64,
) -> FusionResult<ThermodynamicsResult>
Expand description

Calculate full thermodynamics from equilibrium state.

Algorithm:

  1. Normalize flux: ψ_norm = (Ψ - Ψ_axis) / (Ψ_boundary - Ψ_axis)
  2. Profiles: n(ψ) = n_peak·(1 - ψ²)^0.5, T(ψ) = T_peak·(1 - ψ²)^1.0
  3. Fusion power: P_fus = ∫ nD·nT·⟨σv⟩·E_fus dV, dV = dR·dZ·2πR
  4. Alpha heating: P_alpha = 0.2·P_fusion
  5. Thermal energy: W_th = ∫ 3·n·T dV
  6. Losses: P_loss = W_th / τ_E
  7. Q = P_fusion / P_aux