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

Bad interpolation of DFT fields at r = 0 in cylindrical coordinates #2604

Closed
oskooi opened this issue Aug 9, 2023 · 1 comment
Closed

Bad interpolation of DFT fields at r = 0 in cylindrical coordinates #2604

oskooi opened this issue Aug 9, 2023 · 1 comment
Labels

Comments

@oskooi
Copy link
Collaborator

oskooi commented Aug 9, 2023

As described in #2538 (comment), there seems to be a bug in the interpolation of the DFT fields to the center of the voxel at $r = 0$ in cylindrical coordinates. This bug appears in cases involving $E_\phi$ and $H_r$ at $r = 0$ for $|m| = 1$ simulation (which have special boundary conditions), e.g get_dft_array and Poynting-flux calculations (via add_flux) in the $z$ direction. It also affects the time-domain fields obtained via get_array since this routine also interpolates fields to the center of the voxel.

For flux calculations involving $r = 0$, a workaround is to compute the flux manually in post processing using a near-to-far field transformation (via add_near2far) since this routine does not involve any interpolation. See #2538 (comment) and the modified function ext_eff_cyl in test_ldos.py of #2538 for an example.

cc @mochen4

@oskooi
Copy link
Collaborator Author

oskooi commented Nov 5, 2023

Replaced by #2704.

@oskooi oskooi closed this as completed 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