Parameters file
The parameters file allows the user to set the parameters of the finite-difference time-domain simulation.
Note the complete list of the parameters in FDTD++.
Creating the parameters file
The parameters file can be created using any text editor, and can be named by any name. In the FDTD wiki, this file will be assumed to have the name param
. This file should be placed in the work directory.
Declaring parameters
There are two types of parameters, flags and settings.
Flags
Flags are true/false values that control an aspect of the simulation. By default, all flags are false. In order to invoke a flag, a simple line is written to the parameters file as follows:
flag
where flag
is the name of the parameter, which sets the flag to true.
An example of a flag is xperiodic, which turns on periodicity along the $x$-direction. In this case, the following would be added to the parameters file:
xperiodic
Settings
Settings set the value of a given parameter. In order to set a setting, the following line is written to the parameters file:
setting value
where setting
is the setting that you wish to set, and value
is the corresponding value. Note that in the FDTD wiki, value
will often be replaced with #
or str
, depending on whether a number or string is expected, respectively.
As an example, to change the grid size in all directions ($x$, $y$, and $z$) to 0.5 nm, the following would be added to the parameters file:
dx 0.5e-9 dy 0.5e-9 dz 0.5e-9
Example
Example parameters files can be found accompanying the tutorials section.