Class PopulationBalanceModel

java.lang.Object
neqsim.util.nucleation.PopulationBalanceModel

public class PopulationBalanceModel extends Object
Population Balance Model (PBM) for tracking the evolution of particle size distributions over time.

This class solves the discretized General Dynamic Equation (GDE) for aerosol/particle populations subject to:

  • Nucleation: Formation of new particles at the critical size from CNT
  • Condensation growth: Particle size increase by vapor condensation (Fuchs-interpolated growth rate)
  • Brownian coagulation: Particle-particle collisions merging smaller particles into larger ones (Smoluchowski kernel)

The size space is discretized into geometrically-spaced sections (bins). The model uses operator splitting: nucleation source, then growth (advection), then coagulation, each sub-step at the current time step.

Usage:


// First compute nucleation with CNT
ClassicalNucleationTheory cnt = ClassicalNucleationTheory.sulfurS8();
cnt.setTemperature(253.15);
cnt.setSupersaturationRatio(100.0);
cnt.setGasViscosity(1.0e-5);
cnt.calculate();

// Set up population balance
PopulationBalanceModel pbm = new PopulationBalanceModel(cnt);
pbm.setNumberOfBins(40);
pbm.setMinDiameter(1.0e-9); // 1 nm
pbm.setMaxDiameter(100.0e-6); // 100 um
pbm.setTotalTime(5.0); // 5 seconds
pbm.setTimeSteps(500);
pbm.solve();

double[] diameters = pbm.getBinDiameters();
double[] counts = pbm.getBinNumberDensities();
double d50 = pbm.getMedianDiameter();
double totalN = pbm.getTotalNumberDensity();

References:

  • Seinfeld, J.H. and Pandis, S.N. (2016). Atmospheric Chemistry and Physics, 3rd ed., Chapters 12-13.
  • Gelbard, F. and Seinfeld, J.H. (1980). Simulation of multicomponent aerosol dynamics. J. Colloid Interface Sci. 78, 485-501.
  • Jacobson, M.Z. (2005). Fundamentals of Atmospheric Modeling, 2nd ed., Chapter 13.
