LMTD calculation in heat exchanger

LMTD stands for Logarithmic Mean Temperature Difference, which is a method of calculating the arithmetic mean temperature difference in a heat exchanger. The LMTD is calculated using the following formula:

Formula of LMTD


LMTD = (ΔT1-ΔT2) / ln (ΔT1/ΔT2)

Here, ΔT1 is the temperature difference between the hot and cold fluids on one side of the heat exchanger, and ΔT2 is the temperature difference on the other side. This formula is used to calculate the heat transfer surface area of a heat exchanger.

There are two types of heat exchangers such as parallel-flow and counter-flow heat exchangers that differ in the direction of fluid flow. In a parallel-flow heat exchanger, the hot and cold fluids enter at the same end, flow in the same direction, and leave at the same end. In contrast, in a counter-flow heat exchanger, the fluids enter at opposite ends, flow in opposite directions, and leave at opposite ends.

The counter-flow heat exchanger is more efficient than the parallel-flow heat exchanger because it allows for a greater temperature difference between the hot and cold fluids. This results in a higher rate of heat transfer and a smaller heat exchanger size.






For parallel flow in tubular heat exchangers
LMTD = ((Thi-Tci)-(Tho-Tco))/ln((Thi-Tci)/(Tho-Tco))

For counterflow in tubular heat exchangers
LMTD = ((Tho-Tci)-(Thi-Tco))/ln((Tho-Tci)/(Thi-Tco)) 

Where,
LMTD = log mean temperature difference (degC or degF)
Thi = inlet temperature of the hot fluid (degC or degF)
Tho = outlet temperature of the hot fluid (degC or degF)
Tci = inlet temperature of the cold fluid (degC or degF)
Tco = outlet temperature of the cold fluid (degC or degF)

Python code


LMTD calculation in the heat exchanger is coded in Python as follows.

import math
def lmtd(Thi, Tho, Tci, Tco):
    if min(Thi, Tho) > max(Tci, Tco):
        dt = (Thi-Tci) if (Thi-Tci) == (Tho-Tco) else ((Thi-Tci)-(Tho-Tco))/math.log((Thi-Tci)/(Tho-Tco))
    else:
        dt = (Thi-Tci) if (Tho-Tci) == (Thi-Tco) else ((Tho-Tci)-(Thi-Tco))/math.log((Tho-Tci)/(Thi-Tco))
    return dt
print("parallel flow case = ", lmtd(150, 120, 50, 80))
print("counter flow case = ", lmtd(180, 130, 100, 120))


Here, Thi, Tho, Tci and Tco are the temperatures of the hot and cold fluids at the inlet and outlet of the heat exchanger. The function lmtd calculates the LMTD using the formula (ΔT1-ΔT2)/ln(ΔT1/ΔT2) and returns the result.

parallel flow case =  65.48
counter flow case =  33.66

LHV calculation of mixed fuel gas (ASME PTC-22)

ASME Performance Test Codes (PTC 22) establishes directions and rules for the conduct and results reporting of thermal performance tests for open cycle gas turbine power plants and gas turbine engines. This performance test code provides explicit instruction on determining corrected power, heat rate (efficiency), exhaust flow, exhaust energy, and exhaust temperature. 

Guidance is also provided for designing testing requirements and programs to satisfy different goals such as absolute performance and comparative performance.

Introducing the fuel heating value table introduced here.
The procedure for calculating the mixed fuel gas LHV is written in Python as follows.

