summaryrefslogtreecommitdiff
path: root/Power_Plant_Engineering_by_P._K._Nag/Ch3.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Power_Plant_Engineering_by_P._K._Nag/Ch3.ipynb')
-rw-r--r--Power_Plant_Engineering_by_P._K._Nag/Ch3.ipynb529
1 files changed, 529 insertions, 0 deletions
diff --git a/Power_Plant_Engineering_by_P._K._Nag/Ch3.ipynb b/Power_Plant_Engineering_by_P._K._Nag/Ch3.ipynb
new file mode 100644
index 00000000..72e7fae0
--- /dev/null
+++ b/Power_Plant_Engineering_by_P._K._Nag/Ch3.ipynb
@@ -0,0 +1,529 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 3 : Combined Cycle Power Generation"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex: 3.1 Pg: 143"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " (a) The amount of mercury circulated per kg of water is 7.4151 kg \n",
+ " (b) The efficiency of the combined cycle is 48.1 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "#Input data\n",
+ "p=40#Pressure in bar\n",
+ "T1=400+273#Temperature in K\n",
+ "T2=40+273#Temperature in K\n",
+ "x=[0,10,515.5,72.23,363.0,0.1478,0.5167,80.9*10**-6,0.0333]#Property values from table p(bar),t(degree C), hf,hg(kJ/kg),sf,sg(kJ/kg.K),vf,vg(m**3/kg)\n",
+ "y=[0,0.2,277.3,38.35,336.55,0.0967,0.6385,77.4*10**-6,1.163]#Property values from table p(bar),t(degree C), hf,hg(kJ/kg),sf,sg(kJ/kg.K),vf,vg(m**3/kg)\n",
+ "\n",
+ "#Calculations\n",
+ "h1=3216#Enthalpy in kJ/kg\n",
+ "s1=6.7690#Entropy in kJ/kg.K\n",
+ "s2=s1#Entropy in kJ/kg.K\n",
+ "x2=(s2-0.5725)/(8.2570-0.5725)#Dryness fraction\n",
+ "h2=167.57+x2*2406.7#Enthalpy in kJ/kg\n",
+ "h3=167.57#Enthalpy in kJ/kg\n",
+ "h4=(167.57+p*100*1.008*10**-3)#Enthalpy in kJ/kg\n",
+ "h5=1087.31#Enthalpy in kJ/kg\n",
+ "h6=2801.4#Enthalpy in kJ/kg\n",
+ "ha=x[(4)]#Enthalpy in kJ/kg\n",
+ "sa=x[(6)]#Entropy in kJ/kg.K\n",
+ "sb=sa#Entropy in kJ/kg.K\n",
+ "xb=(sb-y[(5)])/(y[(6)]-y[(5)])#Dryness fraction\n",
+ "hb=(y[(3)]+xb*(y[(4)]-y[(3)]))#Enthalpy in kJ/kg\n",
+ "hc=y[(3)]#Enthalpy in kJ/kg\n",
+ "hd=hc#Enthalpy in kJ/kg\n",
+ "m=(h6-h5)/(hb-hc)#Mass of mercury circulated per kg of steam\n",
+ "Q1=m*(ha-hd)+(h1-h6)+(h5-h4)#Heat supplied in kJ/kg\n",
+ "Q2=(h2-h3)#Heat rejected in kJ/kg\n",
+ "nc=(1-(Q2/Q1))*100#Efficiency in percent\n",
+ "\n",
+ "#Output\n",
+ "print \" (a) The amount of mercury circulated per kg of water is %3.4f kg \\n (b) The efficiency of the combined cycle is %3.1f percent\"%(m,nc)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex: 3.2 Pg: 145"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a) Rate of heat transfer in the steam generator is 14.844 kW \n",
+ " (b) The net power output of the binary cycle is 4030 kW \n",
+ " (c) The rate of heat transfer to the industrial process is 5799 kW\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "#Input data\n",
+ "m=5#Mass flow rate in kg/s\n",
+ "p1=40#Pressure in bar\n",
+ "T1=440+273#Temperature in K\n",
+ "p2=1.5#Pressure in bar\n",
+ "p3=1#Pressure in bar\n",
+ "T3=60+273#Temperature in K\n",
+ "p4=16#Pressure in bar\n",
+ "T4=100+273#Temperature in K\n",
+ "p5=9#Pressure in bar\n",
+ "\n",
+ "#Calculations\n",
+ "h1=3307.1#Enthalpy in kJ/kg\n",
+ "s1=6.9041#Entropy in kJ/kg.K\n",
+ "s2=s1#Entropy in kJ/kg.K\n",
+ "h2=2570.8#Enthalpy in kJ/kg\n",
+ "h3=417.46#Enthalpy in kJ/kg\n",
+ "h6=(251.13+(1.0172*10**-3)*(p3-0.1994)*100)#Enthalpy in kJ/kg\n",
+ "m3=(m/2)#Mass flow rate in kg/s\n",
+ "m6=m3#Mass flow rate in kg/s\n",
+ "h4=(m3*h3+m6*h6)/m#Enthalpy in kJ/kg\n",
+ "h5=(h4+(1.0291*10**-3)*(p1-p3)*100)#Enthalpy in kJ/kg\n",
+ "ha=241.58#Enthalpy in kJ/kg\n",
+ "sa=0.7656#Entropy in kJ/kg.K\n",
+ "sb=sa#Entropy in kJ/kg.K\n",
+ "hb=229.43#Enthalpy in kJ/kg\n",
+ "hc=71.93#Enthalpy in kJ/kg\n",
+ "hd=hc+(0.7914*10**-3*(p4-p5)*100)#Enthalpy in kJ/kg\n",
+ "Q1=(m*(h1-h5))/1000#Heat supplied in kW\n",
+ "Wnets=(m*((h1-h2)-(h5-h4)))#Net workdone by steam in kW\n",
+ "mR12=(m3*(h2-h3))/(ha-hd)#Mass of R12 in kg/s\n",
+ "WnetR=(mR12*((ha-hb)-(hd-hc)))#Net workdone by R12 in kW\n",
+ "T=Wnets+WnetR#Total output in kW\n",
+ "Qh=(m6*(h2-h6))#Heat rejected in kW\n",
+ "\n",
+ "#Output\n",
+ "print \"(a) Rate of heat transfer in the steam generator is %3.3f kW \\n (b) The net power output of the binary cycle is %d kW \\n (c) The rate of heat transfer to the industrial process is %3.0f kW\"%(Q1,T,Qh)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex: 3.3 Pg: 146"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " (a) The flow rate of air is 396.33 kg/s and steam is 82.22 kg/s \n",
+ " (b) The power outputs of the gas turbine is 87.77 MW and steam turbine is 112.23 MW \n",
+ " (c) The thermal efficiency of the combined plant is 50 percent \n",
+ " (d) The air fuel ratio is 42.7\n"
+ ]
+ }
+ ],
+ "source": [
+ "from numpy import mat\n",
+ "#Input data\n",
+ "rp=7.5#Pressure ratio \n",
+ "T1=15+273#Inlet air temperature in K\n",
+ "T3=750+273#Maximum temperature in K\n",
+ "T6=100+273#Temperature in K\n",
+ "p1=50#Pressure in bar\n",
+ "T7=600+273#Temperature in K\n",
+ "p2=0.1#Pressure in bar\n",
+ "P=200#Total power in MW\n",
+ "CV=43.3#calorific value in MJ/kg\n",
+ "cpg=1.11#Specific heat for gas in kJ/kg.K\n",
+ "g=1.33#Ratio of specific heats for gas\n",
+ "cpa=1.005#Specific heat for air in kJ/kg.K\n",
+ "g1=1.4#Ratio of specific heats for air\n",
+ "\n",
+ "#Calculations\n",
+ "T2=(T1*rp**((g1-1)/g1))#Temperature in K\n",
+ "T4=(T3/rp**((g-1)/g))#Temperature in K\n",
+ "ha=3670#Enthalpy in kJ/kg\n",
+ "hb=2305#Enthalpy in kJ/kg\n",
+ "hc=192#Enthalpy in kJ/kg\n",
+ "hd=hc#Enthalpy in kJ/kg\n",
+ "#ma*cpg*(T3-T6)=ms*(ha-hd)\n",
+ "#ma*cpg*(T3-T4)-ma*cpa*(T2-T1)+ms*(ha-hb)=P*1000\n",
+ "#Solving these two equations\n",
+ "A=mat([[cpg*(T3-T6), (hd-ha)],[cpg*(T3-T4)-cpa*(T2-T1), (ha-hb)]])#Coefficient matrix\n",
+ "B=mat([[0],[(P*10**3)]])#Constant matrix\n",
+ "X=(A**-1)*B#Variable matrix\n",
+ "\n",
+ "Wgt=(cpg*(T3-T4)-cpa*(T2-T1))*X[0]*10**-3#Net workdone by Gas turbine in MW\n",
+ "Wst=(P-Wgt)#Net workdone by steam turbine in MW\n",
+ "Q1=(X[0]*cpg*(T3-T2+T3-T4))#Heat supplied in MW\n",
+ "nth=(P/(Q1*10**-3))*100#Thermal efficiency in percent\n",
+ "af=(CV*10**3)/(cpg*(T3-T2+T3-T4))#Air fuel ratio\n",
+ "\n",
+ "#Output\n",
+ "print \" (a) The flow rate of air is %3.2f kg/s and steam is %3.2f kg/s \\n (b) The power outputs of the gas turbine is %3.2f MW and steam turbine is %3.2f MW \\n (c) The thermal efficiency of the combined plant is %3.0f percent \\n (d) The air fuel ratio is %3.1f\"%(X[0],X[1],Wgt,Wst,nth,af)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex: 3.4 Pg: 148"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a) Total power output is 82422.08 kW and overall efficiency is 41.54 percent lost heat coefficient is 0.351\n",
+ " Exergy efficiency is 40 percent \n",
+ "\n",
+ " Input is 212810 kW \n",
+ " Total Output is 82422 kW \n",
+ " Total losses is 123309 kW \n",
+ " Exergy outut + exergy destruction = 205731 kW which is 1.3 percent gretter than the exergy input\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import log\n",
+ "#Input data\n",
+ "p1=1#Pressure in bar\n",
+ "T1=25+273#Temperature in K\n",
+ "rp=8#Pressure ratio of compressor\n",
+ "Tm=900+273#Maximum temperature in K\n",
+ "pd=3#pressure drop in combustion chamber in percent\n",
+ "nc=0.88#Efficiency of compressor\n",
+ "nt=0.88#Efficiency of turbine\n",
+ "CV=44.43#Calorific value of fuel in MJ/kg\n",
+ "cpa=1.006#Specific heat of air in kJ/kg.K\n",
+ "cpg=1.148#Specific heat of gas in kJ/kg.K\n",
+ "g1=1.333#Specific heat ratio of gas\n",
+ "g=1.4#Specific heat ratio of air\n",
+ "T3=425+273#Temperature in K\n",
+ "p2=40#Pressure in bar\n",
+ "p3=0.04#Condensor pressure in bar\n",
+ "Th=170.4+273#Temperature of feed water to the HRSG in K\n",
+ "nst=0.82#Efficiency of steam turbine\n",
+ "pdh=5#Pressure drop in HRSG in kPa\n",
+ "m=29.235#Steam flow rate in kg/s\n",
+ "A=1.0401#si=1.0401+0.1728*(h/c)\n",
+ "B=0.1728#si=1.0401+0.1728*(h/c)\n",
+ "\n",
+ "#Calculations\n",
+ "#Gas turbine plant\n",
+ "T2=(rp**((g-1)/(g*nt)))*T1#Temperature in K\n",
+ "#Combustor\n",
+ "pc=((pd/100)*rp)#Pressure loss in bar\n",
+ "pcx=(rp-pc)#Pressure in bar\n",
+ "f=((cpg*(Tm-T1))-(cpa*(T2-T1)))/((CV*10**3)-(cpa*(T2-T1)))#Fuel flow rate in kg/s\n",
+ "af=(1-f)/f#Air fuel ratio\n",
+ "#C8H18+12.5O2->8CO2+9H2O\n",
+ "afc=(12.5*32)/(0.232*114)#Air fuel ratio for stoichiometric combustion\n",
+ "ea=((af-afc)/afc)*100#Excess air in percent\n",
+ "#Gas turbine\n",
+ "p4=p1+0.05#Pressure in bar\n",
+ "T4=(Tm/(pcx/p4)**(((g1-1)*nt)/g1))#Temperature in K\n",
+ "#HRSG\n",
+ "T5=250+30#Temeprature in K\n",
+ "ha=3272#Enthalpy in kJ/kg\n",
+ "hf=1087.31#Enthalpy in kJ/kg\n",
+ "ws=(cpg*((T4-273)-T5))/(ha-hf)#Flow rate in kg/s\n",
+ "he=721.1#Enthalpy in kJ/kg\n",
+ "T6=(T4-273)-((ws*(ha-he))/cpg)#Temperature in degree C\n",
+ "#Power output\n",
+ "sa=6.853#Entropy in kJ/kg.K\n",
+ "sbs=sa#Entropy in kJ/kg.K\n",
+ "xbs=(sbs-0.4266)/8.052#Dryness fraction\n",
+ "hbs=(121.46+xbs*2432.9)#ENthalpy in kJ/kg\n",
+ "Wst=(m*(ha-hbs)*nst)#Workdone in kW\n",
+ "wg=(m/ws)#gas flow rate in kg/s\n",
+ "wa=(1-f)*wg#Air flow rate entering the compressor in kg/s\n",
+ "Wgt=(wg*cpg*(Tm-T4))-(wa*cpa*(T2-T1))#Power output of gas turbine in kW\n",
+ "TO=Wst+Wgt#Total power output in kW\n",
+ "wf1=(f*wa)#Fuel mass flow rate in kg/s\n",
+ "wf=4.466#Rounding off of wf1 for exact answers\n",
+ "no=(TO/(wf*(CV*10**3)))*100#Overall efficiency of the combined plant in percent\n",
+ "ns=((ha-hbs)/(ha-he))*nst#Efficiency of steam plant\n",
+ "ngtp=(Wgt/(wf*(CV*10**3)))#Efficiency of the GT plant\n",
+ "xL=((wg*cpg*(T6-(T1-273)))/(wf*(CV*10**3)))#Lost heat coefficient\n",
+ "nov=(ns+ngtp-ns*ngtp-ngtp*xL)#The overall efficiency\n",
+ "#Energy fluxes and irreversibilities\n",
+ "si=(A+B*((18*1)/(8*12)))#si for octane C8H18\n",
+ "dHo=(wf*CV*10**3)#Power in kW\n",
+ "dGo=(si*dHo)#Power in kW\n",
+ "TS=(dGo-dHo)#Power in kW\n",
+ "#Compressor\n",
+ "dS=(cpa*log(T2/T1))-(((cpa*(g-1))/g)*log(rp))#change in entropy in kJ/kg.K\n",
+ "Ic=(wa*T1*dS)#power in kW\n",
+ "Icx=((wg*T1*((cpg*log(Tm/T1))-(((cpg*(g1-1))/g1)*log(pcx))))-(wa*T1*((cpa*log(T2/T1))-(((cpa*(g-1))/g)*log(rp))))+TS)#Compressor in kW\n",
+ "Icg=(-cpg*log(Tm/T4))-(((cpg*(g1-1))/g1)*log(p4/pcx))#Difference in entropy in kJ/kg.K\n",
+ "IGT=(Icg*T1*wg)#Gas turbine in kW\n",
+ "se=2.046#Enntropy in kJ/kg.K\n",
+ "sae=(sa-se)#Difference in entropy in kJ/kg.K\n",
+ "s64=(cpg*log((T6+273)/T4))-(((cpg*(g1-1))/g1)*log(p4/p1))#Difference in entropy in kJ/kg.K\n",
+ "Ih=(T1*m*sae)+(wg*T1*s64)#For HRSG in kW\n",
+ "hb=(ha-(nst*(ha-hbs)))#Enthalpy in kJ/kg\n",
+ "xb=(hb-121.46)/2432.9#Dryness Fraction\n",
+ "sb=(0.4226+xb*8.052)#Entropy in kJ/kg.K\n",
+ "Ist=(m*(sb-sa)*T1)#For steam turbine in kW\n",
+ "Iexh=(wg*cpg*((T6-(T1-273))-(T1*log((T6+273)/T1))))#For exhaust in kW\n",
+ "Tl=Icx+Icg+IGT+Ih+Ist+Iexh#Exergy losses in kW\n",
+ "T=Tl+Wgt+Wst#Total exergy output and exergy destruction in kW\n",
+ "ee=((Wst+Wgt)/T)*100#Exergy efficiency in percent\n",
+ "\n",
+ "#Output\n",
+ "print \"(a) Total power output is %3.2f kW and overall efficiency is %3.2f percent lost heat coefficient is %3.3f\\n Exergy efficiency is %3.0f percent \\n\\n Input is %3.0f kW \\n Total Output is %3.0f kW \\n Total losses is %3.0f kW \\n Exergy outut + exergy destruction = %3.0f kW which is 1.3 percent gretter than the exergy input\"%(TO,no,xL,ee,dGo,(Wgt+Wst),Tl,T)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex: 3.5 Pg: 154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The overall efficiency of the combined cycle is 77.5 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Input data\n",
+ "n1=0.5#Efficiency of mercury\n",
+ "n2=0.4#Efficiency of steam\n",
+ "n3=0.25#Efficiency of composite cycle\n",
+ "\n",
+ "#Calculations\n",
+ "n=(1-(1-n1)*(1-n2)*(1-n3))*100#Overall efficiency of the combined cycle in percent\n",
+ "\n",
+ "#Output\n",
+ "print \"The overall efficiency of the combined cycle is %3.1f percent\"%(n)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex: 3.6 Pg: 156"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The overall efficiency of the combined plant is 58 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Input data\n",
+ "z=30.0#Percentage of total energy of fuel\n",
+ "n=40.0#Cycle efficiency in percent\n",
+ "\n",
+ "#Calculations\n",
+ "on=((z/100)+(1-(z/100))*(n/100))*100#Overall efficiency in percent\n",
+ "\n",
+ "#Output\n",
+ "print \"The overall efficiency of the combined plant is %3.0f percent\"%(on)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex: 3.7 Pg: 158"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a) The output voltage is 1.1629 V \n",
+ " (b) The current density in the cathode is 4.239 A/cm**2 and anode is 1.092 A/cm**2 \n",
+ " (c) Power output per unit area is 3.66 W/cm**2 \n",
+ " (d) Thermal efficiency is 44.3 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import exp\n",
+ "#Input data\n",
+ "Tc=1250+273#Cathode temperature in K\n",
+ "Ta=500+273#Anode temperature in K\n",
+ "e=1.602*10**-19#Charge in coloumb\n",
+ "K=1.38*10**-23#Boltzmann constant in J/molecule.K\n",
+ "b=18#Constant\n",
+ "\n",
+ "#Calculations\n",
+ "Va=((b*K*Ta)/e)#Voltage of anode in V\n",
+ "Vc=((b*K*Tc)/e)#Voltage of cathode in V\n",
+ "Vo=Vc-Va#Output voltage in V\n",
+ "Ja=(120*Ta**2*exp(-b))#Current density in Cathode in A/cm**2\n",
+ "Jc=(120*Tc**2*exp(-b))#Current density in Anode in A/cm**2\n",
+ "P=Vo*(Jc-Ja)#Power output per unit area in /cm**2\n",
+ "nth=(((Tc-Ta)/Tc)*(b/(b+2)))*100#Thermal efficiency in percent\n",
+ "\n",
+ "#Output\n",
+ "print \"(a) The output voltage is %3.4f V \\n (b) The current density in the cathode is %3.3f A/cm**2 and anode is %3.3f A/cm**2 \\n (c) Power output per unit area is %3.2f W/cm**2 \\n (d) Thermal efficiency is %3.1f percent\"%(Vo,Jc,Ja,P,nth)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex: 3.8 Pg: 159"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 35,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a) The thermal efficiency of thermocouple generator is 9.1 percent \n",
+ " (b) The number of thermo couples in series is 309 \n",
+ " (c) The lenght of the thermal elements is 0.519 cm and area is 43.48 cm**2 \n",
+ " (d) The output open-circuit voltage is 0.6 V \n",
+ " (e) At full load: \n",
+ " The heat input is 3.558 kW \n",
+ " The heat rejected is 3.236 kW \n",
+ " At no load: \n",
+ " The heat input is 2.093 kW \n",
+ " The heat rejected is 2.093 kW \n",
+ " (f) The overall efficiency of the combined thermo-electric steam power plant is 34.18 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import sqrt\n",
+ "#Input data\n",
+ "P=100#Power in kW\n",
+ "V=115#Voltage in V\n",
+ "To=1500#Outer temperature in K\n",
+ "Te=1000#Exit temperature in K\n",
+ "Ta=350#Ambient temperature in K\n",
+ "nth=30#Thermal efficiency in percent\n",
+ "nge=92#Generator efficiency in percent\n",
+ "#Properties of thermoelectrons \n",
+ "a=0.0012#At 1250K in V/K\n",
+ "kp=0.02#In W/cm.K\n",
+ "kn=0.03#In W/cm.K\n",
+ "dp=0.01#In ohm.cm\n",
+ "dn=0.012#In ohm.cm\n",
+ "J=20#Current density in A/cm**2\n",
+ "\n",
+ "#Calculations\n",
+ "zmax=(a**2/(sqrt(dp*kp)+sqrt(dn*kn))**2)#Maximum value of figure of merit in K**-1\n",
+ "mo=sqrt(1+(zmax*((To+Te)/2)))#Optimum value of the resistance ratio\n",
+ "nmax=(((To-Te)/To)*((mo-1)/(mo+(Te/To))))*100#Maximum thermal efficiency in percent\n",
+ "Vl=(a*(To-Te)*(mo/(mo+1)))#Voltage per couple in V\n",
+ "nc=(V/Vl)#Number of couples in series\n",
+ "L=((a*(To-Te))/((1+mo)*(dp+dn)))/J#Length in cm\n",
+ "A=((P*Te)/V)/J#Area in cm**2\n",
+ "I=(J*A)#Current in A\n",
+ "Vo=(a*(To-Te))#Voltage in V\n",
+ "Q1=((a*I*To)-((1/2)*(L/A)*I**2*(dp+dn))+((A/L)*(kp+kn)*(To-Te)))/1000#Heat input to the thermoelectric generator in kW\n",
+ "Q2=((a*I*Te)+((A/L)*(kp+kn)*(To-Te))+P)/1000#Heat rejected at full load in kW\n",
+ "Q1n=(((A/L)*(kp+kn)*(To-Te)))/1000#At no load heat input in kW\n",
+ "Q2n=Q1n#At no load heat rejected in kW\n",
+ "no=((nmax/100)+(1-(nmax/100))*(nth/100)*(nge/100))*100#Overall efficiency in percent\n",
+ "\n",
+ "#Output\n",
+ "print \"(a) The thermal efficiency of thermocouple generator is %3.1f percent \\n (b) The number of thermo couples in series is %d \\n (c) The lenght of the thermal elements is %3.3f cm and area is %3.2f cm**2 \\n (d) The output open-circuit voltage is %3.1f V \\n (e) At full load: \\n The heat input is %3.3f kW \\n The heat rejected is %3.3f kW \\n At no load: \\n The heat input is %3.3f kW \\n The heat rejected is %3.3f kW \\n (f) The overall efficiency of the combined thermo-electric steam power plant is %3.2f percent\"%(nmax,nc,L,A,Vo,Q1,Q2,Q1n,Q2n,no)"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}