Version 20 of Heat Engine Combustion and Calculator Demo Example

Updated 2013-08-14 05:25:52 by gold

Heat Engine Combustion and Calculator Demo Example

This page is under development. Comments are welcome, but please load any comments in the comments section at the bottom of the page. Please include your wiki MONIKER in your comment with the same courtesy that I will give you. Its very hard to reply intelligibly without some background of the correspondent. Thanks,gold


gold Here is some eTCL starter code for calculating efficiency of heat engines from source temperature, fuel, and combustion chamber dimensions. The Novikov efficiency rating can be compared with a process fraction of useful work in an eTCL calculator, developed from some code on a firebox. The impetus for these calculations was checking rated efficiency in some heat engines. These heat engines are called endoreversible engines. These endoreversible engines are rated from the (equation) Chambadal-Novikov efficiency (Nu) = 1.- sqrt(sink temperature low over temperature source high) or Nu = 1.-sqrt(tl/t2). These efficiency ratings are related to the Carnot engine, which was rated as Carnot efficiency (Nu)=1.-(t1/t2). As an electrical analog, the chart of a Novikov engine looks somewhat like a voltage source to resistors/LED to ground, where the output light is offset by resistor losses. For another example, the fire in a brick oven will cook the pizza with energy called the process heat fraction here, but much of the heat energy goes into heating the oven and the brick walls. Most of the testcases involve modeled data, using assumptions and rules of thumb .

