f4enix.input.materials.Zaid#
- class f4enix.input.materials.Zaid(fraction: str | float, element: str, isotope: str, library: str, ab: str = '', fullname: str = '', elem_mass_fraction: float | None = None)#
Bases:
objectObject representing a Zaid
- Parameters:
fraction (str/float) – fraction of the zaid.
element (str) – element part of the zaid (AA).
isotope (str) – isotope part of the zaid (ZZZ).
library (str) – library suffix (e.g. 99c).
ab (str, optional) – abundance of the zaid in the material. The default is ‘’.
fullname (str, optional) – formula name (e.g. H1). The default is ‘’.
elem_mass_fraction (float, optional) – mass fraction of the element in the submaterial. The default is None
- Returns:
None.
All the init parameters are saved as attributes. In addition
- Variables:
name (str) – AAZZZ[lib]
Methods
__init__(fraction, element, isotope, library)Object representing a Zaid
from_string(string)Generate a zaid object from an MCNP string
get_fullname(libmanager)Get the formula name of the zaid (e.g. H1).
to_text()Get the zaid string ready for MCNP material card
to_xml(libmanager, submaterial)Generate XML content for a nuclide within a material.
- classmethod from_string(string: str) Zaid#
Generate a zaid object from an MCNP string
- Parameters:
string (str) – original MCNP string.
- Returns:
created zaid.
- Return type:
- get_fullname(libmanager: LibManager) str#
Get the formula name of the zaid (e.g. H1)
- Parameters:
libmanager (libmanager.LibManager) – libmanager handling the libraries operations.
- Returns:
formula – zaid formula name.
- Return type:
str
- to_text() str#
Get the zaid string ready for MCNP material card
- Returns:
zaid string.
- Return type:
str
- to_xml(libmanager: LibManager, submaterial: SubMaterial) None#
Generate XML content for a nuclide within a material.
- Parameters:
libmanager – libmanager
submaterial – The XML element for the material where the nuclide content will be added.