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

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.

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);

See Also

PlaneSrc, TFSFPlaneSrc, ModalSrc, maxwell_run