thermal_cable_model.loads — Load Profiles

Dynamic electrical load (current) profiles.

Supports constant, cyclic, arbitrary time-series, and CSV import.

class LoadProfile[source]

Bases: object

Piece-wise-linear current profile I(t).

Parameters:
  • times (array-like) – Monotonically increasing time stamps [s].

  • currents (array-like) – RMS current values [A] at each time stamp.

__init__(times, currents)[source]
Parameters:
current_at(t)[source]

Linearly interpolated current at time t [s].

Parameters:

t (float)

Return type:

float

current_array(times)[source]

Vectorised interpolation.

Parameters:

times (ndarray)

Return type:

ndarray

property duration: float
classmethod constant(current_a, duration_s)[source]

Constant current for a given duration.

Parameters:
Return type:

LoadProfile

classmethod cyclic(peak_current, base_current, period_s, duty_cycle, n_cycles)[source]

Rectangular on/off cyclic load.

Parameters:
  • peak_current (float) – Current during on and off phases [A].

  • base_current (float) – Current during on and off phases [A].

  • period_s (float) – Duration of one full cycle [s].

  • duty_cycle (float) – Fraction of period at peak current (0–1).

  • n_cycles (int) – Number of complete cycles.

Return type:

LoadProfile

classmethod daily_pattern(hourly_currents, n_days=1)[source]

Create a profile from 24 hourly current values repeated for n_days.

Parameters:
  • hourly_currents (list of 24 floats) – Current [A] for each hour of the day (00:00–23:00).

  • n_days (int) – Number of days to repeat.

Return type:

LoadProfile

classmethod from_csv(filepath, time_col=0, current_col=1, delimiter=',', skip_header=1)[source]

Load a profile from a two-column CSV (time [s], current [A]).

Parameters:
Return type:

LoadProfile