BackHomeNext Home Contact
Modes and mode arrays

class WMM_Mode Single modes
Integrations of field products Mode overlaps
class WMM_ModeArray Arrays of modes
Propagation in homogeneous waveguide segments Mode interference

The mode analysis procedures receive an object of class WMM_ModeArray as the last (reference) argument. On completion of the searching process, the data structure is filled with the found number of WMM_Modes. This array, or its entries, respectively, constitute the output of the mode solver.

Single modes:

An object of class WMM_Mode implements what is meant by a guided mode. The more general concepts are defined in mode.h and mode.c, while the procedures in wmmfld.h and wmmfld.c fill the methods which are left 'virtual' in the former files, i.e. specify the functions which need direct access to the WMM field representation. WMM_Modes can be copied and assigned. Among the members of a mode object are:
wg The waveguide , for which the mode was calculated. See waveg.h and waveg.c for the definition.
pol The polarization which was specified for the mode analysis, one of QTE, QTM, or VEC.
sym The enforced symmetry of the mode with respect to the x-z-plane. One of SYM, ASY, or NOS.
beta The propagation constant, in µm-1.
k0 The vacuum wavenumber belonging to the vacuum wavelength of the modes waveguide, in µm-1.
neff The effective mode index, beta/k0.
npcB A normalized propagation constant, or normalized effective permittivity:


where nmin and nmax are the default effective mode index limits for the waveguide under consideration.

field The mode profile, evaluated at position (x,y) on the cross section plane. Accepts an identifier for the field component, one of EX, EY, EZ, HX, HY, HZ, or SZ, for the three electric and magnetic components, and for the longitudinal component of the time averaged Poynting vector (declared in maxweq.h). The return values are meant in units of V/µm, A/µm, or W/µm2, respectively. Note that the electric and magnetic fields associated with the guided modes are

   E(x,y,z,t) = (E_x, E_y, i E_z)(x,y) exp(i k0 c t - i beta z) + c.c.


   H(x,y,z,t) = (H_x, H_y, i H_z)(x,y) exp(i k0 c t - i beta z) + c.c. ,

where 'c.c.' denotes the complex conjugate of the preceding term, with real fields Ex, ..., Hz. c is the free space velocity of light (related quantities in micrometer units are supplied in maxweq.h). Thus EX, EY, HX, and HY specify the real part of the corresponding mode component, while EZ and HZ mean an imaginary part. With this ansatz, the transverse components of the time averaged Poynting vector vanish.

ampfac Normalization factor of the mode profile. Initially, this value is set such that the total guided power of the mode

   P = 1/2 int int (E_x H_y - E_y H_x) dx dy

evaluates to P = 1 W. ampfac enters the results of all methods, which access the mode profile.

minE, maxE
minH, maxH
minS, maxS
For visualization purposes: minimum / maximum electric and magnetic field amplitudes (with respect to the x-, y-, and z-components), and the extremal values of the Poynting vector (z-component). Roughly estimated for the normalized mode profile.
The total guided power assigned to the mode, and the powers assigned to the TE and the TM part of the hybrid mode profile, in W:
   tepower = - 1/2 int int E_y H_x dx dy ,
   tmpower = 1/2 int int E_x H_y dx dy ,
   totpower = 1/2 int int (E_x H_y - E_y H_x) dx dy .
polcharacter Polarization character of a hybrid mode, between 0 and 1. A value close to 1 indicates a TE-like mode. Depending on the char-argument, the function returns one of the following ratios:
   'E':   int int E_y^2 dx dy / int int (E_x^2 + E_y^2) dx dy ,
   'H':   int int H_x^2 dx dy / int int (H_x^2 + H_y^2) dx dy ,
   'S':   tepower()/totpower() .
