optframework.examples.simple_mcpbe module
Created on Wed Jan 15 09:12:46 2025
@author: px2030
MCPBESolver Basic Usage Example
This script demonstrates the basic usage of the Monte Carlo Population Balance Equation (MCPBE) solver for simulating particle agglomeration and breakage processes using stochastic methods.
The MCPBE solver uses Monte Carlo techniques to track individual particles/agglomerates explicitly, providing detailed particle size distributions and statistical information about the evolution process. Unlike dPBE and PBM, MC-PBE can capture the full complexity of particle interactions and size distributions without assumptions about distribution shapes.
Key Features: - Support for 1D (single component) and 2D (multi-component) systems - Configurable agglomeration and breakage kernels - Statistical analysis through multiple Monte Carlo realizations - Various initial particle size distribution shapes
- optframework.examples.simple_mcpbe.run_mcpbe(m)[source]
Execute multiple Monte Carlo realizations and calculate statistical moments.
This function runs the MCPBE solver N_MC times with different random seeds to obtain statistically reliable results. Each realization provides one possible evolution pathway of the particle system.
Parameters
- mMCPBESolver
Initialized MCPBE solver instance with configured parameters
Returns
- mu_mcnumpy.ndarray
Mean moments across all Monte Carlo realizations Shape: (n_moments, n_components, n_time_steps)
- std_mu_mcnumpy.ndarray
Standard deviation of moments across realizations
- t_runfloat
Total computation time for all realizations [seconds]