opcsim 0.5.0
  • API
  • Tutorial
  • Gallery
  • Site
      • Installation
      • Contributing
      • API reference
      • Tutorial
      • Example gallery
  • Page
      • opcsim.OPC.integrate

opcsim.OPC.integrate¶

OPC.integrate(self, distribution, dmin=0.0, dmax=1.0, weight='number', rh=0.0, \*\*kwargs)¶

Integrate the distribution according to the OPC for any [weight].

By default, this method returns the total number of particles between 0-1 microns. It can be used to calculate PM values at any breakpoint. When calculating a PM value for a breakpoint that falls within a bin, a simple percentage of the bin is used. For example, if you calculate PM1 and the bin that contains 1-micron actually covers 0.5 to 1.5 microns, then 1/2 the mass from that bin will count towards the PM1 value.

Parameters
distribution: AerosolDistribution

The aerosol distribution to be evaluated.

dmin: float

The minimum particle diameter [microns] to integrate from.

dmax: float

The maximum particle diameter [microns] to integrate to.

weight{‘number’ | ‘surface’ | ‘volume’}

Choose how to weight the pdf. Default is number.

rh: float

The relative humidity in percent (0-100).

Returns
rv: float

The total [weight] between dmin and dmax. By default, the total number of particles (i.e. weight=’number’) are returned.

Examples

Calculate the total number of particles between 0-1 microns for the Urban distribution.

>>> opc = opcsim.OPC(n_bins=5)
>>> opc.calibrate(material="psl")
>>> d = opcsim.load_distribution("urban")
>>> ntot = opc.integrate(d, dmin=0., dmax=1., weight="number", rh=0.)

Calculate PM1 for the Urban Distribution when RH = 0%

>>> opc = opcsim.OPC(n_bins=5)
>>> opc.calibrate(material="psl")
>>> d = opcsim.load_distribution("urban")
>>> ntot = opc.integrate(d, dmin=0., dmax=1., weight="mass", rh=0., rho=1.5)

Calculate PM2.5 for the Urban Distribution when RH = 50%

>>> opc = opcsim.OPC(n_bins=5)
>>> opc.calibrate(material="psl")
>>> d = opcsim.load_distribution("urban")
>>> ntot = opc.integrate(d, dmin=0., dmax=2.5, weight="mass", rh=50., rho=1.5)

Back to top

Source

© Copyright 2016-2020, David H Hagan and Jesse H Kroll.
Created using Sphinx 3.0.3.