optframework.pbm.pbm_post module
Created on Fri Feb 7 08:58:15 2025
@author: px2030
- class optframework.pbm.pbm_post.PBMPost(solver)[source]
Bases:
object
Post-processing module for Population Balance Model (PBM) solver.
Provides visualization and analysis tools for PBM results, including moment comparisons and distribution function plots.
- plot_moments_comparison(moments, moments_QMOM, moments_GQMOM)[source]
Plot visual comparison of QMOM and GQMOM moments against original moments.
Creates side-by-side plots showing absolute moment values and relative errors for QMOM and GQMOM reconstruction methods.
Parameters
- momentsarray-like
Original moments (true values)
- moments_QMOMarray-like
Moments calculated using QMOM
- moments_GQMOMarray-like
Moments calculated using GQMOM
- plot_NDF_comparison(x, NDF, NDF_QMOM, NDF_GQMOM)[source]
Plot visual comparison of QMOM and GQMOM NDF against original NDF.
Compares reconstructed normalized distribution functions from different quadrature methods against the original distribution.
Parameters
- xarray-like
x-coordinates for the distribution
- NDFarray-like
Original normalized distribution function (true values)
- NDF_QMOMarray-like
NDF calculated using QMOM
- NDF_GQMOMarray-like
NDF calculated using GQMOM
- plot_nodes_weights_comparision(x, NDF, nodes, weights, nodes_G, weights_G)[source]
Plot comparison of quadrature nodes and weights for QMOM and GQMOM.
Shows original distribution alongside quadrature nodes and weights from both QMOM and GQMOM methods on dual y-axes.
Parameters
- xarray-like
x-coordinates for the distribution
- NDFarray-like
Original normalized distribution function
- nodesarray-like
QMOM quadrature nodes
- weightsarray-like
QMOM quadrature weights
- nodes_Garray-like
GQMOM quadrature nodes
- weights_Garray-like
GQMOM quadrature weights