|
hp-FEM
Adaptive hp-FEM suite for nano-optics
|
#include <memory>#include <vector>#include "hpfem/core/types.hpp"#include "hpfem/fespace/dof_map.hpp"#include "hpfem/materials/material.hpp"#include "hpfem/mesh/mesh.hpp"#include "hpfem/physics/propagating_mode.hpp"

Go to the source code of this file.
Classes | |
| struct | hpfem::physics::WaveguidePort |
| A port of a scattering problem: the boundary facets of a waveguide cross-section. More... | |
| struct | hpfem::physics::PortMode |
| struct | hpfem::physics::PortCoefficients |
| Modal coefficients of a solution on one port. More... | |
| class | hpfem::physics::PortModes< Dim > |
Modes, functionals and normalisations of one port; built by Scattering from the setup. More... | |
Namespaces | |
| namespace | hpfem |
| namespace | hpfem::physics |
Waveguide ports: boundary facets through which the guided modes of the attached waveguide enter and leave the computational domain. On the port Γ the tangential field is expanded in the modes of the cross-section, \( E_t = \sum_m (a_m + b_m)\,\hat e_m \) with incoming amplitudes \( a_m \) (prescribed) and outgoing \( b_m \) (unknown), and the natural boundary term of the weak form, \( \oint_\Gamma (n\times\mu^{-1}\nabla\times E)\cdot v\,dS \) (in 2D \( \oint_\Gamma (\mu^{-1}\nabla\times E)\,(v\cdot t')\,ds \) with the tangent \( t' = (n_y, -n_x) \)), is written with the modal expansion of \( n\times w = \sum_m (b_m - a_m)\,\hat w_m \), \( w = \mu^{-1}\nabla\times E \) (the magnetic field of a mode flips sign with its direction, the tangential electric field does not). Bi-orthogonality \( \int_\Gamma \hat e_m\cdot\hat w_n = \delta_{mn}N_m \) turns the unknown \( a_m + b_m \) into the projection \( c_m = \int_\Gamma E_t\cdot\hat w_m / N_m \), so the port adds the low-rank term \( \sum_m q_m q_m^\top / N_m \) with \( q_{m,i} = \int_\Gamma \phi_i\cdot\hat w_m \) to the operator and the excitation \( 2\sum_m a_m q_m \) to the load: modes in the expansion leave without reflection, the others see a PEC. Outgoing amplitudes \( b_m = c_m - a_m \) give the S-parameters, power-normalised with the modal powers.
2D (in-plane E, \( H_z \) out of plane): the port is a straight chain of boundary edges, its modes are the TM slab modes of the cross-section profile \( \varepsilon_r(s) \), \( \partial_s(\varepsilon_r^{-1}\partial_s h) + k_0^2\mu_r h = \beta^2\varepsilon_r^{-1}h \) for \( H_z = h(s)e^{i\beta\xi} \) (ξ the outward normal coordinate), solved with a hierarchical 1D p-FEM on the port edges (orders of the inside cells, natural conditions at the ends: the port ends on PEC walls where \( \partial_s h = 0 \)). Outgoing mode: \( \hat e_m = E\cdot t' = -\beta_m h_m / (\omega\varepsilon_0\varepsilon_r) \), \( \hat w_m = i\omega\mu_0 h_m \), power \( P_m = \beta_m/(2\omega\varepsilon_0)\int h_m^2/\varepsilon_r\,ds \); evanescent modes have \( \beta = i|\beta| \) and no power.
3D: the port facets form a planar cross-section, extracted as a 2D mesh in the frame \( (t_1, t_2, n) \) (right-handed, n outward), whose guided modes come from PropagatingMode (PEC rim, PMC where the rim lies on a symmetry plane listed in WaveguidePort::pmc_tags; materials and orders of the inside cells; propagating modes only). For a mode \( (E_t + \hat n E_z)e^{i\beta\xi} \) the transverse curl is \( (\nabla\times E)_t = (\nabla_tE_z - i\beta E_t)\times\hat n \), so \( \hat w_m = \hat n\times w = (\nabla_tE_z - i\beta E_t)/\mu_r \) and \( h_t = (\nabla\times E)_t/(i\omega\mu_0\mu_r) \) gives the power \( P_m = \tfrac12\mathrm{Re}\int(\hat e_m\times\hat h_m^*)\cdot\hat n \). Mode signs are fixed independently of the port orientation (see PortMode). Convention exp(-iωt). See docs/theory/maxwell.md#waveguide-ports-and-s-parameters.