Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make plasma-surface distance calculations robust when using NFP #652

Open
dpanici opened this issue Sep 8, 2023 · 3 comments
Open

Make plasma-surface distance calculations robust when using NFP #652

dpanici opened this issue Sep 8, 2023 · 3 comments
Labels
low priority Nice to have, but not needed right away objectives Adding or improving objective functions

Comments

@dpanici
Copy link
Collaborator

dpanici commented Sep 8, 2023

Currently, if we want to compute the PlasmaVesselDistance objective for two surfaces with NFP>1, and let's say the surface is such that for the point on the plasma surface at $(\theta=0, \zeta=0)$ the closest point on the winding surface is at $(\theta=0,\zeta=\epsilon$ where $\epsilon>0$ is some small number of radians. Then due to the symmetry, we can say that the closest point on the surface for the plasma point $(\theta=0, \zeta=2\pi/NFP)$ is on the surface at $(\theta=0, \zeta=2\pi/NFP+\epsilon)$, which is NOT included on the grids we by default use when both surfaces have NFP>1, resulting in instead a closest point which is not the true closest point.

To remedy this, we can calculate distance not by using cartesian distance formula (which we do now) but instead by calculating the cylindrical coordinates of each, and calculating the distance using some modding of the toroidal angle with $2\pi/NFP$ to account for this

@dpanici
Copy link
Collaborator Author

dpanici commented Sep 8, 2023

something like
$d\phi = |\phi_2 - \phi_1| $
if $d\phi > \pi/N_{FP}$:
$d\phi = 2\pi/N_{FP} - d\phi$

@f0uriest
Copy link
Member

f0uriest commented Sep 9, 2023

@dpanici dpanici added objectives Adding or improving objective functions low priority Nice to have, but not needed right away labels Jun 25, 2024
@dpanici
Copy link
Collaborator Author

dpanici commented Aug 20, 2024

#568 we need to revisit this once toroidal angle is generalized

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low priority Nice to have, but not needed right away objectives Adding or improving objective functions
Projects
None yet
Development

No branches or pull requests

2 participants