Handcalculation Module

This subpackage contains various hand calculations used in fire safety engineering.

Design Fires Module

firescipy.handcalculation.design_fires.alpha_t_squared(alpha, Q_max, num_points=20)[source]

Compute the t-squared fire growth curve.

This function returns the time-dependent heat release rate (HRR) for a t² fire growth model, up to the point where the maximum HRR Q_max is reached. It uses the standard alpha-t² formulation:

\[Q(t) = \alpha t^2\]

The growth rate alpha can be passed either as a float (in kW/s²) or as a predefined growth classification string.

Reference:

Karlsson and Quintiere (2000), Enclosure Fire Dynamics, CRC Press LLC.

Parameters
  • alpha (str or float) – Fire growth rate, in kW/s², or growth classification as a string. Accepted strings: “slow”, “medium”, “fast” and “ultra fast”.

  • Q_max (float) – Maximum heat release rate, in kW.

  • num_points (int) – Number of time points for discretization. Default is 20.

Returns

  • t_growth (np.ndarray) – Time array in seconds, from 0 to the time at which Q_max is reached.

  • Q_growth (np.ndarray) – Corresponding heat release rate array in kW.

firescipy.handcalculation.design_fires.compute_decay(Q_max, decay_model, **kwargs)[source]

Compute the heat release rate (HRR) decay phase based on a selected model.

This function generates the decay portion of a desigen fire curve following the peak heat release rate Q_max, using one of several common decay model formulations. The output is a time–HRR pair describing the decline in fire intensity.

Supported decay models:
  • “t_squared” : A decreasing t² curve (Q ∝ (t_end − t)²).

  • “mirrored” : Reverses the corresponding t² growth curve.

  • “linear” : HRR linearly decreases from Q_max to 0 over time.

  • “exponential” : HRR decays exponentially with time.

Optional keyword arguments (**kwargs) depending on the selected model:
  • num_points (int): Number of points to discretize the curve (default: 20).

  • alpha_decay (str or float): Decay rate used for “t_squared” model.

  • alpha (str or float): Growth rate to mirror (for “mirrored” model).

  • t_end (float): End time in seconds (for “linear” or “exponential” models).

  • decay_constant (float): Time constant for exponential decay.

Parameters
  • Q_max (float) – Maximum heat release rate in kW at the start of the decay phase.

  • decay_model (str) – Type of decay model. Options: “t_squared”, “mirrored”, “linear”, “exponential”.

  • kwargs (Additional parameters for the decay model.) –

Returns

  • t_decay (np.ndarray) – Time array for the decay phase in seconds.

  • Q_decay (np.ndarray) – Corresponding heat release rate array for the decay phase in kW.

firescipy.handcalculation.design_fires.simple_design_fire(Q_max, Q_total, decay_model='t_squared', **kwargs)[source]

Generate a complete t-squared design fire with optional steady-state and flexible decay phases.

This function constructs a fire heat release rate (HRR) curve consisting of:
  1. A t-squared growth phase to reach Q_max,

  2. An optional steady-state plateau at Q_max (duration computed automatically),

  3. A decay phase using one of several models.

The total energy release (Q_total, in kJ) determines the duration of the steady-state phase such that the combined energy of all three phases matches the user input.

Reference:

Karlsson and Quintiere (2000), Enclosure Fire Dynamics, CRC Press LLC.

Parameters
  • Q_max (float) – Maximum heat release rate [kW].

  • Q_total (float) – Total desired energy release [kJ] over the fire curve.

  • decay_model (str) – Decay model type. Options: “t_squared”, “mirrored”, “linear”, “exponential”.

  • kwargs (dict) –

    Additional parameters for growth and decay phases. Common options:

    • alpha (str or float): Growth rate (e.g., “slow”, “medium”, or numeric value in kW/s²).

    • alpha_decay (str or float): Decay rate for “t_squared” decay.

    • t_end (float): End time (in s) for linear or exponential decay.

    • decay_constant (float): Exponential time constant for “exponential” decay.

    • num_points (int) Number of points per phase (default: 20).

Returns

  • t_combined (np.ndarray) – Time array (in seconds) combining growth, steady, and decay phases.

  • Q_combined (np.ndarray) – Corresponding heat release rate (in kW) at each time point.

Raises

ValueError – If Q_total is too small to cover the energy of the growth and decay phases alone, leaving no energy for a steady phase.