Showing posts with label Pyhon. Show all posts
Showing posts with label Pyhon. Show all posts

LHV calculation of mixed fuel gas

What is most important in managing energy consumption is the Low Heating Value of mixed fuel gas. 

LHV and HHV


The lower heating value (LHV; net calorific value; NCV, or lower calorific value; LCV) is another measure of available thermal energy produced by a combustion of fuel, measured as a unit of energy per unit mass or volume of substance. In contrast to the HHV, the LHV considers energy losses such as the energy used to vaporize water - although its exact definition is not uniformly agreed upon. One definition is simply to subtract the heat of vaporization of the water from the higher heating value. This treats any H2O formed as a vapor. The energy required to vaporize the water therefore is not released as heat.

Python code for LHV


LHV calculations assume that the water component of a combustion process is in vapor state at the end of combustion, as opposed to the higher heating value (HHV).
The procedure for calculating the mixed fuel gas LHV is written in Python as follows.


dbHC = [# HC, MW, LHV
       ["H2", 2.016, 274.118],
       ["C1", 16.043, 909.456],
       ["C2", 30.07, 1618.49],
       ["C3", 44.097, 2316.935],
       ["C4", 58.124, 3013.306],
       ["C5", 72.151, 3708.849],
       ["C6", 86.178, 4405.639],
       ["C7", 100.205, 5102.429],
       ["C8", 114.232, 5799.22],
       ["C9", 128.259, 6496.066],
       ["C10", 142.285, 7192.913],
       ["O2", 32, 0],
       ["N2", 28.013, 0],
       ["CO2", 44.01, 0],
       ["CO", 28.011, 320.637],
       ["SO2", 64.063, 0],
       ["H2S", 34.076, 586.89],
       ["H2O", 18.015, 0],
       ]

def hclhv(Comp):


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

    tmpLHV = 0
    for i in range(n):
        tmpLHV = tmpLHV + dbHC[i][2] * Comp[i]
    sumComp = sum(Comp)

    return tmpLHV / sumComp

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

When run the code, you get the results below.

Midex Fuel Gas LHV [Btu/Scf] =  959.72176