Materials Sub-Module

Materials utilities module

pyPenred.simulation.materials.create(name: str, density: SupportsFloat, composition: Sequence[tuple[SupportsInt, SupportsFloat]], filename: str = '') None

creates a material file based on the provided weight fraction composition. The composition should be given as a list of tuples with atomic number and weight fraction.

Parameters:
  • name (str) – Name assigned to the material.

  • density (float) – Material density in g/cm^3.

  • composition (list of tuple) – Material composition list. Each element consists of a 2D tuple with the corresponding element atomic number (Z) and weight fraction. For example, [(Z1, weight1), (Z2, weight2), …].

  • filename (str, optional) – File name for the generated material. If empty, it defaults to ‘${name}.mat’.

Returns:

None

pyPenred.simulation.materials.createListed(matID: SupportsInt, filename: str = '') None

Creates a material file from the PENELOPE predefined material list.

Parameters:
  • matID (int) – Material numerical identifier. The complete list can be found in the ‘Predefined Materials’ appendix within the penred documentation.

  • filename (str) – File name for the generated material.

Returns:

None