diff options
Diffstat (limited to 'Thermodynamics:_A_Core_Course/CH4.ipynb')
-rw-r--r-- | Thermodynamics:_A_Core_Course/CH4.ipynb | 146 |
1 files changed, 146 insertions, 0 deletions
diff --git a/Thermodynamics:_A_Core_Course/CH4.ipynb b/Thermodynamics:_A_Core_Course/CH4.ipynb new file mode 100644 index 00000000..f0aec688 --- /dev/null +++ b/Thermodynamics:_A_Core_Course/CH4.ipynb @@ -0,0 +1,146 @@ +{
+ "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": [
+ "#example 4.1\n",
+ "\n",
+ "#to find the mass of substance present in liquid and vapour phase \n",
+ "#Variable declaration\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",
+ "#Calculation\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",
+ "#Result\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": [
+ "#example 4.2\n",
+ "\n",
+ "#to find the total volume occupied by the mixture \n",
+ "#Variable declaration\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",
+ "#Calculation\n",
+ "V=((1-x)*Vl+x*Vg)*M \t\t#total volume occupied [m3]\n",
+ "#result\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": [
+ "#example 4.3\n",
+ "\n",
+ "#to find the total internal energy of the mixture\n",
+ "#Variable declaration\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",
+ "#Calculation\n",
+ "U=M*((1-x)*Ul+x*Ug) \n",
+ "#Result\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": {}
+ }
+ ]
+}
\ No newline at end of file |