{
"metadata": {
"name": "",
"signature": "sha256:9cb92879a3edfd07367a11876840b47bf3060ee079039238aa0305841473df9a"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 27: Economics and Finance"
]
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"ILLUSTRATIVE EXAMPLE 27.5, Page number: 575"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"#Variable declaration:\n",
"i = 0.03375 #Rate of interest (%)\n",
"n = 9 #Years to the end of life (yr)\n",
"P = 60000 #Cost of exchanger ($)\n",
"L = 500 #Salvage value ($)\n",
"x = 5 #Time after 5 years (yr)\n",
"\n",
"#Calculation:\n",
"SFDF = i/((1+i)**n-1) #Sinking fund depreciation factor\n",
"UAP = (P-L)*SFDF #Uniform annual payment ($)\n",
"B = P-((P-L)/n)*x #Appraisal value after 5 years ($)\n",
"\n",
"#Result:\n",
"print \"1. The uniform annual payment made into the fund at the of the year is : $\",round(UAP),\" .\"\n",
"print \"2. The appraisal value of the exchanger at the end of the fifth year is : $\",round(B),\" .\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"1. The uniform annual payment made into the fund at the of the year is : $ 5768.0 .\n",
"2. The appraisal value of the exchanger at the end of the fifth year is : $ 26945.0 .\n"
]
}
],
"prompt_number": 6
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"ILLUSTRATIVE EXAMPLE 27.6, Page number: 576"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"\n",
"from __future__ import division\n",
"\n",
"#Variable declaration:\n",
"C = 150000 #Capital cost ($)\n",
"i = 7/100 #Interest rate\n",
"n = 5 #Time (yr)\n",
"OC = 15000 #Operating cost ($)\n",
"A = 75000 #Annual cost for the old process ($)\n",
"\n",
"#Calculation:\n",
"CRF = (i*(1+i)**n)/((1+i)**n-1) #Capital recovery factor\n",
"IC = CRF*C #Initial cost ($)\n",
"AC = IC+OC #Total annualized cost ($)\n",
"\n",
"#Result:\n",
"print \"The annualized cost for the new heating system is : $\",round(AC),\" .\"\n",
"if (ACDPp):\n",
" print \"A shell-and-tube heat exchanger should therefore be selected based on the above economic analysis.\"\n",
"else :\n",
" print \"A double pipe heat exchanger should therefore be selected based on the above economic analysis.\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The profit for the shell-and-tube unit is : $ 272000.0 /yr .\n",
"The profit for the double pipe unit is : $ 420000.0 /yr .\n",
"A shell-and-tube heat exchanger should therefore be selected based on the above economic analysis.\n"
]
}
],
"prompt_number": 8
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"ILLUSTRATIVE EXAMPLE 27.8, Page number: 579"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"\n",
"from __future__ import division\n",
"from math import log\n",
"\n",
"#Variable declaration:\n",
"m = 50000 #Mass flowrate of the organic fluid (lb/h)\n",
"cP = 0.6 #The heat capacity of the organic liquid (Btu/lb.\u00b0F)\n",
"T1 = 150 #Initial temperature of organic fluid (\u00b0F)\n",
"T2 = 330 #Final temperature of organic fluid (\u00b0F)\n",
"Ts1 = 358 #Saturation temperature for 150 psia (\u00b0F)\n",
"Ts2 = 417 #Saturation temperature for 300 psia (\u00b0F)\n",
"L1 = 863.6 #Latent heat for 150 psia (Btu/lb)\n",
"L2 = 809 #Latent heat for 300 psia (Btu/lb)\n",
"c1 = 5.20/1000 #Cost for 150 psia ($/lb)\n",
"c2 = 5.75/1000 #Cost for 300 psia ($/lb)\n",
"CI1 = 230 #Cost index in 1998 \n",
"CI2 = 360 #Cost index in 2011\n",
"IF = 3.29 #Installation factor\n",
"PF1 = 1.15 #Pressure factors for 100 to 200 psig\n",
"PF2 = 1.20 #Pressure factors for 200 to 300 psig\n",
"OP = 90/100 #Plant on-stream operation factor\n",
"h = 365*24 #Hours in a year (h)\n",
"\n",
"#Calculation:\n",
"Q = m*cP*(T2-T1) #Overall heta duty (Btu/h)\n",
"DT1 = Ts1-T1 #Temperature driving force 1 for 150 psia (\u00b0F)\n",
"DT2 = Ts1-T2 #Temperature driving force 2 for 150 psia (\u00b0F)\n",
"LMTD1 = (DT1-DT2)/log(DT1/DT2) #Log-mean temperature difference for 150 psia (\u00b0F)\n",
"DT3 = Ts2-T1 #Temperature driving force 1 for 300 psia (\u00b0F)\n",
"DT4 = Ts2-T2 #Temperature driving force 2 for 300 psia (\u00b0F)\n",
"LMTD2 = (DT3-DT4)/log(DT3/DT4) #Log-mean temperature difference for 1300 psia (\u00b0F)\n",
"A1 = Q/(138*LMTD1) #Required heat transfer area for 150 psia (ft^2)\n",
"A2 = Q/(138*LMTD2) #Required heat transfer area for 300 psia (ft^2)\n",
"BC1 = 117*A1**0.65 #Base cost for 150 psia ($)\n",
"BC2 = 117*A2**0.65 #Base cost for 13000 psia ($)\n",
"C1 = BC1*(CI2/CI1)*IF*PF1 #Capital cost for 150 psia ($)\n",
"C2 = BC2*(CI2/CI1)*IF*PF2 #Capital cost for 300 psia ($)\n",
"S1 = Q*(h*OP)/L1 #Steam requirement for 150 psia (lb/yr)\n",
"S2 = Q*(h*OP)/L2 #Steam requirement for 300 psia (lb/yr)\n",
"SC1 = S1*c1 #Annual steam cost for 150 psia ($/yr)\n",
"SC2 = S2*c2 #Annual steam cost for 300 psia ($/yr)\n",
"\n",
"#Result:\n",
"print \"1. The capital cost for 150 psia is : $\",round(C1,-3),\" .\"\n",
"print \" The capital cost for 300 psia is : $\",round(C2,-3),\" .\"\n",
"print \"2. The annual steam cost for 150 psia is : $\",round(SC1,-3),\"/yr .\"\n",
"print \" The annual steam cost for 300 psia is : $\",round(SC2,-3),\"/yr .\"\n",
"if (C1SC2):\n",
" print \"The 300-psia exchanger costs less to purchase and install, but it costs more to operate. Choosing the more expensive, 150-psia exchanger is the obvious choice.\"\n",
"elif (C1>C2 and SC1