species module

class species.Species(name='null-species-name', formula_name='null-species-formula-name', atoms=[], flag='null-species-flag', info=None)[source]

Bases: object

All SI units (kg,s,K,Pa,J,W).

The Specie() class encapsulates either the molecular or empirical chemical formula of a compound. This is done as follows. Say MAO2 is either a molecular or empirical chemical formula of a ficticious compound denoting minor actinides dioxide. The list of atoms is given as follows:

[‘0.49*Np-237’, ‘0.42*Am-241’, ‘0.08*Am-243’, ‘0.01*Cm-244’, ‘2.0*O-16’]

note the MA forming nuclides add to 1 = 0.49 + 0.42 + 0.08 + 0.01. Therefore the number of atoms in this compound is 3. 1 MA “ficticious” atom and 2 O. Note that the total number of “atoms” is obtained by summing all multipliers: 0.49 + 0.42 + 0.08 + 0.01 + 2.0. The nuclide is indicated by the element symbol followed by a dash and the atomic mass number. Here the number of nuclide types is 5 (self.num_nuclide_types).

The numbers preceeding the nuclide symbol before the * will be referred to as multipliers. The sum of the multipliers will add to the number of “atoms” in the formula. WARNING: a multiplier could be in the format 0.00e-00. In this case a hiphen may appear twice, e.g.: 1.549e-09*U-233

Other forms can be used for common true species

[‘Np-237’, ‘2.0*O-16’] or [‘Np-237’, ‘O-16’, ‘O-16’] or [ ‘2*H’, ‘O’ ] or [ ‘H’, ‘O’, ‘H’ ] etc…

This code will calculate the molar mass of any species with a given valid atom list using a provided periodic table of chemical elements. The user can also reset the value of the molar mass with a setter method.

reorder_formula()[source]

Takes a list of atoms for a molecular or empirical formula and places it in order of decreasing magnitude of stoichiometric coefficient. For example, [O, 2*H] will be returned as [2*H, O]. This is used for printing purposes. The internal order will not change.

Returns:atoms2
Return type:list
update_molar_mass()[source]

Updates the molar mass of the species after the molecular formula has been changed.