auxi.modelling.process.materials.psd module¶
This module provides psd material and material package classes that can do size distribution calculations.
-
class
auxi.modelling.process.materials.psd.
Material
(name, file_path, description=None)¶ Bases:
auxi.core.objects.NamedObject
Represents a particulate material consisting of multiple particle size classes.
Parameters: - name – The material’s name.
- file_path – The path of the material definition file.
- description – the material’s description
The format of the text file is as follows:
- The lines are space separated. The values in a line are separated by one or more spaces.
- The first line is a heading line.
- All subsequent lines contain a particle size, followed by mass fractions.
- Particle sizes are indicated in [meter].
- The first column lists the particle sizes in the material. Each class must be interpreted as “mass fraction retained”. In other words if the size class is indicated as 307.2E-3, it means that it is the class of material retained on a 307.2mm screen, and can also be though of as +307.2mm material. The first size class represents the largest particles. The final size class should be zero, as it represents all material that passed through the smallest aperture screen.
- All subsequent columns describe assays of the material.
The following is an example of a material text file:
Compound FeedA MillCharge 307.2E-3 0.20 0.02 108.6E-3 0.18 0.06 38.4E-3 0.17 0.04 13.6E-3 0.07 0.03 4.8E-3 0.13 0.03 1.7E-3 0.07 0.04 600.0E-6 0.06 0.18 210.0E-6 0.02 0.50 75.0E-6 0.10 0.10 0.0E0 0.00 0.00
-
add_assay
(name, assay)¶ Add an assay to the material.
Parameters: - name – The name of the new assay.
- assay – A numpy array containing the size class mass fractions for the assay. The sequence of the assay’s elements must correspond to the sequence of the material’s size classes.
-
create_empty_assay
()¶ Create an empty array to store an assay. The array’s length will be equal to the number of size classes in the material.
Returns: A floating point array.
-
create_package
(assay=None, mass=0.0, normalise=True)¶ Create a MaterialPackage based on the specified parameters.
Parameters: - assay – The name of the assay based on which the package must be created.
- mass – [kg] The mass of the package.
- normalise – Indicates whether the assay must be normalised before creating the package.
Returns: The created MaterialPackage.
-
get_assay_total
(name)¶ Calculate the total of the specified assay.
Parameters: name – The name of the assay. Returns: The total mass fraction of the specified assay.
-
get_size_class_index
(size_class)¶ Determine the index of the specified size class.
Parameters: size_class – The formula and phase of the specified size class, e.g. ‘Fe2O3[S1]’. Returns: The index of the specified size class.
-
class
auxi.modelling.process.materials.psd.
MaterialPackage
(material, size_class_masses)¶ Bases:
auxi.core.objects.Object
A package of a material consisting of multiple particle size classes.
Properties defined here:
Parameters: - material – A reference to the Material to which self belongs.
- size_class_masses – [kg] [kg] The masses of the size classes in the package.
-
add_to
(other)¶ Add another psd material package to this material package.
Parameters: other – The other material package.
-
clear
()¶ Set all the size class masses in the package to zero.
-
clone
()¶ Create a complete copy of self.
Returns: A MaterialPackage that is identical to self.
-
extract
(other)¶ Extract ‘other’ from self, modifying self and returning the extracted material as a new package.
Parameters: other – Can be one of the following:
- float: A mass equal to other is extracted from self. Self is reduced by other and the extracted package is returned as a new package.
- tuple (size class, mass): The other tuple specifies the mass of a size class to be extracted. It is extracted from self and the extracted mass is returned as a new package.
- string: The ‘other’ string specifies the size class to be extracted. All of the mass of that size class will be removed from self and a new package created with it.
Returns: A new material package containing the material that was extracted from self.
-
get_assay
()¶ Determine the assay of self.
Returns: [mass fractions] An array containing the assay of self.
-
get_mass
()¶ Determine the mass of self.
returns: [kg] The mass of self.
-
get_size_class_mass
(size_class)¶ Determine the mass of the specified size class in self.
Parameters: size_class – The formula and phase of the size class, e.g. ‘Fe2O3[S1]’ Returns: [kg] The mass of the size class in self.
-
get_size_class_mass_fraction
(size_class)¶ Determine the mass fraction of the specified size class in self.
Parameters: size_class – The formula and phase of the size class, e.g. ‘Fe2O3[S1]’ Returns: The mass fraction of the size class in self.