Skip to content

Conversation

jmcclena
Copy link
Contributor

Add fast density calculation to IMAS.sources
Add max_fast_frac parameter to prevent thermal density becoming negative.

Add fast density calculation to IMAS.sources
Add max_fast_frac parameter to prevent thermal density becoming negative.
Undo "return refreeze" (not sure how that happened.
@jmcclena
Copy link
Contributor Author

@orso82 I'm happy with the pull request now, and I think it's ready for this to be merged.

Copy link
Member

@orso82 orso82 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks mostly good. Some styling/typing suggestions and a deepcopy that I am not sure is necessary

q_density_difference = ne .- sum(ion.density .* avgZ(ion) for ion in cp1d.ion if ion !== ion0)
if hasdata(ion0, :density_fast)
q_density_difference .-= .-ion0.density_fast .* avgZ(ion0)
q_density_difference .-= ion0.density_fast .* avgZ(ion0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good find!

jmcclena and others added 3 commits September 25, 2025 16:51
Co-authored-by: Orso Meneghini <[email protected]>
Co-authored-by: Orso Meneghini <[email protected]>
Co-authored-by: Orso Meneghini <[email protected]>
@jmcclena
Copy link
Contributor Author

@orso82 Can you verify that the refreezes in fast_particles_profiles! are needed. I don't understand why they're there.

Remove refreezes from fast_particle_profiles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants