ModalSrc
Concrete subclass of Source representing an electric dipole distribution that generates a mode of a waveguide.
Contents
Description
ModalSrc is used to store the transverse J-field distribution on a plane to generate a mode of a waveguide. The plane should be orthogonal to the axis of the waveguide. The mode is calculated by an external mode solver. To assist the mode solver to calculate the mode, users need to provide an estimate of the effective refractive constant of the mode to the constructor of ModalSrc.
Construction
src = ModalSrc(normal_axis, intercept, opts) src = ModalSrc(normal_axis, intercept, opts, KA)
Input Arguments
- normal_axis: direction normal to the plane over which the electric dipoles distribute. It is also the axis of the waveguide. It should be one of Axis.x, Axis.y, Axis.z.
- intercept: location of the plane in the normal_axis direction.
- opts: options structure that controls the behavior of the mode solver. See below for more details.
- KA: integral of the norm of the surface current density. It indicates the strength of the mode amplitude. If unassigned, the deault value KA = 1 is used.
Options Structure
opts should have a string property opts.clue that indicates the type of the clue that the mode solver utilizes to find an appropriate waveguide mode. The clue can be either the order number of the waveguide mode, or the effective refractive index of the waveguide mode.
- opts.clue = 'order' commands the mode solver to find the n|th-order mode, where |n is the order number you should provide as opts.order = n. For example, opts with opts.clue = 'order' and opts.order = 1 commands the mode solver to find the fundamental mode.
- opts.clue = 'guess' commands the mode solver to find the mode with the effective index close to a "guess". The guess of the effective index should be provided as opts.neff = neff_guess. For example, opts with opts.clue = 'guess' and opts.neff = 2.0 - 0.01i commands the mode solver to find the mode whose effective index is close to 2.0 - 0.01i.
In general, opts.clue = 'guess' finds the mode much faster than opts.clue = 'order'.
Note
In the finite-difference grid, ModalSrc excites dipoles at the E-field points. This poses a condition on intercept argument in the constructor: intercept should be at a dual grid point in the normal_axis direction. Therefore, make sure that intercept does not overlap with the locations of the vertices of Shape in the normal_axis direction; otherwise dynamic grid generation in maxwell_run will fail.
Example
% Create an instance of PointSrc. modeopts.clue = 'order'; modeopts.order = 1; src = ModalSrc(Axis.y, -1000, modeopts); % y = -1000 should not be primary grid point
% Use the constructed src in maxwell_run(). [E, H] = maxwell_run({INITIAL ARGUMENTS}, 'SRCJ', src);