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

Components of polar basis vectors are not NFP periodic #1524

Closed
unalmis opened this issue Jan 18, 2025 · 1 comment
Closed

Components of polar basis vectors are not NFP periodic #1524

unalmis opened this issue Jan 18, 2025 · 1 comment
Assignees

Comments

@unalmis
Copy link
Collaborator

unalmis commented Jan 18, 2025

Issue

In the singular integral routines used for free boundary and in #1360 , the Fourier transforms of the components of the polar basis vectors of NFP symmetric vector fields are taken. Therefore, all vector quantities, in particular the virtual casing current K_vc and the boundary normal vector n_rho, are interpolated incorrectly for any finite resolution due to Gibbs phenomena.

Fix

The fix is to interpolate with Fourier transforms after converting the vectors to Cartesian form.

Math

Recall that a vector field $A$ has discrete integer field period symmetry, also known as NFP symmetry, if

$$\mathbf{A}(R, \phi + 2\pi/\text{NFP} , Z) = \mathbf{A}(R, \phi, Z)$$

Therefore, $\mathbf{A}$ may be represented as a vector of Fourier series.

$$ \mathbf{A} = A^x \hat{x} + A^y \hat{y} + A^z \hat{Z} = A^{R} \hat{R} + A^{\phi} \hat{\phi} + A^z \hat{Z} $$

However, only the components of $\mathbf{A}$ belonging to a coordinate system with constant basis vectors, such as the Cartesian components are NFP periodic. In particular for $\text{NFP} \neq 1$, the components of the polar basis vectors are not NFP periodic because $\hat{R}$ and $\hat{\phi}$ have toroidal variation. Instead a vector field $A$ with NFP symmetry satisfies

$$ \begin{bmatrix} A^{R}(\phi) \\ A^\phi(\phi) \end{bmatrix} = \begin{bmatrix} \cos(2\pi/\text{NFP}) & -\sin(2\pi/\text{NFP}) \\ \sin(2\pi/\text{NFP}) & \cos(2\pi/\text{NFP}) \end{bmatrix} \begin{bmatrix} A^{R}(\phi + 2\pi/\text{NFP}) \\ A^\phi(\phi + 2\pi/\text{NFP}) \end{bmatrix} $$

Therefore, interpolation of $A^{R}$ and $A^{\phi}$ with Fourier series over the domain

$$(\theta, \zeta) \in [0, 2\pi) \times [0, 2\pi / \text{NFP})$$

will suffer from Gibbs phenomena and not converge with finite resolution.

@unalmis unalmis added the bug label Jan 18, 2025
@unalmis unalmis linked a pull request Jan 18, 2025 that will close this issue
7 tasks
@unalmis unalmis self-assigned this Jan 18, 2025
@unalmis unalmis added the P3 Highest Priority, someone is/should be actively working on this label Jan 18, 2025
unalmis added a commit that referenced this issue Jan 18, 2025
@unalmis
Copy link
Collaborator Author

unalmis commented Jan 18, 2025

The NFP definition in the reference I'm looking at isn't right; it should be cylindrical components are periodic.

@unalmis unalmis closed this as not planned Won't fix, can't repro, duplicate, stale Jan 18, 2025
@unalmis unalmis removed bug P3 Highest Priority, someone is/should be actively working on this labels Jan 18, 2025
@unalmis unalmis removed a link to a pull request Jan 23, 2025
7 tasks
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

No branches or pull requests

1 participant