OpenMaXwell Reference Manual

Home  General  Menues  Dialogs  Movie Directives  Formula Interpreter  File Structures

2D points    3D Objects    3D Points    Boundary    Cursor position    Data for selected object    Domain    Expansion    Field    Field components    Field formula    Field tubes    Function    Generate expansions along 2D boundary    Generate expansions for 3D objects    Grid formula    Grid transformation    Info and movie directives    Insert    Integral    Modify 2D expansions    MMP    Movie    Open GL window    PET basis    PFD (predefined FD)    Project     Space, plane, arrow, or point    Tools and draw    Transformation data    Window

Generate expansions along 2D boundary Dialog

To open this dialog, press the 2D boundary… button in the Generate expansions group of the Expansion dialog.

Three different procedures have been implemented: 1) a simple one that generates expansions at a fixed distance from the boundary, 2) a more complicated one that tries to move expansions closer to the boundary where the curvature is high, 3) a sophisticated routine, implemented by Esteban Moreno, that is recommended for most situations.

All procedures copy the expansion specified in the Use data of expansion box and move its origin to the desired locations along the boundary specified in the Bound. box. When Bound. is 0, all boundaries are used. When Bound. is negative all boundaries from 1 up to the absolute number defined in Bound. are used. Usually, the specified expansion should be a dummy expansion (i.e., its object number specified in the Expansion dialog should be negative) of the type 2D multipole. For axisymmetric problems, this expansion may also be a 3D ring multipole. Setting an appropriate default expansion in the Expansion dialog and appropriate values in the Bound. and Use data of expansion boxes is sufficient for generating reasonable sets of expansions in most cases. Modifications of the default values in the remaining boxes of this dialog are only required in tricky situations.

Although the sets of expansions that are generated automatically might be useful without any modifications, you should carefully check the expansions that were generated. Often you may easily obtain an improvement by manual adjustments.

Select the domain number, the color number, and the connection flag of the expansions to be generated in the boxes Dom. , Col. , and Con.. When the color is set to –1, the color of the boundary will be used. When it is set to –2, the corresponding domain colors will be used. When Con. is set to –32001, the connection flag of the boundary will be used. You may also set a domain number. If it is set equal to zero, expansions for both domains to the left and right hand side of the boundary will be constructed. Otherwise, only expansions for the specified domain number will be constructed.

Since you often want to remove all expansions that were automatically generated along a boundary, it is reasonable to specify a color that is not used for any other expansion. You then may press the Delete color button to remove all expansions with the color specified in the Color box. Similarly, you can remove all expansions with a certain connection flag by pressing the Delete conn. button.

The way how the expansions are placed is mainly defined in the boxes Multipoles/domain, method, Splines, Dmin/D, Dmax/D, and Rfact, threshold.

The newest routine is called when Splines is negative the older routines are described below.

When Splines is negative, -Splines points Pk are distributed uniformly along the boundary specified in the Bound. box. Then distances DkLeft and DkRight are computed for each point Pk as follows:

  1. In the first point P1, the distances D1Left and D1Right and in the last point Pn, the distances D1Left and D1Right are set equal to D first and D last in the Left side parameters and Right side parameter groups respectively.

  2. Moving from P1 forward and from Pn backward, the distances are set in such a way that they are continuously increased by dd=ds*tan(Angle), where ds is the distance between neighbor points on the boundary and Angle is specified in the corresponding boxes in degrees. Note that good results are usually obtained for angles between 5 and 30 degrees. The distances are no longer increased as soon as Dmax/D is reached. Distances smaller than Dmin/D are set equal to Dmin/D.

  3. Based on the local radii of curvature (estimated from each point and its neighbors), the distances are reduced to Rfact times the radius of curvature. This is only done when 0<Rfact<1. Setting Rfact outside this interval is not reasonable. Good results are obtained for 0.2<Rfact<1. For small values of Rfact many multipoles may be generated.

  4. Since abrupt changes of the distances may lead to bad results, the distances are smoothened in such a way that the differences of the distances are never bigger than dd. Remember that dd is controlled by Angle.

  5. If Multipoles/domain, method is negative, the distances to the left and right hand side of the boundary are set equal to the smaller of these two values. This can make sense when strong skin effects occur, for example, in plasmonics.

  6. When symmetry with respect to the xz or yz plane (see Project dialog) are specified, the multipoles should be placed only on the positive sides of these planes (e.g., y>0 for symmetry with respect to the xz plane). Therefore, the distances are reduced accordingly. For safety reasons, the steps

  7. The steps 3.-6. are repeated n times, where n is the absolute value of Multipoles/domain, method. It is recommended to set not too high values of n in order to avoid long execution time.

  8. Lines are plotted to visualize the distances.

  9. Multipoles are placed along the boundary in such a way that their distances from the boundary are equal to the distances computed above and that the distances between the neighbor multipoles are similar. The density of multipoles is controlled by the values specified in the Factor boxes. Reasonable Factor values are close to 1.4 (sqrt(2)). Smaller values lead to higher multipole densities!

For some open boundaries, you may wish not to place multipoles near the start and end points. In order to do this, specify positive values in the Density boxes in the Left side parameters and Right side parameter groups. "Left side" specifies the distance from the start point and "Right side" specifies the distance from the end point. Note that the sum of these two values must be smaller than the boundary length. All expansions set will have the properties (namely orders) of the expansion prototype that must be defined before running the generate multipoles routine. Remember that the number of the corresponding expansion is specified in the Use data of expansion box.

