{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 6: Elements of Airplane Performance"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 6.1"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The mass flow rate is: 0.0055 kg/s.\n"
]
}
],
"source": [
"# -*- coding: utf8 -*-\n",
"from __future__ import division\n",
"#Example: 6.01\n",
"''' Air is flowing in a 0.2-m-diameter pipe at a uniform velocity of 0.1 m/s. The temperature\n",
"is 25◦C and the pressure is 150 kPa. Determine the mass flow rate. '''\n",
"from math import pi\n",
"\n",
"#Variable Declaration: \n",
"R = 0.287 \t\t#in kJ/kg-K\n",
"T = 25 \t\t#temperature in celsius\n",
"P = 150 \t\t#pressure in kPa\n",
"v = R*(T+273.2)/P#specific volume in m**3/kg\n",
"D = 0.2 \t\t#diameter of pipe in metre\n",
"V = 0.1 \t\t#velocity of air in m/s\n",
"\n",
"#Calculations:\n",
"A = pi*D**2/4 \t#cross sectional area in m**2\n",
"m = V*A/v \t\t#mass flow rate in kg/s\n",
"\n",
"#Results:\n",
"print \"The mass flow rate is:\",round(m,4),\"kg/s.\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 6.2"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The work involved in this process is: 0.6 kJ\n"
]
}
],
"source": [
"# -*- coding: utf8 -*-\n",
"from __future__ import division\n",
"#Example: 6.02\n",
"''' Assume we are standing next to the local city’s main water line. The liquid water inside\n",
"flows at a pressure of 600 kPa (6 atm) with a temperature of about 10◦C. We want to add\n",
"a smaller amount, 1 kg, of liquid to the line through a side pipe and valve mounted on the\n",
"main line. How much work will be involved in this process? '''\n",
"\n",
"#Variable Declaration: \n",
"P = 600 \t\t#pressure in kPa\n",
"m = 1 \t\t#in kg\n",
"v = 0.001 \t\t#specific volume in m**3/kg\n",
"\n",
"#Calculations:\n",
"W = P*m*v \t\t#necessary work in kJ for adding the fluid \n",
"\n",
"#Results:\n",
"print \"The work involved in this process is:\",round(W,2),\"kJ\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 6.3"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The rate at which cooling water flows thorugh the condenser is: 0.919 kg/s\n"
]
}
],
"source": [
"# -*- coding: utf8 -*-\n",
"from __future__ import division\n",
"#Example: 6.03\n",
"''' Consider a water-cooled condenser in a large refrigeration system in which R-134a is the\n",
"refrigerant fluid. The refrigerant enters the condenser at 1.0 MPa and 60◦C, at the rate of\n",
"0.2 kg/s, and exits as a liquid at 0.95 MPa and 35◦C. Cooling water enters the condenser\n",
"at 10◦C and exits at 20◦C. Determine the rate at which cooling water flows through the\n",
"condenser.\n",
"Control volume: Condenser.\n",
"Sketch: Fig. 6.6\n",
"Inlet states: R-134a—fixed; water—fixed.\n",
"Exit states: R-134a—fixed; water—fixed.\n",
"Process: Steady-state.\n",
"Model: R-134a tables; steam tables. '''\n",
"\n",
"#Variable Declaration: \n",
"hir = 441.89 \t\t#in kJ/kg for refrigerant using steam table \n",
"her = 249.10 \t\t#in kJ/kg for refrigerant using steam table\n",
"hiw = 42 \t\t #in kJ/kg for water using steam table\n",
"hew = 83.95 \t #in kJ/kg for water using steam table\n",
"mr = 0.2 \t\t #the rate at which refrigerant enters the condenser in kg/s\n",
"\n",
"#Calculations:\n",
"mw = mr*(hir-her)/(hew-hiw) \t\t#rate of flow of water in kg/s\n",
"\n",
"#Results:\n",
"print \"The rate at which cooling water flows thorugh the condenser is:\",round( mw,3),\"kg/s\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 6.4"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The quality is: 0.99\n"
]
}
],
"source": [
"# -*- coding: utf8 -*-\n",
"from __future__ import division\n",
"#Example: 6.04\n",
"''' Steam at 0.6 MPa and 200◦C enters an insulated nozzle with a velocity of 50 m/s. It leaves\n",
"at a pressure of 0.15 MPa and a velocity of 600 m/s. Determine the final temperature if\n",
"the steam is superheated in the final state and the quality if it is saturated.\n",
"Control volume: Nozzle.\n",
"Inlet state: Fixed (see Fig. 6.7).\n",
"Exit state: Pe known.\n",
"Process: Steady-state.\n",
"Model: Steam tables. '''\n",
"\n",
"#Variable Declaration: \n",
"hi = 2850.1 \t#initial specific heat enthalpy for steam in kJ/kg\n",
"Vi = 50 \t\t#initial velocity of steam in m/s\n",
"Ve = 600 \t\t#final velocity of steam in m/s\n",
"hf = 467.1 \t\t#at final state in kJ/kg\n",
"hfg = 2226.5 \t#at final state in kJ/kg\n",
"\n",
"#Calculations:\n",
"he = hi+Vi**2/(2*1000)-Ve**2/(2*1000) #final specific heat enthalpy for steam in kJ/kg\n",
"xe = (he-hf)/hfg \t#quality of steam in final state\n",
"\n",
"#Results:\n",
"print \"The quality is: \",round(xe,2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 6.5"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Quality of the ammonia leaving the expansion valve is: 16.38 %\n"
]
}
],
"source": [
"# -*- coding: utf8 -*-\n",
"from __future__ import division\n",
"#Example: 6.05\n",
"''' Consider the throttling process across the expansion valve or through the capillary tube\n",
"in a vapor-compression refrigeration cycle. In this process the pressure of the refrigerant\n",
"drops from the high pressure in the condenser to the low pressure in the evaporator,\n",
"and during this process some of the liquid flashes into vapor. If we consider this\n",
"process to be adiabatic, the quality of the refrigerant entering the evaporator can be\n",
"calculated.\n",
"Consider the following process, in which ammonia is the refrigerant. The ammonia\n",
"enters the expansion valve at a pressure of 1.50MPa and a temperature of 35◦C. Its pressure\n",
"on leaving the expansion valve is 291 kPa. Calculate the quality of the ammonia leaving\n",
"the expansion valve.\n",
"Control volume: Expansion valve or capillary tube.\n",
"Inlet state: Pi, Ti known; state fixed.\n",
"Exit state: Pe known.\n",
"Process: Steady-state.\n",
"Model: Ammonia tables. '''\n",
"\n",
"#Variable Declaration: \n",
"hi = 346.8 \t\t#specific heat enthalpy for ammonia at initial state in kJ/kg\n",
"hf = 134.4 \t\t#at final state in kJ/kg\n",
"hfg = 1296.4\t#at final state in kJ/kg\n",
"\n",
"#Calculations:\n",
"he = hi \t\t#specific heat enthalpy for ammonia at final state will be equal that at initial state because it is a throttling process\n",
"xe = (he-hf)/hfg \t#quality at final state\n",
"\n",
"#Results:\n",
"print \"Quality of the ammonia leaving the expansion valve is:\",round(xe*100,2),\"%\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 6.6"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The power output of the turbine is: 678.2 kW\n"
]
}
],
"source": [
"# -*- coding: utf8 -*-\n",
"from __future__ import division\n",
"#Example:\n",
"''' The mass rate of flow into a steam turbine is 1.5 kg/s, and the heat transfer from the\n",
"turbine is 8.5 kW. The following data are known for the steam entering and leaving the\n",
"turbine.\n",
" Inlet Conditions Exit Conditions\n",
"Pressure 2.0 MPa 0.1 MPa\n",
"Temperature 350◦C\n",
"Quality 100%\n",
"Velocity 50 m/s 100 m/s\n",
"Elevation above 6 m 3 m\n",
"reference plane\n",
"\n",
"g = 9.8066 m/s2\n",
"\n",
"Determine the power output of the turbine.\n",
"Control volume: Turbine (Fig. 6.9).\n",
"Inlet state: Fixed (above).\n",
"Exit state: Fixed (above).\n",
"Process: Steady-state.\n",
"Model: Steam tables. '''\n",
"\n",
"#Variable Declaration: \n",
"hi = 3137 \t\t#initial specific heat of enthalpy in kJ/kg\n",
"he = 2675.5 \t#final specific heat of enthalpy in kJ/kg\n",
"Vi = 50 \t\t#initial velocity of steam in m/s\n",
"Ve = 100 \t\t#final velocity of steam in m/s\n",
"Zi = 6 \t\t#height of inlet conditions in metres\n",
"Ze = 3 \t\t#height of exit conditions in metres\n",
"m = 1.5 \t\t#mass flow rate of steam in kg/s\n",
"g = 9.8066 \t\t#acc. due to gravity in m/s**2\n",
"Qcv = -8.5 \t\t#heat transfer rate from turbine in kW\n",
"\n",
"#Calculations:\n",
"Wcv = Qcv+m*(hi+Vi**2/(2*1000)+g*Zi/1000)-m*(he+Ve**2/(2*1000)+g*Ze/1000) \t#power output of turbine in kW\n",
"\n",
"#Results:\n",
"print \"The power output of the turbine is:\",round(Wcv,1),\"kW\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 6.7"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Heat transfer rate in the aftercooler is: 35.2 kW\n"
]
}
],
"source": [
"# -*- coding: utf8 -*-\n",
"from __future__ import division\n",
"#Example: 6.07\n",
"''' The compressor in a plant (see Fig. 6.10) receives carbon dioxide at 100 kPa, 280 K,\n",
"with a low velocity. At the compressor discharge, the carbon dioxide exits at 1100 kPa,\n",
"500 K, with velocity of 25 m/s and then flows into a constant-pressure aftercooler (heat\n",
"exchanger) where it is cooled down to 350 K. The power input to the compressor is\n",
"50 kW. Determine the heat transfer rate in the aftercooler. '''\n",
"\n",
"#Variable Declaration: \n",
"V1 = 0 \t\t#we assume initial velocity to be zero because its given that it enters with a low velocity\n",
"V2 = 25 \t\t#final velocity with which carbon dioxide exits in m/s\n",
"h2 = 401.52 \t#final specific enthalpy of heat when carbon dioxide exits in kJ/kg\n",
"h1 = 198 \t\t#initial specific enthalpy of heat in kJ/kg\n",
"Wc = -50 \t\t#power input to the compressor in kW\n",
"h3 = 257.9 \t\t#final specific enthalpy of heat when carbon dioxide flows into a constant pressure aftercooler\n",
"\n",
"#Calculations:\n",
"w = h1-h2-V2**2/(2*1000)#in kJ/kg\n",
"m = Wc/w \t\t#mass flow rate of carbon dioxide in kg/s\n",
"Qcool = -m*(h3-h2) \t\t#heat transfer rate in the aftercooler in kW\n",
"\n",
"#Results:\n",
"print \"Heat transfer rate in the aftercooler is:\",round(Qcool,1),\"kW\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 6.8"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The pump requires power input of 840.0 W\n"
]
}
],
"source": [
"# -*- coding: utf8 -*-\n",
"from __future__ import division\n",
"#Example: 6.08\n",
"''' A small liquid water pump is located 15 m down in a well (see Fig. 6.11), taking water\n",
"in at 10◦C, 90 kPa at a rate of 1.5 kg/s. The exit line is a pipe of diameter 0.04 m that\n",
"goes up to a receiver tank maintaining a gauge pressure of 400 kPa. Assume the process\n",
"is adiabatic with the same inlet and exit velocities and the water stays at 10◦C. Find the\n",
"required pump work. '''\n",
"\n",
"#Variable Declaration: \n",
"m = 1.5 \t\t#mass flow rate of water in kg/s\n",
"g = 9.807 \t\t#acceleration due to gravity in m/s**2\n",
"Zin = -15 \t\t#depth of water pump in well in metres\n",
"Zex = 0 \t\t#in metres\n",
"v = 0.001001 \t#specific volume in m**3/kg\n",
"Pin = 90 \t\t#in kPa\n",
"\n",
"#Calculations:\n",
"Pex = 400+101.3 \t#exit pressure in kPa\n",
"W = m*(g*(Zin-Zex)*0.001-(Pex-Pin)*v) \t\t#power input in kW\n",
"\n",
"#Results:\n",
"print \"The pump requires power input of\",-round(W,2)*1000,\"W\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 6.9"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Heat transfer in line between boiler and turbine is: -21.0 kJ/kg\n",
"Turbine work is: 640.7 kJ/kg\n",
"Heat transfer in condenser is: -2173.3 kJ/kg\n",
"Heat transfer in boiler is: 2831.0 kJ/kg. \n"
]
}
],
"source": [
"# -*- coding: utf8 -*-\n",
"from __future__ import division\n",
"#Example: 6.09\n",
"''' Consider the simple steam power plant, as shown in Fig. 6.12. The following data are for\n",
"such a power plant.\n",
"\n",
"Location Pressure Temperature or Quality\n",
"Leaving boiler 2.0 MPa 300◦C\n",
"Entering turbine 1.9 MPa 290◦C\n",
"Leaving turbine,entering condenser 15 kPa 90%\n",
"Leaving condenser,entering pump 14 kPa 45◦C\n",
"Pump work = 4 kJ/kg\n",
"\n",
"Determine the following quantities per kilogram flowing through the unit:\n",
"a. Heat transfer in the line between the boiler and turbine.\n",
"b. Turbine work.\n",
"c. Heat transfer in the condenser.\n",
"d. Heat transfer in the boiler. '''\n",
"\n",
"#Variable Declaration: \n",
"h1 = 3023.5 \t\t#specific heat of enthalpy of steam leaving boiler in kJ/kg\n",
"h2 = 3002.5 \t\t#specific heat of enthalpy of steam entering turbine in kJ/kg\n",
"x = 0.9 \t\t #quality of steam entering condenser\n",
"hf = 226 \t\t #in kJ/kg\n",
"hfg = 2373.1 \t\t#in kJ/kg\n",
"h4 = 188.5 \t\t #specific heat of enthalpy of steam entering pump in kJ/kg\n",
"w45 = -4 \t\t #pump work in kJ/kg\n",
"\n",
"#Calculations:\n",
"h3 = hf+x*hfg \t\t#specific heat of enthalpy of steam entering condenser in kJ/kg\n",
"q12 = h2-h1 \t\t#heat transfer in line between boiler and turbine in kJ/kg\n",
"w23 = h2-h3 \t\t#turbine work in kJ/kg\n",
"q34 = h4-h3 \t\t#heat transfer in condenser\n",
"h5 = h4-w45 \t\t#in kJ/kg\n",
"q51 = h1-h5 \t\t#heat transfer in boiler in kJ/kg\n",
"\n",
"#Results:\n",
"print \"Heat transfer in line between boiler and turbine is:\",round(q12,2),\"kJ/kg\"\n",
"print \"Turbine work is:\",round(w23,1),\"kJ/kg\"\n",
"print \"Heat transfer in condenser is:\",round(q34,1),\"kJ/kg\"\n",
"print \"Heat transfer in boiler is:\",round(q51,2),\"kJ/kg. \""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 6.10"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The quality at the evaporator inlet is: 0.345\n",
"The rate of heat transfer to the evaporator is: 14.54 kW. \n",
"Rate of heat transfer from the compressor is: -0.21 kW. \n"
]
}
],
"source": [
"# -*- coding: utf8 -*-\n",
"from __future__ import division\n",
"#Example: 6.10\n",
"''' The refrigerator shown in Fig. 6.13 uses R-134a as the working fluid. The mass flow rate\n",
"through each component is 0.1 kg/s, and the power input to the compressor is 5.0 kW. The\n",
"following state data are known, using the state notation of Fig. 6.13:\n",
"P1 = 100 kPa, T1 = −20◦C\n",
"P2 = 800 kPa, T2 = 50◦C\n",
"T3 = 30◦C, x3 = 0.0\n",
"T4 = −25◦C\n",
"\n",
"Determine the following:\n",
"a. The quality at the evaporator inlet.\n",
"b. The rate of heat transfer to the evaporator.\n",
"c. The rate of heat transfer from the compressor. '''\n",
"\n",
"#Variable Declaration: \n",
"hf4 = 167.4 \t#in kJ/kg\n",
"hfg4 = 215.6 \t#in kJ/kg\n",
"h3 = 241.8 \t\t#specific heat of enthalpy of R-134a entering expansion valve\n",
"h4 = h3 \t\t#specific heat of enthalpy of R-134a leaving expansion valve\n",
"h1 = 387.2 \t\t#in kJ/kg\n",
"h2 = 435.1 \t\t#in kJ/kg\n",
"m = 0.1 \t\t#mass flow rate in kg/s\n",
"Wcomp = -5 \t\t#power input to compressor in kW\n",
"\n",
"#Calculations:\n",
"x4 = (h3-hf4)/hfg4 #quality of R-134a at evaporator inlet\n",
"Qevap = m*(h1-h4) #rate of heat transfer to the evaporator\n",
"Qcomp = m*(h2-h1)+Wcomp #rate of heat transfer from compressor\n",
"\n",
"#Results:\n",
"print \"The quality at the evaporator inlet is:\",round(x4,3)\n",
"print \"The rate of heat transfer to the evaporator is:\",round(Qevap,2),\"kW. \"\n",
"print \"Rate of heat transfer from the compressor is:\",round(Qcomp,2),\"kW. \""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 6.12"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Mass of the steam that flows into the tank is: 1.263 kg\n"
]
}
],
"source": [
"# -*- coding: utf8 -*-\n",
"from __future__ import division\n",
"#Example: 6.12\n",
"''' Let the tank of the previous example have a volume of 0.4m3 and initially contain saturated\n",
"vapor at 350 kPa. The valve is then opened, and steam from the line at 1.4 MPa and 300◦C\n",
"flows into the tank until the pressure is 1.4 MPa.\n",
"Calculate the mass of steam that flows into the tank. '''\n",
"\n",
"#Variable Declaration: \n",
"V1 = 0.4 \t\t#initial volume fo tank in m**3\n",
"v1 = 0.5243 \t#initial specific volume in m**3/kg\n",
"h1 = 3040.4 \t#initial specific enthalpy in kJ/kg\n",
"u1 = 2548.9 \t#initial specific internal energy in kJ/kg\n",
"V2 = 0.4 \t\t#final volume in m**3\n",
"T2 = 342 \t\t#final temperature in Celsius by interpolation\n",
"v2 = 0.1974 \t#final specific volume in m**3/kg\n",
"\n",
"#Calculations:\n",
"m1 = V1/v1 \t\t#initial mass of steam in tank in kg\n",
"m2 = V2/v2 \t\t#final mass of the steam in the tank in kg\n",
"m = m2-m1 \t\t#mass of steam that flowsinto the tank\n",
"\n",
"#Results:\n",
"print \"Mass of the steam that flows into the tank is:\",round(m,3),\"kg\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 6.13"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Mass of ammonia withdrawn is: 72.7 kg\n"
]
}
],
"source": [
"# -*- coding: utf8 -*-\n",
"from __future__ import division\n",
"#Example: 6.13\n",
"''' A tank of 2 m3 volume contains saturated ammonia at a temperature of 40◦C. Initially the\n",
"tank contains 50% liquid and 50% vapor by volume. Vapor is withdrawn from the top of\n",
"the tank until the temperature is 10◦C. Assuming that only vapor (i.e., no liquid) leaves\n",
"and that the process is adiabatic, calculate the mass of ammonia that is withdrawn. '''\n",
"\n",
"#Variable Declaration: \n",
"vf1 = 0.001725 \t\t#in m**3/kg\n",
"vf2 = 0.0016 \t\t#in m**3/kg\n",
"uf1 = 368.7 \t\t#in kJ/kg\n",
"uf2 = 226 \t\t #in kJ/kg\n",
"vg1 = 0.08313 \t\t#in m**3/kg\n",
"vfg2 = 0.20381\n",
"ug1 = 1341 \t\t #in kJ/kg\n",
"ufg2 = 1099.7 \t\t#in kJ/kg\n",
"Vf = 1 \t\t #initial volume of liquid in m**3\n",
"Vg = 1 \t\t #initial volume of vapor in m**3\n",
"he = 1461.1 \t\t#in kJ/kg\n",
"V = 2 \t\t #volume of tank in m**3\n",
"\n",
"#Calculations:\n",
"mf1 = Vf/vf1 \t\t#initial mass of liquid in kg\n",
"mg1 = Vg/vg1 \t\t#initial mass of vapor in kg\n",
"m1 = mf1+mg1 \t\t#initial mass of liquid in kg\n",
"x2 = ((2*1461.1)-(2*226)-(0.00160*634706))/((634706*0.20381)+(2*1099.7)) \t\t#quality of ammonia\n",
"v2 = 0.00160+(0.20381*x2) #final specific volume in m**3/kg\n",
"m2 = V/v2 \t\t #final mass of ammonia in kg\n",
"m = m1-m2 \t\t #mass of ammonia withdrawn\n",
"\n",
"#Results:\n",
"print \"Mass of ammonia withdrawn is:\",round(m,1),\"kg\""
]
}
],
"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.6"
}
},
"nbformat": 4,
"nbformat_minor": 0
}