enex_analysis.ground_source_heat_pump

Ground source heat pump — physics-based cycle model with indoor unit.

Resolves a vapour-compression refrigerant cycle coupled to a borehole heat exchanger (BHE) on the source side and an indoor-air heat exchanger on the load side. Supports both cooling (Q_r_iu > 0) and heating (Q_r_iu < 0) modes.

At each time step the model finds the minimum-power operating point (compressor + BHE pump + indoor fan) via bounded 2-D optimisation over the evaporator and condenser approach temperature differences.

Borehole thermal response is tracked with pygfunction-based multi-borehole g-functions, enabling robust long-term ground temperature drift modelling.

Architecture mirrors GroundSourceHeatPumpBoiler for the BHE side and AirSourceHeatPump for the indoor-unit side.

Classes

GroundSourceHeatPump([ref, V_disp_cmp, ...])

Ground source heat pump with BHE and indoor-unit air heat exchange.

class enex_analysis.ground_source_heat_pump.GroundSourceHeatPump(ref='R32', V_disp_cmp=0.0001, eta_cmp_isen=0.8, dT_superheat=5.0, dT_subcool=5.0, UA_cond_design=None, UA_evap_design=None, dV_iu_fan_a_design=None, dP_iu_fan_design=60.0, A_cross_iu=None, eta_iu_fan_design=0.6, vsd_coeffs_iu=None, N_1=1, N_2=1, B=6.0, D_b=0, H_b=100, r_b=0.08, R_b=0.108, dV_b_f_lpm=20.04, k_s=2.0, c_s=800, rho_s=2000, Ts=16.0, E_pmp=100, hp_capacity=4000.0, T_a_room=27.0, t_max_s=31536000, dt_s=3600)[source]

Ground source heat pump with BHE and indoor-unit air heat exchange.

The refrigerant cycle is resolved via CoolProp. A bounded 2-D optimiser minimises total electrical input (E_cmp + E_pmp + E_iu_fan) over the evaporator and condenser approach temperatures.

Parameters:
  • ref (str)

  • V_disp_cmp (float)

  • eta_cmp_isen (Union[float, Callable])

  • dT_superheat (float)

  • dT_subcool (float)

  • UA_cond_design (float | None)

  • UA_evap_design (float | None)

  • dV_iu_fan_a_design (float | None)

  • dP_iu_fan_design (float)

  • A_cross_iu (float | None)

  • eta_iu_fan_design (float)

  • vsd_coeffs_iu (dict | None)

  • N_1 (int)

  • N_2 (int)

  • B (float)

  • D_b (float)

  • H_b (float)

  • r_b (float)

  • R_b (float)

  • dV_b_f_lpm (float)

  • k_s (float)

  • c_s (float)

  • rho_s (float)

  • Ts (float)

  • E_pmp (float)

  • hp_capacity (float)

  • T_a_room (float)

  • t_max_s (float)

  • dt_s (float)

__init__(ref='R32', V_disp_cmp=0.0001, eta_cmp_isen=0.8, dT_superheat=5.0, dT_subcool=5.0, UA_cond_design=None, UA_evap_design=None, dV_iu_fan_a_design=None, dP_iu_fan_design=60.0, A_cross_iu=None, eta_iu_fan_design=0.6, vsd_coeffs_iu=None, N_1=1, N_2=1, B=6.0, D_b=0, H_b=100, r_b=0.08, R_b=0.108, dV_b_f_lpm=20.04, k_s=2.0, c_s=800, rho_s=2000, Ts=16.0, E_pmp=100, hp_capacity=4000.0, T_a_room=27.0, t_max_s=31536000, dt_s=3600)[source]
Parameters:
  • ref (str)

  • V_disp_cmp (float)

  • eta_cmp_isen (Union[float, Callable])

  • dT_superheat (float)

  • dT_subcool (float)

  • UA_cond_design (float | None)

  • UA_evap_design (float | None)

  • dV_iu_fan_a_design (float | None)

  • dP_iu_fan_design (float)

  • A_cross_iu (float | None)

  • eta_iu_fan_design (float)

  • vsd_coeffs_iu (dict | None)

  • N_1 (int)

  • N_2 (int)

  • B (float)

  • D_b (float)

  • H_b (float)

  • r_b (float)

  • R_b (float)

  • dV_b_f_lpm (float)

  • k_s (float)

  • c_s (float)

  • rho_s (float)

  • Ts (float)

  • E_pmp (float)

  • hp_capacity (float)

  • T_a_room (float)

  • t_max_s (float)

  • dt_s (float)

analyze_steady(Q_r_iu, T0, T_a_room=None, *, return_dict=True)[source]

Run a steady-state performance snapshot.

Parameters:
  • Q_r_iu (float)

  • T0 (float)

  • T_a_room (float | None)

  • return_dict (bool)

Return type:

dict | DataFrame

analyze_dynamic(simulation_period_sec, dt_s, Q_r_iu_schedule, T0_schedule, T_a_room_schedule=None, result_save_csv_path=None)[source]

Time-stepping dynamic simulation with BHE superposition.

Parameters:
  • simulation_period_sec (int)

  • dt_s (int)

  • result_save_csv_path (str | None)

Return type:

DataFrame

postprocess_exergy(df)[source]

Compute GSHP-specific exergy: 6 subsystems × (X_in, Xc, X_out).

Parameters:

df (DataFrame)

Return type:

DataFrame