|
| 1 | +from GHEtool import * |
| 2 | +import matplotlib.pyplot as plt |
| 3 | +import numpy as np |
| 4 | + |
| 5 | +regular_pipe = SingleUTube(1.5, 0.013, 0.016, 0.4, 0.035) |
| 6 | +regular_pipe_PN12 = SingleUTube(1.5, 0.0135, 0.016, 0.4, 0.035) |
| 7 | +vario = ConicalPipe(1.5, 0.0135, 0.013, 80, 160, 0.016, 0.4, 0.035, 1) |
| 8 | + |
| 9 | +fluid = TemperatureDependentFluidData('MEG', 25).create_constant(3) |
| 10 | +flow = ConstantFlowRate(vfr=0.9 / 3.6) |
| 11 | + |
| 12 | +length = np.arange(100, 160, 1) |
| 13 | + |
| 14 | +dp_regular = [regular_pipe.pressure_drop(fluid, flow, i) for i in length] |
| 15 | +dp_regular_pn12 = [regular_pipe_PN12.pressure_drop(fluid, flow, i) for i in length] |
| 16 | +dp_vario = [vario.pressure_drop(fluid, flow, i) for i in length] |
| 17 | + |
| 18 | +reynolds_regular = [regular_pipe.Re(fluid, flow, borehole_length=i) for i in length] |
| 19 | +reynolds_vario = [vario.Re(fluid, flow, borehole_length=i) for i in length] |
| 20 | + |
| 21 | +plt.figure() |
| 22 | +plt.plot(length, dp_vario, label="vario") |
| 23 | +plt.plot(length, dp_regular, label="regular PN16") |
| 24 | +plt.plot(length, dp_regular_pn12, label="regular PN12") |
| 25 | +plt.xlabel('Length [m]') |
| 26 | +plt.ylabel('Pressure drop [kPa]') |
| 27 | +plt.legend() |
| 28 | + |
| 29 | +plt.figure() |
| 30 | +plt.plot(length, reynolds_vario, label="vario") |
| 31 | +plt.plot(length, reynolds_regular, label="regular") |
| 32 | +plt.xlabel('Length [m]') |
| 33 | +plt.ylabel('Reynolds [-]') |
| 34 | +plt.legend() |
| 35 | + |
| 36 | +# borehole resistance |
| 37 | +vfr_range = np.arange(0.05, 0.8, 0.005) |
| 38 | + |
| 39 | +rb_regular = [] |
| 40 | +rb_regular_pn12 = [] |
| 41 | +rb_vario = [] |
| 42 | +r_f_regular = [] |
| 43 | +r_p_regular = [] |
| 44 | +r_f_regular_pn12 = [] |
| 45 | +r_p_regular_pn12 = [] |
| 46 | +r_f_vario = [] |
| 47 | +r_p_vario = [] |
| 48 | +dp_regular = [] |
| 49 | +dp_vario = [] |
| 50 | +dp_regular_pn12 = [] |
| 51 | + |
| 52 | +for vfr in vfr_range: |
| 53 | + flow = ConstantFlowRate(vfr=vfr) |
| 54 | + borehole_regular = Borehole(fluid, regular_pipe, flow) |
| 55 | + borehole_vario = Borehole(fluid, vario, flow) |
| 56 | + borehole_regular_pn12 = Borehole(fluid, regular_pipe_PN12, flow) |
| 57 | + rb_regular.append(borehole_regular.get_Rb(150, 1, 0.07, 2)) |
| 58 | + rb_regular_pn12.append(borehole_regular_pn12.get_Rb(150, 1, 0.07, 2)) |
| 59 | + |
| 60 | + rb_vario.append(borehole_vario.get_Rb(150, 1, 0.07, 2)) |
| 61 | + r_f_regular.append(borehole_regular.pipe_data.R_f) |
| 62 | + r_f_regular_pn12.append(borehole_regular_pn12.pipe_data.R_f) |
| 63 | + r_p_regular.append(borehole_regular.pipe_data.R_p) |
| 64 | + r_p_regular_pn12.append(borehole_regular_pn12.pipe_data.R_p) |
| 65 | + r_f_vario.append(borehole_vario.pipe_data.R_f) |
| 66 | + r_p_vario.append(borehole_vario.pipe_data.R_p) |
| 67 | + |
| 68 | + dp_regular.append(regular_pipe.pressure_drop(fluid, flow, borehole_length=160)) |
| 69 | + dp_regular_pn12.append(regular_pipe_PN12.pressure_drop(fluid, flow, borehole_length=160)) |
| 70 | + dp_vario.append(vario.pressure_drop(fluid, flow, borehole_length=160)) |
| 71 | + |
| 72 | +plt.figure() |
| 73 | +plt.plot(vfr_range, rb_vario, label="vario") |
| 74 | +plt.plot(vfr_range, rb_regular, label="regular PN 16") |
| 75 | + |
| 76 | +plt.xlabel('Volume flow rate [l/s]') |
| 77 | +plt.ylabel('Effective borehole thermal resistance [W/(mK)]') |
| 78 | +plt.legend() |
| 79 | + |
| 80 | +plt.figure() |
| 81 | +plt.plot(vfr_range, r_p_vario, label="R_p vario") |
| 82 | +plt.plot(vfr_range, r_p_regular, label="R_p regular PN16") |
| 83 | +plt.plot(vfr_range, r_p_regular_pn12, label="R_p regular PN12") |
| 84 | +plt.plot(vfr_range, r_f_vario, label="R_f vario") |
| 85 | +plt.plot(vfr_range, r_f_regular, label="R_f regular PN16") |
| 86 | +plt.plot(vfr_range, r_f_regular_pn12, label="R_f regular PN12") |
| 87 | +plt.xlabel('Volume flow rate [l/s]') |
| 88 | +plt.ylabel('Effective borehole thermal resistance [W/(mK)]') |
| 89 | +plt.legend() |
| 90 | + |
| 91 | +plt.figure() |
| 92 | +plt.plot(vfr_range, dp_vario, label="Vario") |
| 93 | +plt.plot(vfr_range, dp_regular, label="Regular PN16") |
| 94 | +plt.plot(vfr_range, dp_regular_pn12, label="Regular PN12") |
| 95 | +plt.xlabel('Volume flow rate [l/s]') |
| 96 | +plt.ylabel('Pressure drop [kPa]') |
| 97 | +plt.legend() |
| 98 | +plt.show() |
0 commit comments