breos.battery.compute_cell_temperature#

breos.battery.compute_cell_temperature(T_ambient_C, charge_power_w, discharge_power_w, charge_eff, discharge_eff, thermal_resistance_kw=0.05)[source]#

Compute battery cell temperature using a quasi-steady-state lumped thermal model.

Heat is generated by ohmic losses during charge and discharge. The cell temperature rises above ambient proportional to heat dissipation and thermal resistance of the enclosure.

Valid for hourly (or longer) timesteps where the battery thermal mass reaches approximate equilibrium within each step.

Parameters:
  • T_ambient_C (float) – Ambient temperature (C)

  • charge_power_w (float) – Power flowing into the battery this step (W, DC side)

  • discharge_power_w (float) – Power drawn from the battery this step (W, DC side)

  • charge_eff (float) – Charge efficiency (0-1)

  • discharge_eff (float) – Discharge efficiency (0-1)

  • thermal_resistance_kw (float) – Thermal resistance in K/W

Return type:

float

Returns:

Cell temperature (C)