Modes
and mode arrays

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: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.
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 xzplane. 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:
npcB=(neff^{2}n_{min}^{2})/(n_{max}^{2}n_{min}^{2}), where n_{min} and n_{max} 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/µm^{2}, respectively. Note that the electric and magnetic fields associated with the guided modes are
and
, where 'c.c.' denotes the complex conjugate of the preceding term, with real fields E_{x}, ..., H_{z}. 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
evaluates to P = 1 W. ampfac enters the results of all methods, which access the mode profile.
minE, maxE
minH, maxH
minS, maxSFor visualization purposes: minimum / maximum electric and magnetic field amplitudes (with respect to the x, y, and zcomponents), and the extremal values of the Poynting vector (zcomponent). Roughly estimated for the normalized mode profile. totpower
tepower
tmpowerThe 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 = ,
tmpower = ,
totpower = . polcharacter Polarization character of a hybrid mode, between 0 and 1. A value close to 1 indicates a TElike mode. Depending on the charargument, the function returns one of the following ratios:
'E': ,
'H': ,
'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 xyplane. Confer the code for the guided power evaluations as an example. May be useful for evaluating perturbation theory integrals. horlineint
verlineintIntegrate a product of two mode components (EX, ... , HZ) along horizontal or vertical lines in the xyplane. 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 xyposition of the intensity maximum, and to the average 1/e^{2} extent in the x and ydirections. 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. read_def
read
write_def
writeSave 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.
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: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.
ovlp Member function of a WMM_Mode, declared in mode.h, source in mode.c. Computes the overlap
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 xyplane. scalprod Defined in wmmfld.h, wmmfld.c. The 'scalar' product
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:
. 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.
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_Modeentries. WMM_ModeArray objects may be subject to copying and assignment. Among the members are:Paragraphs on further member functions can be found below, or in the section on interference visualization.
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.num1. 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_Modeentry. merge Merge the entries of another WMM_ModeArray. The added array becomes cleared. sort Sort the entries with respect to propagation constants, highest first. read_def
read
write_def
writeSave 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.
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 zdependent 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:
The above functions compute evolutions of the individual mode amplitudes of
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.
~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:
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.
pweight Amplitude factors for the power evaluation. pweight computes the double overlap
(M_{in}  M_{m})(M_{m}  M_{out})
involving the input mode M_{in}, the output field M_{out}, and the specified entry M_{m} of the mode array. (..) denotes the lscalprod.iopower
writeiopowerRelative 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.