0% found this document useful (0 votes)
2 views4 pages

Condenser Problem Code

Uploaded by

23ce3019
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views4 pages

Condenser Problem Code

Uploaded by

23ce3019
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

CONDENSER PROBLEM CODE

CODE:
import math

def solve_condenser():

print("--- Condenser Design ---")

# --- Inputs ---

try:

hc = float(input("Shell-side coefficient (W/m²·°C): "))

U = float(input("Initial guess for U: "))

except:

print("Invalid input")

return

# --- Constants ---

m = 45000 / 3600 # kg/s

hv, hl = 596.5, 247.0 # kJ/kg

LMTD = 16.0

do, di = 0.020, 0.0168 # m

L = 4.88 #m

kw = 50

fs = ft = 6000 # fouling factors

rho = 993

water_flow = 104.5

# --- Heat Duty ---


Q = m * (hv - hl) * 1000

print(f"\n{'Iter':<5}{'U':<10}{'Tubes':<10}{'New U':<10}")

print("-" * 35)

for i in range(10):

# Area & tubes

A = Q / (U * LMTD)

Nt = [Link](A / ([Link] * do * L))

# Velocity

A_pass = ([Link]/4 * di**2) * (Nt / 4)

v = (water_flow / rho) / A_pass

# Tube-side coefficient

hi = (4200 * (1.35 + 0.02*35) * v**0.8) / ((di*1000)**0.2)

# Overall U

Rw = (do * [Link](do/di)) / (2 * kw)

invU = (1/hc) + (1/fs) + Rw + (do/di)*(1/ft + 1/hi)

U_new = 1 / invU

print(f"{i+1:<5}{U:<10.1f}{Nt:<10}{U_new:<10.1f}")

if abs(U_new - U) < 0.5:

break

U = U_new
# --- Results ---

print("\nResults:")

print(f"Tubes : {Nt}")

print(f"Area (m²) : {A:.2f}")

print(f"Final U : {U_new:.1f}")

print(f"Velocity : {v:.2f} m/s")

solve_condenser()

OUTPUT:
--- Condenser Design ---

Shell-side coefficient (W/m²·°C): 1375

Initial guess for U: 900

Iter U Tubes New U

-----------------------------------

1 900.0 990 786.4

2 786.4 1133 776.4

3 776.4 1148 775.3

4 775.3 1149 775.3

Results:

Tubes : 1149

Area (m²) : 352.16

Final U : 775.3

Velocity : 1.65 m/s


=== Code Execution Successful ===

You might also like