carm.thermal_interference package

Submodules

carm.thermal_interference.fls module

Finite Line Source (FLS) module.

Computes the far-field thermal response of the borehole field using the Finite Line Source analytical model. Handles both single and multi-borehole configurations via precomputed response increments and a superposition scheme.

The FLS uses the real part (the borehole as a line source in an infinite medium) and, by default, the image part (a mirrored sink above the ground surface). The image keeps the FLS perturbation at zero on the surface, which then stays at the undisturbed (Kusuda) temperature.

class carm.thermal_interference.fls.FiniteLineSolution[source]

Bases: object

Finite Line Source thermal response for a borehole field.

Computes the FLS response increments once, at construction, and at each time step superposes them over the heat load history to get the borehole wall temperature perturbation. The method is described in FLS Calculation Methods.

Parameters:
  • physicalmodel (PhysicalModel) – Full physical model of the BHE system.

  • n_steps (int) – Total number of simulation time steps.

  • time_hist (NDArray) – Cumulative simulation times [s], shape (n_steps,). Must be uniform (dt, 2 dt, …).

  • fls_mode (str) – 'sqrt' or 'continuous', see FLS Calculation Methods.

  • fls_image (bool) – True (default) adds the image part, so the FLS perturbation is zero at the ground surface. False uses the real part only.

  • cache_dir (str, Path or None) – Folder where the increments are saved and reused. None (default) keeps them in memory and saves nothing.

physicalmodel

Full physical model of the BHE system.

Type:

PhysicalModel

n_steps

Total number of simulation time steps.

Type:

int

time_hist

Cumulative simulation times [s], shape (n_steps,).

Type:

NDArray

response_matrix

Cumulative FLS response, shape (n_steps + 1, n_bhes, n_bhes), rebuilt from the increments on each access. Not used by the solver.

Type:

NDArray

CACHE_FORMAT_VERSION = 3
N_THETA = 8
property response_matrix: ndarray[tuple[Any, ...], dtype[_ScalarT]]

Module contents

class carm.thermal_interference.FiniteLineSolution[source]

Bases: object

Finite Line Source thermal response for a borehole field.

Computes the FLS response increments once, at construction, and at each time step superposes them over the heat load history to get the borehole wall temperature perturbation. The method is described in FLS Calculation Methods.

Parameters:
  • physicalmodel (PhysicalModel) – Full physical model of the BHE system.

  • n_steps (int) – Total number of simulation time steps.

  • time_hist (NDArray) – Cumulative simulation times [s], shape (n_steps,). Must be uniform (dt, 2 dt, …).

  • fls_mode (str) – 'sqrt' or 'continuous', see FLS Calculation Methods.

  • fls_image (bool) – True (default) adds the image part, so the FLS perturbation is zero at the ground surface. False uses the real part only.

  • cache_dir (str, Path or None) – Folder where the increments are saved and reused. None (default) keeps them in memory and saves nothing.

physicalmodel

Full physical model of the BHE system.

Type:

PhysicalModel

n_steps

Total number of simulation time steps.

Type:

int

time_hist

Cumulative simulation times [s], shape (n_steps,).

Type:

NDArray

response_matrix

Cumulative FLS response, shape (n_steps + 1, n_bhes, n_bhes), rebuilt from the increments on each access. Not used by the solver.

Type:

NDArray

CACHE_FORMAT_VERSION = 3
N_THETA = 8
property response_matrix: ndarray[tuple[Any, ...], dtype[_ScalarT]]