PE toroidal torque changes sign under grid refinement while its magnitude stays stable to ~1%
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ó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Start with the reproduction in examples/DIIID-like_ideal_example, then trace how perturbed_equilibrium/energies/toroidal_torque is computed and compare it with the tracked quantity in regression-harness/cases/diiid_n1.toml. Run the stated grid-refinement cases and inspect the torque output in gpec.h5; done means the torque sign is consistent across the reported grids without losing its stable magnitude.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
perturbed_equilibrium/energies/toroidal_torque on the DIII-D-like ideal example changes sign under small, benign changes to the discretization, while its magnitude stays stable to about 1%. Radial refinement, poloidal refinement, and (independently reported) a dependency update all flip it. A physical torque should not behave this way: the sign is being set by something arbitrary rather than by the physics.
Measured after #350, so the coil-forcing fixes in that PR (b2ec04c3, 8dab0ed9) do not resolve it.
Evidence
All runs use examples/DIIID-like_ideal_example unchanged except for the grid controls named.
Radial refinement on a fixed ldp grid, post-#350 (grid_type="ldp", mpsi as shown; mpsi=0 is the deck's auto grid):
| grid | torque |
|---|---|
| auto (561 knots) | +0.050865 |
| ldp 512 | +0.050892 |
| ldp 1024 | −0.050645 |
| ldp 2048 | +0.050876 |
Same scan before #350:
| mpsi | 128 | 256 | 512 | 1024 | 2048 |
|---|---|---|---|---|---|
| torque | −0.0507289 | −0.0506007 | +0.0508128 | −0.0510857 | +0.0509140 |
Poloidal refinement at fixed mpsi = 1024 (pre-#350) — changing only mtheta:
| mtheta | torque |
|---|---|
| 256 | −0.0510857 |
| 512 | +0.0513171 |
Across every configuration above the magnitude sits in 0.0506–0.0513, a spread of ~1.4%, while the sign takes both values.
It is deterministic, not noise
Re-running mpsi = 1024 and 2048 with the Euler-Lagrange tolerance tightened from 1e-10 to 1e-12 reproduces each value — including its sign — to 1.8e-10 or better:
| quantity | mpsi | el_tol=1e-10 |
el_tol=1e-12 |
rel diff |
|---|---|---|---|---|
pe_torque |
1024 | −0.051085748 | −0.051085748 | 4.6e-11 |
pe_torque |
2048 | +0.0509139592 | +0.0509139592 | 1.8e-10 |
So the sign is a reproducible function of the grid, not run-to-run instability, and not integration error.
Independent report of the same symptom
In #338, @matt-pharr reported a set of package updates that "flip the sign of the torque in the d3d ideal example". That is a third, unrelated trigger producing the same signature — sign inverts, magnitude survives.
Why this looks like a convention rather than a convergence problem
A quantity that is converging would show its magnitude settling and its sign fixed. Here the magnitude is already stable to ~1% across an 8× radial refinement, a 2× poloidal refinement, and a code change — while the sign is not stable under any of them. That pattern fits a sign carried by something with an arbitrary choice in it (an eigenvector phase or normalization convention, or a branch selection somewhere in the torque assembly) rather than a physical quantity that has not yet converged.
Worth checking whether the torque is computed from an expression that is genuinely phase-invariant. Quantities built as Im(a* b) are invariant to a global phase on the mode; anything effectively linear in the eigenvector's sign is not.
Why it matters now
The regression harness tracks this quantity (pe_toroidal_torque in regression-harness/cases/diiid_n1.toml, noise_threshold = 1e-12). Any run that lands on the other sign reports a ~200% regression — which is exactly the 200.47% torque "regression" quoted in #338's original table. Until this is resolved the quantity cannot carry a golden value, and it will keep generating false regressions whose cause is invisible to whoever is reading the report.
Reproducing
# in a copy of examples/DIIID-like_ideal_example, set Equilibrium.grid_type="ldp"
# and Equilibrium.mpsi to each of 512, 1024, 2048, then:
julia --project=. -e 'using GeneralizedPerturbedEquilibrium; GeneralizedPerturbedEquilibrium.main(["<deck>"])'
# read perturbed_equilibrium/energies/toroidal_torque from gpec.h5
- Ngôn ngữ chính
- Julia
- Star
- 11
- Fork
- 7
- Merge trung bình
- 4 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 70
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 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 hôm nay. Đ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 hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
-
An unknown `wellformed` level is accepted, so a misspelled `:strict` skips the strict checksĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày