Skip to content

Commit

Permalink
Comparing FLS, CHS and ILS g functions in pursuit to optimal switing …
Browse files Browse the repository at this point in the history
…time
  • Loading branch information
LoneMeertens committed Jun 7, 2024
1 parent c84f124 commit 4970645
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
5 changes: 3 additions & 2 deletions GHEtool/VariableClasses/Dynamic_borhole_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,13 +441,14 @@ def fill_f2(fx_2, cell):
lntts.append(time)
plottime.append(time)

"""
if threshold_steady_state > 1 or time >= final_time - time_step:
break

"""

if time >= final_time - time_step:
break
"""


# quickly chop down the total values to a more manageable set
num_intervals = int(self.x * 30)
Expand Down
12 changes: 12 additions & 0 deletions GHEtool/VariableClasses/Short_term_effects.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,27 @@ def evaluate_g_function(self, time):

self.gFunc = self.solver.solve(time, self.alpha)

self.gFunc_CHS = gt.heat_transfer.cylindrical_heat_source(self.time, self.alpha, self.boreholes[0].r_b,self.boreholes[0].r_b)
self.gFunc_CHS = 2*np.pi*self.gFunc_CHS

self.gFunc_ILS = gt.heat_transfer.infinite_line_source(self.time, self.alpha, self.boreholes[0].r_b)
self.gFunc_ILS = -0.5*self.gFunc_ILS

print('FLS+CC', self.gFunc)
print('CHS', self.gFunc_CHS)
print('ILS', self.gFunc_ILS)

if self.solver.short_term_effects:
self.gFunc = _ShortTermEffects(self, self.time, self.gFunc, self.boreholes, self.alpha, self.solver.ground_data,
self.solver.fluid_data, self.solver.pipe_data, self.solver.borefield, self.solver.short_term_effects_parameters)
toc = perf_counter()
print('STE', self.gFunc)

elif self.solver.short_term_effects_fbw:
self.gFunc = _ShortTermEffectsfbw(self, self.time, self.gFunc, self.boreholes, self.alpha, self.solver.ground_data,
self.solver.fluid_data, self.solver.pipe_data, self.solver.borefield, self.solver.short_term_effects_parameters)
toc = perf_counter()
print('STE_fbw', self.gFunc)
else:
toc = perf_counter()

Expand Down

0 comments on commit 4970645

Please sign in to comment.