ProjectTorreyPines / IMAS.jl

Physics, engineering, math and plotting on top of IMASDD.jl
https://projecttorreypines.github.io/IMAS.jl/dev
Apache License 2.0
1 stars 0 forks source link

Make centroid work if first and last point differ #180

Closed bclyons12 closed 1 month ago

bclyons12 commented 1 month ago

This was a significant bug in the flux of PF active coils with a point representation, putting the point at a very wrong location since outline() did not repeat the first point at the end. https://github.com/ProjectTorreyPines/FUSE.jl/blob/204077fe5ae932971eaba0fdc21e8d343d4f0881/src/actors/pf/pf_active_utils.jl#L129-L132

This got used a few other places too, but wouldn't have caused an issue if the first and last point were the same.

bclyons12 commented 1 month ago

@lstagner This was the cause of the issue in FRESCO. It was calculating the centroid of low-field side calls to be a low R, so all the PF coils were on the high-field side. With no coils on the outboard side to push against it, the current just moved outward.