UM 2p3
Up to to user manual index page
Return to installation instructions
2.3 Getting started: a first simulation
In what follows we will assume that you have installed the FIBRE software package success- fully according to the instructions, and that you have unzipped the samples.zip file.
In the windows Start menu, find the CUDOS MOF Utilities directory and click on Fibre Console Prompt: This opens a command line window with current directory set to your ’My CUDOS MOF Files’ folder.
Change the directory to the directory containing the first sample parameter file by typing
cd sample\simple hexagon <Enter>
Now type in
fibre <Enter>
This runs the simulation, using the parameters described in the parameter.txt file of the current directory. After a few seconds a message will inform you that the simulation terminated successfully.
The simulation you just run consisted in finding the fundamental mode of a simple structure with a single ring of six holes in silica.
If you look at the “My CUDOS MOF Files\samples\simple hexagon” directory with eg Windows Explorer you will see that 12 new files were created through the simulation, among which two .bcf files, and two .fbb files. These contain the Fourier-Bessel coefficients of the modes found by the simulation. Right click on either of those files and select “high res open” in the contextual menu: The WINFIELD software opens the corresponding file, and you will now see the structure for which the fundamental mode was computed, along with the distribution of the axial component of the Poynting vector. At this stage you should play around with the different controls of WINFIELD to become familiar with the different settings.
2.3.1 The input and output files
Now let’s have a look at the other files in the folder: the first two files always have the same names, regardless of the simulation:
parameters.txt:
This text file, the parameter file, is the input file which was initially in the folder, and which
was used by FIBRE to build the fibre structure, define the various parameters (eg wavelength)
and run the simulation.
errors.txt:
This text file contains comments, warnings and errors which might have occurred while read-
ing the parameter file, building the fibre structure or running the simulation. This file is useful
when debugging a parameter file.
The following file will usually be called progress.txt, unless you explicitly rename it in the parameter file:
progress.txt:
This text file contains information on the progress of the simulation. It is useful when running
a long simulation to check what the program is currently doing.
The remaining files will have different names at each simulation. They contain the results of the simulation.
symhex.txt:
This text file contains the definition of the fiber’s structure. In this example, the structure
was compiled from basic fibre parameters (pitch, hole diameter, number of rings of holes,
refractive indices etc.) contained in the parameter file, and the resulting structure was written
to symhex.txt. Alternatively the structure to be simulated can also be defined directly in a
structure file, in which case the structure file becomes an input rather than an output file.
symhex_results.txt
This text file contains an exhaustive list of all actual parameters used for the simulation. These include the parameters defined in the parameter file, but also the default parameters which don’t need to be defined in the parameter file, or which have been automatically ad- justed by the program. It also contains information on all modes found, and on various events occurring during a simulation. We will call this file the result file, it is an important file to keep track of the details of what was done during the simulation.
symhex_C03_det.bin
symhex_C03_det.log
These two files contain the initial determinant map computed by the program to find the
modes. The .log file is a text file and can be read with a text editor or easily imported to third
party plotting software. The .bin file is a binary file containing the determinant map in full
precision and is used internally by the FIBRE software to avoid computing the determinant
map twice when it can be avoided.
symhex_mode_table.txt
This text file summarizes information on all modes found during the simulation. Each line
corresponds to one mode, and shows the mode’s symmetry class, ordinal number, complex
effective index, as well as the magnitude of the smallest and second smallest eigenvalues
from the eigenvalue decomposition which has given the mode.
symhex_skipped_minima.txt
This file contains the values of the effective index at which a secondary minimum of the
determinant map was found but not refined during the simulation. This file is often empty
and is rarely used, we will see when and how it can be useful in a next version of this
documentation.
symhex_L0000C03M001.fbb
symhex_L0000C04M001.fbb
symhex_L0000C03M001.bcf
symhex_L0000C04M001.bcf
These files contain the Fourier Bessel coefficients of each mode found. The .fbb files are
binary files which can only be read by the WINFIELD software, whereas the .bcf files are text
files. You can have a look at the latter to see the magnitude of all Fourier Bessel coefficient
files. WINFIELD can read the .bcf files as well, but only if they are in the same folder as
the original structure file, whereas .fbb files are stand-alone files, they contain the full set of
parameters related to the mode, including the structure of the file.
2.3.2 A closer look at the parameter file
Double click on parameters.txt to open the parameter file with your default text editor. The first thing you will see are a few lines of comments, explaining the purpose of the file. In a parameter file, comments start with an exclamation mark character and end by a new line. After the comments, the parameter file defines the structure: the first line which doesn’t start with an exclamation mark and which hence is not a comment, starts with
pitch=6.75d0
followed by an exclamation mark introducing further comments. The above example shows the format of a class of instructions used in a parameter file, the definition statements:
keyword=value
The keyword is separated from its arguments through an equal character. Depending on the keyword, value has to be real, complex, integer, logical or a character string. The list of keywords and acceptable values is given in Section 2.5.
In the above example, the keyword pitch designates the center to center distance be- tween the inclusions of the fibre. Note that the value, 6.75d0, is real; the d between 6.75 and 0 is equivalent to the usual ’e’, or ’times ten to the’ in scientific notation. You may use ’e’ or ’d’ indifferently, or omit the exponent. Further, no unit of length is given, this is because of the scale invariance of the problem. However, when material dispersion is taken into account all dimensions are assumed to be expressed in micrometers, so the safest is to assume that all dimensions are always expressed in micrometers.
The next line shows an example of a keyword with a complex argument
cylinder index=(1.d0,0d0)
This statement assigns the complex value 1.0 + i× 0 to the keyword cylinder index, which sets the refractive index of all inclusions. As you can see, a complex value is expressed in the standard notation (real part,imaginary part). It is, however, not acceptable to use a real notation when a complex value is needed, even if the imaginary part is naught: the statement
cylinder index=1.d0
is not acceptable, it will not cause an error, but it will add a random imaginary part to the real value.
The following two lines are self-explanatory (for details see the keyword list), we skip our comments until the lines
Nr=1 MNr=1
These statements define the number of rings of inclusions the fiber should have around the core, and the size of the core, we will explain them in more detail later. However, note that they are examples of keyword taking integer arguments.
The next two lines,
no cladding no jacket
are examples of definition keywords not taking any argument. They tell the program that the fibre should not be surrounded by a cladding or a jacket, so that the inclusions are in bulk material extending to infinity.
The next statement,
build fibre
is somewhat different from the ones we have seen so far: instead of giving the program information, it asks the program to use the previously defined parameters to build the fibre, ie to compile the inclusion sizes, refractive indices and distances into a complete structure. We will call such keywords action keywords. This statement ends the structure definition block. While useful for this example, defining a structure of the fibre within the parameter file is no longer recommended. Instead, it is recommended to use Winfield's graphical structure editor.
The next block defines the remaining physical parameters. In the example we’re considering the only remaining parameter is the wavelength, defined by the line
lambda=1.45
The next two statements are action keywords asking the program to adjust remaining parameters automatically:
suggest n_eff range=fundamental suggest order=close cylinders
The first line asks the program to estimate the range of effective indices where the fundamental mode should be. The action keyword used takes an argument, separated by an equal sign (=), indicating which mode we are interested in. When fibre will look for modes, it will compute a map of the determinant over the estimated region and refine all minima found in that region to find the modes. The second line asks fibre to estimate the order of truncation of Fourier Bessel series according to wavelength, structure and the previously estimated range of effective indices. The action keyword used here takes an optional argument, here '’close cylinders’', indicating that the inclusions are relatively close to each other. Again, while the above two keywords make for a simpler first example, their use is not recommended. Instead an explicit range of effective indices should be defined using n_eff_0, and order should be defined in the structure file.
The next line consists of an action keyword telling fibre to save the compiled structure into a file.
save fibre=symhex.txt
The file name is given as a character string argument, separated from the keyword by an equal sign. When compiling a fibre structure from geometric parameters indicated in the parameter file, one should always save the structure using ’save fibre’; failing to do so will cause FIBRE to save the structure in an arbitrary file named ’INTERNAL’ without any file extension. However, once again, it is not recommended to define structures using geometric parameters within the parameter file, but instead to load a structure defined in winfield's structure editor. When doing so there is no longer need to use the save fibre keyword.
We now reach the line
search modes
This action keyword tells fibre to start the simulation, using all previously defined parameters.
Finally, the last line of the parameter file
end
marks the end of the parameter file, and causes the program to exit. Any lines after an end statement are ignored. Now that you have seen a basic example of parameter file, you might want to change the parameter file and run for example simulations for a different structure.