add feature to orthogonalize degenerate modes from mode solver #2823
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
dot
method 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
dot
of 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
dot
by introducing the wipdot_yee
method, 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_yee
method to return the same values I used to form the orthogonal basis in the first place. The problem with this solution is that theflux
calculated for each mode will not be the same as the self-terms ofdot_yee
method, so I also introduced theflux_yee
method temporarily so that they match.Solutions
I see two main ways forward:
dot_yee
calculation. 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.