Class PopulationBalanceModel
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 Summary
FieldsModifier and TypeFieldDescriptionprivate double[]Bin center diameters in m.private double[]Bin edge diameters (numberOfBins + 1) in m.private double[]Bin center radii in m.private double[]Bin widths (diameter range per bin) in m.private ClassicalNucleationTheoryThe CNT model providing nucleation rate and growth parameters.private doubleCurrent simulation time in seconds.private doubleGeometric standard deviation.private doubleMaximum bin diameter in m.private doubleMean diameter (number-weighted) in m.private doubleMedian (d50) diameter in m.private doubleMinimum bin diameter in m.private double[]Number density per bin in particles/m3.private intNumber of size bins.private booleanWhether the model has been solved.private intNumber of time steps.private doubleTotal mass concentration in kg/m3.private doubleTotal number density in particles/m3.private doubleTotal simulation time in seconds.private doubleTotal volume concentration in m3_particles/m3_gas.private double[]Volume density per bin in m3/m3 (volume concentration). -
Constructor Summary
ConstructorsConstructorDescriptionCreates a PopulationBalanceModel using nucleation parameters from a ClassicalNucleationTheory model. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidapplyCoagulation(double kernel, double dt) Applies Brownian coagulation using a simplified sectional approach.private voidapplyCondensationGrowth(double growthRateRad, double dt) Applies condensation growth by shifting particles to larger bins.private voidapplyNucleation(int nucleationBin, double rate, double dt) Adds nucleated particles to the nucleation bin.private voidComputes the median (d50) diameter from the cumulative distribution.private voidComputes statistics from the current size distribution.private intfindBinIndex(double diameter) Finds the bin index closest to a given diameter.double[]Returns the bin center diameters.double[]Returns the bin edge diameters (numberOfBins + 1 values).double[]Returns the number density per bin.double[]Returns the volume density per bin.private doubleReturns the condensed phase density from the underlying CNT model.doubleReturns the current simulation time.doubleReturns the geometric standard deviation of the size distribution.doubleReturns the number-weighted mean diameter.doubleReturns the median (d50) diameter.intReturns the number of size bins.doubleReturns the total particle mass concentration.doubleReturns the total particle number density.doubleReturns the total particle volume concentration.private voidInitializes the geometric bin structure.booleanisSolved()Returns whether the model has been solved.voidsetMaxDiameter(double diameter) Sets the maximum diameter of the size distribution.voidsetMinDiameter(double diameter) Sets the minimum diameter of the size distribution.voidsetNumberOfBins(int bins) Sets the number of size bins for the discretization.voidsetTimeSteps(int steps) Sets the number of time steps for the simulation.voidsetTotalTime(double time) Sets the total simulation time.voidsolve()Solves the population balance equation by time-marching with operator splitting.toJson()Returns a JSON report of all results.toMap()Returns all results as a Map for serialization.toString()
-
Field Details
-
cnt
The CNT model providing nucleation rate and growth parameters. -
numberOfBins
private int numberOfBinsNumber of size bins. -
minDiameter
private double minDiameterMinimum bin diameter in m. -
maxDiameter
private double maxDiameterMaximum bin diameter in m. -
totalTime
private double totalTimeTotal simulation time in seconds. -
timeSteps
private int timeStepsNumber of time steps. -
binDiameters
private double[] binDiametersBin center diameters in m. -
binRadii
private double[] binRadiiBin center radii in m. -
binEdges
private double[] binEdgesBin edge diameters (numberOfBins + 1) in m. -
binWidths
private double[] binWidthsBin widths (diameter range per bin) in m. -
numberDensity
private double[] numberDensityNumber density per bin in particles/m3. -
volumeDensity
private double[] volumeDensityVolume density per bin in m3/m3 (volume concentration). -
totalNumberDensity
private double totalNumberDensityTotal number density in particles/m3. -
totalVolumeConcentration
private double totalVolumeConcentrationTotal volume concentration in m3_particles/m3_gas. -
totalMassConcentration
private double totalMassConcentrationTotal mass concentration in kg/m3. -
medianDiameter
private double medianDiameterMedian (d50) diameter in m. -
meanDiameter
private double meanDiameterMean diameter (number-weighted) in m. -
geometricStdDev
private double geometricStdDevGeometric standard deviation. -
currentTime
private double currentTimeCurrent simulation time in seconds. -
solved
private boolean solvedWhether the model has been solved.
-
-
Constructor Details
-
PopulationBalanceModel
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:
- Add nucleated particles at the critical radius bin
- Apply condensation growth (shift particles to larger bins)
- 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 particlesrate- 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/sdt- 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/sdt- 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
-
toJson
-
toString
-