Next: , Previous: Tutorial, Up: Tutorial


4.1 Quickstart

In this section, it is assumed that you have installed both the Nero2d solver and the wxGBTool. We refer to Installation instructions for Nero2d and Installation instructions for wxGBTool for a detailed discussion about the procedure.

We assume that you have installed both wxGBTool as Nero2d into the same folder. This folder contains a few subdirectories:

     bin/
     lib/
     share/benchmark
     share/examples
     share/info
     share/config

The compiled Nero2d and the downloaded/compiled wxGBTool binaries can be found in the bin/ directory.

     bin/nero2d
     bin/wxgbtool

It might by useful to add the bin/ directory to the PATH environment, so Nero2d and wxGBTool can be called from other directories.

We will start by running a pre-created example:

     cd share/examples/example1
     cp ../../config/config.dat .
     nero2d example1.igf

which will invoke the nero2d solver and start the simulations. After a few minutes, the simulation will end. Congratulations, you have just run your first simulation.

The example1.igf is the so-called input geometry file (.igf) which contains the geometrical layout of the scene, the illumination, and the required output. The file is created using the wxGBTool.

Nero2d requires a second input file, namely the configuration file which is always called config.dat. This file contains a set of parameters which determine to a great extent, the performance of Nero2d. This file needs to be present every time the Nero2d solver is invoked. Note that a default config.dat file in the share/config folder has been created for your convenience. This file can serve as a starting point for future modifications. Its default settings are conservative, but they will suffice for non-extreme simulations.

Note that if everything went right, the simulation has generated the bitmap0_sc.bdf and bitmap0_in.bdf files as output. These files contain the scattered and incoming fields respectively that resulted from the simulation.

Before ending this quickstart and starting a more detailed discussion about the possibilities of Nero2d and wxGBTool, let us convert this output file to a bitmap so that we can have a look at what we have just simulated.

Start by launching wxGBTool in a Unix desktop environment like KDE

     bin/wxgbtool

Open the example1.gbt located in the share/examples/example1 directory. Two circles and a rectangle will appear in the leftmost screen.

In the `Output box', located on lower right part of the main screen, press the `Create BMP' button. A dialog screen will appear. Press the the `...' button corresponding the `incident field' input file and select the bitmap0_in.bdf file that was generated by nero2d. Do the same thing for the `scattered field'. As example1 is a TM (Transversal Magnetic) simulation, select the output for the Ez component (the electric field perpendicular to the desktop screen). Fill in a value of `1500' for `Red' and press the `Create BMP' button. A dialog will appear in which you can enter a filename for the resulting output .bmp file, e.g. example1.bmp. This file can then be viewed using your image viewer of choice

     display example1.bmp

Note that you can repeat the same procedure with the second example example2.gbt and example2.igf which are located inside the bin/examples/example2 directory. Note that the second example will also produce the bitmap0_in.bdf and bitmap0_sc.bdf files.

You can again create a bitmap from the *.bdf file. Make sure to enter a value of `1' for `Red'.