{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"# Chapter 7: Principles of Stability and Control"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"## Example 7.1"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Total rate of energy rejected is: 233.0 KW\n",
"Rate of fuel consumption is: 0.0095 Kg/s\n"
]
}
],
"source": [
"# -*- coding: utf8 -*-\n",
"from __future__ import division\n",
"#Example: 7.1\n",
"'''An automobile engine produces 136 hp on the output shaft with a thermal efficiency of\n",
"30%. The fuel it burns gives 35 000 kJ/kg as energy release. Find the total rate of energy\n",
"rejected to the ambient and the rate of fuel consumption in kg/s.'''\n",
"\n",
"#Variable Declaration: \n",
"W = 136*0.7355 \t#Output of automobile engine in kW\n",
"neng = 0.3 \t\t#Thermal efficiency of automobile engine\n",
"qh = 35000 \t\t#Energy output of fuel in kJ/kg\n",
"\n",
"#Calculation:\n",
"Qh = W/neng \t#Energy output of fuel in kW\n",
"Ql = Qh-W \t\t#Total rate of energy rejected to the ambient\n",
"m = Qh/qh \t\t#Rate of fuel consumption in kg/s\n",
"\n",
"#Result:\n",
"print \"Total rate of energy rejected is: \",round(Ql),\"KW\" \n",
"print \"Rate of fuel consumption is: \",round(m,4),\"Kg/s\""
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"## Example 7.2"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Rate of energy taken out of the cold space is: 250.0 W\n",
"Coefficient of performance of the refrigerator is: 1.67\n"
]
}
],
"source": [
"# -*- coding: utf8 -*-\n",
"from __future__ import division\n",
"#Example: 7.2\n",
"'''The refrigerator in a kitchen shown in Fig. 7.7 receives electrical input power of 150 W\n",
"to drive the system, and it rejects 400 W to the kitchen air. Find the rate of energy taken\n",
"out of the cold space and the COP of the refrigerator.'''\n",
"\n",
"#Variable Declaration: \n",
"Qh = 400 \t\t#Heat rejected to kitchen air in W\n",
"W = 150 \t\t#Electrical input power in W\n",
"\n",
"#Calculation:\n",
"Ql = Qh-W \t\t#Rate of energy taken out to cold space in W\n",
"B = Ql/W \t\t#Coefficicent of performnace of refrigerator\n",
"\n",
"#Result:\n",
"print \"Rate of energy taken out of the cold space is: \",round(Ql,2),\"W\"\n",
"print \"Coefficient of performance of the refrigerator is: \",round(B,2)"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"## Example 7.3"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Celcius temperature at which pressure go to zero: -273.15 °C\n"
]
}
],
"source": [
"# -*- coding: utf8 -*-\n",
"from __future__ import division\n",
"#Example: 7.3\n",
"'''In a certain constant-volume ideal-gas thermometer, the measured pressure at the ice point\n",
"(see Section 2.11) of water, 0◦C, is 110.9 kPa and at the steam point, 100◦C, is 151.5 kPa.\n",
"Extrapolating, at what Celsius temperature does the pressure go to zero (i.e., zero absolute\n",
"temperature)?'''\n",
"\n",
"#Variable Declaration: \n",
"P1 = 110.9 #Pressure at 1 in Kpa\n",
"P2 = 151.5 #Pressure at 2 in Kpa\n",
"T1 = 0 #Temperature at 1 in °C\n",
"T2 = 100 #Temperature at 2 in °C\n",
"P = 0 #pressure at which temperature is to be found out(KPa)\n",
"\n",
"#Calculation:\n",
"C =P1 #y-intercept\n",
"m = (P2-P1)/(T2-T1)#Slope of P-T graph\n",
"T = (P-C)/m #Interpolating straight line P=mT+C and finding T in °C\n",
"\n",
"#Result:\n",
"print 'Celcius temperature at which pressure go to zero: ',round(T,2),\"°C\" "
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"## Example 7.4"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Engine efficiency is: 0.635\n",
"Energy discarded to the ambient surroundings is: 365.0 KW\n"
]
}
],
"source": [
"# -*- coding: utf8 -*-\n",
"from __future__ import division\n",
"#Example: 7.4\n",
"'''Let us consider the heat engine, shown schematically in Fig. 7.25, that receives a heattransfer\n",
"rate of 1 MW at a high temperature of 550◦C and rejects energy to the ambient\n",
"surroundings at 300 K. Work is produced at a rate of 450 kW. We would like to know\n",
"how much energy is discarded to the ambient surroundings and the engine efficiency and\n",
"compare both of these to a Carnot heat engine operating between the same two reservoirs.'''\n",
"\n",
"#Variable Declaration: \n",
"Qh = 1000 \t\t#Rate of heat transfer to heat engine in kW\n",
"W = 450 \t\t#Rate of production of work in kW\n",
"Tl = 300 \t\t#Temperature of surroundings in K\n",
"Th = 550 \t\t#Temperature of heat source in Celsius\n",
"\n",
"#Calculation:\n",
"Ql = Qh-W \t\t#Rate of heat rejected by heat engine in kW\n",
"nthermal = W/Qh \t#Efficiency from the definition of efficiency\n",
"ncarnot = 1-Tl/(Th+273)#Efficiency if heat engine is considered to be ideal carnot heat engine\n",
"W2 = ncarnot*Qh \t#Rate of work production if heat engine is assumed to be ideal carnot heat engine in kW\n",
"Ql2 = Qh-W2 \t#Rate of heat rejected by heat engine in kW if heat engine is assumed to be ideal carnot heat engine\n",
"\n",
"#Result:\n",
"print \"Engine efficiency is: \",round(ncarnot,3)\n",
"print \"Energy discarded to the ambient surroundings is: \",round(Ql2),\"KW\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"## Example 7.5"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Magnitude of reqiured work is: 0.15 KW\n"
]
}
],
"source": [
"# -*- coding: utf8 -*-\n",
"from __future__ import division\n",
"#Example: 7.5\n",
"'''As one mode of operation of an air conditioner is the cooling of a room on a hot day, it\n",
"works as a refrigerator, shown in Fig. 7.26.Atotal of 4kWshould be removed from a room\n",
"at 24◦C to the outside atmosphere at 35◦C.We would like to estimate the magnitude of the\n",
"required work. To do this we will not analyze the processes inside the refrigerator, which\n",
"is deferred to Chapter 11, but we can give a lower limit for the rate of work, assuming it\n",
"is a Carnot-cycle refrigerator.'''\n",
"\n",
"#Variable Declaration: \n",
"Tl = 24+273 \t\t#Room temperature in Kelvins\n",
"Th = 35+273 \t\t#Atmospheric temperature in Kelvins\n",
"Ql = 4 \t\t #Rate of heat rejection from room\n",
"\n",
"#Calculation:\n",
"B = Tl/(Th-Tl) \t\t#Coefficient of performance of air conditioner\n",
"W = Ql/B \t\t #Required work in kW\n",
"\n",
"#Result:\n",
"print \"Magnitude of reqiured work is: \",round(W,2),\"KW\""
]
}
],
"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
}