Skip to content

KineticForces — implement calculate_rlar (RLAR torque method) #244

@logan-nc

Description

@logan-nc

KineticForces.calculate_rlar (src/KineticForces/Torque.jl) is currently a @warn+return-zero stub matching calculate_clar. PR #112 stubbed it after physics review confirmed that the prior expression kappaint_val = sqrt(mean(abs.(dbob_m_f).^2)) was dimensionally and structurally unrelated to the correct bounce-averaged κ-integral.

Required port

  • Fortran reference: ~/Code/gpec/pentrc/torque.F90:399-414 (RLAR driver) and ~/Code/gpec/pentrc/pitch.f90:445-530 (kappaintgrl).
  • Paper reference: Eq. 14 of Park, Boozer, Menard, "Nonambipolar Transport by Trapped Particles in Tokamaks," PRL 102, 065002 (2009); Logan & Park, PoP 20, 122507 (2013), Sec. III.
  • The correct κ-integral is a 50-point spline integral over κ ∈ (0,1) of
    Σ_{i,j} 2κ · 0.25·(f⁺ᵢf⁺ⱼ + f⁻ᵢf⁺ⱼ + f⁺ᵢf⁻ⱼ + f⁻ᵢf⁻ⱼ) · Re(δBᵢ δB*ⱼ) / (4·K(κ²))
    where are bicubic-spline evaluations of the precomputed F_{kmnql}(κ, m−nq±l) table.

Acceptance

  • calculate_rlar produces the same dT/dψ profile (within rtol=1e-3) as Fortran PENTRC for the examples/a10_kinetic_example/ reference case.
  • The existing @warn stub is removed and a regression baseline is added under regression-harness/cases/.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions