API
ClosedWaveguideDispersion.IrreducibleBrillouinClosedWaveguideDispersion.SquareLatticeClosedWaveguideDispersion.allocate_matriesClosedWaveguideDispersion.assemble_AClosedWaveguideDispersion.assemble_BClosedWaveguideDispersion.calc_diagramClosedWaveguideDispersion.get_discrete_irreducibleBrillouinClosedWaveguideDispersion.plot_diagramClosedWaveguideDispersion.setup_bdcsClosedWaveguideDispersion.setup_dofsClosedWaveguideDispersion.setup_fevsClosedWaveguideDispersion.setup_gridClosedWaveguideDispersion.setup_grid_squareLattice
ClosedWaveguideDispersion.IrreducibleBrillouin — Type
IrreducibleBrillouin{T}Irreducible Brillouin zone of 2D square lattices. It is a triangle with three vertices: Γ, X, and M.
Fields
Γ: Center of the Brillouin zone $(0, 0)$X: $(\pi / x, 0)$M: $(\pi / x, \pi / y)$
ClosedWaveguideDispersion.SquareLattice — Type
SquareLattice{T}2D Square lattice described by x and y.
(0, y)
^
|
|
|
---------> (x, 0) ClosedWaveguideDispersion.allocate_matries — Method
allocate_matries(dh::DofHandler, cst::ConstraintHandler)Create a sparsity pattern by DofHandler dh and ConstraintHandler cst.
ClosedWaveguideDispersion.assemble_A — Method
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.\]
ClosedWaveguideDispersion.assemble_B — Method
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.\]
ClosedWaveguideDispersion.calc_diagram — Method
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: CellValuesdh: DofHandlercst: ConstraintHandlerA: matrix $\mathbf{A}$ generated byassemble_AB: matrix $\mathbf{B}$ generated byassemble_Bn: refractive index which describe the property of the mediumbz: discrete Brillouin zonenevs: the number of eigenvalues
ClosedWaveguideDispersion.get_discrete_irreducibleBrillouin — Method
get_discrete_irreducibleBrillouin(ibz::IrreducibleBrillouin{T}, n::Int64) where{T}Get discrete points on the boundary of the irreducible Brillouin zone (a triangle for square lattices): Γ -> X -> M -> Γ.
M
/|
/ |
/ |
d / | π_y
/ |
/ |
/ |
--------------
Γ π_x XArguments
ibz: the irreducible Brillouin zonen: the number of points in the interior of each edge
Output
dibz: the points along the boundary of the irreducible Brillouin zonepara: a real number in $[0, 1]$. which is the parameter corresponding to the points indibz. We needparawhen we plot the band structure
ClosedWaveguideDispersion.plot_diagram — Method
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$ inbzperiod: period of the closed waveguide in the horizontal direction
ClosedWaveguideDispersion.setup_bdcs — Method
setup_bdcs(dh::DofHandler; period=1.0)Impose the periodic boundary condition in the horizontal direction.
Arguments
dh: DofHandlerperiod: the period of the closed waveguide in the horizontal direction
ClosedWaveguideDispersion.setup_dofs — Method
setup_dofs(grid::Grid, ip)Define the DofHandler according to the mesh grid and the interpolation ip.
ClosedWaveguideDispersion.setup_fevs — Method
setup_fevs(ip)Set up the quadreture rule and CellValues (for the integral on domain). Here we only consider 2D problem.
Arguments
ip: the interpolation
ClosedWaveguideDispersion.setup_grid — Method
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 sizeperiod: the period of the periodic closed waveguideheight: the height of the periodic closed waveguide
ClosedWaveguideDispersion.setup_grid_squareLattice — Method
setup_grid_squareLattice(;lc=0.05, period=2π)Generate meshes for periodic cells of square lattices.
Arguments
lc: the mesh sizeperiod: the period of the square