CoaxialPipe API Reference
geoloop.geoloopcore.CoaxialPipe.CoaxialPipe
Bases: CustomPipe
This class is used to evaluate the thermal resistance network of a Coaxial borehole.
In its default mode the object is marked by depth-indepedent design properties which can be altered, and can also access other methods from its baseclass CustomPipe.
It uses pygfunction of Cimmino and Cook [#Cimmino2024] for the determination of the thermal resistivity network of the borehole
It contains information regarding the physical dimensions and thermal characteristics of the pipes and the grout material, as well as methods (through its base class) to evaluate fluid temperatures and heat extraction rates based on the work of Hellstrom [#Single-Hellstrom1991]. Internal borehole thermal resistances are evaluated using the multipole method of Claesson and Hellstrom [#Single-Claesson2011b].
References
.. [#Cimmino2022] Cimmino, M., & Cook, J.C. (2022). pygfunction 2.2: New features and improvements in accuracy and computational efficiency. In Research Conference Proceedings, IGSHPA Annual Conference 2022 (pp. 45-52). International Ground Source Heat Pump Association. DOI: https://doi.org/10.22488/okstate.22.000015. .. [#Single-Hellstrom1991] Hellstrom, G. (1991). Ground heat storage. Thermal Analyses of Duct Storage Systems I: Theory. PhD Thesis. University of Lund, Department of Mathematical Physics. Lund, Sweden. .. [#Single-Claesson2011b] Claesson, J., & Hellstrom, G. (2011). Multipole method to calculate borehole thermal resistances in a borehole heat exchanger. HVAC&R Research, 17(6), 895-911.
__init__
__init__(
r_in: ndarray | float,
r_out: ndarray | float,
borehole,
k_g: float | ndarray,
k_p: float | ndarray,
k_s: float = 1.0,
J: int = 2,
m_flow: float = 1.0,
T_f: float = 10.0,
fluid_str: str = "Water",
percent: float = 100.0,
epsilon: float = 1e-06,
ncalcsegments: int = 1,
R_p: list[ndarray] | None = None,
) -> None
Initialize a coaxial borehole pipe model and compute its thermal and hydraulic properties.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
r_in
|
float or ndarray
|
Inner radii of the coaxial pipes (m). If scalar, copied for both inlet and outlet pipes. (first radius is largest as this is corresponding to the inlet) |
required |
r_out
|
float or ndarray
|
Outer radii of the coaxial pipes (m). If scalar, copied for both inlet and outlet pipes. |
required |
borehole
|
Borehole
|
Borehole geometry object. |
required |
k_g
|
float or ndarray
|
Grout thermal conductivity (W/m·K). If array-like, represents values per segment. |
required |
k_p
|
float or ndarray
|
Pipe wall thermal conductivity (W/m·K). |
required |
k_s
|
float
|
Soil thermal conductivity (W/m·K). Default is 1.0. |
1.0
|
J
|
int
|
Number of multipoles used in the multipole expansion. Default is 2. |
2
|
m_flow
|
float
|
Total mass flow rate in the BHE (kg/s). |
1.0
|
T_f
|
float
|
Fluid temperature at inlet (°C). |
10.0
|
fluid_str
|
str
|
Working fluid name for thermal property lookup. |
'Water'
|
percent
|
float
|
Concentration of glycol or other additive (%). |
100.0
|
epsilon
|
float
|
Relative pipe roughness for hydraulic calculations. |
1e-06
|
ncalcsegments
|
int
|
Number of depth segments used in thermal resistance evaluation. |
1
|
R_p
|
list of ndarray
|
Precomputed pipe thermal resistances for each segment. If None, resistances are computed automatically. Default is empty list, and routines will calculate the resistivity based on the pipe dimensions and thermal conductivity. |
None
|
Notes
- Creates a :class:
gt.pipes.Coaxialobject for use in pygfunction. - Computes convective coefficients, fluid properties, and initial delta-circuit thermal resistance matrices.
create_coaxial
Return the underlying pygfunction :class:Coaxial object.
Returns:
| Type | Description |
|---|---|
Coaxial
|
The pygfunction coaxial borehole object representing the thermal resistance network. |
init_thermal_resistances
Initialize pipe and grout thermal resistances for all borehole segments.
This routine is called from the B2G.runsimulation method, in order to generate thermal resistances based on actual segments determined by len(k_g) and len(R_p).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
k_g
|
ndarray
|
Grout thermal conductivity values for each segment. |
required |
R_p
|
list of ndarray
|
Pipe thermal resistance values for each segment. |
required |
update_scaleflow
update_scaleflow(
scaleflow: float = 1.0,
forceupdate: bool = False,
initialize_stored_coeff: bool = True,
) -> None
Update the scaling of flow rate and associated thermal resistance network.
This method adjusts the flow rate scaling and updates the thermal resistance network based on the new flow rate. Optionally, it can force an update and reinitialize stored coefficients.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scaleflow
|
float
|
Scaling factor for flow rate. Default is 1.0. |
1.0
|
forceupdate
|
bool
|
If True, forces update of thermal resistances even if changes are small. Default is False. |
False
|
initialize_stored_coeff
|
bool
|
If True, reinitializes stored thermal resistance coefficients. Default is True. |
True
|
Returns:
| Type | Description |
|---|---|
None
|
Updates internal state in place. |
get_temperature_depthvar
get_temperature_depthvar(
T_f_in: float,
signpower: float,
Rs: ndarray,
soil_props: SoilProperties,
nsegments: int = 10,
) -> tuple
Compute outlet temperature and thermal performance for depth-variable borehole.
This method partitions the borehole depth into segments and iteratively computes fluid temperatures, borehole temperatures, and heat flows based on thermal resistances and soil properties.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
T_f_in
|
float
|
Inlet fluid temperature (°C). |
required |
signpower
|
float
|
Sign and magnitude for initial power guess. |
required |
Rs
|
ndarray
|
Array of thermal resistances for each segment. |
required |
soil_props
|
SoilProperties
|
Object defining soil properties and temperature gradient. |
required |
nsegments
|
int
|
Number of depth segments. Default is 10. |
10
|
Returns:
| Name | Type | Description |
|---|---|---|
T_f_out |
float
|
Outlet fluid temperature (°C). |
power |
float
|
Heat extraction or injection power (W). |
Reff |
float
|
Effective thermal resistance (m·K/W). |
ptemp |
ndarray
|
Fluid temperatures per segment. |
Tb |
ndarray
|
Borehole temperatures per segment. |
qbz |
ndarray
|
Heat flow per segment (W). |