dbHC = [# Formula, Molecular Weight [lb/lbmol], Standard Density [lb/1000 ft3], High Heating Value [Btu/lbm], Low Heating Value [Btu/lbm]
       ["CH4", 16.0425, 42.274, 23892.2, 21511.9],
       ["C2H6", 30.0690, 79.237, 22334.1, 20429.2],
       ["C3H8", 44.0956, 116.199, 21654.1, 19922.2],
       ["C4H10", 58.1222, 153.161, 21232.3, 19589.8],
       ["C4H10", 58.1222, 153.161, 21300.2, 19657.8],
       ["C5H12", 72.1488, 190.123, 21043.7, 19455.9],
       ["C5H12", 72.1488, 190.123, 21085, 19497.2],
       ["C6H14", 86.1754, 227.085, 20943.8, 19392.9],
       ["C7H16", 100.2019, 264.048, 20839.1, 19314.7],
       ["C8H18", 114.2285, 301.010, 20759.7, 19255.4],
       ["C9H20", 128.2551, 337.972, 20701, 19212.3],
       ["C10H22", 142.2817, 374.934, 20651.6, 19175.5],
       ["CO", 28.0101, 73.811, 4342.2, 4342.2],
       ["CO2", 44.0095, 115.972, 0.0, 0.0],
       ["H2S", 34.0809, 89.808, 7094.1, 6533.8],
       ["Air", 28.9651, 76.328, 0.0, 0.0],
       ["H2", 2.0159, 5.312, 61022.3, 51566.7],
       ["O2", 31.9988, 84.322, 0.0, 0.0],
       ["N2", 28.0134, 73.820, 0.0, 0.0],
       ["H2O", 18.0153, 47.473, 1059.8, 0.0],
       ["He", 4.0026, 10.547, 0.0, 0.0],
       ["Ar", 39.9480, 105.269, 0.0, 0.0],
       ]



def hclhv(Comp):

    n = len(dbHC)
    sumComp = sum(Comp)
    for i in range(n):
        Comp[i] = Comp[i] / sumComp

    sumLHV = 0
    for i in range(n):
        LHV = dbHC[i][4] * dbHC[i][1] / ((10.7316*519.67) / 14.696)
        sumLHV = sumLHV + Comp[i] * LHV
    sumComp = sum(Comp)

    return sumLHV / sumComp

Comp = [90, 4, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0]
print("Mixed Fuel Gas LHV [Btu/Scf] = ", hclhv(Comp))

When run the code, you get the results below.

Mixed Fuel Gas LHV [Btu/Scf] =  959.622

DOE motor challenge program

Motor Challenge is a partnership program between the U.S. Department of Energy and the nation’s industries. The program is committed to increasing the use of industrial energy-efficient electric motor systems and related technologies.

This program is wholly funded by the U.S. Department of Energy and is dedicated to helping industry increase its competitive edge, while conserving the nation’s energy resources and enhancing environmental quality.

Over half of all electrical energy consumed in the United States is used by electric motors. Improving the efficiency of electric motors and the equipment they drive can save energy, reduce operating costs, and improve our nation’s productivity.

Energy efficiency should be a major consideration when you purchase or rewind a motor. The annual energy cost of running a motor is usually many times greater than its initial purchase price. For example, even at the relatively low energy rate of $0.04/kWh, a typical 20-horsepower (hp) continuously running motor uses almost $6,000 worth of electricity annually, about six times its initial purchase price.

Select a new energy-efficient motor under any of the following conditions:
  • The motor is less than 40 hp.
  • An energy-efficient motor is recommended according to Table 3.
  • The cost of the rewind exceeds 65% of the price of a new motor.
  • The motor was rewound before 1980 year
