summaryrefslogtreecommitdiff
path: root/Thermodynamics_by_K._M._Gupta/ch11.ipynb
blob: ff50986c44a442962d09244abeb064f258d71d14 (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:47f72be1b9c6cd56213869831cb1984e5af98a10c08e54d4fdad5c35b07de8a5"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 11 : Introduction to Working of IC Engines"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.1 Page No : 264"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "n = 3;\n",
      "l = 80;\t\t\t# in mm\n",
      "d = 76;\t\t\t# in mm\n",
      "r = 8.5;\n",
      "\n",
      "# Calculations and Results\n",
      "V_s = (math.pi/4.) * d * d * l;\t\t\t# in mm**3\n",
      "V_s = V_s * 10**-3;\t\t\t# in cm**3\n",
      "# r = 1+ (V_s/V_c)\n",
      "V_c = (1/(r - 1)) * V_s;\t\t\t# in cm**3\n",
      "print  \"volume of cylinder in mm**3 is : \",round(V_c*10**3)   #incorrect answer in the textbook\n",
      "\n",
      "C = V_s * n;\t\t\t# C s math.radians(numpy.tan(s for capacity of engine in cm**3\n",
      "C = C * 10**-3;\t\t\t# in litre\n",
      "print \"Capacity of the engine in litre is : %.3f\"%C\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "volume of cylinder in mm**3 is :  48389.0\n",
        "Capacity of the engine in litre is : 1.089\n"
       ]
      }
     ],
     "prompt_number": 4
    }
   ],
   "metadata": {}
  }
 ]
}