CC_HX_TEMP_CHECK
This function evaluates whether four terminal temperatures are physically plausible for a countercurrent heat exchanger. It checks the inlet and outlet temperatures of two streams and returns whether the specified temperature pattern can occur for countercurrent operation.
In a valid countercurrent exchanger, the hot stream cools while the cold stream warms, and the temperature ordering at both ends must remain thermodynamically consistent.
If the temperature crossover or terminal ordering violates those constraints, the configuration is considered implausible and the function returns False.
Excel Usage
=CC_HX_TEMP_CHECK(T_zero_in, T_zero_out, T_one_in, T_one_out)
T_zero_in(float, required): Inlet temperature of fluid zero (K).T_zero_out(float, required): Outlet temperature of fluid zero (K).T_one_in(float, required): Inlet temperature of fluid one (K).T_one_out(float, required): Outlet temperature of fluid one (K).
Returns (bool): True when the countercurrent temperature set is plausible.
Example 1: Plausible countercurrent temperatures
Inputs:
| T_zero_in | T_zero_out | T_one_in | T_one_out |
|---|---|---|---|
| 400 | 300 | 250 | 350 |
Excel formula:
=CC_HX_TEMP_CHECK(400, 300, 250, 350)
Expected output:
true
Example 2: Small temperature approach at one end
Inputs:
| T_zero_in | T_zero_out | T_one_in | T_one_out |
|---|---|---|---|
| 370 | 320 | 310 | 360 |
Excel formula:
=CC_HX_TEMP_CHECK(370, 320, 310, 360)
Expected output:
true
Example 3: Larger hot-side temperature drop
Inputs:
| T_zero_in | T_zero_out | T_one_in | T_one_out |
|---|---|---|---|
| 500 | 280 | 260 | 430 |
Excel formula:
=CC_HX_TEMP_CHECK(500, 280, 260, 430)
Expected output:
true
Example 4: Mild heating of the cold stream
Inputs:
| T_zero_in | T_zero_out | T_one_in | T_one_out |
|---|---|---|---|
| 330 | 300 | 280 | 320 |
Excel formula:
=CC_HX_TEMP_CHECK(330, 300, 280, 320)
Expected output:
true
Python Code
Show Code
from ht.core import countercurrent_hx_temperature_check as ht_cc_hx_temperature_check
def cc_hx_temp_check(T_zero_in, T_zero_out, T_one_in, T_one_out):
"""
Check whether two fluid temperature profiles are plausible for countercurrent exchange.
See: https://ht.readthedocs.io/en/latest/ht.core.html
This example function is provided as-is without any representation of accuracy.
Args:
T_zero_in (float): Inlet temperature of fluid zero (K).
T_zero_out (float): Outlet temperature of fluid zero (K).
T_one_in (float): Inlet temperature of fluid one (K).
T_one_out (float): Outlet temperature of fluid one (K).
Returns:
bool: True when the countercurrent temperature set is plausible.
"""
try:
return ht_cc_hx_temperature_check(T_zero_in, T_zero_out, T_one_in, T_one_out)
except Exception as e:
return f"Error: {str(e)}"