summaryrefslogtreecommitdiff
path: root/Thermodynamics:_A_Core_Course/CH4.ipynb
blob: faa2aabc126dff5ffa0eb32cb4ce4578e725fae1 (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
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 4:Defining Thermodynamic State:The State Postulate"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.1,Page no:51"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "M=2.5 \t\t\t\t#mass of the substance[Kg]\n",
      "x=0.6 \t\t\t\t#mass fraction for vapour phase \n",
      "P=7 \t\t\t\t#pressure [atm]\n",
      "T=438 \t\t\t\t#temperature[K]\n",
      "\n",
      "Ml=(1-x)*M \t\t\t#mass fraction of liquid phase[Kg]\n",
      "Mg=x*M \t\t\t\t#mass fraction of vapour phase[Kg]\n",
      "print\"M(liquid phase)=\",Ml,\"Kg\\nM(vapour phase)=\",Mg,\"Kg\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "M(liquid phase)= 1.0 Kg\n",
        "M(vapour phase)= 1.5 Kg\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.2,Page no:51"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "Vl=0.0177 \t\t\t#specific volume of saturated liquid[m3/Kg]\n",
      "Vg=4.43 \t\t\t#specific volume of saturated vapour[m3/Kg]\n",
      "P=7 \t\t\t\t#pressure[atm]\n",
      "T=438 \t\t\t\t#temperature[K]\n",
      "x=0.6 \t\t\t\t#fraction of vapour phase\n",
      "M=2.5 \t\t\t\t#mass of the substance[Kg]\n",
      "\n",
      "V=((1-x)*Vl+x*Vg)*M \t\t#total volume occupied [m3]\n",
      "print\"Total volume occupied =\",round(V,2),\"m^3\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Total volume occupied = 6.66 m^3\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.3,Page no:51"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "M=2.5 \t\t\t\t#mass of a substance[Kg]\n",
      "x=0.6 \t\t\t\t#fraction of vapour phase \n",
      "Ug=1105.0 \t\t\t#specific internal energy of saturated vapour[J/Kg]\n",
      "Ul=298.0 \t\t\t\t#specific internal energy of saturated liquid[J/Kg] \n",
      "U=M*((1-x)*Ul+x*Ug) \n",
      "print\"The total internal energy of the mixture =\",U,\"J\"\n",
      "print\"\\nNOTE:In textbook,it is wrongly calculated as 1950 J\"\n",
      " "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The total internal energy of the mixture = 1955.5 J\n",
        "\n",
        "NOTE:In textbook,it is wrongly calculated as 1950 J\n"
       ]
      }
     ],
     "prompt_number": 3
    }
   ],
   "metadata": {}
  }
 ]
}