The Carnot heat engine can be developed can be developed from the following relationships. The heat flow of work (W) equals the heat flow of the source (Qh) minus the heat flow of the sink (Qc). Following the Huleihul paper, the ratio of Qh/Qc = Qc/W, where the Carnot efficiency Nu = W/Qh, W=Qh-Qc,Qc=Qh-W, and W>Qc. The ratio equation Qh/Qc = Qc/W can be solved into a quadratic equation in f(Nu) . Moving terms, Qh*W=Qc*Qc,and substituting Qh*W = (Qh-W)*(Qh-W), Qh*W=Qh**2 -2*W*Qh+W**2. Shifting terms to the left side, Qh**2 +2*W*Qh+W*Qh+W**2 = 0, Qh**2 + 3*W*Qh+W**2 = 0, and dividing by Qh**2, 1+3*W*Qh/(Qh**2)-(W**2)/Qh**2=0. Substituting Nu=W/Qh and taking -1*, the equation is a quadratic equation in terms of f(Nu), Nu**2 - 3*Nu-1=0. Using the quadratic solution and leaving the negative solution behind, the quadratic solution is Nu =( 3+ (sqrt(5)) /2 or Nu=1-(1/phi), where phi is the golden ratio 1.618... Numerically, Nu=0.382 and the initial equations and proportions take on a new utility for the Carnot engine. We have the ratio W/Qh=0.382 or ~ 4/10, Qh=2.6*W, and the ratio W/Qc = decimal 0.625 or ~6/10. Where Qh/Qc = Qc/W, then flipping W/Qh >> 1/0.382 for the right term, Qh/Qc= 1/0.625 or Qh/Qc=1.6, 1+6/10, or ~16/10. The solved ratios can be implemented into the eTCL routines for a firebox heat engine. Also, there are a lot of series and identities mathematics on the golden ratio, which are amenable to computer implementation (and peer review).

# The formula for combined cycle efficiency is Nu(combined) = Nu(1)+Nu(2) - Nu(1)*Nu(2). For an example using round numbers, the yoked value of a gas turbine generating electricity and the exhaust heat fed to a steam generator generating electricity. The formula eTCL statements below can be pasted into the console window, when the eTCL report function is activated with access to the utility subroutines. The Carnot and Novikov efficiencies can also be estimated in the eTCL calculator separately. The temperatures for the gas turbine is 1700 degrees K and the exhaust is 900 K, in round numbers. The measured efficiency of the gas turbine is Nu(1) equals 0.40. The followon steam generator is 900 K and the exhaust is 400 K. The measured efficiency of the steam generator is Nu(2) equals 0.33. The combined efficiencies from the Novikov formula (not measured), the Nu(combined) = Nu(1)+Nu(2) - Nu(1)*Nu(2), Nu(combined) = 0.40+0.32-(0.40*0.32), Nu(combined)= 0.592 or 59.2 percent. Comparing the measured efficiencies with the Novikov formula, the Novikov formula for the steam generator was in close agreement with the measured results, the Novikov results for the gas generator was not so good. Both the Carnot and Novikov formulas assume Newtonian heat flow, and above 900 K degrees radiant heat transfer (T**4 terms) becomes more important. The gist is that the Carnot and Novikov formulas start to break down above 900 K.

namespace path   {::tcl::mathop ::tcl::mathfunc} 
set Nu_combined [ - [ + 0.40 0.32 ]  [* 0.40 0.32 ]  ]
answer% 0.592 for measured efficiencies
set carnotefficiency_gas_turbine [ carnotthermic 1700 900]
answer% 0.4705 or 47 percent
set novikovefficiency_gas_turbine [ endothermic 1700  900]
answer% 0.272
set carnotefficiency_steam [ carnotthermic  900 400]
answer% 0.555
set novikovefficiency_steam [ endothermic  900 400]
answer% 0.33
set Nu_combined_Novikov [ - [ + 0.272 0.33 ]  [* 0.272 0.33 ]  ]
answer% 0.512 for Novikov estimated efficiencies

# The formula for combined cycle efficiency is Nu(combined) = Nu(1)+Nu(2) - Nu(1)*Nu(2). It might be wondered why the Carnot efficiency is calculated and tracked with the Novikov efficiency? The Carnot efficiency is good at predicting the amount of heat loss to stack when natural gas is burned. Maybe a numerical coincidence, but when natural gas burned completely in air, about 50 to 60 percent heat goes up the stack. Without other considerations like power generation and radiant heat transfer, the efficiency of the natural gas furnace is 100%-(50% to 60% up the stack) or 50 to 40% efficient ( vis. measured gas Nu 40% vs Carnot 47 %).


Testcases Section

In planning any software, it is advisable to gather a number of testcases to check the results of the program. The math for the testcases can be checked by pasting statements in the TCL console. Aside from the TCL calculator display, when one presses the report button on the calculator, one will have console show access to the capacity functions (subroutines).

Testcase 1

Pizza is baked for 20 minutes or 20*60, 1200 seconds in a brick oven, wood fired. Sink temperature T1 (300) and source temperature T2 ( 900 ) are inputs. The calculations should be carried out in Kelvin degrees. Exhaust or low temperature T1 is fixed at 300 degrees kelvin. Firing max temperature is calculated on a separate track, solving T**4 equation in chamber.


testcases T1 T2Carnot Nu Endoreversible Nu Endo fraction process K2*Nu
1 300 900 0.666 0.422 0.166
2 300 12000.75 0.5 0.187
3 300 14000.785 0.537 0.196
4 300 7000.57 0.345 0.142

quantityvalue
testcase number 1
piston diameter meters .5
piston height meters .5
piston firing seconds 1200
volume cubic meters 0.098
total energy MJ 153.962
piston volume m*m*m 0.0981
heat source temperature T2 900.
heat sink temperature T1 300.
max room fuel kg 83.448
estimated fuel, kg 11.404
total heat megajoules 153.962
firing max temperature 1202
man workdays to load fuel 0.0327
Carnot efficiency 0.666
Novikov efficiency 0.422
process fraction applied/total 0.166

Testcase 4

Rating small gas stoves boiling water

namewater boiledmeasured NuNovikov NuCarnot Nu
stove 11 liter49.442.41466.839
stove 21 liter43.849.349 74.345
stove 30.5 liter32.450.129 75.1

Testcase 5

One MMBtu = 1,000,000 Btu
mass_flow_rate = burning_area* fuel_burn_rate*fuel_density
   where fuel_burn_rate= initial_rate +  (e**+c*kelvin)

Testcase 6

testcase number: 6
max room fuel kg 2705.181
                                     
testcase number: 6
calculator inputs known values comment

Screenshots Section

figure 1.

http://imageshack.us/a/img90/8319/nob.gif

figure 2.

http://imageshack.us/a/img853/6803/9wzj.png

figure 3.

http://imageshack.us/a/img842/2710/m8p6.png


References:

  • Kenyan Ceramic Jiko cooking stove, by Hugh Allen
  • Endoreversible Thermodynamics, Katharina Wagner,
  • thesis pub. Chemnitz University of Technology, July 07, 2008
  • http://archiv.tu-chemnitz.de/pub/2008/0123/index.html
  • Introduction toEndoreversible Thermodynamics , Karl Heinz Hoffman,
  • Atti dell’Accademia Peloritana,February 01, 2008
  • Summary of heat engines, Lecture 12,
  • Endoreversible thermodynamics, wikipedia
  • Comment on concept of endoreversibility, Bjarne Andresen,
  • Oersted Laboratory, University of Copenhagen
  • Specific Heat Ratio of an Endoreversible Otto Cycle,R. Ebrahimi,Shahrekord University
  • Golden Section Heat Engines, Mahmoud Huleihill, Gedalya Mazor ,
  • Sami Shamoon College of Engineering, Israel, pub Feb 2012
  • Efficiency of atomic power stations,Novikov, Atomnaya Energiya, 3:409, 1957. in Russian.
  • Efficiency of atomic power stations,Journal Nuclear Energy II, 7:125-128, 1958.,translated
  • Thermodynamics. Mashinostroenie, M. P. Vukalovich and I. I. Novikov
  • Efficiency of a Carnot Engine at Maximum Power Output,
  • Curzon and B. Ahlborn Am. J. Phys. 43, 22 (1975).

Appendix Code

appendix TCL programs and scripts

        # pretty print from autoindent and ased editor
        # heat engine combustion calculator
        # written on Windows XP on eTCL
        # working under TCL version 8.5.6 and eTCL 1.0.1
        # gold on TCL WIKI , 9aug2013
        package require Tk
        namespace path {::tcl::mathop ::tcl::mathfunc}
        frame .frame -relief flat -bg aquamarine4
        pack .frame -side top -fill y -anchor center
        set names {{} {combustion chamber diameter meters:} }
        lappend names {combustion chamber height meters:}
        lappend names {heat source temperature input: }
        lappend names {heat sink temperature input: }
        lappend names {answer: volume cubic meters}
        lappend names {total heat units, megajoules:}
        lappend names {endo process, applied/total energy: }
        foreach i {1 2 3 4 5 6 7} {
    label .frame.label$i -text [lindex $names $i] -anchor e
    entry .frame.entry$i -width 35 -textvariable side$i
grid .frame.label$i .frame.entry$i -sticky ew -pady 2 -padx 1 }
        proc about {} {
            set msg "Calculator for Heat Engine Combustion
            from TCL WIKI,
            written on eTCL "
            tk_messageBox -title "About" -message $msg }
        proc pi {} {expr acos(-1)}
        proc pistonvolumex { d h } {
            set  pistonvolumexxx [* .25 [pi] $d $d $h ]
            return $pistonvolumexxx
            }
        proc heatx { vol density } {
            set fuel_mass [* $vol $density]
            set total_heat [* $fuel_mass 40.1]
            return $total_heat
            }
        proc endothermic { theatsource tlow  } {
            set endo [expr { 1.-sqrt($tlow)/sqrt($theatsource)} ]
            return $endo
            }
        proc carnotthermic { theatsource tlow  } {
            set theatsource [* 1. $theatsource]
            set tlow  [* 1. $tlow]
            set carnot [- 1. [/ $tlow $theatsource]]
            return $carnot
            }
        proc endoprocess { theatsource tlow  } {
            set theatsource [* 1. $theatsource]
            set tlow  [* 1. $tlow]
            set endoprocess [* .25 [- 1. [/ $tlow $theatsource]]]
            return $endoprocess
            }        
        proc firebox { total_heat burn_time cross_section temp_ambient temp_flame} {
            set d $cross_section
            set firing_temp 1
            set heat_flux [/ $total_heat $burn_time]
            set heat_flux_persec [/ $heat_flux $burn_time]
            set cross_section [ / [* [pi] $d $d ] 4.]
            set item 25
            set temp_ambient 25
            set temp_flame 1488.
            set tx  $temp_ambient
            set taxx $temp_flame
            set t 25
            set h [/ $heat_flux_persec $cross_section]
            while {$item <= 4000} {
                incr item
                set t [+ $t 1 ]
                set term1 [* 1. $t $t $t $t]
                set term2 [* 1. $tx $tx $tx $tx]
                set term1 [* .000000000056703 [ - $term1 $term2]]
                set term2 [* $h  1.1 [/ [- $taxx $t]  [ - $taxx $tx ]]]
                set difference  [abs [- $term1 $term2]]
                if {$difference < 2.} { set temp_answer $t }
                }
            return $temp_answer
                }
        proc calculate {     } {
            global answer2
            global side1 side2 side3 side4 side5
            global side6 side7 testcase_number fuel
            global piston_volume piston_temperature_exp
            global workdays total_heat massfromvolume
            global total_heat firebox_temp heatsourcetemp2
            global carnotefficiency novikovefficiency
            global idealappliedovertotal piston_firing_time
            global heatsinktemp1
            incr testcase_number
            set piston_diameter $side1
            set piston_height $side2
            set piston_firing_time [* 2 60 10]
            set heatsourcetemp2 $side3
            set heatsinktemp1 $side4
            set piston_volume 1
            set piston_volume [pistonvolumex $piston_diameter $piston_height]
            set fuel_density 850
            set massfromvolume [* $piston_volume $fuel_density]
            set fuel [* [ /  8.2 60.   ] $massfromvolume]
            set total_heat [* 13.5 $fuel]
            set temp_amb 25.
            set temp_flame 1488.
            set piston_temperature_exp $temp_flame
            set total_heat_joules [* $total_heat 1.0E6]
            set firebox_temp [firebox $total_heat_joules $piston_firing_time $piston_diameter $temp_amb $temp_flame]
            if  {$piston_temperature_exp > 1200.} {set piston_temperature_exp 1200}
            set workdays [/ $piston_volume 3. ]
            set carnotefficiency [ carnotthermic $heatsourcetemp2 $heatsinktemp1]
            set novikovefficiency [ endothermic $heatsourcetemp2 $heatsinktemp1]
            set idealappliedovertotal [ endoprocess $heatsourcetemp2 $heatsinktemp1]
            set fractionwork [ endoprocess $heatsourcetemp2 $heatsinktemp1]
            set side5 $piston_volume
            set side6 $total_heat
            set side7 $fractionwork  }
        proc fillup {aa bb cc dd ee ff gg} {
            .frame.entry1 insert 0 "$aa"
            .frame.entry2 insert 0 "$bb"
            .frame.entry3 insert 0 "$cc"
            .frame.entry4 insert 0 "$dd"
            .frame.entry5 insert 0 "$ee"
            .frame.entry6 insert 0 "$ff"
            .frame.entry7 insert 0 "$gg"}
        proc clearx {} {
            foreach i {1 2 3 4 5 6 7} {
                .frame.entry$i delete 0 end } }
        proc reportx {} {
            global side1 side2 side3 side4 side5
            global side6 side7 testcase_number fuel
            global piston_temperature massfromvolume
            global piston_volume workdays
            global total_heat firebox_temp
            global piston_temperature_exp
            global carnotefficiency novikovefficiency
            global idealappliedovertotal
            global piston_firing_time heatsourcetemp2
            global heatsinktemp1
            console show;
            puts "testcase number: $testcase_number"
            puts "piston diameter meters: $side1 "
            puts "piston height meters: $side2 "
            puts "piston firing seconds: $piston_firing_time "
            puts "volume cubic meters: $side5 "
            puts "total energy MJ: $side6 "
            puts "piston volume m*m*m: $piston_volume "
            puts "heat source temperature T2 $heatsourcetemp2"
            puts "heat sink temperature T1 $heatsinktemp1"
            puts "max room fuel kg $massfromvolume"
            puts "estimated fuel, kg $fuel"
            puts "total heat megajoules $total_heat"
            puts "firing max temperature  $firebox_temp "
            puts "man workdays to load fuel  $workdays"
            puts "Carnot  efficiency $carnotefficiency"
            puts "Novikov efficiency $novikovefficiency"
            puts "ideal applied/total $idealappliedovertotal "
            }
         frame .buttons -bg aquamarine4
        ::ttk::button .calculator -text "Solve" -command { calculate   }
        ::ttk::button .test2 -text "Testcase1" -command {clearx;fillup .5 .5 900. 300. 0.0981  153.9 .166 }
        ::ttk::button .test3 -text "Testcase2" -command {clearx;fillup 1.5 1.5 1200. 300. 2.65  4156. .1875 }
        ::ttk::button .test4 -text "Testcase3" -command {clearx;fillup 2. 2. 1400. 300. 6.28  9853. .196 }
        ::ttk::button .clearallx -text clear -command {clearx }
        ::ttk::button .about -text about -command about
        ::ttk::button .cons -text report -command { reportx }
        ::ttk::button .exit -text exit -command {exit}
        pack .calculator  -in .buttons -side top -padx 10 -pady 5
        pack  .clearallx .cons .about .exit .test4 .test3 .test2   -side bottom -in .buttons
        grid .frame .buttons -sticky ns -pady {0 10}
        . configure -background aquamarine4 -highlightcolor brown -relief raised -border 30
        wm title . "Heat Engine Combustion Calculator "       

Pushbutton Operation


For the push buttons, the recommended procedure is push testcase and fill frame, change first three entries etc, push solve, and then push report. Report allows copy and paste from console, but takes away from computer "efficiency". While the testcases are in meters, the units either cancel out or are carried through in the calculator equations. So the units could be entered as English feet, Egyptian royal cubits, Sumerian gars, or Chinese inches and the outputs of volume will in the same (cubic) units. This is an advantage since the units in the ancient Sumerian, Indian, and Chinese texts are open to question. In some benign quarters of the globe, feet and cubic feet were still being used for design in the 1970's.

For testcases in a computer session, the eTCL calculator increments a new testcase number internally, eg. TC(1), TC(2) , TC(3) , TC(N). The testcase number is internal to the calculator and will not be printed until the report button is pushed for the current result numbers (which numbers will be cleared on the next solve button.) The command { calculate; reportx } or { calculate ; reportx; clearx } can be added or changed to report automatically, but is not recommended as computer efficiency is impaired. Another wrinkle would be to print out the current text, delimiters, and numbers in a TCL wiki style table as

  puts " %| testcase $testcase_number | value| units |comment |%"
  puts " &| volume| $volume| cubic meters |based on length $side1 and width $side2   |&"  

Initial Console Program

        # pretty print from autoindent and ased editor
        # Novikov efficiency of small gas stoves
        # written on Windows XP on eTCL
        # working under TCL version 8.5.6 and eTCL 1.0.1
        # gold on TCL WIKI , 8aug2013
        package require Tk
        namespace path {::tcl::mathop ::tcl::mathfunc}
        console show
       proc novikov { theatsource tlow  } {
            set endo [expr { 1.-sqrt($tlow)/sqrt                        ($theatsource)} ]
            return $endo
            }
        proc carnot { theatsource tlow  } {
            set theatsource [* 1. $theatsource]
            set tlow  [* 1. $tlow]
            set carnot [- 1. [/ $tlow $theatsource]]
            return $carnot
            }
        proc k { temperature  } { 
             set temperature [+ $temperature 273. ]  
             return $temperature
             }
  puts "%|name|water boiled|measured Nu|Novikov Nu|Carnot Nu |%"
  puts "&|stove a|1 l|49.4|[* 100 [novikov 96.5 32.]]|[* 100. [carnot 96.5 32.]]|&"
  puts "&|stove b|1 l|43.8|[* 100. [novikov 95.5 24.5]] |[* 100. [carnot 95.5 24.5]] |&"
  puts "&|stove c|0.5 l|32.4|[* 100. [novikov 96.5 24.]] |[carnot 96.5 24.]|&"
       

Comments Section

Please place any comments here, Thanks.