Skip to content

ode_heatloop API Reference

geoloop.geoloopcore.b2g.ode_heatloop

ode_heatloop(
    time: ndarray,
    dt: float,
    qscale: ndarray,
    T_f_in_derivs: ndarray,
    b2g: B2G,
) -> np.ndarray

Integrates the borehole heat transfer equations over time using an ODE solver.

Solves the transient 2D axisymmetric heat transfer between fluid, pipes, borehole, and ground. Uses a simple explicit upwind scheme and Dirichlet boundary conditions for the inlet temperatures.

Parameters:

Name Type Description Default
time ndarray

Array of time points [h] for integration.

required
dt float

Timestep scaling in seconds.

required
qscale ndarray

Time array of scaling factors of the reference flow (time dimension)

required
T_f_in_derivs ndarray

Time derivative of inlet fluid temperature [°C/h].

required
b2g B2G

Borehole-to-ground model containing pipe and axisymmetric grid information.

required

Returns:

Type Description
ndarray

Temperature array of shape (len(time), nx, ny, nz), where nx, ny, nz are the dimensions of b2g.ag (grid).