Skip to content

bpip

bpip

PyAERMOD BPIP Module - Building Profile Input Program Calculations

Computes direction-dependent building dimensions for AERMOD's PRIME downwash algorithm. AERMOD requires 36 values (one per 10° wind sector) for each building parameter: BUILDHGT, BUILDWID, BUILDLEN, XBADJ, YBADJ.

This module provides: - Building: rectangular building geometry definition - BPIPCalculator: direction-dependent projection engine - BPIPResult: container for the 36-value arrays

This is verified against EPA's own BPIP-PRIME Fortran (bpipprime.zip on SCRAM), which reproduces EPA's shipped reference output for all eight of its example cases. Within the scope below the agreement is exact -- every direction, to the 0.005 that BPIP's F8.2 output can express. See tests/test_bpip_known_answers.py.

Two things here are not pure projection geometry, and both come straight from Bpipprm.for rather than from first principles:

  • the two influence tests (:meth:BPIPCalculator._in_downwash_zone and :meth:BPIPCalculator._in_gep_zone), which differ from each other; and
  • the GEP clamp -- when a direction's wake-effect height would exceed the stack's GEP stack height, BPIP reports the GEP-controlling structure's height and width instead of that direction's projection. This produces a flat cap across a run of directions that depends on the stack position, not on the footprint alone.

Scope. This module covers a single building with a single tier. EPA BPIP additionally combines multiple structures and tiers, choosing the controlling combination per wind direction, and reports GEP stack heights. For a regulatory submittal, run EPA's BPIP-PRIME and use its output; this module is for building decks, screening and what-if geometry work.

Reference: EPA BPIP User's Guide, AERMOD Implementation Guide (Section 3.3)

Building dataclass

Rectangular building footprint for BPIP calculations.

Parameters:

Name Type Description Default
building_id str

Identifier for this building (e.g., "BLDG1").

required
corners list of (float, float)

Corner coordinates of the footprint polygon, in the same coordinate system as sources/receptors (typically UTM meters). Three or more; EPA's own test cases include a six-corner L-shape.

required
height float

Building height in meters (above ground level).

required
tiers list of (float, float)

Multi-tier definition as (tier_height, coverage_fraction) pairs. Each tier_height must exceed the base height. Coverage fraction is the proportion of the footprint covered by that tier (0-1). If omitted, the building is treated as a single-tier structure.

None

get_effective_height

get_effective_height() -> float

Effective building height for downwash calculations.

For single-tier buildings, returns the base height. For multi-tier, returns the coverage-fraction-weighted average of all tier heights plus the base contribution.

get_footprint_area

get_footprint_area() -> float

Compute footprint area using the shoelace formula.

Returns:

Type Description
float

Area of the footprint polygon in square meters.

get_centroid

get_centroid() -> Tuple[float, float]

Compute centroid (average of corner coordinates).

Returns:

Type Description
tuple of (float, float)

(x, y) centroid coordinates.

BPIPResult dataclass

Container for 36 direction-dependent building parameters.

Each list contains exactly 36 values corresponding to wind directions 10°, 20°, ..., 360° (measured clockwise from north).

BPIPCalculator

Computes direction-dependent building dimensions for AERMOD PRIME.

For each of 36 wind directions (10° increments), the algorithm:

  1. Translates building corners so the stack is at the origin
  2. Rotates corners to align the wind direction with the +Y axis
  3. Computes projected width (perpendicular to wind) and length (along wind)
  4. Computes XBADJ (along-flow coordinate of the upwind face) and YBADJ (negated crosswind midpoint of the projection)
  5. Zeroes all five values when the stack is outside the GEP structure influence zone

Parameters:

Name Type Description Default
building Building

The building geometry.

required
stack_x float

X-coordinate of the affected stack.

required
stack_y float

Y-coordinate of the affected stack.

required
influence_test (bool, keyword - only)

Apply the GEP structure influence zone test. Set False only to inspect raw projected geometry; a deck built with it off will apply downwash where EPA BPIP applies none.

True

calculate_all

calculate_all() -> BPIPResult

Calculate building parameters for all 36 wind directions.

Directions are 10°, 20°, ..., 360° (AERMOD convention).

Returns:

Type Description
BPIPResult

Contains 36-value arrays for each building parameter.