-
Notifications
You must be signed in to change notification settings - Fork 50
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
Mode solver improvement for simulations at low-frequency containing metals #2023
Conversation
Here is a benchmark example from @dmarek-flex regarding a micostrip made of PEC. Its effective k should be 0, and effective n approaches a constant around 1.82 as frequency goes to 0. |
@prashkh welcome to test if you have other tests in mind |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Results speak for themselves. Thanks @weiliangjin2021, I tried it out on my own example as well and it worked well down to 1 MHz, which is plenty low enough.
First time I get to remind someone to update the Changelog though!
Well, soon enough we might need to handle <1MHz. But that will probably need a very different formulation.
Thanks for the reminder. I plan to add it after 1st round of review so that I'm confident enough to say that it works well in low-frequency. |
@dmarek-flex CHANGELOG added. |
befb484
to
f679ce4
Compare
Two main improvements:
For the eigenvalue problem with the matrix
PQ
whereP = p_mu + p_partial
andQ = q_ep + q_partial
, wherep_mu
denotes the matrix containingmu_parallel
, andq_ep
forepsilon_parallel
, and thepartial
term for the remaining matrix components that containsGrad*ep(mu)^-1*Grad
. One observation is that if you write out the block form, one can find thatp_partial @ q_partial=0
. SinceGrad
scales1/(k0* dl)
, in low-frequency/high-resolution regime,Grad
can be huge, not mention thatp(q)_partial
scales asGrad**2
. So even thoughp_partial @ q_partial
is strictly 0, machine error can generate nonzero terms that completely ruin the eigenvalues of matrixPQ
. This is responsible for the oscillating phenomenon of effective n as a function of frequency in the low-frequency regime.In this PR, we don't compute
PQ
with the fully assembled matrixP
andQ
, butPQ = p_mu @ Q + p_partial @ q_ep
so thatp_partial @ q_partial
is for sure dropped.Let's take matrix
P
as an illustration (the same applies toQ
),p_partial
scales as1/(k0* dl)**2
. So in low-frequency/high-resolution regime,p_partial
term might grow so huge thatp_mu
term becomes negligible. But for PEC, its permittivity value should still be significant. So our default permittivity value for PEC should be scaled by the factor1/(k0* dl)**2
.(Tests to be added in the solver part in a separate PR.)