Repository navigation
Conversation
…V torque to IMAS Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BgNxCG7pGc8HRXGZ3r3psj
…ordinate when the dd holds the equilibrium Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BgNxCG7pGc8HRXGZ3r3psj
…rho_tor_norm is unavailable Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BgNxCG7pGc8HRXGZ3r3psj
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BgNxCG7pGc8HRXGZ3r3psj
Collaborator
|
@logan-nc i will review this but we can also make a list of quantities that don't fit properly into IMAS right now and open a pull request upstream to add fields for them! |
Collaborator
Author
|
@matt-pharr agreed, here is a first list for the upstream pull request. No slot at all
Fits in part
Points on this PR found while checking
🤖 Generated with Claude Code |
This branch has not been deployed
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
write_imasnow writes more than the least-stable energy per toroidal mode number: the perturbed-equilibrium response (the normal displacement and the normal field by poloidal harmonic on the code's own ψ grid), tearing growth rates, and the NTV torque as a neoclassical momentum source with the torque inside each surface. A stage that did not run writes nothing, and the existing entries are unchanged.Regression report
Notes for reviewers
This is a minimal first pass. It writes only to slots the current data dictionary already has, and leaves the rest for the restructuring of IMAS for this kind of data.
mhd_linear.time_slice[].toroidal_mode[j].energy_perturbed, j = 1..npertplasma.displacement_perpendicular,plasma.b_field_perturbed.coordinate1; grid type 24 (ρ_pol,N × straight-field-line Fourier),grid.dim1= √ψ_N,dim2= mtoroidal_modeentries after the npert ideal ones,perturbation_type.name = "tearing",growthrate[1/s],frequency[Hz],m_pol_dominantfor an uncoupled rootcore_sources.source[], identifierneoclassical(401), description names the method:momentum_tor= (dT/dψ_N)/(dV/dψ_N) [N m⁻²],torque_tor_inside[N m], ongrid.psi_normChoices a reviewer may want to change:
toroidal_mode[1:npert]still holds exactly the ideal energies the FUSE actor reads.grid.rho_tor_normas the primary coordinate of a core profile. When the dd holds the equilibrium (the IMAS-fed case), it is interpolated fromdd.equilibrium. For a run from a file there is no exact value, because the domain stops short of the separatrix, so the profiles are written onpsi_normwith IMASdd's coordinate check turned off for those fields.displacement_perpendicular.Checks:
test/runtests_imas.jl: 54/54 pass. New testset: the n = 2 response block lands intoroidal_mode[2]; a uniform torque density comes back uniform, and its cumulative value matches the total; ρ_tor,N is interpolated when the dd has an equilibrium; tearing roots follow the ideal entry with their m.displacement_perpendicularequalspe.xi_n_modes; ∫(dV/dψ_N) dψ_N = 18.29476 againstparams.volume18.29472, which confirms the volume derivative is per ψ_N.torque_tor_inside[end]= 0.55448 N m and ∫momentum_tordV = 0.55448 N m, against the adaptive-quadrature total of 0.55393 N m (trapezoid on the profile grid, 0.1 %).tearing.gamma.write_imas, so the regression report cannot move. An IMAS round-trip case could be added once the output settles.🤖 Generated with Claude Code
https://claude.ai/code/session_01BgNxCG7pGc8HRXGZ3r3psj