Layout

class chiller_sim.layout.grid.ChillerLayout(positions_m, base_cop, alpha, ages_years, max_cooling_kw)[source]

Bases: object

Immutable description of a chiller array layout and its ageing state.

Parameters:
positions_m: ndarray[tuple[Any, ...], dtype[float64]]
base_cop: float
alpha: float
ages_years: ndarray[tuple[Any, ...], dtype[float64]]
max_cooling_kw: float
property num_chillers: int

Return the total number of chillers in the grid.

classmethod from_positions(positions_m, ages_years, base_cop, max_cooling_kw, alpha=0.7)[source]

Build a layout from explicit (x, y) positions.

Parameters:
  • positions_m (ndarray, shape (n, 2)) – Each row is an (x, y) coordinate in metres.

  • ages_years (ndarray, shape (n,)) – Age of each chiller in years.

  • base_cop (float) – Nameplate COP for a brand-new chiller.

  • max_cooling_kw (float) – Nameplate cooling capacity in kW (must be > 0).

  • alpha (float, optional) – Age-degradation exponent, by default 0.7.

Return type:

ChillerLayout

classmethod create_grid(rows, cols, spacing_m, base_cop, max_cooling_kw, alpha=0.7, ages_years=None, seed=None)[source]

Build a regular rectangular chiller grid with optional random ages.

Parameters:
Return type:

ChillerLayout

__init__(positions_m, base_cop, alpha, ages_years, max_cooling_kw)
Parameters:
Return type:

None

class chiller_sim.layout.wind.WindConditions(speed_m_per_s, angle_deg)[source]

Bases: object

Snapshot of wind speed and direction at a single point in time.

Parameters:
speed_m_per_s: float
angle_deg: float
property unit_vector: ndarray[tuple[Any, ...], dtype[float64]]

Return a unit vector pointing in the wind direction.

property velocity_vector: ndarray[tuple[Any, ...], dtype[float64]]

Return the wind velocity vector (speed × direction).

__init__(speed_m_per_s, angle_deg)
Parameters:
Return type:

None

class chiller_sim.layout.wind.WindFn(*args, **kwargs)[source]

Bases: Protocol

Protocol for a callable that returns wind conditions at a given time.

__init__(*args, **kwargs)