User Input
The Lionbolt input file is intended to be structured with some degree of freedom. Besides the PROBLEM, there is absolutely no requirement on the order in which various headers are defined. However, ordering of duplicate subheaders does in general matter, and determines important properties of the solve, for one example, the order in which to transport particles (see the PARTICLES header), or the order in which slabs are stacked (see the MESH header).
Note the following generally:
The input file is case insensitive, except for material names, and partially so for particle names (see below).
Use # to make a comment in the input file.
Blank lines are not read, anywhere.
The number of spaces/tabs leading/following a line does not matter.
If using the Lionbolt submit script, then file paths in the input file can be absolute OR relative to the directory containing the input file itself (which can be useful). If they are not using the submit script, then as usual, the relative paths given in an input file must be relative to the directory from which the user is executing Lionbolt.
In the following guide, the keys which activate some option are listed first like KEY, but if the key demands variable inputs then they are listed afterwards like val1 val2 val3, then formatted like KEY val1 val2 val3. If the other inputs are fixed options, they will be denoted like [ opt1 | opt2 | opt 3 ]. Required options are designated with REQUIRED. Options that are required depending on a particular option are designated like REQUIRED IF : PROBLEM GENERAL.
Input Headers
PROBLEM
This key indicates the problem type to be solved by Lionbolt.
PROBLEM [ GENERAL | SLAB ]
PROBLEM [ GENERAL | SLAB ] REQUIRED
MESH
This header defines the mesh to use for the problem.
MESH
GMSH path/to/mesh/file.msh
TRANSLATE Tx Ty Tz
SCALE Sx Sy Sz
SLAB
THICKNESS T
ELEMENTS N
STRUCTURE [ LINEAR | LOGARITHMIC ]
MATERIAL mat
END
END
GMSH path/to/mesh/file.msh REQUIRED IF : PROBLEM GENERAL
TRANSLATE Tx Ty Tz
SCALE Sx Sy Sz
SLAB REQUIRED IF : PROBLEM SLAB
MATERIALS
This header defines the materials to be used in the problem. Note, the material definitions given here are entirely used to construct the cross section library with NittanyPhysics. If the user wants to provide their own cross section library (this is WIP as of now), they do not need a materials header, however they will still need to be careful with how the materials in their mesh definition relate to the materials in their provided library.
In general, the user should ensure that the number of materials specified here match up with the materials specified in the mesh, whether in a mesh file or in the SLAB subheaders in MESH.
MATERIALS
<MATERIAL NAME>
DENSITY rho
Atom NAtoms
END
END
<MATERIAL NAME> REQUIRED
ANGULAR
ANGULAR
PNSCATTERING L
END
PNSCATTERING L REQUIRED
PARTICLES
PARTICLES
<PARTICLE NAME>
PHYSICS [ PHOTONS | ELECTRONS ]
GRID [ LINEAR | LOGARITHMIC | EXPONENTIAL | Emin:Emax:G | fname ]
MIN Emin
MAX Emax
GROUPS G
ANGULAR [ SN ]
SOLVER [ GMRES | SI ]
NOSCATTER
END
END
<PARTICLE NAME> REQUIRED
BEAM
This block defines a beam, which is a particle source. Multiple beams can be specified by using multiple such blocks.
BEAM
PARTICLE IND
[ POLYCHROMATIC | MONOCHROMATIC ] [ FILE NAME | [ gs | ngs E0 dE ] ]
[ SPHERICAL | PLANAR ]
AXIS [ k0x k0y k0z | theta ]
ORIGIN R0x R0y R0z
CUTOUT [ RECTANGLE | CIRCLE | NONE ] p1 p2 ...
WEIGHT w
END
PARTICLE IND REQUIRED
[ POLYCHROMATIC | MONOCHROMATIC ] [ FILE NAME | [ gs | ngs E0 dE ] ] REQUIRED
[ SPHERICAL | PLANAR ] REQUIRED
AXIS [ k0x k0y k0z | theta ] REQUIRED IF : PROBLEM GENERAL
ORIGIN R0x R0y R0z REQUIRED IF : PROBLEM GENERAL
CUTOUT [ RECTANGLE | CIRCLE | NONE ] p1 p2 ... REQUIRED IF : PROBLEM GENERAL
WEIGHT w
POSTPROCESSING
Rather than use Terpdose to generate post-processing quantities like dose, one can generate them with Lionbolt and save them to the HDF5 output file. This can prevent a user from having to re-generate such quantities when using them within Terpdose (Terpdose will, when asked for a particular post-processing quantity, first check to see if it’s already been written).
POSTPROCESSING
FLUENCE
UNCOLLIDED
ENERGY
DOSE
CHARGE
END
FLUENCE
UNCOLLIDED
ENERGY
DOSE
CHARGE
OPTIONS
Options don’t live in any block. These are keys that can get picked up anywhere.
STORAGELIMITED
MEMORYLIMITED
DEBUG
STORAGELIMITED
MEMORYLIMITED
DEBUG
Example Input Files
Below, we give several valid input files which can give you some ideas about compatibilities and typical settings.
An input file that would allow the user to perform coupled photon-electron transport in water.
PROBLEM GENERAL
MESH
GMSH path/to/mesh/file.msh
END
MATERIALS
WATER
DENSITY 1.0 # g / cc
H 2
O 1
END
END
ANGULAR
PNSCATTERING 15
END
PARTICLES
PHOTONS
GRID 0.001:5.4:25
ANGULAR SN
SOLVER SI
END
ELECTRONS
GRID 0.001:5.4:50
ANGULAR SN
SOLVER GMRES
END
END
BEAM
PARTICLE 1 # The particle sourced by this beam is the first one listed in PARTICLES
POLYCHROMATIC path/to/linac/spectrum.txt
AXIS 0.0 0.0 -1.0 # Gives a beam pointing straight down the z-axis. Reference frame is that of the mesh.
ORIGIN 0.0 0.0 130.0 # Localizes the origin of the beam
CUTOUT RECTANGLE 100.0 10.0 10.0 0.0 # Cutout with its parameters
SPHERICAL # Point source, generates fluence radially outwards from the origin.
END
STORAGELIMITED
DEBUG
References
Jerry Battista. Introduction to Megavoltage X-Ray Dose Computation Algorithms. CRC Press, 2019. ISBN 9780367780517.
Yousef Saad and Martin H. Schultz. Gmres: a generalized minimal residual algorithm for solving nonsymmetric linear systems. SIAM Journal on Scientific and Statistical Computing, 7(3):856–869, July 1986. URL: http://dx.doi.org/10.1137/0907058, doi:10.1137/0907058.
Yousef Saad. Sparskit: a basic tool kit for sparse matrix computations. Technical Report, NASA Ames Research Center, Moffett Field, CA, 1990.