TO_SOLVE_Q_THOME
This function evaluates the residual equation used to solve for heat flux in the Thome flow-boiling model when excess wall temperature is prescribed. It is primarily an internal numerical helper for implicit root-finding workflows.
Conceptually, it evaluates:
R(q) = T_{e,model}(q,\ldots) - T_{e,target}
A root at R(q)=0 indicates the heat flux that is consistent with the specified operating state and target excess wall temperature.
Excel Usage
=TO_SOLVE_Q_THOME(q, m, x, D, rhol, rhog, kl, kg, mul, mug, Cpl, Cpg, sigma, Hvap, Psat, Pc, Te)
q(float, required): Heat flux (W/m^2).m(float, required): Mass flow rate (kg/s).x(float, required): Quality at the tube interval (dimensionless).D(float, required): Tube diameter (m).rhol(float, required): Liquid density (kg/m^3).rhog(float, required): Gas density (kg/m^3).kl(float, required): Liquid thermal conductivity (W/m/K).kg(float, required): Gas thermal conductivity (W/m/K).mul(float, required): Liquid viscosity (Pa*s).mug(float, required): Gas viscosity (Pa*s).Cpl(float, required): Liquid heat capacity (J/kg/K).Cpg(float, required): Gas heat capacity (J/kg/K).sigma(float, required): Surface tension (N/m).Hvap(float, required): Heat of vaporization (J/kg).Psat(float, required): Saturation pressure (Pa).Pc(float, required): Critical pressure (Pa).Te(float, required): Excess wall temperature (K).
Returns (float): Heat flux residual value (W/m^2), or an error message if invalid.
Example 1: Baseline residual calculation
Inputs:
| q | m | x | D | rhol | rhog | kl | kg | mul | mug | Cpl | Cpg | sigma | Hvap | Psat | Pc | Te |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 100000 | 1 | 0.4 | 0.3 | 567 | 18.09 | 0.086 | 0.2 | 0.000156 | 0.00001 | 2300 | 1400 | 0.02 | 900000 | 100000 | 22000000 | 7 |
Excel formula:
=TO_SOLVE_Q_THOME(100000, 1, 0.4, 0.3, 567, 18.09, 0.086, 0.2, 0.000156, 0.00001, 2300, 1400, 0.02, 900000, 100000, 22000000, 7)
Expected output:
54.2367
Example 2: Lower quality with smaller diameter
Inputs:
| q | m | x | D | rhol | rhog | kl | kg | mul | mug | Cpl | Cpg | sigma | Hvap | Psat | Pc | Te |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 70000 | 0.8 | 0.25 | 0.02 | 850 | 12 | 0.12 | 0.18 | 0.0002 | 0.000012 | 3000 | 1500 | 0.025 | 180000 | 900000 | 4000000 | 6 |
Excel formula:
=TO_SOLVE_Q_THOME(70000, 0.8, 0.25, 0.02, 850, 12, 0.12, 0.18, 0.0002, 0.000012, 3000, 1500, 0.025, 180000, 900000, 4000000, 6)
Expected output:
-3.1047
Example 3: Higher quality with higher heat flux
Inputs:
| q | m | x | D | rhol | rhog | kl | kg | mul | mug | Cpl | Cpg | sigma | Hvap | Psat | Pc | Te |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 120000 | 0.6 | 0.6 | 0.01 | 900 | 9 | 0.1 | 0.16 | 0.00018 | 0.000011 | 2800 | 1400 | 0.03 | 200000 | 800000 | 3000000 | 8 |
Excel formula:
=TO_SOLVE_Q_THOME(120000, 0.6, 0.6, 0.01, 900, 9, 0.1, 0.16, 0.00018, 0.000011, 2800, 1400, 0.03, 200000, 800000, 3000000, 8)
Expected output:
-3.31727
Example 4: Mid-range properties
Inputs:
| q | m | x | D | rhol | rhog | kl | kg | mul | mug | Cpl | Cpg | sigma | Hvap | Psat | Pc | Te |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 90000 | 1.2 | 0.35 | 0.04 | 700 | 15 | 0.09 | 0.19 | 0.00022 | 0.000013 | 2600 | 1450 | 0.018 | 160000 | 1200000 | 6000000 | 7 |
Excel formula:
=TO_SOLVE_Q_THOME(90000, 1.2, 0.35, 0.04, 700, 15, 0.09, 0.19, 0.00022, 0.000013, 2600, 1450, 0.018, 160000, 1200000, 6000000, 7)
Expected output:
-1.49611
Python Code
Show Code
from ht.boiling_flow import to_solve_q_Thome as ht_to_solve_q_Thome
def to_solve_q_Thome(q, m, x, D, rhol, rhog, kl, kg, mul, mug, Cpl, Cpg, sigma, Hvap, Psat, Pc, Te):
"""
Compute the Thome heat flux residual for a specified wall temperature.
See: https://ht.readthedocs.io/en/latest/ht.boiling_flow.html
This example function is provided as-is without any representation of accuracy.
Args:
q (float): Heat flux (W/m^2).
m (float): Mass flow rate (kg/s).
x (float): Quality at the tube interval (dimensionless).
D (float): Tube diameter (m).
rhol (float): Liquid density (kg/m^3).
rhog (float): Gas density (kg/m^3).
kl (float): Liquid thermal conductivity (W/m/K).
kg (float): Gas thermal conductivity (W/m/K).
mul (float): Liquid viscosity (Pa*s).
mug (float): Gas viscosity (Pa*s).
Cpl (float): Liquid heat capacity (J/kg/K).
Cpg (float): Gas heat capacity (J/kg/K).
sigma (float): Surface tension (N/m).
Hvap (float): Heat of vaporization (J/kg).
Psat (float): Saturation pressure (Pa).
Pc (float): Critical pressure (Pa).
Te (float): Excess wall temperature (K).
Returns:
float: Heat flux residual value (W/m^2), or an error message if invalid.
"""
try:
return ht_to_solve_q_Thome(q=q, m=m, x=x, D=D, rhol=rhol, rhog=rhog, kl=kl,
kg=kg, mul=mul, mug=mug, Cpl=Cpl, Cpg=Cpg, sigma=sigma, Hvap=Hvap,
Psat=Psat, Pc=Pc, Te=Te)
except Exception as e:
return f"Error: {str(e)}"Online Calculator
Heat flux (W/m^2).
Mass flow rate (kg/s).
Quality at the tube interval (dimensionless).
Tube diameter (m).
Liquid density (kg/m^3).
Gas density (kg/m^3).
Liquid thermal conductivity (W/m/K).
Gas thermal conductivity (W/m/K).
Liquid viscosity (Pa*s).
Gas viscosity (Pa*s).
Liquid heat capacity (J/kg/K).
Gas heat capacity (J/kg/K).
Surface tension (N/m).
Heat of vaporization (J/kg).
Saturation pressure (Pa).
Critical pressure (Pa).
Excess wall temperature (K).