API

ClosedWaveguideDispersion.assemble_AMethod
assemble_A(cv::CellValues, dh::DofHandler, A::SparseMatrixCSC, α::Float64)

Assemble the matrix $\mathbf{A}$ which is given by the sesquilinear form

$\int \nabla u \cdot \nabla \bar{v} - 2i \alpha \partial_{1} u \bar{v} + \alpha^{2} u \bar{v} dx.$

source
ClosedWaveguideDispersion.assemble_BMethod
assemble_B(cv::CellValues, dh::DofHandler, B::SparseMatrixCSC, n::Function)

Assemble the matrix $\mathbf{B}$ which is given by the sesquilinear form

$\int n(x_{2}, x_{2}) u \bar{v} dx.$

source
ClosedWaveguideDispersion.calc_diagramMethod
calc_diagram(cv::CellValues, dh::DofHandler, cst::ConstraintHandler, A::SparseMatrixCSC, B::SparseMatrixCSC, n::Function, bz; nevs::Int=6)

Compute the dispersion diagram for a 2D periodic closed waveguide. The propagation of the wave in this waveguide is described by

$\Delta u + k^2 n(x_{1}, x_{2})u = 0.$

To get the dispersion diagram, We need to solve generalized linear eigenvalue problems parametered by $\alpha$ in the Brillouin zone bz which are derived by Finite element method. The generalized linear eigenvalue problems come from

$\int \nabla u \cdot \nabla \bar{v} - 2i \alpha \partial_{1} u \bar{v} + \alpha^{2} u \bar{v} dx = k^{2} \int n(x_{2}, x_{2}) u \bar{v} dx.$

Arguments

  • cv: CellValues
  • dh: DofHandler
  • cst: ConstraintHandler
  • A: matrix $\mathbf{A}$ generated by assemble_A
  • B: matrix $\mathbf{B}$ generated by assemble_B
  • n: refractive index which describe the property of the medium
  • bz: discrete Brillouin zone
  • nevs: the number of eigenvalues
source
ClosedWaveguideDispersion.plot_diagramMethod
plot_diagram(bz, μ;period=1.0, title="Dispersion Diagram", xlabel="Brillouin zone")

Plot the disperison diagram.

Arguments

  • bz: discrete Brillouin zone
  • μ: eigenvalues with respect to $\alpha$ in bz
  • period: period of the closed waveguide in the horizontal direction
source
ClosedWaveguideDispersion.setup_bdcsMethod
setup_bdcs(dh::DofHandler; period=1.0)

Impose the periodic boundary condition in the horizontal direction.

Arguments

  • dh: DofHandler
  • period: the period of the closed waveguide in the horizontal direction.
source
ClosedWaveguideDispersion.setup_gridMethod
setup_grid(;lc=0.05, period=1.0, height=1.0)

Generate the mesh for the periodic cell by using Gmsh.

Arguments

  • lc: the mesh size
  • period: the period of the periodic closed waveguide
  • height: the height of the periodic closed waveguide
source