Tighten POTATO low-energy resonance handling - #162
Draft
krystophny wants to merge 5 commits into
Draft
Conversation
Add the orbit-side support for guiding-center bananas whose tips cross the last closed flux surface, complementing the libneo field_eq_mod::allow_sol flag. - potato.in gains edge_extension (default .false.); tt.f90 sets allow_sol from it, so orbits may enter the scrape-off layer in the extended equilibrium field. - New itest_type=4 single-orbit trace: starts one guiding-center orbit from (orbit_Rstart, orbit_Zstart) with pitch orbit_lambda and integrates it over one bounce via find_bounce with write_orb, writing the trajectory to fort.100. This is the minimal check that an edge banana now closes (ierr=0). - CMakeLists: drop the global -std=f2008/-Wfatal-errors, which leaked into the fetched fortplot (needs F2018 assumed-rank) and vode (legacy DO termination), breaking the build. The deps now compile with the default standard; POTATO sources are unaffected.
Scan freq_n midplane start radii from freq_Rmin to freq_Rmax at fixed pitch orbit_lambda; at each, trace one bounce via find_bounce and record the bounce frequency omega_b = 2 pi v0 / taub and toroidal precession omega_phi = delphi v0 / taub against the flux label rho_pol (from psi at the start point). Writes freq_scan.dat. With edge_extension the scan extends across the separatrix into the near-SOL where banana tips still turn. This is the POTATO side of the rung-2 frequency benchmark against thin-orbit NEO-RT.
test_freq_scan loops the flux surface s, calling neort init at each, and writes the bounce frequency Om_th and toroidal precession Om_ph at fixed pitch (eta = (1-lambda^2)/Bmin, i.e. v_par/v=0.4 at the midplane) and fixed energy (10 keV D) to freq_scan_neort.dat, with E x B set to zero. This is the thin-orbit reference curve compared against POTATO itest_type=5.
Emit iota per surface so the rho_pol map can be built from NEO-RT's own q (q = 1/iota) instead of a gfile q-profile, and densify the scan to 60 flux surfaces for a smoother edge curve.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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.
This draft PR publishes the existing committed state of
fix/potato-box-count-hangso the local branch/worktree can be retired after review.Checks were not run in this cleanup operation; the branch-specific CI should provide validation.