pyg4ometry.fluka.material¶
Attributes¶
Classes¶
A FLUKA material consisting of a single element. This corresponds |
|
A FLUKA compound material. This corresponds to the case in |
Functions¶
|
|
|
|
|
Returns the (name, fraction, fractionType). This is for handling |
|
Names and fractions maybe stored as "negative" numbers in the |
|
grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx |
Module Contents¶
- pyg4ometry.fluka.material._PREDEFINED_ELEMENTS = [('BLCKHOLE', 0, 0, 0), ('VACUUM', 0, 0, 0), ('HYDROGEN', 1.00794, 1.0, 8.37e-05), ('HELIUM',...¶
- pyg4ometry.fluka.material._PREDEFINED_COMPOUNDS = [('WATER', 1.0), ('POLYSTYR', 1.06), ('PLASCINT', 1.032), ('PMMA', 1.19), ('BONECOMP', 1.85),...¶
- pyg4ometry.fluka.material.predefinedMaterialNames()¶
- class pyg4ometry.fluka.material.BuiltIn(name, *, atomicNumber=None, atomicMass=None, density=None, flukaregistry=None)¶
- name¶
- atomicNumber¶
- atomicMass¶
- density¶
- __repr__()¶
- flukaFreeString(delim='')¶
- pyg4ometry.fluka.material.defineBuiltInFlukaMaterials(flukaregistry=None)¶
- class pyg4ometry.fluka.material.multiGroupNeutronCrossSections(fileName=None)¶
- data_list = []¶
- _readFile()¶
- findMaterial(Z, A, T, selfShield=False)¶
- class pyg4ometry.fluka.material.Material(name, atomicNumber, density, massNumber=None, atomicMass=None, pressure=None, flukaregistry=None, comment='')¶
Bases:
_MatPropA FLUKA material consisting of a single element. This corresponds to the case in FLUKA of a single MATERIAL card with no associated COMPOUND cards, as well as a possible MAT-PROP card (only if a pressure is provided, other options of MAT-PROP are unsupported).
- Parameters:
name (str) – The name of the material
atomicNumber (int) – the atomic number, Z, of the element.
density (float) – the density in g/cm3 of the material.
massNumber (int, None) – Optional mass number, will be inferred in FLUKA based on atomicNumber. Allows one to specify a specific isotope.
atomicMass (float) – The mass of the atom in g/mole. Will be inferred in FLUKA based on atomicNumber.
pressure (float) – Optional pressure if the material is a gas.
flukaregistry (FlukaRegistry) – Optional FlukaRegistry instance the material is to be added to.
- name¶
- atomicNumber¶
- density¶
- atomicMass¶
- massNumber¶
- pressure¶
- comment¶
- toCards()¶
- flukaFreeString(delim=', ')¶
- __repr__()¶
- classmethod fromCard(card, flukaregistry)¶
- rename(newName, recursive=False, iIndex=0)¶
- class pyg4ometry.fluka.material.Compound(name, density, fractions, fractionType, pressure=None, flukaregistry=None, comment='')¶
Bases:
_MatPropA FLUKA compound material. This corresponds to the case in FLUKA of a single MATERIAL card with one or more associated COMPOUND cards.
- Parameters:
name (str) – The name of the compound.
density (float) – The density of the compound in g/cm3
fractions (list) – List of (Element, fraction) and (Compound, fraction) tuples corresponding to the fractional proportion of that material.
fractionType (str) – The type of the fractions listed in the fractions parameter, either atomic, mass, or volume.
flukaregistry (FlukaRegistry) – Optional FlukaRegistry instance the Compound is to be added to.
- name¶
- density¶
- fractions¶
- fractionType¶
- pressure¶
- comment¶
- toCards()¶
- flukaFreeString(delim=', ')¶
- classmethod fromCards(cards, flukareg)¶
- __repr__()¶
- totalWeighting(densityWeighted=False)¶
- rename(newName, recursive=True, iIndex=0)¶
- pyg4ometry.fluka.material._appendFractionPairs(card, fractions, fractionTypes)¶
- pyg4ometry.fluka.material._parseFraction(what1, what2)¶
Returns the (name, fraction, fractionType). This is for handling the different permutations found in the FLUKA manual COMPOUND entry.
- pyg4ometry.fluka.material._formatFlukaMaterialPair(pair, namePrefix, fractionPrefix)¶
Names and fractions maybe stored as “negative” numbers in the FLUKA input, permutations between which mean different types of fractions.
- pyg4ometry.fluka.material._grouper(n, iterable, fillvalue=None)¶
grouper(3, ‘ABCDEFG’, ‘x’) –> ABC DEF Gxx https://docs.python.org/3/library/itertools.html#recipes