Particle Size Definition Class

From SysCAD Documentation
Jump to navigation Jump to search

Navigation: PGMs ➔ Classes ➔ Particle Size Definition Class

Global Pre-Defined Class Instances SysCAD Pre-Defined Classes
Sp Database
SDB Class
Particle Size Defn
PSD Class
Plant Model
PM Class
Array
Class
StrArray
Class
Matrix
Class
TagSelect
Class
Time
Class
Noise
Class

Latest SysCAD Version: 13 May 2026 - SysCAD Build 139.37082

Related Links: Defining a Class, Example PGM Files


Description

The name of the single global instance of the Particle Size Definition class is PSD and can be referenced directly.

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

Data Members

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 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
ParticleCountFactor()
Available from Build 139.31216.
This returns the correction factor defined in the configuration file which may be used to account for particle geometry. real None CountFactor = PSD.ParticleCountFactor()
CountFactor = 1
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 Index
Size Index
SpeciesIndex1 = PSD.SpIndex(0, 0)
SpeciesIndex1 = 3
SpShortName(DistIndex, SizeDist) This returns the species short name (symbol) of the primary species in the Size Distribution. string Distribution Index
Size Index
SpeciesName = PSD.SpShortName(0, 0)
SpeciesName = Ore1
Functions to return information about the Size Intervals in a specified Sieve Series Distribution
SmallestSize(DistIndex)
Available from Build 139.31216.
This returns the smallest, or Bottom, size of the Sieve Series. real Distribution Index SmallestSize = PSD.BottomSize(0)
SmallestSize = 0.0005
BottomSize(DistIndex, IntIndex) This returns the smallest, or Bottom, size of the specified interval index. real Distribution Index
Interval Index
Bottom1 = PSD.BottomSize(0, 1)
Bottom1 = 0.01
TopSize(DistIndex, IntIndex) This returns the largest, or Top, size of the specified interval index. real Distribution Index
Interval Index
Top1 = PSD.TopSize(0, 1)
Top1 = 0.02
GeomMean(DistIndex, IntIndex) This returns the Geometric Mean of the specified interval index. real Distribution Index
Interval Index
GM1 = PSD.GeomMean(0, 1)
GM1 = 0.01414
ArithMean(DistIndex, IntIndex) This returns the Arithmetic Mean of the specified interval index. real Distribution Index
Interval Index
AM1 = PSD.ArithMean(0, 1)
AM1 = 0.015
TopSizeArray(DistIndex, Array)
Available from Build 139.31216.
This populates the contents of an Array (resizing the Array if required) containing the Top Sizes for the Size Distribution. Distribution Index
Array: the name of the specified array. This is an Array Class.
Array TopSizes
PSD.TopSizeArray(0, TopSizes)
GeomMeanArray(DistIndex, Array)
Available from Build 139.31216.
This populates the contents of an Array (resizing the Array if required) containing the Geometric Means for the Size Distribution. Distribution Index
Array: the name of the specified array. This is an Array Class.
Array GeomMeans
PSD.GeomMeanArray(0, GeomMeans)

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

Size intervals can be retrieved directly into arrays.

array TopSizes, GeometricMean
PSD.TopSizeArray(0, TopSizes)
PSD.GeomMeanArray(0, GeometricMean)