Repository navigation
Fix three expressions that always failed (v_loop, EC power, summary beta_tor) - #327
Merged
Merged
Conversation
…EC power, summary beta_tor - core_profiles.global_quantities.v_loop used `core_profiles` without binding it and called `v_loop`, which does not exist: it is now `vloop(cp1d, eqt)` for each profiles_1d - pulse_schedule.ec.power_launched.reference summed over `ec.unit`; the beams are in `ec.beam` - summary.global_quantities.beta_tor.value called `beta_tor(eqt, cp1d)` without its keywords: it is the toroidal beta of the total pressure, not normalized (`norm=false, thermal=false`) Each of them threw when evaluated, so the three fields were always missing. Tests in runtests_expressions.jl. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <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.
Three dynamic expressions threw every time they were evaluated, so their fields were always missing.
core_profiles.global_quantities.v_loopcore_profileswithout binding it, and calledv_loop, which does not existvloop(cp1d, eqt)for eachprofiles_1dpulse_schedule.ec.power_launched.referenceec.unit; the beams are inec.beamec.beamsummary.global_quantities.beta_tor.valuebeta_tor(eqt, cp1d)without its required keywordsbeta_tor(eqt, cp1d; norm=false, thermal=false): toroidal beta of the total pressure, not normalizedAlso a line in the
polygon_raysdocstring: the k-th ray radiates from vertex k+1.Effect
Checked with
FUSE.initon 12 cases (D3D, ITER from scalars and from ODS, ARC, EXCITE, KSTAR, FPP, KDEMO, baby MANTA, ...): the stored data is identical bit for bit, andIMAS.freezenow also gives these three fields (pulse_schedule.ec.power_launched.referencewhere there are EC beams).Tests
New
test/runtests_expressions.jl(7 tests, inruntests.jl): the three expressions on the sample data, against the functions they call.🤖 Generated with Claude Code