-
Notifications
You must be signed in to change notification settings - Fork 23
minimc_scenario
Under the hood, a MiniMC simulation always needs configuration for four separate components:
- A material, defined by a standard NCrystal material cfg-string.
- A source of neutrons, defined by a source cfg-string.
- A simulation geometry, defined by a geometry cfg-string.
- Configuration of the simulation engine itself, defined by an engine cfg-string.
Often the full flexibility offered by these four cfg-strings is not needed. Therefore, as a convenient alternative, one can alternatively set up simpler "simulation scenarios", in which configuration of source and geometry is automatically handled. No matter what, a material cfg-string is always required of course, and an enginecfg can still be provided as desired.
The following examples show how the combination of two strings are enough to setup a MiniMC simulation: one standard NCrystal cfg-string defines the material, and one additional string defining the simulation scenario.
In each example is also shown the actual underlying geomcfg and srccfg which are automatically generated based on the scenario. An enginecfg can also be provided separately as desired.
- Input: material=
"Al_sg225.ncmat"scenario=""What: Pencil beam of neutrons impinging centrally on a diameter=1mfp (mean free path between scatterings) sphere of aluminium. Beam energy is chosen to be hopefully interesting for the material, based on Bragg threshold and temperature. Output: geomcfg="sphere;r=0.0530935"srccfg="circular;z=-0.0530935;r=0.0530935;wl=3.74084;n=1e6" - Input: material=
"Al_sg225.ncmat;temp=300K"scenario="2Aa pencil on 2mm sphere"What: Pencil beam of 2Aa neutrons impinging centrally on a diameter=2mm sphere of 300K aluminium. Output: geomcfg="sphere;r=0.001"srccfg="constant;z=-0.00099999999999999;wl=2;n=1e6" - Input: material=
"Be_sg194.ncmat;temp=80K"scenario="10meV on 2mm sphere"What: A zero-divergence beam of 10meV neutrons uniformly illuminating a diameter=2mm sphere of 80K beryllium. Output: geomcfg="sphere;r=0.001"srccfg="circular;z=-0.001;r=0.001;ekin=0.01;n=1e6" - Input: material=
"gasmix::air/0.9relhumidity"scenario="1.8Aa on 10cm slab"What: 1.8Aa neutrons impinging at right incidence on an infinite slab of thickness 10cm filled with humid air. Output: geomcfg="slab;dz=0.05"srccfg="constant;z=-0.05;wl=1.8;n=1e6" - Input: material=
"C_sg194_pyrolytic_graphite.ncmat"scenario="0.99BT on 2mfp 1e5 times"What: 100000 neutrons at a wavelength which is 99% of the Bragg threshold of PG, uniformly illuminating a PG filled sphere whose diameter is 2 times the mean free path length between scatterings. Output: geomcfg="sphere;r=0.01175025"srccfg="circular;z=-0.01175025;r=0.01175025;wl=6.64389;n=1e5"
The decodeScenario function parses a MiniMC quick simulation scenario string, according to the syntax:
ENERGY [pencil] [on [THICKNESS] [sphere|slab]] [COUNT times]
The meaning of the various parameters (in uppercase above) and keywords (in lowercase above) is explained in the following.
If given, COUNT is the initial number of neutrons to input into the simulation. Otherwise, the default value is 1e6 for isotropic materials, and 1e5 for anisotropic materials.
- ENERGY is the monochromatic beam energy like "1.8Aa", "25meV" or "0.1eV". Special units "BT" means the bragg threshold of the material (or 4.0Aa in case material does not have one), and "kT" means a kinetic energy equal to Boltzmann's constant times the material temperature. Using either special unit will cause the result to be rounded to 6 significant digits.
- "pencil" is an optional keyword related to the beam profile (see below).
- THICKNESS is the material thickness like "1mm", "2m", "0.4cm", or "2.5mfp". The unit "mfp" corresponds to the mean-free-path length for a neutron scattering interaction in the material (rounded to 6 significant digits). Default THICKNESS is "1mfp".
- The keywords "sphere" or "slab" can be used to select the sample geometry (default is a sphere).
For a spherical geometry, the beam profile will by default be taken to be a beam with a uniform circular profile, of the same radius as the sphere. However, if the keyword "pencil" is provided, a pencil beam hitting the sphere centrally is used instead.
As a special case, an empty scenario string is interpreted in the same way as a scenario string with contents "0.8BT" if the material has a Bragg threshold, otherwise it will be "1kT" if it has a temperature. If it neither has a Bragg threshold or a temperature, a value of "1.8Aa" is used as the ultimate fallback.
For flexibility and usage from the cmdline, colons (:) and underscores (_) can be used as whitespace. Additionally, all repeated whitespace (tabs, newlines, etc.) is converted into a single space before parsing, and trailing or leading whitespace is trimmed away.
Home
Get NCrystal
Using NCrystal
Data library
Cfg string parameters
Included physics
NCMAT format
MiniMC
ncmat2endf
Plugins (how to use)
Plugins (curated list)
Plugins (how to develop)
Release 2.0.0 announcement
Release 2.1.0 announcement
Release 2.5.0 announcement
Release 2.7.0 announcement
Release 3.0.0 announcement
Release 3.1.0 announcement
Release 3.2.0 announcement
About
Contact