Skip to content
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

Adding localized Mur\SA-Mur absorbers #167

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gadiLhv
Copy link

@gadiLhv gadiLhv commented Dec 10, 2024

There are two additions in this pull requests:

  1. Support for Mur B.C. locally (not necessary on the edge) as a primitive
    Same use cases as specified in the CSXCAD PR
  • Horn antennaspattern calculation
  • Coaxial to PCB transitions.
    Two types or Mur B.Cs were implemented:
  • Regular first-order Mur
  • Super-absorbing Mur B.C (see reference [1]). They did increase convergence rate in some cases.
  1. Externally calculated modes are also integrated for V\I calculations. S-Parameters verified, as well.
    image

All original functionality is maintained. All functions can be used as before, as well.

[1] Betz, Vaughn Timothy, and R. Mittra. "Absorbing boundary conditions for the finite-difference time-domain analysis of guided-wave structures." Coordinated Science Laboratory Report no. UILU-ENG-93-2243 (1993).‏

@gadiLhv
Copy link
Author

gadiLhv commented Dec 10, 2024

Added two example scripts to openEMS\Python\Tutorials

@gadiLhv gadiLhv changed the title Adding localized Mur\SA-Mur absorbers for waveguide ports and custom waveguide modes Adding localized Mur\SA-Mur absorbers Feb 2, 2025
@gadiLhv gadiLhv force-pushed the master branch 2 times, most recently from e0d262f to cde850b Compare February 2, 2025 11:24
Test script with MSL

Rebasing engine extensions with latest ij indexing stuff
@gadiLhv
Copy link
Author

gadiLhv commented Feb 2, 2025

Checked that this commit\push compiles.

Ready for instructions

@thliebig
Copy link
Owner

thliebig commented Feb 2, 2025

A few initial comments and things you need to change:

  • It's obvious that you took the "normal" Mur boundary condition extension as basis, make sure to fully cleanup then, e.g. comments, names, dates and such
  • The new ArrayLib infrastructure has been introduced to improve array handling since you first started . Please make use of this new array approach by once again looking how it is done in the Mur-BC extension.The current approach with a '#define" is not how I usually do it (even before the ArrayLib) and running you code also creates a "double free" and subsequent segmentation fault, showing that array cleanup is not done correctly too.
  • Cleanup the large commented sections
  • I recommend to move the "python test code" (MSL_With_Local_Absorbers.py) into a different folder, maybe under Tests or Examples (would need to be created). Once this is all done we should create a proper Tutorial, but this is not it.
  • Maybe a (rect) waveguide would be a good showcase for this ABC?

@gadiLhv
Copy link
Author

gadiLhv commented Feb 2, 2025

Thank you for reviewing this so quickliy!

It's obvious that you took the "normal" Mur boundary condition extension as basis, make sure to fully cleanup then, e.g. comments, names, dates and such

Sure did! The lumped elements PR was based on Lorentz material, BTW. Will clean it up soon enough, as requested.

The new ArrayLib infrastructure has been introduced to improve array handling since you first started .

That's what I get for moving slowly :). I'll look into it.

Maybe a (rect) waveguide would be a good showcase for this ABC?

No problem, although one could claim it can be done with placing the waveguide on the boundaries... I'll figure something out. I wanted to implement a coax->waveguide transition, but the CAD work drove me nuts.

@gadiLhv
Copy link
Author

gadiLhv commented Feb 3, 2025

After starting to get acquainted with the new ArrayLib, I have a question:
Unlike the original Mur BC extension, this one consists of (probably) much smaller areas to perform the operation on. What is the best approach out of these two?

  1. Somehow concatenate all of the lines into one vector and input them into a single array?
  2. An array of ArrayIJ, one for each boundary condition?

I don't know if this question is for @thliebig or @biergaizi, who wrote this.

Cheers

@thliebig
Copy link
Owner

thliebig commented Feb 4, 2025

I'm not sure I understand the question fully, but yes, for the 2D arrays I guess you should use the ArrayIJ instead. This will create a single/linear array, but can be efficiently accessed like a 2D array

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants