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
numerical stability in cylindrical coordinate #2644
Comments
Here is a simple script that shows the issue:
The issue goes aways if there is some offset between the source and |
It also appears that more pixels need to be excluded (larger |
You could also just try a smaller Courant number following this comment: https://github.com/NanoComp/meep/blob/7e747d2c4de03329506dd2d31bfcc53e12460029/src/step_db.cpp#L436C30-L441 |
See also the |
Numerical instability does seem to be the issue, and smaller Courant factor indeed solves the problem. Maybe we need to change the default behavior for |
Here is the paper I found https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=7696718, which suggested a suspiciously large small factor. I will do some more numerical experiments based on #2644 (comment) and find the largest Courant factor at each m value. |
RuntimeError: meep: simulation fields are NaN or Inf
occured at the beginning of field updates when the source includesThis issue doesn't occur at$m = -1, 0, 1$ . And since the amplitude should be 0 at $r=0$ for $|m| > 1$ , we could just exclude the point when we define sources for now.
The text was updated successfully, but these errors were encountered: