saltproc.materialflow module¶
- class saltproc.materialflow.Materialflow(comp=None, mass=-1.0, density=1.0, atoms_per_molecule=-1.0, metadata=None, vol=1.0, temp=900, mass_flowrate=0.0, void_frac=0.0, burnup=0.0)[source]¶
Bases:
Material
Class contains information about burnable material flow. Based on PyNE Material.
- __add__(y)[source]¶
Overrides Python adding operation for Materialflow objects.
- Parameters
x (obj) – Materialflow object #1.
y (obj) – Materialflow object #2.
- Returns
Materialflow which is a sum of isotope masses from x and y.
- Return type
obj
- __deepcopy__(memo)[source]¶
Return a deep copy of compound object self.
- Parameters
self (obj) – Compound object.
memo (dict, optional) – Id-to-object correspondence to control for recursion.
- Returns
New compound object copied from self.
- Return type
obj
- __eq__(other)[source]¶
Overrides Python
=
operation to compare two Materialflow objects. Compares objects total mass, density, atoms_per_molecule, temperature, mass flowrate, and masses of important isotopes: uranium-235 and uranium-238.- Parameters
other (obj) – Materialflow object to compare with.
- Returns
Are the objects equal?
- Return type
bool
- __init__(comp=None, mass=-1.0, density=1.0, atoms_per_molecule=-1.0, metadata=None, vol=1.0, temp=900, mass_flowrate=0.0, void_frac=0.0, burnup=0.0)[source]¶
Initializes the Materialflow object.
- Parameters
PyNE.Material (class) – PyNE Material parent class containing nuclide vector, density, mass, atoms_per_molecule, metadata
temp (float) – temperature of the material flow (K)
mass_flowrate (float) – mass flow rate of the material flow (g/s)
void_frac (float) – void fraction in the material (%)
burnup (float) – material burnup at the end of depletion step [MWd/kgU]
- __rmul__(scaling_factor)[source]¶
Overrides Python multiplication operation for Materialflow objects.
- Parameters
scaling_factor (float or int) – Scaling factor.
- Returns
Materialflow object which has mass of each isotope and mass_flowrate scaled by other.
- Return type
obj
- copy_pymat_attrs(src)[source]¶
Copies PyNE attributites from source object (src) to target object.
- Parameters
src (obj) – Materialflow object to copy attributes from.
- get_mass()[source]¶
Returns total mass of the material descibed in Materialflow object.
- Returns
The mass of the object.
- Return type
float
- scale_matflow(f=1.0)[source]¶
Returns nuclide vector dictionary, obtained from object attrs and then scaled by factor.
- Parameters
f (float) – Scaling factor.
- Returns
new_mat_comp – Materialflow nuclide component dictionary of relative mass.
key
The keys are preserved from PyNE Material (integers representing nuclides in id-form).
value
Each nuclide’s mass fraction, multiplied by factor f.
- Return type
dict of int to float