Spaces:
Sleeping
Sleeping
Update utils/psychrometrics.py
Browse files- utils/psychrometrics.py +4 -2
utils/psychrometrics.py
CHANGED
|
@@ -721,7 +721,7 @@ class Psychrometrics:
|
|
| 721 |
'flow_rate': flow_mix
|
| 722 |
}
|
| 723 |
|
| 724 |
-
#
|
| 725 |
if __name__ == "__main__":
|
| 726 |
# Test basic properties
|
| 727 |
t_db_test = 25.0
|
|
@@ -769,7 +769,9 @@ if __name__ == "__main__":
|
|
| 769 |
print(f"Wet bulb at -5°C, 50% RH: {Psychrometrics.wet_bulb_temperature(t_db=-5.0, rh=50.0):.3f}°C")
|
| 770 |
# Test high temp / high humidity
|
| 771 |
props_hot_humid = Psychrometrics.moist_air_properties(t_db=50, rh=90, p_atm=101325)
|
| 772 |
-
|
|
|
|
|
|
|
| 773 |
except ValueError as e:
|
| 774 |
print(f"Error during edge case test: {e}")
|
| 775 |
|
|
|
|
| 721 |
'flow_rate': flow_mix
|
| 722 |
}
|
| 723 |
|
| 724 |
+
# Example Usage (Preserved and expanded)
|
| 725 |
if __name__ == "__main__":
|
| 726 |
# Test basic properties
|
| 727 |
t_db_test = 25.0
|
|
|
|
| 769 |
print(f"Wet bulb at -5°C, 50% RH: {Psychrometrics.wet_bulb_temperature(t_db=-5.0, rh=50.0):.3f}°C")
|
| 770 |
# Test high temp / high humidity
|
| 771 |
props_hot_humid = Psychrometrics.moist_air_properties(t_db=50, rh=90, p_atm=101325)
|
| 772 |
+
humidity_ratio = props_hot_humid["humidity_ratio_kg_kg"]
|
| 773 |
+
enthalpy = props_hot_humid["enthalpy_j_kg"]
|
| 774 |
+
print(f"Properties at 50°C, 90% RH: W={humidity_ratio:.6f}, H={enthalpy:.0f}")
|
| 775 |
except ValueError as e:
|
| 776 |
print(f"Error during edge case test: {e}")
|
| 777 |
|