Tuesday, November 24, 2015

Quick Tutorial

To start quickly we assume that the user has a "epsilon.h5" file that contains mesh of the desired structure (see Tutorial - Making a dielectric function with MPB). Using MPB is one straightforward way of generating epsilon file, in FPC. Others methods (see an example here: Making a dielectric function using C++), can be used as well.

Installation

The user must install MPICH and g++ and fftw3 libraries to be able to use our software.
use these commands:

     sudo apt-get install g++

     sudo apt-get install libfftw3-dev

     sudo apt-get install mpich2



It is also recommended to install HD5, paraview and OCTAVE.
One can use these commands to install them:

     sudo apt-get install libhdf5-serial-dev

     sudo apt-get install paraview

     sudo apt-get install octave



Now the system is ready to run FPS. We provided executable files so the user doesn't need to compile any file which is very useful for users who are not familiar with programming and Linux.
To use FPS just copy the zip file into a folder of your interest. We recommend to use "home folder" because it is easier to work with it later. In this quick tutorial we assume that you copied the zip file to your home folder.
After copying the zip file, unzip it and don't change any file in the folder that is just created and called FPS.

First LDOS or DOS calculation
Copy a controller file which is provided inside FPS folder and is called "controller.h5" into the folder that you have your "epsilon.h5" file.

"controller.h5" has 14 sections that needs to be modified by the user:





1. CPU
Change it to the number of cores that you want to use for calculation. For example if you have 4 core machine and you just want to 3 of these cores for calculations then change the value of CPU to 3.
2. DOS_x
It only accepts 0 and 1. "0" means that you don't want to compute LDOS or DOS in "x" direction
3. DOS_y
It only accepts 0 and 1. "0" means that you don't want to compute LDOS or DOS in "y" direction
4. DOS_z
It only accepts 0 and 1. "0" means that you don't want to compute LDOS or DOS in "z" direction
5. LDOS_resolution
Declares the resolution in unit cell that you want to integrate LDOS in it.
6. PML_dist
Declares the distance between PML and the structure. If you were sure that the structure is big and you don't have evanescent wave leave it to zero.
7. center_wavelength
Declares the center wavelength of point dipole. For example if you want to compute LDOS in the range of [0,1] in reduced frequency it is recommended to choose center_wavelength=2.0.
8. delta_x
Is the minimum distance in the mesh that you used in epsilon.h5 file
9. lattice_constant
Is a constant value in meter that could be used in calculations. If you want to use reduced format you should choose lattice_constant=1.0.
10. resolution
Is the number of mesh points per lattice constant.
11. size
Is the size of structure in terms of mesh points.For example if the lattice_constant was 1.0 and resolution was 25 points per lattice constant then the size is
25*size_x
25*size_y
25*size_z


you can simply find these numbers in the "epsilon.h5" file.
12. time_step
Is the number of time steps that you want to use for calculation. We recommend 8000.
13. unit_cell_end
Coordinates of end corner of the unit area that you want to compute DOS.
14. unit_cell_start
Coordinate of start corner of the unit area that you want to compute DOS.


After modifying the "controller.h5" file all you need to do is opening a terminal window
going to the directory that you have both "epsilon.h5" and "controller.h5" files together, and then run the following command:

     ~/FPS/FPC

FPS package will do the rest automatically.

No comments:

Post a Comment