Skip to content
Snippets Groups Projects
Commit 12485db7 authored by Rahil Doshi's avatar Rahil Doshi
Browse files

Remove debugging statements

parent f0c7bede
Branches
No related merge requests found
Pipeline #77431 passed with stage
in 55 seconds
......@@ -135,18 +135,14 @@ def specific_enthalpy_sensible(
Calculate specific enthalpy array using heat capacity only.
h(T_i) = h(T_(i-1)) + c_p(T_i)*(T_i - T_(i-1))
"""
print("Entering specific_enthalpy_sensible")
# Validate temperature array is sorted
if not np.all(temperature_array[:-1] <= temperature_array[1:]):
raise ValueError("Temperature array must be sorted in ascending order for correct enthalpy calculation.")
# print(temperature_array)
print(temperature_array.shape)
# Initialize enthalpy array
enthalpy_array = np.zeros_like(temperature_array)
# Calculate initial enthalpy at the first temperature
T_0 = temperature_array[0]
cp_0 = heat_capacity.evalf(T, T_0)
print(T_0, cp_0)
# Calculate enthalpy at first temperature point
enthalpy_array[0] = cp_0 * T_0
......@@ -178,19 +174,15 @@ def specific_enthalpy_with_latent_heat(
Calculate specific enthalpy array using heat capacity and latent heat.
h(T_i) = h(T_(i-1)) + c_p(T_i)*(T_i - T_(i-1)) + [L(T_i) - L(T_(i-1))]
"""
print("Entering specific_enthalpy_with_latent_heat")
# Validate temperature array is sorted
if not np.all(temperature_array[:-1] <= temperature_array[1:]):
raise ValueError("Temperature array must be sorted in ascending order for correct enthalpy calculation.")
# print(temperature_array)
print(temperature_array.shape)
# Initialize enthalpy array
enthalpy_array = np.zeros_like(temperature_array)
# Calculate initial enthalpy at the first temperature
T_0 = temperature_array[0]
cp_0 = heat_capacity.evalf(T, T_0)
L_0 = latent_heat.evalf(T, T_0)
print(T_0, cp_0, L_0)
# Calculate enthalpy at first temperature point
enthalpy_array[0] = cp_0 * T_0 + L_0
......
......@@ -195,7 +195,6 @@ class MaterialConfigParser:
temperature_array = self._process_int_step(start, end, int(step))
# Ensure temperature array is in ascending order
if not np.all(np.diff(temperature_array) >= 0):
print("Flipping temperature array")
temperature_array = np.flip(temperature_array)
return temperature_array
except ValueError as e:
......
No preview for this file type
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment