neutronics
Materials neutronics tools
NM_FRACTION_TYPE_MAPPING = {'atomic': 'ao', 'mass': 'wo', 'volume': 'vo'}
module-attribute
to_openmc_material(name, density_unit, percent_type, density, packing_fraction=1.0, enrichment=None, enrichment_target=None, temperature=None, elements=None, isotopes=None, enrichment_type=None, material_id=None, *, temperature_to_neutronics_code=True)
Convert material to OpenMC material
Returns:
| Type | Description |
|---|---|
Material
|
The openmc material |
Raises:
| Type | Description |
|---|---|
ValueError
|
neither density or atoms and volume per unit cell specified |
ValueError
|
Arrays used in temperature specification |
Source code in matproplib/tools/neutronics.py
density_from_unit_cell(atoms_in_sample, atoms_per_unit_cell, average_molar_mass, volume_of_unit_cell)
Density from a unit cell
Source code in matproplib/tools/neutronics.py
to_fispact_material(volume_in_cm3, mass_density, nucleide_atom_per_cm3, decimal_places=8, additional_end_lines=None)
Fispact material card using the DENSITY and FUEL keywords
Returns:
| Type | Description |
|---|---|
str
|
Material card as string |
Notes
See https://fispact.ukaea.uk/wiki/Keyword:FUEL and https://fispact.ukaea.uk/wiki/Keyword:DENSITY
Source code in matproplib/tools/neutronics.py
to_serpent_material(name, mass_density, nucleides, temperature=None, decimal_places=8, zaid_suffix='', additional_end_lines=None, *, temperature_to_neutronics_code=False)
Serpent material card
Returns:
| Type | Description |
|---|---|
str
|
Material card as a string |
Raises:
| Type | Description |
|---|---|
ValueError
|
Use of arrays for temperature |
Notes
https://serpent.vtt.fi/mediawiki/index.php/Input_syntax_manual#mat_(material_definition) Assumes density is in g/cm^3
Source code in matproplib/tools/neutronics.py
to_mcnp_material(material_id, mass_density, nucleides, name='', zaid_suffix='', decimal_places=8, additional_end_lines=None)
MCNP6 Material card
Returns:
| Type | Description |
|---|---|
str
|
Material card as a string |
Notes
mcnp.lanl.gov/pdf_files/Book_MonteCarlo_2024_ShultisBahadori_AnMCNPPrimer.pdf