Note that further improvement of the multipoles generated by this routine may be obtained with the BALance routines (see Modify 2D multipoles dialog). This also holds for the old routines described in the following.

When Splines is positive, different (older) routines are called as follows:

When Multipoles/domain, method is positive, as many expansions as specified in this box will be generated for each of the two domains to the left and right hand side of the corresponding boundary, except for PEC domains that require no expansions. The expansions are uniformly distributed along the boundary. The distance of the origins from the boundary is constant. It is computed from the highest curvature. To increase the distance, increase the value in the Rfact, threshold box.

When Multipoles/domain is negative, the number of expansions is not fixed, the distribution is non-uniform and the distance from the boundary is also non-uniform. The higher the absolute value of Multipoles/domain, method, the more expansions will be placed. The distance of each expansions from the boundary may vary from Dmin to Dmax. These values are specified in the boxes Dmin/D and Dmax/D , where D is the distance obtained from the curvature. Rfact, threshold plays the same role as for the generation of uniform expansion sets.

To get familiar with the expansion generation routines, try the default parameters first, select a color number that is not used for other expansions and press the Generate !! button to let OpenMaXwell generate a set of expansions. Check the expansions, delete them by pressing the Delete color button, modify some parameter in the Multipoles/domain, method , Dmin/D , Dmax/D , or Rfact, threshold box, and watch how the expansion distribution is affected.

A slightly modified version of Esteban Moreno's expansion setting routine is used when the method 0 is selected in the Multipoles/domain, method box. It generates a set of expansions along the selected boundary (Bound. box) in a distance between Dmin/D and Dmax/D from the boundary. Note that  for this procedure D=1 is set for Dmin, whereas D is set equal to the wavelength inside the corresponding domain for Dmax, i.e., Dmin/D  indicates an absolute distance, whereas Dmax/D indicates a distance in wavelength units. To set the expansions, auxiliary curves defined by spline points are constructed along the boundary. The routine tries to construct smooth auxiliary curves that are the closer to the corresponding boundary the smaller the radius of curvature is.

The number of spline points for the auxiliary curves is defined in the Splines box. This number should be bigger than 1. Otherwise, the number of spline points of the corresponding boundary (see Boundary dialog) is used. If this number is also less than 2, the default value 1000 is set. Small numbers of spline points may cause problems in the regularization. In this case, warnings are displayed in the Info window, for example, "It is not possible to regularize. Increase number of spline points". If such warnings are displayed, check whether the expansion set is acceptable for you. If not, delete all expansions that were generated (Delete color button), increase the number of spline points and generate the expansions once more.

The parameters in the Factor boxes in the Inside parameters and Outside parameter groups control the distances of the expansions from the boundaries with respect to the curvature. When R is the radius of curvature, the expansions are set at the distance R*Factor - provided that the distance is within the range Dmin/D - Dmax/D. Special problems occur when the curvature changes abruptly and when the radius of curvature becomes large. The procedure tries to vary the distance of the expansions from the boundary smoothly also in this case and modifies the values R*Factor accordingly by interpolating. To distinguish between small and large radii of curvature, a threshold may be defined in the Rfact, threshold box. Furthermore, the expansions are set in such a way that the angle between the auxiliary curve and the boundary is limited by the value (in Degrees) specified in the Angle boxes in the Inside parameters and Outside parameter groups.

When the boundary is open, the user can set the initial distances of the expansions from the boundary at the first and last points of the boundary, to the left and right hand side of the boundary in the boxes D first and D last in the Left side parameters and Right side parameter groups.  For getting started, set the values in these boxes equal to zero. In this case, default values are set that are often appropriate. The description of the threshold and of the distances at the first and last points of open boundaries would be difficult. To get experience with these parameters, try different threshold values within the range from minimum radius of curvature to maximum radius of curvature of the boundary, different values of the distances at the first and last points of open boundaries, and have a look at the resulting sets of expansions.

Depending on the material properties on both sides of the boundary, the numbers of expansions generated on the left and right hand side may be quite different. In order to obtain more balanced results you may wish to increase or decrease the expansion density on one side of the boundary. For doing this, modify the Density box in the Left side parameters or in the Right side parameter group respectively. Note that higher expansion densities increase the condition number of the MMP matrix. This may reduce the numerical accuracy of the matrix solver. As long as the matrix solver does not run into numerical problems, the accuracy of the results should be improved when the density of expansions is increased.

Especially when the excitation is a point source close to a boundary, it may happen that the automatically generated expansions are inappropriate near the excitation. In this case, you can save the error and field value data on a function file (Press Write errors… in the MMP dialog.) after a first MMP computation. Then you can read the file (Press Write errors… in the MMP dialog.) into the function array and use this data to influence the expansion setting routine. In the Weight function arg. Box you specify the argument number of the function array that shall be used for the weighting procedure. This procedure is also affected by the value in the Exponent box. For details consult the Tutorial.

 

Responsible for this web page:  Ch. Hafner, Computational Optics Group, IEF, ETH, 8092 Zurich, Switzerland

Last update 17.02.2014