InnerLayer.SLAYER - BUGFIX - Normalize the :lar critical Δ by r_s like the other models

Aperta
#500 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
julia
Ambito
backend

Direzione di ricerca

Read _solve_dc_tmp in src/InnerLayer/SLAYER/LayerParameters.jl and the existing SLAYER parameter test in test/runtests_slayer_params.jl. Decide how to handle the lar name, then update its normalization and test it against rfitzp; done means the two values satisfy the stated relation and the tests pass.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

dc_type = "lar" returns the SLAYER critical Δ in m⁻¹. The other two models, "rfitzp" and "toroidal", return it dimensionless, in the r_s reference, and the dispersion relation subtracts it from the dimensionless r_s·Δ′. So the "lar" offset is too large by a factor 1/r_s.

Detail

In _solve_dc_tmp (src/InnerLayer/SLAYER/LayerParameters.jl):

dc_type value units
lar ½ (−D_R) π^{3/2} (χ∥/χ⊥)^{1/4} · √(n·abs(s) / (R₀ r_s)) m⁻¹
rfitzp −√2 π^{3/2} D_R / W_d, with W_d = √8 (χ⊥/χ∥)^{1/4} / √(n·abs(s) r_s / R₀) dimensionless

Substituting W_d, rfitzp = ½ (−D_R) π^{3/2} (χ∥/χ⊥)^{1/4} · √(n·abs(s) r_s / R₀). The two are the same formula, and lar = rfitzp / r_s exactly.

Measured on develop with slayer_parameters (n_e = 3e19 m⁻³, T = 1.5 keV, q = 2, s = 1.2, R₀ = 1.7 m, D_R = −0.05):

r_s [m] lar rfitzp lar·r_s / rfitzp
0.30 38.22 11.47 1 + 6e-12
0.45 33.25 14.96 1 + 6e-12
0.60 30.10 18.06 1 + 6e-12

The residual 6e-12 is the W_d iteration tolerance.

Who is affected

Only runs that set dc_type = "lar". The default is "none", the shipped SLAYER deck uses "none", and no regression case uses "lar". The value reaches the dispersion relation through surface_coupling(...; dc=params.dc_tmp) and the output through PerSurface/D_c_offset.

Proposed fix

Multiply the lar branch by r_s. It then equals rfitzp, so one of the two names is redundant. The open question is which to keep:

  • keep both names as aliases of one formula, or
  • remove "lar" and reject it with a message pointing to "rfitzp".

Either way the unit test in test/runtests_slayer_params.jl that only checks lar is finite should assert the relation to rfitzp.

Lingua principale
Julia
Stelle
11
Fork
7
Merge medio
4g 1h
PR unite (30g)
68

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OpenFUSIONToolkit/GPEC

Tutte le issue di OpenFUSIONToolkit/GPEC

Issue simili

Altre issue su Julia

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.