Skip to content

[PyTokEq Enhancement] Improve q-profile accuracy to <5% error #14

@callme-YZ

Description

@callme-YZ

Problem

Current: q(axis) has ~30% error due to cylindrical approximation

From validation notes:

  • Core safety factor不准确
  • Limits physics fidelity
  • May affect ballooning threshold analysis

Root Cause

Cylindrical approximation near magnetic axis:

  • Current model uses simplified geometry
  • Toroidal effects not fully captured
  • Higher-order terms neglected

Proposed Solution

Option 1: Toroidal correction formula

  • Implement Shafranov shift correction
  • Use toroidal expansion (ε terms)
  • Effort: Medium (1-2 weeks)

Option 2: Field-line integration

  • Direct integration along field lines
  • More accurate but slower
  • Effort: High (3-4 weeks)

Option 3: Adaptive grid near axis

  • Refined mesh at r→0
  • Better resolution of core region
  • Effort: Medium-high (2-3 weeks)

Deliverables

  • Implement chosen method
  • Test on Solovev (should achieve machine precision)
  • Test on realistic equilibria (target <5% error)
  • Update validation suite
  • Document methodology

Success Criteria

  • ✅ q(axis) error < 5% on standard benchmarks
  • ✅ No performance degradation
  • ✅ Validated on 3+ test cases

Priority

P2-medium 🟡 - Important for physics fidelity, not blocking


Reported by: 小P ⚛️
Date: 2026-03-23

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2-medium一般任务,两周内enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions