Skip to content

PYGFIELD_ana API Reference

geoloop.geoloopcore.pygfield_ana.PYGFIELD_ana

Field-level simulation driver using pygfunction and an analytical approximation for inclined / curved boreholes.

This class builds a borehole field from a BoreholeDesign (which may include inclined/curved boreholes approximated by segments), computes the g-function, runs load aggregation and finally evaluates pipe temperatures using a CustomPipe / CoaxialPipe model.

__init__

__init__(
    bh_design: BoreholeDesign,
    custom_pipe: CustomPipe,
    soil_props: SoilProperties,
    sim_params: SimulationParameters,
)

Initialize the PYGFIELD_ana model with a given borehole field configuration.

Parameters:

Name Type Description Default
bh_design BoreholeDesign

Design describing field layout, inclinations and borehole parameters.

required
custom_pipe CustomPipe or CoaxialPipe

Pipe/borehole model used for temperature calculations.

required
soil_props SoilProperties

Soil parameters and temperature profile provider.

required
sim_params SimulationParameters

Simulation control parameters (time vector, loads, flow, run type).

required

runsimulation

runsimulation()

Dispatch to the appropriate simulation routine based on run_type.

runsimulation_power

runsimulation_power() -> tuple

Run a power-driven simulation (POWER) for the borehole field.

Notes

The method: - Converts the provided pipe model to a pygfunction-compatible object (if necessary), - Builds a borehole field according to BoreholeDesign (inclined/curved boreholes are approximated by segments), - Computes the g-function for the field, - Initializes load aggregation (Claesson-Javed) and applies the simulated loads, and - Calls the pipe model to obtain fluid temperatures and extraction rates.

Returns:

Type Description
tuple

(hours, Q_b, flowrate, qsign, T_fi, T_fo, T_bave, z, zseg, T_b, T_ftimes, -qbzseg, h_fpipes)