Survey your motors. Gather nameplate information and obtain field measurements (voltage, amperage, power factor, operating speed) under typical operating conditions. Initially focus on motors that exceed minimum size and operating duration criteria. Typical selection criteria include:
  • Three-phase NEMA design B motor
  • Non-specialty motor
  • 10 to 600 hp
  • At least 2000 hours per year of operation
  • Constant load (not intermittent, cyclic, or fluctuating
  • Older or rewound standard efficiency motors
  • Easy access
  • Readable nameplate.
BHP = (ρ*(Q/3600)*H)/(102*η)


BHP : Pump Power [Kw]
ρ  : Fluid Density [kg/m3]
Q   : Flow Rate [m3/hr]
H   : Total Diff' Head [m]
η  : Pump Efficiency [%]

Design Condition
ρ = 1,126 kg/m3 
Q = 173.0 m3/hr
P1 = 0.6 kgf/cm2g
P2 = 14.4 kgf/cm2g
H = (14.4-0.6)*10/(1126/1000) = 122.6 m
η = 66.5%
BHP = (1126*(173/3600)*122.6)/(102*66.5/100) = 97.8 kW

Actual Condition
ρ = 1,126 kg/m3
Q = 84.4 m3/hr
P1 = 0.6 kgf/cm2g
P2 = 14.6 kgf/cm2g
H = (14.6-0.6)*10/(1126/1000) = 124.3 m
n = 53.0%
BHP = (1126*(84.4/3600)*124.3)/(102*53.0/100) = 60.7 kW

Load Factor = Pump Operation BHP / Pump Rated BHP
            = 60.7 kW /97.8 kW = 62%
Pump Imbalance = [(Actual Q * Actual H) / (Design Q * Design H) -1] * 100%
               = ((84.4*124.3)/(173*122.6)-1)) = -51%
Flow Ratio = Actual Q / Design Q
           = 84.4 m3/hr / 173 m3/hr = 49%
Motor Load = Operation P / Rated P
           = 63.8 kW / 110 kW = 58%

If the calculation results of the four parameters calculated above meet the conditions below, energy engineer should consider an investment project to save energy consumption.

Pump Imbalance: Review below -20%
Pressure Ratio: Review when exceeding 130%
Flow Ratio: Review when below 70%
Motor Load: Review when below 40%

Crane differential pressure or flow rate for compressible fluid (Imperial)

This Python code calculates differential pressure or flow rate according to given pipe & fitting information for compressible fluid.

Formula of DP and flow rate


Calculate differential pressure in pipes based on information on the following pipes/accessory equipment

w    : Flow rate [lb/hr]
△P  : Delta Pressure [psia]
L    : Length [ft]
D    : Pipe Diameter [ft]
d    : Pipe Diameter [in]
ρ    : Density [lb/ft3]
f    : Friction factor

Here, Friction factor (f) must be calculated using separate charts and programs.

Calculation formulas based on CRANE BOOK

Kpipe = f * l/D
K     = Kpipe + Kfitting

compressible fluid
△P = (K * W^2) / (1891^2 * d^4 * ρ  * Y^2)
w = 1891 * d^2 * √(△P * ρ / K) * Y


liquid fluid
△P = (K * W^2) / (1891^2 * d^4 * ρ)
w = 1891 * d^2 * √(△P * ρ / K)

Python code


Run Python code below : https://www.mycompiler.io/view/6fwILhy1i1P

import math

def compressibledp(W, l, d, r, Y, f, Kf):
    D = d * 12
    Kp = f*l/D
    K = Kp + Kf
    dp = (K*pow(W, 2))/(pow(1891, 2)*pow(d, 4)*r*pow(Y, 2))
    return dp

W = 220      # Flow rate (W, lb/hr)
l = 30.48    # Length (L, ft)
d = 1.969    # Pipe Diameter (d, in)
r = 0.0774   # Density (ρ, lb/ft3)
Y = 1.0      # Net Expansion Factor (Y)
f = 0.005    # Friction factor (f)
Kf = 500     # Resistance coefficient of fittings

dp = compressibledp(W, l, d, r, Y, f, Kf)
print("delta pressure of pipe = ", dp, "psia")

def compressibleflow(dp, l, d, r, Y, f, Kf):
    D = d * 12
    Kp = f * l / D
    K = Kp + Kf
    W = 1891 * pow(d, 2) * math.sqrt(dp * r / K) * Y
    return W

