Skip to content

Commit

Permalink
fixed types
Browse files Browse the repository at this point in the history
  • Loading branch information
tblanke committed Jan 30, 2024
1 parent 5b25169 commit d8cfd4b
Show file tree
Hide file tree
Showing 4 changed files with 1,172 additions and 237 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class HourlyGeothermalLoad(_LoadData):
# define parameters for conversion to monthly loads
START = pd.to_datetime("2019-01-01 00:00:00")
END = pd.to_datetime("2019-12-31 23:59:00")
HOURS_SERIES = pd.Series(pd.date_range(START, END, freq="1H"))
HOURS_SERIES = pd.Series(pd.date_range(START, END, freq="1h"))

def __init__(self, heating_load: ArrayLike | None = None,
cooling_load: ArrayLike | None = None,
Expand Down
96 changes: 95 additions & 1 deletion GHEtool/main_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def set_borefield(self, borefield: list[gt.boreholes.Borehole] = None) -> None:
"""
self.borefield = borefield

def create_rectangular_borefield(self, N_1: int, N_2: int, B_1: int, B_2: int, H: float, D: float = 1,
def create_rectangular_borefield(self, N_1: int, N_2: int, B_1: float, B_2: float, H: float, D: float = 1,
r_b: float = 0.075):
"""
This function creates a rectangular borefield.
Expand Down Expand Up @@ -280,6 +280,100 @@ def create_circular_borefield(self, N: int, R: float, H: float, D: float = 1, r_
self.set_borefield(borefield)
return borefield

def create_U_shaped_borefield(self, N_1: int, N_2: int, B_1: float, B_2: float, H: float, D: float = 1, r_b: float = 0.075):
"""
This function creates a U shaped borefield.
It calls the pygfunction module in the background.
The documentation of this function is based on pygfunction.
Parameters
----------
N_1 : int
Number of boreholes in the x direction
N_2 : int
Number of boreholes in the y direction
B_1 : int
Distance between adjacent boreholes in the x direction [m]
B_2 : int
Distance between adjacent boreholes in the y direction [m]
H : float
Borehole depth [m]
D : float
Borehole buried depth [m]
r_b : float
Borehole radius [m]
Returns
-------
pygfunction borefield object
"""
borefield = gt.boreholes.U_shaped_field(N_1, N_2, B_1, B_2, H, D, r_b)
self.set_borefield(borefield)
return borefield

def create_L_shaped_borefield(self, N_1: int, N_2: int, B_1: float, B_2: float, H: float, D: float = 1, r_b: float = 0.075):
"""
This function creates a L shaped borefield.
It calls the pygfunction module in the background.
The documentation of this function is based on pygfunction.
Parameters
----------
N_1 : int
Number of boreholes in the x direction
N_2 : int
Number of boreholes in the y direction
B_1 : int
Distance between adjacent boreholes in the x direction [m]
B_2 : int
Distance between adjacent boreholes in the y direction [m]
H : float
Borehole depth [m]
D : float
Borehole buried depth [m]
r_b : float
Borehole radius [m]
Returns
-------
pygfunction borefield object
"""
borefield = gt.boreholes.L_shaped_field(N_1, N_2, B_1, B_2, H, D, r_b)
self.set_borefield(borefield)
return borefield

def create_box_shaped_borefield(self, N_1: int, N_2: int, B_1: float, B_2: float, H: float, D: float = 1, r_b: float = 0.075):
"""
This function creates a box shaped borefield.
It calls the pygfunction module in the background.
The documentation of this function is based on pygfunction.
Parameters
----------
N_1 : int
Number of boreholes in the x direction
N_2 : int
Number of boreholes in the y direction
B_1 : int
Distance between adjacent boreholes in the x direction [m]
B_2 : int
Distance between adjacent boreholes in the y direction [m]
H : float
Borehole depth [m]
D : float
Borehole buried depth [m]
r_b : float
Borehole radius [m]
Returns
-------
pygfunction borefield object
"""
borefield = gt.boreholes.box_shaped_field(N_1, N_2, B_1, B_2, H, D, r_b)
self.set_borefield(borefield)
return borefield


@property
def borefield(self):
"""
Expand Down
Loading

0 comments on commit d8cfd4b

Please sign in to comment.