|
1 | 1 | import pygfunction as gt |
| 2 | +from math import pi |
2 | 3 |
|
3 | 4 | from GHEtool.VariableClasses.PipeData.SingleUTube import SingleUTube |
| 5 | +from GHEtool.VariableClasses.FluidData import _FluidData |
| 6 | +from GHEtool.VariableClasses.FlowData import _FlowData |
4 | 7 |
|
5 | 8 |
|
6 | 9 | class Separatus(SingleUTube): |
@@ -58,6 +61,61 @@ def pipe_model(self, k_s: float, borehole: gt.boreholes.Borehole) -> gt.pipes._B |
58 | 61 |
|
59 | 62 | return single_u |
60 | 63 |
|
| 64 | + def Re(self, fluid_data: _FluidData, flow_rate_data: _FlowData, **kwargs) -> float: |
| 65 | + """ |
| 66 | + Reynolds number. |
| 67 | + This model uses the hydraulic diameter of 25.51 mm. |
| 68 | +
|
| 69 | + Parameters |
| 70 | + ---------- |
| 71 | + fluid_data: FluidData |
| 72 | + Fluid data |
| 73 | + flow_rate_data : FlowData |
| 74 | + Flow rate data |
| 75 | +
|
| 76 | + Returns |
| 77 | + ------- |
| 78 | + Reynolds number : float |
| 79 | + """ |
| 80 | + u = flow_rate_data.mfr(fluid_data=fluid_data, **kwargs) / fluid_data.rho(**kwargs) / \ |
| 81 | + (pi * (0.02551 / 2) ** 2) |
| 82 | + return fluid_data.rho(**kwargs) * u * 0.02551 / fluid_data.mu(**kwargs) |
| 83 | + |
| 84 | + def pressure_drop(self, fluid_data: _FluidData, flow_rate_data: _FlowData, borehole_length: float, |
| 85 | + **kwargs) -> float: |
| 86 | + """ |
| 87 | + Calculates the pressure drop across the entire borehole. |
| 88 | + This model uses the hydraulic diameter of 25.51 mm. |
| 89 | +
|
| 90 | + Parameters |
| 91 | + ---------- |
| 92 | + fluid_data: FluidData |
| 93 | + Fluid data |
| 94 | + flow_rate_data : FlowData |
| 95 | + Flow rate data |
| 96 | + borehole_length : float |
| 97 | + Borehole length [m] |
| 98 | +
|
| 99 | + Returns |
| 100 | + ------- |
| 101 | + Pressure drop : float |
| 102 | + Pressure drop [kPa] |
| 103 | + """ |
| 104 | + |
| 105 | + # Darcy fluid factor |
| 106 | + fd = gt.pipes.fluid_friction_factor_circular_pipe( |
| 107 | + flow_rate_data.mfr(fluid_data=fluid_data, **kwargs), |
| 108 | + (0.02551 / 2), |
| 109 | + fluid_data.mu(**kwargs), |
| 110 | + fluid_data.rho(**kwargs), |
| 111 | + self.epsilon) |
| 112 | + A = pi * (0.02551 / 2) ** 2 |
| 113 | + V = (flow_rate_data.vfr(fluid_data=fluid_data, **kwargs) / 1000) / A |
| 114 | + |
| 115 | + # add 0.2 for the local losses |
| 116 | + # (source: https://www.engineeringtoolbox.com/minor-loss-coefficients-pipes-d_626.html) |
| 117 | + return ((fd * (borehole_length * 2) / (0.02551) + 0.2) * fluid_data.rho(**kwargs) * V ** 2 / 2) / 1000 |
| 118 | + |
61 | 119 | def __export__(self): |
62 | 120 | return {'type': 'Separatus', |
63 | 121 | 'k_g [W/(m·K)]': self.k_g} |
0 commit comments