Repository navigation
Zeff profile support - #296
Merged
Merged
Conversation
…fore
With MRE_flag, a run whose rdcon.in has no psi_N_Zeff stopped ("Provide Zeff profile values"),
where develop used the scalar Zeff (default 1.52). One Zeff value, or none, without psi_N_Zeff
now gives a flat profile at that value, matching develop (mufrac to 1e-16 with Zeff = 2.0; 1e-9
with the default, which develop held in single precision). The profile spline's "extrap" end
condition needs 4 nodes, so shorter tables, which gave NaN, now stop with a message.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
New commit With
Tests (RDCON on a 513-surface TokaMaker i-file,
🤖 Generated with Claude Code |
StuartBenjamin
marked this pull request as draft
October 13, 2026 07:25
StuartBenjamin
marked this pull request as ready for review
October 13, 2026 07:36
StuartBenjamin
requested review from
matt-pharr
and removed request for
d-burg
October 13, 2026 08:08
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
matt-pharr
approved these changes
Oct 15, 2026
matt-pharr
left a comment
Collaborator
There was a problem hiding this comment.
Looks good, I made the few tweaks here that are relevant.
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.
Lets RDCON's modified Rutherford equation (MRE) terms use a radial Zeff profile. Before,
mufracused one scalarZeffon every surface.Contains #295 (vacuum matrix in the plasma's Fourier frame), which should be merged first.
Changes
&RDCON_CONTROLtakesZeffandpsi_N_Zeffas arrays of up to 999 points. The newread_var_len(equil/local.f) copies the given entries into allocatable arrays.MRE_flag,mercier.fsplines Zeff(ψ_N) and evaluates it on each surface formufrac.psi_N_Zeff, a singleZeffvalue, or noZeff(then 1.52, the old default), gives a flat profile, so existing inputs run as before.Zeffandpsi_N_Zeffmust have equal lengths and at least 4 points (the "extrap" spline end condition). Shorter tables used to give NaN and now stop with a message.Zeffandpsi_N_Zeffas global attributes whenMRE_flagis set. WithoutMRE_flagit no longer writes aZeffattribute.docs/examples/DIIID_resistive_example/rdcon.insetsMRE_flagandgeom_flagtof.Tests
RDCON with
MRE_flag = ton a 513-surface TokaMaker i-file, compared with develop:rdcon.inZeffmufrac,Dncmatch develop to 3e-9 (develop's default 1.52 was a single-precision literal)Zeff = 2.0Zeff = 2.0 ×4,psi_N_Zeff = 0, 0.3, 0.7, 1Zeff = 2.0to 3e-16The GPEC build and the install tests pass, apart from the known
a5_tearingSTRIDE failure, which this PR does not cause.🤖 Generated with Claude Code