{"id":37722736,"url":"https://github.com/nennigb/matchingep","last_synced_at":"2026-01-16T13:34:42.114Z","repository":{"id":45286505,"uuid":"508221155","full_name":"nennigb/matchingep","owner":"nennigb","description":"A python package for extending mode matching method on 2D waveguide tuned at an exceptional point.","archived":false,"fork":false,"pushed_at":"2022-12-23T21:00:00.000Z","size":58,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-01-27T15:42:14.653Z","etag":null,"topics":["acoustics","exceptional-point","mode-matching","waveguide"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nennigb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-28T08:43:02.000Z","updated_at":"2022-08-30T08:45:57.000Z","dependencies_parsed_at":"2023-01-30T19:31:09.297Z","dependency_job_id":null,"html_url":"https://github.com/nennigb/matchingep","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nennigb/matchingep","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nennigb%2Fmatchingep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nennigb%2Fmatchingep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nennigb%2Fmatchingep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nennigb%2Fmatchingep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nennigb","download_url":"https://codeload.github.com/nennigb/matchingep/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nennigb%2Fmatchingep/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479033,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["acoustics","exceptional-point","mode-matching","waveguide"],"created_at":"2026-01-16T13:34:42.051Z","updated_at":"2026-01-16T13:34:42.105Z","avatar_url":"https://github.com/nennigb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"MatchingEP\n==========\n\n[![tests](https://github.com/nennigb/matchingep/actions/workflows/ci-ubuntu.yml/badge.svg)](https://github.com/nennigb/matchingep/actions/workflows/ci-ubuntu.yml)\n\n**A python package for extending mode matching method on a 2D waveguide tuned at an exceptional point.**\n\nThis package aims at solving the wave propagation in a 2D (acoustic) waveguide comprising two\nsemi-infinite sections using the enhanced _mode matching method_ method proposed in [^1]. One duct has rigid boundaries whilst the other is lined along both walls (Robin boundary condition). \n\n![Lined duct sketch.](doc/lined_duct.svg)\n\nThe **mode-matching method** is a convenient tool to compute multimodal scattering coefficients between\nconnected waveguides. In each waveguides, the field is expanded on a finite set of propagating and evanescent waves and the solution of the global problem is obtained by solving a linear system deduced from the continuity conditions at the interfaces. The propagating and evanescent waves are obtained by solving the dispersion equation.\n\nThe method is well established when all roots of the dispersion equation are simple but fails when two or more eigenvectors merge. **Exceptional points** (EP) correspond to particular values of the parameters (here admittances) leading to defective eigenvalue in non-Hermitian systems. At EP, both the eigenvalues and eigenvectors merge.\n\nThe proposed approach extends the mode-matching method at **exceptional point** (EP) by adding new wavefunctions, with polynomial growth along the guide axis as proposed in [^1]. With these functions, the basis is complete and pointwise convergence is recovered. These function are analogous to Jordan generalized vectors in a finite-dimensional vector space.\n\nThis package works for EP2 (two modes merging) or EP3 (three modes merging).\n\n[^1]: J. B Lawrie, B. Nennig, E. Perrey-Debain, 2022, [10.1098/rspa.2022.0484](https://doi.org/10.1098/rspa.2022.0484).\n\nThe `examples` folder contains most of scripts to obtained results presented in [^1].\nThe package proposes some facilties to compute the power balance, solving the dispersion equation, plotting...\n\n\n## Installation\n\nFirst, install the [`polze`](https://github.com/nennigb/polze/) package (root finding). Then, installation of `matchingep` can be done after cloning or downloading the repos, using \n```\npip3 install path/to/matchingep [--user]\n```\nor in _editable_ mode if you want to modify the sources\n```\npip3 install -e path/to/matchingep\n```\nNote that on some systems (like ubuntu), `python3` or `pip3` should be use to call python v3.x\n\n\n## Running test suite\n\nThe test suite based on doctest and unittest can be run, with\n```\npython -m matchingep.test\n```\n\n## Documentation\n\nThe doctrings are compatible with several Auto-generate API documentation, like `pdoc3`. Once the package has been installed or the at `matchingep` location run,\n```\npdoc3 --html --force --config latex_math=True matchingep\n```\nThe html files are generated in place. Then open the `matchingep/index.html` file. This interactive doc is particularly useful to see latex includes.\n\n\n## Usage\n\nFor a lined duct with unit height, lined with the two admittances `mu` and `nu`, the problem can be solved \n```python\nimport numpy as np\nimport matchingep as matching \n# Define the admittances (here EP3 case)\nmu3 = 3.08753629148967+3.62341792246081j\nnu3 = 3.17816250726595+4.67518038763374j\n# Define the number of modes in the expansion\nNmodes = 30\n# Define the radius for the countour solver (dispersion equation)\nRadius = (min(10, Nmodes) + 1.2)*np.pi\n# Create the `guide` object\nguide = matching.Guide(mu=mu3,\n                       nu=nu3, k=1,\n                       Nmodes=Nmodes, R=Radius)\n# Chose a matching scheme depending of the root multiplicities\nEP = np.rint(guide.multiplicities).max()\nguide.matching(EP_order=EP)\n# Get the transmitted (x=1) and reflected power\nT = guide.transmitted_power(x=1)\nR = guide.reflected_power()\n```\n\n## Citing\nIf you are using `matchingep` in your scientific research, please cite\n\n\u003e J. B. Lawrie, B. Nennig, and E. Perrey-Debain. \"Analytic mode-matching for accurate handling of exceptional points in a lined acoustic waveguide.\" Proceedings of the Royal Society A 478.2268 (2022): 20220484, [10.1098/rspa.2022.0484](https://doi.org/10.1098/rspa.2022.0484).\n\nBibTex:\n```bibtex\n@article{doi:10.1098/rspa.2022.0484,\n  author = {Lawrie, Jane B. and Nennig, B. and Perrey-Debain, E.},\n  title = {Analytic mode-matching for accurate handling of exceptional points in a lined acoustic waveguide},\n  journal = {Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences},\n  volume = {478},\n  number = {2268},\n  pages = {20220484},\n  year = {2022},\n  doi = {10.1098/rspa.2022.0484}\n}\n```\n\n\n## License\n\n`matchingep` is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\n`matchingep` is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with `matchingep`.  If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnennigb%2Fmatchingep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnennigb%2Fmatchingep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnennigb%2Fmatchingep/lists"}