f4enix.core.material_library.MaterialComposition#
- class f4enix.core.material_library.MaterialComposition(name: str, composition: List[Tuple[str, str | float | int]], fraction: bool = False)#
Bases:
objectSuitable object to simplify the creation of materials
- Parameters:
name (str) – name of the material
composition (List[Tuple[str, float | str]]) – list of elements and their mass percentage. If the mass is provided as string it is converted to float
fraction (bool) – if True percentages are not to be interpreted as such but instead are fractions. By default is False, meaning that percentages are expected.
- Variables:
perc (list[float]) – percentages of the different elements composing the material
elem (list[str]) – list of elements symbols (i.e. Ag)
name (str) – name of the material
Methods
__init__(name, composition[, fraction])Suitable object to simplify the creation of materials