Skip to content

Commit

Permalink
Looking for optimal switching time and influence on resulting borefie…
Browse files Browse the repository at this point in the history
…ld length
  • Loading branch information
LoneMeertens committed Jun 7, 2024
1 parent 4970645 commit 30cf430
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions GHEtool/VariableClasses/Dynamic_borhole_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,9 @@ def calc_sts_g_functions(self, final_time=None) -> tuple:
Tb = [self.init_temp]
diff = [0]
qb=[]
gFunc_CHS = []
g_comb_comp = []
g_comp =[]

_dl = np.zeros(self.num_cells - 1)
_d = np.zeros(self.num_cells)
Expand Down Expand Up @@ -427,6 +430,12 @@ def fill_f2(fx_2, cell):

threshold_steady_state = 1- (self.resist_bh_effective - (radial_cell[CellProps.TEMP, 0]-radial_cell[CellProps.TEMP, self.bh_wall_idx]))
qb.append(1- (self.resist_bh_effective - (radial_cell[CellProps.TEMP, 0]-radial_cell[CellProps.TEMP, self.bh_wall_idx])))

gFunc_CHS.append(2*np.pi*gt.heat_transfer.cylindrical_heat_source(time, self.ground_ghe.alpha(), self.boreholes[0].r_b,self.boreholes[0].r_b))
g_comp.append(self.c_0 * ((radial_cell[CellProps.TEMP, 0] - init_temp) / heat_flux - self.resist_bh_effective))

print('CHS', gFunc_CHS, len(gFunc_CHS))
print('g ', g_comp, len(g_comp))

T0 = radial_cell[CellProps.TEMP, 0]
TBH = radial_cell[CellProps.TEMP, self.bh_wall_idx]
Expand All @@ -436,8 +445,6 @@ def fill_f2(fx_2, cell):
Tb.append(TBH)
diff.append(d)



lntts.append(time)
plottime.append(time)

Expand All @@ -448,8 +455,7 @@ def fill_f2(fx_2, cell):

if time >= final_time - time_step:
break



# quickly chop down the total values to a more manageable set
num_intervals = int(self.x * 30)
g_tmp = interp1d(lntts, g)
Expand Down

0 comments on commit 30cf430

Please sign in to comment.