PSD-Analyser

PSD Analyser: A set of Python/MATLAB tools for particle size distribution (PSD) analysis and visualisation

Hugh Patrick Rice, 2022

DOI

Quick-start guide

Run the standalone executable (currently Windows only)

Run the code directly

Detailed guide

How PSD Analyser works (Python)

The app (PSDA_app) creates a user interface for loading, interacting with and saving PSD data. However, the hard work is done by the PSDAnalyser class within the psd_analyser library, which can be used without the app and contains some functionality not available in the app (see below).

Summary of PSD Analyser functionality

  1. Parsing of Mastersizer files in spreadsheet (CSV, Excel) formats
  2. Log-normal modelling of PSDs, where fitting can be performed to either the cumulative distribution function (CDF) or probability density function (PDF) of the PSD data
  3. Application to PSDs of the product difference algorithm (PDA) to PSDs, which computes the discrete distribution of N elements with the same statistical moments (mean, etc.)
  4. (With standalone Python app) Visualisation of results in an interactive viewer, allowing output of figures in various formats (currently Python only)
  5. Saving PSD data, with fitted log-normal parameters, into a single spreadsheet for further analysis

Running the PSD Analyser standalone app (Python)

Using PSD Analyser in code form (Python)

Creating your own standalone app using the PSD Analyser source code (Python)

The app was created using the Python library pyinstaller, and you can do the same. A rough outline of the necessary code for doing so is below.

  1. In the command line in your Python environment, install pyinstaller (see here):
pip install pyinstaller
  1. Create an executable using the command below, where: the noconsole option creates an executable without a console window (this option can be removed if you wish; doing so causes the app to create a console window for debugging); and the onefile option creates a single executable file (if this option is removed, the resulting executable may be smaller but a number of directories will be created alongside the executable)
pyinstaller --onefile --noconsole psdanalyser/PSDA_app.py --hidden-import=openpyxl

Important equations used by PSD Analyser

The statistical tools used by PSD Analyser are all described in more detail in the “equations” document

  1. The log-normal cumulative distribution function (CDF). See here and here.
  2. The log-normal probability density function (PDF). See here and here.
  3. The product difference algorithm (PDA). See references below.

Contact and issue reporting

Please either raise an issue here at Github or contact me directly.

Contact: Hugh Rice, h.p.rice@leeds.ac.uk

How to cite this repository

References and notes

Note on history, development and previous implementation

(1) Rice HP, Fairweather M, Peakall J, Hunter TN, Mahmoud B and Biggs SR (2015), Constraints on the functional form of the critical deposition velocity in solid–liquid pipe flow at low solid volume fractions, Chemical Engineering Science 126 759-770, DOI: https://doi.org/10.1016/j.ces.2014.12.039

(2) Rice HP, Peakall J, Fairweather M and Hunter TN (2020), Extending estimation of the critical deposition velocity in solid–liquid pipe flow to ideal and non-ideal particles at low and intermediate solid volume fractions, Chemical Engineering Science 211 115308 (9 p.), DOI: https://doi.org/10.1016/j.ces.2019.115308

(3) McGraw R (1997), Description of Aerosol Dynamics by the Quadrature Method of Moments, Aerosol Science and Technology 27 (2) 255-265, DOI: https://doi.org/10.1080/02786829708965471

(4) Marchisio DL, Vigil RD and Fox RO (2003), Implementation of the quadrature method of moments in CFD codes for aggregation–breakage problems, Chemical Engineering Science 58 (15) 3337-3351, DOI: https://doi.org/10.1016/S0009-2509(03)00211-2

(5) Gordon RG (1968), Error Bounds in Equilibrium Statistical Mechanics, Journal of Mathematical Physics 9 655-663, DOI: https://doi.org/10.1063/1.1664624

(6) Wheeler and Gordon (1971), Bounds for averages using moment constraints, In: Baker and Gammel (eds.), The Padé Approximant in Theoretical Physics, New York and London: Elsevier Science, ISBN: 9780080955803

(7) Farr SF (2013), Random close packing fractions of lognormal distributions of hard spheres, Powder Technology 245 28-34, DOI: https://doi.org/10.1016/j.powtec.2013.04.009

(8) Mwasame, P (2016), Modeling the viscosity of polydisperse suspensions: Improvements in prediction of limiting behavior, Physics of Fluids 28 061701 (6 p.), DOI: http://dx.doi.org/10.1063/1.4953407