Port gpout_dw / gpout_dw_matrix (psi-resolved torque response profiles and matrices) as the grid-logic diagnostic
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Start by reading gpec/gpout.f routines gpout_dw (lines 2579–2650) and gpout_dw_matrix (2655–2891), then review handoff/issue376/RESULTS.md §32 for the motivating case. The work is complete when the ψ-resolved profile, running integral, and response-matrix profiles are available in gpec.h5 and the integrated torque is tracked against fgar in a regression case; scalar boundary-torque grid sensitivity is a separate investigation.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary (revised after fortran-physics-reviewer consultation)
We need to port the ψ-resolved torque response machinery from gpec/gpout.f — gpout_dw (lines 2579–2650) and gpout_dw_matrix (2655–2891) — and use it as the standing grid-logic diagnostic.
The Julia PE currently outputs only the scalar boundary torque Energies/toroidal_torque = −2n·Im(⟨Φ_tot, Λ⁻¹Φ_tot⟩/4). A physics review against the Fortran confirms this scalar is a faithful port of gpout.f:1195–1201 (identical quadratic form, /4 normalization, total-flux argument, torque factor). But it is a boundary quadratic form of the inductance matrix — not the volume-resolved quantity:
gpout_dw: ψ-resolved torque/energy density from the actual self-consistent EL solutions,dW(ψ) = Σ conj(u1)·u2 / 2 / (2μ₀) · 2n·iper step, splined; Re of the running ψ-integral = torque (N·m), Im = 2nδW.gpout_dw_matrix: the mpert×mpert response-matrix generalization per ψ step (dwks/dwk/gind/gres/gindp/gresp; normalized by ξ, Φ_boundary, Φ_x, and coordinate-independently).
Neither has a Julia equivalent (grep confirms). The ψ-integrated gpout_dw torque is the true apples-to-apples comparator for the grid-free KineticForces/fgar NTV torque — the comparison that in Fortran exposed ldp-grid inadequacy.
Measured data motivating the port (DIII-D kinetic-calculated, suppression on)
| run | PE scalar torque [N·m] | fgar torque [N·m] | PE/KF |
|---|---|---|---|
| rot factor 1.0, auto grid (290) | 0.1831 | 0.7241 | 0.25 |
| rot factor 1.0, fixed 1024 | 0.0830 | 0.7281 | 0.11 |
| rot factor 0.2, auto grid (305) | 0.0946 | 0.1282 | 0.74 |
| rot factor 0.2, fixed 1024 | 0.0950 | 0.1286 | 0.74 |
Per the review, the scalar-vs-fgar gap is not by itself a bug — the two are different constructions — so these rows are motivation, not defect evidence. Two genuine flags remain:
- The scalar's grid instability at rot=1.0 (0.183 → 0.083 doubling the grid, while fgar holds to 0.5%) is a red flag on
wt0/plasma_inductanceconvergence — 92% of the physical torque lives at ψ>0.9 where the ω_E sign flip sits within ~one grid cell and the Δ′ rational brackets clear knots. Worth its own investigation, independent of the port. - Until
gpout_dwis ported, no volume-integral cross-check exists — the sharpest grid diagnostic from the Fortran workflow is missing from the Julia code.
Proposed work
- Port
gpout_dw(ψ-resolved torque/energy profile from solutions; theu1†u2bilinear with the 2n/2μ₀ energy→torque factor) — output as a ψ profile (and its running integral) in gpec.h5. - Port
gpout_dw_matrix(ψ × m × m torque/energy response matrix profiles). - Adopt ψ-integrated
gpout_dwtorque vsfgartorque as a tracked regression-harness quantity (a DIII-D kinetic-calculated case) — the designated referee for any kinetic grid logic. - Separately: investigate the scalar boundary torque's grid sensitivity (
wt0convergence near the pedestal ω_E crossing).
Full record: handoff/issue376/RESULTS.md §32 (experiment branch). Evidence h5s: ~/scratch_issue376/d3dkin/tx_*.
🤖 Generated with Claude Code
- Ngôn ngữ chính
- Julia
- Star
- 11
- Fork
- 7
- Merge trung bình
- 4 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 68
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của OpenFUSIONToolkit/GPEC
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
OpenFUSIONToolkit/GPEC#644 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
OpenFUSIONToolkit/GPEC#643 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
PerturbedEquilibrium - FEATURE - Complete the resistive perturbed-equilibrium workflow from Galerkin and matched resultsCó thể đã có người làm @matt-pharr đã nhận 1 ngày trước. Đang mởfeature
OpenFUSIONToolkit/GPEC#635 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 3 ngày
-
test
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
OpenFUSIONToolkit/GPEC#633 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Tearing - FEATURE - Add a general modified Rutherford equation for island evolutionCó thể đã có người làm @StuartBenjamin đã nhận 1 ngày trước. Đang mởfeature
OpenFUSIONToolkit/GPEC#630 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của OpenFUSIONToolkit/GPEC
Issue tương tự
-
`ShallowWaterModel` allocates ~9 KiB per grid point per RK3 stage on the CPUCó thể đã có người làm @ali-ramadhan đã nhận hôm nay. Đang mởperformance 🏍️
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
CliMA/Oceananigans.jl#6421 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
JuliaQUBO/QUBOLib.jl#105 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
NCAR/musica#1118 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`AMSGrad` state starts at `epsilon` instead of zero, so zero gradients move parameters and small gradients are dampedCó thể đã có người làm @parth-patel010 đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
FluxML/Optimisers.jl#247 · 1 bình luận ·
-
README should say that row and column order must matchCó thể đã có người làm @SAUMYARSH đã nhận 1 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100