Repository navigation
InnerLayer.SLAYER - FEATURE! - Optional chi_perp_Dc sets the critical-Δ electron diffusivity apart from P_perp - #616
Merged
Conversation
…-Δ electron diffusivity apart from P_perp The critical Δ's W_d and (χ∥/χ⊥)^(1/4) factors take χ⊥,e from the new optional chi_perp_Dc (slayer_parameters, build_slayer_inputs, [SLAYER] chi_perp_Dc); P_perp keeps its own χ inputs. Default nothing: unchanged behavior. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # src/InnerLayer/SLAYER/LayerParameters.jl
…ing checks already cover The equal-to-chi_perp_e block repeats what the default path and the harness pin, the negative value takes the same rejection branch as zero, and the default-nothing check is the last forwarding assertion's own case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
matt-pharr
approved these changes
Oct 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release note
chi_perp_Dcis opt-in (harness @ b6af97f)The critical Δ can now take its electron perpendicular diffusivity from a separate, optional input,
chi_perp_Dc, instead of from thechi_perp_ethat also builds P_⊥. It is available as a[SLAYER]deck key, as a keyword ofbuild_slayer_inputs(scalar or callable of ψ) and as a keyword ofslayer_parameters. When it is not set, the critical Δ useschi_perp_eexactly as before.Why
Since #501 the two places a perpendicular diffusivity enters SLAYER want different quantities. P_⊥ (
P_perp_model = "D_perp") needs the total conducted heat, through the combination T_e′χ⊥,e + T_i′χ⊥,i. The critical-Δ width W_d ∝ (χ⊥/χ∥)^{1/4} needs the electron channel alone. With onechi_perp_efeeding both, a run cannot set them independently.This matters for interpretive inputs. Where T_i ≈ T_e, an interpretive power balance (ONETWO/AOT) splits the conducted heat between species unreliably, through the electron-ion exchange term. On DIII-D discharges it often returns χ⊥,i < 0 at q = 2, with χ⊥,e inflated by the same amount. The physically safe choice is then a one-fluid χ_eff in both channels of D_⊥, which preserves the total exactly. The critical Δ instead takes the electron χ that the balance allows. Without this PR, the only way to express that is χ⊥,i = 0 with an adjusted χ⊥,e, which gives the same γ but records a misleading χ⊥,i.
What changed
slayer_parameters(...; chi_perp_Dc=nothing): when given, it replaceschi_perp_ein_solve_dc_tmponly (W_d and the(χ∥/χ⊥)^{1/4}factors of:lar/:toroidal). It must be positive and finite.build_slayer_inputs(...; chi_perp_Dc=nothing): scalar or callable of ψ, evaluated per surface.[SLAYER] chi_perp_Dc(SLAYERControl.chi_perp_Dc::Union{Float64,Nothing}): validated like the other diffusivities and forwarded by_slayer_chi_inputs/TearingProblem. The run logs an info line when it is set with a non-noneD_c_type.dc_type = :none.stability.md("Which perpendicular diffusivity") and the docstrings.Tests
runtests_slayer_params.jlTest 4b: for:lar,:fitzpatrickand:toroidal,chi_perp_Dc = 3gives thedc_tmpthatchi_perp_e = 3would. Every other layer quantity, P_⊥ included, is bit-identical to the default. Zero and Inf are rejected.runtests_slayer_runner.jl: deck parsing, validation and forwarding.b6af97f48:runtests_slayer_params.jl158/158 andruntests_slayer_runner.jl168/168. (Earlier, on feynman atfa7ecedd3: 152/152, 161/161 andruntests_slayer_inputs.jl67/67.)Regression report
Compared develop
4f33fcf60(this branch's base) against this branch atb6af97f48on ITER SDCC (Slurm fan-out, Julia 1.12.6, CI-pinned manifest), on all 24 cases. All 23 cases that run on develop are unchanged (347 quantities), every SLAYER case included:diiid_slayer_n1,_chi_perp_e,_coupled,_toroidaland_winding, anddiiid_truncation_n1.gal_resistive_peis N/A on both refs, as on develop. No shipped deck setschi_perp_Dc, so this is the expected result.Full regression report
🤖 Generated with Claude Code