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

Incorrect normalization of Er source at r = 0 and m = ±1 in cylindrical coordinates #2704

Open
oskooi opened this issue Nov 5, 2023 · 0 comments
Labels

Comments

@oskooi
Copy link
Collaborator

oskooi commented Nov 5, 2023

In cylindrical coordinates, $E_r$ is defined at the midpoint of the Yee-grid voxels ($r = 0.5\Delta r$). An $E_r$ point source at $r = 0$ and $m = \pm 1$ requires restriction to $E_r$ grid points at $r = \pm 0.5\Delta r$. There is a bug in the restriction operation for this case which prevents computing quantities such as the extraction efficiency involving the ratio of the Poynting flux (add_flux) to the LDoS (dft_ldos).

Based on the results in #2538 (comment), a simple workaround is to place the $E_r$ point source at $r = 1.5\Delta r$. This ensures restriction does not involve $E_r$ grid points within the $r = 0$ voxels. A source placed anywhere at $r < 1.5\Delta r$ triggers the bug, however. This slight adjustment of the source position incurs a small error which decreases with increasing grid resolution (smaller $\Delta r$).

@oskooi oskooi added the bug label Nov 5, 2023
@stevengj stevengj changed the title Incorrect restriction of Er source at r = 0 and m = ±1 in cylindrical coordinates Incorrect normalization of Er source at r = 0 and m = ±1 in cylindrical coordinates Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant