Structure editor
Winfield has a structure editor with a graphical user interface. It can be used to visualize, define or modify structure files (MOF files) - including inclusions, holes, symmetries, user defined materials etc.
Contents
Launching the structure editor
In Winfield's Tools menu, select 'Edit structure'. This will open a new dialog box, with several tabs (note that there are more tabs than can be seen in one time; the arrow buttons at the top right of the tabs allow you to see the remaining tabs. If a structure was loaded (either from a bcf, fbb or structure file), the structure will be displayed, without fields (black background). The currently selected cylinder appears in red, others appear in white. Intersecting cylinders (that are not allowed) will appear in green. The zoom and viewport commands in the main dialog can still be used to redefine the viewport.
Common buttons
There are three buttons at the bottom of the dialog box:
- Ok
- Updates the structure to reflect any changes in the dialog
- Export
- Saves the structure to file (the button will open a File dialog to let you choose the file name). To use the saved structure in a simulation, use the
structure=filename.mof
keyword in your parameter file, where filename.mof is replaced by the file name the structure has been exported to.
- Cancel
- Closes the structure editor and reverts to the original structure.
Cylinder Tab
Here each cylinder in the irreducible sector of the current symmetry can be edited individually. Click in a cylinder to select it (it will be drawn in red). You may then change its cylindrical coordinates (r, theta), its radius, refractive index (enter a complex number or select a material from the drop down list), its order parameter (order of truncation of Fourier Bessel series), and select whether it be circular, elliptic or coated. If it is elliptic, Ellipse_radius_b and ellipse_theta define the ellipses second radius and angle respectively. If coated is selected, ellipse_radius_b defines the radius of the coating (inside the cylinder, Radius defining the outer radius of the cylinder including coating). When using symmetries, avoid editing theta of cylinders that are on an axis of symmetry, as this may lead to unwanted duplication of cylinders. Unless you know what you are doing, leave Representation on B.
Cladding Tab
The cladding tab is used to define the background refractive index or material, as well as the parameters of the jacket and cladding (radii, refractive index, Fourier Bessel order or 'gorder'). If No Jacket/no cladding is selected, most options are grayed out, and only the background index can be defined. In that case gorder should be set to 1, unless the structure will be used for Scattering simulations
Symmetries Tab
The type of symmetry to be used is defined in this tab using Symmetry properties drop down list. The irreducible sector of the currently selected symmetry can be displayed by selecting Show sector. This tab also hosts a tool for hexagonal lattice generation. Enter the number of (hexagonal) rings of inclusions to be generated, the pitch of the lattice, the radius and refractive index (or material) of inclusions, their order and click Create Lattice. Unless you know what you are doing, leave Representation on B. This will set the symmetry to C6v, generate a full hexagonal lattice, without defect in the centre, and readjust the viewport. To create a defect (eg a core in the centre), delete the appropriate cylinder using the cylinder deletion tool of the Tools tab. If you wish to modify the lattice in a non-symmetric manner, you can select a different symmetry in the Symmetry Properties drop down list after the lattice has been generated.
Tools tab
The tool tabs lets ou select what is done when you click on elements of the structure. 'Edit' will allow you to select a cylinder and then edit it in the Cylinder tab, as discussed above. When Delete is selected, clicking on a cylinder will delete it (remove it form the structure file). If Add is selected a new cylinder can be added to the structure, with refractive index and radius and order as defined on this tab. Avoid adding cylinders need axes of symmetry as usually this leads to unwanted duplicate cylinders. It is best to use the lattice editor to create cylinders near axes of symmetry. Again, unless you know what you are doing, leave Representation on B. When deleting, adding or editing a cylinder, all cylinders that are equivalent through symmetry are also automatically deleted/added/edited.
NOTE: There is currently a bug with the add function, leading the software to crash. It is best to leave the creation of cylinders to the lattice generator.
Global Editing Tab
This tab enables changes to be applied to all cylinders at once.
- Scaling Factor
- All dimensions of the structure are multiplied by scaling factor. Note this has not been tested for elliptical and coated inclusions.
- Radius
- Use this field and button to change the radius of all cylinders
- order
- Use this field and button to change the order property of all cylinders in one go.
- Representation option
- Use this field and button to change the representation option of all cylinders at once. Do only use if you know what you are doing.
- Refractive index
- Use this field and button to change the refractive index or material of all cylinders in one go.
User defined materials
This tab and its use are explained in detail here.