dp = 5.933   # Delta Pressure (△P, psia)
m = 30.48    # Length (L, ft)
d = 1.969    # Pipe Diameter (d, in)
r = 0.0774   # Density (ρ, lb/ft3)
Y = 1        # Net Expansion Factor (Y)
f = 0.005    # Friction factor (f)
Kf = 500     # Resistance coefficient of fittings

flow = compressibleflow(dp, l, d, r, Y, f, Kf)
print("mass flow of pipe = ", flow, "lb/hr")

When run the code, you will receive the following results.

delta pressure of pipe =  5.82 psia
mass flow of pipe =  222 lb/hr

Gas mean pressure in long pipe

Equation for mean pressure for steady flow in a gas pipe at pressures below 1000 psia and temperatures above 60°F, the change in compressibility factor z with Pressure is approximately linear. Therefore, the compressibility factor z can be expressed as a constant, so the average pressure of the gas fluid can be calculated as follows.

Pm = 2/3 * (P1^3 - P2^3)/(P1^2 - P2^2)

def pmean(p1, p2):

    return 2/3*(pow(p1, 3) - pow(p2, 3))/( pow(p1, 2) - pow(p2, 2))


print("Gas mean pressure of 120 psia and 100 psia = ", pmean(120, 100))

When run the code, you will receive the following results.

Gas mean pressure of 120 psia and 100 psia =  111.429


How to Draw Heat & Cool Compositive Curve in HYSYS

How to Draw Heat & Cool Compositive Curve in HYSYS

1. Complete the LNG exchange Object.

2. Select the [Tools]-[Utilities] menu.

3. Add the Compositive Curve Utility menu in the right window.

4. Confirm that Compositive Curve Utility is added to the left window and double-click it.
    Then select the LNG Excange that was previously completed.

5. Check the Pinch Temperature in the Pinch Result tab.

6. Check Compositive Curve in the Plot tab.

  ** If necessary, copy it to the clipboard and add it to the report.

Heat loss method for heater efficiency

The heat loss method disused in ASME PTC 4.1 may be used for evaluating the efficiency of steam generators. For quick estimates of oil and natural gas fired steam generators, however, the following equations may be used. These equations were arrived at by the author after performing several calculations.

1. Natural gas 

Efficiency (%, HHV) = 89.4 - (0.001123 + 0.0195 * EA)*(Tg - Ta)
Efficiency (%, LHV) = 99.0 - (0.001244 + 0.0216 * EA)*(Tg - Ta)

Tg = exit gas temperatures, degF
Ta = reference air temperatures, degF
EA = excess air, EA = K * 21/(21-O2), K = 0.98 for natural gas 

2. Fuel Oil

Efficiency (%, HHV) = 92.9-(0.001298 + 0.0195 * EA) * (Tg-Ta) 
Efficiency (%, LHV) = 99.0-(0.001383 + 0.0203 * EA) * (Tg-Ta) 

Tg = exit gas temperatures, degF
Ta = reference air temperatures, degF
EA = excess air, EA = K * 21/(21-O2), K = 1.00 for fuel oil

Example-1:

A natural gas fired boiler with 15% excess air has an exit gas temperature of 380 degF, ambient = 90 degF. Determine efficiency on LHV basis. 

EA = 1.15
Efficiency (%, LHV) = 99.0 - (0.001244 + 0.0216 * EA)*(Tg - Ta)
Efficiency (%, LHV) = 99.0 - (0.001244 + 0.0216 * 1.15)*(380 - 90) = 91.4%

Example-2:

A natural gas fired boiler with 3% excess oxygen has an exit gas temperature of 350 degF, ambient = 85 degF. Determine efficiency on LHV basis. 

EA = K * 21/(21-O2) = 0.98 * 21/(21-3) = 1.143
Efficiency (%, LHV) = 99.0 - (0.001244 + 0.0216 * EA)*(Tg - Ta)
Efficiency (%, LHV) = 99.0 - (0.001244 + 0.0216 * 1.143)*(350 - 85) = 92.1%