Version:
1.0
Author:
esol
  • Field Details

    • cnt

      The CNT model providing nucleation rate and growth parameters.
    • numberOfBins

      private int numberOfBins
      Number of size bins.
    • minDiameter

      private double minDiameter
      Minimum bin diameter in m.
    • maxDiameter

      private double maxDiameter
      Maximum bin diameter in m.
    • totalTime

      private double totalTime
      Total simulation time in seconds.
    • timeSteps

      private int timeSteps
      Number of time steps.
    • binDiameters

      private double[] binDiameters
      Bin center diameters in m.
    • binRadii

      private double[] binRadii
      Bin center radii in m.
    • binEdges

      private double[] binEdges
      Bin edge diameters (numberOfBins + 1) in m.
    • binWidths

      private double[] binWidths
      Bin widths (diameter range per bin) in m.
    • numberDensity

      private double[] numberDensity
      Number density per bin in particles/m3.
    • volumeDensity

      private double[] volumeDensity
      Volume density per bin in m3/m3 (volume concentration).
    • totalNumberDensity

      private double totalNumberDensity
      Total number density in particles/m3.
    • totalVolumeConcentration

      private double totalVolumeConcentration
      Total volume concentration in m3_particles/m3_gas.
    • totalMassConcentration

      private double totalMassConcentration
      Total mass concentration in kg/m3.
    • medianDiameter

      private double medianDiameter
      Median (d50) diameter in m.
    • meanDiameter

      private double meanDiameter
      Mean diameter (number-weighted) in m.
    • geometricStdDev

      private double geometricStdDev
      Geometric standard deviation.
    • currentTime

      private double currentTime
      Current simulation time in seconds.
    • solved

      private boolean solved
      Whether the model has been solved.
  • Constructor Details

    • PopulationBalanceModel

      public PopulationBalanceModel(ClassicalNucleationTheory cnt)
      Creates a PopulationBalanceModel using nucleation parameters from a ClassicalNucleationTheory model.

      The CNT model must have been calculated before passing to this constructor.

      Parameters:
      cnt - the ClassicalNucleationTheory model (must be calculated)
  • Method Details

    • setNumberOfBins

      public void setNumberOfBins(int bins)
      Sets the number of size bins for the discretization.
      Parameters:
      bins - number of bins (typical 20-60)
    • setMinDiameter

      public void setMinDiameter(double diameter)
      Sets the minimum diameter of the size distribution.
      Parameters:
      diameter - minimum diameter in m (typical 1e-9 for nucleation)
    • setMaxDiameter

      public void setMaxDiameter(double diameter)
      Sets the maximum diameter of the size distribution.
      Parameters:
      diameter - maximum diameter in m (typical 100e-6 for grown particles)
    • setTotalTime

      public void setTotalTime(double time)
      Sets the total simulation time.
      Parameters:
      time - total time in seconds
    • setTimeSteps

      public void setTimeSteps(int steps)
      Sets the number of time steps for the simulation.
      Parameters:
      steps - number of time steps (higher = more accurate but slower)
    • solve

      public void solve()
      Solves the population balance equation by time-marching with operator splitting.

      At each time step:

      1. Add nucleated particles at the critical radius bin
      2. Apply condensation growth (shift particles to larger bins)
      3. Apply Brownian coagulation (merge particles)
    • initializeBins

      private void initializeBins()
      Initializes the geometric bin structure.
    • findBinIndex

      private int findBinIndex(double diameter)
      Finds the bin index closest to a given diameter.
      Parameters:
      diameter - target diameter in m
      Returns:
      bin index
    • applyNucleation

      private void applyNucleation(int nucleationBin, double rate, double dt)
      Adds nucleated particles to the nucleation bin.
      Parameters:
      nucleationBin - the bin index for newly nucleated particles
      rate - nucleation rate in particles/(m3*s)
      dt - time step in seconds
    • applyCondensationGrowth

      private void applyCondensationGrowth(double growthRateRad, double dt)
      Applies condensation growth by shifting particles to larger bins.

      Uses a first-order upstream differencing scheme. For each bin, the growth velocity determines how many particles move to the next larger bin during the time step.

      Parameters:
      growthRateRad - growth rate dr/dt in m/s
      dt - time step in seconds
    • applyCoagulation

      private void applyCoagulation(double kernel, double dt)
      Applies Brownian coagulation using a simplified sectional approach.

      Uses the constant kernel approximation (Smoluchowski) for the continuum regime. Coagulation moves volume from two smaller bins into a larger bin.

      Parameters:
      kernel - coagulation kernel K in m3/s
      dt - time step in seconds
    • computeStatistics

      private void computeStatistics()
      Computes statistics from the current size distribution.
    • computeMedianDiameter

      private void computeMedianDiameter()
      Computes the median (d50) diameter from the cumulative distribution.
    • getBinDiameters

      public double[] getBinDiameters()
      Returns the bin center diameters.
      Returns:
      array of bin center diameters in m
    • getBinEdges

      public double[] getBinEdges()
      Returns the bin edge diameters (numberOfBins + 1 values).
      Returns:
      array of bin edge diameters in m
    • getBinNumberDensities

      public double[] getBinNumberDensities()
      Returns the number density per bin.
      Returns:
      array of number densities in particles/m3
    • getBinVolumeDensities

      public double[] getBinVolumeDensities()
      Returns the volume density per bin.
      Returns:
      array of volume densities in m3/m3
    • getTotalNumberDensity

      public double getTotalNumberDensity()
      Returns the total particle number density.
      Returns:
      total number density in particles/m3
    • getTotalVolumeConcentration

      public double getTotalVolumeConcentration()
      Returns the total particle volume concentration.
      Returns:
      volume concentration in m3_particle/m3_gas
    • getTotalMassConcentration

      public double getTotalMassConcentration()
      Returns the total particle mass concentration.
      Returns:
      mass concentration in kg/m3
    • getMedianDiameter

      public double getMedianDiameter()
      Returns the median (d50) diameter.
      Returns:
      median diameter in m
    • getMeanDiameter

      public double getMeanDiameter()
      Returns the number-weighted mean diameter.
      Returns:
      mean diameter in m
    • getGeometricStdDev

      public double getGeometricStdDev()
      Returns the geometric standard deviation of the size distribution.
      Returns:
      geometric standard deviation
    • getCurrentTime

      public double getCurrentTime()
      Returns the current simulation time.
      Returns:
      current time in seconds
    • isSolved

      public boolean isSolved()
      Returns whether the model has been solved.
      Returns:
      true if solved
    • getNumberOfBins

      public int getNumberOfBins()
      Returns the number of size bins.
      Returns:
      number of bins
    • getCondensedPhaseDensity

      private double getCondensedPhaseDensity()
      Returns the condensed phase density from the underlying CNT model.
      Returns:
      condensed phase density in kg/m3
    • toMap

      public Map<String,Object> toMap()
      Returns all results as a Map for serialization.
      Returns:
      map of result names to values
    • toJson

      public String toJson()
      Returns a JSON report of all results.
      Returns:
      JSON string
    • toString

      public String toString()
      Overrides:
      toString in class Object