Addition of Phi_res_crit_callen#274
Open
priyanshlunia wants to merge 1 commit into
Open
Conversation
Compute the resonant flux at which the vacuum island width equals the Callen critical width (w_vac = w_v_crit), as Phi_res*(w_crit/w_vac)^2 in gpout_singfld. This is the Callen analog of the SLAYER Phi_res_crit, enabling direct model comparison (issue #240). Output alongside the other Callen quantities: netCDF (Phi_res_crit_callen), the singfld ASCII table (Phi_crit_callen), and the verbose stdout table (Phi_crit_cal). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Closes #240.
Summary
Adds the Callen critical resonant flux — the vacuum resonant flux
Phi_res_vat which the vacuumisland width equals the Callen critical width (
w_vac = w_v_crit) — togpout_singfld(
gpec/gpout.f). This is the Callen-model analog of the SLAYERPhi_res_critalready output byGPEC, enabling a Callen-vs-SLAYER threshold comparison (the motivation in #240 / #237).
What it does
The vacuum island scales as
w_vac ∝ sqrt(Phi_res), so the flux required to reach the criticalwidth is
which reuses the existing Callen machinery (
hw_v,hw_v_crit,vsingfld) — both widths are inpsi_nat the point of use, so the ratio is clean. The|Phi_res_v|magnitude cancelsanalytically, making this a true, drive-independent threshold (verified below).
Outputs added
Mirrors the existing
b_crit/Phi_res_critplumbing, so it appears alongside the other Callenquantities in all three places:
gpec_profile_output_n*.ncPhi_res_crit_callen(unitsT)gpec_singfld_n*.outPhi_crit_callencolumnPhi_crit_calcolumnVerification (DIII-D ideal example)
Phi_res_crit_callen=[8.74e-4, 1.01e-3, 7.33e-4, 8.18e-4]Tacross the four rational surfaces — consistent across netCDF, ASCII, and stdout, and comparable in
magnitude to SLAYER's
Phi_res_crit(the intended cross-model comparison).Phi_res_crit_callenstays exactlyconstant over the full 16× drive range (a genuine drive-independent threshold), while the measured
w_vac(∝√Φ) crosses the constant measuredw_v_critprecisely atPhi_res_v = Phi_res_crit_callen.Normalized across all surfaces, every curve collapses onto
y = √xthrough(1, 1). The measuredwidths come from GPEC's own island-width computation while the threshold comes from the new ratio
formula, so their coincidence is an independent check.
Notes
gpec/gpout.f,gpout_singfld); no changes to inputs or the shipped example.gpec_singfldrow/header widths were incremented for the new column.