Fix units in material description and interactions
Move the interaction formulas to the Material
module and refactor them into simple function with implementations in a .cpp
file.
The material parameters and their units are modified as follows to improve numerical stability:
- Radiation and nuclear interaction length stay as-is and are given as native length units.
- Atomic mass must now be given as relative atomic mass, i.e. a unit-less number. It has been renamed to
Ar()
be consistent with the usual naming as e.g. here. - Atomic number is still a unit-less number.
- Density is still given as
mass/volume
in native units and retains the issues discussed in #608 (closed). However, all computations use the molar electron density inmol / volume
which is now provided directly by theMaterial
class. This should be a numerical value closer to one.
For now, I consider this a reasonable trade-off that seems to work and does not require larger changes.
Other changes:
- Streamline
Material
interface, e.g. removing unusedMaterialComposition
. - Compute material constants directly in the
Material
description. - Streamline
MaterialProperties
interface by delegating most information back toMaterial
. - Streamline
MaterialComposition
andElementFraction
. They are currently unused but might be again in the future.
Closes #607 (closed) and #608 (closed).
Edited by Moritz Kiehn