# Particle Size Definition Class

Jump to navigation Jump to search

Navigation: PGMs -> Classes -> Predefined Classes

## Contents

### Description

The PSD (Particle Size Definition) class provides member functions for users to access the details of any size definitions within a project.

The user does not have to declare the PSD class before using it.

None

### Member Functions

The examples in the following table are all based upon a project containing the following:

1. Species:
H2O(g), H2O(l), Ore1(s), Ore2(s), Ore3(s)
2. 1 Sieve Series Definition called 'Demo' with size intervals (in microns):
10, 20, 50 and 150.
3. 2 individual species size distributions:
1st with Ore1, 2nd with Ore2, with Ore2 as the 'default' species. Therefore, Ore3 will have the same size distribution as Ore2.

 Call Functionality Return Type Parameters Example Functions to return information about the overall Particle Size Distributions DistributionCount( ) This returns the total number of Sieve Series defined in the project configuration.Normally this value is '1', but very occasionally the user may define more than one Sieve Series. integer None NumberDist = PSD.DistributionCount( ) NumberDist = 1 Name(DistIndex) This returns the name of the Sieve Series, as defined in the Configuration file. string Distribution Index(normally = 0) DistName = PSD.Name(0) DistName = 'Demo' IntervalCount(DistIndex) This returns the total number of size intervals defined in the specified Sieve series. integer Distribution Index(normally = 0) NumIntervals = PSD.IntervalCount(0) NumIntervals = 4 Functions to return the information about the species in a Sieve Series Distribution SpeciesCount(DistIndex) This returns the number of species in the specified Sieve series. integer Distribution Index(normally = 0) NumSpecies = PSD.SpeciesCount(0) NumSpecies = 3 SpIndex(DistIndex, SizeDist) This returns the species index of the primary species in the Size Distribution. integer Distribution IndexSize Index SpeciesIndex1 = PSD.SpIndex(0,0) SpeciesIndex1 = 3 SpSymbol(DistIndex, SizeDist) This returns the species symbol of the primary species in the Size Distribution. string Distribution IndexSize Index SpeciesName = PSD.SpSymbol(0,0) SpeciesName = Ore1 Functions to return information about the Size Intervals in a specified Sieve Series Distribution BottomSize(DistIndex, IntIndex) This returns the smallest, or Bottom, size of the specified interval index. real Distribution IndexInterval Index Bottom1 = PSD.BottomSize(0,1) Bottom1 = 10 TopSize(DistIndex, IntIndex) This returns the largest, or Top, size of the specified interval index. real Distribution IndexInterval Index Top1 = PSD.TopSize(0,1) Top1 = 20 GeomMean(DistIndex, IntIndex) This returns the Geometric Mean of the specified interval index. real Distribution IndexInterval Index GM1 = PSD.GeomMean(0,1) GM1 = 14.14 ArithMean(DistIndex, IntIndex) This returns the Arithmetic Mean of the specified interval index. real Distribution IndexInterval Index AM1 = PSD.ArithMean(0,1) AM1 = 15

### Example

The following example uses the same configuration as in the above section. It sets the top and bottom size and geometric and arithmetic mean for all of the size intervals into arrays.

array Top, Bottom, GeometricMean, ArithmeticMean
integer NumIntervals, i

; Find the the number of size intervals and set the arrays to this length
NumIntervals = PSD.IntervalCount(0)
Top.SetLen(NumIntervals)
Bottom.SetLen(NumIntervals)
GeometricMean.SetLen(NumIntervals)
ArithmeticMean.SetLen(NumIntervals)

; Set the top and bottom size and geometric and arithmetic mean for all of the size intervals into the arrays
i = 0
while (i < NumIntervals)
Top.SetAt(i, PSD.TopSize(0, i))
Bottom.SetAt(i, PSD.BottomSize(0, i))
GeometricMean.SetAt(i, PSD.GeomMean(0, i))
ArithmeticMean.SetAt(i, PSD.ArithMean(0, i))
i = i + 1
endwhile