summaryrefslogtreecommitdiff
path: root/Examples_in_Thermodynamics_Problems/Chapter2.ipynb
blob: d7128b61db32d6b57183d9bf1e8cd62551bad3fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
{
 "metadata": {
  "name": "",
  "signature": "sha256:8ff0faa4ee8798b8afb099ec4225e3d1dba96fda9be0b2724a96827e87a8c2b0"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "CHAPTER 2: AIR CYCLE EFFICIENCIES"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.2 Page 19"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#initialisation of variable\n",
      "from math import pi,sqrt,acos,asin,atan,cos,sin,tan,log\n",
      "T1=(100+273)#Degree C\n",
      "T2=(300+273)#degree C\n",
      "T=(1-T1/T2)*100#F\n",
      "lam=0.41#in\n",
      "\n",
      "#CALCULATIONS\n",
      "R=log(T2)-log(T1)#lb/in^2\n",
      "r=2.849#ratio of compression\n",
      "\n",
      "#RESULTS\n",
      "print\"The ideal efficiency and the compression ratio is\",round(r,3)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The ideal efficiency and the compression ratio is 2.849\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.4 Page 20"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#initialisation of variable\n",
      "from math import pi,sqrt,acos,asin,atan,cos,sin,tan,log\n",
      "r=0.60#in\n",
      "v=3#in\n",
      "p=15.4#lb\n",
      "r=5#in\n",
      "P=2000#r p m\n",
      "V=19000#B.Th.U  Per lb\n",
      "lam=1.41 #lb\n",
      "n=0.4831#percent\n",
      "P=15.4/4#lb\n",
      "H=P*V#B.Th.U\n",
      "l=4.5#lb\n",
      "A=9#lb\n",
      "S=1000#lb\n",
      "\n",
      "#CALCULATIONS\n",
      "R=0.60*n*100#percent\n",
      "C=H*R#B.Th.U\n",
      "I=(C*778)/(60*33000)#lb\n",
      "P1=(I*12*4*33)/(l*A*pi)#lb/in^2\n",
      "\n",
      "#RESULTS\n",
      "print\"The mean efficity pressure is\",round(P1,3)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The mean efficity pressure is 10372.115\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.5 Page 21"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#initialisation of variable\n",
      "from math import pi,sqrt,acos,asin,atan,cos,sin,tan,log\n",
      "v=15#in\n",
      "S=(5*14/100)#ln\n",
      "lam=1.4#in\n",
      "v1=1.7#in\n",
      "\n",
      "#CALCULATIONS\n",
      "N=(1-0.38)*100#percent\n",
      "\n",
      "#RESULTS\n",
      "print\"The ideal effiecncy for an engine is\",round(N,3),\"%\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The ideal effiecncy for an engine is 62.0 %\n"
       ]
      }
     ],
     "prompt_number": 7
    }
   ],
   "metadata": {}
  }
 ]
}