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.

  • Use # to make a comment in the input file.

  • Blank lines are not read, anywhere.

  • The number of spaces/tabs following a key does not matter.

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 : PROBLEM GENERAL.

Input Headers

PROBLEM

This key indicates the problem type to be solved by Lionbolt.

PROBLEM [ GENERAL | SLAB ]

PROBLEM [ GENERAL | SLAB ] REQUIRED

GENERAL indicates to perform a full, 5D phase space solve (3D geometry, 2D angular space), while SLAB indicates to perform an infinite slab, 2D phase space solve (1D geometry, 1D angular space).

MESH

This key defines the mesh to use for the problem.

MESH
    GMSH         /absolute/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 /absolute/path/to/mesh/file.msh REQUIRED IF : PROBLEM GENERAL

Specifies a 3D mesh. /absolute/path/to/mesh/file.msh specifies the absolute path to the file. To understand how to construct the mesh file, such that you can specify the beam, index material domains, etc., see the Creating the mesh section in the Quickstart page. To understand how to define the materials themselves, see the MATERIALS.

TRANSLATE Tx Ty Tz

Translates the user’s mesh, with translation vector Tx Ty Tz.

If both TRANSLATE and SCALE keys are present, translation is applied before scaling.

SCALE Sx Sy Sz

Scales the user’s mesh, with scaling vector Sx Sy Sz.

If both TRANSLATE and SCALE keys are present, translation is applied before scaling.

SLAB REQUIRED IF : PROBLEM SLAB

This subheader is used to specify a slab to be used in the solution. Importantly, multiple slabs can be stacked, and their thicknesses, mesh structure, elements, and material specifications will be used to construct the individual slabs.

THICKNESS T REQUIRED

Thickness of this slab.

ELEMENTS N REQUIRED

Number of mesh elements in this slab.

STRUCTURE [ LINEAR | LOGARITHMIC ] REQUIRED

Spacing of the mesh elements. Linear gives linearly spaced mesh elements, logarithmic gives logarithmically spaced elements (more elements at shallower depths).

MATERIAL mat

Index of the material for this slab. To understand how to define the materials themselves, see the MATERIALS.

By default, it a material index is not provided, material 1 is taken.

MATERIALS

This key 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 (WIP), they do not need a materials header.

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

The user-defined name for a material, used for certain printouts. Spaces are allowed. Case is respected.

Any number of material subheaders can be provided, as long as they match up with the number of materials specified in the mesh.

DENSITY rho REQUIRED

The density of the material, in grams per cubic centimeter

Atom NAtoms REQUIRED

Atom is the first atom of the material (given by atomic symbol), and NAtoms is the number of this atom in the material. Material cross sections are then created using a mass-weighted mixture of these atoms.

For materials with multiple atom types, any number of these lines can be provided

In the future, Atom will be generalized to allow for special molecule/material names that are given specialized cross sections in NittanyPhysics.

ANGULAR

ANGULAR
    PNSCATTERING L
END

PNSCATTERING L REQUIRED

The global Legendre order that is used in the \(P_{N}\) scattering treatment, and thus defines the angular discretization regardless of discretization method (of which currently only \(S_{N}\) is implemented).

Note that the angular discretization method for a given particle is specified in PARTICLES, where different particles can have different discretization methods.

PARTICLES

PARTICLES
    [ ELECTRONS | PHOTONS ]
        STRUCTURE
        ANGULAR     [ SN ]
        SOLVER      [ GMRES | SI ]
        NOSCATTER
    END
END

[ ELECTRONS | PHOTONS ] REQUIRED

The particle to be solved. Multiple such subheaders can, of course, be provided, and this will also determine the particle coupling. That is, during a solution, a particle will be coupled only to the particles which have been solved before it, assuming that coupling cross sections are nonzero for these particles.

Furthermore, note that a particle can be specified any number of times, as long as it is non-consecutively. In this case, the particle is not considered to couple to its previous instances, but this can be useful for studying, for instance, Bremsstrahlung production (to first order) in coupled photon-electron transport, by specifying PHOTONS then ELECTRONS then PHOTONS.

In the future, protons and positrons will be implemented.

STRUCTURE REQUIRED

sfdsdgedsg

ANGULAR SN REQUIRED

The angular discretization method for this particle. Currently only the discrete ordinates method (\(S_{N}\)) is implemented, but in the future, the real spherical harmonics expansion (\(P_{N}\)) will be implemented.

SOLVER [ GMRES | SI ] REQUIRED

The iterative solver to be used for space-angle inversion of the Boltzmann transport equation – the Generalized Minimal Residual Method [CITE] (GMRES), or Source Iteration [CITE] (SI).

At the moment, there is no specific plan to implement any more solvers, but this is something that could be done very simply in Lionbolt due to the structure of the program. If any solvers are implemented soon, they will likely come from SPARSKIT [CITE], which would be very readily implemented as the file third_party/iters.f contains all of SPARSKIT’s iterative solvers in a form with which Lionbolt is designed to easily interface, as the implementation of GMRES used by Lionbolt is in this file.

NOSCATTER

An optional input that takes zero scattering cross section for the given particle. Useful for studying primary beams.

BEAM

Example Input File

Below, we give an input file that would allow the user to perform coupled photon-electron transport in a 30 x 30 x 30 cm water tank.

PROBLEM GENERAL

MESH
    GMSH     /absolute/path/to/mesh/file.msh
    SCALE    30.0 30.0 30.0
END

MATERIALS
    WATER
        DENSITY 1.0 # g / cc
        H   2
        O   1
    END
END

ANGULAR
    PNSCATTERING    15
END

PARTICLES
    PHOTONS
        STRUCTURE    0.001:5.4:25
        ANGULAR      SN
        SOLVER       GMRES
        NOSCATTER
    END
END

BEAM
    POLYCHROMATIC    /absolute/path/to/linac/spectrum.txt
    AXIS             0.0  0.0 -1.0
    ORIGIN           0.0  0.0  130.0
    CUTOUT           RECTANGLE 100.0 10.0 10.0 0.0
    SPHERICAL
END

STORAGELIMITED
DEBUG