normalize Normalize the mode, such that totpower() evaluates to the supplied argument.
recint Integrate a product of two mode components (EX, ... , HZ) over a rectangular area in the x-y-plane. Confer the code for the guided power evaluations as an example. May be useful for evaluating perturbation theory integrals.
Integrate a product of two mode components (EX, ... , HZ) along horizontal or vertical lines in the x-y-plane. Integrals along dielectric boundary segments may be of interest in the framework of perturbation theory; therefore the functions require the indices of the rectangle, where the field is to be evaluated, as an explicit argument. Lines involving more than one rectangle of the permittivity decomposition must be treated piecewise.
maxintensity Determines the mode shape: The function returns the maximum intensity on a specified rectangular area, and sets the reference arguments to the x-y-position of the intensity maximum, and to the average 1/e2 extent in the x- and y-directions. Only a coarse approximation!
translate Shifts the position of the entire mode by a vector (dx, dy). The shift affects the waveguide (boundary locations) and the mode profile. In general, the mode symmetry is destroyed, and the mode symmetry argument becomes NOS.
Save the entire mode information to a file, or retrieve it. read and write read or write information from/to an open FILE handle. The default versions access files with extension '.mod', where the filename is composed from the two supplied character arguments, and from some of the modes properties, as explaned in the introduction (consequently this information must be supplied to read_def explicitely). The files are in ASCII format and commented; at least the first lines can be useful e.g. for inspecting the propagation constant or the underlying waveguide structure. To prevent the inclusion of comments for a reduction of the file size, comment the print command in the comment function in inout.c.
Other members of mode objects are described in the sections concerned with visualization and perturbation theory. For some methods dealing with field products and special integrals see the code directly.


Mode overlaps:

Bilinear products combining an input field and guided modes, two modes of the same waveguide, or two modes belonging to two different waveguides are required in several frameworks, e.g. to compute initial amplitudes, for modeling waveguide junctions, or along with coupled mode theory. The WMM provides the following functions for these purposes:
ovlp Member function of a WMM_Mode, declared in mode.h, source in mode.c. Computes the overlap

   1/2 int int (E_mx H_ey - E_my H_ex) dx dy

of the mode (subscript m) with an external field (subscript e), supplied as a function pointer argument (a function modeling a Gaussian beam can be found in maxweq.h, maxweq.c). The integrals are evaluated numerically by Gaussian quadrature formulas. The function is intended for initial amplitude evaluation, e.g. in simulating the end face illumination of a waveguide.

twomrecint Defined in wmmfld.h, wmmfld.c. The function integrates a product of two field components belonging to two different modes over a rectangular area in the x-y-plane.
scalprod Defined in wmmfld.h, wmmfld.c. The 'scalar' product

   1/2 int int (E_1x H_2y - E_1y H_2x) dx dy

of two modes, indicated by subscripts 1 and 2. Note that this form is not positive definite.

lscalprod Defined in wmmfld.h, wmmfld.c. The symmetric form of the former product:

   1/4 int int (E_1x H_2y - E_1y H_2x + E_2x H_1y - E_2y H_1x) dx dy .

Nondegenerate hybrid modes should be orthogonal with respect to this product, as well as semivectorial and hybrid modes, if they belong to different symmetry classes.

Note that all integrals are evaluated analytically, as long as only WMM_Modes are concerned. Due to the ansatz of real mode field components, the products yield real results.


Arrays of modes:

In general, a mode analysis yields a set of guided modes, numerically represented by the WMM_ModeArray class, as defined in wmmarr.h and wmmarr.c. The parantheses operator () accesses the WMM_Mode-entries. WMM_ModeArray objects may be subject to copying and assignment. Among the members are:
num The number of modes contained in the array. The WMM_Modes in a WMM_ModeArray marr are marr(0), ..., marr(n), where n==marr.num-1.
clear Free the allocated memory. Note that the mode arrays may be quite large objects. This function is invoked at the beginning of each call to a mode analysis procedure.
add Enlarge the mode array by another WMM_Mode.
remove Delete a specified WMM_Mode-entry.
merge Merge the entries of another WMM_ModeArray. The added array becomes cleared.
sort Sort the entries with respect to propagation constants, highest first.
Save the entire information to a file, or retrieve it. read and write read or write information from/to an open FILE handle. The default versions access files 'wmm??.mar', where the questionmarks are replaced by the two character arguments. The files are in ASCII format and commented. To prevent the inclusion of comments for a reduction of the file size, comment the print command in the comment function in inout.c.
Paragraphs on further member functions can be found below, or in the section on interference visualization.


