[BUG]: (Fixed in this post) The "eps" function fails when the "Omega" functions are tweaked in the tutorial "Electromagnetic modal analysis for a waveguide" #3593
Labels
bug
Something isn't working
Summarize the issue
Changing the domain conditions of the "Omega" functions just a little bit completely breaks the simulation. Instead of using "Omega" functions to assign the values to eps, what you have to do is write an "eps_expr(x)" function which returns the scalar value of eps over the domain at each x. Next, you have to run "eps.interpolate(eps_expr)" to correctly assign the dielectric values to the eps function. This way, it does not break.
How to reproduce the bug
To reproduce the bug, use these omega functions instead of the ones given in the tutorial, and set all of the dielectric permittivities to 1 just to illustrate that the bug arises from the assignment of eps, and not the values of the permittivities. As you can see, simply by making the dielectric domain two dimensional instead of one dimensional completely breaks the simulation, giving nonsensical results.
Minimal Example (Python)
Output (Python)
No response
Version
main branch
DOLFINx git commit
No response
Installation
I used conda and set the vscode environment to use the fenicsx conda environment.
Additional information
If you simply add
It should work
The text was updated successfully, but these errors were encountered: