From 30cf4307dc7c0bfbc87e3ccc345fb290e1300f02 Mon Sep 17 00:00:00 2001 From: u0169319 Date: Fri, 7 Jun 2024 17:49:30 +0200 Subject: [PATCH] Looking for optimal switching time and influence on resulting borefield length --- GHEtool/VariableClasses/Dynamic_borhole_model.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/GHEtool/VariableClasses/Dynamic_borhole_model.py b/GHEtool/VariableClasses/Dynamic_borhole_model.py index 82b94b65..86af727e 100644 --- a/GHEtool/VariableClasses/Dynamic_borhole_model.py +++ b/GHEtool/VariableClasses/Dynamic_borhole_model.py @@ -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) @@ -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] @@ -436,8 +445,6 @@ def fill_f2(fx_2, cell): Tb.append(TBH) diff.append(d) - - lntts.append(time) plottime.append(time) @@ -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)