pub fn calculate_thermodynamics(
kernel: &FusionKernel,
p_aux_mw: f64,
) -> FusionResult<ThermodynamicsResult>Expand description
Calculate full thermodynamics from equilibrium state.
Algorithm:
- Normalize flux: ψ_norm = (Ψ - Ψ_axis) / (Ψ_boundary - Ψ_axis)
- Profiles: n(ψ) = n_peak·(1 - ψ²)^0.5, T(ψ) = T_peak·(1 - ψ²)^1.0
- Fusion power: P_fus = ∫ nD·nT·⟨σv⟩·E_fus dV, dV = dR·dZ·2πR
- Alpha heating: P_alpha = 0.2·P_fusion
- Thermal energy: W_th = ∫ 3·n·T dV
- Losses: P_loss = W_th / τ_E
- Q = P_fusion / P_aux