Spaces:
Sleeping
Sleeping
Update calculation.py
Browse files- calculation.py +4 -8
calculation.py
CHANGED
@@ -68,13 +68,9 @@ class SteamPipe:
|
|
68 |
delta_T = heat_loss / (mass_flow_rate * specific_heat)
|
69 |
return max(self.steam_temp - delta_T, self.ambient_temp)
|
70 |
|
71 |
-
def calculate(self):
|
72 |
-
|
73 |
-
if np.isnan(insulation_thickness):
|
74 |
-
raise ValueError("Insulation thickness data not found.")
|
75 |
-
|
76 |
-
heat_loss = self.calculate_heat_loss(insulation_thickness)
|
77 |
outlet_temp = self.calculate_outlet_temperature(heat_loss)
|
78 |
-
|
79 |
-
|
80 |
|
|
|
68 |
delta_T = heat_loss / (mass_flow_rate * specific_heat)
|
69 |
return max(self.steam_temp - delta_T, self.ambient_temp)
|
70 |
|
71 |
+
def calculate(self, required_thickness):
|
72 |
+
heat_loss = self.calculate_heat_loss(required_thickness)
|
|
|
|
|
|
|
|
|
73 |
outlet_temp = self.calculate_outlet_temperature(heat_loss)
|
74 |
+
return outlet_temp, heat_loss
|
75 |
+
|
76 |
|