BlasterSim uses Fortran namelist format input files. Namelist files are broken into groups and variables. A group starts with the & symbol, then the name of the group, and contains one or more variables which themselves are the actual input data. A group ends with the / symbol. For example, in the example namelist input file below, see that group1 group contains the variables a, b, and c. a is an integer, b is a floating point number (decimal number), and c is a string (which must be quoted). A namelist file can contain multiple groups. The example below has two groups, group1 and group2. Comments can be added with the ! symbol. Comments can take up an entire line as in the group1 namelist below, or be placed at the end of a line as in the group2 namelist below.
For more details of the namelist format, refer to the Intel Fortran Compiler documentation [4].
BlasterSim uses metric units in its input files and internally. Support for other unit systems is not planned due to the complexity of supporting multiple unit systems. Scientific notation can be used to appropriately scale inputs. For example, instead of 13 mm being written as 0.013, the user can write 13.0e-3. When possible, I try to pick metric units that are convenient for each variable so that scaling is unnecessary. This is not possible for lengths as BlasterSim is intended to work for a range of gas gun systems, from small pellet guns all the way through potato cannons. Given the wide range of scales, for lengths the unit of m was selected, and the e notation previously mentioned can be used so that the user can select the appropriate scale.
Because the namelist file format is part of the Fortran standard, the reading of the namelist files is a built-in feature of a Fortran compiler and not something that BlasterSim has complete control over. Some error messages from bad namelist input files may be unclear, but are unfortunately beyond the control of BlasterSim. For example, in the gfortran compiler BlasterSim’s releases use, you might see an error message like “Bad real number in item 5 of list input”. Note that this says item 5, not line 5 of the input file. It is referring to the 5th variable declaration. In the example namelist input file in this section, this would correspond to the y variable, and the user is going to have to fix something with the number format in y.