FXC-3519 add feature to orthogonalize degenerate modes from mode solver#2823
FXC-3519 add feature to orthogonalize degenerate modes from mode solver#2823dmarek-flex wants to merge 1 commit intodevelopfrom
Conversation
add conjugate option for orthogonalizing degen modes
|
So, this is pretty interesting. My initial reaction to hearing about Unfortunately, you might be right that switching to this will be annoying. I spent quite a bit of effort making sure that things are consistent for photonics, like Thinking about it a little it could go like:
|
Yea I might let this draft PR float here for a bit, but I am interested in testing out the non-interpolation approach when I have a bit more time. Seems like it will be more accurate |
Indeed, I am now curious too, I wonder if it might increase the accuracy in some photonic cases too, e.g. in mode injection/decomposition with angle and/or bend. |
draft at the moment for discussion. I added a lot of detail to this discussion, since I am still trying to figure out some of the details for this procedure when applied to mode in transmission lines.
Objective
The purpose of this PR is to improve our handling of degenerate modes. In particular, ensuring that the
dotmethod gives the expected result of close to 0 when the mode indices are different. Before this PR, modes that are degenerate might not be orthogonal wrt the overlap integral calculation indot. It seems to be worse when using scipy, where in one test calculating the dot of a pair of polarization degenerate modes at 3 different frequencies gave:Without degenerate mode processing (absolute value of dot)
With the degenerate mode processing (absolute value of dot), we get the expected result for the
dotof different modesIssue
This all works nicely for optical-type waveguides, at least the square core waveguide I have been using as a test case. But, the results are not as nice when attempting the same operations for a stripline transmission line, where the degeneracy now comes from the fact that there are 2 TEM modes.
Without degenerate mode processing (absolute value of dot)
With degenerate mode processing (absolute value of dot)
It is still unclear to me why these values are so much larger for the stripline. I was able to get a much lower value for
dotby introducing the wipdot_yeemethod, which avoids interpolation and truncation of the grid.With degenerate mode processing (absolute value of dot_yee)
This works because I basically forced the
dot_yeemethod to return the same values I used to form the orthogonal basis in the first place. The problem with this solution is that thefluxcalculated for each mode will not be the same as the self-terms ofdot_yeemethod, so I also introduced theflux_yeemethod temporarily so that they match.Solutions
I see two main ways forward:
dot_yeecalculation. This modification would essentially avoid interpolation when possible as I did influx_yee.Option 2 seems to me more numerically sound, since interpolation of the E field around metallic objects is prone to error, but potentially a lot of work and I foresee a lot of accuracy issue kind of bugs in the near future.
Wondering what everyone thinks @momchil-flex, @weiliangjin2021, @dbochkov-flexcompute, or if maybe I am missing another potential solution? My feeling is I should just go ahead with option 1, since I don't have time at the moment to make these sweeping changes to the flux/dot calculations.