Invoking the mode solver:
The curves correspond to a broad multimode waveguide (QTM polarization, symmetrical and antisymmetrical fields), each minimum indicates a propagation constant. The minimum searching procedure begins with an initial survey of this function. Marching with constant stepsize backwards from the upper end of a specified interval of mode wavenumbers, the error function is evaluated for a usually coarse preliminary spectral discretization. Once a minimum in the error function is trapped (i.e. a smaller ordinate appears between two larger ones), the mode solver refines the spectral discretization in several steps and repeatedly fixes the location of the minimum. The process stops when a prescribed final spectral discretization density is reached; this discretization serves to compute the approximation for the propagation constant. If further modes are required, the initial survey continues until the entire interval is investigated.
The more general specifications are collected in a class WMM_Parameters, declared in wmm.h and preset in wmm.c.
If the mode solver seems to have missed a guided mode, one should at first take a look at the least squares error file (see below). The figure shown in the introduction of this page is an example. If no minimum appears at all in the region of the prospective propagation constant, try to refine the initial spectral discretization. If a minimum is visible which was not trapped by the mode solver, a slight alteration of the stepsize for the initial search procedure (i.e. slightly changing the ini_steps parameter) may help.
vform For vectorial simulations only:
Decides, whether the two transverse electric, the two transverse magnetic, or the two longitudinal mode components are employed as basic fields. All other components are derived from these two. Possible values are EXEY, HXHY, or EZHZ. The type Vecform is declared in maxweq.h. While in principle all formulations should be equivalent, the representation of the mode components by the trial functions differs in the three cases, and the results will be slightly different as well.
vform=HXHY is the most popular formulation and the default.
vnorm For vectorial simulations only:
Decides, which expression is used for normalization in order to compare two trial fields with respect to their least squares error. Integration of the sum of the squared values of two or three field components constitutes the normalization factor. These are the three magnetic components for vnorm=NRMMH, the three electric components for vnorm=NRMME, the two basic fields for vnorm=NRMMS, and the two longitudinal components for vnorm=NRMMZ. The type Vecnormmode is declared in wmm.h. Only NRMMH and NRMME have been found to be reasonable. Both values give almost identical results, vnorm=NRMMH is the default.
ccomp For vectorial simulations only:
Selects, which boundary conditions are directly incorporated into the least squares error matrices. The type Contcomp is declared in wmm.h. Possible choices are ccomp=CCALL, boundary conditions for all six mode components, ccomp=CCHXYZEZ, boundary conditions for the three magnetic components and the longitudinal electric component, or ccomp=CCEXYZHZ, boundary conditions for the three electric components and the longitudinal magnetic field. For an exact solution, the two restricted sets are equivalent to the full set of six components. While CCHXYZEZ, CCEXYZHZ are somewhat faster, and may yield results which are closer to the results of other mode solvers, the error in the mode field appears to be concentrated in the field components which are not directly incorporated (cf. the paper on the vectorial WMM) Hence ccomp=CCALL is the default.
Spectral discretization parameters for the initial survey process. These parameters correspond directly to quantities introduced in the first publication on the WMM.
Proper choices for these parameters depend on the waveguide structure under investigation. For a simple single mode waveguide, a coarse initial discretization
- ini_d_alpha is a kind of normalized stepsize for the selection of transverse wavenumbers. The lower this value, the higher is the density of the spectral discretization. Reasonable values are between 0.1 and 0.001.
- ini_N_alpha restricts the number of trial functions (for each type of trial functions, rectangle, and basic component ...). Reasonable values are between 8 and 30-50.
- ini_alpha_max limits the wavenumber interval allowed for combined exponential and harmonic trial functions. A larger value means that more trial functions with steep exponential decays are included. Reasonable values are between 2.0 and 4.0.
can be sufficient end efficient. Note that usually a certain spectral density is required for the minima to appear in the error function. Hence, to reveal the minima for all modes of a multimode waveguide, a finer spectral discretization
might be required.
ini_steps Number of equidistant steps to initially scan the effective index interval for minima. Reasonable values range between 10 and 100. Note that the stepsize must be sufficient to bracket all minima that are expected. A value of 10 should be sufficient for an effective index interval with only one guided mode in it, i.e. for a single mode waveguide. Choose at least a value of 50 for a multimode structure with error functions as shown in the example. ref_num
Parameters influencing the search refinement:
- ref_num is the number of refinement steps. Values between 1 and 10 are reasonable, 5 is the default.
- ref_exp serves as an exponent for the refinement of the search stepsize. Reasonable values lie between 1.0 and 10.0. A value of 1 means a linear decrease of the stepsize from the initial value, as given by ini_steps and the effective index interval, to the final value given by the tolerance for the propagation constant. ref_exp=4.0 is the default.
- ref_sdf defines the amount of spectral refinement in dependence of the number of the refinement step. Values are to be between 0.0 and 1.0. ref_sdf=0.0 means that the three spectral discretization parameters change linearly from the initial to the final values. With ref_sdf=1.0 this is a hyperbolic behaviour: the spectral discretization remains almost constant for the first steps but is refined steeply in the last few steps. ref_sdf=0.5 is the default value.
Spectral discretization parameters for finally fixing the propagation constant and for computing the mode profile. See the comment on the initial values for the interpretation and possible values. Usually, a final spectral discretization of
is sufficient to achieve state of the art accuracy in the propagation constant. These are the default values.
btol Relative tolerance for the approximation of the propagation constant. Do not choose this value below 1.0e-8 (minimum search for an almost square function with double precision). 1.0e-7 is the default. mshift Parameter to enforce numerical positivity of the least squares error. The default is 1.0e-10. Set this parameter to a higher value (1.0e-8) if the program should stop with a message like "matrix not positive". penfacTE
Weight factors for separating closely spaced modes. Preset by 1.0 in all matrix entries in order to have no effect. If the parabolic sections belonging to two different modes are almost superimposed in the error function, these factors can be used to force the mode solver to select one of them.
Do not access these parameters, unless there are problems with superimposed modes.
- For semivectorial calculations (only one of penfacTE or penfacTM is relevant):
A factor larger than 1.0 on some selected rectangles prefers a mode which shows a large amplitude in this region.
- For vectorial calculations:
A larger factor for one polarization can enforce the mode solver to prefer a mode with the corresponding polarization character.
The basic mode analysis procedures are declared in wmm.h:
The procedures write log information to the terminal output. All evaluations of the error function are recorded in a file "???sev??.xyf" as well, where identifiers for the type of mode analysis fill the free places in the filename string.
performs an entire mode analysis as described at the top of this page. The procedure returns the number of found modes, and fills the WMM_ModeArray argument with the corresponding WMM_Modes.
attempts to find the guided mode in the effective index interval with the largest propagation constant, typically the fundamental mode of the waveguide. Return value is the number of found modes (0 or 1). The first entry of the WMM_ModeArray argument gives access to the mode information.
evaluates the error function only, without trying to trap a propagation constant. May be applied to get an idea of the shape of the error function, or for diagnosis purposes.
Apart from the Waveguide under investigation and the list of WMM_Parameters, there are a few more parameters which are directly connected to the simulation task. They are supplied as arguments to the mode analysis functions.
pol An argument of type Polarization as declared in maxweq.h. Defines the type of simulation and the polarization of the output modes:
semivectorial simulations, TE polarization. Ex is set to zero, Ey is used as the basic field component.
semivectorial simulations, TM polarization. Hx is set to zero, Hy serves as the basic field component.
vectorial simulations. Both transverse directions are treated alike, there are no assumptions about the polarization of the output modes. Note that simulations of these type require much higher numerical effort than the semivectorial calculations, and that problems due to almost degenerate modes are more likely to be encountered.
sym An argument of type Symmetry as declared in maxweq.h. Defines the symmetry with respect to the x-z-plane which is assumed for the calculation and for the output modes.
- sym=SYM or sym=ASY:
Mode analysis with prescribed mode symmetry y -> -y. Corresponding coefficients of the two basic fields are identified. The interpretation depends on the Polarization:
The argument denotes even (SYM) or odd (ASY) symmetry of the basic Ey field.
The argument denotes even (SYM) or odd (ASY) symmetry of the basic Hy component.
sym=SYM enforces even symmetry for the mode components Hx, Ey, and Hz, and odd symmetry for Ex, Hy, and Ez.
sym=ASY enforces even symmetry for the mode components Ex, Hy, and Ez, and odd symmetry for Hx, Ey, and Hz.
No assumptions about mode symmetry. The number of unknowns is twice as large as for a simulation with prescribed symmetry, requiring a much higher numerical effort.
The interval that is to be investigated for effective mode indices. A value of 0.0 for one of these parameters indicates that the default values for the waveguide under investigation are to be used:
In some cases the choices are wrong (there are guided modes with lower effective indices) or ineffective (the interval is much too large). Usually a better initial guess can be based on the viewpoint of the effective index method: For a planar-like structure, choose the maximum of the effective mode indices of the outermost left and right slices for nmin, and the maximum of the effective mode indices of all slices as nmax, both times for proper polarization.
is the maximum refractive index of the guiding structure.
is the largest one of the refractive indices on outer, unbounded rectangles, which are smaller than the maximum refractive index.
Note that the mode solver itself is not able to decide if the field belonging to a minimum in the error function is an approximation of a physically real guided mode or not (these minima may well appear in a 'forbidden' region of small effective indices). Even the effective index viewpoint is sometimes ambiguous. However, the question "guided or not" can often be decided by inspection of the mode field: if the profile shows pronounced amplitude maxima in the regions of one of the outermost rectangles, the field should probably be discarded.
Filename identification chraracters for the least squares error log file. Confer the previous remarks on filenames.
The (stderr) output stream of the mode analysis procedures contains the following parts:
The stderr output stream receives further data by file input/output operations (indicated by double brackets << >>), including explicit data on propagation constants, effective indices and filenames. You may find it convenient to collect this information by redirecting the output to a file.
- A header displaying actual values of the mode analysis parameters:
Polarization, symmetry, the options for vectorial calculations, the spectral discretization parameters, the options for the searching procedure, geometrical information about the waveguide under investigation, the vacuum wavelength and wavenumber, and the interval for effective mode indices.
- The name of the log file.
- A sequence of lines showing the mode solver progress. Lines of type
name the current total number of unknown coefficients in the mode field representation. Lines of type
[c] (13.91759326) --> 1.587047445
report on a single evaluation of the least squares error. The number in parentheses is the trial value for the propagation constant, while the arrow points to the corresponding mode profile error. The letter in brackets indicates the current state of the searching procedure:
- [l], [c], or [r]:
The initial survey phase. A spectral discretization is computed for the central value [c], applied to a slightly smaller [l] and a larger trial value [r]. If the corresponding errors bracket a minimum, the mode solver switches to
- [-], , or [+]:
The refinement phase. The spectral discretization is repeatedly refined, assuming that the best approximation to the propagation constant lies always at the bottom of the parabola, which the three points define.
The spectral discretization has reached the final density. The mode solver locates the minimum up to the desired accuracy.
The propagation constant is already fixed, the coefficients of the expansion are calculated to assemble the mode profile (this requires to compute an eigenvector of the least squares error problem and may take a bit longer than the former steps).