Mode interference:

Several interesting optical devices rely on the interference of modes inside a longitudinally homogeneous waveguide segment; consequently the WMM_ModeArrays include functions to simulate the guided wave propagation. While isolated modes can be treated on a completely real basis, the evaluation of mode superpositions naturally involves complex amplitudes, the harmonically z-dependent phases, thus complex numbers, as defined in complex.h and complex.c. The files matrix.h and matrix.c supply complex vectors and matrices.

Single waveguide segment:

Assuming that all modes belong to the same waveguide, the following procedures evaluate the superposition of the array's modes, at a certain propagation distance z, for given initial amplitudes at z=0. The functions are members of the WMM_ModeArray class, defined in wmmarr.h and wmmarr.c:
field One of the components EX, EY, EZ, HX, HY, HZ, or SZ of the interference field at a position (x, y, z). In contrast to WMM_Mode.field, here the return values obviously have to be complex numbers.
fieldmat A matrix of values of the interference field on a rectangular mesh of (x, y) positions at a specified distance z. Intended for visualization purposes, therefore the function returns a Dmatrix rather than complex values; the component identifier and an attribute for the desired information (one of MOD, SQR, REP, or IMP for the absolute value, the square of it, the real, or the imaginary part) are to be supplied as arguments.
fieldvec As above, but for a series of equidistant points along a line in the (x, y) plane at a fixed z distance.
The above functions compute evolutions of the individual mode amplitudes of
    ~exp(- i (beta + pert) z) ,
where beta is the actual propagation constant of the mode. The complex quantities pert (supplied as arguments to the procedures) provide an interface to first order perturbation theory, enabling to evaluate the propagation of the unperturbed mode profiles with shifted propagation constants. If no perturbation is present, the elements of the Cvector pert must be initialized by CC0.

Three segment couplers:

Frequently, one encounters an arrangement, where one or more well separated input waveguides are joined to a longitudinally homogeneous coupling segment of finite length, followed by one or more well separated output guides. One is interested in the power transfer characteristics. The MMI coupler considered in mmi.c is an example. A (basic) simulation of such a device starts with calculating overlap integrals at the first junction between the incoming field(s) and the modes of the coupling segment. These values are used as initial amplitudes to compute the interference fields at the end of the coupling segment. Calculating overlaps at the junction between the coupling segment and the outgoing waveguides yields the amplitudes for the modes of the output channels, or the output powers, respectively. See the section on 'waveguide junctions' in the survey for details.

The following functions (members of the WMM_ModeArray class, sources in wmmarr.h, wmmarr.c) take the WMM_Modes of the incoming and outgoing waveguides as arguments:
pweight Amplitude factors for the power evaluation. pweight computes the double overlap
    (Min | Mm)(Mm | Mout)
involving the input mode Min, the output field Mout, and the specified entry Mm of the mode array. (.|.) denotes the lscalprod.
Relative output power for a multimode coupler based on the array's modes. The two versions of iopower return either a double value for the power transmission through a device of specified length, or a Dvector for a series of devices. The evaluation of the overlap integrals may be time consuming, therefore using iopower for a sequence of device lengths is recommended, if applicable. writeiopower saves a curve of power transmission values versus device lengths to a file. Filename is '??pow??.xyf', where the first two questionmarks indicate the polarization, and the latter are supplied as arguments.
All involved modes are understood to be normalized with respect to this product (as put out from the mode analysis procedures). Applying iopower subsequently to different input/output configurations suffices, as long as only one input port is excited at a time. The code for ioprop exemplifies modeling the coherent illumination of more than one input guide.