summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter1.ipynb418
-rw-r--r--Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter10.ipynb433
-rw-r--r--Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter11.ipynb249
-rw-r--r--Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter12.ipynb422
-rw-r--r--Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter2.ipynb359
-rw-r--r--Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter3.ipynb553
-rw-r--r--Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter4.ipynb492
-rw-r--r--Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter5.ipynb500
-rw-r--r--Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter6.ipynb509
-rw-r--r--Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter7.ipynb508
-rw-r--r--Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter8.ipynb456
-rw-r--r--Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter9.ipynb699
-rw-r--r--Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/1_AP.pngbin0 -> 40861 bytes
-rw-r--r--Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/2_AP.pngbin0 -> 31512 bytes
-rw-r--r--Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/3_AP.pngbin0 -> 24374 bytes
-rw-r--r--Engineering_Mechanics_by_Tayal_A.K./appendix_16.ipynb1008
-rw-r--r--Engineering_Mechanics_by_Tayal_A.K./chapter02_17.ipynb794
-rw-r--r--Engineering_Mechanics_by_Tayal_A.K./chapter03_16.ipynb598
-rw-r--r--Engineering_Mechanics_by_Tayal_A.K./chapter04_16.ipynb138
-rw-r--r--Engineering_Mechanics_by_Tayal_A.K./chapter05_16.ipynb285
-rw-r--r--Engineering_Mechanics_by_Tayal_A.K./chapter06_16.ipynb279
-rw-r--r--Engineering_Mechanics_by_Tayal_A.K./chapter07_16.ipynb551
-rw-r--r--Engineering_Mechanics_by_Tayal_A.K./chapter08_16.ipynb311
-rw-r--r--Engineering_Mechanics_by_Tayal_A.K./chapter09_16.ipynb663
-rw-r--r--Engineering_Mechanics_by_Tayal_A.K./chapter10_16.ipynb378
-rw-r--r--Engineering_Mechanics_by_Tayal_A.K./chapter12_15.ipynb411
-rw-r--r--Engineering_Mechanics_by_Tayal_A.K./chapter13_15.ipynb121
-rw-r--r--Engineering_Mechanics_by_Tayal_A.K./chapter14_15.ipynb1048
-rw-r--r--Engineering_Mechanics_by_Tayal_A.K./chapter15_15.ipynb775
-rw-r--r--Engineering_Mechanics_by_Tayal_A.K./chapter16_15.ipynb471
-rw-r--r--Engineering_Mechanics_by_Tayal_A.K./chapter17_15.ipynb342
-rw-r--r--Engineering_Mechanics_by_Tayal_A.K./chapter18_15.ipynb612
-rw-r--r--Engineering_Mechanics_by_Tayal_A.K./chapter19_15.ipynb254
-rw-r--r--Engineering_Mechanics_by_Tayal_A.K./chapter20_15.ipynb538
-rw-r--r--Engineering_Mechanics_by_Tayal_A.K./chapter21_15.ipynb659
-rw-r--r--Engineering_Mechanics_by_Tayal_A.K./chapter22_15.ipynb274
-rw-r--r--Engineering_Mechanics_by_Tayal_A.K./chapter23_15.ipynb66
-rw-r--r--Engineering_Mechanics_by_Tayal_A.K./chapter24_15.ipynb340
-rw-r--r--Engineering_Mechanics_by_Tayal_A.K./chapter25_15.ipynb217
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/README.txt10
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch10_2.ipynb410
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch11_2.ipynb573
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch12_2.ipynb1384
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch14_2.ipynb1965
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch15_2.ipynb306
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch16_2.ipynb804
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch17_2.ipynb221
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch18_2.ipynb733
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch19_2.ipynb392
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch20_2.ipynb142
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch21_2.ipynb180
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch2_2.ipynb428
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch3_2.ipynb1440
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch4_2.ipynb4206
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch5_2.ipynb1215
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch6_2.ipynb654
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch8_2.ipynb1584
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch10_1.pngbin0 -> 6194 bytes
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch4_1.pngbin0 -> 7480 bytes
-rw-r--r--Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch5_1.pngbin0 -> 8229 bytes
-rw-r--r--Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch10_1.ipynb758
-rw-r--r--Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch11_1.ipynb1390
-rw-r--r--Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch1_1.ipynb394
-rw-r--r--Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch2_1.ipynb562
-rw-r--r--Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch3_1.ipynb901
-rw-r--r--Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch4_1.ipynb656
-rw-r--r--Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch5_1.ipynb1536
-rw-r--r--Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch6_1.ipynb1796
-rw-r--r--Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch7_1.ipynb1099
-rw-r--r--Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch8_1.ipynb697
-rw-r--r--Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch9_1.ipynb529
-rw-r--r--Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch1.pngbin0 -> 63829 bytes
-rw-r--r--Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch11.pngbin0 -> 98511 bytes
-rw-r--r--Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch3.pngbin0 -> 82001 bytes
-rw-r--r--_Engineering_Thermodynamics_by__O._Singh/README.txt10
-rw-r--r--_Engineering_Thermodynamics_by__O._Singh/chapter10_3.ipynb1080
-rw-r--r--_Engineering_Thermodynamics_by__O._Singh/chapter11_3.ipynb1309
-rw-r--r--_Engineering_Thermodynamics_by__O._Singh/chapter12_3.ipynb818
-rw-r--r--_Engineering_Thermodynamics_by__O._Singh/chapter13_3.ipynb375
-rw-r--r--_Engineering_Thermodynamics_by__O._Singh/chapter2_3.ipynb314
-rw-r--r--_Engineering_Thermodynamics_by__O._Singh/chapter3_3.ipynb1506
-rw-r--r--_Engineering_Thermodynamics_by__O._Singh/chapter4_3.ipynb1070
-rw-r--r--_Engineering_Thermodynamics_by__O._Singh/chapter5_3.ipynb1124
-rw-r--r--_Engineering_Thermodynamics_by__O._Singh/chapter6_3.ipynb1390
-rw-r--r--_Engineering_Thermodynamics_by__O._Singh/chapter7_2.ipynb1466
-rw-r--r--_Engineering_Thermodynamics_by__O._Singh/chapter8_3.ipynb2594
-rw-r--r--_Engineering_Thermodynamics_by__O._Singh/chapter9_3.ipynb1655
-rw-r--r--_Engineering_Thermodynamics_by__O._Singh/chapter_1_3.ipynb1777
-rw-r--r--_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(49)_2.pngbin0 -> 147890 bytes
-rw-r--r--_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(50)_2.pngbin0 -> 201679 bytes
-rw-r--r--_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(51)_2.pngbin0 -> 167838 bytes
-rw-r--r--sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation_2.ipynb445
-rw-r--r--sample_notebooks/SINDHUARROJU/Chapter12.ipynb665
-rw-r--r--sample_notebooks/SPANDANAARROJU/Chapter11.ipynb608
-rw-r--r--sample_notebooks/SundeepKatta/Chapter2.ipynb441
95 files changed, 62343 insertions, 0 deletions
diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter1.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter1.ipynb
new file mode 100644
index 00000000..d22b0652
--- /dev/null
+++ b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter1.ipynb
@@ -0,0 +1,418 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#1: Bonding in Solids"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 1.1, Page number 10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "bond energy is 3.84 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e=1.6*10**-19; #charge(coulomb)\n",
+ "epsilon0=8.85*10**-12; \n",
+ "r0=23.6*10**-10; #equilibrium distance(m)\n",
+ "I=5.14; #ionisation energy(eV)\n",
+ "EA=3.65; #electron affinity(eV)\n",
+ "N=8; #born constant\n",
+ "\n",
+ "#Calculation\n",
+ "x=1-(1/N);\n",
+ "V=(e**2)*x/(4*e*math.pi*epsilon0*r0); #potential(V)\n",
+ "E=I-EA; #net energy(eV)\n",
+ "BE=round(V*10,2)-E; #bond energy(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"bond energy is\",BE,\"eV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 1.2, Page number 10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "compressibility is -25.1095 *10**14\n",
+ "answer in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e=1.6*10**-19; #charge(coulomb)\n",
+ "epsilon0=8.85*10**-12; \n",
+ "r0=0.41*10**-3; #equilibrium distance(m)\n",
+ "A=1.76; #madelung constant\n",
+ "n=0.5; #repulsive exponent value\n",
+ "\n",
+ "#Calculation\n",
+ "beta=72*math.pi*epsilon0*r0**4/(A*e**2*(n-1)); #compressibility\n",
+ "\n",
+ "#Result\n",
+ "print \"compressibility is\",round(beta/10**14,4),\"*10**14\"\n",
+ "print \"answer in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 1.3, Page number 10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "cohesive energy is -3.065 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e=1.6*10**-19; #charge(coulomb)\n",
+ "epsilon0=8.85*10**-12; \n",
+ "r0=0.314*10**-9; #equilibrium distance(m)\n",
+ "A=1.75; #madelung constant\n",
+ "N=5.77; #born constant\n",
+ "I=4.1; #ionisation energy(eV)\n",
+ "EA=3.6; #electron affinity(eV)\n",
+ "\n",
+ "#Calculation\n",
+ "V=-A*e**2*((N-1)/N)/(4*e*math.pi*epsilon0*r0);\n",
+ "PE=round(V,2)/2; #potential energy per ion(eV)\n",
+ "x=(I-EA)/2;\n",
+ "CE=PE+x; #cohesive energy(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"cohesive energy is\",CE,\"eV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 1.4, Page number 11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "binding energy is 665.0 *10**3 kJ/kmol\n",
+ "answer in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration \n",
+ "N=6.02*10**26; #Avagadro Number\n",
+ "e=1.6*10**-19; #charge(coulomb)\n",
+ "epsilon0=8.85*10**-12; \n",
+ "r0=0.324*10**-9; #equilibrium distance(m)\n",
+ "A=1.75; #madelung constant\n",
+ "n=8.5; #repulsive exponent value\n",
+ "\n",
+ "#Calculations\n",
+ "U0=(A*e/(4*math.pi*epsilon0*r0))*(1-1//n); \n",
+ "U=round(U0,1)*N*e; #binding energy(J/kmol)\n",
+ "\n",
+ "#Result\n",
+ "print \"binding energy is\",round(U/10**6),\"*10**3 kJ/kmol\"\n",
+ "print \"answer in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 1.5, Page number 11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "density of CsClis 4.389 *10**3 kg/m**3\n",
+ "answer in the book varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "rCs=0.165*10**-9; #radius(m)\n",
+ "rCl=0.181*10**-9; #radius(m)\n",
+ "MCs=133; #atomic weight\n",
+ "MCl=35.5; #atomic weight\n",
+ "N=6.02*10**26; #Avagadro Number\n",
+ "\n",
+ "#Calculation\n",
+ "a=2*(rCl+rCs)/math.sqrt(3); #lattice constant(m)\n",
+ "M=(MCs+MCl)/N; #mass of 1 molecule(kg)\n",
+ "V=a**3; #volume of unit cell(m**3)\n",
+ "rho=M/V; #density of CsCl(kg/m**3)\n",
+ "\n",
+ "#Result\n",
+ "print \"density of CsClis\",round(rho/10**3,3),\"*10**3 kg/m**3\"\n",
+ "print \"answer in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 1.6, Page number 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "effective charge is 0.72 *10**-19 coulomb\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "dm=1.98*(10**-29)*(1/3); #dipole moment\n",
+ "l=0.92*10**-10; #bond length(m)\n",
+ "\n",
+ "#Calculation\n",
+ "ec=dm/l; #effective charge(coulomb)\n",
+ "\n",
+ "#Result\n",
+ "print \"effective charge is\",round(ec*10**19,2),\"*10**-19 coulomb\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 1.7, Page number 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "energy required is -1.9 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e=1.6*10**-19; #charge(coulomb)\n",
+ "epsilon0=8.85*10**-12; \n",
+ "r=0.5*10**-9; #distance(m)\n",
+ "I=5; #ionisation energy(eV)\n",
+ "E=4; #electron affinity(eV)\n",
+ "\n",
+ "#Calculation\n",
+ "C=e**2/(4*math.pi*epsilon0*e*r); #coulomb energy(eV)\n",
+ "Er=I-E-C; #energy required(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"energy required is\",round(Er,1),\"eV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 1.9, Page number 13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "-2*a/r**3 + 90*b/r**11\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "from sympy import *\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable declaration\n",
+ "n=1;\n",
+ "m=9;\n",
+ "a=Symbol('a')\n",
+ "b=Symbol('b')\n",
+ "r=Symbol('r')\n",
+ "\n",
+ "#Calculation\n",
+ "y=(-a/(r**n))+(b/(r**m));\n",
+ "y=diff(y,r);\n",
+ "y=diff(y,r);\n",
+ "\n",
+ "#Result\n",
+ "print y"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "young's modulus is 157 GPa\n"
+ ]
+ }
+ ],
+ "source": [
+ "#since the values of a,b,r are declared as symbols in the above cell, it cannot be solved there. hence it is being solved here with the given variable declaration\n",
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=7.68*10**-29; \n",
+ "r0=2.5*10**-10; #radius(m)\n",
+ "\n",
+ "#Calculation\n",
+ "b=a*(r0**8)/9;\n",
+ "y=((-2*a*r0**8)+(90*b))/r0**11; \n",
+ "E=y/r0; #young's modulus(Pa)\n",
+ "\n",
+ "#Result\n",
+ "print \"young's modulus is\",int(E/10**9),\"GPa\""
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter10.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter10.ipynb
new file mode 100644
index 00000000..8cceaf30
--- /dev/null
+++ b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter10.ipynb
@@ -0,0 +1,433 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#10: Superconductivity"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 10.1, Page number 224"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "critical field is 3.365 *10**3 A/m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "T=5; #temperature(K)\n",
+ "Tc=7.2; #critical temperature(K)\n",
+ "H0=6.5*10**3; #critical magnetic field(A/m)\n",
+ "\n",
+ "#Calculation\n",
+ "Hc=H0*(1-(T/Tc)**2); #critical field(A/m)\n",
+ "\n",
+ "#Result\n",
+ "print \"critical field is\",round(Hc/10**3,3),\"*10**3 A/m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 10.2, Page number 225"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "critical field is 1.567 *10**3 A/m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "T=2.5; #temperature(K)\n",
+ "Tc=3.5; #critical temperature(K)\n",
+ "H0=3.2*10**3; #critical magnetic field(A/m)\n",
+ "\n",
+ "#Calculation\n",
+ "Hc=H0*(1-(T/Tc)**2); #critical field(A/m)\n",
+ "\n",
+ "#Result\n",
+ "print \"critical field is\",round(Hc/10**3,3),\"*10**3 A/m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 10.3, Page number 225"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "critical temperature is 6.928 K\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Hc=5*10**3; #critical magnetic field(A/m)\n",
+ "T=6; #temperature(K)\n",
+ "H0=2*10**4; #critical magnetic field(A/m)\n",
+ "\n",
+ "#Calculation\n",
+ "Tc=T/math.sqrt(1-(Hc/H0)); #critical temperature(K)\n",
+ "\n",
+ "#Result\n",
+ "print \"critical temperature is\",round(Tc,3),\"K\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 10.4, Page number 225"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "critical current is 251.3 amp\n",
+ "answer in the book varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Hc=2*10**3; #critical magnetic field(A/m)\n",
+ "r=0.02; #radius(m)\n",
+ "\n",
+ "#Calculation\n",
+ "Ic=2*math.pi*r*Hc; #critical current(amp)\n",
+ "\n",
+ "#Result\n",
+ "print \"critical current is\",round(Ic,1),\"amp\"\n",
+ "print \"answer in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 10.5, Page number 225"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "isotopic mass is 191.75 amu\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "T1=5; #temperature(K)\n",
+ "T2=5.1; #temperature(K)\n",
+ "M1=199.5; #isotopic mass(amu)\n",
+ "\n",
+ "#Calculation\n",
+ "M2=M1*(T1/T2)**2; #isotopic mass(amu)\n",
+ "\n",
+ "#Result\n",
+ "print \"isotopic mass is\",round(M2,2),\"amu\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 10.6, Page number 226"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "critical field is 3.0469 *10**4 A/m\n",
+ "critical current is 287.161 amp\n",
+ "answer in the book varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "T=5; #temperature(K)\n",
+ "Tc=8; #critical temperature(K)\n",
+ "H0=5*10**4; #critical magnetic field(A/m)\n",
+ "r=1.5*10**-3; #radius(m)\n",
+ "\n",
+ "#Calculation\n",
+ "Hc=H0*(1-(T/Tc)**2); #critical field(A/m)\n",
+ "Ic=2*math.pi*r*Hc; #critical current(amp)\n",
+ "\n",
+ "#Result\n",
+ "print \"critical field is\",round(Hc/10**4,4),\"*10**4 A/m\"\n",
+ "print \"critical current is\",round(Ic,3),\"amp\"\n",
+ "print \"answer in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 10.7, Page number 226"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "critical temperature is 4.1447 K\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Tc1=4.185; #critical temperature(K)\n",
+ "M1=199.5; #isotopic mass(amu)\n",
+ "M2=203.4; #isotopic mass(amu)\n",
+ "\n",
+ "#Calculation\n",
+ "Tc2=Tc1*math.sqrt(M1/M2); #critical temperature(K)\n",
+ "\n",
+ "#Result\n",
+ "print \"critical temperature is\",round(Tc2,4),\"K\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 10.8, Page number 226"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "frequency is 4.105 *10**11 Hz\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "h=6.626*10**-36; #plank constant\n",
+ "V=8.5*10**-6; #voltage(V)\n",
+ "\n",
+ "#Calculation\n",
+ "new=2*e*V/h; #frequency(Hz)\n",
+ "\n",
+ "#Result\n",
+ "print \"frequency is\",round(new/10**11,3),\"*10**11 Hz\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 10.9, Page number 227"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "critical temperature is 30.0 K\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Tc1=5; #critical temperature(K)\n",
+ "P1=1; #pressure(mm)\n",
+ "P2=6; #pressure(mm)\n",
+ "\n",
+ "#Calculation\n",
+ "Tc2=Tc1*P2/P1; #critical temperature(K)\n",
+ "\n",
+ "#Result\n",
+ "print \"critical temperature is\",Tc2,\"K\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 10.10, Page number 227"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "maximum critical temperature is 7.782 K\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Hc=6*10**5; #critical magnetic field(A/m)\n",
+ "Tc=8.7; #critical temperature(K)\n",
+ "H0=3*10**6; #critical magnetic field(A/m)\n",
+ "\n",
+ "#Calculation\n",
+ "T=Tc*math.sqrt(1-(Hc/H0)); #maximum critical temperature(K)\n",
+ "\n",
+ "#Result\n",
+ "print \"maximum critical temperature is\",round(T,3),\"K\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter11.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter11.ipynb
new file mode 100644
index 00000000..ab9df13e
--- /dev/null
+++ b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter11.ipynb
@@ -0,0 +1,249 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "#11: Laser"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "##Example number 11.1, Page number 246"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "matter wave energy is 2.06 *10**-5 eV\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e=1.6*10**-19; #charge(coulomb)\n",
+ "v=3*10**3; #velocity of matter wave(m/s)\n",
+ "h=6.6*10**-34; #plank's constant(Js)\n",
+ "lamda=600*10**-9; #wavelength(m)\n",
+ "\n",
+ "#Calculation\n",
+ "Ej=h*v/lamda; #matter wave energy(J)\n",
+ "E=Ej/e; #matter wave energy(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"matter wave energy is\",round(E*10**5,2),\"*10**-5 eV\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "##Example number 11.2, Page number 246"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "wavelength of photon is 41250.0 nm\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e=1.6*10**-19; #charge(coulomb)\n",
+ "c=3*10**10; #velocity of light(m/s)\n",
+ "h=6.6*10**-34; #plank's constant(Js)\n",
+ "Eg=3; #energy gap(eV)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=h*c*10**9/(Eg*e); #wavelength of photon(nm)\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength of photon is\",lamda,\"nm\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.3, Page number 246"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio in higher and lower energy is 1.7081 *10**-47\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e=1.6*10**-19; #charge(coulomb)\n",
+ "E2_E1=3*e; #energy gap(J)\n",
+ "Kb=1.38*10**-23; #boltzmann constant(J/K)\n",
+ "T=323; #temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "n=math.exp(-E2_E1/(Kb*T)); #ratio in higher and lower energy\n",
+ "\n",
+ "#Result\n",
+ "print \"ratio in higher and lower energy is\",round(n*10**47,4),\"*10**-47\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.4, Page number 247"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio of emission is 3.2 *10**-13\n",
+ "answer varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c=2.998*10**8; #velocity of light(m/s)\n",
+ "Kb=1.381*10**-23; #boltzmann constant(J/K)\n",
+ "T=1000; #temperature(K)\n",
+ "h=6.626*10**-34; #plank's constant(Js)\n",
+ "lamda=0.5*10**-6; #wavelength(m)\n",
+ "\n",
+ "#Calculation\n",
+ "v=c/lamda; #frequency(Hz)\n",
+ "BA=1/(math.exp(h*v/(Kb*T))-1); #ratio of emission\n",
+ "\n",
+ "#Result\n",
+ "print \"ratio of emission is\",round(BA*10**13,1),\"*10**-13\"\n",
+ "print \"answer varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.5, Page number 247"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "wavelength is 0.87 micro m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c=2.998*10**8; #velocity of light(m/s)\n",
+ "h=6.626*10**-34; #plank's constant(Js)\n",
+ "e=1.602*10**-19; #charge(coulomb)\n",
+ "Eg=1.43; #energy gap(eV) \n",
+ "\n",
+ "#Calculation\n",
+ "lamda=h*c*10**6/(Eg*e); #wavelength(micro m)\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength is\",round(lamda,2),\"micro m\""
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter12.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter12.ipynb
new file mode 100644
index 00000000..ee510033
--- /dev/null
+++ b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter12.ipynb
@@ -0,0 +1,422 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#12: Fibre Optics"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.1, Page number 263"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "refractive index of core is 1.233\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "NA=0.39; #numerical aperture\n",
+ "delta=0.05; #refractive index of cladding\n",
+ "\n",
+ "#Calculation\n",
+ "n1=NA/math.sqrt(2*delta); #refractive index of core\n",
+ "\n",
+ "#Result\n",
+ "print \"refractive index of core is\",round(n1,3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.2, Page number 264"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "fractional index change is 0.04159\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1=1.563; #Core refractive index\n",
+ "n2=1.498; #Cladding refractive index\n",
+ "\n",
+ "#Calculation\n",
+ "delta=(n1-n2)/n1; #fractional index change\n",
+ "\n",
+ "#Result\n",
+ "print \"fractional index change is\",round(delta,5)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.3, Page number 264"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "numerical aperture is 0.39\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1=1.55; #Core refractive index\n",
+ "n2=1.50; #Cladding refractive index\n",
+ "\n",
+ "#Calculation\n",
+ "NA=math.sqrt(n1**2-n2**2); #numerical aperture\n",
+ "\n",
+ "#Result\n",
+ "print \"numerical aperture is\",round(NA,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.4, Page number 264"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "acceptance angle is 26.49 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1=1.563; #Core refractive index\n",
+ "n2=1.498; #Cladding refractive index\n",
+ "\n",
+ "#Calculation\n",
+ "NA=math.sqrt(n1**2-n2**2); #numerical aperture\n",
+ "theta0=math.asin(NA); #acceptance angle(radian)\n",
+ "theta0=theta0*180/math.pi; #acceptance angle(degrees)\n",
+ "\n",
+ "#Resul\"\n",
+ "print \"acceptance angle is\",round(theta0,2),\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.5, Page number 265"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "critical angle is 68.14 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1=1.53; #Core refractive index\n",
+ "n2=1.42; #Cladding refractive index\n",
+ "\n",
+ "#Calculation\n",
+ "thetac=math.asin(n2/n1); #critical angle(radian)\n",
+ "thetac=thetac*180/math.pi; #critical angle(degrees)\n",
+ "\n",
+ "#Resul\"\n",
+ "print \"critical angle is\",round(thetac,2),\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.6, Page number 265"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "acceptance angle is 35.62 degrees\n",
+ "answer in the book varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1=1.6; #Core refractive index\n",
+ "n0=1.33; #refractive index of air\n",
+ "n2=1.4; #Cladding refractive index\n",
+ "\n",
+ "#Calculation\n",
+ "NA=math.sqrt(n1**2-n2**2)/n0; #numerical aperture\n",
+ "theta0=math.asin(NA); #acceptance angle(radian)\n",
+ "theta0=theta0*180/math.pi; #acceptance angle(degrees)\n",
+ "\n",
+ "#Resul\"\n",
+ "print \"acceptance angle is\",round(theta0,2),\"degrees\"\n",
+ "print \"answer in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.7, Page number 265"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "fractional index change is 0.133\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1=1.5; #Core refractive index\n",
+ "n2=1.3; #Cladding refractive index\n",
+ "\n",
+ "#Calculation\n",
+ "delta=(n1-n2)/n1; #fractional index change\n",
+ "\n",
+ "#Result\n",
+ "print \"fractional index change is\",round(delta,3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.8, Page number 265"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "refraction angle is 57.03 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1=1.55; #Core refractive index\n",
+ "n2=1.6; #Cladding refractive index\n",
+ "theta1=60*math.pi/180; #incident angle(degrees)\n",
+ "\n",
+ "#Calculation\n",
+ "x=n1*math.sin(theta1)/n2;\n",
+ "theta2=math.asin(x); #refraction angle(radian)\n",
+ "theta2=theta2*180/math.pi; #refraction angle(degrees)\n",
+ "\n",
+ "#Result\n",
+ "print \"refraction angle is\",round(theta2,2),\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.9, Page number 266"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "refractive index of core is 1.51\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n2=1.3; #Cladding refractive index\n",
+ "delta=0.140; #fractional index change\n",
+ "\n",
+ "#Calculation\n",
+ "n1=n2/(1-delta); #Core refractive index\n",
+ "\n",
+ "#Result\n",
+ "print \"refractive index of core is\",round(n1,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.10, Page number 266"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "numerical aperture is 0.45088\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "theta0=26.80*math.pi/180; #acceptance angle(radian)\n",
+ "\n",
+ "#Calculation\n",
+ "NA=math.sin(theta0); #numerical aperture\n",
+ "\n",
+ "#Result\n",
+ "print \"numerical aperture is\",round(NA,5)"
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter2.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter2.ipynb
new file mode 100644
index 00000000..932802eb
--- /dev/null
+++ b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter2.ipynb
@@ -0,0 +1,359 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#2: Crystal Structure"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.1, Page number 31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "density is 5492.957 kg/m**3\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "N=6.02*10**26; #Avagadro Number\n",
+ "n=8; #number of atoms\n",
+ "a=5.6*10**-10; #lattice constant(m)\n",
+ "M=72.59; #atomic weight(amu)\n",
+ "\n",
+ "#Calculation\n",
+ "rho=n*M/(a**3*N); #density(kg/m**3)\n",
+ "\n",
+ "#Result\n",
+ "print \"density is\",round(rho,3),\"kg/m**3\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.2, Page number 32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "lattice constant is 0.2869 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "N=6.02*10**23; #Avagadro Number\n",
+ "n=2;\n",
+ "rho=7860; #density(kg/m**3)\n",
+ "M=55.85; #atomic weight(amu)\n",
+ "\n",
+ "#Calculation\n",
+ "a=(n*M/(rho*N))**(1/3)*10**8; #lattice constant(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"lattice constant is\",round(a,4),\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.3, Page number 32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "lattice constant is 3.517 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "N=6.02*10**26; #Avagadro Number\n",
+ "n=2;\n",
+ "rho=530; #density(kg/m**3)\n",
+ "M=6.94; #atomic weight(amu)\n",
+ "\n",
+ "#Calculation\n",
+ "a=(n*M/(rho*N))**(1/3)*10**10; #lattice constant(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"lattice constant is\",round(a,3),\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.4, Page number 32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "number of atoms is 2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "N=6.02*10**26; #Avagadro Number\n",
+ "rho=7870; #density(kg/m**3)\n",
+ "M=55.85; #atomic weight(amu)\n",
+ "a=2.9*10**-10; #lattice constant(m)\n",
+ "\n",
+ "#Calculation\n",
+ "n=a**3*rho*N/M; #number of atoms\n",
+ "\n",
+ "#Result\n",
+ "print \"number of atoms is\",int(n)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.5, Page number 33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "density is 8933.25 kg/m**3\n",
+ "answer in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "N=6.02*10**26; #Avagadro Number\n",
+ "M=63.5; #atomic weight(amu)\n",
+ "r=0.1278*10**-9; #atomic radius(m)\n",
+ "n=4;\n",
+ "\n",
+ "#Calculation\n",
+ "a=r*math.sqrt(8); #lattice constant(m)\n",
+ "rho=n*M/(N*a**3); #density(kg/m**3)\n",
+ "\n",
+ "#Result\n",
+ "print \"density is\",round(rho,2),\"kg/m**3\"\n",
+ "print \"answer in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.6, Page number 33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "percent volume change is 0.5 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r1=1.258*10**-10; #radius(m)\n",
+ "r2=1.292*10**-10; #radius(m)\n",
+ "\n",
+ "#Calculation\n",
+ "a_bcc=4*r1/math.sqrt(3);\n",
+ "v=a_bcc**3;\n",
+ "V1=v/2;\n",
+ "a_fcc=2*math.sqrt(2)*r2;\n",
+ "V2=a_fcc**3/4;\n",
+ "V=(V1-V2)*100/V1; #percent volume change is\",V,\"%\"\n",
+ "\n",
+ "#Result\n",
+ "print \"percent volume change is\",round(V,1),\"%\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.7, Page number 34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "maximum radius of sphere is 0.414 r\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "from sympy import *\n",
+ "\n",
+ "#Variable declaration\n",
+ "r=Symbol('r')\n",
+ "\n",
+ "#Calculation\n",
+ "a=4*r/math.sqrt(2);\n",
+ "R=(4*r/(2*math.sqrt(2)))-r;\n",
+ "\n",
+ "#Result\n",
+ "print \"maximum radius of sphere is\",round(R/r,3),\"r\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.8, Page number 34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "distance between atoms is 2.81 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "N=6.023*10**23; #Avagadro Number\n",
+ "Mw=23+35.5; #molecular weight of NaCl\n",
+ "rho=2.18; #density(gm/cm**3)\n",
+ "\n",
+ "#Calculation\n",
+ "M=Mw/N; #mass of 1 molecule(gm)\n",
+ "Nv=rho/M; #number of molecules per unit volume(mole/cm**3)\n",
+ "Na=2*Nv; #number of atoms\n",
+ "a=(1/Na)**(1/3)*10**8; #distance between atoms(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"distance between atoms is\",round(a,2),\"angstrom\""
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter3.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter3.ipynb
new file mode 100644
index 00000000..296cc228
--- /dev/null
+++ b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter3.ipynb
@@ -0,0 +1,553 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#3: Crystal Planes and Point Defects"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.1, Page number 45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "miller indices are ( 3 6 1 )\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=1;\n",
+ "b=1/2;\n",
+ "c=3; #intercepts\n",
+ "\n",
+ "#Calculation\n",
+ "h=int(c/a);\n",
+ "k=int(c/b);\n",
+ "l=int(c/c); #miller indices\n",
+ "\n",
+ "#Result\n",
+ "print \"miller indices are (\",h,k,l,\")\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.5, Page number 48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "miller indices are ( 3 2 6 )\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=1;\n",
+ "b=2;\n",
+ "c=3; #intercepts\n",
+ "\n",
+ "#Calculation\n",
+ "h=int(c/a);\n",
+ "k=int(b);\n",
+ "l=int(c*b); #miller indices\n",
+ "\n",
+ "#Result\n",
+ "print \"miller indices are (\",h,k,l,\")\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.7, Page number 48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "miller indices are a/3 b/4 inf\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "from sympy import Symbol\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=Symbol('a');\n",
+ "b=Symbol('b');\n",
+ "X=3;\n",
+ "Y=4;\n",
+ "Z=0; #intercepts\n",
+ "\n",
+ "#Calculation\n",
+ "x=a/X;\n",
+ "y=b/Y;\n",
+ "z=float('inf'); #miller indices\n",
+ "\n",
+ "#Result\n",
+ "print \"miller indices are\",x,y,z"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.8, Page number 49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "spacing between planes is 2.521 nm\n",
+ "answer in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=0.25;\n",
+ "b=0.25;\n",
+ "c=0.18;\n",
+ "h=1;\n",
+ "k=1;\n",
+ "l=1;\n",
+ "\n",
+ "#Calculation\n",
+ "d_hkl=1/math.sqrt((a**2/h**2)+(b**2/k**2)+(c**2/l**2)); #spacing between planes(nm)\n",
+ "\n",
+ "#Result\n",
+ "print \"spacing between planes is\",round(d_hkl,3),\"nm\"\n",
+ "print \"answer in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.9, Page number 49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "number of atoms is 17.169 *10**18 atoms/mm**2\n",
+ "answer in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "h1=1;\n",
+ "k1=0;\n",
+ "l1=0; #miller indices of (100)\n",
+ "h2=1;\n",
+ "k2=1;\n",
+ "l2=0; #miller indices of (110)\n",
+ "a=0.287; #lattice constant(nm)\n",
+ "\n",
+ "#Calculation\n",
+ "d100=a/math.sqrt(h1**2+k1**2+l1**2); #spacing(nm)\n",
+ "d110=a/math.sqrt(h2**2+k2**2+l2**2); #spacing(nm)\n",
+ "rho=2/(math.sqrt(2)*(d100*10**-9)**2); #number of atoms(per mm**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"number of atoms is\",round(rho*10**-18,3),\"*10**18 atoms/mm**2\"\n",
+ "print \"answer in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.10, Page number 49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "interplanar spacing for (111) is 2.087 angstrom\n",
+ "interplanar spacing for (321) is 0.966 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r=0.1278*10**-9; #atomic radius(m)\n",
+ "h1=1;\n",
+ "k1=1;\n",
+ "l1=1;\n",
+ "h2=3;\n",
+ "k2=2;\n",
+ "l2=1;\n",
+ "\n",
+ "#Calculation\n",
+ "a=2*math.sqrt(2)*r;\n",
+ "d111=a*10**10/math.sqrt(h1**2+k1**2+l1**2); #interplanar spacing for (111)\n",
+ "d321=a*10**10/math.sqrt(h2**2+k2**2+l2**2); #interplanar spacing for (321)\n",
+ "\n",
+ "#Result\n",
+ "print \"interplanar spacing for (111) is\",round(d111,3),\"angstrom\"\n",
+ "print \"interplanar spacing for (321) is\",round(d321,3),\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.11, Page number 50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "percent volume change is 0.5 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r1=1.258*10**-10; #radius(m)\n",
+ "r2=1.292*10**-10; #radius(m)\n",
+ "\n",
+ "#Calculation\n",
+ "a_bcc=4*r1/math.sqrt(3);\n",
+ "v=a_bcc**3;\n",
+ "V1=v/2;\n",
+ "a_fcc=2*math.sqrt(2)*r2;\n",
+ "V2=a_fcc**3/4;\n",
+ "V=(V1-V2)*100/V1; #percent volume change is\",V,\"%\"\n",
+ "\n",
+ "#Result\n",
+ "print \"percent volume change is\",round(V,1),\"%\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.12, Page number 50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "volume of cell is 9.356 *10**-29 m**3\n",
+ "density of Zn is 6963.5 kg/m**3\n",
+ "answer in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "C=0.494*10**-9; #height(m)\n",
+ "a=0.27*10**-9; #distance(m)\n",
+ "M=65.37; #atomic weight\n",
+ "N=6.02*10**26; #avagadro number\n",
+ "\n",
+ "#Calculation\n",
+ "V=3*math.sqrt(3)*a**2*C/2; #volume of cell(m**3)\n",
+ "m=6*M/N;\n",
+ "rho=m/V; #density of Zn(kg/m**3)\n",
+ "\n",
+ "#Result\n",
+ "print \"volume of cell is\",round(V*10**29,3),\"*10**-29 m**3\"\n",
+ "print \"density of Zn is\",round(rho,1),\"kg/m**3\"\n",
+ "print \"answer in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.13, Page number 51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "fraction of vacancy sites is 8.466 *10**-7\n",
+ "answer in the book varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "T1=773; #temperature(K)\n",
+ "T2=1273; #temperature(K)\n",
+ "n=1*10**-10; #fraction of vacancy sites\n",
+ "\n",
+ "#Calculation\n",
+ "logx=round(T1*math.log(n)/T2,3);\n",
+ "x=math.exp(logx); #fraction of vacancy sites\n",
+ "\n",
+ "#Result\n",
+ "print \"fraction of vacancy sites is\",round(x*10**7,3),\"*10**-7\"\n",
+ "print \"answer in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.14, Page number 51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio of number of vacancies is 3.98 *10**-8\n",
+ "answer in the book varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Ev=68*10**3; #enthalpy(j/mol)\n",
+ "R=8.314;\n",
+ "T1=300; #temperature(K)\n",
+ "T2=800; #temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "x1=-Ev/(R*T1);\n",
+ "x2=-Ev/(R*T2);\n",
+ "n=math.exp(x1)/math.exp(x2); #ratio of number of vacancies\n",
+ "\n",
+ "#Result\n",
+ "print \"ratio of number of vacancies is\",round(n*10**8,2),\"*10**-8\"\n",
+ "print \"answer in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Example number 3.15, Page number 52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "value of concentration is 1.2 eV\n",
+ "average seperation is 0.46 *10**-6 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "KbT=0.025;\n",
+ "nbyN=1/10**10; #concentration\n",
+ "N=10**29;\n",
+ "\n",
+ "#Calculation\n",
+ "x=2*KbT;\n",
+ "Ev=x*math.log(1/nbyN); #value of concentration(eV)\n",
+ "n=1/((N*nbyN)**(1/3)); #average seperation(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"value of concentration is\",round(Ev,1),\"eV\"\n",
+ "print \"average seperation is\",round(n*10**6,2),\"*10**-6 m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 3.16, Page number 52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "energy required is 1.97 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "N=2.303*16.65;\n",
+ "T=298; #temperature(K)\n",
+ "Kb=8.625*10**-5;\n",
+ "\n",
+ "#Calculation\n",
+ "E=2*N*Kb*T; #energy required(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"energy required is\",round(E,2),\"eV\""
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter4.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter4.ipynb
new file mode 100644
index 00000000..1fa2a887
--- /dev/null
+++ b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter4.ipynb
@@ -0,0 +1,492 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#4: Dislocations and Crystal Structure Determination"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 4.1, Page number 66"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "wavelength is 0.842 angstrom\n",
+ "answer varies due to rounding off errors\n",
+ "maximum order of diffraction is 7.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d=0.282*10**-9; #lattice spacing(m)\n",
+ "theta=8+(35/60); #glancing angle(degree)\n",
+ "n=1; #order\n",
+ "Theta=90; #angle(degree)\n",
+ "\n",
+ "#Calculation\n",
+ "theta=theta*math.pi/180; #angle(radian)\n",
+ "Theta=Theta*math.pi/180; #angle(radian)\n",
+ "lamda=2*d*math.sin(theta)/n; #wavelength(m)\n",
+ "nmax=2*d*math.sin(Theta)/lamda; #maximum order of diffraction\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength is\",round(lamda*10**10,3),\"angstrom\"\n",
+ "print \"answer varies due to rounding off errors\"\n",
+ "print \"maximum order of diffraction is\",round(nmax)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 4.2, Page number 66"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "glancing angle is 22.942 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d=3.04*10**-10; #lattice spacing(m)\n",
+ "n=3; #order\n",
+ "lamda=0.79*10**-10; #wavelength(m)\n",
+ "\n",
+ "#Calculation\n",
+ "theta=math.asin(n*lamda/(2*d)); #glancing angle(radian)\n",
+ "theta=theta*180/math.pi; #glancing angle(degrees)\n",
+ "\n",
+ "#Result\n",
+ "print \"glancing angle is\",round(theta,3),\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 4.3, Page number 66"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "glancing angle is 21.01 degrees\n",
+ "answer in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=0.28*10**-9; #lattice spacing(m)\n",
+ "n=2; #order\n",
+ "lamda=0.071*10**-9; #wavelength(m)\n",
+ "h=1;\n",
+ "k=1;\n",
+ "l=0;\n",
+ "\n",
+ "#Calculation\n",
+ "d110=a/math.sqrt(h**2+k**2+l**2); #spacing(m)\n",
+ "theta=math.asin(n*lamda/(2*d110)); #glancing angle(radian)\n",
+ "theta=theta*180/math.pi; #glancing angle(degrees)\n",
+ "\n",
+ "#Result\n",
+ "print \"glancing angle is\",round(theta,2),\"degrees\"\n",
+ "print \"answer in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 4.4, Page number 67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "space of plane is 2.3336 angstrom\n",
+ "volume of unit cell is 12.708 *10**-30 m**3\n",
+ "answer varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n=1; #order\n",
+ "lamda=3*10**-10; #wavelength(m)\n",
+ "h=1;\n",
+ "k=0;\n",
+ "l=0;\n",
+ "theta=40; #angle(degree)\n",
+ "\n",
+ "#Calculation\n",
+ "theta=theta*math.pi/180; #angle(radian)\n",
+ "d=n*lamda/(2*math.sin(theta)); #space of plane(m)\n",
+ "a=d*math.sqrt(h**2+k**2+l**2); \n",
+ "V=a**3; #volume of unit cell(m**3)\n",
+ "\n",
+ "#Result\n",
+ "print \"space of plane is\",round(d*10**10,4),\"angstrom\"\n",
+ "print \"volume of unit cell is\",round(V*10**30,3),\"*10**-30 m**3\"\n",
+ "print \"answer varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 4.5, Page number 67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "spacing is 4.23 angstrom\n",
+ "answer in the book is wrong. hence the miller indices given in the book are also wrong and cannot be calculated\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=3; #lattice spacing(m)\n",
+ "n=1; #order\n",
+ "lamda=0.82*10**-9; #wavelength(m)\n",
+ "theta=75.86; #angle(degree)\n",
+ "\n",
+ "#Calculation\n",
+ "theta=theta*math.pi/180; #angle(radian)\n",
+ "d=n*10**10*lamda/(2*math.sin(theta)); #spacing(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"spacing is\",round(d,2),\"angstrom\"\n",
+ "print \"answer in the book is wrong. hence the miller indices given in the book are also wrong and cannot be calculated\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 4.6, Page number 68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "interplanar spacing is 2.502 angstrom\n",
+ "answer in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "m=9.1*10**-31; #mass(kg)\n",
+ "h=6.625*10**-34; #plank constant\n",
+ "n=1; #order\n",
+ "theta=9+(12/60)+(25/(60*60)); #angle(degree)\n",
+ "V=235.2; #kinetic energy of electron(eV)\n",
+ "\n",
+ "#Calculation\n",
+ "theta=theta*math.pi/180; #angle(radian)\n",
+ "lamda=h*10**10/math.sqrt(2*m*e*V); \n",
+ "d=n*lamda/(2*math.sin(theta)); #interplanar spacing(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"interplanar spacing is\",round(d,3),\"angstrom\"\n",
+ "print \"answer in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 4.7, Page number 68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "wavelength of X-ray beam is 3 angstrom\n",
+ "energy of Xray beam is 4.14 *10**5 eV\n",
+ "answer in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n=1; #order\n",
+ "h=1;\n",
+ "k=1;\n",
+ "l=1;\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "theta=27.5; #angle(degree)\n",
+ "H=6.625*10**-34; #plancks constant\n",
+ "c=3*10**10; #velocity of light(m)\n",
+ "a=5.63*10**-10; #lattice constant(m)\n",
+ "\n",
+ "#Calculation\n",
+ "theta=theta*math.pi/180; #angle(radian)\n",
+ "d=a/math.sqrt(h**2+k**2+l**2);\n",
+ "lamda=2*d*math.sin(theta)/n; #wavelength of Xray beam(m)\n",
+ "E=H*c/(e*lamda); #energy of Xray beam(eV) \n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength of X-ray beam is\",int(lamda*10**10),\"angstrom\"\n",
+ "print \"energy of Xray beam is\",round(E/10**5,2),\"*10**5 eV\"\n",
+ "print \"answer in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 4.8, Page number 69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "spacing of crystal is 0.253 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "theta=56; #angle(degree)\n",
+ "V=854; #voltage(V)\n",
+ "n=1; #order of diffraction\n",
+ "m=9.1*10**-31; #mass(kg)\n",
+ "h=6.625*10**-34; #plank constant\n",
+ "\n",
+ "#Calculation\n",
+ "theta=theta*math.pi/180; #angle(radian)\n",
+ "lamda=h/math.sqrt(2*m*e*V); #wavelength(m)\n",
+ "d=n*lamda/(2*math.sin(theta)); #spacing of crystal(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"spacing of crystal is\",round(d*10**10,3),\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 4.9, Page number 69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "lattice parameter is 3.794 angstrom\n",
+ "answer in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n=1; #order\n",
+ "h=2;\n",
+ "k=0;\n",
+ "l=2;\n",
+ "theta=34; #angle(degree)\n",
+ "lamda=1.5; #wavelength(angstrom)\n",
+ "\n",
+ "#Calculation\n",
+ "theta=theta*math.pi/180; #angle(radian)\n",
+ "d=n*lamda/(2*math.sin(theta)); #spacing of crystal(angstrom)\n",
+ "a=d*math.sqrt(h**2+k**2+l**2); #lattice parameter(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"lattice parameter is\",round(a,3),\"angstrom\"\n",
+ "print \"answer in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 4.10, Page number 70"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "bragg's angle is 2.4389 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n=1; #order\n",
+ "h=1;\n",
+ "k=1;\n",
+ "l=1;\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "V=5000; #voltage(V)\n",
+ "m=9.1*10**-31; #mass(kg)\n",
+ "H=6.625*10**-34; #plank constant\n",
+ "d=0.204*10**-9; #interplanar spacing(m)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=H/math.sqrt(2*m*e*V); #wavelength(m)\n",
+ "theta=math.asin(n*lamda/(2*d)); #bragg's angle(radian)\n",
+ "theta=theta*180/math.pi; #bragg's angle(degree)\n",
+ "\n",
+ "#Result\n",
+ "print \"bragg's angle is\",round(theta,4),\"degrees\""
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter5.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter5.ipynb
new file mode 100644
index 00000000..aee8cc8e
--- /dev/null
+++ b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter5.ipynb
@@ -0,0 +1,500 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#5: Principles of Quantum Mechanics"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 5.1, Page number 85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false,
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "wavelength is 0.0275 nm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "m=9.1*10**-31; #mass(kg)\n",
+ "h=6.626*10**-34; #plank constant\n",
+ "E=2000; #energy(eV)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=h/math.sqrt(2*m*E*e); #wavelength(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength is\",round(lamda*10**9,4),\"nm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 5.2, Page number 85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "wavelength is 0.30675 angstrom\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V=1600; #potential energy of electron(V)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=12.27/math.sqrt(V); #wavelength(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength is\",lamda,\"angstrom\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 5.3, Page number 85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "de broglie wavelength is 2.8 *10**-4 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "me=9.1*10**-31; #mass(kg)\n",
+ "h=6.62*10**-34; #plank constant\n",
+ "mn=1.676*10**-27; #mass(kg)\n",
+ "c=3*10**8; #velocity of light(m/s)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=h*10**10/math.sqrt(4*mn*me*c**2); #de broglie wavelength(angstrom) \n",
+ "\n",
+ "#Result\n",
+ "print \"de broglie wavelength is\",round(lamda*10**4,1),\"*10**-4 angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 5.4, Page number 85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "energy of second state is 0.11377 *10**26 eV\n",
+ "energy of second state is 0.45508 *10**26 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=2*10**-10; #length(m)\n",
+ "n1=2;\n",
+ "n2=4;\n",
+ "m=9.1*10**-31; #mass(kg)\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "h=6.626*10**-34; #plank constant\n",
+ "\n",
+ "#Calculation\n",
+ "E2=n1**2*h/(8*m*e*a); #energy of second state(eV)\n",
+ "E4=n2**2*h/(8*m*e*a); #energy of fourth state(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"energy of second state is\",round(E2*10**-26,5),\"*10**26 eV\"\n",
+ "print \"energy of second state is\",round(E4*10**-26,5),\"*10**26 eV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 5.5, Page number 86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "spacing of crystal is 0.3819 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V=344; #accelerated voltage(V)\n",
+ "n=1;\n",
+ "theta=60; #glancing angle(degrees)\n",
+ "\n",
+ "#Calculation\n",
+ "theta=theta*math.pi/180; #glancing angle(radian)\n",
+ "lamda=12.27/math.sqrt(V);\n",
+ "d=n*lamda/(2*math.sin(theta)); #spacing of crystal(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"spacing of crystal is\",round(d,4),\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 5.6, Page number 86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "kinetic energy is 273.57 eV\n",
+ "velocity is 43.86 *10**5 m/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda=1.66*10**-10; #wavelength(m)\n",
+ "m=9.1*10**-32; #mass(kg)\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "h=6.626*10**-34; #plank constant\n",
+ "\n",
+ "#Calculation\n",
+ "E=h**2/(4*m*e*lamda**2); #kinetic energy(eV)\n",
+ "v=h/(m*lamda); #velocity(m/s)\n",
+ "\n",
+ "#Result\n",
+ "print \"kinetic energy is\",round(E,2),\"eV\"\n",
+ "print \"velocity is\",round(v*10**-6,2),\"*10**5 m/s\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 5.7, Page number 87"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ground state energy is 37.69 eV\n",
+ "energy of 1st excited state is 150.77 eV\n",
+ "energy of 2nd excited state is 339.23 eV\n",
+ "answer in the book varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=1*10**-10; #length(m)\n",
+ "n2=2;\n",
+ "n3=3;\n",
+ "m=9.1*10**-31; #mass(kg)\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "h=6.626*10**-34; #plank constant\n",
+ "\n",
+ "#Calculation\n",
+ "E1=h**2/(8*m*e*a**2);\n",
+ "E2=n2**2*E1; #energy of 1st excited state(eV)\n",
+ "E3=n3**2*E1; #energy of 2nd excited state(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"ground state energy is\",round(E1,2),\"eV\"\n",
+ "print \"energy of 1st excited state is\",round(E2,2),\"eV\"\n",
+ "print \"energy of 2nd excited state is\",round(E3,2),\"eV\"\n",
+ "print \"answer in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 5.8, Page number 88"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "maximum energy is 2.3558 *n**2 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "from sympy import Symbol\n",
+ "\n",
+ "#Variable declaration\n",
+ "n=Symbol('n');\n",
+ "a=4*10**-10; #width of potential well(m)\n",
+ "m=9.1*10**-31; #mass(kg)\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "h=6.626*10**-34; #plank constant\n",
+ "\n",
+ "#Calculation\n",
+ "E1=n**2*h**2/(8*m*e*a**2); #maximum energy(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"maximum energy is\",round(E1/n**2,4),\"*n**2 eV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 5.10, Page number 88"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "uncertainity in velocity is 72.8 km/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "delta_x=10**-8; #length of box(m)\n",
+ "m=9.1*10**-31; #mass(kg)\n",
+ "h=6.626*10**-34; #plank constant\n",
+ "\n",
+ "#Calculation\n",
+ "delta_v=h/(m*delta_x); #uncertainity in velocity(m/s)\n",
+ "\n",
+ "#Result\n",
+ "print \"uncertainity in velocity is\",round(delta_v/10**3,1),\"km/s\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 5.11, Page number 89"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "de broglie wavelength is 0.40929 *10**-5 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "me=9.1*10**-31; #mass(kg)\n",
+ "mp=1.6*10**-27; #mass(kg)\n",
+ "h=6.626*10**-34; #plank constant\n",
+ "c=3*10**10; #velocity of light(m/s)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=h/math.sqrt(2*mp*me*c**2); #de broglie wavelength(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"de broglie wavelength is\",round(lamda*10**10*10**5,5),\"*10**-5 angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 5.12, Page number 89"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "glancing angle is 13 degrees 10 minutes\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m=1.675*10**-27; #mass(kg)\n",
+ "h=6.626*10**-34; #plank constant\n",
+ "E=0.04; #kinetic energy(eV)\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "n=1;\n",
+ "d110=0.314*10**-9; #spacing(m)\n",
+ "\n",
+ "#Calculation\n",
+ "E=E*e; #energy(J)\n",
+ "lamda=h/math.sqrt(2*m*E);\n",
+ "theta=math.asin(n*lamda/(2*d110)); #glancing angle(radian)\n",
+ "theta=theta*180/math.pi; #glancing angle(degrees)\n",
+ "theta_m=60*(theta-int(theta));\n",
+ "\n",
+ "#Result\n",
+ "print \"glancing angle is\",int(theta),\"degrees\",int(theta_m),\"minutes\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter6.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter6.ipynb
new file mode 100644
index 00000000..65bfb32c
--- /dev/null
+++ b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter6.ipynb
@@ -0,0 +1,509 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#6: Electron Theory of Metals"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.1, Page number 116"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "relaxation time is 3.9797 *10**-14 sec\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho=1.54*10**-8; #resistivity(ohm m)\n",
+ "n=5.8*10**28; #conduction electrons(per m**3)\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "m=9.1*10**-31; #mass(kg)\n",
+ "\n",
+ "#Calculation\n",
+ "towr=m/(n*e**2*rho); #relaxation time(sec)\n",
+ "\n",
+ "#Result\n",
+ "print \"relaxation time is\",round(towr*10**14,4),\"*10**-14 sec\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.2, Page number 116"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "mean free path is 2.89 *10**-9 m\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "T=300; #temperature(K)\n",
+ "n=8.5*10**28; #density(per m**3)\n",
+ "rho=1.69*10**-8; #resistivity(ohm/m**3)\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "m=9.11*10**-31; #mass(kg)\n",
+ "Kb=1.38*10**-23; #boltzmann constant(J/k)\n",
+ "\n",
+ "#Calculation\n",
+ "rho=math.sqrt(3*Kb*m*T)/(n*e**2*rho); #mean free path(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"mean free path is\",round(rho*10**9,2),\"*10**-9 m\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.3, Page number 117"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "relaxation time is 3.824 *10**-17 sec\n",
+ "answer in the book varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho=1.43*10**-8; #resistivity(ohm m)\n",
+ "n=6.5*10**28; #conduction electrons(per m**3)\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "m=9.1*10**-34; #mass(kg)\n",
+ "\n",
+ "#Calculation\n",
+ "towr=m/(n*e**2*rho); #relaxation time(sec)\n",
+ "\n",
+ "#Result\n",
+ "print \"relaxation time is\",round(towr*10**17,3),\"*10**-17 sec\"\n",
+ "print \"answer in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.4, Page number 117"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "temperature is 0.1088 K\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "PE=1/100; #probability\n",
+ "E_EF=0.5; #energy difference\n",
+ "\n",
+ "#Calculation\n",
+ "x=math.log((1/PE)-1);\n",
+ "T=E_EF/x; #temperature(K)\n",
+ "\n",
+ "#Result\n",
+ "print \"temperature is\",round(T,4),\"K\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.5, Page number 117"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "mobility is 0.427 *10**-2 m/Vs\n",
+ "average time is 2.43 *10**-14 sec\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d=8.92*10**3; #density(kg/m**3)\n",
+ "rho=1.73*10**-8; #resistivity(ohm m)\n",
+ "M=63.5; #atomic weight\n",
+ "N=6.02*10**26; #avagadro number\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "m=9.1*10**-31; #mass(kg)\n",
+ "\n",
+ "#Calculation\n",
+ "n=d*N/M;\n",
+ "mew=1/(rho*n*e); #mobility(m/Vs)\n",
+ "tow=m/(n*e**2*rho); #average time(sec)\n",
+ "\n",
+ "#Result\n",
+ "print \"mobility is\",round(mew*10**2,3),\"*10**-2 m/Vs\"\n",
+ "print \"average time is\",round(tow*10**14,2),\"*10**-14 sec\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.6, Page number 118"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "temperature is 290.2 K\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "EF=5.5; #energy(eV)\n",
+ "FE=10/100; #probability\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "Kb=1.38*10**-23; #boltzmann constant(J/k)\n",
+ "\n",
+ "#Calculation\n",
+ "E=EF+(EF/100); \n",
+ "x=(E-EF)*e;\n",
+ "y=x/Kb;\n",
+ "z=(1/FE)-1;\n",
+ "T=y/math.log(z); #temperature(K)\n",
+ "\n",
+ "#Result\n",
+ "print \"temperature is\",round(T,1),\"K\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.7, Page number 119"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "kinetic energy is 39.2 *10**-3 eV\n",
+ "velocity is 1930.27 m/s\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Kb=1.38*10**-23; #boltzmann constant(J/k)\n",
+ "T=303; #temperature(K)\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "MH=2*1.008*1.67*10**-27; #mass(kg) \n",
+ "\n",
+ "#Calculation\n",
+ "KE=3*Kb*T/(2*e); #kinetic energy(eV)\n",
+ "cbar=math.sqrt(3*Kb*T/MH); #velocity(m/s)\n",
+ "\n",
+ "#Result\n",
+ "print \"kinetic energy is\",round(KE*10**3,1),\"*10**-3 eV\"\n",
+ "print \"velocity is\",round(cbar,2),\"m/s\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.8, Page number 119"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "density of electrons is 557.9 *10**26 per m**3\n",
+ "mobility of electrons is 7.8416 *10**-5 m**2/Vs\n",
+ "collision time is 44.6 n sec\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho=10**4; #density of silver(kg/m**3)\n",
+ "N=6.02*10**26; #avagadro number\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "m=9.1*10**-31; #mass(kg)\n",
+ "MA=107.9; #atomic weight(kg)\n",
+ "sigma=7*10**7; #conductivity(per ohm m)\n",
+ "\n",
+ "#Calculation\n",
+ "n=rho*N/MA; #density of electrons(per m**3)\n",
+ "mew=sigma/(n*e*10**2); #mobility of electrons(m**2/Vs)\n",
+ "tow=sigma*m*10**15/(n*e**2); #collision time(n sec)\n",
+ "\n",
+ "#Result\n",
+ "print \"density of electrons is\",round(n/10**26,1),\"*10**26 per m**3\"\n",
+ "print \"mobility of electrons is\",round(mew*10**5,4),\"*10**-5 m**2/Vs\"\n",
+ "print \"collision time is\",round(tow,1),\"n sec\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.9, Page number 120"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "electron velocity is 1.875 *10**6 m/s\n",
+ "proton velocity is 43.774 *10**3 m/s\n",
+ "answers given in the book are wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Ee=10; #electron kinetic energy(eV)\n",
+ "Ep=10; #proton kinetic energy(eV)\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "me=9.1*10**-31; #mass(kg)\n",
+ "mp=1.67*10**-27; #mass(kg)\n",
+ "\n",
+ "#Calculation\n",
+ "cebar=math.sqrt(2*Ee*e/me); #electron velocity(m/s)\n",
+ "cpbar=math.sqrt(2*Ep*e/mp); #proton velocity(m/s)\n",
+ "\n",
+ "#Result\n",
+ "print \"electron velocity is\",round(cebar/10**6,3),\"*10**6 m/s\"\n",
+ "print \"proton velocity is\",round(cpbar/10**3,3),\"*10**3 m/s\"\n",
+ "print \"answers given in the book are wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.10, Page number 120"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "drift velocity is 7.35294 *10**-4 m/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "A=10*10**-6; #area(m**2)\n",
+ "i=100; #current(amp)\n",
+ "n=8.5*10**28; #number of electrons\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "\n",
+ "#Calculation\n",
+ "vd=i/(n*A*e); #drift velocity(m/s)\n",
+ "\n",
+ "#Result\n",
+ "print \"drift velocity is\",round(vd*10**4,5),\"*10**-4 m/s\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 6.11, Page number 121"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "thermal conductivity is 205.675 W/mK\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Kb=1.38*10**-23; #boltzmann constant(J/k)\n",
+ "m=9.1*10**-31; #mass(kg)\n",
+ "tow=3*10**-14; #relaxation time(sec)\n",
+ "n=8*10**28; #density of electrons(per m**3)\n",
+ "T=273; #temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "sigma_T=3*n*tow*T*Kb**2/(2*m); #thermal conductivity(W/mK)\n",
+ "\n",
+ "#Result\n",
+ "print \"thermal conductivity is\",round(sigma_T,3),\"W/mK\""
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter7.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter7.ipynb
new file mode 100644
index 00000000..75da7597
--- /dev/null
+++ b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter7.ipynb
@@ -0,0 +1,508 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#7: Dielectrics"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 7.1, Page number 146"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "electronic polarisability is 3.291 *10**-37 Fm**2\n",
+ "answer varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "epsilonr=3.75; #relative dielectric constant\n",
+ "T=27; #temperature(C)\n",
+ "gama=1/3; #internal field constant\n",
+ "rho=2050; #density(kg/m**3)\n",
+ "Ma=32; #atomic weight(amu)\n",
+ "Na=6.022*10**23; #avagadro number\n",
+ "epsilon0=8.85*10**-12; \n",
+ "\n",
+ "#Calculation\n",
+ "x=(epsilonr-1)/(epsilonr+2);\n",
+ "alpha_e=x*Ma*3*epsilon0/(rho*Na); #electronic polarisability(Fm**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"electronic polarisability is\",round(alpha_e*10**37,3),\"*10**-37 Fm**2\"\n",
+ "print \"answer varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 7.2, Page number 146"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "capacitance is 8.85 PF\n",
+ "charge on plates is 8.85e-10 C\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "A=100*10**-4; #area(m**2)\n",
+ "epsilon0=8.85*10**-12; \n",
+ "d=1*10**-2; #seperation(m)\n",
+ "V=100; #potential(V)\n",
+ "\n",
+ "#Calculation\n",
+ "C=A*epsilon0/d; #capacitance(PF)\n",
+ "Q=C*V; #charge on plates(C)\n",
+ "\n",
+ "#Result\n",
+ "print \"capacitance is\",C*10**12,\"PF\"\n",
+ "print \"charge on plates is\",Q,\"C\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 7.3, Page number 147"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "polarisability is 2.242e-41 Fm**2\n",
+ "answer varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "epsilonr=1.0000684; #dielectric constant\n",
+ "N=2.7*10**25; #number of atoms\n",
+ "epsilon0=8.85*10**-12; \n",
+ "\n",
+ "#Calculation\n",
+ "alpha_e=epsilon0*(epsilonr-1)/N; #polarisability(Fm**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"polarisability is\",alpha_e,\"Fm**2\"\n",
+ "print \"answer varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 7.4, Page number 147"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "dielectric constant is 2.538 F/m\n",
+ "answer in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "alpha_e=10**-40; #polarisability(Fm**2)\n",
+ "N=3*10**28; #density of atoms\n",
+ "epsilon0=8.85*10**-12; \n",
+ "\n",
+ "#Calculation\n",
+ "x=N*alpha_e/epsilon0;\n",
+ "epsilonr=(1+(2*x))/(1-x); #dielectric constant(F/m)\n",
+ "\n",
+ "#Result\n",
+ "print \"dielectric constant is\",round(epsilonr,3),\"F/m\"\n",
+ "print \"answer in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 7.5, Page number 147"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "voltage is 13.9 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "A=650*10**-4; #area(m**2)\n",
+ "epsilon0=8.85*10**-12; \n",
+ "d=4*10**-2; #seperation(m)\n",
+ "Q=2*10**-10; #charge(C)\n",
+ "epsilonr=3.5; #dielectric constant\n",
+ "\n",
+ "#Calculation\n",
+ "C=A*epsilon0/d; \n",
+ "V=Q/C; #voltage(V)\n",
+ "\n",
+ "#Result\n",
+ "print \"voltage is\",round(V,1),\"V\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 7.6, Page number 148"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "polarisability is 5.877 *10**-35 Fm**2\n",
+ "answer in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "A=6.45*10**-4; #area(m**2)\n",
+ "epsilon0=8.85*10**-12; \n",
+ "d=2*10**-3; #seperation(m)\n",
+ "epsilonr=5; #dielectric constant\n",
+ "N=6.023*10**23; #avagadro number\n",
+ "\n",
+ "#Calculation\n",
+ "alpha_e=epsilon0*(epsilonr-1)/N; #polarisability(Fm**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"polarisability is\",round(alpha_e*10**35,3),\"*10**-35 Fm**2\"\n",
+ "print \"answer in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 7.7, Page number 148"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "radius of electron cloud is 5.86 *10**-11 m\n",
+ "displacement is 6.9999 *10**-17 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "epsilonr=1.0000684; #dielectric constant\n",
+ "Na=2.7*10**25; #number of atoms\n",
+ "x=1/(9*10**9); \n",
+ "E=10**6; #electric field(V/m)\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "Z=2; #atomic number\n",
+ "\n",
+ "#Calculation\n",
+ "r0=((epsilonr-1)/(4*math.pi*Na))**(1/3); #radius of electron cloud(m)\n",
+ "X=x*E*r0**3/(Z*e); #displacement(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"radius of electron cloud is\",round(r0*10**11,2),\"*10**-11 m\"\n",
+ "print \"displacement is\",round(X*10**17,4),\"*10**-17 m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 7.8, Page number 149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "electronic polarisability is 6.382 *10**-35 Fm**2\n",
+ "answer in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "epsilonr=4; #relative dielectric constant\n",
+ "Na=2.08*10**23; #avagadro number\n",
+ "epsilon0=8.85*10**-12; \n",
+ "\n",
+ "#Calculation\n",
+ "x=(epsilonr-1)/(epsilonr+2);\n",
+ "alpha_e=x*3*epsilon0/Na; #electronic polarisability(Fm**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"electronic polarisability is\",round(alpha_e*10**35,3),\"*10**-35 Fm**2\"\n",
+ "print \"answer in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 7.9, Page number 149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "energy in condenser is 2e-08 F\n",
+ "energy in dielectric is 0.2 *10**-4 J\n",
+ "answer in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "C=4*10**-6; #capacitance(F)\n",
+ "epsilonr=200; #relative dielectric constant\n",
+ "V=2000; #voltage(V)\n",
+ "\n",
+ "#Calculation\n",
+ "C0=C/epsilonr; #energy in condenser(F)\n",
+ "E=C0*V/2; #energy in dielectric(J)\n",
+ "\n",
+ "#Result\n",
+ "print \"energy in condenser is\",C0,\"F\"\n",
+ "print \"energy in dielectric is\",E*10**4,\"*10**-4 J\"\n",
+ "print \"answer in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 7.10, Page number 149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "polarisability is 0.185 *10**-40 Fm**2\n",
+ "relative permittivity is 1.0000564 Fm**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "epsilon0=8.85*10**-12; \n",
+ "N=2.7*10**25; #density of atoms\n",
+ "R=0.55*10**-10; #radius(m)\n",
+ "\n",
+ "#Calculation\n",
+ "alpha_e=4*math.pi*epsilon0*R**3; #polarisability(Fm**2)\n",
+ "epsilonr=(N*alpha_e/epsilon0)+1; #relative permittivity\n",
+ "\n",
+ "#Result\n",
+ "print \"polarisability is\",round(alpha_e*10**40,3),\"*10**-40 Fm**2\"\n",
+ "print \"relative permittivity is\",round(epsilonr,7),\"Fm**2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 7.11, Page number 150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "field strength is 0.4237 *10**6 V/m\n",
+ "total dipole moment is 0.4725 *10**-6 Coul. m\n",
+ "answer in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "A=180*10**-4; #area(m**2)\n",
+ "epsilonr=8; #relative permittivity\n",
+ "C=3*10**-6; #capacitance(F)\n",
+ "V=10; #potential(V)\n",
+ "epsilon0=8.85*10**-12; \n",
+ "\n",
+ "#Calculation\n",
+ "E=V*C/(epsilon0*epsilonr); #field strength(V/m)\n",
+ "dm=epsilon0*(epsilonr-1)*A*E; #total dipole moment(coul m)\n",
+ "\n",
+ "#Result\n",
+ "print \"field strength is\",round(E/10**6,4),\"*10**6 V/m\"\n",
+ "print \"total dipole moment is\",dm*10**6,\"*10**-6 Coul. m\"\n",
+ "print \"answer in the book is wrong\""
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter8.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter8.ipynb
new file mode 100644
index 00000000..499ce19f
--- /dev/null
+++ b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter8.ipynb
@@ -0,0 +1,456 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#8: Magnetic Materials"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.1, Page number 170"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "change in magnetic moment is 17.58 *10**-30 Am**2\n",
+ "answer in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r=0.05*10**-9; #radius(m)\n",
+ "B=1; #magnetic induction(web/m**2)\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "m=9.1*10**-31; #mass(kg)\n",
+ "\n",
+ "#Calculation\n",
+ "d_mew=e**2*r**2*B/(4*m); #change in magnetic moment(Am**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"change in magnetic moment is\",round(d_mew*10**30,2),\"*10**-30 Am**2\"\n",
+ "print \"answer in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.2, Page number 170"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "intensity of magnetisation is -0.495 amp/m\n",
+ "magnetic flux density is 0.124 wb/m**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "chi=-0.5*10**-5; #magnetic susceptibility\n",
+ "H=9.9*10**4; #magnetic field intensity(amp/m)\n",
+ "mew0=4*math.pi*10**-7;\n",
+ "\n",
+ "#Calculation\n",
+ "I=chi*H; #intensity of magnetisation(amp/m)\n",
+ "B=mew0*H*(1+chi); #magnetic flux density(wb/m**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"intensity of magnetisation is\",I,\"amp/m\"\n",
+ "print \"magnetic flux density is\",round(B,3),\"wb/m**2\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.3, Page number 170"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "relative permeability is 16\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "H=220; #magnetic field intensity(amp/m)\n",
+ "I=3300; #magnetisation(amp/m)\n",
+ "\n",
+ "#Calculation\n",
+ "mewr=1+(I/H); #relative permeability\n",
+ "\n",
+ "#Result\n",
+ "print \"relative permeability is\",int(mewr)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.4, Page number 171"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "magnetic induction is 14.503 web/m**2 0.001408\n",
+ "dipole moment is 1.646 *10**-23 amp m**2\n",
+ "answers in the book are wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r=6.1*10**-11; #radius of atom(m)\n",
+ "new=8.8*10**15; #frequency(revolution/sec)\n",
+ "mew0=4*math.pi*10**-7;\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "\n",
+ "#Calculation\n",
+ "i=e*new; #current(amp)\n",
+ "B=mew0*i/(2*r); #magnetic induction(web/m**2)\n",
+ "mew=i*math.pi*r**2; #dipole moment(amp m**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"magnetic induction is\",round(B,3),\"web/m**2\",i\n",
+ "print \"dipole moment is\",round(mew*10**23,3),\"*10**-23 amp m**2\"\n",
+ "print \"answers in the book are wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.5, Page number 171"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "average number of bohr magnetons is 2.854 bohr magneton/atom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Is=1.96*10**6; #saturation magnetisation(amp/m)\n",
+ "a=3*10**-10; #cube edge(m)\n",
+ "mewB=9.27*10**-24; #bohr magneton(amp/m**2)\n",
+ "n=2; #number of atoms\n",
+ "\n",
+ "#Calculation\n",
+ "N=n/(a**3); \n",
+ "mew_bar=Is/(N*mewB); #average number of bohr magnetons(bohr magneton/atom)\n",
+ "\n",
+ "#Result\n",
+ "print \"average number of bohr magnetons is\",round(mew_bar,3),\"bohr magneton/atom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.6, Page number 172"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "magnetizing force is 978.874 amp/m\n",
+ "relative permeability is 4.065\n",
+ "answer in the book varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "I=3000; #magnetisation(amp/m)\n",
+ "mew0=4*math.pi*10**-7;\n",
+ "B=0.005; #flux density(weber/m**2)\n",
+ "\n",
+ "#Calculation\n",
+ "H=(B/mew0)-I; #magnetizing force(amp/m)\n",
+ "mewr=(I/H)+1; #relative permeability\n",
+ "\n",
+ "#Result\n",
+ "print \"magnetizing force is\",round(H,3),\"amp/m\"\n",
+ "print \"relative permeability is\",round(mewr,3)\n",
+ "print \"answer in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.7, Page number 172"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "permeability is 8.333 *10**-4 henry/m\n",
+ "answer in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "H=1800; #magnetizing force(amp/m)\n",
+ "chi=3*10**-5; #magnetic flux(wb)\n",
+ "A=0.2*10**-4; #area(m**2)\n",
+ "\n",
+ "#Calculation\n",
+ "B=chi/A;\n",
+ "mew=B/H; #permeability(henry/m)\n",
+ "\n",
+ "#Result\n",
+ "print \"permeability is\",round(mew*10**4,3),\"*10**-4 henry/m\"\n",
+ "print \"answer in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.8, Page number 172"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "magnetic dipole moment is 5.0265 *10**-3 amp m**2\n",
+ "answer in the book varies due to rounding off errors\n",
+ "torque is 0.7071 *10**-3 Nm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r=0.04; #radius(m)\n",
+ "i=1000*10**-3; #current(mA)\n",
+ "B=10**-3; #magnetic flux density(wb/m**2)\n",
+ "theta=45; #angle(degrees)\n",
+ "\n",
+ "#Calculation\n",
+ "A=math.pi*r**2; #area(m**2)\n",
+ "mew=i*A; #magnetic dipole moment(amp m**2)\n",
+ "theta=theta*math.pi/180;\n",
+ "tow=i*B*math.cos(theta); #torque(Nm)\n",
+ "\n",
+ "#Result\n",
+ "print \"magnetic dipole moment is\",round(mew*10**3,4),\"*10**-3 amp m**2\"\n",
+ "print \"answer in the book varies due to rounding off errors\"\n",
+ "print \"torque is\",round(tow*10**3,4),\"*10**-3 Nm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.9, Page number 173"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "hysteresis loss per cycle is 40.0 J/m**3\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "A=100; #area(m**2)\n",
+ "B=0.01; #flux density(wb/m**2)\n",
+ "H=40; #magnetic field(amp/m)\n",
+ "M=7650; #atomic weight(kg/m**3)\n",
+ "\n",
+ "#Calculation\n",
+ "h=A*B*H; #hysteresis loss per cycle(J/m**3)\n",
+ "\n",
+ "#Result\n",
+ "print \"hysteresis loss per cycle is\",h,\"J/m**3\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 8.10, Page number 173"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "hysteresis power loss per second is 20000 watt/m**3\n",
+ "power loss is 2.614 watt/kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "h=200; #hysteresis loss per cycle(J/m**3)\n",
+ "M=7650; #atomic weight(kg/m**3)\n",
+ "n=100; #magnetisation cycles per second\n",
+ "\n",
+ "#Calculation\n",
+ "hpl=h*n; #hysteresis power loss per second(watt/m**3)\n",
+ "pl=hpl/M; #power loss(watt/kg)\n",
+ "\n",
+ "#Result\n",
+ "print \"hysteresis power loss per second is\",hpl,\"watt/m**3\"\n",
+ "print \"power loss is\",round(pl,3),\"watt/kg\""
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter9.ipynb b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter9.ipynb
new file mode 100644
index 00000000..0ed7bb65
--- /dev/null
+++ b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/Chapter9.ipynb
@@ -0,0 +1,699 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#9: Semiconductors"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 9.1, Page number 202"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "resistivity is 0.44899 ohm m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "ni=2.4*10**19; #particle density(per m**3)\n",
+ "mew_e=0.39; #electron mobility(m**2/Vs)\n",
+ "mew_h=0.19; #hole mobility(m**2/Vs)\n",
+ "\n",
+ "#Calculation\n",
+ "rho=1/(ni*e*(mew_e+mew_h)); #resistivity(ohm m)\n",
+ "\n",
+ "#Result\n",
+ "print \"resistivity is\",round(rho,5),\"ohm m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 9.2, Page number 203"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "conductivity is 0.43 *10**-3 s\n",
+ "conductivity is 2.08 *10**3 s\n",
+ "answer in the book varies due to rounding off errors\n",
+ "equilibrium hole concentration is 2.25 *10**9 per m**3\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "ni=1.5*10**16; #particle density(per m**3)\n",
+ "mew_e=0.13; #electron mobility(m**2/Vs)\n",
+ "mew_h=0.048; #hole mobility(m**2/Vs)\n",
+ "ND=10**23; #density(per m**3)\n",
+ "\n",
+ "#Calculation\n",
+ "sigma_i=ni*e*(mew_e+mew_h); #conductivity(s)\n",
+ "sigma=ND*mew_e*e; #conductivity(s)\n",
+ "P=ni**2/ND; #equilibrium hole concentration(per m**3)\n",
+ "\n",
+ "#Result\n",
+ "print \"conductivity is\",round(sigma_i*10**3,2),\"*10**-3 s\"\n",
+ "print \"conductivity is\",sigma/10**3,\"*10**3 s\"\n",
+ "print \"answer in the book varies due to rounding off errors\"\n",
+ "print \"equilibrium hole concentration is\",P/10**9,\"*10**9 per m**3\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 9.3, Page number 203"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "intrinsic conductivity is 0.432 *10**-3 ohm-1 m-1\n",
+ "conductivity during donor impurity is 10.4 ohm-1 m-1\n",
+ "conductivity during donor impurity is 4.0 ohm-1 m-1\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "ni=1.5*10**16; #particle density(per m**3)\n",
+ "mew_e=0.13; #electron mobility(m**2/Vs)\n",
+ "mew_h=0.05; #hole mobility(m**2/Vs)\n",
+ "ND=5*10**20; #density(per m**3)\n",
+ "\n",
+ "#Calculation\n",
+ "sigma=ni*e*(mew_e+mew_h); #intrinsic conductivity(s)\n",
+ "sigma_d=ND*e*mew_e; #conductivity during donor impurity(ohm-1 m-1)\n",
+ "sigma_a=ND*e*mew_h; #conductivity during acceptor impurity(ohm-1 m-1)\n",
+ "\n",
+ "#Result\n",
+ "print \"intrinsic conductivity is\",sigma*10**3,\"*10**-3 ohm-1 m-1\"\n",
+ "print \"conductivity during donor impurity is\",sigma_d,\"ohm-1 m-1\"\n",
+ "print \"conductivity during donor impurity is\",sigma_a,\"ohm-1 m-1\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 9.4, Page number 204"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "mobility is 0.04099 m**2/Vs\n",
+ "answer in the book varies due to rounding off errors\n",
+ "density of atoms is 1.7 *10**22 per m**3\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "RH=3.66*10**-4; #hall coefficient(m**3/c)\n",
+ "rho=8.93*10**-3; #resistivity(m)\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "\n",
+ "#Calculation\n",
+ "mew=RH/rho; #mobility(m**2/Vs)\n",
+ "n=1/(RH*e); #density of atoms(per m**3)\n",
+ "\n",
+ "#Result\n",
+ "print \"mobility is\",round(mew,5),\"m**2/Vs\"\n",
+ "print \"answer in the book varies due to rounding off errors\"\n",
+ "print \"density of atoms is\",round(n/10**22,1),\"*10**22 per m**3\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 9.5, Page number 204"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "carrier density is 3.58 *10**19 per m**3\n",
+ "conductivity is 3.43 ohm-1 m-1\n",
+ "answer in the book varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "w=72.6; #atomic weight\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "mew_e=0.4; #electron mobility(m**2/Vs)\n",
+ "mew_h=0.2; #hole mobility(m**2/Vs)\n",
+ "T=300; #temperature(K)\n",
+ "x=4.83*10**21;\n",
+ "Eg=0.7; #band gap(eV)\n",
+ "y=0.052;\n",
+ "\n",
+ "#Calculation\n",
+ "ni=x*(T**(3/2))*math.exp(-Eg/y); #carrier density(per m**3)\n",
+ "sigma=ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n",
+ "\n",
+ "#Result\n",
+ "print \"carrier density is\",round(ni/10**19,2),\"*10**19 per m**3\"\n",
+ "print \"conductivity is\",round(sigma,2),\"ohm-1 m-1\"\n",
+ "print \"answer in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 9.6, Page number 205"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "energy band gap is 1.12 eV\n",
+ "answer in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "T1=293; #temperature(K)\n",
+ "T2=305; #temperature(K)\n",
+ "sigma1=2; \n",
+ "sigma2=4.5; \n",
+ "KB=1.38*10**-23; #boltzmann constant\n",
+ "\n",
+ "#Calculation\n",
+ "x=((1/T1)-(1/T2));\n",
+ "y=math.log(sigma2/sigma1);\n",
+ "z=3*math.log(T2/T1)/2;\n",
+ "Eg=2*KB*(y+z)/(e*x); #energy band gap(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"energy band gap is\",round(Eg,2),\"eV\"\n",
+ "print \"answer in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 9.7, Page number 205"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "diffusion coefficient is 4.9 *10**-3 m**2/sec\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "mew_e=0.19; #electron mobility(m**2/Vs)\n",
+ "T=300; #temperature(K)\n",
+ "KB=1.38*10**-23; #boltzmann constant\n",
+ "\n",
+ "#Calculation\n",
+ "Dn=mew_e*KB*T/e; #diffusion coefficient(m**2/sec)\n",
+ "\n",
+ "#Result\n",
+ "print \"diffusion coefficient is\",round(Dn*10**3,1),\"*10**-3 m**2/sec\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 9.8, Page number 206"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "carrier density is 1.25e+19 per m**3\n",
+ "energy gap is 0.75 eV\n",
+ "answer in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "sigma=2.12; #conductivity(ohm-1 m-1)\n",
+ "T=300; #temperature(K)\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "mew_e=0.36; #electron mobility(m**2/Vs)\n",
+ "mew_h=0.7; #hole mobility(m**2/Vs)\n",
+ "C=4.83*10**21;\n",
+ "KB=1.38*10**-23; #boltzmann constant\n",
+ "\n",
+ "#Calculation\n",
+ "ni=sigma/(e*(mew_e+mew_h)); #carrier density(per m**3)\n",
+ "x=C*T**(3/2)/ni;\n",
+ "Eg=2*KB*T*math.log(x)/e; #energy gap(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"carrier density is\",ni,\"per m**3\"\n",
+ "print \"energy gap is\",round(Eg,2),\"eV\"\n",
+ "print \"answer in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 9.9, Page number 206"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "probability of occupation at 0C is 2.025 *10**-4 eV\n",
+ "probability of occupation at 50C is 7.55 *10**-4 eV\n",
+ "probability of occupation at 100C is 19.76 *10**-4 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Eg=6.408*10**-20; #energy gap of semiconductor(J)\n",
+ "T1=273; #temperature(K)\n",
+ "T2=323; #temperature(K)\n",
+ "T3=373; #temperature(K)\n",
+ "KB=1.38*10**-23; #boltzmann constant\n",
+ "\n",
+ "#Calculation\n",
+ "FE1=1/(1+math.exp(Eg/(2*KB*T1))); #probability of occupation at 0C(eV)\n",
+ "FE2=1/(1+math.exp(Eg/(2*KB*T2))); #probability of occupation at 50C(eV)\n",
+ "FE3=1/(1+math.exp(Eg/(2*KB*T3))); #probability of occupation at 100C(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"probability of occupation at 0C is\",round(FE1*10**4,3),\"*10**-4 eV\"\n",
+ "print \"probability of occupation at 50C is\",round(FE2*10**4,2),\"*10**-4 eV\"\n",
+ "print \"probability of occupation at 100C is\",round(FE3*10**4,2),\"*10**-4 eV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 9.10, Page number 207"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio between conductivity is 1.095 *10**5\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Eg=1.9224*10**-19; #energy gap of semiconductor(J)\n",
+ "T1=600; #temperature(K)\n",
+ "T2=300; #temperature(K)\n",
+ "x=-1.666*10**-3;\n",
+ "KB=1.38*10**-23; #boltzmann constant\n",
+ "\n",
+ "#Calculation\n",
+ "T=(1/T1)-(1/T2);\n",
+ "r=math.exp(x*(-Eg/(2*KB))); #ratio between conductivity\n",
+ "\n",
+ "#Result\n",
+ "print \"ratio between conductivity is\",round(r/10**5,3),\"*10**5\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 9.11, Page number 207"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "resistivity of material is 4.1336 *10**-4 ohm m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "ni=2.5*10**19; #charge carriers(per m**3)\n",
+ "r=10**-6; #ratio\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "mew_e=0.36; #electron mobility(m**2/Vs)\n",
+ "mew_h=0.18; #hole mobility(m**2/Vs)\n",
+ "N=4.2*10**28; #number of atoms(per m**3)\n",
+ "\n",
+ "#Calculation\n",
+ "Ne=r*N; #number of impurity atoms(per m**3)\n",
+ "Nh=ni**2/Ne; \n",
+ "sigma=(Ne*e*mew_e)+(Nh*e*mew_h); #conductivity(ohm m)\n",
+ "rho=1/sigma; #resistivity of material(per ohm m)\n",
+ "\n",
+ "#Result\n",
+ "print \"resistivity of material is\",round(rho*10**4,4),\"*10**-4 ohm m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 9.12, Page number 208"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "conductivity is 0.028 per ohm m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n=5*10**17; #concentration(m**3)\n",
+ "vd=350; #drift velocity(m/s)\n",
+ "E=1000; #electric field(V/m)\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "\n",
+ "#Calculation\n",
+ "sigma=n*e*vd/E; #conductivity(per ohm m)\n",
+ "\n",
+ "#Result\n",
+ "print \"conductivity is\",sigma,\"per ohm m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 9.13, Page number 208"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "concentration is 1.1 *10**16 per m**3\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "sigmae=2.2*10**-4; #conductivity(ohm/m)\n",
+ "mew_e=125*10**-3; #electron mobility(m**2/Vs)\n",
+ "e=1.602*10**-19; #charge(c)\n",
+ "\n",
+ "#Calculation\n",
+ "ne=sigmae/(e*mew_e); #concentration(per m**3)\n",
+ "\n",
+ "#Result\n",
+ "print \"concentration is\",round(ne/10**16,1),\"*10**16 per m**3\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 9.14, Page number 209"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "density of charge carriers is 1.7055 *10**22 per m**3\n",
+ "mobility of charge carriers is 0.041 m**2/Vs\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "RH=3.66*10**-4; #hall coefficient(m*3/c)\n",
+ "rho_i=8.93*10**-3; #resistivity(ohm m)\n",
+ "e=1.602*10**-19; #charge(c)\n",
+ "\n",
+ "#Calculation\n",
+ "nh=1/(RH*e); #density of charge carriers(per m**3)\n",
+ "mewh=1/(rho_i*nh*e); #mobility of charge carriers(m**2/Vs)\n",
+ "\n",
+ "#Result\n",
+ "print \"density of charge carriers is\",round(nh/10**22,4),\"*10**22 per m**3\"\n",
+ "print \"mobility of charge carriers is\",round(mewh,3),\"m**2/Vs\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 9.15, Page number 209"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "hall voltage is 1.1 mV\n",
+ "charge carrier concentration is 1.71 *10**22 per m**3\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "I=3*10**-3; #current(A)\n",
+ "RH=3.66*10**-4; #hall coefficient(m**3/C)\n",
+ "e=1.6*10**-19; #charge(c)\n",
+ "d=2*10**-2;\n",
+ "z=1*10**-3;\n",
+ "B=1; #magnetic field(wb/m**2)\n",
+ "\n",
+ "#Calculation\n",
+ "w=d*z; #width(m**2)\n",
+ "A=w; #area(m**2)\n",
+ "EH=RH*I*B/A; \n",
+ "VH=EH*d*10**3; #hall voltage(mV)\n",
+ "n=1/(RH*e); #charge carrier concentration(per m**3)\n",
+ "\n",
+ "#Result\n",
+ "print \"hall voltage is\",round(VH,1),\"mV\"\n",
+ "print \"charge carrier concentration is\",round(n/10**22,2),\"*10**22 per m**3\""
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/1_AP.png b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/1_AP.png
new file mode 100644
index 00000000..fd8c4d66
--- /dev/null
+++ b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/1_AP.png
Binary files differ
diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/2_AP.png b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/2_AP.png
new file mode 100644
index 00000000..4e931e38
--- /dev/null
+++ b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/2_AP.png
Binary files differ
diff --git a/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/3_AP.png b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/3_AP.png
new file mode 100644
index 00000000..6122ce51
--- /dev/null
+++ b/Applied_Physics_by_K._Vijaya_Kumar,_T._Sreekanth/screenshots/3_AP.png
Binary files differ
diff --git a/Engineering_Mechanics_by_Tayal_A.K./appendix_16.ipynb b/Engineering_Mechanics_by_Tayal_A.K./appendix_16.ipynb
new file mode 100644
index 00000000..cc6b9f04
--- /dev/null
+++ b/Engineering_Mechanics_by_Tayal_A.K./appendix_16.ipynb
@@ -0,0 +1,1008 @@
+{
+ "metadata": {
+ "name": "appendix.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Appendix"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 26.26-1,Page No:638"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "import numpy as np\n",
+ "#Initilization of variables\n",
+ "\n",
+ "P=[-5,2,14] #Point co-ordinates\n",
+ "\n",
+ "#Calculations\n",
+ "r=(P[0]**2+P[1]**2+P[2]**2)**0.5 #Magnitude of the poistion vector\n",
+ "\n",
+ "#Direction cosines\n",
+ "l=P[0]/r \n",
+ "m=P[1]/r\n",
+ "n=P[2]/r\n",
+ "\n",
+ "\n",
+ "#Unit Vector calculations\n",
+ "\n",
+ "r_unit=[l,m,n]\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"The unit vector in the direction of r is \",round(r_unit[0],2),\"i +\",round(r_unit[1],3),\"j +\",round(r_unit[2],3),\"k\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The unit vector in the direction of r is -0.33 i + 0.133 j + 0.933 k\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 26.26-2,Page No:639"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilizatin of variable\n",
+ "F=10 #N\n",
+ "P_1=[2,4,3] \n",
+ "P_2=[1,-5,2]\n",
+ "\n",
+ "#Calculations\n",
+ "d_x=P_2[0]-P_1[0] \n",
+ "d_y=P_2[1]-P_1[1]\n",
+ "d_z=P_2[2]-P_1[2]\n",
+ "d=(d_x**2+d_y**2+d_z**2)**0.5\n",
+ "Fx=(F/d)*d_x #N\n",
+ "Fy=(F/d)*d_y #N\n",
+ "Fz=(F/d)*d_z #N\n",
+ "#Direction cosines\n",
+ "l=Fx/F\n",
+ "m=Fy/F\n",
+ "n=Fz/F\n",
+ "#Angles\n",
+ "theta_x=arccos(l)*(180/pi) #degrees\n",
+ "theta_y=arccos(m)*(180/pi) #degrees\n",
+ "theta_z=arccos(n)*(180/pi) #degrees\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The force in vector notation is \",round(Fx,1),\"i \",round(Fy,2),\"j \",round(Fz,1),\"k\"\n",
+ "print\"Thetax=\",round(theta_x,1),\" degrees\",\"\", \"Thetay=\",round(theta_y,2),\"degrees\",\"\", \"Thetaz=\",round(theta_z,1), \"degrees\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The force in vector notation is -1.1 i + -9.88 j + -1.1 k\n",
+ "Thetax= 96.3 degrees Thetay= 171.07 degrees Thetaz= 96.3 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 26.26-3,Page No:640"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initiliation of variables\n",
+ "T=2500 #N\n",
+ "\n",
+ "#Co-ordinates\n",
+ "Q=[40,0,-30]\n",
+ "P=[0,80,0]\n",
+ "\n",
+ "#Calculations\n",
+ "mag_QP=sqrt((P[0]-Q[0])**2+(P[1]-Q[1])**2+(P[2]-Q[2])**2) #Magnitude\n",
+ "QP=[(P[0]-Q[0]),(P[1]-Q[1]),(P[2]-Q[2])] \n",
+ "F=(T*mag_QP**-1)*QP #N\n",
+ "thetax=arccos(F[0]/T)*(180/pi) #degrees\n",
+ "thetay=arccos(F[1]/T)*(180/pi) #degrees\n",
+ "thetaz=arccos(F[2]/T)*(180/pi) #degrees\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The force vector is \",round(F[0]),\"i +\",round(F[1]),\"j +\",round(F[2]),\"k\"\n",
+ "\n",
+ "#Answer in the textbook is printed as 1600 which is incorrect\n",
+ "print\"The angles are thetax=\",round(thetax,1),\"degrees\",\"\",\"thetay=\",round(thetay),\" degrees\",\"\",\" thetaz=\",round(thetaz,1),\" degrees\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The force vector is -40.0 i + 80.0 j + 30.0 k\n",
+ "The angles are thetax= 180.0 degrees thetay= 90.0 degrees thetaz= 90.0 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 26.26-4,Page No:642"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initilization of variables\n",
+ "\n",
+ "A=[2,-1,1]\n",
+ "B=[1,1,2]\n",
+ "C=[3,-2,4]\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "R=[A[0]+B[0]+C[0],A[1]+B[1]+C[1],A[2]+B[2]+C[2]] #Resultant\n",
+ "R1=[R[0],R[1],R[2]]\n",
+ "mag=sqrt(R[0]**2+R[1]**2+R[2]**2)\n",
+ "\n",
+ "#Unit vector\n",
+ "U=R1/mag \n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The unit vector is \",round(U[0],3),\"i\",round(U[1],3),\"j +\",round(U[2],2),\"k\"\n",
+ "#Answer for k part is incorrect in the textbook\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The unit vector is 0.636 i -0.212 j + 0.74 k\n"
+ ]
+ }
+ ],
+ "prompt_number": 47
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 26.26-5,Page No:642"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initilization of variables\n",
+ "A=[2,-6,-3]\n",
+ "B=[4,3,-1] \n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "AdotB=A[0]*B[0]+A[1]*B[1]+A[2]*B[2] \n",
+ "magA=sqrt(A[0]**2+A[1]**2+A[2]**2) \n",
+ "magB=sqrt(B[0]**2+B[1]**2+B[2]**2)\n",
+ "theta=arccos(AdotB/(magA*magB))*(180/pi) #degrees\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The product of both the vectors is \",round(AdotB)\n",
+ "print\"The angle between them is \",round(theta,1),\"degrees\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The product of both the vectors is -7.0\n",
+ "The angle between them is 101.3 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 26.26-6,Page No:643"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initilization of variables\n",
+ "\n",
+ "A=[4,-3,1]\n",
+ "P=[2,3,-1]\n",
+ "Q=[-2,-4,3]\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "B=[Q[0]-P[0],Q[1]-P[1],Q[2]-P[2]]\n",
+ "AdotB=A[0]*B[0]+A[1]*B[1]+A[2]*B[2]\n",
+ "magB=sqrt(B[0]**2+B[1]**2+B[2]**2)\n",
+ "A_costheta=AdotB/magB\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The value of A_costheta is \",round(A_costheta)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The value of A_costheta is 1.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 26.26-7,Page No:643"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "F=[5,10,-15]\n",
+ "a=[1,0,3]\n",
+ "b=[3,-1,-6]\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "d=[b[0]-a[0],b[1]-a[1],b[2]-a[2]]\n",
+ "\n",
+ "Work_done=(F[0]*d[0])+(F[1]*d[1])+(F[2]*d[2])\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The work done is \",round(Work_done)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The work done is 135.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 26.26-8,Page No:644"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initilization of variables\n",
+ "A=[2,-6,-3]\n",
+ "B=[4,3,-1]\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "AcrossB=[(A[1]*B[2]-B[1]*A[2]),A[2]*B[0]-A[0]*B[2],A[0]*B[1]-A[1]*B[0]]\n",
+ "mag=sqrt(AcrossB[0]**2+AcrossB[1]**2+AcrossB[2]**2)\n",
+ "n=AcrossB/mag\n",
+ "magA=(A[0]**2+A[1]**2+A[2]**2)**0.5\n",
+ "magB=(B[0]**2+B[1]**2+B[2]**2)**0.5\n",
+ "theta=arcsin(mag/(magA*magB))*(180/pi)\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The cross prcoduct of the two vectors is \",AcrossB[0],\"i\",AcrossB[1],\"j\",AcrossB[2],\"k\"\n",
+ "print\"The angle between the two is \",round(theta,1),\"degrees\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The cross prcoduct of the two vectors is 15 i -10 j 30 k\n",
+ "The angle between the two is 78.7 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 26.26-9,Page No:645"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of Variable \n",
+ "# NOTE:Some Notation has been change to avoid conflict\n",
+ "# Points As martices\n",
+ "A=[0,1,2]\n",
+ "B=[1,3,-2]\n",
+ "P=[3,6,4]\n",
+ "a_s=2 # Angular speed in rad/s\n",
+ "\n",
+ "# Calculations\n",
+ "C=[B[0]-A[0],B[1]-A[1],B[2]-A[2]]\n",
+ "magC=(C[0]**2+C[1]**2+C[2]**2)**0.5 # Magnitude of the Vector C \n",
+ "# Unit vector\n",
+ "C_unit=[C[0]/magC,C[1]/magC,C[2]/magC] # Unit vector\n",
+ "# Position Vector\n",
+ "r=[P[0]-A[0],P[1]-A[1],P[2]-A[2]]\n",
+ "# Velocity Vector\n",
+ "# Calculating the cross product as,\n",
+ "V=[(C[1]*r[2]-C[2]*r[1]),(C[2]*r[0]-C[0]*r[2]),(C[0]*r[1]-C[1]*r[0])]\n",
+ "# Vector notation\n",
+ "V_n=[(a_s/magC)*V[0],(a_s/magC)*V[1],(a_s/magC)*V[2]]\n",
+ "# Velocity Magnitude\n",
+ "magV=sqrt(V[0]**2+V[1]**2+V[2]**2)\n",
+ "v=(a_s/magC)*magV\n",
+ "\n",
+ "# Result\n",
+ "\n",
+ "print\"The vector notation of velocity is \",V_n[0],\"i -\",V_n[1],\"j -\",V_n[2],\"k\"\n",
+ "print\"The magnitude of the Velocity Vector is \",round(v,2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The vector notation of velocity is 10.4744587313 i - -6.11010092661 j - -0.436435780472 k\n",
+ "The magnitude of the Velocity Vector is 12.13\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 26.26-10,Page No:647"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialization\n",
+ "\n",
+ "O=[-2,3,5]\n",
+ "F=[4,4,-1]\n",
+ "P=[1,-2,4]\n",
+ "Q=[5,2,3]\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "r1=[P[0]-O[0],P[1]-O[1],P[2]-O[2]]\n",
+ "\n",
+ "moment=[(r1[1]*F[2]-r1[2]*F[1]),(r1[2]*F[0]-r1[0]*F[2]),(r1[0]*F[1]-r1[1]*F[0])] #momentum\n",
+ "\n",
+ "r2=[Q[0]-O[0],Q[1]-O[1],Q[2]-O[2]]\n",
+ "\n",
+ "moment1=[(r2[1]*F[2]-r2[2]*F[1]),(r2[2]*F[0]-r2[0]*F[2]),(r2[0]*F[1]-r2[1]*F[0])]#momentum\n",
+ "\n",
+ "#result\n",
+ "\n",
+ "print\"The moment about point O is \",round(moment[0],3),\"i\",round(moment[1],3),\"j +\",round(moment[2],3),\"k\"\n",
+ "print\"The moment about point O is \",round(moment1[0],3),\"i\",round(moment1[1],3),\"j +\",round(moment1[2],3),\"k\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The moment about point O is 9.0 i -1.0 j + 32.0 k\n",
+ "The moment about point O is 9.0 i -1.0 j + 32.0 k\n"
+ ]
+ }
+ ],
+ "prompt_number": 62
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 26.26-11,Page No:647"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialization\n",
+ "\n",
+ "F=[3,2,-4]\n",
+ "P=[1,-1,2]\n",
+ "O=[2,-1,3]\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "r=[P[0]-O[0],P[1]-O[1],P[2]-O[2]]\n",
+ "\n",
+ "M=[(r[1]*F[2]-r[2]*F[1]),(r[2]*F[0]-r[0]*F[2]),(r[0]*F[1]-r[1]*F[0])]\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The moment of force about point O is \",round(M[0]),\"i\",round(M[1]),\"j +\",round(M[2]),\"k\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The moment of force about point O is 2.0 i -7.0 j + -2.0 k\n"
+ ]
+ }
+ ],
+ "prompt_number": 64
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 26.26-12,Page No:648"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initiaization\n",
+ "\n",
+ "A=[4,-1,7]\n",
+ "O=[1,-3,2]\n",
+ "V=[9,6,-2]\n",
+ "\n",
+ "#Clalculation\n",
+ "\n",
+ "mag_v=sqrt(V[0]**2+V[1]**2+V[2]**2)\n",
+ "\n",
+ "F=[(22/mag_v)*V[0],(22/mag_v)*V[1],(22/mag_v)*V[2]]\n",
+ "\n",
+ "r=[A[0]-O[0],A[1]-O[1],A[2]-O[2]]\n",
+ "\n",
+ "M=[r[1]*F[2]-F[1]*r[2],r[0]*F[2]-r[2]*F[0],r[0]*F[1]-r[1]*F[0]]\n",
+ "\n",
+ "#result\n",
+ "\n",
+ "print\"The moment is\",round(M[0]),\"i\",\"+\",round(M[1]),\"j\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The moment is -68.0 i + -102.0 j\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 26.26-13,Page No:648"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialization\n",
+ "\n",
+ "F=[50,-80,30]\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#unit vector in u direction\n",
+ "u=[cos(30*(pi/180)),cos(60*(pi/180)),cos(90*(pi/180))]\n",
+ "#unit vector in v direction\n",
+ "v=[1*cos(120*(pi/180)),1*cos(30*(pi/180)),1*cos(90*(pi/180))]\n",
+ "#unit vector in w direction\n",
+ "w=[1*cos(90*(pi/180)),1*cos(90*(pi/180)),1*cos(0*(pi/180))]\n",
+ "\n",
+ "#component of force F\n",
+ "\n",
+ "U=F[0]*u[0]+F[1]*u[1]+F[2]*u[2] #component force along u\n",
+ "V=F[0]*v[0]+F[1]*v[1]+F[2]*v[2] #component force along v\n",
+ "W=F[0]*w[0]+F[1]*w[1]+F[2]*w[2] #component force along w\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"the component force along u is \",round(U,1)\n",
+ "print\"the component force along v is \",round(V,2)\n",
+ "print\"the component force along w is \",round(W,1)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the component force along u is 3.3\n",
+ "the component force along v is -94.28\n",
+ "the component force along w is 30.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 90
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 26.26-14,Page No:649"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialization\n",
+ "\n",
+ "\n",
+ "F_v=100 #N\n",
+ "A=[0,0,0]\n",
+ "B=[0.5,0,0]\n",
+ "C=[0.5,0,1]\n",
+ "D=[0,0,1]\n",
+ "E=[0,0.5,0]\n",
+ "F=[0.5,0.5,0]\n",
+ "G=[0.5,0.5,1]\n",
+ "H=[0,0.5,1]\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "F_vec=F_v/sqrt((F[0]-C[0])**2+(F[1]-C[1])**2+(F[2]-C[2])**2)\n",
+ "F_x=(F[0]-C[0])*F_vec\n",
+ "F_y=(F[1]-C[1])*F_vec\n",
+ "F_z=(F[2]-C[2])*F_vec\n",
+ "\n",
+ "F=[F_x,F_y,F_z]\n",
+ "\n",
+ "#moment about point E\n",
+ "\n",
+ "#taking position vector r directed from E on force F\n",
+ "r_ec=[C[0]-E[0],C[1]-E[1],C[2]-E[2]]\n",
+ "\n",
+ "#M_e=r_ec*F\n",
+ "\n",
+ "M_e=[(r_ec[1]*F[2]-r_ec[2]*F[1]),(r_ec[0]*F[2]-r_ec[2]*F[0]),(r_ec[0]*F[1]-r_ec[1]*F[0])]\n",
+ "\n",
+ "#unit vector in direction AE is n_ae\n",
+ "\n",
+ "n_ae=[0,1,0]\n",
+ "\n",
+ "#moment about axis AE\n",
+ "#M_ae=M_e*n_ae\n",
+ "\n",
+ "M_ae=[M_e[0]*n_ae[0],M_e[1]*n_ae[1],M_e[2]*n_ae[2]] \n",
+ "\n",
+ "#result\n",
+ "\n",
+ "print\"moment of force about E is \",round(M_e[0]),\"i\",round(M_e[1]),\"j +\",round(M_e[2]),\"k\" #answer given in book is wrong \n",
+ "print\"moment of force about axis AE is \",round(M_ae[0]),\"i\",round(M_ae[1]),\"j +\",round(M_ae[2]),\"k\" #answer given in book is wrong "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "moment of force about E is 0.0 i -45.0 j + 22.0 k\n",
+ "moment of force about axis AE is 0.0 i -45.0 j + 0.0 k\n"
+ ]
+ }
+ ],
+ "prompt_number": 103
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 26.26-15,Page No:652"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialization\n",
+ "F_1=5 #kN\n",
+ "F_2=7.5 #kN\n",
+ "F_3=10 #kN\n",
+ "A=[0,0,0]\n",
+ "E=[0,1,0]\n",
+ "D=[0,0,2]\n",
+ "F=[3,1,0]\n",
+ "G=[3,1,2]\n",
+ "H=[0,1,2]\n",
+ "#calculation\n",
+ "\n",
+ "F1=[F_1*3**-1*(F[0]-E[0]),F_1/3*(F[1]-E[1]),F_1/3*(F[2]-E[2])] #5/sqrt(9)=5/3\n",
+ "F2=[F_2*(H[0]),F_2*-H[1],F_2*0] #force is only acting in the y direction\n",
+ "F3=[F_3/3.6*(G[0]-E[0]),F_3/3.6*(G[1]-E[1]),F_3/3.6*(G[2]-E[2])] #10/sqrt(13)=10/3.6\n",
+ "\n",
+ "#resultant force R\n",
+ "\n",
+ "#R=F1+F2+F3\n",
+ "R=[F1[0]+F2[0]+F3[0],F1[1]+F2[1]+F3[1],F1[2]+F2[2]+F3[2]]\n",
+ "\n",
+ "#resultant force along axis AE\n",
+ "\n",
+ "r_ae=[E[0]-A[0],E[1]-A[1],E[2]-A[2]]\n",
+ "\n",
+ "r_ad=[D[0]-A[0],D[1]-A[1],D[2]-A[2]]\n",
+ "\n",
+ "#moments of force about A\n",
+ "\n",
+ "#M_ra=r_ae*F1+r_ae*F2+r_ae*F3\n",
+ "\n",
+ "M_ra1=[(r_ae[1]*F1[2]-r_ae[2]*F1[1]),(r_ae[0]*F1[2]-r_ae[2]*F1[0]),(r_ae[0]*F1[1]-r_ae[1]*F1[0])] #r_ae*F1\n",
+ "M_ra2=[(r_ad[1]*F2[2]-r_ad[2]*F2[1]),(r_ad[0]*F2[2]-r_ad[2]*F2[0]),(r_ad[0]*F2[1]-r_ad[1]*F2[0])] #r_ae*F2\n",
+ "M_ra3=[(r_ae[1]*F3[2]-r_ae[2]*F3[1]),(r_ae[0]*F3[2]-r_ae[2]*F3[0]),(r_ae[0]*F3[1]-r_ae[1]*F3[0])] #r_ae*F3\n",
+ "\n",
+ "M_ra=[M_ra1[0]+M_ra2[0]+M_ra3[0],M_ra1[1]+M_ra2[1]+M_ra3[1],M_ra1[2]+M_ra2[2]+M_ra3[2]]\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"resultant force R\",round(R[0],2),\"i\",round(R[1],2),\"j +\",round(R[2],2),\"k\"\n",
+ "print\"moments of all forces about A\",round(M_ra[0],3),\"i +\",round(M_ra[1]),\"j\",round(M_ra[2],3),\"k\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "resultant force R 13.33 i -7.5 j + 5.56 k\n",
+ "moments of all forces about A 20.556 i + 0.0 j -13.333 k\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 26.26-16,Page No:654"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialization\n",
+ "\n",
+ "F=20 #kN\n",
+ "M_x=76 #kNm\n",
+ "M_y=82 #kNm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#Force shifted to P by distance x\n",
+ "x=M_x*F**-1\n",
+ "\n",
+ "#Force shifted to P by distance z\n",
+ "z=M_y*F**-1\n",
+ "\n",
+ "#result\n",
+ "\n",
+ "print\"the force shifted to P by distance x\",round(x,2),\"m\"\n",
+ "print\"the force shited to P by distance y\",round(z,2),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the force shifted to P by distance x 3.8 m\n",
+ "the force shited to P by distance y 4.1 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 109
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 26.26-17,Page No:655"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialization\n",
+ "\n",
+ "A=[0,4.5,0]\n",
+ "B=[2.8,0,0]\n",
+ "C=[0,0,-2.4]\n",
+ "D=[-2.6,0,1.8]\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "#tension in cable AB\n",
+ "x=(B[0]**2+A[1]**2)**0.5\n",
+ "T_ab=[(B[0]-A[0])/x,(B[1]-A[1])/x,(B[2]-A[2])/x]\n",
+ "\n",
+ "#tension in cable AC\n",
+ "y=(C[2]**2+A[1]**2)**0.5\n",
+ "T_ac=[(C[0]-A[0])/y,(C[1]-A[1])/y,(C[2]-A[2])/y]\n",
+ "\n",
+ "#tension in cable AD\n",
+ "z=(D[0]**2+D[2]**2+A[1]**2)**0.5\n",
+ "T_ad=[[(D[0]-A[0])/z,(D[1]-A[1])/z,(D[2]-A[2])/z]]\n",
+ "\n",
+ "#weight acting vertically downwards \n",
+ "W=[0*5000,1*5000,0*5000]\n",
+ "\n",
+ "#Solving using equations of equlibrium\n",
+ "import math\n",
+ "import numpy as np\n",
+ "A=np.array([[0.528,-0.473,0],[0,-0.327,0.47],[0.85,0.818,0.88]])\n",
+ "B=np.array([0,0,5000])\n",
+ "C=np.linalg.solve(A,B)\n",
+ "\n",
+ "#result\n",
+ "print \"T_AB =\",round(C[0],1),\"N\",\"T_AD =\",round(C[1]),\"N\",\"T_AC\",round(C[2],1),\"N\" \n",
+ "#answer varies due to decimal accuracy in python\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "T_AB = 2043.7 N T_AD = 2281.0 N T_AC 1587.2 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 26.26-18,Page No:656"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "P=5 # kN\n",
+ "Q=3 # kN\n",
+ "C=5 # kNm # couple\n",
+ "# ref fig.20 # Notations have been assumed\n",
+ "z1=1.5 # m\n",
+ "z2=0.625 # m\n",
+ "z3=0.5 # m\n",
+ "x1=3.5 # m\n",
+ "x2=0.625 # m\n",
+ "# Calculations\n",
+ "# sum M_x=0\n",
+ "R_A=((P*z2)+(Q*z3)+C)*z1**-1 # kN\n",
+ "# M_z=0\n",
+ "R_C=((Q*x1)+(P*x2))*x1**-1 # kN\n",
+ "# sum F_y=0\n",
+ "R_B=P+Q-R_A-R_C # kN\n",
+ "# Results\n",
+ "\n",
+ "print\"The reactions are: \",round(R_A,3),\"kN\",round(R_C,3),\"kN\",round(R_B,2),\"kN\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The reactions are: 6.417 kN 3.893 kN -2.31 kN\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 26.26-19,Page No:657"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "# Initilization of variables\n",
+ "F=2 # kN\n",
+ "W=1 # kN\n",
+ "# Co-ordinates as matrices\n",
+ "A=[0,0,0]\n",
+ "C=[0,0,1.2]\n",
+ "B=[0,0,2.5]\n",
+ "D=[-1,1,0]\n",
+ "E=[1,1,0]\n",
+ "F=[0,0,1]\n",
+ "G=[0,0,2]\n",
+ "# Force vector\n",
+ "f=[0,-2,0]\n",
+ "# Weight vector\n",
+ "w=[0,-1,0]\n",
+ "# Calculations\n",
+ "# we have 5 unknowns: A_x,A_y,A_z,T_FE & T_GD\n",
+ "# we define and solve eqn's 1,2,3,4&5 using matrix as,\n",
+ "P=np.array([[1,0,0,0.58,-0.41],[0,1,0,0.58,0.41],[0,0,1,-0.58,-0.82],[0,0,0,0.58,0.82],[0,0,0,0.58,-0.82]])\n",
+ "Q=np.array([0,3,0,6.25,0])\n",
+ "X=np.linalg.solve(P,Q)\n",
+ "\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The components of reaction at A are: A_x=\",round(X[0],2),\" kN \",\" A_y=\",round(X[1],2),\" kN \",\"and A_z=\",round(X[2],2),\" kN\"\n",
+ "print\"The tensions in the cable are: T_FE=\",round(X[3],2),\" kN \",\"and T_GD=\",round(X[4],1), \"kN \"\n",
+ "# The solution in the textbook is incorrect and yeilds singularity in matrix calculation.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The components of reaction at A are: A_x= -1.56 kN A_y= -1.69 kN and A_z= 6.25 kN\n",
+ "The tensions in the cable are: T_FE= 5.39 kN and T_GD= 3.8 kN \n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter02_17.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter02_17.ipynb
new file mode 100644
index 00000000..d55d1267
--- /dev/null
+++ b/Engineering_Mechanics_by_Tayal_A.K./chapter02_17.ipynb
@@ -0,0 +1,794 @@
+{
+ "metadata": {
+ "name": "chapter02.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2:Concurrent Forces in A Plane"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2-1, Page No:10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "P=50 #N\n",
+ "Q=100 #N\n",
+ "beta=150 #degree # angle between P & the horizontal\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "R=(P**2+Q**2-(2*P*Q*cos(beta*(pi/180))))**0.5 # using the Trignometric solution\n",
+ "Alpha=(arcsin(((sin(beta*(pi/180))*Q)/R)))*(180/pi)+15 #Angle in degrees\n",
+ "\n",
+ "#Result\n",
+ "print \"The magnitude of resultant is\",round(R,2),\"N\"\n",
+ "print \"The direction of resultant is\",round(Alpha,2),\"degrees\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The magnitude of resultant is 145.47 N\n",
+ "The direction of resultant is 35.1 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2-2,Page No:16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "P=50 #N\n",
+ "Q=100 #N\n",
+ "beta=15 #degree # angle between P& the horizontal\n",
+ "theta=45 #degree # angle between the resultant (R) & the horizontal\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "Rx=P*cos(beta*(pi/180))+Q*cos(theta*(pi/180)) #N\n",
+ "Ry=P*sin(beta*(pi/180))+Q*sin(theta*(pi/180)) #N\n",
+ "R=((Rx**2)+(Ry**2))**0.5 #N\n",
+ "alpha=arctan(Ry/Rx)*(180/pi) #degree\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"The magnitude of the resultant is \",round(R,2),\"N\"\n",
+ "print\"The ange of the resultant with x-axis is\",round(alpha,2),\"degrees\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The magnitude of the resultant is 145.47 N\n",
+ "The ange of the resultant with x-axis is 35.1 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2-4,Page No:19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "Tac=3.5 #kN\n",
+ "Tbc=3.5 #kN\n",
+ "alpha=20 #degree #angle made by Tac with -ve X axis\n",
+ "beta=50 #degree #angle made by Tbc with +ve X axis\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "theta=(arctan(((Tac*sin(alpha*(pi/180)))+(Tbc*sin(beta*(pi/180))))/((Tac*cos(alpha*(pi/180)))-(Tbc*cos(beta*(pi/180))))))*(180/pi) #degree\n",
+ "P=Tac*(cos(alpha*(pi/180))-cos(beta*(pi/180)))/(cos(theta*(pi/180))) #kN # from eq'n 1\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"The maximum force that can be applied is \",round(P,1),\"kN\"\n",
+ "print\"The direction of applied force is \",round(theta,2),\"degrees\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The maximum force that can be applied is 4.0 kN\n",
+ "The direction of applied force is 75.0 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2-8,Page No:25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "lAB=0.4 #m\n",
+ "lBC=0.3 #m\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "alpha=arctan(lAB/lBC)*(180/pi) #degree\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"The angle which the force should make with the horizontal to keep the edge AB of the body vertical is \",round(alpha,2),\"degrees\" #here alpha=theta"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The angle which the force should make with the horizontal to keep the edge AB of the body vertical is 53.13 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2-9,Page No:28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "F=1000 #N\n",
+ "lAB=0.5 #m\n",
+ "lDC=0.25 #m #length of the perpendicular drawn from point C to AB\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "lAC=((0.3)**2+(0.25)**2)**0.5 #m\n",
+ "lBC=((0.20)**2+(0.25)**2)**0.5 #m\n",
+ "Sac=(lAC*F)*(lAB)**-1 #N #by law of concurrent forces\n",
+ "Sbc=(lBC*F)/(lAB) #N #by law of concurrent forces\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"The axial force in the bar AC(by aw of concurrent forces) is \",round(Sac),\"N\" #the answer in textbook is wrong by 1 N \n",
+ "print\"The axial force in the bar BC(by aw of concurrent forces) is \",round(Sbc),\"N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The axial force in the bar AC(by aw of concurrent forces) is 781.0 N\n",
+ "The axial force in the bar BC(by aw of concurrent forces) is 640.0 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2-10,Page No:30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#Initilization of variables\n",
+ "\n",
+ "F3=500 #N\n",
+ "alpha=60 #degree #angle made by F3 with F2\n",
+ "beta=40 #degree #angle made by F1 with F3\n",
+ "theta=80 #degree #angle made by F1 with F2\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "# Solving by using law of sines\n",
+ "\n",
+ "F1=(F3*sin(alpha*(pi/180))/sin(theta*(pi/180))) #N #by law of sines\n",
+ "F2=(F3*sin(beta*(pi/180))/sin(theta*(pi/180))) #N #by law of sines\n",
+ "\n",
+ "#Resuts\n",
+ "\n",
+ "print\"The force F1 is \",round(F1,1),\"N\"\n",
+ "print\"The force F2 is \",round(F2,1),\"N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The force F1 is 439.7 N\n",
+ "The force F2 is 326.4 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2-11,Page No:31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "P=5000 #N\n",
+ "lAB=5 #m\n",
+ "lOB=1.443 # m\n",
+ "alpha=30 #degree #angle made by force P with the beam\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "theta=arctan(lOB/lAB)*(180/pi) #degree # eq'n 1\n",
+ "Xa=(P*cos(alpha*(pi/180))) #N #using eq'n 4\n",
+ "Ya=Xa*tan(theta*(pi/180)) #N #from eq'n 3 & 4\n",
+ "Rb=(P*sin(alpha*(pi/180)))-Ya # N # substuting value of Ya in eq'n 5\n",
+ "Ra=((Xa**2)+(Ya**2))**0.5 #N\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"The reaction at support A is \",round(Ra,1),\"N\"\n",
+ "print\"The reaction at support B is \",round(Rb),\"N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The reaction at support A is 4506.8 N\n",
+ "The reaction at support B is 1250.0 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 46
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2-12,Page No:32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "W=1000 #N\n",
+ "OD=0.4 #m\n",
+ "AD=0.3 #m\n",
+ "AO=0.5 #m #AO=sqrt((0.4)^2+(0.3)^2)\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "Ra=W*AO/OD #N\n",
+ "Rc=W*AD/OD #N\n",
+ "alpha=arctan(OD/AD)*(180/pi) #degree\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"The reaction at support A is \",round(Ra),\"N\" # answer in textbook is wrong by 50 N\n",
+ "print\"The reaction at support B is \",round(Rc),\"N\"\n",
+ "print\"The angle that Rc makes with horizontal \",round(alpha,1),\"degrees\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The reaction at support A is 1250.0 N\n",
+ "The reaction at support B is 750.0 N\n",
+ "The angle that Rc makes with horizontal 53.1 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2-13,Page No:33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "W=2500 #N #This load acts at point B and C.\n",
+ "alpha=30 #degree # angle made by T1 with +ve y-axis & T2 with +ve x-axis\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "T2=W-(((cos(alpha*(pi/180)))**2/(sin(alpha*(pi/180))))-(sin(alpha*(pi/180)))) # N # substuting eq'n 1 in 2\n",
+ "T1=(T2*cos(30*(pi/180)))/(sin(30*(pi/180)))#N # using eq'n 1\n",
+ "T3=T2 #N # By equilibrium eq'n at point C(sumFx=0)\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"Tension in portion AB is \",round(T1),\"N\" #due to decimal variance the answer varies by 2.0 N\n",
+ "print\"Tension in portion BC is \",round(T2),\"N\" #due to decimal variance the answer varies by 1.0 N\n",
+ "print\"Tension in portion CD is \",round(T3),\"N\" #due to decimal variance the answer varies by 1.0 N"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Tension in portion AB is 4328.0 N\n",
+ "Tension in portion BC is 2499.0 N\n",
+ "Tension in portion CD is 2499.0 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2-15,Page No:35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "d=0.6 #m #diameter of the wheel\n",
+ "r=0.3 #m #radius of the wheel\n",
+ "W=1000 #N #weight of the wheel\n",
+ "h=0.15 #m #height of rectangular block\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "theta=arctan(((h)**0.5)/((d-h)**0.5))\n",
+ "P=(W*tan(theta)) #N # dividing eq'n 1 & 2\n",
+ "\n",
+ "#Resuts\n",
+ "\n",
+ "print\"The force P so that the wheel is just to roll over the block is \",round(P),\"N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The force P so that the wheel is just to roll over the block is 577.0 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 56
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2-16,Page No:36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "Soa=1000 #N (tension)\n",
+ "alpha=45 #degree #where alpha=(360/8)\n",
+ "theta=67.5 #degree #angle made by bar AO with AB &AH\n",
+ "\n",
+ "#Calcultions\n",
+ "\n",
+ "Sab=Soa*(sin(theta*(pi/180))/sin(alpha*(pi/180))) # N # Using law of sines\n",
+ "Sah=Sab #N\n",
+ "Sob=(Sab*sin((180-2*(theta))*(pi/180)))/sin(theta*(pi/180)) #N\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"The axial force in the bar AB is \",round(Sab,1),\"N\" #Compression\n",
+ "print\"The axial force in the bar OB is \",round(Sob),\"N\" #Tension"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The axial force in the bar AB is 1306.6 N\n",
+ "The axial force in the bar OB is 1000.0 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 60
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2-17,Page No:37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "W=500 #N #weight of cylinder\n",
+ "alpha=25 #degree #angle made by OA with horizontal\n",
+ "beta=65 #degree #angle made by OB with horizontal\n",
+ "theta=90 #degree # theta=(alpha+beta)\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "Ra=(W*sin(beta*(pi/180)))/sin(theta*(pi/180)) #N #from equilibrium eq'n\n",
+ "Rb=(W*sin(alpha*(pi/180)))/sin(theta*(pi/180)) #N #from equilibrium eqn's\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"The reaction at A is \",round(Ra,1),\"N\"\n",
+ "print\"The reaction at B is \",round(Rb,1),\"N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The reaction at A is 453.2 N\n",
+ "The reaction at B is 211.3 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 62
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2-18,Page No:38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "Wa=1000 #N #weight of sphere A\n",
+ "Wb=400 #N #weight of sphere B\n",
+ "Ra=0.09 #m #radius of sphere A\n",
+ "Rb=0.05 #m #radius of sphere B\n",
+ "theta=33.86 #degree #angle made by Rq with Wb\n",
+ "alpha=60 #degree #angle made by Rl with horizontal\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "Rq=Wb/cos(theta*(pi/180)) #N #using sum Fy=0 for sphere B\n",
+ "Rp=Rq*sin(theta*(pi/180)) #N #using sum Fx=0 for sphere B\n",
+ "Rl=(Rq*sin(theta*(pi/180)))/sin(alpha*(pi/180)) #N #using sum Fx=0 for sphere A\n",
+ "Rn=((Wa)+(Rq*cos(theta*(pi/180)))-(Rl*cos(alpha*(pi/180)))) #N\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"The reaction at point P is \",round(Rp,1),\"N\"\n",
+ "print\"The reaction at point L is \",round(Rl),\"N\"\n",
+ "print\"The reaction at point N is \",round(Rn,1),\"N\" # the answer in textbook is wrong by 3.2 N"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The reaction at point P is 268.4 N\n",
+ "The reaction at point L is 310.0 N\n",
+ "The reaction at point N is 1245.0 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 65
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2-19,Page No:39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "P=50 #N\n",
+ "Q=100 #N\n",
+ "alpha=30 #degree #angle made by Rq with +ve Y-axis\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "theta_r=arctan((P*((cos(alpha*(pi/180)))/(sin(alpha*(pi/180))))-Q*tan(alpha*(pi/180)))/(P+Q)) #radians\n",
+ "theta=theta_r*(180/pi)\n",
+ "T=Q/(cos(theta*(pi/180))*(cos(alpha*(pi/180)))/(sin(alpha*(pi/180)))-sin(theta*(pi/180))) #N\n",
+ "\n",
+ "#Results\n",
+ "print\"The tension in the string is \",round(T,1),\"N\"\n",
+ "print\"The angle wich the string makes with the horizontal when the system is in equilibrium is \",round(theta,1),\"degrees\" \n",
+ "#Note:The decimal accuracy in python causes discrepancy in answers"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The tension in the string is 66.1 N\n",
+ "The angle wich the string makes with the horizontal when the system is in equilibrium is 10.9 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2-20,Page No:41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "theta1=50.5 #degree #is the angle made between BC & and BE\n",
+ "theta2=36.87 #degree #is te angle ade between BA &BE \n",
+ "g=9.81 #m/s^2\n",
+ "Wa=15*g #N\n",
+ "Wb=40*g #N\n",
+ "Wc=20*g #N\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "R2=Wc/(sin(theta1*(pi/180))) #N #from F.B.D of cylinder C(sum Fy=0)\n",
+ "R4=(Wb+R2*sin(theta1*(pi/180)))/sin(theta2*(pi/180)) #N #from F.B.D of cylinder B(sum Fy=0)\n",
+ "R6=R4*cos(theta2*(pi/180)) #N #from F.B.D of cylinder A(sum Fx=0)\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"The reaction between the cylinder A and the wall of the channel is \",round(R6,2),\"N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The reaction between the cylinder A and the wall of the channel is 784.8 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 70
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2-21,Page No:50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilazation of variables\n",
+ "\n",
+ "F=1000 #N\n",
+ "theta=30 #degree #angle made by the force with the beam AB\n",
+ "Lab=3 #m\n",
+ "Lae=2 #m\n",
+ "Lce=1 #m\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "Re=(F*Lab*sin(theta*(pi/180)))/Lae #N #Taking moment at A\n",
+ "Rd=(Re*Lce)/(Lab*sin(theta*(pi/180))) #N #Taking moment about C\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"The reaction at D due to force of 1000 N acting at B is \",round(Rd,2),\"N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The reaction at D due to force of 1000 N acting at B is 500.0 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 71
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2-23,Page No:51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "W=1000 #N\n",
+ "r=0.30 #m #radius of the wheel\n",
+ "h=0.15 #m #height of the obstacle\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "theta=arcsin(1)*(180/pi) #degree #P is mini when sin(theta)=1 from eq'n of P\n",
+ "Pmini=(W*((2*r*h)-(h**2))**0.5)/(r*sin(theta*(pi/180))) #N\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"The least force required to just turn the wheel over the block is \",round(Pmini),\"N\"\n",
+ "print\"The angle wich should be made by Pmini with AC is \",round(theta,2),\"degrees\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The least force required to just turn the wheel over the block is 866.0 N\n",
+ "The angle wich should be made by Pmini with AC is 90.0 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter03_16.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter03_16.ipynb
new file mode 100644
index 00000000..cdcc5a68
--- /dev/null
+++ b/Engineering_Mechanics_by_Tayal_A.K./chapter03_16.ipynb
@@ -0,0 +1,598 @@
+{
+ "metadata": {
+ "name": "chapter3.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3 : Parallel Forces In A Plane"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3-1,Page No:64"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "W=1000 #N\n",
+ "Lab=1 #m\n",
+ "Lac=0.6 #m\n",
+ "theta=60 #degree #angle made by the beam with the horizontal\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "Q=(W*Lac*cos(theta*(pi/180)))/(Lab*cos(theta*(pi/180))) #N # from eq'n 2\n",
+ "P=W-Q #N # from eq'n 1\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"The load taken by man P is \",round(P),\"N\"\n",
+ "print\"The load taken by man Q is \",round(Q),\"N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The load taken by man P is 400.0 N\n",
+ "The load taken by man Q is 600.0 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3-2,Page No:64"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "F=1000 #N\n",
+ "Lab=1 #m\n",
+ "Lbc=0.25 #m\n",
+ "Lac=1.25 #m\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "Rb=(F*Lac)/Lab #N # from eq'n 2\n",
+ "Ra=Rb-F #N # fom eq'n 1\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"The reaction (downwards)at support A is \",round(Ra),\"N\"\n",
+ "print\"The reaction (upwards)at support B is \",round(Rb),\"N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The reaction (downwards)at support A is 250.0 N\n",
+ "The reaction (upwards)at support B is 1250.0 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3-3,Page No:65"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Inilitization of variables\n",
+ "\n",
+ "Lab=12 #m\n",
+ "Mc=40 #kN-m \n",
+ "Md=10 #kN-m\n",
+ "Me=20 #kN-m\n",
+ "Fe=20 #kN #force acting at point E\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "Xa=-(Fe) #kN #take sum Fx=0\n",
+ "a=Me+Md-Mc #N #take moment at A\n",
+ "Rb=a*(Lab)**-1\n",
+ "Ya=-Rb #N #take sum Fy=0\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"The vertical reaction (upwards) at A is \",round(Ya,3),\"kN\"\n",
+ "print\"The horizontal reaction (towards A) is \",round(Xa,2),\"kN\"\n",
+ "print\"The reaction (downwards) at B is \",round(Rb,3),\"kN\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The vertical reaction (upwards) at A is 0.833 kN\n",
+ "The horizontal reaction (towards A) is -20.0 kN\n",
+ "The reaction (downwards) at B is -0.833 kN\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3-5,Page No:66"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "W=1000 #N\n",
+ "Lad=7.5 #m\n",
+ "Lae=1.5 #m\n",
+ "La1=3.75 #m #distance of 1st 1000N load from pt A\n",
+ "La2=5 #m #distance of 2nd 1000N load from pt A\n",
+ "La3=6 #m # distance of 3rd 1000N load from pt A\n",
+ "\n",
+ "# Calculations (part1)\n",
+ "\n",
+ "#using matrix to solve the given eqn's 1 & 2\n",
+ "\n",
+ "A=np.array([[1 ,-2.5],[3.5 ,-5]])\n",
+ "B=np.array([1000,7250])\n",
+ "C=np.linalg.solve(A,B)\n",
+ "\n",
+ "#Resuts\n",
+ "\n",
+ "print\"The reaction at F i.e Rf is \",round(C[0]),\"N\"\n",
+ "print\"The reaction at D i.e Rd is \",round(C[1]),\"N\"\n",
+ "\n",
+ "#Calculations (part 2)\n",
+ "#Consider combined F.B.D of beams AB,BC &CD. Take moment at A\n",
+ "\n",
+ "Re=((W*La1)+(W*La2)+(W*La3)+(C[1]*Lad)-(C[0]*La3))/Lae #N\n",
+ "Ra=C[1]-Re-C[0]+(3*W) #N #Taking sum of forces in Y direction\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"The reaction at pt E i.e Re is \",round(Re),\"N\"\n",
+ "print\"The reaction at pt A i.e Ra is \",round(Ra),\"N\" #acting vertically downwards"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The reaction at F i.e Rf is 3500.0 N\n",
+ "The reaction at D i.e Rd is 1000.0 N\n",
+ "The reaction at pt E i.e Re is 833.0 N\n",
+ "The reaction at pt A i.e Ra is -333.0 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3-7,Page No:69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "Ws=2 #kN #weight of scooter\n",
+ "Wd=0.5 #kN #weight of driver\n",
+ "Lab=1 #m\n",
+ "Led=0.8 #m\n",
+ "Leg=0.1 #m\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "Rc=((2*Leg)+(Wd*Led))/Lab #kN #take moment at E\n",
+ "Ra=(2+Wd-Rc)/2 #kN # as Ra=Rb,(Ra+Rb=2*Ra)\n",
+ "Rb=Ra # kN\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"The reaction at wheel A is \",round(Ra,2),\"kN\"\n",
+ "print\"The reaction at wheel B is \",round(Rb,2),\"kN\"\n",
+ "print\"The reaction at wheel C is \",round(Rc,2),\"kN\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The reaction at wheel A is 0.95 kN\n",
+ "The reaction at wheel B is 0.95 kN\n",
+ "The reaction at wheel C is 0.6 kN\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3-8,Page No:69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "W1=15 #N #up\n",
+ "W2=60 #N #down\n",
+ "W3=10 #N #up\n",
+ "W4=25 #N #down\n",
+ "Lab=1.2 #m\n",
+ "Lac=0.4 #m\n",
+ "Lcd=0.3 #m\n",
+ "Ldb=0.5 #m\n",
+ "Lad=0.7 #m\n",
+ "Leb=0.417 #m #Leb=Lab-x\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#(a) A single force\n",
+ "\n",
+ "Ry=W1-W2+W3-W4 #N #take sum Fy=0\n",
+ "x=((-W2*Lac)+(W3*Lad)-(W4*Lab))/(Ry) #m\n",
+ "\n",
+ "#(b) Single force moment at A\n",
+ "\n",
+ "Ma=(Ry*x) #N-m\n",
+ "\n",
+ "# Single force moment at B\n",
+ "\n",
+ "Mb=W2*Leb #N-m\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"The reaction for single force (a) is \",round(Ry,2),\"N\"\n",
+ "print\"The distance of Ry from A is \",round(x,3),\"m\"\n",
+ "print\"The moment at A is \",round(Ma,2),\"N-m\"\n",
+ "print\"The moment at B is \",round(Mb,2),\"N-m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The reaction for single force (a) is -60.0 N\n",
+ "The distance of Ry from A is 0.783 m\n",
+ "The moment at A is -47.0 N-m\n",
+ "The moment at B is 25.02 N-m\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3-9,Page No:71"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "Ra=5000 #N\n",
+ "Ma=10000 #Nm\n",
+ "alpha=60 #degree #angle made by T1 with the pole\n",
+ "beta=45 #degree #angle made by T2 with the pole\n",
+ "theta=30 #degree #angle made by T3 with the pole\n",
+ "Lab=6 #m\n",
+ "Lac=1.5 #m\n",
+ "Lcb=4.5 #m\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "T3=Ma/(4.5*sin(theta*(pi/180))) #N #take moment at B\n",
+ "\n",
+ "# Now we use matrix to solve eqn's 1 & 2 simultaneously,\n",
+ "\n",
+ "A=np.array([[-0.707, 0.866],[0.707, 0.5]])\n",
+ "B=np.array([2222.2,8848.8])\n",
+ "C=np.linalg.solve(A,B)\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"Tension in wire 1 i.e T1 is \",round(C[1],1),\"N\" #answer may vary due to decimal variance\n",
+ "print\"Tension in wire 2 i.e T2 is \",round(C[0],1),\"N\"\n",
+ "print\"Tension in wire 3 i.e T3 is \",round(T3,1),\"N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Tension in wire 1 i.e T1 is 8104.7 N\n",
+ "Tension in wire 2 i.e T2 is 6784.2 N\n",
+ "Tension in wire 3 i.e T3 is 4444.4 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3-10,Page No:76"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "w=2000 #N/m\n",
+ "Lab=3 #m\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "W=w*Lab/2 #N# Area under the curve\n",
+ "Lac=(0.6666)*Lab #m#centroid of the triangular load system\n",
+ "Rb=(W*Lac)/Lab #N #sum of moment at A\n",
+ "Ra=W-Rb #N\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"The resultant of the distibuted load lies at \",round(Lac),\"m\"\n",
+ "print\"The reaction at support A is \",round(Ra),\"N\"\n",
+ "print\"The reaction at support B is \",round(Rb),\"N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resultant of the distibuted load lies at 2.0 m\n",
+ "The reaction at support A is 1000.0 N\n",
+ "The reaction at support B is 2000.0 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3-12,Page No:78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "w1=1.5 #kN/m # intensity of varying load at the starting point of the beam\n",
+ "w2=4.5 #kN/m # intensity of varying load at the end of the beam\n",
+ "l=6 #m # ength of the beam\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# The varying load distribution is divided into a rectangle and a right angled triangle\n",
+ "\n",
+ "W1=w1*l #kN # where W1 is the area of the load diagram(rectangle ABED)\n",
+ "x1=l/2 #m # centroid of the rectangular load system\n",
+ "W2=(w2-w1)*l/2 #kN # where W1 is the area of the load diagram(triangle DCE)\n",
+ "x2=2*l/3 #m # centroid of the triangular load system\n",
+ "W=W1+W2 #kN # W is the resultant\n",
+ "x=((W1*x1)+(W2*x2))/W #m # where x is the distance where the resultant lies\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"The resultant of the distributed load system is \",round(W),\"kN\"\n",
+ "print\"The line of action of the resulting load is \",round(x,1),\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resultant of the distributed load system is 18.0 kN\n",
+ "The line of action of the resulting load is 3.5 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3-13,Page No:78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initiization of variables\n",
+ "\n",
+ "W1=10 #kN #point load acting at D\n",
+ "W2=20 #kN # point load acting at C at an angle of 30 degree\n",
+ "W3=5 #kN/m # intensity of udl acting on span EB of 4m\n",
+ "W4=10 #kN/m # intensity of varying load acting on span BC of 3m\n",
+ "M=25 #kN-m # moment acting at E\n",
+ "theta=30 #degree # angle made by 20 kN load with the beam\n",
+ "Lad=2 #m\n",
+ "Leb=4 #m\n",
+ "Laf=6 #m #distance between the resultant of W3 & point A\n",
+ "Lac=11 #m\n",
+ "Lag=9 #m #distance between the resultant of W4 and point A\n",
+ "Lbc=3 #m\n",
+ "Lab=8 #m\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "Xa=20*cos(theta*(pi/180)) #kN # sum Fx=0\n",
+ "Rb=((W1*Lad)+(-M)+(W3*Leb*Laf)+(W2*sin(theta*(pi/180))*Lac)+((W4*Lbc*Lag)/2))/Lab #kN # taking moment at A\n",
+ "Ya=W1+(W2*sin(theta*(pi/180)))+(W3*Leb)+(W4*Lbc/2)-Rb #kN # sum Fy=0\n",
+ "Ra=(Xa**2+Ya**2)**0.5 #kN # resultant at A\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"The horizontal reaction at A i.e Xa is \",round(Xa,2),\"kN\"\n",
+ "print\"The vertical reaction at A i.e Ya is \",round(Ya),\"kN\"\n",
+ "print\"The reaction at A i.e Ra is \",round(Ra),\"kN\"\n",
+ "print\"The reaction at B i.e Rb is \",round(Rb),\"kN\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The horizontal reaction at A i.e Xa is 17.32 kN\n",
+ "The vertical reaction at A i.e Ya is 10.0 kN\n",
+ "The reaction at A i.e Ra is 20.0 kN\n",
+ "The reaction at B i.e Rb is 45.0 kN\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3-14,Page No:79"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "h=4 #m #height of the dam wall\n",
+ "rho_w=1000 # kg/m^3 # density of water\n",
+ "rho_c=2400 # kg/m^3 # density of concrete\n",
+ "g=9.81 # m/s^2\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "P=(rho_w*g*h**2)/2 # The resultant force due to water pressure per unit length of the dam\n",
+ "x=(0.6666)*h #m # distance at which the resutant of the triangular load acts \n",
+ "b=((2*P*h)/(3*h*rho_c*g))**0.5 # m # eq'n required to find the minimum width of the dam\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The minimum width which is to be provided to the dam to prevent overturning about point B is \",round(b,3),\"m\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The minimum width which is to be provided to the dam to prevent overturning about point B is 1.491 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter04_16.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter04_16.ipynb
new file mode 100644
index 00000000..e5d35c61
--- /dev/null
+++ b/Engineering_Mechanics_by_Tayal_A.K./chapter04_16.ipynb
@@ -0,0 +1,138 @@
+{
+ "metadata": {
+ "name": "chapter4.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4 : Centroid , Centre Of Mass And Centre Of Gravity"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.4-8,Page No:100"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "b1=20 #cm # width of top flange\n",
+ "t1=5 #cm # thickness of top flange\n",
+ "b2=5 #cm # width of web\n",
+ "t2=15 #cm # thickness or height of the web\n",
+ "b3=30 #cm # width of bottom flange\n",
+ "t3=5 #cm # thickness of bottom flange\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "A1=b1*t1 #cm^2 # area of bottom flange\n",
+ "A2=b2*t2 #cm^2 # area of the web\n",
+ "A3=b3*t3 #cm^2 # area of top flange\n",
+ "y1=t3+t2+(t1*0.5) #cm # y co-ordinate of the centroid of top flange\n",
+ "y2=t3+(t2*0.5) #cm # y co-ordinate of the centroid of the web\n",
+ "y3=t3*0.5 #cm # y co-ordinate of the centroid of the bottom flange\n",
+ "y_c=((A1*y1)+(A2*y2)+(A3*y3))/(A1+A2+A3) #cm # where y_c is the centroid of the un-symmetrycal I-section\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The centroid of the un equal I-section is \",round(y_c,2),\"cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The centroid of the un equal I-section is 10.96 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.4-9,Page No:101"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "# The given section is Z-section which is un-symmetrycal about both the axis\n",
+ "\n",
+ "b1=20 #cm # width of bottom flange \n",
+ "t1=5 #cm # thickness of the bottom flange\n",
+ "b2=2.5 #cm # thickness of the web of the flange\n",
+ "t2=15 #cm # depth of the web\n",
+ "b3=10 #cm # width of the top flange\n",
+ "t3=2.5 #cm # thickness of the top flange\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Respective areas\n",
+ "\n",
+ "A1=b1*t1 # cm^2 # area of the bottom flange\n",
+ "A2=b2*t2 # cm^2 # area of the web\n",
+ "A3=b3*t3 # cm^2 # area of the top-flange\n",
+ "\n",
+ "# first we calculate the x co-ordinate of the centroid\n",
+ "\n",
+ "x1=b3-b2+(b1*0.5) #cm # for the bottom flange\n",
+ "x2=b3-(b2*0.5) #cm # for the web\n",
+ "x3=b3*0.5 #cm # for the top flange\n",
+ "x_c=((A1*x1)+(A2*x2)+(A3*x3))/(A1+A2+A3) #cm\n",
+ "\n",
+ "# secondly we calculate the y co-ordinate of the centroid\n",
+ "\n",
+ "y1=t1*0.5 #cm # for the bottom flange\n",
+ "y2=t1+(t2*0.5) #cm # for the web\n",
+ "y3=t1+t2+(t3*0.5) #cm # for the top flange\n",
+ "y_c=((A1*y1)+(A2*y2)+(A3*y3))/(A1+A2+A3) # cm\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The centroid of the cross-sectional area of a Z-section about x-axis is \",round(x_c,2),\"cm\"\n",
+ "print\"The centroid of the cross-sectional area of a Z-section about y-axis is \",round(y_c,2),\"cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The centroid of the cross-sectional area of a Z-section about x-axis is 13.56 cm\n",
+ "The centroid of the cross-sectional area of a Z-section about y-axis is 7.69 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter05_16.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter05_16.ipynb
new file mode 100644
index 00000000..efb681de
--- /dev/null
+++ b/Engineering_Mechanics_by_Tayal_A.K./chapter05_16.ipynb
@@ -0,0 +1,285 @@
+{
+ "metadata": {
+ "name": "chapter5.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5: General Case Of Forces In Plane"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5-2,Page No:111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Inilization of variables\n",
+ "\n",
+ "W=2000 #N\n",
+ "Lab=2 #m #length of the member from the vertical to the 1st load of 2000 N\n",
+ "Lac=5 #m #length of the member from the vertical to the 2nd load of 2000 N\n",
+ "Lpq=3.5 #m\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "Rq=((W*Lab)+(W*Lac))/Lpq #N #take moment abt. pt P\n",
+ "Xp=Rq #N #sum Fx=0\n",
+ "Yp=2*W #N #sum Fy=0\n",
+ "Rp=(Xp**2+Yp**2)**0.5 #N\n",
+ "\n",
+ "#Resuts\n",
+ "\n",
+ "print\"The reaction at P is \",round(Rp,1),\"N\"\n",
+ "print\"The reaction at Q is \",round(Rq),\"N\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The reaction at P is 5656.9 N\n",
+ "The reaction at Q is 4000.0 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5-3,Page No:112"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "import numpy as np\n",
+ "#Initilization of vaiables\n",
+ "\n",
+ "W=25 #N # self weight of the ladder\n",
+ "M=75 #N # weight of the man standing o the ladder\n",
+ "theta=63.43 #degree # angle which the ladder makes with the horizontal\n",
+ "alpha=30 #degree # angle made by the string with the horizontal\n",
+ "Loa=2 #m # spacing between the wall and the ladder\n",
+ "Lob=4 #m #length from the horizontal to the top of the ladder touching the wall(vertical)\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#Using matrix to solve the simultaneous eqn's 3 & 4\n",
+ "\n",
+ "A=np.array([[2 ,-4],[1, -0.577]])\n",
+ "B=np.array([100,100])\n",
+ "C=np.linalg.solve(A,B)\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"The reaction at A i.e Ra is \",round(C[0],2),\"N\"\n",
+ "print\"The reaction at B i.e Rb is \",round(C[1],2),\"N\"\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "T=C[1]/cos(alpha*(pi/180)) #N # from (eqn 1)\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"The required tension in the string is \",round(T,2),\"N\"\n",
+ "\n",
+ "#answer may vary due to decimal variance"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The reaction at A i.e Ra is 120.27 N\n",
+ "The reaction at B i.e Rb is 35.14 N\n",
+ "The required tension in the string is 40.57 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5-4,Page No:113"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "W=100 #N\n",
+ "theta=60 #degree #angle made by the ladder with the horizontal\n",
+ "alpha=30 #degree #angle made by the ladder with the vertical wall\n",
+ "Lob=4 #m # length from the horizontal to the top of the ladder touching the wall(vertical)\n",
+ "Lcd=2 #m # length from the horizontal to the centre of the ladder where the man stands\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "Lab=Lob*(1/cos(alpha*(pi/180))) #m #length of the ladder\n",
+ "Lad=Lcd*tan(alpha*(pi/180)) #m\n",
+ "Rb=(W*Lad)/Lab #N #take moment at A\n",
+ "Xa=Rb*sin(theta*(pi/180)) #N # From eq'n 1\n",
+ "Ya=W+Rb*cos(theta*(pi/180)) #N #From eq'n 2\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"The reaction at B i.e Rb is \",round(Rb),\"N\"\n",
+ "print\"The horizontal reaction at A i.e Xa is \",round(Xa,2),\"N\"\n",
+ "print\"The vertical reaction at A i.e Ya is \",round(Ya,1),\"N\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The reaction at B i.e Rb is 25.0 N\n",
+ "The horizontal reaction at A i.e Xa is 21.65 N\n",
+ "The vertical reaction at A i.e Ya is 112.5 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5-5,Page No:114"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "W=100 #N #self weight of the man\n",
+ "alpha=30 #degree # angle made by the ladder with the wall\n",
+ "Lob=4 #m # length from the horizontal to the top of the ladder touching the wall(vertical)\n",
+ "Lcd=2 #m\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "# using the equiblirium equations\n",
+ "\n",
+ "Ya=W #N # From eq'n 2\n",
+ "Lad=Lcd*tan(alpha*(pi/180)) #m #Lad is the distance fom pt A to the point where the line from the cg intersects the horizontal\n",
+ "Rb=(W*Lad)/Lob #N # Taking sum of moment abt A\n",
+ "Xa=Rb #N # From eq'n 1\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"The horizontal reaction at A i.e Xa is \",round(Xa,2),\"N\"\n",
+ "print\"The vertical reaction at A i.e Ya is \",round(Ya),\"N\"\n",
+ "print\"The reaction at B i.e Rb is \",round(Rb,2),\"N\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The horizontal reaction at A i.e Xa is 28.87 N\n",
+ "The vertical reaction at A i.e Ya is 100.0 N\n",
+ "The reaction at B i.e Rb is 28.87 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5-6,Page No:115"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "d=0.09 #m #diametre of the right circular cylinder\n",
+ "h=0.12 #m #height of the cyinder\n",
+ "W=10 #N # self weight of the bar\n",
+ "l=0.24 #m #length of the bar\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "theta=arctan(h/d)*(180/pi) # angle which the bar makes with the horizontal\n",
+ "Lad=(d**2+h**2)**0.5 #m # Lad is the length of the bar from point A to point B\n",
+ "Rd=(W*h*cos(theta*(pi/180)))/Lad #N # Taking moment at A\n",
+ "Xa=Rd*sin(theta*(pi/180)) #N # sum Fx=0.... From eq'n 1\n",
+ "Ya=W-(Rd*cos(theta*(pi/180))) #N # sum Fy=0..... From eq'n 2\n",
+ "Ra=(Xa**2+Ya**2)**0.5 #resultant of Xa & Ya\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print\"The horizontal reaction at A i.e Xa is \",round(Xa,2),\"N\"\n",
+ "print\"The vertical reaction at A i.e Ya is \",round(Ya,2),\"N\"\n",
+ "print\"Therefore the reaction at A i.e Ra is \",round(Ra,2),\"N\"\n",
+ "print\"The reaction at D i.e Rd is \",round(Rd,2),\"N\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The horizontal reaction at A i.e Xa is 3.84 N\n",
+ "The vertical reaction at A i.e Ya is 7.12 N\n",
+ "Therefore the reaction at A i.e Ra is 8.09 N\n",
+ "The reaction at D i.e Rd is 4.8 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter06_16.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter06_16.ipynb
new file mode 100644
index 00000000..a0feab39
--- /dev/null
+++ b/Engineering_Mechanics_by_Tayal_A.K./chapter06_16.ipynb
@@ -0,0 +1,279 @@
+{
+ "metadata": {
+ "name": "chapter6.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 6: Friction"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6-1,Page No:126"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "m=5 #kg # mass of the bock\n",
+ "g=9.81 # m/s^2 # acceleration due to gravity\n",
+ "theta=15 # degree # angle made by the forces (P1 & P2) with the horizontal of the block\n",
+ "mu=0.4 #coefficient of static friction\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "# Case 1. Where P1 is the force required to just pull the bock\n",
+ "\n",
+ "# Solving eqn's 1 & 2 using matrix\n",
+ "A=np.array([[cos(theta*(pi/180)), -mu],[sin(theta*(pi/180)), 1]])\n",
+ "B=np.array([0,(m*g)])\n",
+ "C=np.linalg.solve(A,B)\n",
+ "\n",
+ "# Calculations \n",
+ "\n",
+ "# Case 2. Where P2 is the force required to push the block\n",
+ "\n",
+ "# Solving eqn's 1 & 2 using matrix\n",
+ "P=np.array([[-cos(theta*(pi/180)), mu],[-sin(theta*(pi/180)) ,1]])\n",
+ "Q=np.array([0,(m*g)])\n",
+ "R=np.linalg.solve(P,Q)\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The required pull force P1 is \",round(C[0],2),\"N\" #answer in textbook is wrong\n",
+ "print\"The required push force P2 is \",round(R[0]),\"N\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required pull force P1 is 18.35 N\n",
+ "The required push force P2 is 23.0 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6-4,Page No:129"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "W1=50 # N # weight of the first block\n",
+ "W2=50 # N # weight of the second block\n",
+ "mu_1=0.3 # coefficient of friction between the inclined plane and W1\n",
+ "mu_2=0.2 # coefficient of friction between the inclined plane and W2\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# On adding eq'ns 1&3 and substuting the values of N1 & N2 from eqn's 2&4 in this and on solving for alpha we get,\n",
+ "\n",
+ "alpha=(arctan(((mu_1*W1)+(mu_2*W2))/(W1+W2)))*(180/pi) # degrees\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The inclination of the plane is \",round(alpha),\"degree\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The inclination of the plane is 14.0 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6-7,Page No:133"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "M=2000 # kg # mass of the car\n",
+ "mu=0.3 # coefficient of static friction between the tyre and the road\n",
+ "g=9.81 # m/s^2 # acc. due to gravity\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Divide eqn 1 by eqn 2, We get\n",
+ "theta=arctan(mu)*(180/pi) #degree\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The angle of inclination is \",round(theta,1),\"degree\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The angle of inclination is 16.7 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6-9,Page No:135"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "# Initilization of variabes\n",
+ "\n",
+ "Wa=1000 #N # weight of block A\n",
+ "Wb=500 #N # weight of block B\n",
+ "theta=15 # degree # angle of the wedge\n",
+ "mu=0.2 # coefficient of friction between the surfaces in contact\n",
+ "phi=7.5 # degrees # used in case 2\n",
+ "\n",
+ "# Caculations \n",
+ "\n",
+ "# CASE (a)\n",
+ "\n",
+ "# consider the equilibrium of upper block A\n",
+ "# rearranging eq'ns 1 &2 and solving them using matrix for N1 & N2\n",
+ "A=np.array([[1 ,-0.4522],[-0.2 ,0.914]])\n",
+ "B=np.array([0,1000])\n",
+ "C=np.linalg.solve(A,B)\n",
+ "\n",
+ "# Now consider the equilibrium of lower block B\n",
+ "# From eq'n 4\n",
+ "N3=Wb+(C[1]*cos(theta*(pi/180)))-(mu*C[1]*sin(theta*(pi/180))) #N\n",
+ "# Now from eq'n 3\n",
+ "P=(mu*N3)+(mu*C[1]*cos(theta*(pi/180)))+(C[1]*sin(theta*(pi/180))) # N\n",
+ "\n",
+ "# CASE (b)\n",
+ "\n",
+ "# The eq'n for required coefficient for the wedge to be self locking is,\n",
+ "mu_req=(theta*pi)/360 # multiplying with (pi/180) to convert it into radians\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The minimum horizontal force (P) which should be applied to raise the block is \",round(P),\"N\"\n",
+ "print\"The required coefficient for the wedge to be self locking is \",round(mu_req,4) #answer in textbook is wrong\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The minimum horizontal force (P) which should be applied to raise the block is 871.0 N\n",
+ "The required coefficient for the wedge to be self locking is 0.1309\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6-13.Page No:141"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "P=100 #N # force acting at 0.2 m from A\n",
+ "Q=200 #N # force acting at any distance x from B\n",
+ "l=1 #m # length of the bar\n",
+ "theta=45 #degree #angle made by the normal reaction at A&B with horizontal\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "#solving eqn's 1 & 2 using matrix for Ra & Rb,\n",
+ "A=np.array([[1, -1],[sin(theta*(pi/180)) ,sin(theta*(pi/180))]])\n",
+ "B=np.array([0,(P+Q)])\n",
+ "C=np.linalg.solve(A,B)\n",
+ "\n",
+ "# Now take moment about B\n",
+ "x=((C[0]*l*sin(theta*(pi/180)))-(P*(l-0.2)))/200 #m # here 0.2 is the distance where 100 N load lies from A\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The minimum value of x at which the load Q=200 N may be applied before slipping impends is \",round(x,2),\"m\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The minimum value of x at which the load Q=200 N may be applied before slipping impends is 0.35 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter07_16.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter07_16.ipynb
new file mode 100644
index 00000000..aae60e42
--- /dev/null
+++ b/Engineering_Mechanics_by_Tayal_A.K./chapter07_16.ipynb
@@ -0,0 +1,551 @@
+{
+ "metadata": {
+ "name": "chapter7.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7: Application Of Friction"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.7-1,Page No:152"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "d1=24 # cm # diameter of larger pulley\n",
+ "d2=12 # cm # diameter of smaller pulley\n",
+ "d=30 #cm # seperation betweem 1st & the 2nd pulley\n",
+ "pie=3.14\n",
+ "\n",
+ "# Calcuations\n",
+ "\n",
+ "r1=d1*0.5 #cm # radius of 1st pulley #1/2=0.5\n",
+ "r2=d2*0.5 #cm # radius of 2nd pulley #1/2=0.5\n",
+ "theta=(arcsin((r1-r2)/d))*(180/pi) #degrees \n",
+ "\n",
+ "# Angle of lap\n",
+ "beta_1=180+(2*theta) #degree # for larger pulley\n",
+ "beta_2=180-(2*theta) #degree # for smaller pulley\n",
+ "L=pie*(r1+r2)+(2*d)+((r1-r2)**(2/d)) #cm # Length of the belt\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The angle of lap for the larger pulley is \",round(beta_1,2),\"degree\"\n",
+ "print\"he angle of lap for the smaller pulley is \",round(beta_2,2),\"degree\"\n",
+ "print\"he length of pulley required is \",round(L,2),\"cm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The angle of lap for the larger pulley is 203.07 degree\n",
+ "he angle of lap for the smaller pulley is 156.93 degree\n",
+ "he length of pulley required is 117.52 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.7-2,Page No:153"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "d1=0.6 #m # diameter of larger pulley\n",
+ "d2=0.3 #m diameter of smaller pulley\n",
+ "d=3.5 #m #separation between the pulleys\n",
+ "pie=3.14\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "r1=d1*0.5 #m # radius of larger pulley #1/2=0.5\n",
+ "r2=d2*0.5 #m # radius of smaller pulley #1/2=0.5\n",
+ "theta=arcsin((r1+r2)/d)*(180/pi) #degree\n",
+ "\n",
+ "# Angle of lap for both the pulleys is same, i.e\n",
+ "\n",
+ "beta=180+(2*theta) # degree\n",
+ "L=((pie*(r1+r2))+(2*d)+(((r1+r2)**2)/d)) #cm # Length of the belt\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The angle of lap for the pulley is \",round(beta,1),\"degree\"\n",
+ "print\"The length of pulley required is \",round(L,3),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The angle of lap for the pulley is 194.8 degree\n",
+ "The length of pulley required is 8.471 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.7-4,Page No:161"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "W1=1000 #N\n",
+ "mu=0.25 #coefficient of friction\n",
+ "pie=3.14\n",
+ "beta=pie\n",
+ "T1=W1 # Tension in the 1st belt carrying W1\n",
+ "e=2.718 #constant\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "T2=T1/(e**(mu*beta)) #N # Tension in the 2nd belt\n",
+ "W2=T2 #N\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The minimum weight W2 to keep W1 in equilibrium is \",round(W2),\"N\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The minimum weight W2 to keep W1 in equilibrium is 456.0 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.7-5,Page No:162"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "mu=0.5 # coefficient of friction between the belt and the wheel\n",
+ "W=100 #N\n",
+ "theta=45 #degree\n",
+ "e=2.718\n",
+ "Lac=0.75 #m # ength of the lever\n",
+ "Lab=0.25 #m\n",
+ "Lbc=0.50 #m\n",
+ "r=0.25 #m\n",
+ "pie=3.14 # constant\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "beta=((180+theta)*pie)/180 # radian # angle of lap\n",
+ "\n",
+ "# from eq'n 2\n",
+ "T1=(W*Lbc)/Lab #N \n",
+ "T2=T1/(e**(mu*beta)) #N # from eq'n 1\n",
+ "\n",
+ "# consider the F.B.D of the pulley and take moment about its center, we get Braking Moment (M)\n",
+ "M=r*(T1-T2) #N-m\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The braking moment (M) exerted by the vertical weight W is \",round(M,2),\"N-m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The braking moment (M) exerted by the vertical weight W is 42.97 N-m\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.7-6,Page No:163"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initiization of variables\n",
+ "\n",
+ "W= 1000 #N # or 1kN\n",
+ "mu=0.3 # coefficient of friction between the rope and the cylinder\n",
+ "e=2.718 # constant\n",
+ "pie=3.14 # constant\n",
+ "alpha=90 # degree # since 2*alpha=180 egree\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "beta=2*pie*3 # radian # for 3 turn of the rope\n",
+ "\n",
+ "# Here T1 is the larger tension in that section of the rope which is about to slip\n",
+ "T1=W #N\n",
+ "F=W/e**(mu*(1/(sin(alpha*(pi/180))))*(beta)) #N # Here T2=F\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The force required to suport the weight of 1000 N i.e 1kN is \",round(F,1),\"N\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The force required to suport the weight of 1000 N i.e 1kN is 3.5 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.7-7,Page No:163"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "Pw=50 #kW\n",
+ "T_max=1500 #N\n",
+ "v=10 # m/s # velocity of rope\n",
+ "w=4 # N/m # weight of rope\n",
+ "mu=0.2 # coefficient of friction \n",
+ "g=9.81 # m/s^2 # acceleration due to gravity\n",
+ "e=2.718 # constant\n",
+ "pie=3.14 # constant\n",
+ "alpha=30 # degree # since 2*alpha=60 \n",
+ "\n",
+ "# Calcuations\n",
+ "\n",
+ "beta=pie # radian # angle of lap\n",
+ "T_e=(w*v**2)/g # N # where T_e is the centrifugal tension\n",
+ "T1=(T_max)-(T_e) #N\n",
+ "T2=T1/(e**(mu*(1/sin(alpha*(pi/180)))*(beta))) #N # From eq'n T1/T2=e^(mu*cosec(alpha)*beta)\n",
+ "P=(T1-T2)*v*(10**-3) #kW # power transmitted by a single rope\n",
+ "N=Pw/P # Number of ropes required\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The number of ropes required to transmit 50 kW is \",round(N),\"Nos\"\n",
+ "# approx no of ropes is 5\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The number of ropes required to transmit 50 kW is 5.0 Nos\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.7-8,Page No:164"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "d1=0.45 #m # diameter of larger pulley\n",
+ "d2=0.20 #m # diameter of smaller pulley\n",
+ "d=1.95 #m # separation between the pulley's\n",
+ "T_max=1000 #N # or 1kN which is the maximum permissible tension\n",
+ "mu=0.20 # coefficient of friction\n",
+ "N=100 # r.p.m # speed of larger pulley\n",
+ "e=2.718 # constant\n",
+ "pie=3.14 # constant\n",
+ "T_e=0 #N # as the data for calculating T_e is not given we assume T_e=0\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "r1=d1*0.5 #m # radius of larger pulley #1/2=0.5\n",
+ "r2=d2*0.5 #m # radius of smaller pulley #1/2=0.5\n",
+ "theta=arcsin((r1+r2)/d)*(180/pi) # degree\n",
+ "\n",
+ "# for cross drive the angle of lap for both the pulleys is same\n",
+ "beta=(180+(2*(theta)))*(pi/180) #radian\n",
+ "T1=T_max-T_e #N\n",
+ "T2=T1/(e**(mu*(beta))) #N # from formulae, T1/T2=e^(mu*beta)\n",
+ "v=((2*pie)*N*r1)/60 # m/s # where v=velocity of belt which is given as, v=wr=2*pie*N*r/60\n",
+ "P=(T1-T2)*v*(10**-3) #kW # Power\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The power transmitted by the cross belt drive is \",round(P,1),\"kW\"\n",
+ "# the approx answer is 1.3 kW The answer given in the book (i.e 1.81kW) is wrong.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The power transmitted by the cross belt drive is 1.2 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.7-9,Page No:165"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variabes\n",
+ "\n",
+ "b=0.1 #m #width of the belt\n",
+ "t=0.008 #m #thickness of the belt\n",
+ "v=26.67 # m/s # belt speed\n",
+ "pie=3.14 # constant\n",
+ "beta=165 # radian # angle of lap for the smaller belt\n",
+ "mu=0.3 # coefficient of friction\n",
+ "sigma_max=2 # MN/m^2 # maximum permissible stress in the belt\n",
+ "m=0.9 # kg/m # mass of the belt\n",
+ "g=9.81 # m/s^2\n",
+ "e=2.718 # constant\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "A=b*t # m^2 # cross-sectional area of the belt\n",
+ "T_e=m*v**2 # N # where T_e is the Centrifugal tension\n",
+ "T_max=(sigma_max)*(A)*(10**6) # N # maximum tension in the belt\n",
+ "T1=(T_max)-(T_e) # N \n",
+ "T2=T1/(e**((mu*pie*beta)/180)) #N # from formulae T1/T2=e^(mu*beta)\n",
+ "P=(T1-T2)*v*(10**-3) #kW # Power transmitted\n",
+ "T_o=(T1+T2)/2 # N # Initial tension\n",
+ "\n",
+ "# Now calculations to transmit maximum power\n",
+ "\n",
+ "Te=T_max/3 # N # max tension\n",
+ "u=(T_max/(3*m))**0.5 # m/s # belt speed for max power\n",
+ "T_1=T_max-Te # N # T1 for case 2\n",
+ "T_2=T_1/(e**((mu*pie*beta)/180)) # N \n",
+ "P_max=(T_1-T_2)*u*(10**-3) # kW # Max power transmitted\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The initial power transmitted is \",round(P,2),\"kW\"\n",
+ "print\"The initial tension in the belt is \",round(T_o,1),\"N\"\n",
+ "print\"The maximum power that can be transmitted is \",round(P_max,2),\"kW\" # the answer is approx 15.017kW wheres the answer 14.99kW given in book is wrong \n",
+ "print\"The maximum power is transmitted at a belt speed of \",round(u,2),\"m/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The initial power transmitted is 14.8 kW\n",
+ "The initial tension in the belt is 682.3 N\n",
+ "The maximum power that can be transmitted is 15.02 kW\n",
+ "The maximum power is transmitted at a belt speed of 24.34 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 54
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.7-10,Page No:169"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "p=0.0125 # m # pitch of screw\n",
+ "d=0.1 #m # diameter of the screw\n",
+ "r=0.05 #m # radius of the screw\n",
+ "l=0.5 #m # length of the lever\n",
+ "W=50 #kN # load on the lever\n",
+ "mu=0.20 # coefficient of friction \n",
+ "pie=3.14 #constant\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "theta=arctan(p/(2*pie*r))*(180/pi) #degree # theta is the Helix angle\n",
+ "phi=arctan(mu)*(180/pi) # degree # phi is the angle of friction\n",
+ "\n",
+ "# Taking the leverage due to handle into account,force F1 required is,\n",
+ "F1=(W*(tan(theta*(pi/180)+phi*(pi/180))))*(r/l) #kN\n",
+ "\n",
+ "# To lower the load\n",
+ "F2=(W*(tan(theta*(pi/180)-phi*(pi/180))))*(r/l) #kN # -ve sign of F2 indicates force required is in opposite sense\n",
+ "E=(tan(theta*(pi/180))/tan(theta*(pi/180)+phi*(pi/180)))*100 # % # here E=eata=efficiency in %\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The force required (i.e F1) to raise the weight is \",round(F1,3),\"kN\" #due to decimal variance answer varies by 0.004kN \n",
+ "print\"The force required (i.e F2) to lower the weight is \",round(F2,3),\"kN\"\n",
+ "print\"The efficiency of the jack is \",round(E,2),\"percent\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The force required (i.e F1) to raise the weight is 1.209 kN\n",
+ "The force required (i.e F2) to lower the weight is -0.795 kN\n",
+ "The efficiency of the jack is 16.47 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 58
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.7-11,Page No:172"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variabes\n",
+ "\n",
+ "P=20000 #N #Weight of the shaft\n",
+ "D=0.30 #m #diameter of the shaft\n",
+ "R=0.15 #m #radius of the shaft\n",
+ "mu=0.12 # coefficient of friction\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Friction torque T is given by formulae,\n",
+ "T=(0.666)*P*R*mu #N-m #2/3=0.666\n",
+ "M=T #N-m\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The frictional torque is \",round(M),\"N-m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The frictional torque is 240.0 N-m\n"
+ ]
+ }
+ ],
+ "prompt_number": 61
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter08_16.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter08_16.ipynb
new file mode 100644
index 00000000..666bcf43
--- /dev/null
+++ b/Engineering_Mechanics_by_Tayal_A.K./chapter08_16.ipynb
@@ -0,0 +1,311 @@
+{
+ "metadata": {
+ "name": "chapter8.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 8: Simple Lifting Machines"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.8-1,Page No:179"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "VR=6 # Velocity ratio\n",
+ "P=20 #N # Effort\n",
+ "W=100 #N # Load lifted\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "#(a)\n",
+ "\n",
+ "P_actual=P #N\n",
+ "W_actual=W #N\n",
+ "MA=W/P # where, MA= Mechanical advantage\n",
+ "E=(0.833)*100 #% # Where MA/VR=0.833 and E= efficiency\n",
+ "\n",
+ "#(b)\n",
+ "# Now ideal effort required is,\n",
+ "P_ideal=W*VR**-1 #N\n",
+ "# Effort loss in friction is, (Le)\n",
+ "Le=P_actual-P_ideal #N # Effort loss in friction\n",
+ "\n",
+ "#(c)\n",
+ "# Ideal load lifted is,(W_ideal)\n",
+ "W_ideal=P*VR #N \n",
+ "# Frictional load/resistance,\n",
+ "F=W_ideal-W_actual # N\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"(a) The efficiency of the machine is \",round(E,3),\"percent\"\n",
+ "print\"(b) The effort loss in friction of the machine is \",round(Le,2),\"N\"\n",
+ "print\"(c) The Frictional load of the machine is \",round(F),\"N\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The efficiency of the machine is 83.3 percent\n",
+ "(b) The effort loss in friction of the machine is 3.33 N\n",
+ "(c) The Frictional load of the machine is 20.0 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.8-2, Page No:180"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "import matplotlib.pyplot as plt\n",
+ "%matplotlib inline\n",
+ "\n",
+ "# Initilization of variables\n",
+ "V_r=20 # Velocity ratio\n",
+ "# Values from the table # Variables have been assumed\n",
+ "# Values of W in N\n",
+ "W=[30 ,40 ,50 ,60 ,70 ,80 ,90 ,100]\n",
+ "# P in N\n",
+ "P=[7 ,8.5 ,10 ,11.5 ,13.5 ,14.5 ,16 ,17.5]\n",
+ "M_A=[W[0]*P[0]**-1 ,W[1]*P[1]**-1 ,W[2]*P[2]**-1 ,W[3]*P[3]**-1 ,W[4]*P[4]**-1 ,W[5]*P[5]**-1 ,W[6]*P[6]**-1 ,W[7]*P[7]**-1]\n",
+ "# Efficiency (n)\n",
+ "n=[(V_r**-1)*M_A[0] ,(V_r**-1)*M_A[1] ,(V_r**-1)*M_A[2] ,(V_r**-1)*M_A[3], (V_r**-1)*M_A[4] ,(V_r**-1)*M_A[5] ,(V_r**-1)*M_A[6] ,(V_r**-1)*M_A[7]]*100 # %\n",
+ "# Calculations\n",
+ "# Part (a)- Realtionship between W & P\n",
+ "# Here part a cannot be solved as it has variables which cannot be defined in Scilab. Ref.textbook for the solution\n",
+ "# Part (b)- Graph between W & efficiency n(eta)\n",
+ "x=[0 ,W[0] ,W[1] ,W[2] ,W[3] ,W[4] ,W[5] ,W[6] ,W[7]] # values for W # N\n",
+ "y=[0 ,n[0] ,n[1] ,n[2] ,n[3] ,n[4] ,n[5] ,n[6] ,n[7]] # values for efficiency n (eta) # %\n",
+ "d=transpose(x)\n",
+ "plt.plot(d,y)\n",
+ "plt.show()\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The graph is the solution\"\n",
+ "# The value of m is found by drawing straight line on the graph and by taking its slope. Ref textbook for the solution\n",
+ "# The curve of the graph may differ from textbook because of the graphical calculation.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEACAYAAAC08h1NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X9UVHXeB/D3KFO6ZKmEv2ZwUUAYVJACUcuWUiR9ksJ8\neiiP/SKWtDJbd63O2WfT1lL6samRLfmkx/IXZ8vEUidjdVZTdEopTfQoLeQ4ilnKqmACw/f545sQ\nicMAM/Odmft+ncNxftx75zP36Jvr937u9+qEEAJERKQZnVQXQERE3sXgJyLSGAY/EZHGMPiJiDSG\nwU9EpDEMfiIijWk1+M1mM2JiYhAVFYXc3Nwr3i8sLER8fDwSEhJw8803Y+vWrS6vS0RE3qdz1sfv\ncDgQHR2NoqIiGAwGJCUlYc2aNTCZTI3LVFdXIzg4GABw4MABZGRkoKyszKV1iYjI+5we8VutVkRG\nRiI8PBx6vR6ZmZkoLCxstszl0AeACxcu4MYbb3R5XSIi8j6nwW+32xEWFtb43Gg0wm63X7Hc+vXr\nYTKZMH78eCxevLhN6xIRkXc5DX6dTufSRu655x4cOnQIH3/8MaZOnQrOAkFE5LuCnL1pMBhgs9ka\nn9tsNhiNxqsuP3r0aNTX1+PMmTMwGo0urRsZGYlvv/22PbUTEWlWREQEysrK2reycKKurk4MHDhQ\nlJeXi0uXLon4+HhRWlrabJmysjLR0NAghBBi7969YuDAgS6v+/OJZWclaMoLL7ygugS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G/D+gQLmVwq5uYAAAAABJRU5ErkJggg==\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x4fe1370>"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The graph is the solution\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.8-3,Page No:184"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initialization of variables\n",
+ "\n",
+ "W_actual=1360 #N #Load lifted\n",
+ "P_actual=100 #N # Effort\n",
+ "n=4 # no of pulleys\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# for 1st system of pulleys having 4 movable pulleys, Velocity ratio is\n",
+ "VR=2**(n) # Velocity Ratio\n",
+ "\n",
+ "# If the machine were to be ideal(frictionless)\n",
+ "MA=VR # Here, M.A= mechanical advantage \n",
+ "\n",
+ "# For a load of 1360 N, ideal effort required is\n",
+ "P_ideal=W_actual/VR #N\n",
+ "\n",
+ "# Effort loss in friction is,\n",
+ "P_friction=P_actual-P_ideal #N\n",
+ "\n",
+ "# For a effort of 100 N, ideal load lifted is,\n",
+ "W_ideal=VR*100 #N \n",
+ "\n",
+ "# Load lost in friction is,\n",
+ "W_friction=W_ideal-W_actual # N \n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"(a) The effort wasted in friction is \",round(P_friction,2),\"N\"\n",
+ "print\"(b) The load wasted in friction is \",round(W_friction,2),\"N\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The effort wasted in friction is 15.0 N\n",
+ "(b) The load wasted in friction is 240.0 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.8-4,Page No:185"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "W=1000 #N # Load to be lifted\n",
+ "n=5 # no. of pulleys\n",
+ "E=75 #% # Efficiency\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Velocity Ratio is given as,\n",
+ "VR=n \n",
+ "\n",
+ "# Mechanical Advantage (MA) is,\n",
+ "MA=(E*0.01)*VR # from formulae, Efficiency=E=MA/VR\n",
+ "P=W/MA #N # Effort required\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The effort required to lift the load of 1000 N is \",round(P,2),\"N\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The effort required to lift the load of 1000 N is 266.67 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.8-5,Page No:191 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "W=2000 #N # Load to be raised\n",
+ "l=0.70 #m # length of the handle\n",
+ "d=0.05 #m # diameter of the screw\n",
+ "p=0.01 #m # pitch of the screw\n",
+ "mu=0.15 # coefficient of friction at the screw thread\n",
+ "pie=3.14 #constant\n",
+ "E=1 # efficiency\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "phi=arctan(mu)*(180/pi) #degree\n",
+ "theta=arctan(p/(pie*d))*(180/pi) #degree # where theta is the Helix angle\n",
+ "\n",
+ "# Force required at the circumference of the screw is,\n",
+ "P=W*tan(theta*(pi/180)+phi*(pi/180)) # N //\n",
+ "\n",
+ "# Force required at the end of the handle is,\n",
+ "F=(P*(d*0.5))/l #N # as d/2=d*0.5\n",
+ "\n",
+ "# Force required (Ideal case)\n",
+ "VR=2*pie*l/p\n",
+ "MA=E*VR # from formulae E=M.A/V,R\n",
+ "P_ideal=W/MA #N # From formulae, M.A=W/P\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The force required at the end of the handle is \",round(F,2),\"N\"\n",
+ "print\"The force required if the screw jack is considered to be an ideal machine is \",round(P_ideal,2),\"N\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The force required at the end of the handle is 15.41 N\n",
+ "The force required if the screw jack is considered to be an ideal machine is 4.55 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter09_16.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter09_16.ipynb
new file mode 100644
index 00000000..aa9e114b
--- /dev/null
+++ b/Engineering_Mechanics_by_Tayal_A.K./chapter09_16.ipynb
@@ -0,0 +1,663 @@
+{
+ "metadata": {
+ "name": "chapter09.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 9: Analysis Of Plane Trusses And Frames"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.9-1,Page No:198"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "W1=2000 #N # load at joint D of the truss\n",
+ "W2=4000 #N # load at joint E of the truss\n",
+ "Lac=6 #m # length of the tie\n",
+ "Lab=3 #m\n",
+ "Lbc=3 #m\n",
+ "theta=60 #degree # interior angles of the truss\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n",
+ "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n",
+ "Ra=W1+W2-Rc #N # Take sum Fy=0\n",
+ "\n",
+ "# ANALYSIS OF TRUSS BY METHOD OF JOINT\n",
+ "# ASSUMPTION- we consider the,(1) Forces moving towards each other as +ve i.e TENSILE (T) & (2) Forces moving away from each other as -ve i.e COMPRESSIVE (C)\n",
+ "\n",
+ "# (1) JOINT A\n",
+ "Fad=Ra/(sin(theta*(pi/180))) #N #(C) # Using eq'n 2\n",
+ "Fab=Fad*cos(theta*(pi/180)) #N # (T) # Using eq'n 1\n",
+ "\n",
+ "# (2) JOINT C\n",
+ "Fce=Rc/(sin(theta*(pi/180))) #N # (C) # Using eq'n 4\n",
+ "Fcb=Fce*cos(theta*(pi/180)) #N # (T) # Using eq'n 3\n",
+ "\n",
+ "# (3) JOINT D\n",
+ "Fdb=((Fad*sin(theta*(pi/180)))-(W1))/sin(theta*(pi/180)) #N # (T) # Using eq'n 6\n",
+ "Fde=(Fdb*cos(theta*(pi/180)))+(Fad*cos(theta*(pi/180))) #N # (C) # Using eq'n 5\n",
+ "\n",
+ "# (4) JOINT E\n",
+ "Feb=((Fce*cos(theta*(pi/180)))-(Fde))/cos(theta*(pi/180)) #N # (C) # Using eq'n 7\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The Axial Force in member AD (Fad) is \",round(Fad),\"N\"\n",
+ "print\"The Axial Force in member AB (Fab) is \",round(Fab),\"N\"\n",
+ "print\"The Axial Force in member CE (Fce) is \",round(Fce),\"N\"\n",
+ "print\"The Axial Force in member CB (Fcb) is \",round(Fcb,1),\"N\"\n",
+ "print\"The Axial Force in member DB (Fdb) is \",round(Fdb),\"N\"\n",
+ "print\"The Axial Force in member DE (Fde)is \",round(Fde),\"N\"\n",
+ "print\"The Axial Force in member EB (Feb) is \",round(Feb),\"N\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Axial Force in member AD (Fad) is 2887.0 N\n",
+ "The Axial Force in member AB (Fab) is 1443.0 N\n",
+ "The Axial Force in member CE (Fce) is 4041.0 N\n",
+ "The Axial Force in member CB (Fcb) is 2020.7 N\n",
+ "The Axial Force in member DB (Fdb) is 577.0 N\n",
+ "The Axial Force in member DE (Fde)is 1732.0 N\n",
+ "The Axial Force in member EB (Feb) is 577.0 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.9-2,Page No:201"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "W1=2000 #N (or 2 kN)# load at joint D of the truss\n",
+ "W2=4000 #N (or 4 kN)# load at joint E of the truss\n",
+ "Lac=6 #m # length of the tie\n",
+ "Lab=3 #m\n",
+ "Lbc=3 #m\n",
+ "theta=60 #degree # interior angles of the truss\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Here A is simply supported & B is roller support. Now the SUPPORT REACTIONS are given as,\n",
+ "Rc=((W1*(Lab*0.5))+(W2*(Lab+(Lbc*0.5))))/Lac #N # Taking moment at A\n",
+ "Ra=W1+W2-Rc #N # Take sum Fy=0\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Calculating the axial forces in the respective members by METHOD OF SECTION\n",
+ "# A section is drawn passing through member DE such that it cuts the respective member. Now consider the equilibrium of the left hand portion of the truss. The three unknown forces are Fde, Fdb, & Fab\n",
+ "# Take moment about B\n",
+ "Fde=((3*Ra)-(W1*Lab*sin(30*(pi/180))))/(3*cos(30*(pi/180))) #N # (T)\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The axial force in the member DE (Fde)is \",round(Fde),\"N\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The axial force in the member DE (Fde)is 1732.0 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.9-3,Page No:202"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "W=1 #kN # load on the truss at joint D\n",
+ "theta=45 #degree # angle made by the members AC & BD with the horizontal\n",
+ "Lab=1 #m \n",
+ "Lcd=1 #m # here Lcd= the distance from B to the line of extension drawn from 1kN force on the horizontal\n",
+ "\n",
+ "# Calculations \n",
+ "\n",
+ "# (1) JOINT E\n",
+ "# Here the joint E is in equilibrium under two forces Fec & Fed which are non-collinear. Hence they must be 0. i.e Fec=Fed=0 \n",
+ "Fec=0\n",
+ "Fed=0\n",
+ "\n",
+ "# (2) JOINT D\n",
+ "Fdb=W/sin(theta*(pi/180)) # kN # (C)# sum Fy=0\n",
+ "Fdc=Fdb*cos(theta*(pi/180)) # kN # (T) # sum Fx=0\n",
+ "\n",
+ "# (3) JOINT C\n",
+ "Fca=Fdc/sin(theta*(pi/180)) # kN # (T) # sum Fx=0\n",
+ "Fcb=-(Fca*sin(theta*(pi/180))) # kN # (C) # sum Fy=0\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The axial force in the member DC (Fdc) is \",round(Fdc),\"kN\"\n",
+ "print\"The axial force in the member DB (Fdb) is \",round(Fdb),\"kN\"\n",
+ "print\"The axial force in the member CA (Fca) is \",round(Fca,2),\"kN\" #squareroot of 2 =1.41\n",
+ "print\"The axial force in the member CB (Fcb) is \",round(Fcb),\"kN\"\n",
+ "print\"The axial force in the member EC (Fec) is \",round(Fec),\"kN\"\n",
+ "print\"The axial force in the member ED (Fed) is \",round(Fed),\"kN\"\n",
+ "# Here -ve sign indicates COMPRESSIVE force & +ve indicates TENSILE force\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The axial force in the member DC (Fdc) is 1.0 kN\n",
+ "The axial force in the member DB (Fdb) is 1.0 kN\n",
+ "The axial force in the member CA (Fca) is 1.41 kN\n",
+ "The axial force in the member CB (Fcb) is -1.0 kN\n",
+ "The axial force in the member EC (Fec) is 0.0 kN\n",
+ "The axial force in the member ED (Fed) is 0.0 kN\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.9-5,Page No:206"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "W1=1000 #N # Load acting at the end pannels and the ridge\n",
+ "W2=2000 #N # Load acting at the intermidiate pannels\n",
+ "Laf=1 #m\n",
+ "Lgf=1 #m\n",
+ "Lag=2 #m\n",
+ "Lbg=1 #m\n",
+ "Lab=3 #m\n",
+ "theta=30 #degree # angle made by the principal rafter with the tie beam\n",
+ "beta=60 #degree # angle made by the slings (i.e members CF & CG) with the tie beam\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# consider the equilibrium of the entire truss as a F.B.D\n",
+ "Xa=2*(W1*sin(theta*(pi/180)))+(W2*sin(theta*(pi/180))) #N # sum Fx=0\n",
+ "Rb=((W2*Laf*cos(theta*(pi/180)))+(W1*Lag*cos(theta*(pi/180))))/Lab # N # Moment at A=0\n",
+ "Ya=2*(W1*cos(theta*(pi/180)))+(W2*cos(theta*(pi/180)))-(Rb) #N # sum Fy=0\n",
+ "\n",
+ "# Now pass a section through the truss such that it cuts the members CE,CG & FG. Now consider the equilibrium of the right hand side of the truss\n",
+ "\n",
+ "# Take moment about C\n",
+ "Ffg=(Rb*(Lbg+0.5))/(0.5*tan(beta*(pi/180))) # N # (T) # Here 0.5 is the half distance of Lgf\n",
+ "\n",
+ "# Take moment about G\n",
+ "Fce=(-Rb*Lbg)/(Lbg*sin(theta*(pi/180))) # N # (C)\n",
+ "\n",
+ "# Take moment about B\n",
+ "Fcg=0/(Lbg*sin(beta*(pi/180))) # N\n",
+ "\n",
+ "# Results \n",
+ "\n",
+ "print\"The axial force in the member FG (Ffg) is \",round(Ffg),\"N\"\n",
+ "print\"The axial force in the member CE (Fce) is \",round(Fce),\"N\"\n",
+ "print\"The axial force in the member CG (Fcg) is \",round(Fcg),\"N\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The axial force in the member FG (Ffg) is 2000.0 N\n",
+ "The axial force in the member CE (Fce) is -2309.0 N\n",
+ "The axial force in the member CG (Fcg) is 0.0 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.9-6,Page No:208"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "W1=100 #N # load acting at pt. C vertically\n",
+ "W2=50 #N # load acting at point B horizontaly\n",
+ "L=2 #m # length of each bar in the hexagonal truss\n",
+ "theta=60 #degree # internal angle of the truss\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# We calculate the values of different members of the truss\n",
+ "HG=L*sin(theta*(pi/180))\n",
+ "AF=L\n",
+ "\n",
+ "# Support A is hinged whereas support F is a roller support. Firstly we find the support reactios as follows,\n",
+ "Rf=(W2*HG)/AF #N # moment at F\n",
+ "Xa=W2 #N # sum Fx=0\n",
+ "Ya=W1-Rf #N # sum Fy=0\n",
+ "\n",
+ "# Now pass a section through the truss cutting the members CD,GD,GE & GF and consider equilibrium of right hand portion of the truss\n",
+ "Fcd=(Rf*(L/2))/(L*sin(theta*(pi/180))) # N (C) # Taking moment about G\n",
+ "\n",
+ "# Now pass a scetion pq cutting the members CB,GB & GA\n",
+ "Fga=((Rf*(L+(L/2)))-(W1*(L/2)))/(L*sin(theta*(pi/180))) # N (T) # Taking moment about B\n",
+ "\n",
+ "# take moment about G\n",
+ "Fcb=((W1*(L/2))+(Rf*(L/2)))/(L*sin(theta*(pi/180))) # N (C)\n",
+ "Fgb=(Fcb*cos(theta*(pi/180)))-(Fga*cos(theta*(pi/180))) # N (T) # sum Fx=0\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The axial force in the member CD (Fcd) is \",round(Fcd),\"N\"\n",
+ "print\"The axial force in the member GB (Fgb) is \",round(Fgb,2),\"N\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The axial force in the member CD (Fcd) is 25.0 N\n",
+ "The axial force in the member GB (Fgb) is 32.74 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.9-10,Page No:214"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "W=24 # kN # Load acting at pt C\n",
+ "Laf=12 # m # length of the tie beam\n",
+ "l=4 # m# length of each member in the tie\n",
+ "h=3 # m # height of the slings\n",
+ "Lae=8 # m\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "s=((l**2)+(h**2))**0.5 # m # sloping length \n",
+ "\n",
+ "# From triangle BCD,\n",
+ "theta=arccos(h/s)*(180/pi)\n",
+ "\n",
+ "# SUPPORT REACTIONS\n",
+ "Rf=(W*l)/Laf # kN # take moment at A\n",
+ "Ra=W-Rf # kN # sum Fy=0\n",
+ "\n",
+ "# now pass a sectio mn through the truss and consider te equilibrium of the left hand portion \n",
+ "Fce=(Ra*l)*h**-1 # kN (T) # Take moment at B\n",
+ "\n",
+ "Fbd=((W*l)-(Ra*Lae))*h**-1 # kN (C) # take moment at E\n",
+ "\n",
+ "Fbe=(Ra-W)*(cos(theta*(pi/180)))**-1 # kN\n",
+ "\n",
+ "Fbd2=(-Ra*l)*h**-1 # kN # take moment at C\n",
+ "\n",
+ "Fce2= ((Ra*Lae)-(W*l))*h**-1# kN (T) # take moment at D\n",
+ "\n",
+ "Fcd=(W-Ra)*(cos(theta*(pi/180)))**-1 # kN (T) # sum Fy=0\n",
+ "\n",
+ "# Resuts\n",
+ "\n",
+ "print\"(1) The axial force in the bar CE (Fce) is \",round(Fce,2),\"kN\" \n",
+ "print\"(2) The axial force in the bar BD (Fbd) is \",round(Fbd,3),\"kN\"#answer in textbook is wrong \n",
+ "print\"(3) The axial force in the bar BE (Fbe) is \",round(Fbe,2),\"kN\" \n",
+ "print\"(4) The axial force in the bar CE (Fce) is \",round(Fce2,2),\"kN\"#answer in textbook is wrong \n",
+ "print\"(5) The axial force in the bar BD (Fbd) is \",round(Fbd2,3),\"kN\" \n",
+ "print\"(6) The axial force in the bar CD (Fcd) is \",round(Fcd,2),\"kN\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(1) The axial force in the bar CE (Fce) is 21.33 kN\n",
+ "(2) The axial force in the bar BD (Fbd) is -10.667 kN\n",
+ "(3) The axial force in the bar BE (Fbe) is -13.33 kN\n",
+ "(4) The axial force in the bar CE (Fce) is 10.67 kN\n",
+ "(5) The axial force in the bar BD (Fbd) is -21.333 kN\n",
+ "(6) The axial force in the bar CD (Fcd) is 13.33 kN\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.9-12,Page No:224"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "W1=4 # kN # load acting at a distance of 5 m from C\n",
+ "W2=3 # kN # load acting at a distance of 7.5 m from C\n",
+ "L=30 #m # distance AB\n",
+ "L1=15 # dist AC\n",
+ "L2=15 #m #dist BC\n",
+ "l1=10 #m # distance between A and 4 kN load\n",
+ "l2=22.5 #m # distance between A and 3 kN load\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# (1) Reactions\n",
+ "Yb=((W1*l1)+(W2*l2))/L # kN # Take moment at A\n",
+ "Ya=W1+W2-Yb # kN # sum Fy=0\n",
+ "\n",
+ "# Xa=Xb........(eq'n 1) // sum Fx=0\n",
+ "# (2) Dismember\n",
+ "# Member AC. Consider equilibrium of member AC\n",
+ "# Xa=Xc ... Consider thus as eq'n 2 // sum Fx=0\n",
+ "Yc=W1-Ya # kN # sum Fy=0\n",
+ "# Take moment about A\n",
+ "Xc=((W1*l1)-(Yc*L1))/L1 # kN \n",
+ "\n",
+ "# now from eq'n 1 & 2\n",
+ "Xa=Xc # kN\n",
+ "Xb=Xa # kN\n",
+ "\n",
+ "# The components of reactions at A & B are,\n",
+ "Ra=(Xa**2+Ya**2)**0.5 # kN\n",
+ "Rb=(Xb**2+Yb**2)**0.5 # kN\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The reaction at A ( Ra) is \",round(Ra,2),\"kN\"\n",
+ "print\"The reaction at B ( Rb) is \",round(Rb,2),\"kN\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The reaction at A ( Ra) is 4.0 kN\n",
+ "The reaction at B ( Rb) is 4.14 kN\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.9-13,Page No:225"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "W1=2 # kN # load acting at a distance of 1m from point A\n",
+ "W2=1 # kN # load acting at a distance of 1m from point B\n",
+ "theta=30 # degree\n",
+ "L=4 # m # length of the tie beam\n",
+ "l=1 #m # length of each member in the tie\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# (a) Reactions\n",
+ "Yb=((W1*l)+(W2*3*l))*L**-1 # kN # Taking moment about A\n",
+ "Ya=W1+W2-Yb # kN # sum Fy=0\n",
+ "\n",
+ "# (b) Dismember\n",
+ "# MEMBER AB\n",
+ "# Xa=Xb........ (eq'n 1) # sum Fx=0\n",
+ "# MEMBER AC\n",
+ "# Xa=Xc.........(eq'n 2) # sum Fx=0\n",
+ "Yc=W1-Ya # kN # sum Fy=0\n",
+ "# Taking moment about A\n",
+ "Xc=((W1*l)-(Yc*2*l))*(2*tan(theta*(pi/180)))**-1 # kN\n",
+ "# From eq'n 1 & 2\n",
+ "Xa=Xc # kN\n",
+ "Xb=Xa # kN\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The force in tie bar AB is \",round(Xb,3),\"kN\" #due to decimal variance answer varies by 0.44kN\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The force in tie bar AB is 1.299 kN\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.9-14,Page No:226"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "W=1000 # N \n",
+ "r=0.25 # radius of pulley at E \n",
+ "Lab=2 #m\n",
+ "Lad=1 # m\n",
+ "Lbd=1 # m \n",
+ "Ldc=0.75 # m\n",
+ "l1=0.5 #m # c/c distance between bar AB and point E\n",
+ "l2=1.25 # m # dist between rigid support and the weight\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# (a) Reactions\n",
+ "Xa=W # N # sum Fx=0\n",
+ "Yb=((W*l1)+(W*l2))/Lab # N # Take moment about A\n",
+ "Ya=W-Yb # N # sum Fy=0\n",
+ "\n",
+ "# Dismember\n",
+ "# MEMBER ADB\n",
+ "# consider triangle BCD to find theta, where s= length of bar BC, \n",
+ "s=(Lbd**2+Ldc**2)**0.5 # m\n",
+ "theta=arccos(Lbd/s)*(180/pi) # degree\n",
+ "\n",
+ "# equilibrium eq'n of member ADB\n",
+ "Yd=(Ya*Lab)/Lad # take moment about B\n",
+ "Fbc=(Yb+Ya-Yd)/sin(theta*(pi/180)) # N # sum Fy=0\n",
+ "Xd=(Fbc*cos(theta*(pi/180)))+(Xa) # N # sum Fx=0\n",
+ "\n",
+ "# PIN D\n",
+ "Rd=(Xd**2+Yd**2)**0.5 # N # shear force on the pin\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The compressive force in bar BC (Fbc) is \",round(Fbc),\"N\"\n",
+ "print\"The shear force on the pin is \",round(Rd,1),\"N\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The compressive force in bar BC (Fbc) is 1250.0 N\n",
+ "The shear force on the pin is 2015.6 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 51
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.9-15,Page No:229"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "import numpy as np\n",
+ "# Initiliztion of variables\n",
+ "\n",
+ "P=5000 # N\n",
+ "theta=45 # degree # angle made by Rd & Re with the horizontal\n",
+ "Lab=3 # m\n",
+ "Lac=3 # m\n",
+ "Lbd=2 # m\n",
+ "Lce=2 # m\n",
+ "l=1.5 # m # dist of load P from B\n",
+ "\n",
+ "# Calculations (BEAM AB )\n",
+ "# Consider the equilibrium of beams \n",
+ "# We are using matrix to solve the simultaneous eqn's \n",
+ "A=np.array([[(Lbd*sin(theta*(pi/180))), Lab],[(Lce*sin(theta*(pi/180))) ,-Lac]])\n",
+ "B=np.array([(P*l), 0])\n",
+ "C=np.linalg.solve(A,B)\n",
+ "# Calculations (BEAM AC)\n",
+ "Re=C[0] # N (C) # from eq'n 1\n",
+ "Ya=(Re*Lce*sin(theta*(pi/180)))/Lac # N #from eq'n 7\n",
+ "Xa=C[0]*cos(theta*(pi/180)) # N # from eq'n 2\n",
+ "Ra=(Xa**2+Ya**2)**0.5 # N (C)\n",
+ "Yb=P-Ya-(C[0]*sin(theta*(pi/180))) # N (C) # eq'n 3\n",
+ "Yc=Ya-(Re*sin(theta*(pi/180))) # N (T)\n",
+ "\n",
+ "# Results \n",
+ "\n",
+ "print\"(1) The value of axial force (Rd) in bar 2 is \",round(C[0]),\"N\"\n",
+ "print\"(2) The value of axial force (Re) in bar 3 is \",round(Re),\"N\"\n",
+ "print\"(3) The value of axial force (Yb) in bar 1 is \",round(Yb),\"N\"\n",
+ "print\"(4) The value of axial force (Yc) in bar 4 is \",round(Yc),\"N\"\n",
+ "# here consider Yc as +ve coz the assumed direction of the force was compressive which is to be reversed\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(1) The value of axial force (Rd) in bar 2 is 2652.0 N\n",
+ "(2) The value of axial force (Re) in bar 3 is 2652.0 N\n",
+ "(3) The value of axial force (Yb) in bar 1 is 1875.0 N\n",
+ "(4) The value of axial force (Yc) in bar 4 is -625.0 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter10_16.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter10_16.ipynb
new file mode 100644
index 00000000..3563e562
--- /dev/null
+++ b/Engineering_Mechanics_by_Tayal_A.K./chapter10_16.ipynb
@@ -0,0 +1,378 @@
+{
+ "metadata": {
+ "name": "chapter10.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 10: Uniform Flexible Suspension Cables"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.10-1,Page No:238"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "W1=400 # N # vertical load at pt C\n",
+ "W2=600 # N # vertical load at pt D\n",
+ "W3=400 # N # vertical load at pt E\n",
+ "l=2 # m # l= Lac=Lcd=Lde=Leb\n",
+ "h=2.25 # m # distance of the cable from top\n",
+ "L=2 # m # dist of A from top\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Solving eqn's 1&2 using MATRIX for Xb & Yb\n",
+ "A=np.array([[-L ,4*l],[-h, 2*l]])\n",
+ "B=np.array([((W1*l)+(W2*2*l)+(W1*3*l)),(W1*l)])\n",
+ "C=np.linalg.solve(A,B)\n",
+ "\n",
+ "# Now consider the F.B.D of BE, Take moment at E\n",
+ "y_e=(C[1]*l)/C[0] # m / here y_e is the distance between E and the top\n",
+ "theta_1=arctan(y_e/l)*(180/pi) # degree # where theta_1 is the angle between BE and the horizontal\n",
+ "T_BE=C[0]/cos(theta_1*(pi/180)) # N (T_BE=T_max)\n",
+ "\n",
+ "# Now consider the F.B.D of portion BEDC\n",
+ "# Take moment at C\n",
+ "y_c=((C[1]*6)-(W3*4)-(W2*2))/(C[0]) # m\n",
+ "theta_4=arctan(((y_c)-(l))/(l))*(180/pi) # degree\n",
+ "T_CA=C[0]/cos(theta_4*(pi/180)) # N # Tension in CA\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"(i) The horizontal reaction at B (Xb) is \",round(C[0]),\"N\"\n",
+ "print\"(i) The vertical reaction at B (Yb) is \",round(C[1]),\"N\"\n",
+ "print\"(ii) The sag at point E (y_e) is \",round(y_e,3),\"m\"\n",
+ "print\"(iii) The tension in portion CA (T_CA) is \",round(T_CA,1),\"N\"\n",
+ "print\"(iv) The max tension in the cable (T_max) is \",round(T_BE,1),\"N\" #answer varies due to decimal variance\n",
+ "print\"(iv) The max slope (theta_1) in the cable is \",round(theta_1,1),\"degree\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The horizontal reaction at B (Xb) is 1600.0 N\n",
+ "(i) The vertical reaction at B (Yb) is 1100.0 N\n",
+ "(ii) The sag at point E (y_e) is 1.375 m\n",
+ "(iii) The tension in portion CA (T_CA) is 1627.9 N\n",
+ "(iv) The max tension in the cable (T_max) is 1941.6 N\n",
+ "(iv) The max slope (theta_1) in the cable is 34.5 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.10-2,Page No:241"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initiization of variables\n",
+ "\n",
+ "W1=100 # N # Pt load at C\n",
+ "W2=150 # N # Pt load at D\n",
+ "W3=200 # N # Pt load at E\n",
+ "l=1 # m # l=Lac=Lcd=Lde=Leb\n",
+ "h=2 # m # dist between Rb & top\n",
+ "Xa=200 # N\n",
+ "Xb=200 # N\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# consider the F.B.D of entire cable\n",
+ "# Take moment at A\n",
+ "Yb=((W1*l)+(W2*2*l)+(W3*3*l)-(Xb*h))/(4*l) # N\n",
+ "Ya=W1+W2+W3-Yb # N # sum Fy=0\n",
+ "# Now consider the F.B.D of AC\n",
+ "\n",
+ "# Take moment at C,\n",
+ "y_c=(Ya*l)/Xa # m\n",
+ "theta_1=arctan(y_c/l)*(180/pi) # degree\n",
+ "T_AC=Xa/cos(theta_1*(pi/180)) # N # T_AC*cosd(theta_1)=horizontal component of tension in the cable\n",
+ "# here, T_AC=T_max\n",
+ "T_max=(Xa**2+Ya**2)**0.5 # N\n",
+ "T_AC=T_max\n",
+ "\n",
+ "# Now consider the F.B.D of portion ACD\n",
+ "y_d=((Ya*2*l)-(W1*l))/(Xa) # m # taking moment at D\n",
+ "theta_2=arctan(((y_d)-(y_c))/(l))*(180/pi) # degree\n",
+ "T_CD=Xa/(cos(theta_2*(pi/180))) # N \n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"(i) The component of support reaction at A (Ya) is \",round(Ya),\"N\"\n",
+ "print\"(i) The component of support reaction at B (Yb) is \",round(Yb),\"N\"\n",
+ "print\"(ii) The tension in portion AC (T_AC) of the cable is \",round(T_AC,1),\"N\"\n",
+ "print\"(ii) The tension in portion CD (T_CD) of the cable is \",round(T_CD,1),\"N\"\n",
+ "print\"(iii) The max tension in the cable is \",round(T_max,1),\"N\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The component of support reaction at A (Ya) is 300.0 N\n",
+ "(i) The component of support reaction at B (Yb) is 150.0 N\n",
+ "(ii) The tension in portion AC (T_AC) of the cable is 360.6 N\n",
+ "(ii) The tension in portion CD (T_CD) of the cable is 282.8 N\n",
+ "(iii) The max tension in the cable is 360.6 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.10-3,Page No:246"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "w=75 # kg/m # mass per unit length of thw pipe\n",
+ "l=20 # m # dist between A & B\n",
+ "g=9.81 #m/s^2 # acc due to gravity\n",
+ "y=2 # m # position of C below B\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Let x_b be the distance of point C from B \n",
+ "# In eq'n x_b^2+32*x_b-320=0\n",
+ "a=1\n",
+ "b=32\n",
+ "c=-320\n",
+ "x_b=(-b+(b**2-(4*a*c))**0.5)/(2*a) # m # we get x_b by equating eqn's 1&2\n",
+ "\n",
+ "# Now tension T_0\n",
+ "T_0=((w*g*x_b**2)/(2*y))*(10**-3) #kN # from eq'n 1\n",
+ "\n",
+ "# Now the max tension occurs at point A,hence x is given as,\n",
+ "x=20-x_b # m\n",
+ "w_x=w*g*x*10**(-3) # kN \n",
+ "T_max=((T_0)**2+(w_x)**2)**0.5 # kN # Maximum Tension\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The lowest point C which is situated at a distance (x_b) from support B is \",round(x_b),\"m\"\n",
+ "print\"The maximum tension (T_max) in the cable is \",round(T_max,2),\"kN\"\n",
+ "print\"The minimum tension (T_0) in the cable is \",round(T_0,2),\"kN\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The lowest point C which is situated at a distance (x_b) from support B is 8.0 m\n",
+ "The maximum tension (T_max) in the cable is 14.71 kN\n",
+ "The minimum tension (T_0) in the cable is 11.77 kN\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.10-4,Page No:247"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "m=0.5 # kg/m # mass of the cable per unit length\n",
+ "g=9.81 # m/s^2\n",
+ "x=30#/ m # length AB\n",
+ "y=0.5 # m # dist between C & the horizontal\n",
+ "x_b=15 # m # dist of horizontal from C to B\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "w=m*g # N/m # weight of the cable per unit length\n",
+ "T_0=(w*x_b**2)/(2*y) # N # From eq'n 1\n",
+ "T_B=((T_0)**2+(w*x*0.5)**2)**0.5 # N # Tension in the cable at point B\n",
+ "W=T_B # N # As pulley is frictionless the tension in the pulley on each side is same,so W=T_B\n",
+ "\n",
+ "\n",
+ "# Slope of the cable at B,\n",
+ "theta=arccos(T_0/T_B)*(180/pi) # degree\n",
+ "\n",
+ "# Now length of the cable between C & B is,\n",
+ "S_cb =x_b*(1+((2/3)*(y/x_b)*0.5)) # m\n",
+ "\n",
+ "\n",
+ "# Now total length of the cable AB is,\n",
+ "S_ab=2*S_cb # m \n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"(i) The magnitude of load W is \",round(W),\"N\"\n",
+ "print\"(ii) The angle of the cable with the horizontal at B is \",round(theta,1),\"degree\"\n",
+ "print\"(iii) The total length of the cable AB is \",round(S_ab),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The magnitude of load W is 1106.0 N\n",
+ "(ii) The angle of the cable with the horizontal at B is 3.8 degree\n",
+ "(iii) The total length of the cable AB is 30.0 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 116
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.10-5,Page No:249"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "x=30 # m # distance between two electric poles\n",
+ "Tmax=400 # N # Max Pull or tension\n",
+ "w=3 # N/m # weight per unit length of the cable\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# The cable is assumed to be parabolic in shape, its eq'n is y=w*x^2/2*T_0.....(eq'n 1). Substuting the co-ordinates of point B (l/2,h), where h is the sag in the cable.This gives, T_0=(w*(l/2)^2)/(2*h)=wl^2/8*h\n",
+ "# Now the maximum pull or tension occurs at B,\n",
+ "T_B=Tmax # N \n",
+ "# Hence T_B=Tmax=sqrt(T_0^2+(w*l/2)^2). On simplyfyingthis eq'n we get, \n",
+ "h=(x**2)**0.5/((16*(((Tmax*2)**2/(w*x)**2)))+(1))**0.5 # m \n",
+ "\n",
+ "# Results \n",
+ "\n",
+ "print\"The smallest value of the sag in the cable is \",round(h,3),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The smallest value of the sag in the cable is 0.843 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 72
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.10-6,Page No:252"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "l=200 # m # length of the cable\n",
+ "m=1000 # kg # mass of the cable\n",
+ "S=50 # m # sag in the cable\n",
+ "s=l/2 # m\n",
+ "g=9.81 # m/s^2\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "w=(m*g)/l # N/m # mass per unit length of the cable\n",
+ "# Substuting the values s=l/2 & y=c+S in eq'n 1 to get the value of c,\n",
+ "c=7500/100 # m \n",
+ "Tmax=((w*c)**2+(w*s)**2)**0.5 # N # Maximum Tension\n",
+ "# To determine the span (2*x) let us use the eq'n of catenary, y=c*cosh(x/c), where y=c+50. On simplyfying we get y/c=cosh(x/c), here let y/c=A\n",
+ "y=c+50\n",
+ "\n",
+ "A=1.666 \n",
+ "x=c*(arccosh(A))*(pi/180)# m \n",
+ "L=2*x*(180/pi) # m # where L= span\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The horizontal distance between the supports and the max Tension (L) is \",round(L),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The horizontal distance between the supports and the max Tension (L) is 165.0 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 114
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter12_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter12_15.ipynb
new file mode 100644
index 00000000..9f1a8645
--- /dev/null
+++ b/Engineering_Mechanics_by_Tayal_A.K./chapter12_15.ipynb
@@ -0,0 +1,411 @@
+{
+ "metadata": {
+ "name": "chapter12.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 12: Moment Of Inertia"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.12-7,Page No:285"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "A= 50 # cm^2 # area of the shaded portion\n",
+ "J_A=22.5*10**2 # cm^4 # polar moment of inertia of the shaded portion\n",
+ "d=6 # cm\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "J_c=J_A-(A*d**2) \n",
+ "\n",
+ "# substuting the value of I_x from eq'n 2 in eq'n 1 we get,\n",
+ "I_y=J_c*0.333 # cm^4 # M.O.I about Y-axis # 1/3=0.333\n",
+ "\n",
+ "# Now from eq'n 2,\n",
+ "I_x=2*I_y # cm^4 # M.O.I about X-axis\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The centroidal moment of inertia about X-axis (I_x) is \",round(I_x),\"cm^4\"\n",
+ "print\"The centroidal moment of inertia about Y-axis (I_y) is \",round(I_y),\"cm^4\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The centroidal moment of inertia about X-axis (I_x) is 300.0 cm^4\n",
+ "The centroidal moment of inertia about Y-axis (I_y) is 150.0 cm^4\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.12-8,Page No:288"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "b=20 # cm # width of the pate\n",
+ "d=30 # cm # depth of the plate\n",
+ "r=15 # cm # radius of the circular hole\n",
+ "h=20 # cm # distance between the centre of the circle & the x-axis\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# (a) Location of the centroid of the composite area\n",
+ "\n",
+ "A_1=b*d # cm^2 # area of the plate\n",
+ "y_1=d/2 # cm # y-coordinate of the centroid\n",
+ "A_2=(pi*r**2)/4 # cm^2 # area of the circle removed (negative)\n",
+ "y_2=h # cm # y-coordinate of the centroid\n",
+ "y_c=((A_1*y_1)-(A_2*y_2))/(A_1-A_2) # cm # from the bottom edge\n",
+ "\n",
+ "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n",
+ "\n",
+ "# Area (A_1) M.I of area A_1 about x-axis\n",
+ "I_x1=(b*(d**3))/12 # cm^4\n",
+ "\n",
+ "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n",
+ "OC_1=15 # cm # from the bottom edge\n",
+ "OC_2=20 # cm\n",
+ "OC=12.9 # cm # from the bottom edge\n",
+ "d_1=OC_1-OC # cm\n",
+ "d_2=OC_2-OC # cm \n",
+ "I_X1=(I_x1)+(A_1*d_1**2) # cm^4\n",
+ "\n",
+ "# Area(A_2) M.I of area A_2 about x-axis\n",
+ "I_x2=(pi*r**4)/64 # cm^2\n",
+ "\n",
+ "#M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n",
+ "I_X2=(I_x2)+(A_2*d_2**2) # cm^4\n",
+ "\n",
+ "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n",
+ "I_x=(I_X1)-(I_X2) # cm^4\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"cm^4\" \n",
+ "#due to decimal variance answer varies by 1cm^4 from textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The M.O.I of the composite area about the centroidal x-axis is 36253.0 cm^4\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.12-9,Page No:289"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "b1=80 # mm # width of the flange pate\n",
+ "d1=20 # mm # depth of the flange plate\n",
+ "b2=40 # mm # width/thickness of the web\n",
+ "d2=60 # mm # depth of the web\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# (a) Location of the centroid of the composite area\n",
+ "A_1=b1*d1 # mm^2 # area of the flange plate\n",
+ "y_1=d2+(d1/2) # mm # y-coordinate of the centroid\n",
+ "A_2=b2*d2 # mm^2 # area of the web\n",
+ "y_2=d2/2 # mm # y-coordinate of the centroid\n",
+ "y_c=((A_1*y_1)+(A_2*y_2))/(A_1+A_2) # mm # from the bottom edge\n",
+ "\n",
+ "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n",
+ "\n",
+ "# Area (A_1) M.I of area A_1 about x-axis\n",
+ "I_x1=(b1*(d1**3))/12 # mm^4\n",
+ "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n",
+ "OC_1=70 # mm # from the bottom edge\n",
+ "OC_2=30 # mm # from the bottom edge\n",
+ "OC=y_c # mm # from the bottom edge\n",
+ "d_1=(d2-y_c)+(d1/2) # mm\n",
+ "d_2=y_c-OC_2 # mm \n",
+ "I_X1=(I_x1)+(A_1*d_1**2) # mm^4\n",
+ "\n",
+ "# Area(A_2) M.I of area A_2 about x-axis\n",
+ "I_x2=(b2*d2**3)/12 # mm^4\n",
+ "# M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n",
+ "I_X2=(I_x2)+(A_2*d_2**2) # mm^4\n",
+ "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n",
+ "I_x=(I_X1)+(I_X2) # mm^4\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"mm^4\"\n",
+ "# NOTE: The answer given in the text book is 2.31*10^3 insted of 2.31*10^6.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The M.O.I of the composite area about the centroidal x-axis is 2309333.0 mm^4\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.12-10,Page No:291"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "b1=120 # mm # width of the flange pate of L-section\n",
+ "d1=20 # mm # depth of the flange plate\n",
+ "b2=20 # mm # width/thickness of the web\n",
+ "d2=130 # mm # depth of the web\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# (a) Location of the centroid of the composite area\n",
+ "A_1=b1*d1 # mm^2 # area of the flange plate\n",
+ "A_2=b2*d2 # mm^2 # area of the web\n",
+ "y_1=d2+(d1/2) # mm # y-coordinate of the centroid\n",
+ "y_2=d2/2 # mm # y-coordinate of the centroid\n",
+ "x_1=60 # mm # x-coordinate of the centroid\n",
+ "x_2=110 # mm # x-coordinate of the centroid\n",
+ "y_c=((A_1*y_1)+(A_2*y_2))/(A_1+A_2) # mm # from the bottom edge\n",
+ "x_c=((A_1*x_1)+(A_2*x_2))/(A_1+A_2) # mm # from the bottom edge\n",
+ "\n",
+ "# (b) Moment of Inertia of the composite area about the centroidal x-axis\n",
+ "\n",
+ "# Area (A_1) M.I of area A_1 about x-axis\n",
+ "I_x1=(b1*(d1**3))/12 # mm^4\n",
+ "# M.I of the area A_1 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n",
+ "OC_1=d2+(d1/2) # mm # from the bottom edge\n",
+ "OC_2=d2/2 # mm # from the bottom edge\n",
+ "OC=y_c # mm # from the bottom edge\n",
+ "d_1=(d2-y_c)+(d1/2) # mm\n",
+ "d_2=y_c-OC_2 # mm \n",
+ "I_X1=(I_x1)+(A_1*d_1**2) # mm^4\n",
+ "\n",
+ "# Area(A_2) M.I of area A_2 about x-axis\n",
+ "I_x2=(b2*d2**3)/12 # mm^4\n",
+ "\n",
+ "# M.I of the area A_2 about the centroidal x-axis of the composite area (By parallel-axis theorem)\n",
+ "I_X2=(I_x2)+(A_2*d_2**2) # mm^4\n",
+ "# COMPOSITE AREA:M.O.I of the composite area about the centroidal x-axis\n",
+ "I_x=(I_X1)+(I_X2) # mm^4\n",
+ "\n",
+ "# (c) Moment of Inertia of the composite area about the centroidal y-axis\n",
+ "\n",
+ "# Area (A_1) M.I of area A_1 about y-axis\n",
+ "I_y1=(d1*(b1**3))/12 # mm^4\n",
+ "# M.I of the area A_1 about the centroidal y-axis of the composite area (By parallel-axis theorem)\n",
+ "d_3=x_c-(b1/2) # mm # distance between c &c1 along x axis\n",
+ "I_Y1=(I_y1)+(A_1*d_3**2) # mm^4\n",
+ "\n",
+ "# Area(A_2) M.I of area A_2 about y-axis\n",
+ "I_y2=(d2*b2**3)/12 # mm^4\n",
+ "\n",
+ "# M.I of the area A_2 about the centroidal y-axis of the composite area (By parallel-axis theorem)\n",
+ "d_4=b1-x_c-(b2/2) # mm # distance between c &c2 along x axis\n",
+ "I_Y2=(I_y2)+(A_2*d_4**2) # mm^4\n",
+ "# COMPOSITE AREA:M.O.I of the composite area about the centroidal y-axis\n",
+ "I_y=(I_Y1)+(I_Y2) # mm^4\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The M.O.I of the composite area about the centroidal x-axis is \",round(I_x),\"mm^4\"\n",
+ "print\"The M.O.I of the composite area about the centroidal Y-axis is \",round(I_y),\"mm^4\"\n",
+ "# NOTE: The answer for I_x given in text book is 0.76*10^6 insted of 10.76*10^6\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The M.O.I of the composite area about the centroidal x-axis is 10761666.0 mm^4\n",
+ "The M.O.I of the composite area about the centroidal Y-axis is 6086666.0 mm^4\n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.12-14,Page No:299"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "b=1 # cm # smaller side of the L-section\n",
+ "h=4 # cm # larger side of the L-section\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# (A) RECTANGLE A_1: Using the paralel axis theorem\n",
+ "Ixy=0\n",
+ "I_xy1=(Ixy)+((h*b)*(b*0.5)*(h*0.5)) # cm**4\n",
+ "\n",
+ "# (B) RECTANGLE A_2: Using the paralel axis theorem\n",
+ "I_xy2=(Ixy)+((b*(h-1))*(1+(1.5))*(b*0.5)) # cm**4\n",
+ "\n",
+ "# Product of inertia of the total area\n",
+ "I_xy=I_xy1+I_xy2 # cm**4\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The Product of inertia of the L-section is \",round(I_xy,2),\"cm^4\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Product of inertia of the L-section is 7.75 cm^4\n"
+ ]
+ }
+ ],
+ "prompt_number": 47
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.12-15,Page No:300"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "I_x=1548 # cm^4 # M.O.I of the Z-section about X-axis\n",
+ "I_y=2668 # cm^4 # M.O.I of the Z-section about Y-axis\n",
+ "b=12 # cm # width of flange of the Z-section\n",
+ "d=3 # cm # depth of flange of the Z-section\n",
+ "t=2 # cm # thickness of the web of the Z-section\n",
+ "h=6 # cm # depth of the web of the Z-section\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "A_1=b*d # cm^2 # area of top flange\n",
+ "x_1=-5 # cm # distance of the centroid from X-axis for top flange\n",
+ "y_1=4.5 # cm # distance of the centroid from Y-axis for top flange\n",
+ "A_2=t*h # cm^2 # area of web\n",
+ "x_2=0 # cm # distance of the centroid from X-axis for the web\n",
+ "y_2=0 # cm # distance of the centroid from Y-axis for the web\n",
+ "A_3=b*d # cm^2 # area of bottom flange\n",
+ "x_3=5 # cm # distance of the centroid from X-axis for top flange\n",
+ "y_3=-4.5 # cm # distance of the centroid from Y-axis for top flange\n",
+ "\n",
+ "# Product of Inertia of the total area is,\n",
+ "I_xy=((A_1*x_1*y_1)+(A_3*x_3*y_3)) # cm^4\n",
+ "# The direction of the principal axes is,\n",
+ "theta_m=(arctan((2*I_xy)/(I_y-I_x))*(180/pi))/2 # degree\n",
+ "# Principa M.O.I\n",
+ "I_max=((I_x+I_y)/2)+((((I_x-I_y)/2)**2+(I_xy)**2)**0.5) # cm**4\n",
+ "I_mini=((I_x+I_y)/2)-((((I_x-I_y)/2)**2+(I_xy)**2)**0.5) # cm**4\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The principal axes of the section about O is \",round(theta_m,2),\"degree\"\n",
+ "print\"The Maximum value of principal M.O.I is \",round(I_max),\"cm^4\"\n",
+ "print\"The Minimum value of principal M.O.I is \",round(I_mini),\"cm^4\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The principal axes of the section about O is -35.47 degree\n",
+ "The Maximum value of principal M.O.I is 3822.0 cm^4\n",
+ "The Minimum value of principal M.O.I is 394.0 cm^4\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter13_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter13_15.ipynb
new file mode 100644
index 00000000..690eeb8a
--- /dev/null
+++ b/Engineering_Mechanics_by_Tayal_A.K./chapter13_15.ipynb
@@ -0,0 +1,121 @@
+{
+ "metadata": {
+ "name": "chapter13.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 13: Principle Of Virtual Work"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.13-1,Page No:312"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "W=1000 # N # weight to be raised\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# From the Principle of virtual work,\n",
+ "P=W/2 # N\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The value of force (i.e P) that can hold the system in equilibrium is \",round(P),\"N\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of force (i.e P) that can hold the system in equilibrium is 500.0 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.13-7,Page No:317"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "P=1000 # N # Force acting at the hinge of the 1st square\n",
+ "Q=1000 # N # Force acting at the hinge of the 2nd square\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Chosing the co-ordinate system with originat A, we can write,\n",
+ "theta=45 # degree\n",
+ "\n",
+ "# Forces that do work are P,Q & X_B. Applying the principle of virtual work & Simplyfying and solving for X_B,\n",
+ "X_B=((2*P)*0.166666)*(cos(theta*(pi/180))/sin(theta*(pi/180))) # N # as 1/6=0.166666\n",
+ "\n",
+ "# Now give a virtual angular displacement to the whole frame about end A such that line AB turns by an angle delta_phi.\n",
+ "\n",
+ "# The force doing work are P,Q&Y_B.Applying the principle of virtual work & Simplyfying this eq'n and solving for Y_B,\n",
+ "Y_B=((3*Q)+P)*0.166666 # N # as 1/6=0.166666\n",
+ "\n",
+ "# Simply by removing the support at A & replacing it by the reactions X_A & Y_A we can obtain,\n",
+ "X_A=X_B # N\n",
+ "Y_A=P+Q-Y_B # N\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The Horizontal component of reaction at A (X_A) is \",round(X_A,1),\"N\"\n",
+ "print\"The Vertical component of reaction at A (Y_A) is \",round(Y_A,1),\"N\"\n",
+ "print\"The Horizontal component of reaction at B (X_B) is \",round(X_B,1),\"N\"\n",
+ "print\"The Vertical component of reaction at B (Y_B) is \",round(Y_B,1),\"N\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Horizontal component of reaction at A (X_A) is 333.3 N\n",
+ "The Vertical component of reaction at A (Y_A) is 1333.3 N\n",
+ "The Horizontal component of reaction at B (X_B) is 333.3 N\n",
+ "The Vertical component of reaction at B (Y_B) is 666.7 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter14_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter14_15.ipynb
new file mode 100644
index 00000000..5a718ded
--- /dev/null
+++ b/Engineering_Mechanics_by_Tayal_A.K./chapter14_15.ipynb
@@ -0,0 +1,1048 @@
+{
+ "metadata": {
+ "name": "chapter14.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 14: Rectilinear Motion Of A Particle"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.14-3,Page No:335"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "a_T=0.18 # m/s^2 # acc of trolley\n",
+ "# Calculations\n",
+ "a_B=-a_T*3**-1 # m/s^2 # from eq'n 4\n",
+ "t=4 # seconds\n",
+ "v_T=a_T*t # m/s # velocity of trolley after 4 seconds\n",
+ "v_B=-v_T*3**-1 # m/s # from eq'n 3\n",
+ "S_T=(0.5)*a_T*t**2 # m # distance moved by trolley in 4 sec\n",
+ "S_B=-S_T*3**-1 # m # from eq'n 2\n",
+ "# Results\n",
+ "\n",
+ "print\"The acceleration of block B is \",round(a_B,2),\"m/s^2\"\n",
+ "print\"The velocity of trolley & the block after 4 sec is \",round(v_T,2),\"m/s\",\"&\",round(v_B,2),\"m/s\"\n",
+ "print\"The distance moved by the trolley & the block is \",round(S_T,2),\"m\",\"&\",round(S_B,2),\"m\"\n",
+ "# The -ve sign indicates that the velocity or the distance travelled is in opposite direction.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The acceleration of block B is -0.06 m/s^2\n",
+ "The velocity of trolley & the block after 4 sec is 0.72 m/s & -0.24 m/s\n",
+ "The distance moved by the trolley & the block is 1.44 m & -0.48 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.14-4,Page No:338"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initiliztion of variables\n",
+ "\n",
+ "v_B=12 # cm/s # velocity of block B\n",
+ "u=0\n",
+ "s=24 # cm # distance travelled by bock B\n",
+ "t=5 # seconds\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "a_B=v_B**2/(2*s) # cm/s^2 # using eq'n v^2-u^2=28*a*s for block B. Here u=0\n",
+ "a_A=(1.5)*a_B # cm/s^2 # from eq'n 4 # Here a_A is negative which means acceleration is in opposite direction. However we consider +ve values for further calculations\n",
+ "v_A=u+(a_A*t) # m/s # using eq'n v=u+(a*t)\n",
+ "S_A=(u*t)+((0.5)*a_A*t**2) # m # using eq'n S=(u*t)+((1/2)*a*t^2)\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The acceleration of block A (a_A) is \",round(a_A,1),\"cm/s^2\"\n",
+ "print\"The acceleration of block B (a_B) is \",round(a_B),\"cm/s^2\"\n",
+ "print\"The velocity of block A (v_A) after 5 seconds is \",round(v_A,1),\"m/s\"\n",
+ "print\"The position of block A (S_A) after 5 seconds is \",round(S_A,2),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The acceleration of block A (a_A) is 4.5 cm/s^2\n",
+ "The acceleration of block B (a_B) is 3.0 cm/s^2\n",
+ "The velocity of block A (v_A) after 5 seconds is 22.5 m/s\n",
+ "The position of block A (S_A) after 5 seconds is 56.25 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.14-5,Page No:340"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "u=72*1000*60**-2 # km/hr # speed of the vehicle\n",
+ "s=300 # m # distance where the light is turning is red\n",
+ "t=20 # s # traffic light timed to remain red\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Now to find the acceleration we use the eq'n s=u*t+(1/2)*a*t^2\n",
+ "a=(((s)-(u*t))*2)*t**-2 # m/s^2 (Deceleration) \n",
+ "v=(u+(a*t))*(60*60*0.001) # km/hr # here we multiply with (60*60)/1000 to convert m/s to km/hr\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"(a) The required uniform acceleration of the car is \",round(a,2),\"m/s^2\"\n",
+ "print\"(b) The speed at which the motorist crosses the traffic light is \",round(v),\"km/hr\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The required uniform acceleration of the car is -0.5 m/s^2\n",
+ "(b) The speed at which the motorist crosses the traffic light is 36.0 km/hr\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.14-6,Page No:340"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "S=50 # m # height of the tower\n",
+ "v=25 # m/s # velocity at which the stone is thrown up from the foot of the tower\n",
+ "g=9.81 # m/s^2 # acc due to graity\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# The equation of time for the two stones to cross each other is given as,\n",
+ "t=S/v # seconds\n",
+ "S_1=(0.5)*g*t**2 # m # from the top\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The time (t) at which the two stones cross each other is \",round(t),\"seconds\"\n",
+ "print\"The two stones cross each other (from top) at a distance of \",round(S_1,1),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The time (t) at which the two stones cross each other is 2.0 seconds\n",
+ "The two stones cross each other (from top) at a distance of 19.6 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.14-7,Page No:341"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Intilization of variables\n",
+ "\n",
+ "acc=0.5 # m/s^2 # acceleration of the elevator\n",
+ "s=25 # m # distance travelled by the elevator from the top\n",
+ "u=0 # m/s\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Using eq'n the eq'n v^2-u^2=2*a*s, solving for v we get,\n",
+ "v=sqrt((2*acc*s)+(u^2)) # m/s \n",
+ "# Now solving eq'n 1 & 2 for t we get, (4.655*t^2)-(5*t)+(25)=0\n",
+ "# Find the roots of the eq'n using the eq'n,t=(-b+sqrt(b^2-(4*a*c)))/(2*a).In this eq'n the values of a,b & c are,\n",
+ "a=4.655\n",
+ "b=-5\n",
+ "c=-25\n",
+ "t=(-b+((b**2)-(4*a*c))**0.5)/(2*a) # seconds\n",
+ "\n",
+ "# Let S_1 be the distance travelled by the elevator after it travels 25 m from top when the stone hits the elevator,This disance S_1 is given as,\n",
+ "S_1=(v*t)+((1/2)*acc*t**2) # m\n",
+ "\n",
+ "# Let S be the total dist from top when the stone hits the elevator,\n",
+ "S=S_1+s # m\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The time taken by the stone to hit the elevator is \",round(t,3),\"second\"\n",
+ "print\"The distance (S)travelled by the elevator at the time of impact is \",round(S,2),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The time taken by the stone to hit the elevator is 2.916 second\n",
+ "The distance (S)travelled by the elevator at the time of impact is 40.15 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.14-9,Page No:343"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "v=60 # km/hr # velocity of the train\n",
+ "d1=15 # km # Distance travelled by the local train from the velocity-time graph (here d1= Area OED)\n",
+ "d2=12 # km # from the velocity-time graph (here d2= Area OABB')\n",
+ "d3=3 # km # from the velocity-time graph (here d3= Area BB'C)\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "t_1=d2*v**-1 # hr # time of travel for first 12 kms\n",
+ "t_2=(2*d3)*v**-1 # hr # time of for next 3 kms\n",
+ "\n",
+ "# Total time of travel for passenger train is given by eq'n\n",
+ "t=t_1+t_2 # hr\n",
+ "\n",
+ "# Now time of travel of the local train (let it be T) is given as,\n",
+ "T=2*t # hr\n",
+ "V_max=2*d1/T # km/hr\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The maximum speed of the local train is \",round(V_max),\"km/hr\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The maximum speed of the local train is 50.0 km/hr\n"
+ ]
+ }
+ ],
+ "prompt_number": 65
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.14-10,Page No:345"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "a=10 # m/s^2 # acceleration of the particle\n",
+ "S_5th=50 # m # distance travelled by the particle during the 5th second\n",
+ "t=5 # seconds\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# The distance travelled by the particle in time t is given by, S=(u*t)+(1/2)*a*t^2.....(consider this as eq'n 1)\n",
+ "# Here, The distance travelled by the particle in the 5th second=The distance travelled in 5 seconds - The distance travelled in 4 seconds..... (consider eq'n 2)\n",
+ "# Using eq'n 1: S_(0-5)=(5*u)+(1/2)*10*5^2 = 5*u+125.....(consider eq'n 3)\n",
+ "# again, S_(0-4)=(4*u)+(1/2)*10*4^2 = 4*u+80....(consider eq'n 4)\n",
+ "\n",
+ "# Now,put eq'n 3&4 in eq'n 2 and solve for u. We get, 50=[(5*u+125)-(4*u+80)] i.e 50=u+45\n",
+ "u=(S_5th)-45 # m/s\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The initial velocity of the particle is \",round(u),\"m/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The initial velocity of the particle is 5.0 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 66
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.14-11,Page No:345"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "# Conditions given are\n",
+ "t=1 # s\n",
+ "x=14.75 # m\n",
+ "v=6.33 # m/s\n",
+ "# Calculations\n",
+ "# We use expression 1,2 & 3 to find distance,velocity & acceleration of the particle after 2 sec\n",
+ "T=2 # sec\n",
+ "X=(T**4*12**-1)-(T**3*3**-1)+(T**2)+(5*T)+9 # m # eq'n 3\n",
+ "V=(T**3*3**-1)-(T**2)+(2*T)+5 # m/s \n",
+ "a=(T**2)-(2*T)+2 # m/s^2\n",
+ "# Results\n",
+ "\n",
+ "print\"The distance travelled by the particle is \",round(X,2),\"m\"\n",
+ "print\"The velocity of the particle is \",round(V,2),\"m/s\"\n",
+ "print\"The acceleration of the particle is \",round(a),\"m/s^2\"\n",
+ "# The answer may vary due to decimal point error\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The distance travelled by the particle is 21.67 m\n",
+ "The velocity of the particle is 7.67 m/s\n",
+ "The acceleration of the particle is 2.0 m/s^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.14-12,Page No:346"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Calculations\n",
+ "# From eq'n 2 it is clear that velocity of the particle becomes zero at t=3 sec\n",
+ "t=3 # sec .. from eq'n 2\n",
+ "# Position of particle at t=3 sec\n",
+ "x=(t**3)-(3*t**2)-(9*t)+12 # m # from eq'n 1\n",
+ "# Acc of particle at t=3 sec\n",
+ "a=6*(t-1) # m/s^2 # from eq'n 3\n",
+ "# Results\n",
+ "\n",
+ "print\"The time at which the velocity of the particle becomes zero is \",round(t),\"sec\"\n",
+ "print\"The position of the partice at t=3 sec is \",round(x),\"m\"\n",
+ "print\"The acceleration of the particle is \",round(a),\"m/s^2\"\n",
+ "# Ref textbook for the graphs\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The time at which the velocity of the particle becomes zero is 3.0 sec\n",
+ "The position of the partice at t=3 sec is -15.0 m\n",
+ "The acceleration of the particle is 12.0 m/s^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.14-15,Page No:354"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "F=250 # N # Force acting on a body\n",
+ "m=100 # kg # mass of the body\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Using the eq'n of motion\n",
+ "a=F*m**-1 # m/s^2 \n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The acceleration of the body is \",round(a,2),\"m/s^2\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The acceleration of the body is 2.5 m/s^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 70
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.14-16,Page No:354"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "a=1 # m/s^2 # downward/upward acceleration of the elevator\n",
+ "W=500 # N # Weight of man\n",
+ "g=9.81 # m/s^2 # acceleration due to gravity\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# (a) Downward Motion \n",
+ "R_1=W*(1-(a/g)) # N # (Assume pressure as R_1)\n",
+ "\n",
+ "# (b) Upward Motion\n",
+ "R_2=W*(1+(a/g)) # N # (Assume pressure as R_2)\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is \",round(R_1),\"N\"\n",
+ "print\"(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is \",round(R_2,2),\"N\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The pressure transmitted to the floor by the man for Downward motion of the elevator is 449.0 N\n",
+ "(b) The pressure transmitted to the floor by the man for Upward motion of the elevator is 550.97 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 72
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.14-17,Page no:355"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "W=5000 # N # Total weight of the elevator\n",
+ "u=0 # m/s\n",
+ "v=2 # m/s # velocity of the elevator\n",
+ "s=2 # m # distance traveled by the elevator\n",
+ "t=2 # seconds # time to stop the lift\n",
+ "w=600 # N # weight of the man\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Acceleration acquired by the elevator after travelling 2 m is given by,\n",
+ "a=(((v**2-u**2)**0.5/2)) # m/s^2\n",
+ "\n",
+ "# (a) Let T be the the tension in the cable which is given by eq'n,\n",
+ "T=W*(1+(a/g)) # N\n",
+ "\n",
+ "# (b) Motion of man\n",
+ "# Let R be the pressure experinced by the man.Then from the Eq'n of motion of man pressure is given as,\n",
+ "R=w*(1-(a/g)) # N \n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"(a) The Tensile force in the cable is \",round(T,1),\"N\"\n",
+ "print\"(b) The pressure transmitted to the floor by the man is \",round(R,1),\"N\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The Tensile force in the cable is 5509.7 N\n",
+ "(b) The pressure transmitted to the floor by the man is 538.8 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 83
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.14-18,Page No:355"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "M_1=10 # kg # mass of the 1st block\n",
+ "M_2=5 # kg # mass of the 2nd block\n",
+ "mu=0.25 # coefficient of friction between the blocks and the surface\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "\n",
+ "# Calculations\n",
+ "a=g*(M_2-(mu*M_1))/(M_1+M_2) # m/s^2 # from eq'n 5\n",
+ "T=M_1*M_2*g*(1+mu)/(M_1+M_2) # N # from eq'n 6\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The acceleration of the masses is \",round(a,3),\"m/s^2\"\n",
+ "print\"The tension in the string is \",round(T,3),\"N\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The acceleration of the masses is 1.635 m/s^2\n",
+ "The tension in the string is 40.875 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 85
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.14-19,Page No:357"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "M_1=150 # kg # mass of the 1st block\n",
+ "M_2=100 # kg # mass of the 2nd block\n",
+ "mu=0.2 # coefficient of friction between the blocks and the inclined plane\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "theta=45 # degree # inclination of the surface\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# substuting the value of eq'n 3 in eq'n 1 & solving for T,we get value of T as,\n",
+ "T=((M_1*M_2*g)*(sin(theta*(pi/180))+2-(mu*cos(theta*(pi/180)))))/((4*M_1)+(M_2)) # N\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The tension in the string during the motion of the system is \",round(T,1),\"N\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The tension in the string during the motion of the system is 539.3 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 87
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.14-20,Page No:358"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "M_1=5 # kg # mass of the 1st block\n",
+ "theta_1=30 # degree # inclination of the 1st plane\n",
+ "M_2=10 # kg # mass of the 2nd block\n",
+ "theta_2=60 # degree # inclination of the 2nd plane\n",
+ "mu=0.33 # coefficient of friction between the blocks and the inclined plane\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# solving eq'n 1 & 2 for a we get,\n",
+ "a=((((M_2*(sin(theta_2*(pi/180))-(mu*cos(theta_2*(pi/180)))))-(M_1*(sin(theta_1*(pi/180))+(mu*cos(theta_1*(pi/180)))))))*g)/(M_1+M_2) # m/s^2\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The acceleration of the masses is \",round(a,3),\"m/s^2\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The acceleration of the masses is 2.015 m/s^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 89
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.14-21,Page No:359"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "S=5 # m # distance between block A&B\n",
+ "mu_A=0.2 # coefficient of friction between the block A and the inclined plane\n",
+ "mu_B=0.1 # coefficient of friction between the block B and the inclined plane\n",
+ "theta=20 # degree # inclination of the pane\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "\n",
+ "# Calculatio#\n",
+ "\n",
+ "# EQUATION OF MOTION OF BLOCK A:\n",
+ "# Let a_A & a_B be the acceleration of block A & B.\n",
+ "a_A=(g*sin(theta*(pi/180)))-(mu_A*g*cos(theta*(pi/180))) # m/s^2 # from eq'n 1 & eq'n 2\n",
+ "\n",
+ "# EQUATION OF MOTION OF BLOCK B:\n",
+ "a_B=g*((sin(theta*(pi/180)))-(mu_B*cos(theta*(pi/180)))) # m/s^2 # from eq'n 3 & Rb\n",
+ "\n",
+ "# Now the eq'n for time of collision of the blocks is given as,\n",
+ "t=((S*2)/(a_B-a_A))**0.5 # seconds \n",
+ "S_A=(0.5)*a_A*t**2 # m # distance travelled by block A\n",
+ "S_B=(0.5)*a_B*t**2 # m # distance travelled by block B\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The time before collision is \",round(t,2),\"seconds\"\n",
+ "print\"The distance travelled by block A before collision is \",round(S_A,2),\"m\"\n",
+ "print\"The distance travelled by block B before collision is \",round(S_B,2),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The time before collision is 3.29 seconds\n",
+ "The distance travelled by block A before collision is 8.2 m\n",
+ "The distance travelled by block B before collision is 13.2 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 96
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.14-22,Page No:361"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "P=50 # N # Weight of the car\n",
+ "Q=100 # N # Weight of the rectangular block\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "b=25 # cm # width of the rectangular block\n",
+ "d=50 # cm # depth of the block\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "a=(Q*g)/(4*P+2*Q) # m/s^2 # from eq'n 4\n",
+ "W=(Q*(P+Q))/(4*P+Q) # N # from eq'n 6\n",
+ "\n",
+ "# Resuts\n",
+ "\n",
+ "print\"The maximum value of weight (W) by which the car can be accelerated is \",round(W),\"N\"\n",
+ "print\"The acceleration is \",round(a,2),\"m/s^2\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The maximum value of weight (W) by which the car can be accelerated is 50.0 N\n",
+ "The acceleration is 2.45 m/s^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 99
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.14-23,Page No:363"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "P=40 # N # weight on puley r_1\n",
+ "Q=60 # N # weight on pulley r_2\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# The eq'n for acceleration of pulley Pi.e a_p is,\n",
+ "a_p=(2*P-Q)*(4*P+Q)**-1*2*g # m/s^2\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The downward acceleration of P is \",round(a_p,3),\"m/s^2\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The downward acceleration of P is 1.784 m/s^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 112
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.14-24,Page No:364"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "M=15 # kg # mass of the wedge\n",
+ "m=6 # kg # mass of the block\n",
+ "theta=30 # degree # angle of the wedge\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "a_A=((m*g*cos(theta*(pi/180))*sin(theta*(pi/180)))/((M)+(m*(sin(theta*(pi/180)))**2)))/(g) # g # By eliminating R_1 from eq'n 1&3.\n",
+ "\n",
+ "# Here, assume a_r is the acceleration of block B relative to wedge A which is given by substuting a_A in eq'n 2\n",
+ "\n",
+ "a_r=(((g*sin(theta*(pi/180)))*(m+M))/((M)+(m*(sin(theta*(pi/180)))**2)))/(g) # g\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"(a) The acceleration of the wedge is \",round(a_A,3),\"g\"\n",
+ "print\"(b) The acceleration of the bock relative to the wedge is \",round(a_r,3),\"g\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The acceleration of the wedge is 0.157 g\n",
+ "(b) The acceleration of the bock relative to the wedge is 0.636 g\n"
+ ]
+ }
+ ],
+ "prompt_number": 114
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.14-25,Page No:366"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "P=30 # N # weight on pulley A\n",
+ "Q=20 # N # weight on pulley B\n",
+ "R=10 # N # weight on puey B\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Solving eqn's 6 & 7 using matrix for a & a_1, we get\n",
+ "A=np.array([[70 ,-40],[-10, 30]])\n",
+ "B=np.array([10,-10])\n",
+ "C=np.linalg.solve(A,B)\n",
+ "\n",
+ "# Acceleration of P is given as,\n",
+ "P=C[0] # m/s^2\n",
+ "# Acceleration of Q is given as,\n",
+ "Q=C[1]-C[0] # m/s^2\n",
+ "# Acceleration of R is given as,\n",
+ "R=-(C[1]+C[0]) # m/s^2 # as R is taken to be +ve\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The acceleration of P is \",round(P,2),\"g\"\n",
+ "print\"The acceleration of Q is \",round(Q,2),\"g\"\n",
+ "print\"The acceleration of R is \",round(R,2),\"g\"\n",
+ "# Here the -ve sign indicates deceleration or backward/downward acceleation.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The acceleration of P is -0.06 g\n",
+ "The acceleration of Q is -0.29 g\n",
+ "The acceleration of R is 0.41 g\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.14-30,Page No:372"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "W=1 # kg/m # weight of the bar\n",
+ "L_AB=0.6 # m # length of segment AB\n",
+ "L_BC=0.30 # m # length of segment BC\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Consider the respective F.B.D.\n",
+ "theta_1=arctan(5/12)*(180/pi) # slope of bar AB # here theta_1= atan(theta)\n",
+ "theta_2=arcsin(5/13)*(180/pi) # theta_2=asin(theta)\n",
+ "theta_3=arccos(12/13)*(180/pi) # theta_3=acos(theta)\n",
+ "M_AB=L_AB*W # kg acting at D # Mass of segment AB\n",
+ "M_BC=L_BC*W # kg acting at E # Mass of segment BC\n",
+ "\n",
+ "# The various forces acting on the bar are:\n",
+ "\n",
+ "# Writing the eqn's of dynamic equilibrium\n",
+ "Y_A=(L_AB*g)+(L_BC*g) # N # sum F_y=0\n",
+ "\n",
+ "# Using moment eq'n Sum M_A=0:Here,in this eq'n the values are as follows,\n",
+ "AF=L_BC*cos(theta_3) \n",
+ "DF=L_BC*sin(theta_2)\n",
+ "AH=(L_AB*cos(theta_3))+((L_BC/2)*sin(theta_2))\n",
+ "IG=(L_AB*sin(theta_2)-((L_BC/2)*cos(theta_3)))\n",
+ "\n",
+ "# On simplifying and solving moment eq'n we get a as,\n",
+ "a=(g*(L_AB*(DF)+L_BC*(IG)))*(L_AB*(AF)+L_BC*(AH))**-1\n",
+ "#a=(2*L_AB*L_BC*g*sin(theta_2))-(L_BC*g*(L_BC/2)*cos(theta_3))/((2*L_AB*L_BC*cos(theta_3*(pi/180)))+(L_BC*(L_BC/2)*sin(theta_2*(pi/180)))) # m/s^2\n",
+ "X_A=0.9*a #N # from eq'n of dynamic equilibrium\n",
+ "R_A=(X_A**2+Y_A**2)**0.5 # N # Resultant of R_A\n",
+ "alpha=arctan(Y_A/X_A)*(180/pi) # degree\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The acceleration is \",round(a,4),\"m/s^2\"\n",
+ "print\"The reaction at A (R_A) is \",round(R_A,3),\"N\"\n",
+ "print\"The angle made by the resultant is \",round(alpha,2),\"degree\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The acceleration is -1.2263 m/s^2\n",
+ "The reaction at A (R_A) is 8.898 N\n",
+ "The angle made by the resultant is -82.87 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter15_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter15_15.ipynb
new file mode 100644
index 00000000..db992973
--- /dev/null
+++ b/Engineering_Mechanics_by_Tayal_A.K./chapter15_15.ipynb
@@ -0,0 +1,775 @@
+{
+ "metadata": {
+ "name": "chapter15.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 15: Curvilinear Motion Of A Particle"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.15-2,Page No:386"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "r=200 # m # radius of the curved road\n",
+ "v_1=72*1000*3600**-1 # m/s # initial speed of the car\n",
+ "v_2=36*1000*3600**-1 # m/s # speed of the car after 10 seconds\n",
+ "t=10 # seconds\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "A_n=v_1**2/r # m/s^2 # normal component of acceleration\n",
+ "A_t=0 # since dv/dt=0 # tangential component of acceeration\n",
+ "delv=v_1-v_2\n",
+ "delt=t-0\n",
+ "a_t=delv/delt # m/s^2 # tangential component of deceleration after the brakes are applied\n",
+ "a_n=v_1**2/r # m/s^2 # normal component of deceleration after the brakes are applied\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The normal component of acceleration is \",round(A_n),\"m/s^2\"\n",
+ "print\"The tangential component of acceleration is \",round(A_t),\"m/s^2\"\n",
+ "print\"The normal component of deceleration is \",round(a_n),\"m/s^2\"\n",
+ "print\"The tangential component of deceleration is \",round(a_t),\"m/s^2\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The normal component of acceleration is 2.0 m/s^2\n",
+ "The tangential component of acceleration is 0.0 m/s^2\n",
+ "The normal component of deceleration is 2.0 m/s^2\n",
+ "The tangential component of deceleration is 1.0 m/s^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.15-3,Page No:387"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Iintilization of variables\n",
+ "\n",
+ "r=250 # m # radius of the curved road\n",
+ "a_t=0.6 # m/s^2 # tangential acceleration\n",
+ "a=0.75 # m/s^2 # total acceleration attained by the car\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "a_n=(a**2-a_t**2)**0.5 # m/s^2\n",
+ "v=sqrt(a_n*r) # m/s\n",
+ "\n",
+ "# Using v=u+a*t\n",
+ "u=0\n",
+ "t=v/a_t # seconds\n",
+ "\n",
+ "# Now using v^2-u^2=2*a*s\n",
+ "s=v**2/(2*a_t) # m\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The distance traveled by the car is \",round(s,2),\"m\"\n",
+ "print\"The time for which the car travels is \",round(t,2),\"seconds\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The distance traveled by the car is 93.75 m\n",
+ "The time for which the car travels is 17.68 seconds\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.15-5,Page No:388"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "v=10 # m/s # speed of the car\n",
+ "r=200 # m # radius of the road\n",
+ "t=15 # seconds\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "omega=(v*r**-1) # radian/seconds # angular velocity of the car\n",
+ "\n",
+ "# Velocity in x & y direction is given by eq'n\n",
+ "v_x=omega*r*sin(omega*t) # m/s # value of v_x is -ve but we consider it to be +ve for calculations\n",
+ "v_y=omega*r*cos(omega*t) # m/s\n",
+ "\n",
+ "# Acceleration in x & y direction is given by\n",
+ "a_x=(omega**2)*r*cos(omega*t) # m/s^2 # value of a_x is -ve but we consider it to be +ve for calculations\n",
+ "a_y=(omega**2)*r*sin(omega*t) # m/s^2 # value of a_y is -ve but we consider it to be +ve for calculations\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The component of velocity in X direction (v_x) is \",round(v_x,2),\"m/s\"\n",
+ "print\"The component of velocity in Y direction (v_y) is \",round(v_y,2),\"m/s\"\n",
+ "print\"The component of acceleration in X direction (a_x) is \",round(a_x,3),\"m/s^2\"\n",
+ "print\"The component of acceleration in Y direction (a_y) is \",round(a_y,3),\"m/s^2\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The component of velocity in X direction (v_x) is 6.82 m/s\n",
+ "The component of velocity in Y direction (v_y) is 7.32 m/s\n",
+ "The component of acceleration in X direction (a_x) is 0.366 m/s^2\n",
+ "The component of acceleration in Y direction (a_y) is 0.341 m/s^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.15-6,Page No:392"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "t=1 # seconds\n",
+ "pi=3.14\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# From the equations of r and theta given we find 1st & 2nd derative and substitute t=1sec Here we consider the 1st derative as r_1 & theta_1 and so on...\n",
+ "r=(1.25*t**2)-(0.9*t**3) # m\n",
+ "r_1=(1.25*(2*t))-(0.9*(3*t**2)) # m/s\n",
+ "r_2=2.5-(0.9*3*(2*t)) # m/s^2\n",
+ "theta=(pi/2)*(4*t-3*t**2) # radian\n",
+ "theta_1=(pi/2)*(4-(6*t)) # rad/second\n",
+ "theta_2=(pi/2)*(0-(6*t)) # rad/second^2\n",
+ "\n",
+ "# Velocity of collar P\n",
+ "v_r=r_1 # m/s\n",
+ "v_theta=r*theta_1 # m/s\n",
+ "v=(v_r**2+v_theta**2)**0.5 # m/s\n",
+ "alpha=arctan(v_theta/v_r) # degree\n",
+ "\n",
+ "# Acceleration of the collar P\n",
+ "a_r=r_2-(r*theta_1**2) # m/s^2\n",
+ "a_theta=(r*theta_2)+(2*r_1*theta_1) # m/s^2\n",
+ "a=(a_r**2+a_theta**2)**0.5 # m/s^2\n",
+ "beta=arctan(a_theta/a_r) # degree\n",
+ "\n",
+ "# Acceleration of collar P relative to the rod. Let it be a_relative\n",
+ "a_relative=r_2 # m/s^2 # towards O\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "print\"The velocity of the collar is \",round(v,3),\"m/s\"\n",
+ "print\"The accelaration of the collar is \",round(a,3),\"m/s^2\"\n",
+ "print\"The acceleration of the collar relative to the rod is \",round(a_relative,1),\"m/s^2\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity of the collar is 1.117 m/s\n",
+ "The accelaration of the collar is 6.671 m/s^2\n",
+ "The acceleration of the collar relative to the rod is -2.9 m/s^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.15-7,Page No:394"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Consider the eq'ns of motion from the book\n",
+ "# The notations have been changed for the derivatives of r & theta\n",
+ "# (1) At t=0 s\n",
+ "theta_0=0\n",
+ "theta_1=2*pi # rad/s\n",
+ "theta_2=0\n",
+ "r_0=0\n",
+ "r_1=10 # cm/s\n",
+ "r_2=0\n",
+ "# At t=0.3 s\n",
+ "t=0.3 # sec\n",
+ "theta=2*pi*t # rad\n",
+ "theta1=2*pi # rad/s\n",
+ "theta2=0\n",
+ "r=10*t # cm\n",
+ "r1=10 # cm/s\n",
+ "r2=0\n",
+ "# (i) \n",
+ "#Velocity\n",
+ "v_r=r_1 # cm/s\n",
+ "v_theta=r_0*theta_1\n",
+ "v=sqrt(v_r**2+v_theta**2) # cm/s\n",
+ "# Acceleration\n",
+ "a_r=r_2-(r_0*theta_1**2) # cm/s^2\n",
+ "a_theta=(r_0*theta_2)+(2*r_1*theta_1) # cm/s^2\n",
+ "a=sqrt(a_r**2+a_theta**2) # cm/s^2\n",
+ "# (ii)\n",
+ "# Velocity\n",
+ "V_R=r1 # cm/s\n",
+ "V_theta=r*theta1 # cm/s\n",
+ "V=sqrt(V_R**2+V_theta**2) # cm/s\n",
+ "# Acceleration\n",
+ "A_r=r2-(r*theta1**2) # cm/s^2\n",
+ "A_theta=(r*theta2)+(2*r1*theta1) # cm/s^2\n",
+ "A=sqrt(A_r**2+A_theta**2) # cm/s^2\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The velocity and the acceleration of the partice at t=0 s is \",round(v),\"cm/s\",\"&\",round(a,1),\"cm/s^2\"\n",
+ "print\"The velocity and the acceleration of the partice at t=0.3 s is \",round(V,2),\"cm/s\",\"&\",round(A,2),\"cm/s^2\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity and the acceleration of the partice at t=0 s is 10.0 cm/s & 125.7 cm/s^2\n",
+ "The velocity and the acceleration of the partice at t=0.3 s is 21.34 cm/s & 172.68 cm/s^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.15-9,Page No:404"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Calculations\n",
+ "# Tension in the wire before it is cut\n",
+ "T_ab=1/((2.747*0.643)+(0.766)) # From eqn's 1 & 2..Here T_ab is multiplied with W (i.e weight of small ball) \n",
+ "T_AB=cos(40*(pi/180)) # Tension in the wire after the wire is cut. Again T_AB is multiplied with W.\n",
+ "# Results\n",
+ "\n",
+ "print\"The tension in the wire before and after it is cut is respectively \",round(T_ab,3),\"W\",\"&\",round(T_AB,3),\"W\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The tension in the wire before and after it is cut is respectively 0.395 W & 0.766 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.15-10,Page No:405"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "W_A=120 # N # Weight of block A\n",
+ "W_B=80 # N # Weight of block B\n",
+ "mu_a=0.4 # coefficient of friction under block A\n",
+ "n=40 # r.p.m # rotation of frame\n",
+ "r_a=1.2 # m # distance from block A to the axis of rotation\n",
+ "r_b=1.6 # m # distance from block A to the axis of rotation\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "pi=3.14 # constant\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Consider the F.B.D of block A.\n",
+ "N=W_A # N # Sum F_y=0\n",
+ "\n",
+ "# Now here, a_n=omega^2*r\n",
+ "omega=(2*pi*n)*60**-1 # rad/sec\n",
+ "a_n=(omega**2)*r_a # m/s^2\n",
+ "\n",
+ "# sum F_x=0 gives the eq'n of T as,\n",
+ "T=((W_A*g**-1)*a_n)-(mu_a*N) # N \n",
+ "\n",
+ "# Now consider the F.B.D of block B\n",
+ "A_n=(omega**2)*r_b # m/s^2\n",
+ "N_1=(W_B*g**-1)*A_n # N # sum F_x=0\n",
+ "mu=(T-W_B)*N_1**-1 \n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The coefficient of friction of block B is \",round(mu,3) \n",
+ "#answer may vary due to decimal variance in python\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The coefficient of friction of block B is 0.565\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.15-12,Page No:408"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "W=10000 # N # Weight of the locomotive\n",
+ "# Calculations\n",
+ "# Consider the various derivations given in the textbook\n",
+ "R_max=W*20**-1 # N # eq'n for max reaction\n",
+ "# The position of occurence of maximum thrust cannot be defined here. Refer textbook for the answer\n",
+ "# Results\n",
+ "\n",
+ "print\"The maximum lateral thrust is \",round(R_max),\"N\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The maximum lateral thrust is 500.0 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.15-13,Page No:411"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "W=10 #N # Weight of the ball\n",
+ "# Calculations\n",
+ "# consider the eq'n derived to find the reaction, given as\n",
+ "R=W*(1+((2*pi**2)*9**-1)) # N \n",
+ "# Results\n",
+ "\n",
+ "print\"The value of the reaction is \",round(R,1),\"N\"\n",
+ "#answer may vary due to decimal variance\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of the reaction is 31.9 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.15-15,Page No:412"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "P=50 # N # Weight of ball P\n",
+ "Q=50 # N # Weight of ball Q\n",
+ "R=100 # N # Weight of the governing device\n",
+ "l=0.3 # m # length of each side\n",
+ "theta=30 # degree\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "pi=3.14 # constant\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Consider the respective F.B.D\n",
+ "r=l*sin(theta*(pi/180)) # m # Radius of circe\n",
+ "# On solving eqn's 1,2 &3 we get the value of v as,\n",
+ "v=(((Q+R)*g*r)/(3**0.5*Q))**0.5 # m/s \n",
+ "# But the eq'n v=omega*r we get the value of N as,\n",
+ "N=(60*v)/(2*pi*r) # r.p.m \n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The speed of rotation is \",round(N,1),\"r.p.m\"\n",
+ "# NOTE: In the text book (A.K. Tayal) this sum is numbered as 'EXAMPLE 15.14' which is incorrect.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The speed of rotation is 101.7 r.p.m\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.15-16,Page No:414"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "Q=20 # N # Weight of the governor device\n",
+ "W=10 # N # Weight of the fly balls\n",
+ "theta=30 # degree # angle between the vertical shaft and the axis AB\n",
+ "l=0.2 # m # length of the shaft\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "pi=3.14 # constant\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Consider the respective F.B.D\n",
+ "# Radius of the circle is given as,\n",
+ "r=Q*sin(theta*(pi/180))*(10**-2) # m \n",
+ "\n",
+ "# Solving eq'n 1 & 2 for v. The eq'n for v is given as,\n",
+ "v=(((W*l*0.5)+(0.05*Q))/((W*0.2*(3)**0.5)/(2*g*r)))**0.5 # m/s\n",
+ "\n",
+ "# But, v=r*omega=2*pi*N*r/60. From this eq'n we get N as,\n",
+ "N=(v*60)/(2*pi*r) # r.p.m.\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The speed of the fly-balls is \",round(N,1),\"r.p.m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The speed of the fly-balls is 101.7 r.p.m\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.15-18,Page No:421 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "r=50 # m # radius of the road\n",
+ "mu=0.15 # coefficient of friction between the wheels and the road\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# The eq'n fo max speed of the vehicle without skidding is \n",
+ "v=(mu*g*r)**0.5 # m/s\n",
+ "\n",
+ "# The angle theta made with the vertical while negotiating the corner is \n",
+ "theta=arctan(v**2/(g*r))*(180/pi) # degree\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The maximum speed with which the vehicle can travel is \",round(v,2),\"m/s\"\n",
+ "print\"The angle made with the vertical is \",round(theta,2),\"degree\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The maximum speed with which the vehicle can travel is 8.58 m/s\n",
+ "The angle made with the vertical is 8.54 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.15-19,Page No:422"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "v=100*1000*3600**-1 # m/s # or 100 km/hr\n",
+ "r=250 # m # radius of the road\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# The angle of banking is given by eq'n,\n",
+ "theta=arctan((v**2)/(g*r))*(180/pi) # degree \n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The angle of banking of the track is \",round(theta,2),\"degree\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The angle of banking of the track is 17.47 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.15-20,Page No:422"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "W=10000 # N # Weight of the car\n",
+ "r=100 # m # radius of the road\n",
+ "v=10 # m/s # speed of the car\n",
+ "h=1 # m # height of the C.G of the car above the ground\n",
+ "b=1.5 # m # distance between the wheels\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# The reactions at the wheels are given by te eq'ns:\n",
+ "R_A=(W/2)*(1-((v**2*h)/(g*r*b))) # N # Reaction at A\n",
+ "R_B=(W/2)*(1+((v**2*h)/(g*r*b))) # N # Reaction at B\n",
+ "\n",
+ "# The eq'n for max speed to avoid overturning on level ground is,\n",
+ "v_max=((g*r*(b/2))/(h))**0.5 # m/s\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The reaction at Wheel A (R_A) is \",round(R_A,1),\"N\"\n",
+ "print\"The reaction at Wheel B (R_B) is \",round(R_B,1),\"N\"\n",
+ "print\"The maximum speed at which the vehicle can travel without the fear of overturning is \",round(v_max,2),\"m/s\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The reaction at Wheel A (R_A) is 4660.2 N\n",
+ "The reaction at Wheel B (R_B) is 5339.8 N\n",
+ "The maximum speed at which the vehicle can travel without the fear of overturning is 27.12 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.15-21,Page No:423"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "W=1 # N # Weight of the bob\n",
+ "theta=8 # degree # angle made by the bob with the vertical\n",
+ "r=100 # m # radius of the curve\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# from eq'n 1 & 2 we get v as,\n",
+ "v=((g*r*tan(theta*(pi/180)))**0.5)*3600*1000**-1 # km/hr \n",
+ "T=W/cos(theta*(pi/180)) # N # from eq'n 2\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The speed of the cariage is \",round(v,2),\"km/hr\"\n",
+ "print\"The tension in the chord is \",round(T,2),\"N\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The speed of the cariage is 42.26 km/hr\n",
+ "The tension in the chord is 1.01 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 47
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter16_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter16_15.ipynb
new file mode 100644
index 00000000..7bd00420
--- /dev/null
+++ b/Engineering_Mechanics_by_Tayal_A.K./chapter16_15.ipynb
@@ -0,0 +1,471 @@
+{
+ "metadata": {
+ "name": "chapter16.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 16: Kinetics Of A Particle : Work And Energy"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.16-1,Page No:432"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "k=1000 # N/m # stiffness of spring\n",
+ "x_1=0.1 # m # distance upto which the spring is stretched\n",
+ "x_2=0.2 # m \n",
+ "x_0=0 # initial position of spring\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Work required to stretch the spring by 10 cm from undeformed position is given as,\n",
+ "U_10=-(k/2)*(x_1**2-x_0**2) # N-m \n",
+ "# Work required to stretch from 10 cm to 20 cm is,\n",
+ "U=-(0.5)*k*(x_2**2-x_1**2) # N-m\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The work of the spring force is \",round(U_10),\"N-m\"\n",
+ "print\"The work required to stretch the spring by 20 cm is \",round(U),\"N-m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The work of the spring force is -5.0 N-m\n",
+ "The work required to stretch the spring by 20 cm is -15.0 N-m\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.16-3,Page No:436"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "M_A=100 # kg # mass of block A\n",
+ "M_B=150 # kg # mass of block B\n",
+ "mu=0.2 # coefficient of friction between the blocks and the surface\n",
+ "x=1 # m # distance by which block A moves\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Consider the respective F.B.D\n",
+ "# Applying the principle of work and energy to the system of blocks A&B and on simplifying we get the value of v as,\n",
+ "v=(((-mu*M_A*g)+(M_B*g))/(125))**0.5 # m/s \n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The velocity of block A is \",round(v,2),\"m/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity of block A is 3.19 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.16-4,Page No:440"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "M=500*10**3 # kg # mass of the train\n",
+ "u=0 # m/s # initial speed\n",
+ "v=90*1000*3600**-1 # m/s # final speed\n",
+ "t=50 # seconds\n",
+ "F_r=15*10**3 # N # Frictioal resistance to motion\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Acceleration is given as,\n",
+ "a=v*t**-1 # m/s^2\n",
+ "# The total force required to accelerate the train is,\n",
+ "F=M*a # N\n",
+ "# The maximum power required is at, t=50s & v=25 m/s\n",
+ "P=(F+F_r)*v*(10**-6) # MW\n",
+ "# At any time after 50 seconds, the force required only to overcome the frictional resistance of 15*10^3 N is,\n",
+ "P_req=F_r*v*(10**-3) # kW\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"(a) The maximum power required is \",round(P,3),\"MW\"\n",
+ "print\"(b) The power required to maintain a speed of 90 km/hr is \",round(P_req,2),\"kW\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The maximum power required is 6.625 MW\n",
+ "(b) The power required to maintain a speed of 90 km/hr is 375.0 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.16-5,Page No:440"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "W=50 # N # Weight suspended on spring\n",
+ "k=10 # N/cm # stiffness of the spring\n",
+ "x_2=15 # cm # measured extensions\n",
+ "h=10 # cm # height for position 2\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Consider the required F.B.D.\n",
+ "\n",
+ "# POSITION 1: The force exerted by the spring is,\n",
+ "F_1=W # N\n",
+ "\n",
+ "# Extension of spring from undeformed position is x_1,\n",
+ "x_1=F_1/k # cm\n",
+ "\n",
+ "# POSITION 2: When pulled by 10 cm to the floor. P.E of weight is,\n",
+ "P_E_g=-W*h # N-cm # (P_E_g= P_E_gravity)\n",
+ "\n",
+ "# P.E of the spring with respect to position 1\n",
+ "P_E_s=(0.5)*k*(x_2**2-x_1**2) # N-cm # (P_E_s= P_E_ spring)\n",
+ "\n",
+ "# Total P.E of the system with respect to position 1\n",
+ "P_E_t=P_E_g+P_E_s # N-cm # (P_E_t= P_E_total)\n",
+ "\n",
+ "# Total energy of the system,\n",
+ "E_2=P_E_t # N-cm\n",
+ "\n",
+ "# Total energy of the system in position 3 w.r.t position 1 is:\n",
+ "x=-(100)**0.5 # cm\n",
+ "x=+(100)**0.5 # cm\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The potential energy of the system is \",round(E_2),\"N-cm\"\n",
+ "print\"The maximum height above the floor that the weight W will attain after release is \",round(x),\"cm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The potential energy of the system is 500.0 N-cm\n",
+ "The maximum height above the floor that the weight W will attain after release is 10.0 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.16-6,Page No:442"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "m=5 # kg # mass of the ball\n",
+ "k=500 # N/m # stiffness of the spring\n",
+ "h=10 # cm # height of drop\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Consider the respective F.B.D.\n",
+ "# In eq'n 1 substitute the respective values and simplify it further. In this eq'n of 2nd degree a=1 b=-0.1962 & c=-0.01962. Thus the roots of the eq'n is given as,\n",
+ "a=1 \n",
+ "b=-0.1962\n",
+ "c=-0.01962\n",
+ "delta=((-b+(((b**2)-(4*a*c))**0.5))/(2*a))*(10**2) # cm # We consider the +ve value of delta\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The maximum deflection of the spring is \",round(delta,2),\"cm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The maximum deflection of the spring is 26.91 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.16-7,Page No:444"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "m=5 # kg # mass of the ball\n",
+ "k=500 # N/m # stiffness of the spring\n",
+ "h=0.1 # m # height of vertical fall\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Consider the respective F.B.D\n",
+ "# On equating the total energies at position 1 & 2 we get eq'n of delta as,\n",
+ "delta=((2*m*g*h)/(k))**0.5 # m \n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The maximum compression of the spring is \",round(delta,3),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The maximum compression of the spring is 0.14 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.16-9,Page No:445"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "m=5 # kg # mass of the collar\n",
+ "k=500 # N/m # stiffness of the spring\n",
+ "AB=0.15 # m # Refer the F.B.D for AB\n",
+ "AC=0.2 # m # Refer the F.B.D for AC\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Consider the respective F.B.D\n",
+ "\n",
+ "# POSITION 1: \n",
+ "P_E_1=m*g*(AB)+0 \n",
+ "K_E_1=0\n",
+ "E_1=P_E_1+K_E_1 #\n",
+ "\n",
+ "# POSITION 2 : Length of the spring in position 2\n",
+ "CB=(AB**2+AC**2)**0.5 # m \n",
+ "# x is the extension in the spring\n",
+ "x=CB-AC # m\n",
+ "# On substuting and Equating equations of total energies for position1 & position 2 we get the value of v as,\n",
+ "v=(((E_1-((0.5)*k*x**2))*2)/m)**0.5 # m/s\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The velocity of the collar will be \",round(v,2),\"m/s\"\n",
+ "# The answer given in the text book (v=16.4 m/s) is wrong.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity of the collar will be 1.64 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.16-10,Page No:446"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "m=5 # kg # mass of the block\n",
+ "theta=30 # degree # inclination of the plane\n",
+ "x=0.5 # m # distance travelled by the block\n",
+ "k=1500 # N/m # stiffness of the spring\n",
+ "mu=0.2 # coefficient of friction between the block and the surface\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Consider the F.B.D of the block\n",
+ "# Applying the principle of work and energy between the positions 1 & 2 and on further simplification we get the generic eq'n for delta as, 750*delta^2-16.03*delta-8.015=0. From this eq'n e have values of a.b & c as,\n",
+ "a=750\n",
+ "b=-16.03\n",
+ "c=-8.015\n",
+ "# Thus the roots of the eq'n are given as,\n",
+ "delta=(-b+((b**2-(4*a*c))**0.5))/(2*a) # m\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The maximum compression of the spring is \",round(delta,3),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The maximum compression of the spring is 0.115 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.16-11,Page No:448"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "M=10 # kg # Here M=M_1=M_2\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Consider the respective F.B.D\n",
+ "# Applying the principle of conservation of energy and by equating the total energies at position 1 & position 2 we get v as,\n",
+ "v=((M*g*4)/(25))**0.5 # m/s\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The velocity of mass M_2 is \",round(v,2),\"m/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity of mass M_2 is 3.96 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter17_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter17_15.ipynb
new file mode 100644
index 00000000..5049e924
--- /dev/null
+++ b/Engineering_Mechanics_by_Tayal_A.K./chapter17_15.ipynb
@@ -0,0 +1,342 @@
+{
+ "metadata": {
+ "name": "chapter17.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 17: Kinetics Of A Particle : Impulse And Momentum"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.17-1,Page no:460"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "m=0.1 # kg # mass of ball\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Consider the respective F.B.D.\n",
+ "\n",
+ "# For component eq'n in x-direction\n",
+ "delta_t=0.015 # seconds # time for which the ball &the bat are in contact\n",
+ "v_x_1=-25 # m/s \n",
+ "v_x_2=40*cos(40*(pi/180)) # m/s\n",
+ "F_x_average=((m*(v_x_2))-(m*(v_x_1)))/(delta_t) # N\n",
+ "\n",
+ "# For component eq'n in y-direction\n",
+ "delta_t=0.015 # sceonds\n",
+ "v_y_1=0 # m/s\n",
+ "v_y_2=40*sin(40*(pi/180)) # m/s\n",
+ "F_y_average=((m*v_y_2)-(m*(v_y_1)))/(delta_t) # N\n",
+ "F_average=(F_x_average**2+F_y_average**2)**0.5 # N\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The average impules force exerted by the bat on the ball is \",round(F_average,1),\"N\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The average impules force exerted by the bat on the ball is 408.6 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Examplle 17.17-2,Page No:461"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initiliation of variables\n",
+ "\n",
+ "m_g=3000 # kg # mass of the gun\n",
+ "m_s=50 # kg # mass of the shell\n",
+ "v_s=300 # m/s # initial velocity of shell\n",
+ "s=0.6 # m # distance at which the gun is brought to rest\n",
+ "v=0 # m/s # initial velocity of gun\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# On equating eq'n 1 & eq'n 2 we get v_g as,\n",
+ "v_g=(m_s*v_s)/(-m_g) # m/s\n",
+ "\n",
+ "# Using v^2-u^2=2*a*s to find acceleration,\n",
+ "a=(v**2-v_g**2)/(2*s) # m/s^2\n",
+ "\n",
+ "# Force required to stop the gun,\n",
+ "F=m_g*-a # N # here we make a +ve to find the Force\n",
+ "\n",
+ "# Time required to stop the gun, using v=u+a*t:\n",
+ "t=(-v_g)/(-a) # seconds # we take -a to consider +ve value of acceleration\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The recoil velocity of gun is \",round(v_g),\"m/s\"\n",
+ "print\"The Force required to stop the gun is \",round(F),\"N\" # Answer in textbook 62400 is wrong as a=20.833\n",
+ "print\"The time required to stop the gun is \",round(t,2),\"seconds\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The recoil velocity of gun is -5.0 m/s\n",
+ "The Force required to stop the gun is 62500.0 N\n",
+ "The time required to stop the gun is 0.24 seconds\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.17-3,Page No:462"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "m_m=50 # kg # mass of man\n",
+ "m_b=250 # kg # mass of boat\n",
+ "s=5 # m # length of the boat\n",
+ "v_r=1 # m/s # here v_r=v_(m/b)= relative velocity of man with respect to boat\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Velocity of man is given by, v_m=(-v_r)+v_b\n",
+ "\n",
+ "# Final momentum of the man and the boat=m_m*v_m+m_b*v_b. From this eq'n v_b is given as\n",
+ "v_b=(m_m*v_r)*(m_m+m_b)**-1 # m/s # this is the absolute velocity of the boat\n",
+ "\n",
+ "# Time taken by man to move to the other end of the boat is,\n",
+ "t=s/v_r # seconds\n",
+ "\n",
+ "# The distance travelled by the boat in the same time is,\n",
+ "s_b=v_b*t # m to right from O\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"(a) The velocity of boat as observed from the ground is \",round(v_b,3),\"m/s\"\n",
+ "print\"(b) The distance by which the boat gets shifted is \",round(s_b,3),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The velocity of boat as observed from the ground is 0.167 m/s\n",
+ "(b) The distance by which the boat gets shifted is 0.833 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.17-5,Page No:464"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "M=250 # kg # mass of the boat\n",
+ "M_1=50 # kg # mass of the man\n",
+ "M_2=75 # kg # mass of the man\n",
+ "v=4 # m/s # relative velocity of man w.r.t boat\n",
+ "\n",
+ "# Calculations \n",
+ "\n",
+ "# (a)\n",
+ "# Let the increase in the velocity or the final velocity of the boat when TWO MEN DIVE SIMULTANEOUSLY is given by eq'n,\n",
+ "deltaV_1=((M_1+M_2)*v)*(M+(M_1+M_2))**-1 # m/s\n",
+ "\n",
+ "# (b) # The increase in the velocity or the final velocity of the boat when man of 75 kg dives 1st followed by man of 50 kg\n",
+ "# Man of 75 kg dives first, So let the final velocity is given as\n",
+ "deltaV_75=(M_2*v)*((M+M_1)+M_2)**-1 # m/s\n",
+ "# Now let the man of 50 kg jumps next, Here\n",
+ "deltaV_50=(M_1*v)*(M+M_1)**-1 # m/s\n",
+ "# Let final velocity of boat is,\n",
+ "deltaV_2=0+deltaV_75+deltaV_50 # m/s\n",
+ "\n",
+ "# (c) \n",
+ "# The man of 50 kg jumps first,\n",
+ "delV_50=(M_1*v)*((M+M_2)+(M_1))**-1 # m/s\n",
+ "# the man of 75 kg jumps next,\n",
+ "delV_75=(M_2*v)*(M+M_2)**-1 # m/s\n",
+ "# Final velocity of boat is,\n",
+ "deltaV_3=0+delV_50+delV_75 # m/s\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"(a) The Final velocity of boat when two men dive simultaneously is \",round(deltaV_1,2),\"m/s\"\n",
+ "print\"(b) The Final velocity of boat when the man of 75 kg dives first and 50 kg dives second is \",round(deltaV_2,3),\"m/s\"\n",
+ "print\"(c) The Final velocity of boat when the man of 50kg dives first followed by the man of 75 kg is \",round(deltaV_3,3),\"m/s\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The Final velocity of boat when two men dive simultaneously is 1.33 m/s\n",
+ "(b) The Final velocity of boat when the man of 75 kg dives first and 50 kg dives second is 1.467 m/s\n",
+ "(c) The Final velocity of boat when the man of 50kg dives first followed by the man of 75 kg is 1.456 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.17-6,Page No:466"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "m_m=70 # kg # mass of man\n",
+ "m_c=35 # kg # mass of canoe\n",
+ "m=25*1000**-1 # kg # mass of bullet\n",
+ "m_wb=2.25 # kg # mass of wodden block\n",
+ "V_b=5 # m/s # velocity of block\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Considering Initial Momentum of bullet=Final momentum of bullet & the block we have,Velocity of bullet (v) is given by eq'n,\n",
+ "v=(V_b*(m_wb+m))/(m) # m/s \n",
+ "\n",
+ "# Considering, Momentum of the bullet=Momentum of the canoe & the man,the velocity on canoe is given by eq'n\n",
+ "V=(m*v)*(m_m+m_c)**-1 # m/s\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The velocity of the canoe is \",round(V,3),\"m/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity of the canoe is 0.108 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.17-8,Page no:470"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "m=2 # kg # mass of the particle\n",
+ "v_0=20 # m/s # speed of rotation of the mass attached to the string\n",
+ "r_0=1 # m # radius of the circle along which the particle is rotated\n",
+ "r_1=r_0*0.5 # m\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# here, equating (H_0)_1=(H_0)_2 i.e (m*v_0)*r_0=(m*v_1)*r_1 (here, r_1=r_0/2). On solving we get v_1 as,\n",
+ "v_1=2*v_0 # m/s\n",
+ "# Tension is given by eq'n,\n",
+ "T=(m*v_1**2)/r_1 # N\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The new speed of the particle is \",round(v_1),\"m/s\"\n",
+ "print\"The tension in the string is \",round(T),\"N\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The new speed of the particle is 40.0 m/s\n",
+ "The tension in the string is 6400.0 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter18_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter18_15.ipynb
new file mode 100644
index 00000000..5eed275e
--- /dev/null
+++ b/Engineering_Mechanics_by_Tayal_A.K./chapter18_15.ipynb
@@ -0,0 +1,612 @@
+{
+ "metadata": {
+ "name": "chapter18.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 18: Impact:Collision Of Elastic Bodies"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.18-1,Page No:474"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "# Initilization of variables\n",
+ "m_a=1 # kg # mass of the ball A\n",
+ "v_a=2 # m/s # velocity of ball A\n",
+ "m_b=2 # kg # mass of ball B\n",
+ "v_b=0 # m/s # ball B at rest\n",
+ "e=1/2 # coefficient of restitution\n",
+ "\n",
+ "# Calculations\n",
+ "# Solving eqn's 1 & 2 using matrix for v'_a & v'_b,\n",
+ "A=np.array([[1 ,2],[-1 ,1]])\n",
+ "B=np.array([2,1])\n",
+ "C=np.linalg.solve(A,B)\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The velocity of ball A after impact is \",round(C[0]),\"m/s\"\n",
+ "print\"The velocity of ball B after impact is \",round(C[1]),\"m/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity of ball A after impact is 0.0 m/s\n",
+ "The velocity of ball B after impact is 1.0 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.18-2,Page No:480"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "# Initilization of variables\n",
+ "m_a=2 # kg # mass of ball A\n",
+ "m_b=6 # kg # mass of ball B\n",
+ "m_c=12 # kg # mass of ball C\n",
+ "v_a=12 # m/s # velocity of ball A\n",
+ "v_b=4 # m/s # velocity of ball B\n",
+ "v_c=2 # m/s # velocity of ball C\n",
+ "e=1 # coefficient of restitution for perfectly elastic body\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# (A)\n",
+ "# Solving eq'n 1 & 2 using matrix for v'_a & v'_b,\n",
+ "A=np.array([[2 ,6],[-1, 1]])\n",
+ "B=np.array([48,8])\n",
+ "C=np.linalg.solve(A,B)\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# (B)\n",
+ "# Solving eq'ns 3 & 4 simultaneously using matrix for v'_b & v'_c\n",
+ "P=np.array([[1 ,2],[-1, 1]])\n",
+ "Q=np.array([12,6])\n",
+ "R=np.linalg.solve(P,Q)\n",
+ "\n",
+ "# Results (A&B)\n",
+ "\n",
+ "print\"The velocity of ball A after impact on ball B is \",round(C[0]),\"m/s\" # here the ball of mass 2 kg is bought to rest\n",
+ "print\"The velocity of ball B after getting impacted by ball A is \",round(C[1]),\"m/s\"\n",
+ "print\"The final velocity of ball B is \",round(R[0]),\"m/s\" # here the ball of mass 6 kg is bought to rest\n",
+ "print\"The velocity of ball C after getting impacted by ball B is \",round(R[1]),\"m/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity of ball A after impact on ball B is 0.0 m/s\n",
+ "The velocity of ball B after getting impacted by ball A is 8.0 m/s\n",
+ "The final velocity of ball B is 0.0 m/s\n",
+ "The velocity of ball C after getting impacted by ball B is 6.0 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.18-3,Page No:481"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "h_1=9 # m # height of first bounce\n",
+ "h_2=6 # m # height of second bounce\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# From eq'n (5) we have, Coefficient of restitution between the glass and the floor is,\n",
+ "e=(h_2*h_1**-1)**0.5\n",
+ "# From eq'n 3 we get height of drop as,\n",
+ "h=h_1/e**2 # m\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The ball was dropped from a height of \",round(h,1),\"m\"\n",
+ "print\"The coefficient of restitution between the glass and the floor is \",round(e,1)\n",
+ "# Here we use h`=h_1 & h``=h_2 because h` & h`` could not be defined in Scilab.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The ball was dropped from a height of 13.5 m\n",
+ "The coefficient of restitution between the glass and the floor is 0.8\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.18-4,Page No:484"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "e=0.90 # coefficient o restitution\n",
+ "v_a=10 # m/s # velocity of ball A\n",
+ "v_b=15 # m/s # velocity of ball B\n",
+ "alpha_1=30 # degree # angle made by v_a with horizontal\n",
+ "alpha_2=60 # degree # angle made by v_b with horizontal\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# The components of initial velocity of ball A:\n",
+ "v_a_x=v_a*cos(alpha_1*(pi/180)) # m/s\n",
+ "v_a_y=v_a*sin(alpha_1*(pi/180)) # m/s\n",
+ "\n",
+ "# The components of initial velocity of ball B:\n",
+ "v_b_x=-v_b*cos(alpha_2*(pi/180)) # m/s\n",
+ "v_b_y=v_b*sin(alpha_2*(pi/180)) # m/s\n",
+ "\n",
+ "# From eq'n 1 & 2 we get,\n",
+ "v_ay=v_a_y # m/s # Here, v_ay=(v'_a)_y\n",
+ "v_by=v_b_y # m/s # Here, v_by=(v'_b)_y\n",
+ "\n",
+ "# On adding eq'n 3 & 4 we get,\n",
+ "v_bx=((v_a_x+v_b_x)+(-e*(v_b_x-v_a_x)))*0.5 # m/s # Here. v_bx=(v'_b)_x\n",
+ "\n",
+ "# On substuting the value of v'_b_x in eq'n 3 we get,\n",
+ "v_ax=(v_a_x+v_b_x)-(v_bx) # m/s # here, v_ax=(v'_a)_x\n",
+ "\n",
+ "# Now the eq'n for resultant velocities of balls A & B after impact are,\n",
+ "v_A=(v_ax**2+v_ay**2)**0.5 # m/s\n",
+ "v_B=(v_bx**2+v_by**2)**0.5 # m/s\n",
+ "\n",
+ "# The direction of the ball after Impact is,\n",
+ "theta_1=arctan(-(v_ay/v_ax))*(180/pi) # degree\n",
+ "theta_2=arctan(v_by/v_bx)*(180/pi) # degree\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The velocity of ball A after impact is \",round(v_A,2),\"m/s\"\n",
+ "print\"The velocity of ball B after impact is \",round(v_B,2),\"m/s\"\n",
+ "print\"The direction of ball A after impact is \",round(theta_1,2),\"degree\"\n",
+ "print\"The direction of ball B after impact is \",round(theta_2,2),\"degree\"\n",
+ "# Her we use, (1) v'_a & v'_b as v_A & v_B.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity of ball A after impact is 8.35 m/s\n",
+ "The velocity of ball B after impact is 15.18 m/s\n",
+ "The direction of ball A after impact is 36.77 degree\n",
+ "The direction of ball B after impact is 58.85 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.18-5,Page No:485"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initiization of variables\n",
+ "theta=30 # degrees # ange made by the ball against the wall\n",
+ "e=0.50\n",
+ "# Calculations\n",
+ "# The notations have been changed\n",
+ "# Resolving the velocity v as,\n",
+ "v_x=cos(theta*(pi/180))\n",
+ "v_y=sin(theta*(pi/180))\n",
+ "V_y=v_y\n",
+ "# from coefficient of restitution reation\n",
+ "V_x=-e*v_x\n",
+ "# Resultant velocity\n",
+ "V=sqrt(V_x**2+V_y**2)\n",
+ "theta=arctan(V_y*(-V_x)**-1)*(180/pi) # taking +ve value for V_x\n",
+ "# NOTE: Here all the terms are multiplied with velocity i.e (v).\n",
+ "# Results\n",
+ "\n",
+ "print\"The velocity of the ball is \",round(V,3),\"v\"\n",
+ "print\"The direction of the ball is \",round(theta,1),\"degree\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity of the ball is 0.661 v\n",
+ "The direction of the ball is 49.1 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.18-6,Page No:488"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "# Initilization of variables\n",
+ "e=0.8 # coefficient of restitution\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "\n",
+ "# Calcuations\n",
+ "\n",
+ "# Squaring eqn's 1 &2 and Solving eqn's 1 & 2 using matrix for the value of h\n",
+ "A=np.array([[-1 ,(2*g)],[-1 ,-(1.28*g)]])\n",
+ "B=np.array([0.945**2,(-0.4*9.81)])\n",
+ "C=np.linalg.solve(A,B) # m\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The height from which the ball A should be released is \",round(C[1],3),\"m\"\n",
+ "# The answer given in the book i.e 0.104 is wrong.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The height from which the ball A should be released is 0.15 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.18-7,Page No:490"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "theta_a=60 # degree # angle made by sphere A with the verticle\n",
+ "e=1 # coefficient of restitution for elastic impact\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# theta_b is given by the eq'n cosd*theta_b=0.875, hence theta_b is,\n",
+ "theta_b=arccos(0.875)*(180/pi) # degree\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The angle through which the sphere B will swing after the impact is \",round(theta_b,2),\"degree\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The angle through which the sphere B will swing after the impact is 28.96 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.18-8,Page No:491"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "m_a=0.01 # kg # mass of bullet A\n",
+ "v_a=100 # m/s # velocity of bullet A\n",
+ "m_b=1 # kg # mass of the bob\n",
+ "v_b=0 # m/s # velocity of the bob\n",
+ "l=1 # m # length of the pendulum\n",
+ "v_r=-20 # m/s # velocity at which the bullet rebounds the surface of the bob # here the notation for v'_a is shown by v_r\n",
+ "v_e=20 # m/s # velocity at which the bullet escapes through the surface of the bob # here the notation for v_a is shown by v_e\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Momentum of the bullet & the bob before impact is,\n",
+ "M=(m_a*v_a)+(m_b*v_b) # kg.m/s......(eq'n 1)\n",
+ "\n",
+ "# The common velocity v_c ( we use v_c insted of v' for notation of common velocity) is given by equating eq'n 1 & eq'n 2 as,\n",
+ "\n",
+ "# (a) When the bullet gets embedded into the bob\n",
+ "v_c=M/(m_a+m_b) # m/s\n",
+ "# The height h to which the bob rises is given by eq'n 3 as,\n",
+ "h_1=(0.5)*(v_c**2/g) # m\n",
+ "# The angle (theta_1) by which the bob swings corresponding to the value of height h_1 is,\n",
+ "theta_1=arccos((l-h_1)/l)*(180/pi) # degree\n",
+ "\n",
+ "# (b) When the bullet rebounds from the surface of the bob\n",
+ "# The velocity of the bob after the rebound of the bullet from its surface is given by equating eq'n 1 & eq'n 4 as,\n",
+ "v_bob_rebound=M-(m_a*v_r) # m/s # here v_bob_rebound=v'_b\n",
+ "# The equation for the height which the bob attains after impact is,\n",
+ "h_2=(v_bob_rebound**2)/(2*g) # m\n",
+ "# The corresponding angle of swing \n",
+ "theta_2=arccos((l-h_2)/l)*(180/pi) # degree\n",
+ "\n",
+ "# (c) When the bullet pierces and escapes through the bob\n",
+ "# From eq'n 1 & 5 the velocity attained by the bob after impact is given as,\n",
+ "v_b_escape=M-(m_a*v_e) # m/s # here we use, v_b_escape insted of v'_b\n",
+ "# The equation for the height which the bob attains after impact is,\n",
+ "h_3=(v_b_escape**2)/(2*g) # m\n",
+ "# The corresponding angle of swing \n",
+ "theta_3=arccos((l-h_3)/(l))*(180/pi) # degree\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is \",round(theta_1,1),\"degree\"\n",
+ "print\"(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is \",round(theta_2,2),\"degree\"\n",
+ "print\"(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is \",round(theta_3,1),\"degree\"\n",
+ "# IN THIS SUM WE HAVE USED DIFFERENT NOTATIONS CONSIDERING DIFFERENT CASES BECAUSE IN THE TEXT BOOK WE HAD 3 VARIABLES WITH SAME NOTATION BUT WITH A DIFFERENT VALUE WHICH COULD NOT BE EXECUTED INTO SCILAB.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The maximum angle through which the pendulum swings when the bullet gets embeded into the bob is 18.2 degree\n",
+ "(b) The maximum angle through which the pendulum swings when the bullet rebounds from the surface of the bob is 22.09 degree\n",
+ "(c) The maximum angle through which the pendulum swings when the bullet escapes from other end of the bob the bob is 14.7 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.18-9,Page No:493"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "W_a=50 # N # falling weight\n",
+ "W_b=50 # N # weight on which W_a falls\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "m_a=W_a/g # kg # mass of W_a\n",
+ "m_b=W_b/g # kg # mass of W_b\n",
+ "k=2*10**3 # N/m # stiffness of spring\n",
+ "h=0.075 # m # height through which W_a falls\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "# The velocity of weight W_a just before the impact and after falling from a height of h is given from the eq'n, ( Principle of conservation of energy)\n",
+ "v_a=(2*g*h)**0.5 # m/s\n",
+ "\n",
+ "# Let the mutual velocity after the impact be v_m (i.e v_m=v'), (by principle of conservation of momentum)\n",
+ "v_m=(m_a*v_a)/(m_a+m_b) # m/s\n",
+ "\n",
+ "# Initial compression of the spring due to weight W_b is given by,\n",
+ "delta_st=(W_b/k)*(10**2) # cm\n",
+ "\n",
+ "# Let the total compression of the spring be delta_t, Then delta_t is found by finding the roots from the eq'n........ delta_t^2-0.1*delta_t-0.000003=0. In this eq'n let,\n",
+ "a=1\n",
+ "b=-0.1\n",
+ "c=-0.000003\n",
+ "delta_t=((-b+((b**2-(4*a*c))**0.5))/2*a)*(10**2) # cm # we consider the -ve value\n",
+ "delta=delta_t-delta_st # cm\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The compression of the spring over and above caused by the static action of weight W_a is \",round(delta),\"cm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The compression of the spring over and above caused by the static action of weight W_a is 10.0 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.18-10,Page No:494"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "v_a=600 # m/s # velocity of the bullet before impact\n",
+ "v_b=0 # m/s # velocity of the block before impact\n",
+ "w_b=0.25 # N # weight of the bullet\n",
+ "w_wb=50 # N # weight of wodden block\n",
+ "mu=0.5 # coefficient of friction between the floor and the block\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "m_a=w_b/g # kg # mass of the bullet\n",
+ "m_b=w_wb/g # kg # mass of the block\n",
+ "\n",
+ "# Let the common velocity be v_c which is given by eq'n (Principle of conservation of momentum)\n",
+ "v_c=(w_b*v_a)/(w_wb+w_b) # m/s\n",
+ "\n",
+ "# Let the distance through which the block is displaced be s, Then s is given by eq'n\n",
+ "s=v_c**2/(2*g*mu) # m\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The distance through which the block is displaced from its initial position is \",round(s,2),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The distance through which the block is displaced from its initial position is 0.91 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.18-11,Page No:495"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "M=750 # kg # mass of hammer\n",
+ "m=200 # kg # mass of the pile\n",
+ "h=1.2 # m # height of fall of the hammer\n",
+ "delta=0.1 # m # distance upto which the pile is driven into the ground\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "\n",
+ "# Caculations\n",
+ "\n",
+ "# The resistance to penetration to the pile is given by eq'n,\n",
+ "R=(((M+m)*g)+((M**2*g*h)/((M+m)*delta)))*(10**-3) # kN \n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The resistance to penetration to the pile is \",round(R),\"KN\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resistance to penetration to the pile is 79.0 KN\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter19_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter19_15.ipynb
new file mode 100644
index 00000000..264f97d6
--- /dev/null
+++ b/Engineering_Mechanics_by_Tayal_A.K./chapter19_15.ipynb
@@ -0,0 +1,254 @@
+{
+ "metadata": {
+ "name": "chapter19.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 19: Relative Motion"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19.19-1,Page no:503"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "v_t=10 # m/s # velocity of the train\n",
+ "v_s=5 # m/s # velocity of the stone\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Let v_r be the relative velocity, which is given as, (from triangle law)\n",
+ "v_r=(v_t**2+v_s**2)**0.5 # m/s\n",
+ "# The direction ofthe stone is,\n",
+ "theta=arctan(v_s*v_t**-1)*(180/pi) # degree\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The velocity at which the stone appears to hit the person travelling in the train is \",round(v_r,1),\"m\"\n",
+ "print\"The direction of the stone is \",round(theta,2),\"degree\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity at which the stone appears to hit the person travelling in the train is 11.2 m\n",
+ "The direction of the stone is 26.57 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19.19-2,Page No:504"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "v_A=5 # m/s # speed of ship A\n",
+ "v_B=2.5 # m/s # speed of ship B\n",
+ "theta=135 # degree # angle between the two ships\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Here,\n",
+ "OA=v_A # m/s\n",
+ "OB=v_B # m/s\n",
+ "\n",
+ "# The magnitude of relative velocity is given by cosine law as,\n",
+ "AB=((OA**2)+(OB**2)-(2*OA*OB*cos(theta*(pi/180))))**0.5 # m/s\n",
+ "\n",
+ "# where AB gives the relative velocity of ship B with respect to ship A\n",
+ "# Applying sine law to find the direction, Let alpha be the direction of the reative velocity, then\n",
+ "alpha=arcsin((OB*sin(theta*(pi/180)))/(AB))*(180/pi) # degree\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The magnitude of relative velocity of ship B with respect to ship A is \",round(AB,2),\"m/s\"\n",
+ "print\"The direction of the relative velocity is \",round(alpha,2),\"degree\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The magnitude of relative velocity of ship B with respect to ship A is 6.99 m/s\n",
+ "The direction of the relative velocity is 14.64 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19.19-3,Page No:505"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "import numpy as np\n",
+ "# Initilization of variables\n",
+ "\n",
+ "v_c=20 # km/hr # speed at which the cyclist is riding to west\n",
+ "theta_1=45 # degree # angle made by rain with the cyclist when he rides at 20 km/hr\n",
+ "V_c=12 # km/hr # changed speed\n",
+ "theta_2=30 # degree # changed angle when the cyclist rides at 12 km/hr\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Solving eq'ns 1 & 2 simultaneously to get the values of components(v_R_x & v_R_y) of absolute velocity v_R. We use matrix to solve eqn's 1 & 2.\n",
+ "A=np.array([[1 ,1],[1, 0.577]])\n",
+ "B=np.array([20,12])\n",
+ "C=np.linalg.solve(A,B) # km/hr\n",
+ "\n",
+ "# The X component of relative velocity (v_R_x) is C(1)\n",
+ "# The Y component of relative velocity (v_R_y) is C(2)\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Relative velocity (v_R) is given as,\n",
+ "v_R=((C[0])**2+(C[1])**2)**0.5 # km/hr\n",
+ "# And the direction of absolute velocity of rain is theta, is given as\n",
+ "theta=arctan(C[1]/C[0])*(180/pi) # degree\n",
+ "\n",
+ "# Results \n",
+ "\n",
+ "print\"The magnitude of absolute velocity is \",round(v_R,2),\"km/hr\"\n",
+ "print\"The direction of absolute velocity is \",round(theta,1),\"degree\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The magnitude of absolute velocity is 18.94 km/hr\n",
+ "The direction of absolute velocity is 86.7 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19.19-4,Page No:508"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initiization of variables\n",
+ "\n",
+ "a=1 # m/s^2 # acceleration of car A\n",
+ "u_B=36*1000*3600**-1 # m/s # velocity of car B\n",
+ "u=0 # m/s # initial velocity of car A\n",
+ "d=32.5 # m # position of car A from north of crossing\n",
+ "t=5 # seconds\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# CAR A: Absolute motion using eq'n v=u+at we have,\n",
+ "v=u+(a*t) # m/s\n",
+ "# Now distance travelled by car A after 5 seconds is given by, s_A=u*t+(1/2)*a*t^2\n",
+ "s_A=(u*t)+((0.5)*a*t**2)\n",
+ "# Now, let the position of car A after 5 seconds be y_A\n",
+ "y_A=d-s_A # m # \n",
+ "\n",
+ "# CAR B:\n",
+ "# let a_B be the acceleration of car B\n",
+ "a_B=0 # m/s\n",
+ "# Now position of car B is s_B\n",
+ "s_B=(u_B*t)+((0.5)*a_B*t**2) # m\n",
+ "x_B=s_B # m\n",
+ "\n",
+ "# Let the Relative position of car A with respect to car B be BA & its direction be theta, then from fig. 19.9(b)\n",
+ "OA=y_A\n",
+ "OB=x_B\n",
+ "BA=(OA**2+OB**2)**0.5 # m\n",
+ "theta=arctan(OA/OB)*(180/pi) # degree\n",
+ "\n",
+ "# Let the relative velocity of car A w.r.t. the car B be v_AB & the angle be phi. Then from fig 19.9(c). Consider small alphabets\n",
+ "oa=v\n",
+ "ob=u_B\n",
+ "v_AB=(oa**2+ob**2)**0.5 # m/s\n",
+ "phi=arctan(oa/ob)*(180/pi) # degree\n",
+ "\n",
+ "# Let the relative acceleration of car A w.r.t. car B be a_A/B.Then,\n",
+ "a_AB=a-a_B # m/s^2\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The relative position of car A relative to car B is \",round(BA,1),\"m\"\n",
+ "print\"The direction of car A w.r.t car B is \",round(theta,1),\"degree\"\n",
+ "print\"The velocity of car A relative to car B is \",round(v_AB,1),\"m/s\"\n",
+ "print\"The direction of car A w.r.t (for relative velocity)is \",round(phi,1),\"degree\"\n",
+ "print\"The acceleration of car A relative to car B is \",round(a_AB,1),\"m/s^2\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The relative position of car A relative to car B is 53.9 m\n",
+ "The direction of car A w.r.t car B is 21.8 degree\n",
+ "The velocity of car A relative to car B is 11.2 m/s\n",
+ "The direction of car A w.r.t (for relative velocity)is 26.6 degree\n",
+ "The acceleration of car A relative to car B is 1.0 m/s^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter20_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter20_15.ipynb
new file mode 100644
index 00000000..50cd95d2
--- /dev/null
+++ b/Engineering_Mechanics_by_Tayal_A.K./chapter20_15.ipynb
@@ -0,0 +1,538 @@
+{
+ "metadata": {
+ "name": "chapter20.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 20: Motion Of Projectile"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 20.20-1,Page No:518"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "v_o=500 # m/s # velocity of the projectile\n",
+ "alpha=30 # angle at which the projectile is fired\n",
+ "t=30 # seconds\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "v_x=v_o*cos(alpha*(pi/180)) # m/s # Initial velocity in the horizontal direction\n",
+ "v_y=v_o*sin(alpha*(pi/180)) # m/s # Initial velocity in the vertical direction\n",
+ "\n",
+ "# MOTION IN HORIZONTA DIRECTION:\n",
+ "V_x=v_x # m/s # V_x=Horizontal velocity after 30 seconds\n",
+ "\n",
+ "# MOTION IN VERTICAL DIRECTION: # using the eq'n v=u+a*t\n",
+ "V_y=v_y-(g*t) # m/s # -ve sign denotes downward motion\n",
+ "\n",
+ "# Let the Resultant velocity be v_R. It is given as,\n",
+ "v_R=((V_x)**2+(-V_y)**2)**0.5# m/s\n",
+ "theta=arctan((-V_y)/V_x)*(180/pi) # degree # direction of the projectile\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The velocity of the projectile is \",round(v_R,2),\"m/s\" # The answer of velocity is wrong in the text book.\n",
+ "print\"The direction of the projectile is \",round(theta,2),\"degree\" # -ve value of theta indicates that the direction is in downward direction\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity of the projectile is 435.27 m/s\n",
+ "The direction of the projectile is 5.84 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 20.20-2,Page no:519"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "v_A=10 # m/s # velocity of body A\n",
+ "alpha_A=60 # degree # direction of body A\n",
+ "alpha_B=45 # degree # direction of body B\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# (a) The velocity (v_B) for the same range is given by eq'n;\n",
+ "v_B=((v_A**2*sin(2*alpha_A*(pi/180)))/(sin(2*alpha_B*(pi/180))))**0.5 # m/s\n",
+ "\n",
+ "# (b) Now velocity v_B for the same maximum height is given as,\n",
+ "v_b=((v_A**2)*((sin(alpha_A*(pi/180)))**2/(sin(alpha_B*(pi/180)))**2))**0.5 # m/s\n",
+ "\n",
+ "# (c) Now the velocity (v) for the equal time of flight is;\n",
+ "v=(v_A*sin(alpha_A*(pi/180)))/(sin(alpha_B*(pi/180))) # m/s\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"(a) The velocity of body B for horizontal range is \",round(v_B,1),\"m/s\"\n",
+ "print\"(b) The velocity of body B for the maximum height is \",round(v_b,2),\"m/s\"\n",
+ "print\"(c) The velocity of body B for equal time of flight is \",round(v,2),\"m/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The velocity of body B for horizontal range is 9.3 m/s\n",
+ "(b) The velocity of body B for the maximum height is 12.25 m/s\n",
+ "(c) The velocity of body B for equal time of flight is 12.25 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 20.20-3,Page No:520 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "y=3.6 # m # height of the wall\n",
+ "x_1=4.8 # m # position of the boy w.r.t the wall\n",
+ "x_2=3.6 # m # distance from the wall where the ball hits the ground\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# The range of the projectile is r, given as,\n",
+ "r=x_1+x_2 # m\n",
+ "\n",
+ "# Let the angle of the projection be alpha, which is derived and given as,\n",
+ "alpha=arctan((y)/(x_1-(x_1**2/r)))*(180/pi) # degree\n",
+ "\n",
+ "# Now substuting the value of alpha in eq'n 3 we get the least velocity (v_o) as;\n",
+ "v_o=((g*r)/(sin(2*alpha*(pi/180))))**0.5 # m/s\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The least velocity with which the ball can be thrown is \",round(v_o,2),\"m/s\"\n",
+ "print\"The angle of projection for the same is \",round(alpha,1),\"degree\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The least velocity with which the ball can be thrown is 9.78 m/s\n",
+ "The angle of projection for the same is 60.3 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 20.20-5,Page No:523 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "v_o=400 # m/s # initial velocity of each gun\n",
+ "r=5000 # m # range of each of the guns\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "p=180 # degree \n",
+ "pi=3.14\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# now from eq'n 1\n",
+ "theta_1=(arcsin(r*g/v_o**2)*(180/pi))/2 # degree # angle at which the 1st gun is fired\n",
+ "\n",
+ "# from eq'n 3\n",
+ "theta_2=(p-2*theta_1)/2 # degree \n",
+ "\n",
+ "# For 1st & 2nd gun, s is\n",
+ "s=r # m\n",
+ "\n",
+ "# For 1st gun \n",
+ "v_x=v_o*cos(theta_1*(pi/180)) # m/s\n",
+ "\n",
+ "# Now the time of flight for 1st gun is t_1, which is given by relation,\n",
+ "t_1=s*(v_x)**-1 # seconds\n",
+ "\n",
+ "# For 2nd gun\n",
+ "V_x=v_o*cos(theta_2*(pi/180))\n",
+ "\n",
+ "# Now the time of flight for 2nd gun is t_2\n",
+ "t_2=s/V_x # seconds\n",
+ "\n",
+ "# Let the time difference between the two hits be delta.T. Then,\n",
+ "T=t_2-t_1 # seconds\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The time difference between the two hits is \",round(T,2),\"seconds\" #answer varies by 0.6 sec due to decimal variance\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The time difference between the two hits is 67.5 seconds\n"
+ ]
+ }
+ ],
+ "prompt_number": 99
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 20.20-6,Page No:524"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "h=2000 # m/ height of the plane\n",
+ "v=540*1000*3600**-1 # m/s # velocity of the plane\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "pi=3.14\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Time t required to travel down a height 2000 m is given by eq'n,\n",
+ "u=0 # m/s # initial velocity\n",
+ "t=(2*h/g)**0.5 # seconds\n",
+ "\n",
+ "# Now let s be the horizonta distance travelled by the bomb in time t seconds, then\n",
+ "s= v*t # m\n",
+ "\n",
+ "# angle is given as theta,\n",
+ "theta=arctan(h/s)*(180/pi) # degree\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The pilot should release the bomb from a distance of \",round(s),\"m\" #the answer varies by 1m due to decimal variance\n",
+ "print\"The angle at which the target would appear is \",round(theta,1),\"degree\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The pilot should release the bomb from a distance of 3029.0 m\n",
+ "The angle at which the target would appear is 33.5 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 70
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 20.20-7,Page No:525"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "theta=30 # degree # angle at which the bullet is fired\n",
+ "s=-50 # position of target below hill\n",
+ "v=100 # m/s # velocity at which the bullet if fired\n",
+ "g=9.81 # m/s^2 \n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "v_x=v*cos(theta*(pi/180)) # m/s # Initial velocity in horizontal direction\n",
+ "v_y=v*sin(theta*(pi/180)) # m/s # Initial velocity in vertical direction\n",
+ "\n",
+ "# (a) Max height attained by the bullet\n",
+ "h=v_y**2/(2*g) # m\n",
+ "\n",
+ "# (b)Let the vertical Velocity with which the bullet will hit the target be V_y. Then,\n",
+ "V_y=((2*-9.81*s)+(v_y)**2)**0.5 # m/s # the value of V_y is +ve & -ve\n",
+ "\n",
+ "# Let V be the velocity with wich it hits the target\n",
+ "V=((v_x)**2+(V_y)**2)**0.5 # m/s\n",
+ "\n",
+ "# (c) The time required to hit the target\n",
+ "a=g # m/s^2\n",
+ "t=(v_y-(-V_y))/a # seconds\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"(a) The maximum height to which the bullet will rise above the soldier is \",round(h,1),\"m\"\n",
+ "print\"(b) The velocity with which the bullet will hit the target is \",round(V,1),\"m/s\"\n",
+ "print\"(c) The time required to hit the target is \",round(t,1),\"seconds\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The maximum height to which the bullet will rise above the soldier is 127.3 m\n",
+ "(b) The velocity with which the bullet will hit the target is 104.8 m/s\n",
+ "(c) The time required to hit the target is 11.1 seconds\n"
+ ]
+ }
+ ],
+ "prompt_number": 72
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 20.20-8,Page No:527"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "W=30 # N # Weight of the hammer\n",
+ "theta=30 # degree # ref fig.20.12\n",
+ "mu=0.18 # coefficient of friction\n",
+ "s=10 # m # distance travelled by the hammer # fig 20.12\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# The acceleration of the hammer is given as,\n",
+ "a=g*((sin(theta*(pi/180)))-(mu*cos(theta*(pi/180)))) # m/s^2\n",
+ "\n",
+ "# The velocity of the hammer at point B is,\n",
+ "v=(2*a*s)**0.5 # m/s\n",
+ "\n",
+ "# Let the initial velocity of the hammer in horizontal direction be v_x & v_y in vertical direction, Then,\n",
+ "v_x=v*cos(theta*(pi/180)) # m/s\n",
+ "v_y=v*sin(theta*(pi/180)) # m/s\n",
+ "\n",
+ "# MOTION IN VERTICAL DIRECTION\n",
+ "# Now, let time required to travel vertical distance (i.e BB'=S=5 m) is given by finding the roots of the second degree eq'n as,\n",
+ "# From the eq'n 4.9*t^2+4.1*t-5=0,\n",
+ "a=4.9\n",
+ "b=4.1\n",
+ "c=-5\n",
+ "\n",
+ "# The roots of the eq'n are,\n",
+ "t=((-b)+((b**2-(4*a*c))**0.5))/(2*a)\n",
+ "\n",
+ "# MOTION IN HORIZONTAL DIRECTION\n",
+ "# Let the horizotal distance travelled by the hammer in time t be s_x.Then,\n",
+ "s_x=v_x*cos(theta*(pi/180))*t # m\n",
+ "x=1+s_x # m\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The distance x where the hammer hits the round is \",round(x,2),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The distance x where the hammer hits the round is 5.16 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 101
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 20.20-9,Page no:528"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "s=1000 # m # distance OB (ref fig.20.13)\n",
+ "h=19.6 # m # height of shell from ground\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# MOTION OF ENTIRE SHELL FROM O to A.\n",
+ "v_y=(2*(g)*h)**0.5 # m/s # initial velocity of shell in vertical direction\n",
+ "t=v_y/g # seconds # time taken by the entire shell to reach point A\n",
+ "v_x=s/t # m/s # velocity of shell in vertical direction\n",
+ "\n",
+ "# VELOCITIES OF THE TWO PARTS OF THE SHELL AFTER BURSTING AT A:\n",
+ "\n",
+ "# Let v_x2 be the horizontal velocity of 1st & the 2nd part after bursting which is given as,\n",
+ "v_x2=v_x*2 # m/s\n",
+ "\n",
+ "# Now distance BC travelled by part 2 is\n",
+ "BC=v_x2*t # m\n",
+ "\n",
+ "# Distance from firing point OC\n",
+ "OC=s+BC # m\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"(a) The velocity of shell just before bursting is \",round(v_x),\"m/s\"\n",
+ "print\"(b) The velocity of first part immediately before the shell burst is \",round(v_x),\"m/s\"\n",
+ "print\"(c) The velocity of second part immediately after the shell burst is \",round(v_x2,1),\"m/s\"\n",
+ "print\"(b) The distance between the firing point & the point where the second part of the shell hit the ground is \",round(OC),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The velocity of shell just before bursting is 500.0 m/s\n",
+ "(b) The velocity of first part immediately before the shell burst is 500.0 m/s\n",
+ "(c) The velocity of second part immediately after the shell burst is 1000.5 m/s\n",
+ "(b) The distance between the firing point & the point where the second part of the shell hit the ground is 3000.0 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 106
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 20.20-10,Page No:530"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "v_o=200 # m/s # initial velocity\n",
+ "theta=60 # degree # angle of the incline\n",
+ "y=5 # rise of incline\n",
+ "x=12 # length of incline\n",
+ "g=9.81 # m/s^2 # acc due to gravity\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# The angle of the inclined plane with respect to horizontal\n",
+ "beta=arctan(y*x**-1)*(180/pi) # degree\n",
+ "\n",
+ "# The angle of projection with respect to horizontal\n",
+ "alpha=90-theta # degree\n",
+ "\n",
+ "# Range is given by eq'n (ref. fig.20.14)\n",
+ "AB=(2*v_o**2*(sin((alpha-beta)*(pi/180)))*cos(alpha*(pi/180)))/(g*(cos(beta*(pi/180)))**2) # m\n",
+ "\n",
+ "# Range AC when the short is fired down the plane\n",
+ "AC=(2*v_o**2*(sin((alpha+beta)*(pi/180)))*cos(alpha*(pi/180)))/(g*(cos(beta*(pi/180)))**2) # m\n",
+ "BC=AB+AC # m\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The range covered (i.e BC) is \",round(BC),\"m\" #due to decimal variancce answer varies by 1m\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The range covered (i.e BC) is 7649.0 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 138
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter21_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter21_15.ipynb
new file mode 100644
index 00000000..52504506
--- /dev/null
+++ b/Engineering_Mechanics_by_Tayal_A.K./chapter21_15.ipynb
@@ -0,0 +1,659 @@
+{
+ "metadata": {
+ "name": "chapter21.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 21: Kinematics Of Rigid Body"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21.21-1,Page No:536"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "N=1800 # r.p.m # Speed of the shaft\n",
+ "t=5 # seconds # time taken to attain the rated speed # case (a)\n",
+ "T=90 # seconds # time taken by the unit to come to rest # case (b)\n",
+ "pi=3.14 # constant\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "omega=(2*pi*N)/(60)\n",
+ "\n",
+ "# (a)\n",
+ "# we take alpha_1,theta_1 & n_1 for case (a)\n",
+ "alpha_1=omega/t # rad/s^2 #\n",
+ "theta_1=(omega**2)/(2*alpha_1) # radian\n",
+ "# Let n_1 be the number of revolutions turned,\n",
+ "n_1=theta_1*(1/(2*pi))\n",
+ "\n",
+ "# (b)\n",
+ "# similarly we take alpha_1,theta_1 & n_1 for case (b)\n",
+ "alpha_2=(omega/T) # rad/s^2 # However here alpha_2 is -ve\n",
+ "theta_2=(omega**2)/(2*alpha_2) # radians\n",
+ "# Let n_2 be the number of revolutions turned,\n",
+ "n_2=theta_2*(1/(2*pi))\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"(a) The no of revolutions the unit turns to attain the rated speed is \",round(n_1)\n",
+ "print\"(b) The no of revolutions the unit turns to come to rest is \",round(n_2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The no of revolutions the unit turns to attain the rated speed is 75.0\n",
+ "(b) The no of revolutions the unit turns to come to rest is 1350.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21.21-2,Page No:540"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "r=1 # m # radius of the cylinder\n",
+ "v_c=20 # m/s # velocity of the cylinder at its centre\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# The velocity of point E is given by using the triangle law as,\n",
+ "v_e=(2)**0.5*v_c # m/s \n",
+ "\n",
+ "# Similarly the velocity at point F is given as,\n",
+ "v_f=2*v_c # m/s \n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The velocity of point E is \",round(v_e,2),\"m/s\"\n",
+ "print\"The velocity of point F is \",round(v_f),\"m/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity of point E is 28.28 m/s\n",
+ "The velocity of point F is 40.0 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21.21-3,Page No:541"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "# Initilization of Variables\n",
+ "\n",
+ "v_1=3 # m/s # uniform speed of the belt at top\n",
+ "v_2=2 # m/s # uniform speed of the belt at the bottom\n",
+ "r=0.4 # m # radius of the roller\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# equating eq'ns 2 & 4 and solving for v_c & theta' (angular velocity). We use matrix to solve the eqn's\n",
+ "A=np.array([[1 ,r],[1 ,-r]])\n",
+ "B=np.array([v_1,v_2])\n",
+ "C=np.linalg.solve(A,B)\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The linear velocity (v_c) at point C is \",round(C[0],1),\"m/s\"\n",
+ "print\"The angular velocity at point C is \", round(C[1],2),\"radian/second\"\n",
+ "# NOTE: The answer of angular velocity is incorrect in the book\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The linear velocity (v_c) at point C is 2.5 m/s\n",
+ "The angular velocity at point C is 1.25 radian/second\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21.21-4,Page No:542"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of Variables\n",
+ "\n",
+ "l=1 # m # length of bar AB\n",
+ "v_a=5 # m/s # velocity of A\n",
+ "theta=30 # degree # angle made by the bar with the horizontal\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# From the vector diagram linear velocity of end B is given as,\n",
+ "v_b=v_a/tan(theta*(pi/180)) # m/s \n",
+ "\n",
+ "# Now let the relative velocity be v_ba which is given as,\n",
+ "v_ba=v_a/sin(theta*(pi/180)) # m/s\n",
+ "\n",
+ "# Now let the angular velocity of the bar be theta_a which is given as,\n",
+ "theta_a=(v_ba)/l # radian/second\n",
+ "\n",
+ "# Velocity of point A\n",
+ "v_a=(0.5)*theta_a # m/s\n",
+ "\n",
+ "# Magnitude of velocity at point C is,\n",
+ "v_c=v_a # m/s # from the vector diagram\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"(a) The angular velocity of the bar is \",round(theta_a),\"radian/second\"\n",
+ "print\"(b) The velocity of end B is \",round(v_b,2),\"m/s\"\n",
+ "print\"(c) The velocity of mid point C is \",round(v_c),\"m/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The angular velocity of the bar is 10.0 radian/second\n",
+ "(b) The velocity of end B is 8.67 m/s\n",
+ "(c) The velocity of mid point C is 5.0 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21.21-5,Page No:544"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of Variables\n",
+ "\n",
+ "r=0.12 # m # length of the crank\n",
+ "l=0.6 # m # length of the connecting rod\n",
+ "N=300 # r.p.m # angular velocity of the crank\n",
+ "theta=30 # degree # angle made by the crank with the horizontal\n",
+ "pi=3.14\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Now let the angle between the connecting rod and the horizontal rod be phi\n",
+ "phi=arcsin(r*sin(theta*(pi/180))/(l))*(180/pi) # degree\n",
+ "\n",
+ "# Now let the angular velocity of crank OA be omega_oa, which is given by eq'n\n",
+ "omega_oa=(2*pi*N)/(60) # radian/second\n",
+ "\n",
+ "# Linear velocity at A is given as,\n",
+ "v_a=r*omega_oa # m/s\n",
+ "\n",
+ "# Now using the sine rule linear velocity at B can be given as,\n",
+ "v_b=v_a*sin(35.7*(pi/180))/sin(84.3*(pi/180)) # m/s\n",
+ "\n",
+ "# Similarly the relative velocity (assume v_ba) is given as,\n",
+ "v_ba=v_a*sin(60*(pi/180))/sin(84.3*(pi/180))\n",
+ "\n",
+ "# Angular velocity (omega_ab) is given as,\n",
+ "omega_ab=v_ba/l # radian/second\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"(a) The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n",
+ "print\"(b) The velocity of the piston when the crank makes an angle of 30 degree is \",round(v_b,2),\"m/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The angular velocity of the connecting rod is 5.46 radian/second\n",
+ "(b) The velocity of the piston when the crank makes an angle of 30 degree is 2.21 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21.21-6,Page No:548"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initiization of variables\n",
+ "\n",
+ "r=1 # m # radius of the cylinder\n",
+ "v_c=20 # m/s # velocity at the centre\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Angular velocity is given as,\n",
+ "omega=v_c/r # radian/second\n",
+ "\n",
+ "# Velocity at point D is\n",
+ "v_d=omega*(2)**0.5*r # m/s # from eq'n 1\n",
+ "\n",
+ "# Now, the velocity at point E is,\n",
+ "v_e=omega*2*r # m/s \n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n",
+ "print\"The velocity at point E is \",round(v_e),\"m/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity at point D is 28.28 m/s\n",
+ "The velocity at point E is 40.0 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21.21-7,Page No:548"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of Variables\n",
+ "\n",
+ "r=5 # cm # radius of the roller\n",
+ "AB=0.1 # m\n",
+ "v_a=3 # m/s # velocity at A\n",
+ "v_b=2 # m/s # velocity at B\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Solving eqn's 1 & 2 using matrix for IA & IB we get,\n",
+ "A=np.array([[-2 ,3],[1, 1]])\n",
+ "B=np.array([0,AB])\n",
+ "C=np.linalg.solve(A,B)\n",
+ "d1=C[1]*10**2 # cm # assume d1 for case 1\n",
+ "\n",
+ "# Similary solving eqn's 3 & 4 again for IA & IB we get,\n",
+ "P=np.array([[-v_b, v_a],[1, -1]])\n",
+ "Q=np.array([0,AB])\n",
+ "R=np.linalg.solve(P,Q)\n",
+ "d2=R[1]*10**2 # cm # assume d2 for case 2\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The distance d when the bars move in the opposite directions are \",round(d1),\"cm\"\n",
+ "print\"The distance d when the bars move in the same directions are \",round(d2),\"cm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The distance d when the bars move in the opposite directions are 4.0 cm\n",
+ "The distance d when the bars move in the same directions are 20.0 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21.21-8,Page No:550"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of Variables\n",
+ "\n",
+ "v_c=1 # m/s # velocity t the centre\n",
+ "r1=0.1 # m \n",
+ "r2=0.20 # m\n",
+ "EB=0.1 # m\n",
+ "EA=0.3 # m\n",
+ "ED=(r1**2+r2**2)**0.5 # m\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# angular velocity is given as,\n",
+ "omega=v_c/r1 # radian/seconds\n",
+ "\n",
+ "# Velocit at point B\n",
+ "v_b=omega*EB # m/s \n",
+ "\n",
+ "# Velocity at point A\n",
+ "v_a=omega*EA # m/s\n",
+ "\n",
+ "# Velocity at point D\n",
+ "v_d=omega*ED # m/s\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The velocity at point A is \",round(v_a),\"m/s\"\n",
+ "print\"The velocity at point B is \",round(v_b),\"m/s\"\n",
+ "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity at point A is 3.0 m/s\n",
+ "The velocity at point B is 1.0 m/s\n",
+ "The velocity at point D is 2.24 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21.21-9,Page No:551"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "l=1 # m # length of bar AB\n",
+ "v_a=5 # m/s # velocity at A\n",
+ "theta=30 # degree # angle made by the bar with the horizontal\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "IA=l*sin(theta*(pi/180)) # m\n",
+ "IB=l*cos(theta*(pi/180)) # m\n",
+ "IC=0.5 # m # from triangle IAC\n",
+ "\n",
+ "# Angular veocity is given as,\n",
+ "omega=v_a/(IA) # radian/second\n",
+ "v_b=omega*IB # m/s\n",
+ "v_c=omega*IC # m/s\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The velocity at point B is \",round(v_b,2),\"m/s\"\n",
+ "print\"The velocity at point C is \",round(v_c),\"m/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity at point B is 8.67 m/s\n",
+ "The velocity at point C is 5.0 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21.21-11,Page No:552"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "v_a=2 # m/s # velocity at end A\n",
+ "r=0.05 # m # radius of the disc\n",
+ "alpha=30 # degree # angle made by the bar with the horizontal\n",
+ "\n",
+ "# Calculations \n",
+ "\n",
+ "# Soving eqn's 1 & 2 and substuting eqn 1 in it we get eq'n for omega as,\n",
+ "omega=(v_a*(sin(alpha*(pi/180)))**2)/(r*cos(alpha*(pi/180))) # radian/second\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The anguar veocity of the bar is \",round(omega,2),\"radian/second\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The anguar veocity of the bar is 11.53 radian/second\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21.21-12,Page No:553"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "l=0.6 # m \n",
+ "r=0.12 # m \n",
+ "theta=30 # degree # angle made by OA with the horizontal\n",
+ "phi=5.7 # degree # from EX 21.5\n",
+ "N=300\n",
+ "pi=3.14\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Let the angular velocity of the connecting rod be (omega_ab) which is given from eqn's 1 & 4 as,\n",
+ "omega_oa=(2*pi*N)/(60) # radian/ second\n",
+ "\n",
+ "# Now,in triangle IBO.\n",
+ "IB=(l*cos(phi*(pi/180))*tan(theta*(pi/180)))+(r*sin(theta*(pi/180))) # m\n",
+ "IA=(l*cos(phi*(pi/180)))/(cos(theta*(pi/180))) # m\n",
+ "\n",
+ "# from eq'n 5\n",
+ "v_b=(r*omega_oa*IB)/(IA) # m/s\n",
+ "\n",
+ "# From eq'n 6\n",
+ "omega_ab=(r*omega_oa)/(IA) # radian/second\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The velocity at B is \",round(v_b,2),\"m/s\"\n",
+ "print\"The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity at B is 2.21 m/s\n",
+ "The angular velocity of the connecting rod is 5.47 radian/second\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21.21-13,Page No:555"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "omega_ab=5 # rad/s # angular veocity of the bar\n",
+ "AB=0.20 # m\n",
+ "BC=0.15 # m\n",
+ "CD=0.3 # m\n",
+ "theta=30 # degree # where theta= angle made by AB with the horizontal\n",
+ "alpha=60 # degree # where alpha=angle made by CD with the horizontal\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Consider triangle BIC\n",
+ "IB=sin(alpha*(pi/180))*BC*1 # m\n",
+ "IC=sin(theta*(pi/180))*BC*1 # m\n",
+ "v_b=omega_ab*AB # m/s\n",
+ "\n",
+ "# let the angular velocity of the bar BC be omega_bc\n",
+ "omega_bc=v_b/IB # radian/second\n",
+ "v_c=omega_bc*IC # m/s\n",
+ "\n",
+ "# let the angular velocity of bar DC be omega_dc\n",
+ "omega_dc=v_c/CD # radian/second\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The angular velocity of bar BC is \",round(omega_bc,3),\"rad/s\"\n",
+ "print\"The angular velocity of bar CD is \",round(omega_dc,2),\"rad/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The angular velocity of bar BC is 7.7 rad/s\n",
+ "The angular velocity of bar CD is 1.92 rad/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter22_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter22_15.ipynb
new file mode 100644
index 00000000..c88d8037
--- /dev/null
+++ b/Engineering_Mechanics_by_Tayal_A.K./chapter22_15.ipynb
@@ -0,0 +1,274 @@
+{
+ "metadata": {
+ "name": "chapter22.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 22: Kinetics Of Rigid Body:Force And Acceleration"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 22.22-1,Page No:562"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "N=1500 # r.p.m\n",
+ "r=0.5 # m # radius of the disc\n",
+ "m=300 # N # weight of the disc\n",
+ "t=120 # seconds # time in which the disc comes to rest\n",
+ "omega=0 \n",
+ "pi=3.14 \n",
+ "g=9.81 # m/s^2\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "omega_0=(2*pi*N)*0.01666 # rad/s #1/60=0.01666\n",
+ "\n",
+ "# angular deceleration is given as,\n",
+ "alpha=-(omega_0/t) # radian/second^2\n",
+ "theta=(omega_0**2)/(2*(-alpha)) # radian\n",
+ "\n",
+ "# Let n be the no of revolutions taken by the disc before it comes to rest, then\n",
+ "n=theta/(2*pi)\n",
+ "\n",
+ "# Now,\n",
+ "I_G=((0.5)*m*r**2)/g\n",
+ "\n",
+ "# The frictional torque is given as,\n",
+ "M=I_G*alpha # N-m\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"(a) The no of revolutions executed by the disc before coming to rest is \",round(n,2)\n",
+ "print\"(b) The frictional torque is \",round(M),\"N-m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The no of revolutions executed by the disc before coming to rest is 1499.4\n",
+ "(b) The frictional torque is -5.0 N-m\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 22.22-2,Page No:563"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "s=1 # m\n",
+ "mu=0.192 # coefficient of static friction\n",
+ "g=9.81 # m/s^2\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# The maximum angle of the inclined plane is given as,\n",
+ "theta=arctan(3*mu)*(180/pi) # degree\n",
+ "a=(2/3)*g*sin(theta*(pi/180)) # m/s^2 # by solving eq'n 4\n",
+ "v=(2*a*s)**0.5 # m/s\n",
+ "\n",
+ "# Let the acceleration at the centre be A which is given as,\n",
+ "A=g*sin(theta*(pi/180)) # m/s^2 # from eq'n 1\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"(a) The acceleration at the centre is \",round(A,3),\"m/s^2\"\n",
+ "print\"(b) The maximum angle of the inclined plane is \",round(theta),\"degree\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The acceleration at the centre is 4.896 m/s^2\n",
+ "(b) The maximum angle of the inclined plane is 30.0 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 22.22-5,Page No:568"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "W_a=25 # N \n",
+ "W_b=25 # N \n",
+ "W=200 # N # weight of the pulley\n",
+ "i_g=0.2 # m # radius of gyration\n",
+ "g=9.81 # m/s^2\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Solving eqn's 1 & 2 for acceleration of weight A (assume a)\n",
+ "a=(0.15*W_a*g)/(((W*i_g**2)/(0.45))+(0.45*W_a)+((0.6*W_b)/(3))) # m/s^2\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The acceleration of weight A is \",round(a,2),\"m/s^2\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The acceleration of weight A is 1.08 m/s^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 22.22-8,Page No:571"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "r_1=0.075 # m\n",
+ "r_2=0.15 # m\n",
+ "P=50 # N\n",
+ "W=100 # N\n",
+ "i_g=0.05 # m\n",
+ "theta=30 # degree\n",
+ "g=9.81 # m/s^2\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# The eq'n for acceleration of the pool is given by solving eqn's 1,2 &3 as,\n",
+ "a=(50*g*(r_2*cos(theta*(pi/180))-r_1))/(100*((i_g**2/r_2)+r_2)) # m/s^2\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The acceleration of the pool is \",round(a,2),\"m/s^2\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The acceleration of the pool is 1.62 m/s^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 22.22-10,Page No:574"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "L=1 # m # length of rod AB\n",
+ "m=10 # kg # mass of the rod\n",
+ "g=9.81 \n",
+ "theta=30 # degree\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# solving eq'n 4 for omega we get,\n",
+ "omega=(2*16.82*sin(theta*(pi/180)))**0.5 # rad/s\n",
+ "\n",
+ "# Now solving eq'ns 1 &3 for alpha we get,\n",
+ "alpha=(1.714)*g*cos(theta*(pi/180)) # rad/s\n",
+ "\n",
+ "# Components of reaction are given as,\n",
+ "R_t=((m*g*cos(theta*(pi/180)))-((m*alpha*L)/4)) # N\n",
+ "R_n=((m*omega**2*L)/4)+(m*g*sin(theta*(pi/180))) # N\n",
+ "R=(R_t**2+R_n**2)**0.5 # N \n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"(a) The angular velocity of the rod is \",round(omega,2),\"rad/sec\"\n",
+ "print\"(b) The reaction at the hinge is \",round(R,1),\"N\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The angular velocity of the rod is 4.1 rad/sec\n",
+ "(b) The reaction at the hinge is 103.2 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter23_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter23_15.ipynb
new file mode 100644
index 00000000..917abffa
--- /dev/null
+++ b/Engineering_Mechanics_by_Tayal_A.K./chapter23_15.ipynb
@@ -0,0 +1,66 @@
+{
+ "metadata": {
+ "name": "chapter23.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 23: Kinetics Of Rigid Body:Work And Energy"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 23.23-2,Page No:586"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "m=600 # kg # mass of the roller\n",
+ "r=0.25 # m # radius of the roller\n",
+ "P=850 # N # Force\n",
+ "v=3 # m/s # velocity to be acquired\n",
+ "theta=30 # degree # angle made by v with the force P\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# The distance required to be rolled is given by equating the Work done between positions 1 & 2 as,\n",
+ "x=((0.75)*m*v**2)/(P*cos(theta*(pi/180))) # m\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The distance required to be rolled is \",round(x,1),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The distance required to be rolled is 5.5 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter24_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter24_15.ipynb
new file mode 100644
index 00000000..d978edd5
--- /dev/null
+++ b/Engineering_Mechanics_by_Tayal_A.K./chapter24_15.ipynb
@@ -0,0 +1,340 @@
+{
+ "metadata": {
+ "name": "chapter24.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 24: Mechanical Vibrations"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 24.24-1,Page No:596"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "f=0.1666666 # oscillations/second\n",
+ "x=8 # cm # distance from the mean position\n",
+ "pi=3.14\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "omega=2*pi*f\n",
+ "\n",
+ "# Amplitude is given by eq'n \n",
+ "r=sqrt((25*x**2)/16) # cm\n",
+ "\n",
+ "# Maximum acceleration is given as,\n",
+ "a_max=(pi/3)**2*10 # cm/s^2\n",
+ "\n",
+ "# Velocity when it is at a dist of 5 cm (assume s=5 cm) is given by\n",
+ "s=5 # cm\n",
+ "v=omega*(r**2-s**2)**0.5 # cm/s\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"(a) The amplitude of oscillation is \",round(r,2),\"cm\"\n",
+ "print\"(b) The maximum acceleration is \",round(a_max,2),\"cm/s^2\"\n",
+ "print\"(c) The velocity of the particle at 5 cm from mean position is \",round(v,2),\"cm/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The amplitude of oscillation is 10.0 cm\n",
+ "(b) The maximum acceleration is 10.96 cm/s^2\n",
+ "(c) The velocity of the particle at 5 cm from mean position is 9.06 cm/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 24.24-2,Page No:597"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "x_1=0.1 # m # assume the distance of the particle from mean position as (x_1 & x_2)\n",
+ "x_2=0.2# m \n",
+ "\n",
+ "# assume velocities as v_1 & v_2\n",
+ "\n",
+ "v_1=1.2 # m/s\n",
+ "v_2=0.8 # m/s\n",
+ "pi=3.14\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# The amplitude of oscillations is given by dividing eq'n 1 by 2 as,\n",
+ "r=(0.064)**0.5 # m\n",
+ "omega=v_1*((r**2-x_1**2)**0.5) # radians/second\n",
+ "t=(2*pi)/omega # seconds\n",
+ "v_max=r*omega # m/s\n",
+ "\n",
+ "# let the max acceleration be a which is given as,\n",
+ "a=r*omega**2 # m/s^2\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"(a) The amplitude of oscillations is \",round(r,3),\"m\"\n",
+ "print\"(b) The time period of oscillations is \",round(t,2),\"seconds\"\n",
+ "print\"(c) The maximum velocity is \",round(v_max,2),\"m/s\"\n",
+ "print\"(d) The maximum acceleration is \",round(a,2),\"m/s^2\"\n",
+ "# NOTE: the value of t is incorrect in the text book\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The amplitude of oscillations is 0.253 m\n",
+ "(b) The time period of oscillations is 1.22 seconds\n",
+ "(c) The maximum velocity is 1.31 m/s\n",
+ "(d) The maximum acceleration is 6.75 m/s^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exammple 24.24-5,Page No:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variabes\n",
+ "\n",
+ "W=50 # N # weight\n",
+ "x_0=0.075 # m # amplitude\n",
+ "f=1 # oscillation/sec # frequency\n",
+ "pi=3.14\n",
+ "g=9.81 \n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "omega=2*pi*f\n",
+ "K=(((2*pi)**2*W)/g)*(10**-2) # N/cm\n",
+ "\n",
+ "# let the total extension of the string be delta which is given as,\n",
+ "delta=(W/K)+(x_0*10**2) # cm\n",
+ "T=K*delta # N # Max Tension\n",
+ "v=omega*x_0 #m/s # max velocity\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"(a) The stiffness of the spring is \",round(K,2),\"N/cm\"\n",
+ "print\"(b) The maximum Tension in the spring is \",round(T,2),\"N\"\n",
+ "print\"(c) The maximum velocity is \",round(v,2),\"m/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) The stiffness of the spring is 2.01 N/cm\n",
+ "(b) The maximum Tension in the spring is 65.08 N\n",
+ "(c) The maximum velocity is 0.47 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 24.24-10,Page No:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "l=1 # m # length of the simple pendulum\n",
+ "g=9.81 # m/s^2\n",
+ "pi=3.14\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Let t_s be the time period when the elevator is stationary\n",
+ "t_s=2*pi*(l/g)**0.5 #/ seconds\n",
+ "\n",
+ "# Let t_u be the time period when the elevator moves upwards. Then from eqn 1\n",
+ "t_u=2*pi*((l)/(g+(g/10)))**0.5 # seconds\n",
+ "\n",
+ "# Let t_d be the time period when the elevator moves downwards.\n",
+ "t_d=2*pi*(l/(g-(g/10)))**0.5 # seconds\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The time period of oscillation of the pendulum for upward acc of the elevator is \",round(t_u,2),\"seconds\"\n",
+ "print\"The time period of oscillation of the pendulum for downward acc of the elevator is \",round(t_d,2),\"seconds\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The time period of oscillation of the pendulum for upward acc of the elevator is 1.91 seconds\n",
+ "The time period of oscillation of the pendulum for downward acc of the elevator is 2.11 seconds\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 24.24-11,Page No:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "t=1 # second # time period of the simple pendulum\n",
+ "g=9.81 # m/s^2\n",
+ "pi=3.14\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# Length of pendulum is given as,\n",
+ "l=(t/(2*pi)**2)*g # m\n",
+ "\n",
+ "# Let t_u be the time period when the elevator moves upwards. Then the time period is given as,\n",
+ "t_u=2*pi*((l)/(g+(g/10)))**0.5 # seconds\n",
+ "\n",
+ "# Let t_d be the time period when the elevator moves downwards.\n",
+ "t_d=2*pi*(l/(g-(g/10)))**0.5 # seconds\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The time period of oscillation of the pendulum for upward acc of the elevator is \",round(t_u,2),\"seconds\"\n",
+ "print\"The time period of oscillation of the pendulum for downward acc of the elevator is \",round(t_d,2),\"seconds\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The time period of oscillation of the pendulum for upward acc of the elevator is 0.95 seconds\n",
+ "The time period of oscillation of the pendulum for downward acc of the elevator is 1.05 seconds\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 24.24-12,Page No:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "m=15 # kg # mass of the disc\n",
+ "D=0.3 # m # diameter of the disc\n",
+ "R=0.15 # m # radius\n",
+ "l=1 # m # length of the shaft\n",
+ "d=0.01 # m # diameter of the shaft\n",
+ "G=30*10**9 # N-m^2 # modulus of rigidity\n",
+ "pi=3.14\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# M.I of the disc about the axis of rotation is given as,\n",
+ "I=(m*R**2)*0.5 # kg-m^2\n",
+ "\n",
+ "# Stiffness of the shaft\n",
+ "k_t=(pi*d**4*G)/(32*l) # N-m/radian\n",
+ "t=2*pi*(I/k_t)**0.5 # seconds\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The time period of oscillations of the disc is \",round(t,2),\"seconds\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The time period of oscillations of the disc is 0.48 seconds\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Mechanics_by_Tayal_A.K./chapter25_15.ipynb b/Engineering_Mechanics_by_Tayal_A.K./chapter25_15.ipynb
new file mode 100644
index 00000000..c424f5bc
--- /dev/null
+++ b/Engineering_Mechanics_by_Tayal_A.K./chapter25_15.ipynb
@@ -0,0 +1,217 @@
+{
+ "metadata": {
+ "name": "chapter25.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 25 :Shear Force And Bending Moment"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.25-5,Page No:628"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "import matplotlib.pyplot as plt\n",
+ "%matplotlib inline\n",
+ "\n",
+ "# Initilization of variables\n",
+ "L_AB=3 # m # length of the beam\n",
+ "L_AC=1 # m\n",
+ "L_BC=2 # m\n",
+ "M_C=12 # kNm # clockwise moment at C\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# REACTIONS\n",
+ "R_B=M_C/L_AB # kN # moment at A\n",
+ "R_A=-M_C/L_AB # kN # moment at B\n",
+ "\n",
+ "# S.F\n",
+ "F_A=R_A # kN \n",
+ "F_B=R_A # kN\n",
+ "\n",
+ "# B.M\n",
+ "M_A=0 # kNm\n",
+ "M_C1=R_A*L_AC # kNm # M_C1 is the BM just before C\n",
+ "M_C2=(R_A*L_AC)+M_C # kNm # M_C2 is the BM just after C\n",
+ "M_B=0 # kNm\n",
+ "\n",
+ "# Plotting SFD & BMD\n",
+ "x=[0, 0.99, 1, 3]\n",
+ "y=[-4, -4, -4, -4]\n",
+ "a=[0, 0.99, 1, 3]\n",
+ "b=[0, -4, 8, 0]\n",
+ "g=[0,0,0,0]\n",
+ "d=transpose(x)\n",
+ "e=transpose(b)\n",
+ "plt.plot(d,y)\n",
+ "plt.show()\n",
+ "plt.plot(a,e,a,g)\n",
+ "plt.show()\n",
+ "\n",
+ "# Results\n",
+ "print \"The graphs are the solutions\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAD7CAYAAABt0P8jAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAD35JREFUeJzt3X1MlfX/x/HXQZiFd0lOWoDg0FIEDpSLrc11jIiE4dyy\nedMNS9fNH601+ydzztxS1I0x8642FyvbzK3VTpvFpOYpV2OUKZM0dU3mAYRmzKZpgXr9/vh9O9/4\nHsBzznU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/H7/oDGffvqpamtrJUllZWW6dOmSent7EzVFVyJZn6QR\nf+z132zBggWaOnXqsOeTee+kW69PSt69kyJ7M2Uy72GkbxZN1j1MT0+XJPX39+vGjRthP0gT7d4l\nLPxdXV3KyckJHWdnZ6urq+uWYzo7OxM1RVciWZ/H49G3334rr9erqqoqnTx5MtHT/Mck895FYizt\n3XBvphwrezjc+pJ5D2/evKmSkhJlZmZq4cKFKigoGHQ+2r0b8Q1c8fT3n/wZyf9+R47080ZbJPO8\n7777FAwGlZ6ers8//1xLlizRmTNnEjC7xEjWvYvEWNm7W72ZMtn3cKT1JfMepqSk6Pjx4/rtt99U\nWVmpQCAgn883aEw0e5ewV/xZWVkKBoOh42AwqOzs7BHHdHZ2KisrK1FTdCWS9U2aNCn0T7ZFixZp\nYGBgyN9qmoySee8iMRb2bmBgQI8//rieeuopLVmyJOx8su/hrdY3FvZwypQpqq6u1vfffz/o+Wj3\nLmHhnz9/vs6ePauOjg719/frwIEDWrx48aAxixcv1vvvvy9Jamlp0R133KHMzMxETdGVSNbX29sb\n+q7c2toqx3HC7tUlq2Teu0gk+945jqPVq1eroKBAr7zyypBjknkPI1lfsu7hxYsXdenSJUnStWvX\n1NzcrNLS0kFjot27hN3qSU1N1c6dO1VZWakbN25o9erVmjt3rt555x1J0gsvvKCqqip99tlnmjVr\nliZMmKDGxsZETc+1SNb30Ucfac+ePUpNTVV6ero+/PDDUZ515FasWKGvvvpKFy9eVE5OjjZu3KiB\ngQFJyb930q3Xl8x7J/33zZTFxcWhaGzevFnnz5+XlPx7GMn6knUPL1y4oNraWt28eVM3b97U008/\nrfLyclft5A1cAGAMf3oRAIwh/ABgDOEHAGMIPwAYQ/gBwBjCDwDGEH4AMIbwA4Ax/wcUEWvPZAe1\nRQAAAABJRU5ErkJggg==\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x5b828b0>"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAX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O3ZMK1euVFFRUaNtmnv8PBm/ZGRk6KmnntLQoUNVW1uriRMnKi8vT88995wk\n6a677tLw4cO1fPly5eTkqF27dpo/f74Xb50SiezfkiVL9OyzzyojI0Nt27bVa6+95vOqE3fzzTdr\n9erVOnDggLp27aoZM2aopqZGkvnHTmp6/0w+dmvXrtXChQtVUFDQEAazZs3Sf/7zH0nmH79E9s/k\n47d3716Vlpaqrq5OdXV1uvXWW3XNNde4yk5++AgAQoRn2wBAiBDqABAihDoAhAihDgAhQqgDQIgQ\n6gAQIoQ6AIQIoQ4AIfL/2SSvyxXhJiEAAAAASUVORK5CYII=\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x5c897b0>"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The graphs are the solutions\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.25-7,Page No:631"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "import matplotlib.pyplot as plt\n",
+ "%matplotlib inline\n",
+ "import numpy as np\n",
+ "\n",
+ "# Initilization of variables\n",
+ "\n",
+ "L_AD=8 # m # length of the beam\n",
+ "L_AB=2 # m \n",
+ "L_BC=4 # m\n",
+ "L_CD=2 # m\n",
+ "UDL=1 # kN/m\n",
+ "P=2 # kN # point load at A\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# REACTIONS\n",
+ "\n",
+ "# solving eqn's 1&2 using matrix to get R_B & R_C as,\n",
+ "\n",
+ "A=np.array([[1, 1],[ 1, 3]])\n",
+ "B=np.array([8,15])\n",
+ "C=np.linalg.solve(A,B)\n",
+ "\n",
+ "# SHEAR FORCE\n",
+ "\n",
+ "# the term F with suffixes 1 & 2 indicates SF just to left and right \n",
+ "F_A=-P # kN\n",
+ "F_B1=-P # kN\n",
+ "F_B2=-P+C[0] # kN\n",
+ "F_C1=-P+C[0]-(UDL*L_BC) # kN\n",
+ "F_C2=-P+C[0]-(UDL*L_BC)+C[1] # kN\n",
+ "F_D=0\n",
+ "\n",
+ "# BENDING MOMENT\n",
+ "\n",
+ "# the term F with suffixes 1 & 2 indicates BM just to left and right\n",
+ "M_A=0 # kNm\n",
+ "M_B=(-P*L_CD) # kNm\n",
+ "M_C=(-P*(L_AB+L_BC))+(C[0]*L_BC)-(UDL*L_BC*(L_BC/2)) # kNm\n",
+ "M_D=0 # kNm\n",
+ "\n",
+ "# LOCATION OF MAXIMUM BM\n",
+ "\n",
+ "# Max BM occurs at E at a distance of 2.5 m from B i.e x=L_AE=4.5 m from free end A. Thus max BM is given by taking moment at B\n",
+ "L_AE=4.5 # m # given\n",
+ "M_E=(-2*L_AE)+(4.5*(L_AE-2))-((1/2)*(L_AE-2)**2) # kNm\n",
+ "\n",
+ "#Plotting\n",
+ "x_p=linspace(2,6,40)\n",
+ "M_p=-2*+4.5*(x_p-2)-((x_p-2)**2)*0.5\n",
+ "\n",
+ "# PLOTTING SFD & BMD\n",
+ "x=[0,1.99,2,4.5,5.99,6,8]\n",
+ "y=[-2,-2,2.5,0,-1.5,2,0]\n",
+ "z=[0,0,0,0,0,0,0]\n",
+ "a=[0,2,4.5,6,8]\n",
+ "b=[0,-4,-0.875,-2,0]\n",
+ "g=[0,0,0,0,0]\n",
+ "d=transpose(x)\n",
+ "plt.plot(d,y,x,z)\n",
+ "plt.show()\n",
+ "e=transpose(b)\n",
+ "plt.plot(a,e,a,g)\n",
+ "plt.show()\n",
+ "\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "print\"The graphs are the solutions\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYV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nSA+8vb0xf/583HbbbejVqxe6du2K4cOHt7i91CO4vTdUkWWqq6uRnp6OFStWwNPTU3Y4zerQoQO+\n+OILlJWVYd++fbq73fzdd9/FrbfeipiYGF1XyvUOHjyIwsJC7N69G6tWrcL+/ftlh3Sd2tpaHD58\nGLNmzcLhw4fRuXNnLF68WHZYLaqpqcHOnTsxZswY2aE06/jx41i+fDlKSkpQUVGB6upqvPnmmy1u\nLzXR+/r6orS0tOHr0tJS+Pn5SYzI+V25cgUPPPAAJk6ciLS0NNnhtMnLywtJSUn47LPPZIdynUOH\nDiE3Nxe9e/dGRkYG9uzZg0mTJskOq0U9e/YEAHTv3h2jRo1CQUGB5Iiu5+fnBz8/P9x5550AgPT0\ndBw+fFhyVC3bvXs37rjjDnTv3l12KM367LPPMGjQINx8881wc3PD6NGjcejQoRa3l5roY2NjUVxc\njJKSEtTU1GDLli1ITU2VGZJTU1UV06ZNQ3h4OObNmyc7nBadOXMGVVVVAIBLly7hgw8+QExMjOSo\nrpednY3S0lKcOHECmzdvxr333otNmzbJDqtZFy9exPnz5wEAFy5cwPvvv6+7EWI9evSAv78/jh49\nCkD0vyMiIiRH1bKcnBxkZGTIDqNFoaGhyM/Px6VLl6CqKj788MPW258OuEDcql27dqkhISFqYGCg\nmp2dLTucZo0fP17t2bOn2qlTJ9XPz09dt26d7JCatX//flVRFDUqKkqNjo5Wo6Oj1d27d8sOq4l/\n/vOfakxMjBoVFaVGRkaqf/nLX2SH1Cqz2azrUTffffedGhUVpUZFRakRERG6PY+++OILNTY2Vu3X\nr586atQo3Y66qa6uVm+++Wb1p59+kh1Kq5YsWaKGh4erffv2VSdNmqTW1NS0uC1vmCIiMjj9Dycg\nIiKbMNETERkcEz0RkcEx0RMRGRwTPRGRwTHRExEZHBM9EZHBMdETERnc/wPWoCKwND/XUgAAAABJ\nRU5ErkJggg==\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x5b10e30>"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",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2SIP09fWhvb0d\nL7zwAtrb23HfffehoaFB7bBC6u3txZ///Gc88cQTaocS1N///nf88pe/xPnz5+HxeHDz5k3s3r07\n5PGqJvqUlBR0dnYOPO7s7ITValUxIv27c+cOHn/8cfz4xz/Gj370I7XDiWjkyJEoLy/HsWPH1A5l\nkI8++gj79u3D5MmT8eSTT+Ivf/kLli5dqnZYISUnJwMAxo0bh8rKSrjdbpUjGsxqtcJqtWLmzJkA\ngAULFqC9vV3lqELbv38/fvCDH2DcuHFqhxLUsWPH8Mgjj2DMmDFITExEVVUVPvroo5DHq5roCwoK\ncObMGZw/fx69vb3Ys2cP5s+fr2ZIuiYIAp599llkZ2fj5z//udrhhPSPf/wD165dAwB88803OHjw\nIPI1tpdyfX09Ojs7ce7cObzzzjv44Q9/iLfeekvtsILq6enBjRs3AAC3bt3CgQMHNDchNnHiRKSm\npuLLL79w2+YHAAABEklEQVQE4K1/T5s2TeWoQmtqasKTTz6pdhghZWZmoq2tDd988w0EQcChQ4fC\nlz/j0CAOq7W1VcjIyBDS0tKE+vp6tcMJqrq6WkhOThaGDh0qWK1WYceOHWqHFNSRI0cEi8Ui5Obm\nCnl5eUJeXp6wf/9+tcMK8Le//U3Iz88XcnNzhZycHOH1119XO6SwXC6Xpqduzp49K+Tm5gq5ubnC\ntGnTNPtz9MknnwgFBQXCjBkzhMrKSs1O3dy8eVMYM2aM8PXXX6sdSlibNm0SsrOzhenTpwtLly4V\nent7Qx7LC6aIiAxO++MEREQkCRM9EZHBMdETERkcEz0RkcEx0RMRGRwTPRGRwTHRExEZHBM9EZHB\n/T/kZq6+7dkZ0AAAAABJRU5ErkJggg==\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x5baadb0>"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The graphs are the solutions\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/README.txt b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/README.txt
new file mode 100644
index 00000000..dbce3060
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/README.txt
@@ -0,0 +1,10 @@
+Contributed By: jay chauhan
+Course: mca
+College/Institute/Organization: Freelancer
+Department/Designation: MCA
+Book Title: Irrigation and Water Power Engineering
+Author: B. C. Punmia
+Publisher: Laxmi Publications(p) Ltd., New Delhi
+Year of publication: 2009
+Isbn: 978-81-318-0763-7
+Edition: 16 \ No newline at end of file
diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch10_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch10_2.ipynb
new file mode 100644
index 00000000..6a6e6a2c
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch10_2.ipynb
@@ -0,0 +1,410 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:171668d82e68d45a998b65d0e49379e70937bfcb873c2c2a1cea475a2a8d329a"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 10 : EARTH AND ROCKFILL DAM"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.1 pg : 502"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "from numpy import array,float64,round\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "K = 5.E-4; \t\t\t\t#coefficient of permeability of soil\n",
+ "Bt = 6.; \t\t\t\t#width of top of dam\n",
+ "wb = 146.; \t\t\t\t#width of base of dam\n",
+ "H = 20.; \t\t\t\t#heigth of dam\n",
+ "hw = 2.; \t\t\t\t#heigth of water in reservior\n",
+ "hs1 = 4.; \t\t\t\t#slope on upstream side\n",
+ "hs2 = 3.; \t\t\t\t#slope on downstream side\n",
+ "df = 30.; \t\t\t\t#length of drainage filter\n",
+ "\n",
+ "x = wb-df-72+72*0.3;\n",
+ "y = 18.;\n",
+ "s = (x**2+y**2)**0.5-x;\n",
+ "\n",
+ "x = array([0, 10, 20, 30, 40, 50, 60, 65.6],dtype=float64);\n",
+ "y = (4.849*x+5.879)**0.5;\n",
+ "y = round(y*1000)/1000;\n",
+ "\n",
+ "print \"x y\";\n",
+ "for i in range(8):\n",
+ " print \"%.2f %.2f\"%(x[i],y[i]);\n",
+ "sf = K*s*10000;\n",
+ "sf = round(sf*1000)/1000;\n",
+ "print \"Seepage flow per unit length of dam = %.2fD-6 cumecs/metre length of dam.\"%(sf);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "x y\n",
+ "0.00 2.42\n",
+ "10.00 7.37\n",
+ "20.00 10.14\n",
+ "30.00 12.30\n",
+ "40.00 14.14\n",
+ "50.00 15.76\n",
+ "60.00 17.23\n",
+ "65.60 18.00\n",
+ "Seepage flow per unit length of dam = 12.12D-6 cumecs/metre length of dam.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.2 pg : 502"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\t\n",
+ "#Given\n",
+ "K = 3.E-3; \t\t\t\t#coefficient of permeability\n",
+ "nd = 25.; \t\t\t\t#number of potential drops\n",
+ "nf = 4.; \t\t\t\t#number of flow channels\n",
+ "lf = 40.; \t\t\t\t#filter length\n",
+ "H = 52.; \t\t\t\t#heigth of dam\n",
+ "fb = 2.; \t\t\t\t#free board\n",
+ "\n",
+ "# Calculations\n",
+ "q = K*(H-fb)*nf/(nd*100);\n",
+ "\n",
+ "# Results\n",
+ "print \"Discharge per meter length of dam = %.5f cumec/metre length.\"%(q);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Discharge per meter length of dam = 0.00024 cumec/metre length.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.3 pg : 503"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "x = 4.;\n",
+ "#Given scale\n",
+ "An = 14.4; \t\t\t\t#area of N recmath.tangle\n",
+ "At = 6.4; \t\t\t\t#area of T recmath.tangle\n",
+ "Au = 4.9; \t\t\t\t#area of U recmath.tangle\n",
+ "L = 12.6; \t\t\t\t#length of arc;\n",
+ "gamma_m = 19.; \t\t\t\t#unit weigth of soil\n",
+ "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n",
+ "fi = 26.; \t\t\t\t#effective angle(degree)\n",
+ "co = 19.5; \t\t\t\t#cohesion value\n",
+ "\n",
+ "# Calculations\n",
+ "#consider 1m length of dam\n",
+ "SumN = An*x**2*gamma_m;\n",
+ "SumT = At*x**2*gamma_m;\n",
+ "SumU = Au*x**2*gamma_w;\n",
+ "Le = x*L;\n",
+ "F = ((Le*co)+(SumN-SumU)*math.tan(math.radians(fi)))/SumT;\n",
+ "F = round(F*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"Factor of safety for slope = %.2f.\"%(F);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Factor of safety for slope = 1.41.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.4 pg : 503"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#check section for:\n",
+ "#Stability of d/s slope against steady seepage\n",
+ "#Sloughing of u/s slope against sudden drawdown\n",
+ "#Stability of the foundation against shear\n",
+ "#Seepage through body of dam\n",
+ "\n",
+ "#Given\n",
+ "#Dimensions\n",
+ "H = 20.; \t\t\t\t#Heigth of dam\n",
+ "Bt = 6.; \t\t\t\t#top width of dam\n",
+ "s1 = 4.; \t\t\t\t#u/s slope\n",
+ "s2 = 3.; \t\t\t\t#d/s slope\n",
+ "fb = 2.; \t\t\t\t#free board\n",
+ "#Properties of materials of dam\n",
+ "gamma_d = 17.27; \t\t\t\t#dry density\n",
+ "wc = 0.15; \t\t\t\t#optimum water content\n",
+ "gamma_s = 21.19; \t\t\t\t#saturated density\n",
+ "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n",
+ "wavg = 19.62; \t\t\t\t#average unit weigth under seepage\n",
+ "theta = 26.; \t\t\t\t#average angle of internal friction(degree)\n",
+ "co = 19.13; \t\t\t\t#average cohesion\n",
+ "K = 5.E-4; \t\t\t\t#coefficient of permeability\n",
+ "#properties of foundation materials\n",
+ "gamma_f = 17.27; \t\t\t\t#average unit weigth\n",
+ "cof = 47.87; \t\t\t\t#average cohesion\n",
+ "fi = 8.; \t\t\t\t#average angle internal friction\n",
+ "t = 6.; \t\t\t\t#thickness of clay\n",
+ "FOSp = 1.5; \t\t\t\t#permissible factor of safety of slope\n",
+ "PS = 8.E-6; \t\t\t\t#permissible seepage\n",
+ "#(a) Stability of d/s slope against steady seepage\n",
+ "An = 302.4; \t\t\t\t#area of N diagram\n",
+ "At = 91.2; \t\t\t\t#area of T diagram\n",
+ "Au = 98.4; \t\t\t\t#area of U diagram\n",
+ "Le = 60.; \t\t\t\t#length of arc\n",
+ "SumN = An*gamma_s;\n",
+ "SumT = At*gamma_s;\n",
+ "SumU = Au*gamma_w;\n",
+ "F = (Le*co)+(SumN-SumU)*math.tan(math.radians(theta))/SumT;\n",
+ "F = round(F*100)/100;\n",
+ "print \"Parta:\"\n",
+ "print \"Factor of safety for slope = %.2f.\"%(F);\n",
+ "print \"Safe\";\n",
+ "\n",
+ "#(b) Sloughing of u/s slope against sudden drawdown\n",
+ "h1 = 15.;\n",
+ "b = 80.;\n",
+ "P = gamma_s*H**2*math.tan(math.radians(45-(theta/2)))**2/2+gamma_w*h1**2/2;\n",
+ "sav = P/b;\n",
+ "smax = 2*sav;\n",
+ "Ne = (gamma_s-gamma_w)*b*H/2;\n",
+ "R = Ne*math.tan(math.radians(theta))+co*b;\n",
+ "fs = R/P;\n",
+ "fs = round(fs*100)/100;\n",
+ "print \"Partb:\"\n",
+ "print \"Factor of safety w.r.t average shear = %.2f.\"%(fs);\n",
+ "print \"Safe\";\n",
+ "sr = 0.6*H*(gamma_s-gamma_w)*math.tan(math.radians(theta))+co;\n",
+ "FS = sr/smax;\n",
+ "FS = round(FS*100)/100;\n",
+ "print \"Factor of safety w.r.t maximum shear = %.2f.\"%(FS);\n",
+ "print \"Safe\";\n",
+ "\n",
+ "#(c) Stability of the foundation against shear\n",
+ "h1 = 26.;\n",
+ "h2 = 6.;\n",
+ "gamma_m = (wavg*(h1-h2)+gamma_f*h2)/h1;\n",
+ "l = (gamma_m*h1*math.tan(math.radians(fi))+cof)/(gamma_m*h1);\n",
+ "fi1 = math.tan(math.radians(l));\n",
+ "P = (h1**2-h2**2)/2*gamma_m*math.tan(math.radians(45-(fi1/2)))**2;\n",
+ "sav = P/b;\n",
+ "smax = 2*sav;\n",
+ "s1 = cof+gamma_f*h2*math.tan(math.radians(fi));\n",
+ "s2 = cof+gamma_m*h1*math.tan(math.radians(fi));\n",
+ "as1 = (s1+s2)/2;\n",
+ "fs = as1/sav;\n",
+ "fs = round(fs*100)/100;\n",
+ "print \"Partc:\"\n",
+ "print \"Factor of safety w.r.t overall shear = %.2f.\"%(fs);\n",
+ "print \"Safe\";\n",
+ "\n",
+ "gamma_av = (wavg*0.6*H+gamma_f*h2)/(0.6*H)+h2;\n",
+ "s = cof+gamma_av*0.6*H*math.tan(math.radians(fi));\n",
+ "fs = s/smax;\n",
+ "fs = round(fs*100)/100;\n",
+ "print \"Factor of safety w.r.t overall shear = %.2f.\"%(fs);\n",
+ "print \"Unsafe\";\n",
+ "\n",
+ "#(d) Seepage through body of dam\n",
+ "s = 2.; \t\t\t\t#measured\n",
+ "q = K*s*100000/100;\n",
+ "print \"Partd:\"\n",
+ "print \" Seepage through body of dam = %.2fD-5 cumecs/m length of dam\"%(q);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Parta:\n",
+ "Factor of safety for slope = 1149.17.\n",
+ "Safe\n",
+ "Partb:\n",
+ "Factor of safety w.r.t average shear = 2.16.\n",
+ "Safe\n",
+ "Factor of safety w.r.t maximum shear = 1.24.\n",
+ "Safe\n",
+ "Partc:\n",
+ "Factor of safety w.r.t overall shear = 1.18.\n",
+ "Safe\n",
+ "Factor of safety w.r.t overall shear = 0.69.\n",
+ "Unsafe\n",
+ "Partd:\n",
+ " Seepage through body of dam = 1.00D-5 cumecs/m length of dam\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.5 pg : 507"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%matplotlib inline\n",
+ "import math \n",
+ "from matplotlib.pylab import plot,show\n",
+ "from numpy import zeros\n",
+ "#design upstream impervious blanket\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Zb = 1.2; \t\t\t\t#thickness of blanket\n",
+ "Zf = 8; \t\t\t\t#dismath.tance of blanket from foundation\n",
+ "kb = 0.06; \t\t\t\t#coefficient of permeability of blanket material\n",
+ "kf = 72; \t\t\t\t#coefficient of permeability of foundation soil\n",
+ "Hw = 10; \t\t\t\t#heigth of water in reservior\n",
+ "Xd = 40;\n",
+ "\n",
+ "a = (kb/(kf*Zb*Zf))**0.5;\n",
+ "Xo = 1.414/a;\n",
+ "\n",
+ "#we vary value of x\n",
+ "x = [0, 25, 50, 75, 100, 125, 151.8, 300]\n",
+ "Xr = zeros(8)\n",
+ "ho = zeros(8)\n",
+ "r = zeros(8)\n",
+ "\n",
+ "for i in range(8):\n",
+ " e = math.exp(2*a*x[i]);\n",
+ " Xr[i] = (e-1)/(a*(e+1));\n",
+ " ho[i] = Xr[i]*Hw/(Xr[i]+Xd);\n",
+ " r[i] = Xr[i]*100/(Xr[i]+Xd);\n",
+ "\n",
+ "print \"x Xr ho reduction qpercent\";\n",
+ "for i in range(8):\n",
+ " print \"%.2f %.2f %.2f %.2f\"%(x[i],Xr[i],ho[i],r[i]);\n",
+ "\n",
+ "#graph is plotted between r and x.\n",
+ "#after around 130m length there is only slight increase in head dissipated(ho)\n",
+ "plot(x,r)\n",
+ "show()\n",
+ "L = 130;\n",
+ "print \"Thickness of blanket = %.2f m\"%(Zb);\n",
+ "print \"Length of blanket = %i m.\"%(L);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The history saving thread hit an unexpected error (OperationalError('disk I/O error',)).History will not be written to the database.\n",
+ "x Xr ho reduction qpercent"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "0.00 0.00 0.00 0.00\n",
+ "25.00 24.56 3.80 38.04\n",
+ "50.00 46.67 5.38 53.85\n",
+ "75.00 64.78 6.18 61.83\n",
+ "100.00 78.50 6.62 66.24\n",
+ "125.00 88.28 6.88 68.82\n",
+ "151.80 95.35 7.04 70.45\n",
+ "300.00 106.53 7.27 72.70\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXUAAAEACAYAAABMEua6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAAC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XU3+OIRzHgYTj+ip1XLS8\nQqX6dyPwpRLPTVv/xgIfi7aHEUqg08nO8eupf1k5fgAHRfcDgGeAU6jR8Yuj42V9KSmlikcLnQfM\ni7bnARfUtzlVeRLYWrSvp/6cD9xHOJ7rCcf3hPibWJVS/YPSI77S1r82wv/kANuAlwnfEcnK8eup\nf5CN4wfwbnQ/iHAivJUaHb84Qr2sLyWlUAFYADwLfD7aN4bwJz7R/ZgE2lVLPfXng4Tj2CnNx/QK\n4L+B/6Drz9s0928y4S+SpWTz+E0m9O+Z6HFWjt8BhF9c7XSVmmpy/OII9ax+KemThP+4zgG+QPjz\nvrsC2ep7b/1JY19vB44g/Gm/EbhlP89NQ/+GAQ8BVwJ/KPpZFo7fMOBHhP5tI1vHr4PQj/HAacDM\nop9XfPziCPXfEi50dJrA3r9l0mpjdP8m8DDhz592Qv0PYBywKYF21VJP/Sk+puOjfWmzia7/WebS\n9SdsGvs3kBDo9wDzo31ZOn6d/fs+Xf3L0vHr9Dbwc+B4Gvj4ZfFLSQcBw6PtocBiwhXoOXSN7rmW\ndF0ohXCMii+UlupP54WaQYQzpXXEv8BKLUxm7/6N67Z9NXBvtJ22/vUD7gZuLdqflePXU/+ycvwO\noat0NAR4AjiDBj9+WftS0hGEf9QXCEOsOvs0mlBnT+OQxvuA3wE7CddA/o799+d6wvFcDfzPura0\nMsX9+xwhKFYQarLz2fsaSJr6dwrhz/cX6BredzbZOX6l+ncO2Tl+xwLPE/q3AvhKtD8rx0+SJEmS\nJEmSJEmSJEmSJEmSJElSI/r//MLloWR9quQAAAAASUVORK5CYII=\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x10e9d5350>"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thickness of blanket = 1.20 m\n",
+ "Length of blanket = 130 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch11_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch11_2.ipynb
new file mode 100644
index 00000000..f4d8bc9d
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch11_2.ipynb
@@ -0,0 +1,573 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:af2e84ceb74c3bc3148f31759e2a692dba979671e7232787c666481af8571437"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 11 : SPILLWAYS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.1 pg : 538"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#Given\n",
+ "h = 1.2; \t\t\t\t#head of water\n",
+ "Cd = 2.2; \t\t\t\t#coefficient of discharge\n",
+ "rho = 1; \t\t\t\t#density of water\n",
+ "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n",
+ "\n",
+ "q = Cd*h**1.5;\n",
+ "\n",
+ "#applying bernaulli's equation at u/s water surface at section A and B\n",
+ "#solving it by error and trial method we get\n",
+ "v1 = 13.7;v2 = 14.7;\n",
+ "d1 = 0.212;d2 = 0.197;\n",
+ "\n",
+ "F1 = gamma_w*d1**2*math.cos(math.radians(60))/2;\n",
+ "F2 = gamma_w*d2**2/2;\n",
+ "W = gamma_w*60*2*math.pi*3*((d1+d2)/2)/360;\n",
+ "Fx = rho*q*(v2-v1*math.cos(math.radians(60)))-F1/2+F2;\n",
+ "Fy = rho*q*(v1*math.sin(math.radians(60)))+F1*math.sin(math.radians(60))+W;\n",
+ "F = (Fx**2+Fy**2)**0.5;\n",
+ "F = round(F*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"Resultant force = %.2f kN/m.\"%(F);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resultant force = 46.68 kN/m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.2 pg : 539"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "C = 2.4; \t\t\t\t#coefficient of discharge\n",
+ "H = 2; \t\t\t\t#head\n",
+ "L = 100; \t\t\t\t#length of spillway\n",
+ "wc = 8; \t\t\t\t#heigth of weir crest above bottom\n",
+ "g = 9.81; \t\t\t\t#acceleration due to gravity\n",
+ "\n",
+ "# Calculations\n",
+ "h = H+wc;\n",
+ "Q1 = C*L*H**(1.5); \t\t\t\t#neglecting approach velocity and end contractions\n",
+ "va = Q1/(h*L);\n",
+ "ha = va**2/(2*g);\n",
+ "Ha = ha+H;\n",
+ "Q = C*L*Ha**1.5;\n",
+ "Q = round(Q*10)/10;\n",
+ "\n",
+ "# Results\n",
+ "print \"discharge over oggy weir = %.2f cumecs.\"%(Q);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "discharge over oggy weir = 690.80 cumecs.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.3 pg : 540"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#capacity of siphon\n",
+ "#head required in oggy spillway\n",
+ "#length of oggy weir required\n",
+ "\n",
+ "#Given\n",
+ "t = 6; \t\t\t\t#tail water elevation\n",
+ "h = 1; \t\t\t\t#heigth of siphon spillway\n",
+ "w = 4; \t\t\t\t#width of siphon spillway\n",
+ "hw = 1.5; \t\t\t\t#head water elevation\n",
+ "C = 0.6; \t\t\t\t#coefficient of discharge\n",
+ "Co = 2.25; \t\t\t\t#coefficient of discharge of oggy spillway\n",
+ "lo = 4; \t\t\t\t#length of oggy spillway\n",
+ "hc = 1.5; \t\t\t\t#head on weir crest\n",
+ "g = 9.81; \t\t\t\t#acceleration due to gravity\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#part (a)\n",
+ "Q = C*h*w*(2*g*(t+hw))**0.5;\n",
+ "Q = round(Q*10)/10;\n",
+ "print \"capacity of siphon = %.2f cumecs.\"%(Q);\n",
+ "\n",
+ "#part (b)\n",
+ "h1 = (Q/(Co*lo))**(2./3);\n",
+ "h1 = round(h1*100)/100;\n",
+ "print \"head required in oggy spillway = %.2f m\"%(h1);\n",
+ "\n",
+ "#part (c)\n",
+ "L = Q/(Co*(hc)**1.5);\n",
+ "L = round(L*100)/100;\n",
+ "print \"length of oggy weir required = %.2f m.\"%(L);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "capacity of siphon = 29.10 cumecs.\n",
+ "head required in oggy spillway = 2.19 m\n",
+ "length of oggy weir required = 7.04 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.4 pg : 540"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "rl = 435; \t\t\t\t#full reservior level\n",
+ "cl = 429.6; \t\t\t\t#level of centre of siphon\n",
+ "hfl = 435.85; \t\t\t\t#high flood level\n",
+ "hfd = 600; \t\t\t\t#high flood discharge\n",
+ "w = 4; \t\t\t\t#width of throat\n",
+ "h = 2; \t\t\t\t#heigth of throat\n",
+ "C = 0.65; \t\t\t\t#coefficient of discharge\n",
+ "g = 9.81; \t\t\t\t#acceleration due to gravity\n",
+ "\n",
+ "# Calculations\n",
+ "H = hfl-cl;\n",
+ "Q = C*w*h*(2*g*H)**0.5;\n",
+ "n = hfd/Q;\n",
+ "n = round(n*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \" number of siphons units required = %.2f.hence provide 11 siphons units.\"%(n);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " number of siphons units required = 10.42.hence provide 11 siphons units.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.5 pg : 541"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import arange,zeros\n",
+ "\n",
+ "#design oggy spillway for concrete gravity dam\n",
+ "\n",
+ "#Given\n",
+ "rbl = 250; \t\t\t\t#avarage river bed level\n",
+ "rlc = 350; \t\t\t\t#R.L of spillway crest\n",
+ "s = 0.75; \t\t\t\t#slope on downstream side\n",
+ "Q = 6500; \t\t\t\t#discharge\n",
+ "L = 5*9; \t\t\t\t#length of spillway\n",
+ "Cd = 2.2; \t\t\t\t#coefficient of discharge\n",
+ "t = 2; \t\t\t\t#thickness of each pier\n",
+ "\n",
+ "#step 1. computation of design head\n",
+ "H = (Q/(Cd*L))**(2./3);\n",
+ "P = rlc-rbl;\n",
+ "\n",
+ "#P/H = 6.15,which is<1.33;it is a high overflow spillway\n",
+ "\n",
+ "#H+P/H = 7.15>1.7; hence discharge coefficient is not affected by downstream apron interface\n",
+ "\n",
+ "Kp = 0.01;\n",
+ "Ka = 0.1;\n",
+ "N = 4;\n",
+ "He = 17.5; \t\t\t\t#assumed\n",
+ "Le = L-2*(N*Kp+Ka)*He;\n",
+ "He1 = (Q/(Cd*Le))**(2./3);\n",
+ "He1 = round(He1*100)/100;\n",
+ "#He1 is almost equal to He\n",
+ "print \"crest profile will be designed for Hd = %.2f m.\"%(He1);\n",
+ "\n",
+ "#step 2. determination of d/s profile\n",
+ "\n",
+ "#equating the slope of d/s side and derivative of profile equation suggested by WES\n",
+ "x = 27.03;\n",
+ "y = 0.04372*x**1.85;\n",
+ "print \"downstream profile:\";\n",
+ "x = arange(1,27)\n",
+ "y = zeros(26)\n",
+ "for i in range(26):\n",
+ " y[i] = 0.04372*x[i]**1.85;\n",
+ " y[i] = round(y[i]*1000)/1000;\n",
+ "\n",
+ "print \"x y\";\n",
+ "for i in range(26):\n",
+ " print \"%i %.2f\"%(x[i],y[i]);\n",
+ "\n",
+ "print \"27.03 19.48\";\n",
+ "#step 3. determination of u/s profile\n",
+ "# math.cosidering equation for vertical u/s face and Hd = 17.58\n",
+ "\n",
+ "print \"upstream profile:\";\n",
+ "x = [-0.5, -0.1, -1.5, -2.0, -3.0, -4.0, -4.75];\n",
+ "y = zeros(7)\n",
+ "for i in range(7):\n",
+ " if i==6:\n",
+ " y[i] = 0.0633*(x[i]+4.75)**1.85+2.2151-1.2643*(x[i]+4.75)**0.625;\n",
+ " y[i] = round(y[i]*1000)/1000;\n",
+ " continue\n",
+ " \n",
+ " y[i] = 0.0633*(x[i]+4.7466)**1.85+2.2151-1.2643*(x[i]+4.7466)**0.625;\n",
+ " y[i] = round(y[i]*1000)/1000;\n",
+ "\n",
+ "print \"x y\";\n",
+ "for i in range(7):\n",
+ " print \"%.2f %.2f\"%(x[i],y[i]);\n",
+ "\n",
+ "\n",
+ "#step 4.design of d/s bucket\n",
+ "\n",
+ "R = P/4;\n",
+ "print \"radius of bucket = %i m.\"%(R);\n",
+ "print \"bucket will subtend angle of 60 degree at the centre.\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "crest profile will be designed for Hd = 17.58 m.\n",
+ "downstream profile:\n",
+ "x y\n",
+ "1 0.04\n",
+ "2 0.16\n",
+ "3 0.33\n",
+ "4 0.57\n",
+ "5 0.86\n",
+ "6 1.20\n",
+ "7 1.60\n",
+ "8 2.05\n",
+ "9 2.55\n",
+ "10 3.10\n",
+ "11 3.69\n",
+ "12 4.34\n",
+ "13 5.03\n",
+ "14 5.77\n",
+ "15 6.55\n",
+ "16 7.38\n",
+ "17 8.26\n",
+ "18 9.18\n",
+ "19 10.15\n",
+ "20 11.16\n",
+ "21 12.21\n",
+ "22 13.31\n",
+ "23 14.45\n",
+ "24 15.63\n",
+ "25 16.86\n",
+ "26 18.13\n",
+ "27.03 19.48\n",
+ "upstream profile:\n",
+ "x y\n",
+ "-0.50 0.01\n",
+ "-0.10 -0.00\n",
+ "-1.50 0.14\n",
+ "-2.00 0.25\n",
+ "-3.00 0.60\n",
+ "-4.00 1.20\n",
+ "-4.75 2.21\n",
+ "radius of bucket = 25 m.\n",
+ "bucket will subtend angle of 60 degree at the centre.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.6 pg : 562"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\t\t\t\t#design length and depth of stilling bamath.sin\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "q = 1; \t\t\t\t#discharge of spillway\n",
+ "Cd = 0.7; \t\t\t\t#coefficient of discharge\n",
+ "h1 = 10; \t\t\t\t#heigth of crest above downstream silting bamath.sin\n",
+ "g = 9.81; \t\t\t\t#acceleration due to gravity\n",
+ "Cv = 0.9; \t\t\t\t#coefficient of velocity\n",
+ "\n",
+ "# Calculations\n",
+ "h = (3*q/(2*Cd*(2*g)**0.5))**(2./3);\n",
+ "H = h1+h/2;\n",
+ "vt = (2*g*H)**0.5;\n",
+ "v1 = Cv*vt;\n",
+ "y1 = q/v1;\n",
+ "F1 = v1/(g*y1)**0.5;\n",
+ "\t\t\t\t#F>1, flow is super-critical\n",
+ "y2 = 1;\n",
+ "v2 = q/y2;\n",
+ "F2 = v2/(g*y2)**0.5; \t\t\t\t#<1\n",
+ "y2 = (y1/2)*((1+8*F1**2)**0.5-1);\n",
+ "de = y2-1;\n",
+ "le = 5*(y2-y1);\n",
+ "de = round(de*1000)/1000;\n",
+ "le = round(le*10)/10;\n",
+ "\n",
+ "# Results\n",
+ "print \"stilling bamath.sin should be depressed by %.2f m.\"%(de);\n",
+ "print \"length of stilling bamath.sin = %.2f m.\"%(le);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "stilling bamath.sin should be depressed by 0.58 m.\n",
+ "length of stilling bamath.sin = 7.50 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.7 pg : 563"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "q = 7.83; \t\t\t\t#discharge through spillway\n",
+ "w = 12.5; \t\t\t\t#width of fall\n",
+ "d = 2.; \t\t\t\t#depth of water in downstream\n",
+ "g = 9.8;\n",
+ "\n",
+ "y1 = 0.5;\n",
+ "v1 = q/y1;\n",
+ "F1 = v1/(g*y1)**0.5;\n",
+ "\n",
+ "#F>1,flow is super-critical\n",
+ "\n",
+ "# Calculations\n",
+ "v2 = q/d;\n",
+ "F2 = v2/(g*d)**0.5;\n",
+ "y2 = (y1/2)*((1+8*F1**2)**0.5-1);\n",
+ "de = y2-d;\n",
+ "le = 5*(y2-y1);\n",
+ "de = round(de*100)/100;\n",
+ "le = round(le*10)/10;\n",
+ "\n",
+ "# Results\n",
+ "print \"stilling bamath.sin should be depressed by %.2f m.\"%(de);\n",
+ "print \"length of stilling bamath.sin = %.2f m.\"%(le); \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "stilling bamath.sin should be depressed by 2.76 m.\n",
+ "length of stilling bamath.sin = 21.30 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.8 pg : 564"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Ag = 5*2.5; \t\t\t\t#area of gate\n",
+ "miu = 0.25; \t\t\t\t#coefficient of friction\n",
+ "w = 0.5; \t\t\t\t#weigth of gate\n",
+ "h = 2; \t\t\t\t#head of water over crest\n",
+ "g = 9.81; \t\t\t\t#acceleration due to gravity\n",
+ "gamma_w = 1000; \t\t\t\t#unit weigth of water\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "m = w*g*1000;\n",
+ "F = gamma_w*Ag*h*h*g/10;\n",
+ "ff = miu*F;\n",
+ "tf = (m+ff)/1000;\n",
+ "\n",
+ "# Results\n",
+ "print \"force to be exerted to lift the gate = %.2f kN.\"%(tf);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "force to be exerted to lift the gate = 17.17 kN.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.9 pg : 564"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "q = 19; \t\t\t\t#dischrge through spillway\n",
+ "E = 1; \t\t\t\t#energy loss\n",
+ "\n",
+ "\t\t\t\t#from energy loss equation;E = (y2-y1)**3/4y2y1; and solving it we get\n",
+ "\t\t\t\t#x = 0.5*(-1+(1+294.39*(x-1)**9/64*x**3))\n",
+ "\t\t\t\t#by trial and error method x = 2.806\n",
+ "x = 2.806;\n",
+ "y1 = 4*x/(x-1)**3;\n",
+ "y2 = x*y1;\n",
+ "y1 = round(y1*1000)/1000;\n",
+ "y2 = round(y2*1000)/1000;\n",
+ "print \"depth of flow at both end of jumps = %.2f m and %.2f m. respectively.\"%(y1,y2);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "depth of flow at both end of jumps = 1.91 m and 5.35 m. respectively.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch12_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch12_2.ipynb
new file mode 100644
index 00000000..edc47614
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch12_2.ipynb
@@ -0,0 +1,1384 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:b0cdc42f1fc8747c583aaf55d3f5af5550eb632d3c87d035821d8a7d148eae09"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 12 : DIVERSION HEADWORKS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.1 pg : 576"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "#uplift presuures and thickness of floor at 6m, 12m and 18m from u/s\n",
+ "\n",
+ "#Given\n",
+ "rho = 2.24; \t\t\t\t#relative density of material\n",
+ "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n",
+ "L = 22.; \t\t\t\t#total length\n",
+ "lc = (2.*6)+L+(2*8); \t\t\t\t#length of creep\n",
+ "hg = 4./lc; \t\t\t\t#hydraulic gradient\n",
+ "print \"avearge hydraulic gradient = %.2f.\"%(hg);\n",
+ "#at 6 m from u/s\n",
+ "x = 6.;\n",
+ "lg = (6.*2)+x;\n",
+ "h1 = 4.*(1-lg/50); \t\t\t\t#unbalanced head\n",
+ "up = gamma_w*h1;\n",
+ "t = 4.*h1/(3*(rho-1));\n",
+ "up = round(up*100)/100;\n",
+ "t = round(t*100)/100;\n",
+ "print \"uplift at 6 m from u/s = %.2f kN/square metre.\"%(up);\n",
+ "print \"thickness at 6 m from u/s = %.2f m.\"%(t);\n",
+ "\n",
+ "#at 12 m from u/s\n",
+ "x = 12.;\n",
+ "lg = (6.*2)+x;\n",
+ "h1 = 4.*(1-lg/50); \t\t\t\t#unbalanced head\n",
+ "up = gamma_w*h1;\n",
+ "t = 4.*h1/(3*(rho-1));\n",
+ "up = round(up*100)/100;\n",
+ "t = round(t*100)/100;\n",
+ "print \"uplift at 12 m from u/s = %.2f kN/square metre.\"%(up);\n",
+ "print \"thickness at 12 m from u/s = %.2f m.\"%(t);\n",
+ "\n",
+ "#at 18m from u/s\n",
+ "x = 18.;\n",
+ "lg = (6.*2)+x;\n",
+ "h1 = 4.*(1-lg/50); \t\t\t\t#unbalanced head\n",
+ "up = gamma_w*h1;\n",
+ "t = 4*h1/(3*(rho-1));\n",
+ "up = round(up*10)/10;\n",
+ "t = round(t*100)/100;\n",
+ "print \"uplift at 18 m from u/s = %.2f kN/square metre.\"%(up);\n",
+ "print \"thickness at 18 m from u/s = %.2f m.\"%(t);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "avearge hydraulic gradient = 0.08.\n",
+ "uplift at 6 m from u/s = 25.11 kN/square metre.\n",
+ "thickness at 6 m from u/s = 2.75 m.\n",
+ "uplift at 12 m from u/s = 20.40 kN/square metre.\n",
+ "thickness at 12 m from u/s = 2.24 m.\n",
+ "uplift at 18 m from u/s = 15.70 kN/square metre.\n",
+ "thickness at 18 m from u/s = 1.72 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.2 pg : 589"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "#check whether section is safe against overturning and piping\n",
+ "\n",
+ "#Given\n",
+ "b = 54.; \t\t\t\t#width of section\n",
+ "D1D2 = 16; \t\t\t\t#dismath.tance between points D1 and D2\n",
+ "D2D3 = 37; \t\t\t\t#dismath.tance between points D2 and D3\n",
+ "\n",
+ "#first pipe line\n",
+ "#taking data from figure\n",
+ "d = 105-97;\n",
+ "b1 = 0.5;\n",
+ "alpha = b/d;\n",
+ "#from the curves we get\n",
+ "fic1 = 0.665;\n",
+ "fid1 = 0.76;\n",
+ "fie1 = 1;\n",
+ "t = 105-104; \t\t\t\t#floor thickness\n",
+ "corec = (fid1-fic1)*100*t/d; \t\t\t\t#correction for floor thickness\n",
+ "#for pile no. 2\n",
+ "D = 104-97;\n",
+ "d = 104-97;\n",
+ "bdash = 16;\n",
+ "C = 19*(D/bdash)**0.5*(d+D)/b; \t\t\t\t#correction for pile no. 2\n",
+ "fic1 = fic1*100+corec+C; \t\t\t\t#corrected pressures\n",
+ "\n",
+ "#intermedite pipe line\n",
+ "d = 105-97;\n",
+ "b1 = 16.5;\n",
+ "alpha = b/d;\n",
+ "r = b1/b; \t\t\t\t#ratio b1/b\n",
+ "#from the curves we get\n",
+ "fic2 = 0.52;\n",
+ "fie2 = 0.725;\n",
+ "fid2 = 0.615;\n",
+ "corec_c1 = (fid2-fic2)*100*t/d;\n",
+ "corec_e1 = (fie2-fid2)*100/d;\n",
+ "\n",
+ "#for pile no. 1\n",
+ "C1 = C;\n",
+ "d = 104-97;\n",
+ "bdash = 37;\n",
+ "D = 104-95;\n",
+ "C2 = 19*(D/bdash)**0.5*(d+D)/b;\n",
+ "#correction due to slope\n",
+ "corec_e2 = 3.3; \t\t\t\t#from table 12.4\n",
+ "#correction is negative due to upwrd slope\n",
+ "l = 4; \t\t\t\t#horizontal length of slope\n",
+ "corec_c2 = corec_e2*l/bdash;\n",
+ "\n",
+ "fie2 = fie2*100-corec_e1-corec_e2;\n",
+ "fic2 = fic2*100+corec_c1+C2-corec_c2;\n",
+ "\n",
+ "#pile no. 3 at d/s end\n",
+ "d = 103.5-95;\n",
+ "alpha_ = d/b;\n",
+ "#for curves\n",
+ "fie3 = 0.35;fid3 = 0.242;\n",
+ "corec_t = (fie3-fid3)*100*(103.5-102)/d;\n",
+ "\n",
+ "#correction for interference at pile no. 2\n",
+ "d = 102-95;\n",
+ "D = 102-97;\n",
+ "C3 = 19*(D/bdash)**0.5*(d+D)/b;\n",
+ "fie3 = fie3*100-corec_t-C3;\n",
+ "\n",
+ "point = ['C1', 'C2' ,'E2' ,'E3']; \t\t\t\t#Point\n",
+ "P = [fic1 ,fic2 ,fie2 ,fie3]; \t\t\t\t#pressure percent\n",
+ "P_ = [3.55 ,2.78, 3.39, 1.58]; \t\t\t\t#pressure head\n",
+ "print \"Points Pressure percent Pressure head\";\n",
+ "\n",
+ "for i in range(4):\n",
+ " P[i] = round(P[i]*10)/10;\n",
+ " print \"%s %.2f %.2f\"%(point[i],P[i],P_[i]);\n",
+ "\n",
+ "\n",
+ "#check for floor thickness\n",
+ "Pa = P_[1]-((P_[1]-P_[3])*6.5/37);\n",
+ "Pb = P_[1]-((P_[1]-P_[3])*24/37);\n",
+ "Pc = P_[1]-((P_[1]-P_[3])*30/37);\n",
+ "rho = 2.24; \t\t\t\t#specific gravity of concrete\n",
+ "ta = Pa/(rho-1);\n",
+ "tb = Pb/(rho-1);\n",
+ "tc = Pc/(rho-1);\n",
+ "ta = round(ta*100)/100;\n",
+ "tb = round(tb*100)/100;\n",
+ "tc = round(tc*100)/100;\n",
+ "print \"Thickness required at A = %.2f m.\"%(ta);\n",
+ "print \"Thickness required at B = %.2f m.\"%(tb);\n",
+ "print \"Thickness required at C = %.2f m.\"%(tc);\n",
+ "t = 103.5-102;\n",
+ "print \"Thickness provided = %.2f m.\"%(t);\n",
+ "print \"Floor thickness at B and C are adequate\";\n",
+ "\n",
+ "#exit gradient\n",
+ "H = 108.5-103.5; \t\t\t\t#seepage head\n",
+ "d = 103.5-95; \t\t\t\t#depth cut-off\n",
+ "#from exit gradient curve\n",
+ "alpha = 6.35;\n",
+ "lambda1 = (1+(1+alpha**2)**0.5)/2;\n",
+ "Ge = H/(d*math.pi*lambda1**0.5);\n",
+ "print \"exit gradient = %.2f.\"%(Ge);\n",
+ "print \" it is less than permissible exit gradient < 1/6Hence safe..\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Points Pressure percent Pressure head\n",
+ "C1 67.70 3.55\n",
+ "C2 52.80 2.78\n",
+ "E2 67.80 3.39\n",
+ "E3 33.10 1.58\n",
+ "Thickness required at A = 2.07 m.\n",
+ "Thickness required at B = 1.61 m.\n",
+ "Thickness required at C = 1.46 m.\n",
+ "Thickness provided = 1.50 m.\n",
+ "Floor thickness at B and C are adequate\n",
+ "exit gradient = 0.10.\n",
+ " it is less than permissible exit gradient < 1/6Hence safe..\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.3 pg : 605"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import roots,ceil\n",
+ "\n",
+ "#design a vertical drop weir on Bligh's theory\n",
+ "#test floor by Khosla's theory\n",
+ "\n",
+ "#Given\n",
+ "Q = 2800; \t\t\t\t#maximum flood discharge\n",
+ "hfl = 285; \t\t\t\t#H.F.L before construction\n",
+ "hw = 278; \t\t\t\t#minimum water level\n",
+ "fsl = 284; \t\t\t\t#F.S.L of canal\n",
+ "c = 12; \t\t\t\t#coefficient of creep\n",
+ "flux = 1; \t\t\t\t#allowable afflux\n",
+ "Ge = 1./6; \t\t\t\t#permissible exit gradient\n",
+ "rho = 2.24; \t\t\t\t#specific gravity of concrete\n",
+ "\n",
+ "#Hydraulic calculation\n",
+ "L = 4.75*Q**0.5;\n",
+ "q = Q/L;\n",
+ "q = round(q*10)/10;\n",
+ "print \"Hydraulic calculation:\";\n",
+ "print \"discharge per unit width of river = %.2f cumecs.\"%(q);\n",
+ "f = 1;\n",
+ "R = 1.35*(q**2/f)**(1./3);\n",
+ "R = round(R*100)/100;\n",
+ "print \"regime scour depth = %.2f m.\"%(R);\n",
+ "V = q/R; \t\t\t\t#regime velocity\n",
+ "vh = V**2/(2*9.81); \t\t\t\t#velocity head\n",
+ "l_down = hfl+vh;\n",
+ "l_up = l_down+flux;\n",
+ "hfl_up = l_up-vh;\n",
+ "hfl_down = hfl-0.5;\n",
+ "hfl_down = round(hfl_down*100)/100;\n",
+ "print \"actual d/s H.F.L allowing 0.5 m for retrogation = %.2f m.\"%(hfl_down);\n",
+ "K = (q/1.7)**(2./3);\n",
+ "cl = l_up-K; \t\t\t\t#crest level\n",
+ "cl = round(cl*100)/100;\n",
+ "print \"crest level = %.2f m.\"%(cl);\n",
+ "pl = fsl+0.5; \t\t\t\t#pond level\n",
+ "s = hfl_down-cl; \t\t\t\t#heigth of shutter\n",
+ "print \"heigth of shutter = %.2f m.\"%(s);\n",
+ "rl_up_pile = hfl_up-1.5*R; \t\t\t\t#R.L of bottom u/s pile\n",
+ "d_up_cut = hw-276; \t\t\t\t#depth of upstream cut-off\n",
+ "print \"depth of upstream cut-off = %.2f m.\"%(d_up_cut);\n",
+ "print \" provide concrete cut off 2 m depth.\";\n",
+ "rl_bot_ds = hfl_down-2*R;\n",
+ "Hs = hfl_down-hw; \t\t\t\t#seepage head\n",
+ "Hc = cl-hw; \t\t\t\t#heigth of crest\n",
+ "print \"R.L of gates crest = %.2f m.\"%(Hs);\n",
+ "print \"Heigth of crest = %.2f m.\"%(Hc);\n",
+ "\n",
+ "#design of weir wall\n",
+ "d = hfl_up-cl;\n",
+ "a = d/(rho)**0.5;\n",
+ "a = 3*d/(2*rho); \t\t\t\t#from sliding consideration\n",
+ "a = s+1; \t\t\t\t#from practical consieration\n",
+ "a = a+1;\n",
+ "print \"design of weir wall:\"\n",
+ "print \"provide top width of %i m.\"%(a);\n",
+ "Mo = 9.81*Hs**3/6; \t\t\t\t#overtirning moment\n",
+ "#equating the moment of resismath.tance to overturning moment and putting the values we get\n",
+ "#y = poly([-1.084,0.020,0.039],'x','c');\n",
+ "y = [0.039,0.020,-1.084]\n",
+ "b = roots(y)[1];\n",
+ "#we get b = - 5.5347261 and 5.0219056\n",
+ "#taking\n",
+ "b = 5;\n",
+ "#when weir is submerged\n",
+ "C = 0.58;\n",
+ "d = (q**2/((2*C/3)**2*2*9.81))**(1./3);\n",
+ "Mo = 9.81*d*Hc**2/2;\n",
+ "#from equation of moment of resistence we get\n",
+ "y = [1,3,-77.55]\n",
+ "b = ceil(roots(y)[1]); #we get b = - 10.433085 and 7.4330846\n",
+ "print \"bottom width = %i m.\"%(b);\n",
+ "\n",
+ "#design of impervious and pervious aprons\n",
+ "C = 12;\n",
+ "L = C*Hs;\n",
+ "print \"design of impervious and pervious aprons:\";\n",
+ "print \"total creep length = %i m.\"%(L);\n",
+ "l1 = 2.21*C*(Hs/13)**0.5;\n",
+ "l1_ = l1+1;\n",
+ "print \"length of downstream impervious apron = %i m.\"%(l1_);\n",
+ "d1 = hw-276;\n",
+ "d2 = hw-271;\n",
+ "l2 = L-l1-(b+2*d1+2*d2);\n",
+ "print \"length of upstream impervious apron = %i m.\"%(l2);\n",
+ "l3 = 18*C*(Hs*q/975)**0.5;\n",
+ "print \"total length of d/s apron = %i m.\"%(l3); \t\t\t\t#calculation is wrong in book\n",
+ "l = l3-l1;\n",
+ "le = l/2;\n",
+ "le = round(le*100)/100;\n",
+ "print 'provide filter of length %.2f m. and launching apron of length %.2f m.'%(le,le);\n",
+ "t = d2*10**0.5/le;\n",
+ "print \"thickness of launching apron in horizontal position = %.2f m.\"%(t);\n",
+ "print \"provide launching apron of thickness 1.5 m.\";\n",
+ "T = 2*d1;\n",
+ "V = d1*10**0.5;\n",
+ "ta = V/T;\n",
+ "ta = round(ta*10)/10;\n",
+ "print \"thickness of apron in horizontal position = %.2f m.\"%(ta);\n",
+ "Hr = Hs-Hs*(4+33+8)/L;\n",
+ "t = 4*Hr/(3*(rho-1));\n",
+ "t = round(t*10)/10;\n",
+ "print 'provide thickness of %.2f m from d/s of weir wall to point 6 m from it.'%(t);\n",
+ "Hr = Hs-Hs*(4+33+8+6)/L;\n",
+ "t = 4*Hr/(3*(rho-1));\n",
+ "t = round(t*10)/10;\n",
+ "print \"provide thickness of %.2f m from 6 m to 12 m from d/s end of weir wall.\"%(t);\n",
+ "Hr = Hs-Hs*(4+33+8+12)/L;\n",
+ "t = 4*Hr/(3*(rho-1));\n",
+ "t = round(t*10)/10;\n",
+ "print \"provide thickness of %.2f m for rest of length of weir floor.\"%(t);\n",
+ "\n",
+ "#check by khosla's theory\n",
+ "b = 33+8+19; \t\t\t\t#total horizontal length of impervious floor\n",
+ "d = 7; \t\t\t\t#depth of downstream pile\n",
+ "alpha = b/d;\n",
+ "n = 0.14; \t\t\t\t#n = 1/math.pi*(lambda)**0.5;\n",
+ "Ge = Hs*n/d;\n",
+ "print \"check by Khosla theory:\";\n",
+ "print \"exit gradient = %.2f. < 1/6 hence safe\"%(Ge);\n",
+ "alpha_ = d/b;\n",
+ "fic1 = 0.83;fid1 = 0.88;\n",
+ "corec_c1 = (fid1-fic1)*100/2;\n",
+ "bdash = b;\n",
+ "d = 2;D = 7;\n",
+ "C1 = 19*(D/bdash)**0.5*(d+D)/b;\n",
+ "fic1 = fic1*100+corec_c1+C1;\n",
+ "Pc = Hs*fic1/100; \t\t\t\t#pressure head at C\n",
+ "alpha_ = d/b;\n",
+ "fie2 = 0.31;fid2 = 0.21;\n",
+ "corec_e1 = (fie2-fid2)*1.7*100/7;\n",
+ "bdash = b;\n",
+ "d = 7;D = 2;\n",
+ "C1 = 19*(D/bdash)**0.5*(d+D)/b;\n",
+ "fie2 = fie2*100-corec_e1-C1; \t\t\t\t#in book 3.53 value is wrong\n",
+ "Pe = Hs*fie2/100; \t\t\t\t#pressue head at E\n",
+ "#assuming linear variation of pressure for intermediate points\n",
+ "Pa = Pc-(Pc-Pe)*(33+8)/b;\n",
+ "t = Pa/1.24;\n",
+ "Pa = round(Pa*100)/100;\n",
+ "t = round(t*100)/100;\n",
+ "print \"pressure at d/s of weir wall = %.2f m.\"%(Pa);\n",
+ "print \"thickness at d/s of weir wall = %.2f m. < thickness by Bligh theory;hence safe.\"%(t);\n",
+ "Pb = Pc-(Pc-Pe)*(33+8+6)/b;\n",
+ "t = Pb/1.24;\n",
+ "Pa = round(Pa*100)/100;\n",
+ "t = round(t*100)/100;\n",
+ "print \"pressure at 6 m from d/s of weir wall = %.2f m.\"%(Pb);\n",
+ "print \"thickness at 6m from d/s of weir wall = %.2f m. < thickness by Bligh theory;hence safe.\"%(t);\n",
+ "Pc = Pc-(Pc-Pe)*(33+8+12)/b;\n",
+ "t = Pc/1.24;\n",
+ "Pa = round(Pa*100)/100;\n",
+ "t = round(t*100)/100;\n",
+ "print \"pressure at 12 m from d/s of weir wall = %.2f m.\"%(Pc);\n",
+ "print \"thickness at 12m from d/s of weir wall = %.2f m. > thickness by Bligh theory;hence unsafe.\"%(t);\n",
+ "print \"hence increase th ethickness to 1.9 m for a length of 7 m of impervious floor.\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hydraulic calculation:\n",
+ "discharge per unit width of river = 11.10 cumecs.\n",
+ "regime scour depth = 6.72 m.\n",
+ "actual d/s H.F.L allowing 0.5 m for retrogation = 284.50 m.\n",
+ "crest level = 282.65 m.\n",
+ "heigth of shutter = 1.85 m.\n",
+ "depth of upstream cut-off = 2.00 m.\n",
+ " provide concrete cut off 2 m depth.\n",
+ "R.L of gates crest = 6.50 m.\n",
+ "Heigth of crest = 4.65 m.\n",
+ "design of weir wall:\n",
+ "provide top width of 3 m.\n",
+ "bottom width = 8 m.\n",
+ "design of impervious and pervious aprons:\n",
+ "total creep length = 78 m.\n",
+ "length of downstream impervious apron = 19 m.\n",
+ "length of upstream impervious apron = 33 m.\n",
+ "total length of d/s apron = 58 m.\n",
+ "provide filter of length 20.00 m. and launching apron of length 20.00 m.\n",
+ "thickness of launching apron in horizontal position = 1.11 m.\n",
+ "provide launching apron of thickness 1.5 m.\n",
+ "thickness of apron in horizontal position = 1.60 m.\n",
+ "provide thickness of 3.00 m from d/s of weir wall to point 6 m from it.\n",
+ "provide thickness of 2.40 m from 6 m to 12 m from d/s end of weir wall.\n",
+ "provide thickness of 1.90 m for rest of length of weir floor.\n",
+ "check by Khosla theory:\n",
+ "exit gradient = 0.13. < 1/6 hence safe\n",
+ "pressure at d/s of weir wall = 3.03 m.\n",
+ "thickness at d/s of weir wall = 2.44 m. < thickness by Bligh theory;hence safe.\n",
+ "pressure at 6 m from d/s of weir wall = 2.66 m."
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "thickness at 6m from d/s of weir wall = 2.14 m. < thickness by Bligh theory;hence safe.\n",
+ "pressure at 12 m from d/s of weir wall = 2.29 m.\n",
+ "thickness at 12m from d/s of weir wall = 1.85 m. > thickness by Bligh theory;hence unsafe.\n",
+ "hence increase th ethickness to 1.9 m for a length of 7 m of impervious floor.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.4 pg : 617"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\t\t\t\t#design a slopeing glacis\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "q = 10; \t\t\t\t#maximum discharge intensity on weir crest\n",
+ "hfl = 255; \t\t\t\t#H.F.L before construction of weir\n",
+ "rb = 249.5; \t\t\t\t#R.L of river bed\n",
+ "pl = 254; \t\t\t\t#pond level\n",
+ "s = 1; \t\t\t\t#heigth of crest shutter\n",
+ "dhw = 251.5; \t\t\t\t#anticipated downstream water level in river when water is dischrging with pond level upstream\n",
+ "br = 0.5; \t\t\t\t#bed retrogression\n",
+ "f = 0.9; \t\t\t\t#Laecey silt factor\n",
+ "Ge = 1./7; \t\t\t\t#permissible exit gradient\n",
+ "flux = 1; \t\t\t\t#permissible afflux\n",
+ "\n",
+ "cl = pl-s; \t\t\t\t#crest level\n",
+ "print \"crest level = %.2f m.\"%(cl);\n",
+ "K = (q/1.7)**(2./3);\n",
+ "tel_up = cl+K;\n",
+ "tel_up = round(tel_up*100)/100;\n",
+ "print \"elevation of u/s T.E.L = %.2f m.\"%(tel_up);\n",
+ "R = 1.35*(q**2/f)**(1./3);\n",
+ "R = round(R*10)/10;\n",
+ "print \"regime scour depth = %.2f m.\"%(R);\n",
+ "V = q/R; \t\t\t\t#regime velocity\n",
+ "vh = V**2/(2*9.81); \t\t\t\t#velocity head\n",
+ "hfl_up = tel_up-vh;\n",
+ "tel_down = hfl+vh;\n",
+ "flux = hfl_up-hfl;\n",
+ "flux = round(flux*100)/100;\n",
+ "print \"afflux = %.2f. which is near to permissible\"%(flux);\n",
+ "hfl_down = hfl-br; \t\t\t\t#downstream H.F.L after retrogression\n",
+ "tel_down = tel_down-br; \t\t\t\t#downstream T.F.L after retrogression\n",
+ "Hl = tel_up-tel_down; \t\t\t\t#loss of head in flood\n",
+ "Hl = round(Hl*100)/100;\n",
+ "print \"loss of head in at high flood = %.2f m.\"%(Hl);\n",
+ "K = pl-cl; \t\t\t\t#head over crest\n",
+ "q_ = 1.7*(K)**1.5;\n",
+ "Hl_ = pl-dhw; \t\t\t\t#loss of head\n",
+ "print \"loss of head = %.2f m.\"%(Hl_);\n",
+ "Ef2 = 4.3;\n",
+ "Ef2_ = 1.7; \t\t\t\t#from Blench curve\n",
+ "jump = tel_down-Ef2;\n",
+ "jump_ = 251.5-Ef2_; \t\t\t\t#level at which jump will form\n",
+ "Ef1 = Ef2+Hl;\n",
+ "Ef1_ = Ef2_+Hl_;\n",
+ "D1 = 1.03;\n",
+ "D1_ = 0.15; \n",
+ "D2 = 3.96;D2_ = 1.68; \n",
+ "hj = D2-D1;\n",
+ "hj_ = D2_-D1_; \t\t\t\t#heigth of jump\n",
+ "concrete = 5*hj;\n",
+ "concrete_ = 5*hj_; \t\t\t\t#length of concrete floor\n",
+ "print \"Hydraulic jump calculation:\";\n",
+ "print \"heigth of jump for high flood condition = %.2f m.\"%(hj);\n",
+ "print \"length of concrete floor for high flood condition = %.2f m.\"%(concrete);\n",
+ "print \"heigth of jump for pond level condition = %.2f m.\"%(hj_);\n",
+ "print \"length of concrete floor for high pond level condition = %.2f m.\"%(concrete_);\n",
+ "\n",
+ "cw = 2; \t\t\t\t#crets width\n",
+ "us = 2; \t\t\t\t#upstream slope\n",
+ "ds = 3; \t\t\t\t#downstream slope\n",
+ "l = 15;\n",
+ "print \" upstream slope of glacis = %i:1.\"%(us);\n",
+ "print \"downstream slope of glacis = %i:1.\"%(ds);\n",
+ "print \"horizontal length of floor beyond the toe = %i m..\"%(l);\n",
+ "\n",
+ "R = 6.5;\n",
+ "sh_up = hfl_up-1.5*R;\n",
+ "sh_down = hfl_down-2*R;\n",
+ "sh_up = round(sh_up*100)/100;\n",
+ "print \"R.L of bottom of upstream sheet pile = %.2f m.\"%(sh_up);\n",
+ "print \"R.L of downstream sheet pile = %.2f m.\"%(sh_down);\n",
+ "print \"provide intermediate sheet pile at d/s toe of glacis.\";\n",
+ "Hs = pl-249.6; \t\t\t\t#maximum percolation head\n",
+ "d = 249.6-sh_down; \t\t\t\t#depth of d/s cut-off\n",
+ "n = Ge*d/Hs; \t\t\t\t#n = 1/(math.pi*lambda**0.5);\n",
+ "\t\t\t\t#from khosla exit gradient curve\n",
+ "alpha = 1.5;\n",
+ "b = alpha*d;\n",
+ "print \"length of impervious floor = %.2f m.\"%(b);\n",
+ "fl = (2*(253-249.5))+2+(3*(253-249.6))+15;\n",
+ "us = 36-fl;\n",
+ "print \"length of floor already provide = %.2f m.\"%(fl);\n",
+ "print \"which is more than required from permissible exit gradient.no upstream floor is required.\";\n",
+ "print \"provide %.2f m upstream floor so that total length becomes 36 m.\"%(us);\n",
+ "alpha_1 = 0.089; \n",
+ "alpha_2 = 0.225; \t\t\t\t#alpha_ = 1/alpha\n",
+ "b1 = 21;\n",
+ "alpha = 4.44;\n",
+ "print \"Pressure percent at points:\";\n",
+ "point = ['C1', 'D1' ,'C2' ,'E2' ,'D2' ,'D3' ,'E3'];\n",
+ "bc = [72 ,82 ,31.5 ,45.5 ,58.5 ,29 ,44];\n",
+ "crt = [3.1, 0, 3.5, 0, -3.2, 0, 0, -3.6];\n",
+ "crs = [0 ,0, 0, 0, 2.3, 0, 0, 0];\n",
+ "cri = [3.7, 0, 6.4, 0, -2.4, 0, -6.4];\n",
+ "after = [0,0,0,0,0,0,0]\n",
+ "print \"Points Before correction After correction\";\n",
+ "for i in range(7):\n",
+ " after[i] = bc[i]+crt[i]+crs[i]+cri[i];\n",
+ " print \"%s %i %.2f\"%(point[i],bc[i],after[i]);\n",
+ "\n",
+ "Hs = 254-249.6; \t\t\t\t#no flow condition\n",
+ "Hs_ = 256.13-254.5; \t\t\t\t#high flood condition\n",
+ "Hs__ = 254-251.5; \t\t\t\t#flow at pond level\n",
+ "print \"elevation of subsoil H.G above datum:\";\n",
+ "print \"no flow condition:\";\n",
+ "fie1 = 1*Hs;\n",
+ "fid1 = 0.82*Hs;\n",
+ "fic1 = 0.788*Hs;\n",
+ "fie2 = 0.552*Hs;\n",
+ "fid2 = 0.455*Hs;\n",
+ "fic2 = 0.414*Hs;\n",
+ "fie3 = 0.34*Hs;\n",
+ "fid3 = 0.29*Hs;\n",
+ "fic3 = 0;\n",
+ "fie1 = round(fie1*100)/100;fid1 = round(fid1*100)/100;fic1 = round(fic1*100)/100;\n",
+ "fie2 = round(fie2*100)/100;fid2 = round(fid2*100)/100;fic2 = round(fic2*100)/100;\n",
+ "fie3 = round(fie3*100)/100;fid3 = round(fid3*100)/100;fic3 = round(fic3*100)/100;\n",
+ "print \"fie1 = %.2f.;fid1 = %.2f.;fic1 = %.2f.fie2 = %.2f.;fid2 = %.2f.;fic2 = %.2f.fie3 = %.2f.;\\\n",
+ "fid3 = %.2f.;fic3 = %.2f.\"%(fie1,fid1,fic1,fie2,fid2,fic2,fie3,fid3,fic3);\n",
+ "print \"high flood condition:\";\n",
+ "fie1 = 1*Hs_;\n",
+ "fid1 = 0.82*Hs_;\n",
+ "fic1 = 0.788*Hs_;\n",
+ "fie2 = 0.552*Hs_;\n",
+ "fid2 = 0.455*Hs_;\n",
+ "fic2 = 0.414*Hs_;\n",
+ "fie3 = 0.34*Hs_;\n",
+ "fid3 = 0.29*Hs_;\n",
+ "fic3 = 0;\n",
+ "fie1 = round(fie1*100)/100;fid1 = round(fid1*100)/100;fic1 = round(fic1*100)/100;\n",
+ "fie2 = round(fie2*100)/100;fid2 = round(fid2*100)/100;fic2 = round(fic2*100)/100;\n",
+ "fie3 = round(fie3*100)/100;fid3 = round(fid3*100)/100;fic3 = round(fic3*100)/100;\n",
+ "print \"fie1 = %.2f.;fid1 = %.2f.;fic1 = %.2f.fie2 = %.2f.;fid2 = %.2f.;fic2 = %.2f.fie3 = %.2f.;\\\n",
+ "fid3 = %.2f.;fic3 = %.2f.\"%(fie1,fid1,fic1,fie2,fid2,fic2,fie3,fid3,fic3);\n",
+ "print \"flow at pond level:\";\n",
+ "fie1 = 1*Hs__;\n",
+ "fid1 = 0.82*Hs__;\n",
+ "fic1 = 0.788*Hs__;\n",
+ "fie2 = 0.552*Hs__;\n",
+ "fid2 = 0.455*Hs__;\n",
+ "fic2 = 0.414*Hs__;\n",
+ "fie3 = 0.34*Hs__;\n",
+ "fid3 = 0.29*Hs__;\n",
+ "fic3 = 0;\n",
+ "fie1 = round(fie1*100)/100;fid1 = round(fid1*100)/100;fic1 = round(fic1*100)/100;\n",
+ "fie2 = round(fie2*100)/100;fid2 = round(fid2*100)/100;fic2 = round(fic2*100)/100;\n",
+ "fie3 = round(fie3*100)/100;fid3 = round(fid3*100)/100;fic3 = round(fic3*100)/100;\n",
+ "print \"fie1 = %.2f.;fid1 = %.2f.;fic1 = %.2f.fie2 = %.2f.;fid2 = %.2f.;fic2 = %.2f.fie3 = %.2f.;\\\n",
+ "fid3 = %.2f.;fic3 = %.2f.\"%(fie1,fid1,fic1,fie2,fid2,fic2,fie3,fid3,fic3);\n",
+ "\n",
+ "print \"Prejump profile:\";\n",
+ "print \"high flood condition:\";\n",
+ "dist = [3 ,6, 8.4]; \t\t\t\t#dismath.tance\n",
+ "glacis = [252, 251, 250.32]; \t\t\t\t#R.L of glacis\n",
+ "D1 = [1.3 ,1.15, 1.03];\n",
+ "Ef1 = [0,0,0]\n",
+ "print \"Ef1 D1\";\n",
+ "for i in range(3):\n",
+ " Ef1[i] = 256.25-glacis[i];\n",
+ " print \"%.2f %.2f\"%(Ef1[i],D1[i]);\n",
+ "\n",
+ "print \"pond level flow:\";\n",
+ "dist = [3, 6, 9, 9.6]; \t\t\t\t#dismath.tance\n",
+ "glacis = [252, 251, 250, 249.9]; \t\t\t\t#R.Lof glacis\n",
+ "D1 = [0.31, 0.23, 0.16, 0.15];\n",
+ "Ef1 = [0,0,0,0]\n",
+ "print \"Ef1 D1\";\n",
+ "for i in range(4):\n",
+ " Ef1[i] = 254-glacis[i];\n",
+ " print \"%.2f %.2f\"%(Ef1[i],D1[i]);\n",
+ "\n",
+ "\n",
+ "\n",
+ "rho = 2.24;\n",
+ "Uf = 4; \t\t\t\t#unbalanced head for high flood condtion\n",
+ "Us = 2.56; \t\t\t\t#unbalanced static head\n",
+ "Hf = 2*Uf/3;\n",
+ "t = Hf/(rho-1);\n",
+ "t = round(t*10)/10;\n",
+ "print \"floor thickness at the point of formation of hydraulic jump = %.2f m.\"%(t);\n",
+ "Uf = 2.9; \t\t\t\t#unbalanced head for high flood condtion\n",
+ "Us = 2.2; \t\t\t\t#unbalanced static head\n",
+ "Hf = 2*Uf/3;\n",
+ "t = Us/(rho-1);\n",
+ "t = round(t*10)/10;\n",
+ "print \"floor thickness at the point of formation of hydraulic jump at the pond level condition = %.2f m.\"%(t);\n",
+ "P = 1.5; \t\t\t\t#pressure head at d/s end of floor\n",
+ "t = P/(rho-1);\n",
+ "t = round(t*10)/10;\n",
+ "print \"floor thickness at downstream side of sloping glacis = %.2f m.\"%(t);\n",
+ "D = rb-sh_up; \t\t\t\t#depth of u/s scour hole above bed level\n",
+ "a = 1.5*D;\n",
+ "a = round(a*10)/10;\n",
+ "print \"minimum length of upstream launching apron = %.2f m.\"%(a);\n",
+ "print \"provide 1.5 m thick apron for length of 5 m.\";\n",
+ "D = 249.6-241.5;\n",
+ "a = 1.5*D;\n",
+ "print \"minimum length of downstream launching apron = %.2f m.\"%(a);\n",
+ "print \"provide 1.5 m thick apron for length of 12 m.\";\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "crest level = 253.00 m.\n",
+ "elevation of u/s T.E.L = 256.26 m.\n",
+ "regime scour depth = 6.50 m.\n",
+ "afflux = 1.14. which is near to permissible\n",
+ "loss of head in at high flood = 1.64 m.\n",
+ "loss of head = 2.50 m.\n",
+ "Hydraulic jump calculation:\n",
+ "heigth of jump for high flood condition = 2.93 m.\n",
+ "length of concrete floor for high flood condition = 14.65 m.\n",
+ "heigth of jump for pond level condition = 1.53 m.\n",
+ "length of concrete floor for high pond level condition = 7.65 m.\n",
+ " upstream slope of glacis = 2:1.\n",
+ "downstream slope of glacis = 3:1.\n",
+ "horizontal length of floor beyond the toe = 15 m..\n",
+ "R.L of bottom of upstream sheet pile = 246.39 m.\n",
+ "R.L of downstream sheet pile = 241.50 m.\n",
+ "provide intermediate sheet pile at d/s toe of glacis.\n",
+ "length of impervious floor = 12.15 m.\n",
+ "length of floor already provide = 34.20 m.\n",
+ "which is more than required from permissible exit gradient.no upstream floor is required.\n",
+ "provide 1.80 m upstream floor so that total length becomes 36 m.\n",
+ "Pressure percent at points:\n",
+ "Points Before correction After correction\n",
+ "C1 72 78.80\n",
+ "D1 82 82.00\n",
+ "C2 31 41.40\n",
+ "E2 45 45.50\n",
+ "D2 58 55.20\n",
+ "D3 29 29.00\n",
+ "E3 44 37.60\n",
+ "elevation of subsoil H.G above datum:\n",
+ "no flow condition:\n",
+ "fie1 = 4.40.;fid1 = 3.61.;fic1 = 3.47.fie2 = 2.43.;fid2 = 2.00.;fic2 = 1.82.fie3 = 1.50.;fid3 = 1.28.;fic3 = 0.00.\n",
+ "high flood condition:\n",
+ "fie1 = 1.63.;fid1 = 1.34.;fic1 = 1.28.fie2 = 0.90.;fid2 = 0.74.;fic2 = 0.67.fie3 = 0.55.;fid3 = 0.47.;fic3 = 0.00.\n",
+ "flow at pond level:\n",
+ "fie1 = 2.50.;fid1 = 2.05.;fic1 = 1.97.fie2 = 1.38.;fid2 = 1.14.;fic2 = 1.03.fie3 = 0.85.;fid3 = 0.73.;fic3 = 0.00.\n",
+ "Prejump profile:\n",
+ "high flood condition:\n",
+ "Ef1 D1\n",
+ "4.25 1.30\n",
+ "5.25 1.15\n",
+ "5.93 1.03\n",
+ "pond level flow:\n",
+ "Ef1 D1\n",
+ "2.00 0.31\n",
+ "3.00 0.23\n",
+ "4.00 0.16\n",
+ "4.10 0.15\n",
+ "floor thickness at the point of formation of hydraulic jump = 1.60 m.\n",
+ "floor thickness at the point of formation of hydraulic jump at the pond level condition = 1.80 m.\n",
+ "floor thickness at downstream side of sloping glacis = 1.20 m.\n",
+ "minimum length of upstream launching apron = 4.70 m.\n",
+ "provide 1.5 m thick apron for length of 5 m.\n",
+ "minimum length of downstream launching apron = 12.15 m.\n",
+ "provide 1.5 m thick apron for length of 12 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.5 pg : 631"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "b = 16; \t\t\t\t#total length of floor\n",
+ "d = 5; \t\t\t\t#depth of downstream pile\n",
+ "D = 4; \t\t\t\t#depth of upstream pile\n",
+ "H = 2.5; \t\t\t\t#head created by weir\n",
+ "\n",
+ "\t\t\t\t#pressure at E\n",
+ "alpha = b/d;\n",
+ "lambda1 = (1+(1+alpha**2)**0.5)/2;\n",
+ "fie = math.acos((lambda1-2)/lambda1)/math.pi;\n",
+ "C = 19*(D/b)**0.5*((d+D)/b);\n",
+ "fie = fie*100-C;\n",
+ "P = H*fie/100;\n",
+ "P = round(P*1000)/1000;\n",
+ "print \"Pressure at E = %.2f m.\"%(P);\n",
+ "\n",
+ "\t\t\t\t#pressure at C1\n",
+ "alpha = b/D;\n",
+ "lambda1 = (1+(1+alpha**2)**0.5)/2;\n",
+ "fie = math.acos((lambda1-2)/lambda1)/math.pi;\n",
+ "fic = 1-fie; \t\t\t\t#by principle reversibility of flow\n",
+ "C = 19*(d/b)**0.5*((d+D)/b);\n",
+ "fic = fic*100+C;\n",
+ "P = fic*H/100;\n",
+ "P = round(P*1000)/1000;\n",
+ "print \" Pressure at C = %.2f m.\"%(P);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure at E = 1.22 m.\n",
+ " Pressure at C = 1.43 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.6 pg : 632"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "\n",
+ "#Given\n",
+ "b = 13; \t\t\t\t#length of floor\n",
+ "d = 2; \t\t\t\t#depth of downstream wall\n",
+ "D = 1.5; \t\t\t\t#depth of upstream cut-off\n",
+ "rho = 2.24; \t\t\t\t#relative density\n",
+ "H = 1.5;\n",
+ "\n",
+ "#at junction of d/s cut-off with floor\n",
+ "alpha = b/d;\n",
+ "lambda1 = (1+(1+alpha**2)**0.5)/2;\n",
+ "fie = math.acos((lambda1-2)/lambda1)/math.pi;\n",
+ "C = 19*(D/b)**0.5*((d+D)/b);\n",
+ "fie = fie*100-C;\n",
+ "P = H*fie/100;\n",
+ "t = P/(rho-1);\n",
+ "t = round(t*10)/10;\n",
+ "print \"floor thickness at junction of d/s cut-off with floor = %.2f m.\"%(t);\n",
+ "\n",
+ "#at junction of u/s cut-off with floor\n",
+ "alpha = b/D;\n",
+ "lambda11 = (1+(1+alpha**2)**0.5)/2;\n",
+ "fie = math.acos((lambda11-2)/lambda11)/math.pi;\n",
+ "fic = 1-fie; \t\t\t\t#by principle reversibility of flow\n",
+ "C = 19*(D/b)**0.5*((d+D)/b);\n",
+ "fiec = fic*100+C;\n",
+ "P = fiec*H/100;\n",
+ "t = 0.3; \t\t\t\t#this the uplift will be counter balanced by downward weigth of impounded water\n",
+ "print \"floor thickness at junction of u/s cut-off with floor = %.2f m.\"%(t);\n",
+ "\n",
+ "#at mid-length\n",
+ "P = (1.08+0.489)/2; \t\t\t\t#assuming linear variation\n",
+ "t = P/(rho-1);\n",
+ "t = round(t*100)/100;\n",
+ "print \"floor thickness at mid-length = %.2f m.\"%(t);\n",
+ "\n",
+ "#exit gradient\n",
+ "G = H/(d*math.pi*(lambda1)**0.5);\n",
+ "G = round(G*1000)/1000;\n",
+ "#math.since G<0.18\n",
+ "print \" G = %.2f. <0.18./nfloor is safe against failure by piping.\"%(G);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "floor thickness at junction of d/s cut-off with floor = 0.40 m.\n",
+ "floor thickness at junction of u/s cut-off with floor = 0.30 m.\n",
+ "floor thickness at mid-length = 0.63 m.\n",
+ " G = 0.13. <0.18./nfloor is safe against failure by piping.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.7 pg : 634"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "B = 30; \t\t\t\t#stream width\n",
+ "D = 3; \t\t\t\t#stream depth\n",
+ "V = 1.25; \t\t\t\t#mean velocity\n",
+ "Cd = 0.95; \t\t\t\t#discharge coefficient\n",
+ "Q = B*D*V;\n",
+ "\n",
+ "# Calculations\n",
+ "C = 2*Cd*(2*9.81)**0.5/3;\n",
+ "x = 4-(Q/(C*B))**(2./3);\n",
+ "x = round(x*1000)/1000;\n",
+ "\n",
+ "# Results\n",
+ "print \"heigth of weir to be built = %.2f m.\"%(x);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "heigth of weir to be built = 2.79 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.8 pg : 635"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "b = 50.; \t\t\t\t#length of floor\n",
+ "d = 8.; \t\t\t\t#depth of downstream pile\n",
+ "D = 8.; \t\t\t\t#depth of upstream pile\n",
+ "H = 5.; \t\t\t\t#effective head \n",
+ "tu = 1.; \t\t\t\t#floor thickness at upstream\n",
+ "td = 2.; \t\t\t\t#floor thickness at downstream\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\t\t\t\t#downstream cut-off\n",
+ "alpha = b/d;\n",
+ "lambda1 = (1+(1+alpha**2)**0.5)/2;\n",
+ "fie = math.acos((lambda1-2)/lambda1)/math.pi;\n",
+ "fid = math.acos((lambda1-1)/lambda1)/math.pi;\n",
+ "Ct = (fie-fid)*td/d;\n",
+ "C = 19*(D/b)**0.5*((d+D)/b);\n",
+ "fie = fie*100-C-Ct*100;\n",
+ "P = H*fie/100;\n",
+ "P = round(P*100)/100;\n",
+ "print \"Pressure at downstream cut-off = %.2f m.\"%(P);\n",
+ "\n",
+ "\t\t\t\t#upstream cut-off\n",
+ "fie = math.acos((lambda1-2)/lambda1)/math.pi;\n",
+ "fid = math.acos((lambda1-1)/lambda1)/math.pi;\n",
+ "fic1 = 1-fie;\n",
+ "fid1 = 1-fid;\n",
+ "Ct = (fic1-fid1)*td/d;\n",
+ "C = -19*(D/b)**0.5*((d+D)/b);\n",
+ "fic1 = fic1*100-C-Ct*100;\n",
+ "P = H*fic1/100;\n",
+ "P = round(P*100)/100;\n",
+ "print \"Pressure at upstream cut-off = %.2f m.\"%(P);\n",
+ "G = H/(d*math.pi*(lambda1)**0.5);\n",
+ "print \"Exit Gradient = %.2f.\"%(G);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure at downstream cut-off = 1.49 m.\n",
+ "Pressure at upstream cut-off = 3.51 m.\n",
+ "Exit Gradient = 0.10.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.9 pg : 636"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 1000.; \t\t\t\t#discharge of river\n",
+ "L = 256.; \t\t\t\t#crest length of diversion\n",
+ "f = 1.1; \t\t\t\t#silt factor\n",
+ "seg = 1./6; \t\t\t\t#safe exit gradient\n",
+ "hfl = 103; \t\t\t\t#high flood level\n",
+ "cf = 100; \t\t\t\t#reduced level of downstream concrete floor\n",
+ "H = 2.4; \t\t\t\t#maximum static head of weir\n",
+ "b = 40; \t\t\t\t#length of concrete floor\n",
+ "\n",
+ "\n",
+ "# Calculations and Results\n",
+ "q = Q/L;\n",
+ "R = 1.35*(q**2/f)**(1./3);\n",
+ "rld = hfl-1.5*R;\n",
+ "d = cf-rld;\n",
+ "d = round(d*100)/100;\n",
+ "print \"depth of downstream cut-off = %.2f m.\"%(d);\n",
+ "\n",
+ "alpha = b/d;\n",
+ "lambda1 = (1+(1+alpha**2)**0.5)/2;\n",
+ "G = H/(d*math.pi*(lambda1)**0.5);\n",
+ "\t\t\t\t#math.since G<seg\n",
+ "print \" G = %.2f. <1/6./nfloor is safe against failure by piping.\"%(G);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "depth of downstream cut-off = 1.87 m.\n",
+ " G = 0.12. <1/6./nfloor is safe against failure by piping.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.10 pg : 636"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "b = 60; \t\t\t\t#length of floor\n",
+ "H = 6; \t\t\t\t#static head of weir\n",
+ "d = 6; \t\t\t\t#downstream depth of pile\n",
+ "n = 0.3; \t\t\t\t#porousity of soil particles\n",
+ "G = 2.7; \t\t\t\t#relative density of soil particles\n",
+ "\n",
+ "alpha = b/d;\n",
+ "lambda1 = (1+(1+alpha**2)**0.5)/2;\n",
+ "Ge = H/(d*math.pi*(lambda1)**0.5);\n",
+ "e = n/(1-n);\n",
+ "chg = (G-1)/(1+e);\n",
+ "f = chg/Ge;\n",
+ "f = round(f*100)/100;\n",
+ "print \"critical exit gradient = %.2f.\\\n",
+ "\\nfactor of safety of system = %.2f.\"%(chg,f);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "critical exit gradient = 1.19.\n",
+ "factor of safety of system = 8.79.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.11 pg : 637"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import roots,ceil\n",
+ "\n",
+ "#design a vertical drop weir on Bligh's theory\n",
+ "#test floor by Khosla's theory\n",
+ "\n",
+ "#Given\n",
+ "Q = 2800.; \t\t\t\t#maximum flood discharge\n",
+ "hfl = 285.; \t\t\t\t#H.F.L before construction\n",
+ "hw = 278.; \t\t\t\t#minimum water level\n",
+ "fsl = 284.; \t\t\t\t#F.S.L of canal\n",
+ "c = 12.; \t\t\t\t#coefficient of creep\n",
+ "flux = 1.; \t\t\t\t#allowable afflux\n",
+ "Ge = 1./6; \t\t\t\t#permissible exit gradient\n",
+ "rho = 2.24; \t\t\t\t#specific gravity of concrete\n",
+ "\n",
+ "#Hydraulic calculation\n",
+ "L = 4.75*Q**0.5;\n",
+ "q = Q/L;\n",
+ "q = round(q*10)/10;\n",
+ "print \"Hydraulic calculation:\";\n",
+ "print \"discharge per unit width of river = %.2f cumecs.\"%(q);\n",
+ "f = 1;\n",
+ "R = 1.35*(q**2/f)**(1./3);\n",
+ "R = round(R*100)/100;\n",
+ "print \"regime scour depth = %.2f m.\"%(R);\n",
+ "V = q/R; \t\t\t\t#regime velocity\n",
+ "vh = V**2/(2*9.81); \t\t\t\t#velocity head\n",
+ "l_down = hfl+vh;\n",
+ "l_up = l_down+flux;\n",
+ "hfl_up = l_up-vh;\n",
+ "hfl_down = hfl-0.5;\n",
+ "hfl_down = round(hfl_down*100)/100;\n",
+ "print \"actual d/s H.F.L allowing 0.5 m for retrogation = %.2f m.\"%(hfl_down);\n",
+ "K = (q/1.7)**(2./3);\n",
+ "cl = l_up-K; \t\t\t\t#crest level\n",
+ "cl = round(cl*100)/100;\n",
+ "print \"crest level = %.2f m.\"%(cl);\n",
+ "pl = fsl+0.5; \t\t\t\t#pond level\n",
+ "s = hfl_down-cl; \t\t\t\t#heigth of shutter\n",
+ "print \"heigth of shutter = %.2f m.\"%(s);\n",
+ "rl_up_pile = hfl_up-1.5*R; \t\t\t\t#R.L of bottom u/s pile\n",
+ "d_up_cut = hw-276; \t\t\t\t#depth of upstream cut-off\n",
+ "print \"depth of upstream cut-off = %.2f m.\"%(d_up_cut);\n",
+ "print \" provide concrete cut off 2 m depth.\";\n",
+ "rl_bot_ds = hfl_down-2*R;\n",
+ "Hs = hfl_down-hw; \t\t\t\t#seepage head\n",
+ "Hc = cl-hw; \t\t\t\t#heigth of crest\n",
+ "print \"R.L of gates crest = %.2f m.\"%(Hs);\n",
+ "print \"Heigth of crest = %.2f m.\"%(Hc);\n",
+ "\n",
+ "#design of weir wall\n",
+ "d = hfl_up-cl;\n",
+ "a = d/(rho)**0.5;\n",
+ "a = 3*d/(2*rho); \t\t\t\t#from sliding consideration\n",
+ "a = s+1; \t\t\t\t#from practical consieration\n",
+ "a = a+1;\n",
+ "print \"design of weir wall:\"\n",
+ "print \"provide top width of %i m.\"%(a);\n",
+ "Mo = 9.81*Hs**3/6; \t\t\t\t#overtirning moment\n",
+ "#equating the moment of resismath.tance to overturning moment and putting the values we get\n",
+ "y = [0.039,0.020,-1.084]\n",
+ "b = int(roots(y)[1]);\n",
+ "#we get b = - 5.5347261 and 5.0219056\n",
+ "#taking\n",
+ "#b = 5;\n",
+ "#when weir is submerged\n",
+ "C = 0.58;\n",
+ "d = (q**2/((2*C/3)**2*2*9.81))**(1./3);\n",
+ "Mo = 9.81*d*Hc**2/2;\n",
+ "#from equation of moment of resistence we get\n",
+ "y = [1,3,-77.55]\n",
+ "b = ceil(roots(y)[1]);\n",
+ "#we get b = - 10.433085 and 7.4330846\n",
+ "#taking\n",
+ "#b = 8;\n",
+ "print \"bottom width = %i m.\"%(b);\n",
+ "\n",
+ "#design of impervious and pervious aprons\n",
+ "C = 12;\n",
+ "L = C*Hs;\n",
+ "print \"design of impervious and pervious aprons:\";\n",
+ "print \"total creep length = %i m.\"%(L);\n",
+ "l1 = 2.21*C*(Hs/13)**0.5;\n",
+ "l1_ = l1+1;\n",
+ "print \"length of downstream impervious apron = %i m.\"%(l1_);\n",
+ "d1 = hw-276;\n",
+ "d2 = hw-271;\n",
+ "l2 = L-l1-(b+2*d1+2*d2);\n",
+ "print \"length of upstream impervious apron = %i m.\"%(l2);\n",
+ "l3 = 18*C*(Hs*q/975)**0.5;\n",
+ "print \"total length of d/s apron = %i m.\"%(l3); \t\t\t\t#calculation is wrong in book\n",
+ "l = l3-l1;\n",
+ "le = l/2;\n",
+ "le = round(le*100)/100;\n",
+ "print 'provide filter of length %.2f m. and launching apron of length %.2f m.'%(le,le);\n",
+ "t = d2*10**0.5/le;\n",
+ "print \"thickness of launching apron in horizontal position = %.2f m.\"%(t);\n",
+ "print \"provide launching apron of thickness 1.5 m.\";\n",
+ "T = 2*d1;\n",
+ "V = d1*10**0.5;\n",
+ "ta = V/T;\n",
+ "ta = round(ta*10)/10;\n",
+ "print \"thickness of apron in horizontal position = %.2f m.\"%(ta);\n",
+ "Hr = Hs-Hs*(4+33+8)/L;\n",
+ "t = 4*Hr/(3*(rho-1));\n",
+ "t = round(t*10)/10;\n",
+ "print 'provide thickness of %.2f m from d/s of weir wall to point 6 m from it.'%(t);\n",
+ "Hr = Hs-Hs*(4+33+8+6)/L;\n",
+ "t = 4*Hr/(3*(rho-1));\n",
+ "t = round(t*10)/10;\n",
+ "print \"provide thickness of %.2f m from 6 m to 12 m from d/s end of weir wall.\"%(t);\n",
+ "Hr = Hs-Hs*(4+33+8+12)/L;\n",
+ "t = 4*Hr/(3*(rho-1));\n",
+ "t = round(t*10)/10;\n",
+ "print \"provide thickness of %.2f m for rest of length of weir floor.\"%(t);\n",
+ "\n",
+ "#check by khosla's theory\n",
+ "b = 33+8+19; \t\t\t\t#total horizontal length of impervious floor\n",
+ "d = 7; \t\t\t\t#depth of downstream pile\n",
+ "alpha = b/d;\n",
+ "n = 0.14; \t\t\t\t#n = 1/math.pi*(lambda)**0.5;\n",
+ "Ge = Hs*n/d;\n",
+ "print \"check by Khosla theory:\";\n",
+ "print \"exit gradient = %.2f. < 1/6 hence safe\"%(Ge);\n",
+ "alpha_ = d/b;\n",
+ "fic1 = 0.83;fid1 = 0.88;\n",
+ "corec_c1 = (fid1-fic1)*100/2;\n",
+ "bdash = b;\n",
+ "d = 2.;D = 7;\n",
+ "C1 = 19*(D/bdash)**0.5*(d+D)/b;\n",
+ "fic1 = fic1*100+corec_c1+C1;\n",
+ "Pc = Hs*fic1/100; \t\t\t\t#pressure head at C\n",
+ "alpha_ = d/b;\n",
+ "fie2 = 0.31;fid2 = 0.21;\n",
+ "corec_e1 = (fie2-fid2)*1.7*100/7;\n",
+ "bdash = b;\n",
+ "d = 7;D = 2;\n",
+ "C1 = 19*(D/bdash)**0.5*(d+D)/b;\n",
+ "fie2 = fie2*100-corec_e1-C1; \t\t\t\t#in book 3.53 value is wrong\n",
+ "Pe = Hs*fie2/100; \t\t\t\t#pressue head at E\n",
+ "#assuming linear variation of pressure for intermediate points\n",
+ "Pa = Pc-(Pc-Pe)*(33+8)/b;\n",
+ "t = Pa/1.24;\n",
+ "Pa = round(Pa*100)/100;\n",
+ "t = round(t*100)/100;\n",
+ "print \"pressure at d/s of weir wall = %.2f m.\"%(Pa);\n",
+ "print \"thickness at d/s of weir wall = %.2f m. < thickness by Bligh theory;hence safe.\"%(t);\n",
+ "Pb = Pc-(Pc-Pe)*(33+8+6)/b;\n",
+ "t = Pb/1.24;\n",
+ "Pa = round(Pa*100)/100;\n",
+ "t = round(t*100)/100;\n",
+ "print \"pressure at 6 m from d/s of weir wall = %.2f m.\"%(Pb);\n",
+ "print \"thickness at 6m from d/s of weir wall = %.2f m. < thickness by Bligh theory;hence safe.\"%(t);\n",
+ "Pc = Pc-(Pc-Pe)*(33+8+12)/b;\n",
+ "t = Pc/1.24;\n",
+ "Pa = round(Pa*100)/100;\n",
+ "t = round(t*100)/100;\n",
+ "print \"pressure at 12 m from d/s of weir wall = %.2f m.\"%(Pc);\n",
+ "print \"thickness at 12m from d/s of weir wall = %.2f m. > thickness by Bligh theory;hence unsafe.\"%(t);\n",
+ "print \"hence increase th ethickness to 1.9 m for a length of 7 m of impervious floor.\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hydraulic calculation:\n",
+ "discharge per unit width of river = 11.10 cumecs.\n",
+ "regime scour depth = 6.72 m.\n",
+ "actual d/s H.F.L allowing 0.5 m for retrogation = 284.50 m.\n",
+ "crest level = 282.65 m.\n",
+ "heigth of shutter = 1.85 m.\n",
+ "depth of upstream cut-off = 2.00 m.\n",
+ " provide concrete cut off 2 m depth.\n",
+ "R.L of gates crest = 6.50 m.\n",
+ "Heigth of crest = 4.65 m.\n",
+ "design of weir wall:\n",
+ "provide top width of 3 m.\n",
+ "bottom width = 8 m.\n",
+ "design of impervious and pervious aprons:\n",
+ "total creep length = 78 m.\n",
+ "length of downstream impervious apron = 19 m.\n",
+ "length of upstream impervious apron = 33 m.\n",
+ "total length of d/s apron = 58 m.\n",
+ "provide filter of length 20.00 m. and launching apron of length 20.00 m.\n",
+ "thickness of launching apron in horizontal position = 1.11 m.\n",
+ "provide launching apron of thickness 1.5 m.\n",
+ "thickness of apron in horizontal position = 1.60 m.\n",
+ "provide thickness of 3.00 m from d/s of weir wall to point 6 m from it.\n",
+ "provide thickness of 2.40 m from 6 m to 12 m from d/s end of weir wall.\n",
+ "provide thickness of 1.90 m for rest of length of weir floor.\n",
+ "check by Khosla theory:\n",
+ "exit gradient = 0.13. < 1/6 hence safe\n",
+ "pressure at d/s of weir wall = 3.03 m.\n",
+ "thickness at d/s of weir wall = 2.44 m. < thickness by Bligh theory;hence safe.\n",
+ "pressure at 6 m from d/s of weir wall = 2.66 m.\n",
+ "thickness at 6m from d/s of weir wall = 2.14 m. < thickness by Bligh theory;hence safe.\n",
+ "pressure at 12 m from d/s of weir wall = 2.29 m.\n",
+ "thickness at 12m from d/s of weir wall = 1.85 m. > thickness by Bligh theory;hence unsafe.\n",
+ "hence increase th ethickness to 1.9 m for a length of 7 m of impervious floor.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.12 pg : 637"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#number of gates required for the barrage\n",
+ "#length and R.L of bamath.sin floor if silting bamath.sin is provided downstream of barrage\n",
+ "\n",
+ "#Given\n",
+ "Lmax = 212; \t\t\t\t#maximum reservior level\n",
+ "Lp = 211; \t\t\t\t#pond level\n",
+ "hfl = 210; \t\t\t\t#downstream high flood level in the river\n",
+ "Qmax = 3500; \t\t\t\t#maximum design flood discharge\n",
+ "Lcrest = 207; \t\t\t\t#crest level of the barrage\n",
+ "Lcrest_r = 208; \t\t\t\t#crest level of head regulator\n",
+ "Cd = 2.1; \t\t\t\t#coefficient of discharge for barrage\n",
+ "Cd_r = 1.5; \t\t\t\t#coefficient of discharge for head regulator\n",
+ "rbl = 205; \t\t\t\t#river bed level\n",
+ "Q = 500; \t\t\t\t#design discharge of main canal\n",
+ "\n",
+ "#design of water way for barrage during flood\n",
+ "H = Lmax-Lcrest;\n",
+ "L = Qmax/(Cd*H**1.5);\n",
+ "#which gives L = 149.07.\n",
+ "print \"nunmber of gates for the barrage = 15.\";\n",
+ "\n",
+ "#design of waterway for canal head regulator\n",
+ "H = Lp-Lcrest_r;\n",
+ "L1 = Q/(Cd_r*H**1.5);\n",
+ "#which gives L = 64.2\n",
+ "#hence provide 7 bays of 10 m each\n",
+ "print \"nunmber of gates for the head regulator = 7.\";\n",
+ "\n",
+ "#design of stilling bamath.sin\n",
+ "Hl = Lmax-hfl;\n",
+ "q = Qmax/L;\n",
+ "yc = (q**2/9.81)**(1./3);\n",
+ "Z = Hl/yc;\n",
+ "#math.since Z<1\n",
+ "Y = 1+0.93556*Z**0.368;\n",
+ "y2 = Y*yc;\n",
+ "Lc = 5*y2;\n",
+ "Lc = round(Lc*10)/10;\n",
+ "print \"Length of cistern = %.2f m.\"%(Lc);\n",
+ "Ef2 = yc*(Y+1/(2*Y**2));\n",
+ "j = hfl-Ef2;\n",
+ "j = round(j*10)/10;\n",
+ "print \"R.L of cistern = %.2f m.\"%(j);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "nunmber of gates for the barrage = 15.\n",
+ "nunmber of gates for the head regulator = 7.\n",
+ "Length of cistern = 33.30 m.\n",
+ "R.L of cistern = 202.70 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch14_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch14_2.ipynb
new file mode 100644
index 00000000..f55e341a
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch14_2.ipynb
@@ -0,0 +1,1965 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:e8ae669d88fc715c49999174af0f47a67eb761cc981a916d61f3cb981ae07f2c"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 14 : IRRIGATION CHANNEL 1 SILT THEORIES"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.1 pg : 662"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#design irrigation channel on Kennedy's theory\n",
+ "\n",
+ "#Given\n",
+ "Q = 45; \t\t\t\t#discharge\n",
+ "N = 0.0225; \t\t\t\t#rogosity coefficient\n",
+ "m = 1.05; \t\t\t\t#critical velocity ratio\n",
+ "S = 1./5000; \t\t\t\t#bed slope\n",
+ "\n",
+ "D = 2; \t\t\t\t#assume\n",
+ "Vo = 0.55*m*D**0.64;\n",
+ "A = Q/Vo;\n",
+ "#for a trapezoidal section\n",
+ "B = (A-0.5*D**2)/2;\n",
+ "P = B+D*5**0.5;\n",
+ "R = A/P;\n",
+ "C = (23+1/N+0.00155/S)*(R*S)**0.5/(1+(23+0.00155/S)*N/R**0.5);\n",
+ "V = C*(R*S)**0.5;\n",
+ "#Vo<V\n",
+ "\n",
+ "#assume D = 2.2\n",
+ "D = 2.2;\n",
+ "Vo = 0.55*m*D**0.64;\n",
+ "A = Q/Vo;\n",
+ "B = (A-0.5*D**2)/D;\n",
+ "P = B+D*5**0.5;\n",
+ "R = A/P;\n",
+ "C = (23+1/N+0.00155/S)*(R*S)**0.5/(1+(23+0.00155/S)*N/R**0.5);\n",
+ "V = C*(R*S)**0.5;\n",
+ "\n",
+ "#ratio of V and Vo is almost equal to 1\n",
+ "\n",
+ "# Results\n",
+ "B = round(B*10)/10;\n",
+ "print \"Width of channel section = %.2f m.\"%(B);\n",
+ "print \"Depth of channel section = %.2f m.\"%(D);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Width of channel section = 20.30 m.\n",
+ "Depth of channel section = 2.20 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.2 pg : 663"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import roots\n",
+ "\n",
+ "#design an irrigation canal for given data\n",
+ "\n",
+ "#Given\n",
+ "Q = 14; \t\t\t\t#discharge\n",
+ "m = 1; \t\t\t\t#critical velocity ratio\n",
+ "r = 5.7; \t\t\t\t#B/D\n",
+ "\n",
+ "D = (Q/(0.55*6.2))**(1/2.64);\n",
+ "B = D*r;\n",
+ "R = (B*D+D**2/2)/(B+D*5**0.5);\n",
+ "Vo = 0.55*m*D**0.64;\n",
+ "#applying kutters formula; V = C(RS)**0.5\n",
+ "#where C = (23+1/N+0.00155/S)*(R*S)**0.5/(1+(23+0.00155/S)*N/R**0.5);\n",
+ "#assuming S**0.5 = y\n",
+ "#y = poly1d([-1.98D-5,1.55D-3,-0.954,67.5],'x','c');\n",
+ "#roots(y);\n",
+ "#taking real values of y\n",
+ "S = 0.0139906**2;\n",
+ "B = round(B*100)/100;\n",
+ "D = round(D*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"Width of channel section = %.2f m.\"%(B);\n",
+ "print \"Depth of channel section = %.2f m.\"%(D);\n",
+ "print \"Bed slope = %.2e.\"%(S);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Width of channel section = 9.73 m.\n",
+ "Depth of channel section = 1.71 m.\n",
+ "Bed slope = 1.96e-04.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.3 pg : 668"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#design a channel on Kennedy's theory\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 45.; \t\t\t\t#discharge\n",
+ "m = 1.05; \t\t\t\t#critical velocity ratio\n",
+ "N = 0.025; \t\t\t\t#rugosity coefficient\n",
+ "S = 1./5000; \t\t\t\t#bed slope\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "l = S*Q**0.02/(N**2*m**2.02);\n",
+ "#from fig.14.3 we get r = 10\n",
+ "#solving the equation by trial and error method we get\n",
+ "r = 9.7;\n",
+ "D = (1.818*Q/(m*(r+0.5)))**(1/2.64);\n",
+ "B = r*D;\n",
+ "V = Q/(D**2*(r+0.5));\n",
+ "Vo = 0.55*D**0.64*m;\n",
+ "B = round(B);\n",
+ "D = round(D*100)/100;\n",
+ "V = round(V*1000)/1000;\n",
+ "Vo = round(Vo*1000)/1000;\n",
+ "\n",
+ "# Results\n",
+ "print \"Width of channel section = %.2f m.\"%(B);\n",
+ "print \"Depth of channel section = %.2f m.\"%(D);\n",
+ "print \"Velocity through the channel section = %.2f m/s.\"%(V);\n",
+ "print \"Vo = %.2f m/s.Hence Safe\"%(Vo);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Width of channel section = 21.00 m.\n",
+ "Depth of channel section = 2.16 m.\n",
+ "Velocity through the channel section = 0.94 m/s.\n",
+ "Vo = 0.94 m/s.Hence Safe\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.4 pg : 668"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "#design channel umath.sing method of curve fitting based onKennedy's theory\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 45.; \t\t\t\t#discharge\n",
+ "N = 0.0225; \t\t\t\t#rugosity coefficient\n",
+ "m = 1.05; \t\t\t\t#critical velocity ratio\n",
+ "S = 1./5000; \t\t\t\t#Bed slope\n",
+ "\n",
+ "r = (1.607*S**1.63*Q**0.033/(N**3.26*m**3.293)-0.258)**(-0.915);\n",
+ "D = (1.818*Q/(m*(r+0.5)))**(1/2.64);\n",
+ "B = r*D;\n",
+ "B = round(B);\n",
+ "D = round(D*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"Width of channel section = %.2f m.\"%(B);\n",
+ "print \"Depth of channel section = %.2f m.\"%(D);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Width of channel section = 21.00 m.\n",
+ "Depth of channel section = 2.16 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.5 pg : 668"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "#design channel umath.sing curve of CWPC for B/D ratio\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 45.; \t\t\t\t#discharge\n",
+ "N = 0.0225; \t\t\t\t#rugosity coefficient\n",
+ "m = 1.05; \t\t\t\t#critical velocity ratio\n",
+ "\n",
+ "r = (15+6.44*Q)**0.382;\n",
+ "S = (N**2/1.338*Q**0.02)*(0.258+(15+6.44*Q)**(-0.417))**0.6135;\n",
+ "D = (1.818*Q/(m*(r+0.5)))**(1/2.64);\n",
+ "B = r*D;\n",
+ "B = round(B);\n",
+ "D = round(D*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"Bed slope = %.2e.\"%(S);\n",
+ "print \"Width of channel section = %.2f m.\"%(B);\n",
+ "print \"Depth of channel section = %.2f m.\"%(D);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Bed slope = 2.14e-04.\n",
+ "Width of channel section = 20.00 m.\n",
+ "Depth of channel section = 2.23 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.6 pg : 667"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "#design the channel section umath.sing the following data and calculate math.logitudnal section\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 30.; \t\t\t\t#discharge\n",
+ "f = 1.; \t\t\t\t#silt factor\n",
+ "s = 1./2; \t\t\t\t#side slope\n",
+ "\n",
+ "V = (Q*f/140)**(1./6);\n",
+ "A = Q/V;\n",
+ "P = 4.75*Q**0.5;\n",
+ "D = (P-(P**2-6.944*A)**0.5)/3.472;\n",
+ "B = P-2.236*D;\n",
+ "\n",
+ "R = 5*V**2/(2*f);\n",
+ "S = f**(5./3)/(3340*Q**(1./6));\n",
+ "B = round(B*100)/100;\n",
+ "D = round(D*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"Bed slope = %.2e.\"%(S);\n",
+ "print \"Width of channel section = %.2f m.\"%(B);\n",
+ "print \"Depth of channel section = %.2f m.\"%(D);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Bed slope = 1.70e-04.\n",
+ "Width of channel section = 22.26 m.\n",
+ "Depth of channel section = 1.68 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.7 pg : 682"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import roots\n",
+ "\n",
+ "#design a channel in alluvial soil umath.sing tractive force approach\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 45.; \t\t\t\t#discharge\n",
+ "S = 1./4800; \t\t\t\t#bed slope\n",
+ "N = 0.0225; \t\t\t\t#rogosity coefficient\n",
+ "sigma = 0.0035; \t\t\t\t#permissible tractive stress\n",
+ "s = 1./2; \t\t\t\t#side slope\n",
+ "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "R = sigma/(gamma_w*S);\n",
+ "V = R**(2./3)*S**0.5/N;\n",
+ "A = Q/V;\n",
+ "P = A/R;\n",
+ "#y = poly1d([-49,28.61,-1.736],'x','c');\n",
+ "y = [-1.736,28.61,-49]\n",
+ "D = roots(y)[1];\n",
+ "#we get D = 14.539034 and 1.9413812 \n",
+ "#taking D = 1.9413812 \n",
+ "B = 28.61-2.23*D;\n",
+ "B = round(B*100)/100;\n",
+ "D = round(D*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"Width of channel section = %.2f m.\"%(B);\n",
+ "print \"Depth of channel section = %.2f m.\"%(D);\n",
+ "\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Width of channel section = 24.28 m.\n",
+ "Depth of channel section = 1.94 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.8 pg : 687"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import roots\n",
+ "\n",
+ "#designa channel section by Kennedy theory\n",
+ "\n",
+ "#Given\n",
+ "Q = 28.; \t\t\t\t#discharge\n",
+ "m = 1.; \t\t\t\t#critical velocity ratio\n",
+ "r = 7.6; \t\t\t\t#B/D\n",
+ "\n",
+ "D = (Q/4.46)**(1/2.64);\n",
+ "B = r*D;\n",
+ "R = 0.823*D;\n",
+ "V = 0.55*(D)**0.64;\n",
+ "\n",
+ "#applying kutters formula; V = C(RS)**0.5\n",
+ "#where C = (23+1/N+0.00155/S)*(R*S)**0.5/(1+(23+0.00155/S)*N/R**0.5);\n",
+ "#we get equation in S\n",
+ "#assuming S**0.5 = y\n",
+ "#y = poly([-1.42D-5,1.55D-3,-0.885,67.4],'x','c');\n",
+ "y = [67.4,-0.885,1.55e-3,-1.42e-5]\n",
+ "d = roots(y)[0];\n",
+ "#taking real values of y\n",
+ "S = d.real**2;\n",
+ "B = round(B*10)/10;\n",
+ "D = round(D*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"Width of channel section = %.2f m.\"%(B);\n",
+ "print \"Depth of channel section = %.2f m.\"%(D);\n",
+ "print \"Bed slope = %.2e.\"%(S);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Width of channel section = 15.20 m.\n",
+ "Depth of channel section = 2.01 m.\n",
+ "Bed slope = 1.60e-04.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.9 pg : 688"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "#design the channel section and calculate discharge\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "r = 5.7; \t\t\t\t#B/D\n",
+ "S = 1./5000; \t\t\t\t#bed slope\n",
+ "N = 0.0225; \t\t\t\t#rogosity coefficient\n",
+ "m = 1; \t\t\t\t#critical velocity ratio(assumed)\n",
+ "\n",
+ "#applying kutters formula; V = C(RS)**0.5\n",
+ "#where C = (23+1/N+0.00155/S)*(R*S)**0.5/(1+(23+0.00155/S)*N/R**0.5);\n",
+ "#we get equation in d as\n",
+ "#38.88*D**0.64-66.5*D**0.5+30.37*D**0.14 = 0\n",
+ "#solving it by trial and error method\n",
+ "#we get D = 1.7 m.\n",
+ "D = 1.7;\n",
+ "B = r*D;\n",
+ "V = 0.55*m*(D)**0.64;\n",
+ "A = B*D+D**2/2;\n",
+ "Q = A*V;\n",
+ "Q = round(Q*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"Width of channel section = %.2f m.\"%(B);\n",
+ "print \"Depth of channel section = %.2f m.\"%(D);\n",
+ "print \" Discharge = %.2f cumecs.\"%(Q);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Width of channel section = 9.69 m.\n",
+ "Depth of channel section = 1.70 m.\n",
+ " Discharge = 13.84 cumecs.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.10 pg : 689"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import roots\n",
+ "\n",
+ "#design irrigation channel according to Laecy silt theory\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 15.; \t\t\t\t#discharge\n",
+ "f = 1.; \t\t\t\t#laecy silt factor\n",
+ "s = 1./2; \t\t\t\t#channel side slope\n",
+ "\n",
+ "V = (Q*f**2/140);\n",
+ "A = Q/V;\n",
+ "R = 5*V**2/(2*f);\n",
+ "#umath.sing the value of A in equations we get,\n",
+ "#equation in D as\n",
+ "y = [-1.73,18.336,-21.765]\n",
+ "D = roots(y)[1];\n",
+ "\n",
+ "#we get D = 9.2368003 and 1.3620436.\n",
+ "#taking\n",
+ "D = 1.3620436;\n",
+ "B = 18.336-D*2.23;\n",
+ "P = 4.75*Q**0.5;\n",
+ "S = 1/(3340*Q**(1./6));\n",
+ "B = round(B*10)/10;\n",
+ "D = round(D*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"Width of channel section = %.2f m.\"%(B);\n",
+ "print \"Depth of channel section = %.2f m.\"%(D);\n",
+ "print \"Bed slope = %.2e.\"%(S);\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Width of channel section = 15.30 m.\n",
+ "Depth of channel section = 1.36 m.\n",
+ "Bed slope = 1.91e-04.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.11 pg : 690"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import roots\n",
+ "#find channel section and discharge\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "S = 1./5000; \t\t\t\t#bed slope\n",
+ "s = 1./2; \t\t\t\t#side slope\n",
+ "f = 0.9; \t\t\t\t#laecy silt factor\n",
+ "\n",
+ "Q = (f**(5./3)/(3340*S))**6;\n",
+ "R = f**3/(4980*S)**2;\n",
+ "P = 4.75*Q**0.5;\n",
+ "A = P*R;\n",
+ "#umath.sing the value of A and P in equations we get,\n",
+ "#equation in D as\n",
+ "y = [-1.73,9.41,-6.961]\n",
+ "D = roots(y)[1];\n",
+ "\n",
+ "#we get D = 4.5561754 and 0.8831309.\n",
+ "#taking D = 0.8831309;\n",
+ "B = 9.41-D*2.23;\n",
+ "B = round(B*100)*100;\n",
+ "D = round(D*100)/100;\n",
+ "Q = round(Q*1000)/1000;\n",
+ "\n",
+ "# Results\n",
+ "print \"Width of channel section = %.2f m.\"%(B);\n",
+ "print \"Depth of channel section = %.2f m.\"%(D);\n",
+ "print \" Discharge = %.2f cumecs.\"%(Q);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Width of channel section = 74400.00 m.\n",
+ "Depth of channel section = 0.88 m.\n",
+ " Discharge = 3.92 cumecs.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.12 pg : 691"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n",
+ "D = 3.; \t\t\t\t#depth of channel\n",
+ "d = 0.3; \t\t\t\t#grain size\n",
+ "k = 1.5; \t\t\t\t#size of roughness of channel bed\n",
+ "S = 1./4400; \t\t\t\t#bed slope\n",
+ "G = 2.65; \t\t\t\t#specific gravity\n",
+ "\n",
+ "# Calculations\n",
+ "tau_b = gamma_w*D*S;\n",
+ "N1 = d**(1./6)/24;\n",
+ "N = k**(1./6)/24;\n",
+ "gamma_s = gamma_w*G;\n",
+ "tau_c = 0.047*(gamma_s-gamma_w)*d/1000;\n",
+ "r = (N1/N)**1.5;\n",
+ "q = 47450*(tau_b*r-tau_c)**1.5;\n",
+ "q = round(q*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"quantity of bed load moved = %.2f kN/m/hr.\"%(q);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "quantity of bed load moved = 13.12 kN/m/hr.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.13 pg : 691"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n",
+ "D = 3.; \t\t\t\t#depth of channel\n",
+ "d = 0.3; \t\t\t\t#grain size\n",
+ "k = 1.5; \t\t\t\t#size of roughness of channel bed\n",
+ "S = 1./4400; \t\t\t\t#bed slope\n",
+ "G = 2.65; \t\t\t\t#specific gravity\n",
+ "\n",
+ "# Calculations\n",
+ "N1 = d**(1./6)/24;\n",
+ "N = k**(1./6)/24;\n",
+ "r = (N1/N)**1.5;\n",
+ "R1 = 3*r;\n",
+ "si = (G-1)*d/(1000*R1*S);\n",
+ "\t\t\t\t#hence we get\n",
+ "fi = 7;\n",
+ "q = 3600*fi*G*gamma_w*(G-1)**0.5*(gamma_w)**0.5*(d/1000)**1.5;\n",
+ "q = round(q*10)/10;\n",
+ "\n",
+ "# Results\n",
+ "print \"quantity of bed load moved = %.2f kN/m/hr.\"%(q);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "quantity of bed load moved = 13.70 kN/m/hr.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.14 pg : 692"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n",
+ "D = 3.; \t\t\t\t#depth of channel\n",
+ "d = 0.3; \t\t\t\t#grain size\n",
+ "k = 1.5; \t\t\t\t#size of roughness of channel bed\n",
+ "S = 1./4400; \t\t\t\t#bed slope\n",
+ "G = 2.65; \t\t\t\t#specific gravity\n",
+ "V = 0.03; \t\t\t\t#fall velocity\n",
+ "c_ = 400; \t\t\t\t#concentration at 0.3 m above bed\n",
+ "a = 0.3;\n",
+ "y = 1.;\n",
+ "k_ = 0.4; \t\t\t\t#van karman's consmath.tant\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "N1 = d**(1./6)/24;\n",
+ "N = k**(1./6)/24;\n",
+ "r = (N1/N)**1.5;\n",
+ "R1 = 3*r;\n",
+ "V_ = (gamma_w*R1*S)**0.5;\n",
+ "c = c_*((a/y)*(D-y)/(D-a))**(V/(V_*k_));\n",
+ "c = round(c*10)/10;\n",
+ "\n",
+ "# Results\n",
+ "print \"concentration of suspended load = %.2f ppm.\"%(c);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "concentration of suspended load = 74.10 ppm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.15 pg : 692"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import roots\n",
+ "\n",
+ "\t\t\t\t#design an irrigation channel by Meyer peter equation\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 45; \t\t\t\t#discharge\n",
+ "c = 55; \t\t\t\t#bed load concentraion\n",
+ "d = 0.3; \t\t\t\t#average grain diameter\n",
+ "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n",
+ "G = 2.67;\n",
+ "f = 0.964;\n",
+ "\n",
+ "c = c*Q*gamma_w*3600/1000000;\n",
+ "P = 4.75*Q**0.5;\n",
+ "\t\t\t\t#taking channel width as B = 28 m(slightly less than P)\n",
+ "B = 28.;\n",
+ "qs = c/B;\n",
+ "\t\t\t\t#assuming effective grain diameter k = 0.4 mm\n",
+ "ks = 0.4e-3;\n",
+ "N1 = ks**(1./6)/24;\n",
+ "sf = 1.76*d**0.5;\n",
+ "N = 0.0225*sf**0.25;\n",
+ "r = N1/N;\n",
+ "tau_c = 0.047*gamma_w*(G-1)*d/1000;\n",
+ "tau_b = r**1.5*((qs/47450)**(2./3)+tau_c);\n",
+ "\t\t\t\t#from Manning's formula we get on simplification\n",
+ "R = (0.000992*1000/0.525)**(3./7);\n",
+ "S = 0.525/(1000*R);\n",
+ "\t\t\t\t#solving equation of R for trapezoidal section of side slope 1/2 we get\n",
+ "y = [0.5,25.06,-36.792]\n",
+ "D = roots(y)[1];\n",
+ "#we get D = -51.547499 and 1.4274989 \n",
+ "#taking D = 1.4274989;\n",
+ "D = round(D*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"Width of channel section = %i m.\"%(B);\n",
+ "print \"Depth of channel section = %.2f m.\"%(D);\n",
+ "print \"Bed slope = %.2e.\"%(S);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Width of channel section = 28 m.\n",
+ "Depth of channel section = 1.43 m.\n",
+ "Bed slope = 4.00e-04.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.16 pg : 693"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import roots\n",
+ "\n",
+ "\n",
+ "#design an irrigation channel by Einstein equation\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 45.; \t\t\t\t#discharge\n",
+ "c = 55.; \t\t\t\t#bed load concentraion\n",
+ "d = 0.3; \t\t\t\t#average grain diameter\n",
+ "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n",
+ "G = 2.67; \t\t\t\t#specific gravity of soil\n",
+ "f = 0.964; \t\t\t\t#silt factor\n",
+ "\n",
+ "#taking channel width as B = 28 m(slightly less than P)\n",
+ "B = 28.;\n",
+ "qs = c/B;\n",
+ "\n",
+ "fi = (qs/(gamma_w*G))*(1/(G-1))**0.5*(1000000000/(gamma_w*d**3))**0.5;\n",
+ "#from fig. 14.6 we get value of sci\n",
+ "#umath.sing the sci equation and Manning formula and on simplifications we get\n",
+ "R = (2.4296)**(3./7);\n",
+ "S = 0.4083/(1000*1.463);\n",
+ "#solving equation of R for trapezoidal section of side slope 1/2 we get\n",
+ "y = [0.5,24.73,-40.96]\n",
+ "D = roots(y)[1];\n",
+ "#we get D = -51.064253 and 1.6042534 \n",
+ "#taking D = 1.6042534;\n",
+ "D = round(D*10)/10;\n",
+ "\n",
+ "# Results\n",
+ "print \"Width of channel section = %i m.\"%(B);\n",
+ "print \"Depth of channel section = %.2f m.\"%(D);\n",
+ "print \"Bed slope = %.2e.\"%(S);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Width of channel section = 28 m.\n",
+ "Depth of channel section = 1.60 m.\n",
+ "Bed slope = 2.79e-04.\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.17 pg : 697"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import roots\n",
+ "#design a channel for non-alluvial deposites\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 45.; \t\t\t\t#discharge\n",
+ "S = 1./4000; \t\t\t\t#bed slope\n",
+ "v = 0.9; \t\t\t\t#permissible velocity\n",
+ "N = 0.025; \t\t\t\t#rogosity coefficient\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "A = Q/v;\n",
+ "R = (v*N/S**0.5)**1.5;\n",
+ "P = A/R;\n",
+ "\t\t\t\t#let us provide a trapezoidal section\n",
+ "\t\t\t\t#from equation of Area and Perimeter of trapezoid\n",
+ "y = [1.828,-29.45,50]\n",
+ "D = roots(y)[1];\n",
+ "#from which we get D = 14.181815 and 1.9286881\n",
+ "#taking D = 1.9286881;\n",
+ "B = P-2*1.41*D;\n",
+ "D = round(D*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"Width of channel section = %i m.\"%(B);\n",
+ "print \"Depth of channel section = %.2f m.\"%(D);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Width of channel section = 24 m.\n",
+ "Depth of channel section = 1.93 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.18 pg : 697"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "#design non-allvial channel umath.sing Bazin's formula\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 15.; \t\t\t\t#discharge\n",
+ "V = 0.75; \t\t\t\t#mean velocity\n",
+ "s = 1.; \t\t\t\t#side slope\n",
+ "K = 1.3; \t\t\t\t#bazin's coefficient\n",
+ "\t\t\t\t#width is five times its depth\n",
+ "\n",
+ " \n",
+ "# Calculations\n",
+ "A = Q/V;\n",
+ "D = (A/6)**0.5;\n",
+ "B = 5*D;\n",
+ "P = B+2*D*1.41;\n",
+ "R = A/P;\n",
+ "C = 87/(1+K/(R)**0.5);\n",
+ "S = (V/C)**2/R;\n",
+ "B = round(B*10)/10;\n",
+ "D = round(D*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"Width of channel section = %.2f m.\"%(B);\n",
+ "print \"Depth of channel section = %.2f m.\"%(D);\n",
+ "print \"Bed slope = %.2e.\"%(S);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Width of channel section = 9.10 m.\n",
+ "Depth of channel section = 1.83 m.\n",
+ "Bed slope = 2.34e-04.\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.19 pg : 698"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#determine dimension of channel umath.sing chezy's equation\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 21.5; \t\t\t\t#discharge\n",
+ "S = 1./2500; \t\t\t\t#slope of bottom\n",
+ "C = 70;\n",
+ "r = 1/1.73;\n",
+ "#taking R = 0.5*D\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#and keeping it in Q = V*A;where V = C(RS)**0.5 and A = D**2(2*(4/3)**0.5-1/3**0.5);\n",
+ "D = (21.5/1.7146)**(1/2.5);\n",
+ "B = 2*D*((4./3)**0.5-(1./3)**0.5);\n",
+ "B = round(B*100)/100;\n",
+ "D = round(D*100)/100;\n",
+ "print \"side slope = %.2f.\"%(r);\n",
+ "print \"Width of channel section = %.2f m.\"%(B);\n",
+ "print \"Depth of channel section = %.2f m.\"%(D);\n",
+ "\n",
+ "R = 0.5*D;\n",
+ "V = C*(R*S)**0.5;\n",
+ "n = R**(2./3)*S**0.5/V;\n",
+ "n = round(n*1000)/1000;\n",
+ "print \"value of manning n = %.2f.\"%(n);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "side slope = 0.58.\n",
+ "Width of channel section = 3.18 m.\n",
+ "Depth of channel section = 2.75 m.\n",
+ "value of manning n = 0.01.\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.20 pg : 698"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\t\t\t\t#design a regime channel\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 100; \t\t\t\t#discharge\n",
+ "f = 1.1; \t\t\t\t#silt factor\n",
+ "s = 1./2; \t\t\t\t#side slope\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "V = (Q*f**2/140)**(1./6);\n",
+ "A = Q/V;\n",
+ "P = 4.75*Q**0.5;\n",
+ "D = (P-(P**2-6.944*A)**0.5)/3.472;\n",
+ "B = P-2.236*D;\n",
+ "R = 5*V**2/(2*f);\n",
+ "S = f**(5./3)/(3340*Q**(1./6));\n",
+ "B = round(B*10)/10;\n",
+ "D = round(D*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"Width of channel section = %.2f m.\"%(B);\n",
+ "print \"Depth of channel section = %.2f m.\"%(D);\n",
+ "print \"Bed slope = %.2e.\"%(S);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Width of channel section = 42.20 m.\n",
+ "Depth of channel section = 2.36 m.\n",
+ "Bed slope = 1.63e-04.\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.21 pg : 699"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import poly1d,roots\n",
+ "#design a channel umath.sing Laecy theory\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 40.; \t\t\t\t#discharge\n",
+ "s = 1.; \t\t\t\t#side slope\n",
+ "md = 0.8; \t\t\t\t#average size of base material\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "f = 1.76*(md)**0.5;\n",
+ "V = (Q*f**2/140)**(1./6);\n",
+ "A = Q/V;\n",
+ "P = 4.75*Q**0.5;\n",
+ "#from equations of Area and perimeter of trapezoidal section;we get\n",
+ "y = poly1d([42.41,-30.04,1.828],'x','c');\n",
+ "D = roots(y)[0];\n",
+ "\t\t\t\t#we get D = 14.873416 and 1.5598447\n",
+ "\t\t\t\t#taking\n",
+ "D = 1.5598447;\n",
+ "B = A/D-D;\n",
+ "R = 5*V**2/(2*f);\n",
+ "S = f**(5./3)/(3340*Q**(1./6));\n",
+ "B = round(B*100)/100;\n",
+ "D = round(D*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"Width of channel section = %.2f m.\"%(B);\n",
+ "print \"Depth of channel section = %.2f m.\"%(D);\n",
+ "print \"Bed slope = %.2e.\"%(S);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Width of channel section = 25.60 m.\n",
+ "Depth of channel section = 1.56 m.\n",
+ "Bed slope = 3.45e-04.\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.22 pg : 700"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 30.; \t\t\t\t#discharge\n",
+ "V = 1.; \t\t\t\t#velocity of flow\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "A = Q/V;\n",
+ "#perimeter of section = 30/D-D/2\n",
+ "#taking its derivative w.r.t to D\n",
+ "D = 1/((1.914/30)**0.5);\n",
+ "#from equation of area\n",
+ "B = 30/D-D/2;\n",
+ "B = round(B*10)/10;\n",
+ "D = round(D*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"Width of channel section = %.2f m.\"%(B);\n",
+ "print \"Depth of channel section = %.2f m.\"%(D);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Width of channel section = 5.60 m.\n",
+ "Depth of channel section = 3.96 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.23 pg : 700"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#determine whether flow is critical or sub-critical\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 17.; \t\t\t\t#discharge\n",
+ "B = 6.; \t\t\t\t#base of channel\n",
+ "s = 1./2; \t\t\t\t#side slope\n",
+ "D = 1.5; \t\t\t\t#depth of channel\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "A = D*((B+B/s)/2);\n",
+ "V = Q/A;\n",
+ "P = B+2*((D/s)**2+D**2)**0.5;\n",
+ "R = A/P;\n",
+ "F = V/(9.81*R)**0.5; \t\t\t\t#froud number\n",
+ "F = round(F*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "#math.since F<1;\n",
+ "print \"Froud number = %.2f.F<1.Flow is sub-critical\"%(F);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Froud number = 0.39.F<1.Flow is sub-critical\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.24 pg : 701"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#Given\n",
+ "B = 3.5; \t\t\t\t#bottom width of channel\n",
+ "n = 0.016; \t\t\t\t#manning n\n",
+ "S = 2.6/10000; \t\t\t\t#bed slope\n",
+ "Q = 8; \t\t\t\t#discharge\n",
+ "lfs = 1; \t\t\t\t#left side slope\n",
+ "rhs = 1.5; \t\t\t\t#rigth side slope\n",
+ "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "#umath.sing the equation of area and perimeter of trapezoidal section;Manning's formula and V = Q/A we get D as\n",
+ "#Manning formula: V = R**(2/3)*S**0.5/n\n",
+ "#(D*(3.5+1.25*D))**2.5 = 78.281+71.951*D\n",
+ "#solving it by trial and error method;we get\n",
+ "D = 1.5;\n",
+ "R = (D*(3.5+1.25*D))/(3.5+3.217*D);\n",
+ "tau = gamma_w*R*S*1000;\n",
+ "tau = round(tau*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"Depth of section = %.2f m.\"%(D);\n",
+ "print \"Average shear stress at channel bed = %.2f N/square-mm.\"%(tau);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Depth of section = 1.50 m.\n",
+ "Average shear stress at channel bed = 2.47 N/square-mm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.25 pg : 702"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "S = 1./5000; \t\t\t\t#bed slope\n",
+ "B = 40.; \t\t\t\t#width of channel\n",
+ "D = 2.6; \t\t\t\t#depth of channel\n",
+ "d = 0.38; \t\t\t\t#mean diameter of bed material\n",
+ "n = 0.021; \t\t\t\t#Manning n\n",
+ "D65 = 0.64e-3; \t\t\t\t#bed material size(m)\n",
+ "w = 1000.; \t\t\t\t#density of water\n",
+ "\n",
+ "# Calculations\n",
+ "#B/D as large tau_c = 0.075*d;\n",
+ "tau_c = 0.075*d;\n",
+ "tau_b = w*D*S;\n",
+ "N1 = (D65)**(1./6)/24;\n",
+ "r = N1/n;\n",
+ "qs = 4700*24*(tau_b*r**1.5-tau_c)**1.5/1000;\n",
+ "qs40 = qs*40;\n",
+ "\n",
+ "# Results\n",
+ "print \"bed load transported by the channel = %i t/m/day.\"%(qs40);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "bed load transported by the channel = 411 t/m/day.\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.26 pg : 702"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#Given\n",
+ "Q = 5.; \t\t\t\t#discharge\n",
+ "S = 0.2/1000; \t\t\t\t#bed slope\n",
+ "m = 0.8; \t\t\t\t#critical velocity ratio\n",
+ "s = 1./2; \t\t\t\t#side slope of chanel\n",
+ "C = 30.;\n",
+ "#assuming\n",
+ "\n",
+ "# Calculations\n",
+ "D = 1.;\n",
+ "Vo = 0.55*m*D**0.64;\n",
+ "A = Q/Vo;\n",
+ "B = A/D-(s*D);\n",
+ "P = B+2.43*D;\n",
+ "R = A/P;\n",
+ "V = C*(R*S)**0.5;\n",
+ "#Vo>V\n",
+ "#hence take second trial\n",
+ "D = 0.8; \t\t\t\t#assume\n",
+ "Vo = 0.55*m*D**0.64;\n",
+ "A = Q/Vo;\n",
+ "B = A/D-(s*D);\n",
+ "P = B+2.43*D;\n",
+ "R = A/P;\n",
+ "V = C*(R*S)**0.5;\n",
+ "#again Vo>V\n",
+ "#hence we take third trial\n",
+ "D = 0.7;\n",
+ "Vo = 0.55*m*D**0.64;\n",
+ "A = Q/Vo;\n",
+ "B = A/D+(s*D);\n",
+ "P = B+2.43*D;\n",
+ "R = A/P;\n",
+ "V = C*(R*S)**0.5;\n",
+ "B = round(B*100)/100;\n",
+ "#Vo is almost equal to V;\n",
+ "\n",
+ "# Results\n",
+ "print \"Width of channel section = %.2f m.\"%(B);\n",
+ "print \"Depth of channel section = %.2f m.\"%(D);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Width of channel section = 20.75 m.\n",
+ "Depth of channel section = 0.70 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.27 pg : 703"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#design irrigation channel by Kennedy method\n",
+ "\n",
+ "#Given\n",
+ "Q = 50.; \t\t\t\t#discharge\n",
+ "r = 2.5; \t\t\t\t#B/D ratio\n",
+ "m = 1.1; \t\t\t\t#critical velocity ratio\n",
+ "N = 0.025; \t\t\t\t#rogosity coefficient\n",
+ "s = 0.5; \t\t\t\t#side slope of channel\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "#umath.sing the equation of Vo and Q = A*V;we get\n",
+ "D = (Q/1.815)**(1/2.64);\n",
+ "B = r*D;\n",
+ "R = (B*D+0.5*D**2)/(B+2.236*D);\n",
+ "Vo = 0.55*m*D**0.64;\n",
+ "\n",
+ "#applying kutters formula; V = C(RS)**0.5\n",
+ "#where C = (23+1/N+0.00155/S)*(R*S)**0.5/(1+(23+0.00155/S)*N/R**0.5);\n",
+ "#assuming S**0.5 = y\n",
+ "#taking real values of y\n",
+ "S = 0.0196171 **2;\n",
+ "B = round(B*100)/100;\n",
+ "D = round(D*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"Width of channel section = %.2f m.\"%(B);\n",
+ "print \"Depth of channel section = %.2f m.\"%(D);\n",
+ "print \"Bed slope = %.2e.\"%(S);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Width of channel section = 8.78 m.\n",
+ "Depth of channel section = 3.51 m.\n",
+ "Bed slope = 3.85e-04.\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.28 pg : 704"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#design a regime channel umath.sing Laecy's theory\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 35; \t\t\t\t#discharge\n",
+ "f = 0.9; \t\t\t\t#silt factor\n",
+ "s = 1./2; \t\t\t\t#side slope\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "V = (Q*f/140)**(1./6);\n",
+ "A = Q/V;\n",
+ "P = 4.75*Q**0.5;\n",
+ "D = (P-(P**2-6.944*A)**0.5)/3.472;\n",
+ "B = P-2.236*D;\n",
+ "\n",
+ "R = 5*V**2/(2*f);\n",
+ "S = f**(5./3)/(3340*Q**(1./6));\n",
+ "D = round(D*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"Bed slope = %.2e.\"%(S);\n",
+ "print \"Width of channel section = %i m.\"%(B);\n",
+ "print \"Depth of channel section = %.2f m.\"%(D);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Bed slope = 1.39e-04.\n",
+ "Width of channel section = 24 m.\n",
+ "Depth of channel section = 1.80 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.29 pg : 705"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import roots\n",
+ "\n",
+ "#design an irrigation canal for given data\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 15.; \t\t\t\t#discharge\n",
+ "m = 1.; \t\t\t\t#critical velocity ratio\n",
+ "r = 5.7; \t\t\t\t#B/D\n",
+ "\n",
+ "D = (Q/(0.55*6.2))**(1/2.64);\n",
+ "B = D*r;\n",
+ "R = (B*D+D**2/2)/(B+D*5**0.5);\n",
+ "Vo = 0.55*m*D**0.64;\n",
+ "#applying kutters formula; V = C(RS)**0.5\n",
+ "#where C = (23+1/N+0.00155/S)*(R*S)**0.5/(1+(23+0.00155/S)*N/R**0.5);\n",
+ "#assuming S**0.5 = y\n",
+ "y = [67.5,-0.968,1.55e-3,-2e-5]\n",
+ "d = roots(y)[0];\n",
+ "\t\t\t\t#taking real values of y\n",
+ "S = d.real**2;\n",
+ "B = round(B*100)/100;\n",
+ "D = round(D*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"Width of channel section = %.2f m.\"%(B);\n",
+ "print \"Depth of channel section = %.2f m.\"%(D);\n",
+ "print \"Bed slope = %.2e.\"%(S);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Width of channel section = 9.99 m.\n",
+ "Depth of channel section = 1.75 m.\n",
+ "Bed slope = 2.01e-04.\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.30 pg : 705"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "#Design a section of unlined canal in a loomy soil\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 50.; \t\t\t\t#discharge\n",
+ "V = 1.; \t\t\t\t#permissible velocity\n",
+ "s = 2.; \t\t\t\t#side slope\n",
+ "r = 6.; \t\t\t\t#B/D ratio\n",
+ "N = 0.0225; \t\t\t\t#rogosity coefficient\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "A = Q/V;\n",
+ "D = (A/(r+2))**0.5;\n",
+ "B = r*D;\n",
+ "P = B+2*(5*D**2)**0.5;\n",
+ "R = A/P;\n",
+ "S = (V*N/R**(2/3))**2;\n",
+ "\n",
+ "# Results\n",
+ "print \"Width of channel section = %i m.\"%(B);\n",
+ "print \"Depth of channel section = %.2f m.\"%(D);\n",
+ "print \"Bed slope = %.2e.\"%(S);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Width of channel section = 15 m.\n",
+ "Depth of channel section = 2.50 m.\n",
+ "Bed slope = 5.06e-04.\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.31 pg : 705"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n",
+ "D = 5.; \t\t\t\t#depth of channel\n",
+ "d = 0.3; \t\t\t\t#grain size\n",
+ "k = 1.5; \t\t\t\t#size of roughness of channel bed\n",
+ "S = 1./4000; \t\t\t\t#bed slope\n",
+ "G = 2.65; \t\t\t\t#specific gravity\n",
+ "V = 0.02; \t\t\t\t#fall velocity\n",
+ "c_ = 1000.; \t\t\t\t#concentration at 0.3 m above bed\n",
+ "a = 0.3;\n",
+ "y = 2.5;\n",
+ "k_ = 0.4; \t\t\t\t#van karman's consmath.tant\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "R = 5; \t\t\t\t#R = D for wide channel\n",
+ "V_ = (gamma_w*R*S)**0.5;\n",
+ "c = c_*((a/y)*(D-y)/(D-a))**(V/(V_*k_));\n",
+ "\n",
+ "# Results\n",
+ "print \"concentration of suspended load = %i ppm.\"%(c);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "concentration of suspended load = 288 ppm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.32 pg : 706"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 40.; \t\t\t\t#discharge\n",
+ "f = 1.; \t\t\t\t#silt factor\n",
+ "\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#Laecey's theory\n",
+ "V = (Q*f/140)**(1./6);\n",
+ "A = Q/V;\n",
+ "P = 4.75*Q**0.5;\n",
+ "D = (P-(P**2-6.944*A)**0.5)/3.472;\n",
+ "B = P-2.236*D;\n",
+ "\n",
+ "R = 5*V**2/(2*f);\n",
+ "S = f**(5./3)/(3340*Q**(1./6));\n",
+ "B = round(B);\n",
+ "D = round(D*100)/100;\n",
+ "print \"By Laecey theory:\";\n",
+ "print \"Bed slope = %.2e.\"%(S);\n",
+ "print \"Width of channel section = %.2f m.\"%(B);\n",
+ "print \"Depth of channel section = %.2f m.\"%(D);\n",
+ "\n",
+ "#Kennedy's theory\n",
+ "r = B/D; \n",
+ "m = 1.; \t\t\t\t#critical velocity ratio\n",
+ "N = 0.0225; \t\t\t\t#rogosity coefficient\n",
+ "#umath.sing equation of area of trapezoidal section;Vo = 0.55mD**0.64 and Q = A*Vo\n",
+ "\n",
+ "D = (Q/8.058)**(1/2.64);\n",
+ "B = r*D;\n",
+ "B = round(B);\n",
+ "D = round(D*100)/100;\n",
+ "print \"By Kennedy theory:\";\n",
+ "print \"Width of channel section = %.2f m.\"%(B);\n",
+ "print \"Depth of channel section = %.2f m.\"%(D);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "By Laecey theory:\n",
+ "Bed slope = 1.62e-04.\n",
+ "Width of channel section = 26.00 m.\n",
+ "Depth of channel section = 1.84 m.\n",
+ "By Kennedy theory:\n",
+ "Width of channel section = 26.00 m.\n",
+ "Depth of channel section = 1.83 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.33 pg : 707"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "#design Laecey regime channel\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "A = 100000.; \t\t\t\t#culturable area(hectare)\n",
+ "IR = 0.4; \t\t\t\t#intensity of irrigation in kharif season\n",
+ "IK = 0.3; \t\t\t\t#intensity of irrigation in rabi season\n",
+ "OR = 1800.; \t\t\t\t#outlet discharge factor in kharif season\n",
+ "OK = 800.; \t\t\t\t#outlet discharge factor in kharif season\n",
+ "l = 0.1; \t\t\t\t#conveyance loss\n",
+ "md = 0.328; \t\t\t\t#average diameter of material\n",
+ "\n",
+ "# Calculations\n",
+ "AR = A*IR; \t\t\t\t#area under rabi\n",
+ "AK = A*IK; \t\t\t\t#area under kharif \n",
+ "Qr = AR/OR;\n",
+ "Qk = AK/OK;\n",
+ "Q = 1.1*Qk;\n",
+ "f = 1.76*(md)**0.5;\n",
+ "V = (Q*f**2/144)**(1./6);\n",
+ "A = Q/V;\n",
+ "P = 4.75*(Q)**0.5;\n",
+ "D = (P-(P**2-6.944*A)**0.5)/3.472;\n",
+ "B = P-2.236*D;\n",
+ "S = f**(5/3)/(3340*Q**(1./6));\n",
+ "B = round(B*10)/10;\n",
+ "D = round(D*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"Bed slope = %.2e.\"%(S);\n",
+ "print \"Width of channel section = %.2f m.\"%(B);\n",
+ "print \"Depth of channel section = %.2f m.\"%(D);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Bed slope = 1.62e-04.\n",
+ "Width of channel section = 26.40 m.\n",
+ "Depth of channel section = 1.86 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.34 pg : 707"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "D = 2.8; \t\t\t\t#depth of flow\n",
+ "c_ = 700; \t\t\t\t#concentration at 30 cm below water surface\n",
+ "y = 0.1;\n",
+ "a = D-0.3;\n",
+ "e = 0.4; \t\t\t\t#exponent in rouse equation;\n",
+ "\n",
+ "# Calculations\n",
+ "c = c_*(a*(D-y)/(y*(D-a)))**e;\n",
+ "\n",
+ "# Results\n",
+ "print \"concentration at point 10 cm above the bed = %i ppm.\"%(c);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "concentration at point 10 cm above the bed = 6109 ppm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.35 pg : 708"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "#design the distributory umath.sing Laecey theory\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "f = 0.85; \t\t\t\t#silt factor\n",
+ "AR = 3600.; \t\t\t\t#area for rabi\n",
+ "AK = 1400.; \t\t\t\t#area for kharif\n",
+ "delta_r = 0.135; \t\t\t\t#kor depth for rabi\n",
+ "delta_k = 0.19; \t\t\t\t#kor depth for kharif\n",
+ "tr = 4.; \t\t\t\t#kor period for rabi\n",
+ "tk = 2.5; \t\t\t\t#kor period for kharif\n",
+ "\n",
+ "# Calculations\n",
+ "Du_r = 8.64*tr*7/delta_r; \t\t\t\t#duty for rabi\n",
+ "Du_k = 8.64*tk*7/delta_k; \t\t\t\t#duty for kharif\n",
+ "q_r = AR/Du_r; \t\t\t\t#discharge for rabi\n",
+ "q_k = AK/Du_k; \t\t\t\t#discharge for kharif\n",
+ "Q = q_r; \t\t\t\t#math.since q_r>q_k\n",
+ "V = (Q*f**2/144)**(1./6);\n",
+ "A = Q/V;\n",
+ "P = 4.75*(Q)**0.5;\n",
+ "D = (P-(P**2-6.944*A)**0.5)/3.472;\n",
+ "S = f**(5./3)/(3340*Q**(1./6));\n",
+ "P = round(P*100)/100;\n",
+ "D = round(D*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"Bed slope = %.2e.\"%(S);\n",
+ "print \"Perimeter of channel section = %.2f m.\"%(P);\n",
+ "print \"Depth of channel section = %.2f m.\"%(D);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Bed slope = 2.03e-04.\n",
+ "Perimeter of channel section = 6.73 m.\n",
+ "Depth of channel section = 0.81 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch15_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch15_2.ipynb
new file mode 100644
index 00000000..c5a4b2dd
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch15_2.ipynb
@@ -0,0 +1,306 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:06bc45481e0c8d1fd696ec9d96ac784607ece32d90669bf112f17cc78a27982d"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 15 : IRRIGATION CHANNEL 2 DESIGN PROCEDURE"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.1 pg : 739"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "#design the distributory umath.sing Laecey theory\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "f = 0.85; \t\t\t\t#silt factor\n",
+ "AR = 3600.; \t\t\t\t#area for rabi\n",
+ "AK = 1400.; \t\t\t\t#area for kharif\n",
+ "delta_r = 0.135; \t\t\t\t#kor depth for rabi\n",
+ "delta_k = 0.19; \t\t\t\t#kor depth for kharif\n",
+ "tr = 4.; \t\t\t\t#kor period for rabi\n",
+ "tk = 2.5; \t\t\t\t#kor period for kharif\n",
+ "\n",
+ "# Calculations\n",
+ "Du_r = 8.64*tr*7/delta_r; \t\t\t\t#duty for rabi\n",
+ "Du_k = 8.64*tk*7/delta_k; \t\t\t\t#duty for kharif\n",
+ "q_r = AR/Du_r; \t\t\t\t#discharge for rabi\n",
+ "q_k = AK/Du_k; \t\t\t\t#discharge for kharif\n",
+ "Q = q_r; \t\t\t\t#math.since q_r>q_k\n",
+ "V = (Q*f**2/144)**(1./6);\n",
+ "A = Q/V;\n",
+ "P = 4.75*(Q)**0.5;\n",
+ "D = (P-(P**2-6.944*A)**0.5)/3.472;\n",
+ "S = f**(5./3)/(3340*Q**(1./6));\n",
+ "P = round(P*100)/100;\n",
+ "D = round(D*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"Bed slope = %.2e.\"%(S);\n",
+ "print \"Perimeter of channel section = %.2f m.\"%(P);\n",
+ "print \"Depth of channel section = %.2f m.\"%(D);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Bed slope = 2.03e-04.\n",
+ "Perimeter of channel section = 6.73 m.\n",
+ "Depth of channel section = 0.81 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.2 pg : 740"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "#design an irrigation channel in alluvial soil by Laecy's theory\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 15.; \t\t\t\t#Full supply discharge\n",
+ "f = 1.; \t\t\t\t#silt factor\n",
+ "s = 1./2; \t\t\t\t#side slope of channel\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "#from Laecey regime channel (Fig.15.4(b)) B and D is obtained as;\n",
+ "B = 15.1;\n",
+ "D = 1.38;\n",
+ "\t\t\t\t#also from Fig.15.5 we get slope as\n",
+ "S = 0.19/1000;\n",
+ "\n",
+ "# Results\n",
+ "print \"Width of channel section = %.2f m.\"%(B);\n",
+ "print \"Depth of channel section = %.2f m.\"%(D);\n",
+ "print \"Bed slope = %.2e.\"%(S);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Width of channel section = 15.10 m.\n",
+ "Depth of channel section = 1.38 m.\n",
+ "Bed slope = 1.90e-04.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.3 pg : 740"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import array,zeros,linspace,float64\n",
+ "\n",
+ "#design and prepare the longitudnal section;schedule of area statistics and channel dimension of irrigation channel\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "dl = 157.7; \t\t\t\t#datum level\n",
+ "fsl = 157.; \t\t\t\t#full supply level of parent channel\n",
+ "bl = 156.; \t\t\t\t#bed level of parent channel\n",
+ "kor_r = 4.; \t\t\t\t#kor period of rabi\n",
+ "kor_k = 2.5; \t\t\t\t#kor period of kharif\n",
+ "kord_r = 13.4; \t\t\t\t#kor depth of rabi\n",
+ "kord_k = 19.; \t\t\t\t#kor depth of kharif\n",
+ "s = 0.5; \t\t\t\t#side slope\n",
+ "m = 1.; \t\t\t\t#critical velocity ratio\n",
+ "N = 0.0225; \t\t\t\t#Kutter n\n",
+ "qo_r = 8.64*7*kor_r*100/kord_r; \t\t\t\t#outlet discharge for rabi(calculation is wrong in book)\n",
+ "qo_k = 8.64*7*kor_k*100/kord_k; \t\t\t\t#outlet discharge for kharif(calculation is wrong in book)\n",
+ "ca = 16000.; \t\t\t\t#culturable commanded area\n",
+ "Ir = 0.3; \t\t\t\t#intensity of irrigation in rabi\n",
+ "Ik = 0.125; \t\t\t\t#intensity of irrigation in rabi\n",
+ "\n",
+ "# Calculations and Results\n",
+ "Ar = Ir*ca; \t\t\t\t#area under rabi\n",
+ "Ak = ca*Ik; \t\t\t\t#area under kharif\n",
+ "q_r = Ar/qo_r;\n",
+ "q_k = Ak/qo_k;\n",
+ "q_r = round(q_r*100)/100;\n",
+ "q_k = round(q_k*100)/100;\n",
+ "print \"discharge neede for rabi crop = %.2f cumecs.\"%(q_r);\n",
+ "print \"discharge neede for kharif crop = %.2f cumecs.\"%(q_k);\n",
+ "print \"outlet discharge factor adopted = %i hectares per cumecs.\"%(qo_r);\n",
+ "\t\t\t\t#at km 5\n",
+ "ca = 8000; \t\t\t\t#culturable area\n",
+ "Ar = Ir*ca; \t\t\t\t#area under rabi\n",
+ "q_r = Ar/qo_r;\n",
+ "l = 0.5 \t\t\t\t#total loss after 5 km\n",
+ "q = q_r+l; \t\t\t\t#total discharge\n",
+ "dq = 1.1*q; \t\t\t\t#desigm discharge\n",
+ "S = 1./4000; \t\t\t\t#slope\n",
+ "B = array([5.5, 4.9, 4.55]); \t\t\t\t#Bed width\n",
+ "D = array([0.73, 0.79, 0.84]); \t\t\t\t#water depth\n",
+ "Vo = array([0.448, 0.472, 0.488]); \t\t\t\t#critical velocity\n",
+ "A = zeros(3)\n",
+ "V = zeros(3)\n",
+ "m = zeros(3)\n",
+ "print \"Bed width water depth area velocity critical velocity C.V.R\";\n",
+ "for i in range(3):\n",
+ " A[i] = B[i]*D[i]+D[i]**2/2;\n",
+ " V[i] = dq/A[i];\n",
+ " m[i] = V[i]/Vo[i];\n",
+ " A[i] = round(A[i]*100)/100;\n",
+ " V[i] = round(V[i]*1000)/1000;\n",
+ " m[i] = round(m[i]*100)/100;\n",
+ " print \"%.2f %.2f %.2f %.2f %.2f %.2f\"%(B[i],D[i],A[i],V[i],Vo[i],m[i]);\n",
+ "\n",
+ "B = 4.55;\n",
+ "D = 0.84;\n",
+ "print \"hence take B = %.2f .; D = %.2f m.\"%(B,D);\n",
+ "\t\t\t\t#at km 4\n",
+ "q = round(q*100)/100;\n",
+ "print \"discharge at 5 km = %.2f cumecs.\"%(q);\n",
+ "ca = 10000; \t\t\t\t#culturable area\n",
+ "Ar = Ir*ca; \t\t\t\t#area under rabi\n",
+ "q_r = Ar/qo_r;\n",
+ "l = 0.5 \t\t\t\t#total loss below 5 km\n",
+ "P = B+D*5**0.5; \t\t\t\t#wetted perimeter\n",
+ "l1 = P*1000*2/1000000; \t\t\t\t#loss between 5 km and 4km\n",
+ "l2 = l1+l;\n",
+ "q = q_r+l2;\n",
+ "dq = 1.1*q;\n",
+ "q = round(q*1000)/1000;\n",
+ "print \"discharge at 4 km = %.2f cumecs\"%(q);\n",
+ "print \"other discharge are calculated and are tabulated as:\";\n",
+ "x = linspace(1,5,6)\n",
+ "A1 = array([4800, 4200, 3600, 3300, 3000, 2400],dtype=float64);\n",
+ "A2 = array([2000, 1750, 1500, 1375, 1250, 1000],dtype=float64);\n",
+ "S = array([22.5, 22.5, 22.5, 24, 24, 25]);\n",
+ "B = array([5.5, 5.2, 4.85, 4.7, 4.55, 4.55]);\n",
+ "D = array([1.04, 1.007, 0.975, 0.945, 0.915, 0.840]);\n",
+ "dq = array([3.56, 3.17, 2.8, 2.6, 2.4, 2.02]);\n",
+ "V = array([0.570, 0.555, 0.538, 0.530, 0.521, 0.484]);\n",
+ "m = array([1.015, 1, 1, 1, 1, 0.992]);\n",
+ "print \"Below km area to irrigate rabi area to irrigate kharif bed slope bed width water depth design discharge velocity C.V.R\";\n",
+ "for i in range(6):\n",
+ " print \"%8i %i %i %.2f %.2f %.2f\\\n",
+ " %.2f %.2f %.2f\"%(x[i],A1[i],A2[i],S[i],B[i],D[i],dq[i],V[i],m[i]);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "discharge neede for rabi crop = 2.66 cumecs.\n",
+ "discharge neede for kharif crop = 2.51 cumecs.\n",
+ "outlet discharge factor adopted = 1805 hectares per cumecs.\n",
+ "Bed width water depth area velocity critical velocity C.V.R\n",
+ "5.50 0.73 4.28 0.47 0.45 1.05\n",
+ "4.90 0.79 4.18 0.48 0.47 1.02\n",
+ "4.55 0.84 4.17 0.48 0.49 0.99\n",
+ "hence take B = 4.55 .; D = 0.84 m.\n",
+ "discharge at 5 km = 1.83 cumecs.\n",
+ "discharge at 4 km = 2.17 cumecs\n",
+ "other discharge are calculated and are tabulated as:\n",
+ "Below km area to irrigate rabi area to irrigate kharif bed slope bed width water depth design discharge velocity C.V.R\n",
+ " 1 4800 2000 22.50 5.50 1.04 3.56 0.57 1.01\n",
+ " 1 4200 1750 22.50 5.20 1.01 3.17 0.56 1.00\n",
+ " 2 3600 1500 22.50 4.85 0.97 2.80 0.54 1.00\n",
+ " 3 3300 1375 24.00 4.70 0.94 2.60 0.53 1.00\n",
+ " 4 3000 1250 24.00 4.55 0.92 2.40 0.52 1.00\n",
+ " 5 2400 1000 25.00 4.55 0.84 2.02 0.48 0.99\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15.4 pg : 744"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import roots\n",
+ "\n",
+ "#Given\n",
+ "B = 5.; \t\t\t\t#bed width\n",
+ "t = 2.; \t\t\t\t#top width of banks\n",
+ "h = 2.92; \t\t\t\t#heigth of banks from bed\n",
+ "n = 1.5;\n",
+ "\n",
+ "#sectional area of digging = sectional area of two banks\n",
+ "#By+zy**2 = 2(h-y)+2n(h-y)**2\n",
+ "#substituting the values and on simplificatio we get\n",
+ "s = [1,-13.26,18.59]\n",
+ "y = roots(s)[1];\n",
+ "#from this we get y = 11.666556 and 1.5934436.\n",
+ "#taking y = 1.5934436;\n",
+ "y = round(y*10)/10;\n",
+ "\n",
+ "# Results\n",
+ "print \"economical depth of cutting = %.2f m.\"%(y);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "economical depth of cutting = 1.60 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch16_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch16_2.ipynb
new file mode 100644
index 00000000..59b5d071
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch16_2.ipynb
@@ -0,0 +1,804 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:be9a83eac81003b59bb1ec7327404f7c36e99fe14c8c14251b46829335a79c67"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 16 : WATERLOGGING AND CANAL LINING"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.1 pg : 764"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import roots\n",
+ "from sympy import acot\n",
+ "\n",
+ "#design a trapezoidal concrete lined channel\n",
+ "\n",
+ "#Given\n",
+ "Q = 100.; \t\t\t\t#discharge\n",
+ "S = 25./100000; \t\t\t\t#bed slope\n",
+ "N = 0.016; \t\t\t\t#rogsity coefficient\n",
+ "s = 1.5; \t\t\t\t#side slope\n",
+ "V = 1.5; \t\t\t\t#limiting velocity\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "#umath.sing manning's equation V = (R**2/3*S**1/2)/N;\n",
+ "R = (V*N/(S**0.5))**(1.5); \t\t\t\t#hydraulic mean depth\n",
+ "\n",
+ "#for s = 1.5;\n",
+ "theta = acot(1.5);\n",
+ "A = Q/V;\n",
+ "P = A/R;\n",
+ "#umath.sing equation of area and perimeter of trapezium\n",
+ "#perimeter of trapezium = b+2d(theta+cot(theta));\n",
+ "#area of trapezium = bd+d**2(theta+cot(theta));\n",
+ "#we get\n",
+ "y = [1,-17.1,31.9]\n",
+ "d = roots(y)[1];\n",
+ "#we get D = 14.968917 and 2.1310826.\n",
+ "#taking d = 2.1310826;\n",
+ "b = P-4.18*d;\n",
+ "b = round(b*100)/100;\n",
+ "d = round(d*100)/100;\n",
+ "print \"required bed width = %.2f m.\"%(b);\n",
+ "print \"required bed depth = %.2f m\"%(d);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "required bed width = 26.74 m.\n",
+ "required bed depth = 2.13 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.2 pg : 765"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#design a trapezoidal concrete lined channel\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 100.; \t\t\t\t#discharge\n",
+ "S = 25./100000; \t\t\t\t#bed slope\n",
+ "N = 0.016; \t\t\t\t#rogsity coefficient\n",
+ "s = 1.5; \t\t\t\t#side slope\n",
+ "r = 8.; \t\t\t\t#b/d ratio\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "#umath.sing manning equation V = (R**2/3*S**1/2)/N;\n",
+ "#Perimeter = A/R \n",
+ "#V = Q/A and on simplification we get\n",
+ "d = ((101/10.09)*(12.18/10.09)**(2./3))**(3./8);\n",
+ "b = r*d;\n",
+ "b = round(b);\n",
+ "d = round(d*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"required bed width = %.2f m.\"%(b);\n",
+ "print \"required bed depth = %.2f m\"%(d);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "required bed width = 20.00 m.\n",
+ "required bed depth = 2.49 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.3 pg : 766"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from sympy import acot\n",
+ "\n",
+ "#design a concrete lined channel\n",
+ "\n",
+ "#Given\n",
+ "Q = 45.; \t\t\t\t#discharge\n",
+ "S = 1./10000; \t\t\t\t#bed slope\n",
+ "s = 5./4; \t\t\t\t#side slope\n",
+ "N = 0.018; \t\t\t\t#rogosity coefficient(manning N)\n",
+ "\n",
+ "#channel is assumed to be of triangular section\n",
+ "theta = acot(s);\n",
+ "#umath.sing manning equation V = (R**2/3*S**1/2)/N;\n",
+ "#V = Q/A; \n",
+ "#perimeter of trapezium = b+2d(theta+cot(theta));\n",
+ "#area of trapezium = bd+d**2(theta+cot(theta));\n",
+ "#we get\n",
+ "d = (Q*2.86/1.925)**(3./8);\n",
+ "d = round(d*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"required depth of triangular channel = %.2f m\"%(d);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "required depth of triangular channel = 4.84 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.4 pg : 767"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#design a concrete lined channel of trapezoidal section\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 250.; \t\t\t\t#discharge\n",
+ "S = 1./6000; \t\t\t\t#bed slope\n",
+ "s = 1.5; \t\t\t\t#side slope\n",
+ "d = 3.; \t\t\t\t#limiting depth\n",
+ "N = 0.015; \t\t\t\t#rogosity coefficient\n",
+ "\n",
+ "#umath.sing Perimeter = A/R;\n",
+ "#perimeter of trapezium = b+2d(theta+cot(theta));\n",
+ "#area of trapezium = bd+d**2(theta+cot(theta));\n",
+ "#Q = A*V; and on simplification\n",
+ "#we get\n",
+ "#(3b+18.81)**5/3/(b+12.54)**2/3 = 290.47;\n",
+ "#solving it by trial and error method we get\n",
+ "b = 44.6;\n",
+ "\n",
+ "# Results\n",
+ "print \"required bed width = %.2f m.\"%(b);\n",
+ "print \"required bed depth = %i m\"%(d);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "required bed width = 44.60 m.\n",
+ "required bed depth = 3 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.5 pg : 767"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "H = 10.; \t\t\t\t#depth of impervious stratum from top soil\n",
+ "D = 1.8; \t\t\t\t#position of drain below top soil surface\n",
+ "Hw = 1.5; \t\t\t\t#depth of highest point of water\n",
+ "k = 1.e-4; \t\t\t\t#permeability consmath.tant\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "#math.since water has to be removed in 24 hours\n",
+ "b = H-Hw;\n",
+ "a = H-D;\n",
+ "L = (4*k*(b**2-a**2)*100*24*3600/0.8)**0.5;\n",
+ "\n",
+ "# Results\n",
+ "print \"drains should be spaced at %i m c/c.\"%(L);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "drains should be spaced at 147 m c/c.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.6 pg : 768"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "L = 30.; \t\t\t\t#spacing between drans\n",
+ "Q = 4.e-6; \t\t\t\t#discharge\n",
+ "a = 8.;\n",
+ "b = 8.3;\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "k = 1000000*Q*L/(4*(b**2-a**2));\n",
+ "k = round(k*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"permeability coefficient = %.2fD-6 m/sec.\"%(k);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "permeability coefficient = 6.13D-6 m/sec.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.7 pg : 768"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "L = 50.; \t\t\t\t#spacing between drains\n",
+ "k = 1.e-5; \t\t\t\t#permeability coefficient\n",
+ "a = 10.;\n",
+ "b = 10.3;\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "Q = 4*k*(b**2-a**2)/L;\n",
+ "Pav = Q*24*3600*100*100/L;\n",
+ "\n",
+ "# Results\n",
+ "print \"annual average rainfall = %i cm\"%(Pav);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "annual average rainfall = 84 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.8 pg : 768"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "r1 = 2; \t\t\t\t#ka/kb\n",
+ "r2 = 1./1.5; \t\t\t\t#La/Lb\n",
+ "r3 = 5./6; \t\t\t\t#(b**2-a**2)a/((b**2-a**2)b)\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "Rq = r1*r3/r2;\n",
+ "Rp = Rq/r2;\n",
+ "\n",
+ "# Results\n",
+ "print \"ratio of discharge at A and B = %.2f.\"%(Rq);\n",
+ "print \"ratio of average rainfall at A and B = %.2f.\"%(Rp);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ratio of discharge at A and B = 2.50.\n",
+ "ratio of average rainfall at A and B = 3.75.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.9 pg : 775"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "#decide whether it is economically feasible to provide canal lining\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "li = 2.5; \t\t\t\t#seepage loss for lined channel\n",
+ "p1 = 25.; \t\t\t\t#wetted perimeter for lined channel\n",
+ "t = 12.; \t\t\t\t#thickness of concrete lining\n",
+ "lf = 0.02; \t\t\t\t#seepage loss for unlined channel\n",
+ "p2 = 20.; \t\t\t\t#wetted perimeter for unlined channel\n",
+ "\n",
+ "#assume 1 km length of canal\n",
+ "#annual benifit\n",
+ "\n",
+ "\t\t\t\t#(1).seepage\n",
+ "A1 = p1*1000; \t\t\t\t#area of wetted perimeter\n",
+ "li = li*p1/1000; \t\t\t\t#seepage loss\n",
+ "A2 = p2*1000; \t\t\t\t#area of wetted perimmeter for unlined channel\n",
+ "lf = p2*lf/1000; \t\t\t\t#seepage loss for unlined channel\n",
+ "s = li-lf; \t\t\t\t#saving in water loss\n",
+ "a1 = s*p1*100000; \t\t\t\t#annual revenue saved\n",
+ "\n",
+ "\t\t\t\t#(2)maintainence\n",
+ "a2 = 0.4*25000; \t\t\t\t#saving in maintainance math.cost\n",
+ "ts = a1+a2; \t\t\t\t#total annual benifit\n",
+ "\n",
+ "\t\t\t\t#annual math.cost\n",
+ "A1 = p2*1000; \t\t\t\t#area of lining for unlinrd canal\n",
+ "C = 100*A1; \t\t\t\t#math.cost of lining\n",
+ "\t\t\t\t#interest rate is 6%\n",
+ "i = 0.06;\n",
+ "N = 50;\n",
+ "a = (C*i*(i+1)**N)/((1+i)**N-1); \t\t\t\t#annual math.cost of lining or capital recovery factor\n",
+ "bcr = ts/a; \t\t\t\t#benifit math.cost ratio\n",
+ "bcr = round(bcr*1000)/1000;\n",
+ "print \"Benifit math.cost ratio = %.2f.\"%(bcr);\n",
+ "\t\t\t\t#as bcr>1\n",
+ "print \" ;Since it is more than 1.Hence, it is economically justifiable. \";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Benifit math.cost ratio = 1.30.\n",
+ " ;Since it is more than 1.Hence, it is economically justifiable. \n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.10 pg : 776"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Ecd = 20; \t\t\t\t#electrical conductivity of drainage water\n",
+ "Eci = 1.5; \t\t\t\t#m mho/cm\n",
+ "Dc = 55.5; \t\t\t\t#consumptive use\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "Lr = Eci/Ecd;\n",
+ "D = Dc/(1-Lr);\n",
+ "\n",
+ "# Results\n",
+ "print \"required depth of water to be applied = %i mm.\"%(D);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "required depth of water to be applied = 60 mm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.11 pg : 776"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Eci = 1.4; \t\t\t\t# m mho/cm\n",
+ "Ece = 11.; \t\t\t\t#saturated extract of soil\n",
+ "Dc = 85.; \t\t\t\t#consumptive use requirement of crop\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "#let us assume Ecd = 2Ece\n",
+ "Lr = Eci/(2*Ece);\n",
+ "Di = Dc/(1-Lr);\n",
+ "Di = round(Di*10)/10;\n",
+ "\n",
+ "\n",
+ "# Results\n",
+ "print \"required depth of water to be applied = %.2f mm.\"%(Di);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "required depth of water to be applied = 90.80 mm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.12 pg : 776"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "#percentage of earth work is saved in lined section\n",
+ "\n",
+ "#Given\n",
+ "s = 1.5; \t\t\t\t#side slope\n",
+ "Q = 15.; \t\t\t\t#discharge\n",
+ "S = 1./4000; \t\t\t\t#bed slope\n",
+ "Nl = 0.014; \t\t\t\t#manning n for lined channel\n",
+ "Nu = 0.028; \t\t\t\t#manning n for ulined channel \n",
+ "fb = 0.75; \t\t\t\t#free board\n",
+ "\n",
+ "#considering the perimeter of trapezoidal section\n",
+ "#taking minimum perimeter for given area\n",
+ "#i.e dP/dD = 0\n",
+ "#we get\n",
+ "#A = 2.1D**2; R = D/2; and P = 4.2D\n",
+ "\n",
+ "#for linrd channel\n",
+ "#Q = AR**(2/3)*S**0.5\n",
+ "#substituting above values we get\n",
+ "D = (10.0396)**(3./8);\n",
+ "B = 0.6*D;\n",
+ "R = D/2;\n",
+ "tau = 9.81*R*S*1000;\n",
+ "tau = round(tau*1000)/1000;\n",
+ "print \"for lined canal:\";\n",
+ "print \"average boundary shear stress = %.2f N/square m.\"%(tau);\n",
+ "Dc = D+fb; \t\t\t\t#total depth of cutting\n",
+ "A1 = (B+1.5*Dc)*Dc;\n",
+ "\n",
+ "#for unlined channel\n",
+ "#Q = AR**(2/3)*S**0.5\n",
+ "#substituting above values we get\n",
+ "D = 3.08;\n",
+ "B = 0.6*D;\n",
+ "R = D/2;\n",
+ "tau = 9.81*R*S*1000;\n",
+ "tau = round(tau*100)/100;\n",
+ "print \"for unlined canal:\";\n",
+ "print \"average boundary shear stress = %.2f N/square m.\"%(tau);\n",
+ "Dc = D+fb; \t\t\t\t#total depth of cutting\n",
+ "A2 = (B+1.5*Dc)*Dc;\n",
+ "per = (A2-A1)*100/A2; \n",
+ "per = round(per*100)/100;\n",
+ "print \"percent saving of earth = %.2f percent.\"%(per);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "for lined canal:\n",
+ "average boundary shear stress = 2.91 N/square m.\n",
+ "for unlined canal:\n",
+ "average boundary shear stress = 3.78 N/square m.\n",
+ "percent saving of earth = 34.32 percent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.13 pg : 778"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import roots\n",
+ "\n",
+ "#design a lined canal\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 100.; \t\t\t\t#discharge\n",
+ "S = 1./2500; \t\t\t\t#bed slope\n",
+ "V = 2.; \t\t\t\t#maximum permissible velocity\n",
+ "n = 0.013; \t\t\t\t#manning n\n",
+ "s = 1.25; \t\t\t\t#side slope\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "A = Q/V;\n",
+ "#from manning formula V = (R**2/3*S**1/2)/N;\n",
+ "R = (V*n/S**0.5)**1.5;\n",
+ "P = A/R;\n",
+ "\n",
+ "#now umath.sing the equation of area and perimeter of trapezoid\n",
+ "#area = D(B+2.5D)\n",
+ "#perimeter = B+3.2D;\n",
+ "#we get\n",
+ "y = [1.95,-33.73,50]\n",
+ "D = roots(y)[1];\n",
+ "#we get D = 15.660087 and 1.6373489\n",
+ "#taking D = 1.6373489;\n",
+ "B = P-3.2*D;\n",
+ "B = round(B*10)/10;\n",
+ "D = round(D*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"required bed width = %.2f m.\"%(B);\n",
+ "print \"required bed depth = %.2f m\"%(D);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "required bed width = 28.50 m.\n",
+ "required bed depth = 1.64 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.14 pg : 778"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "B = 5.; \t\t\t\t#bed width\n",
+ "D = 2.; \t\t\t\t#bed depth\n",
+ "S = 1./1600; \t\t\t\t#bed slope\n",
+ "n = 0.015; \t\t\t\t#manning n\n",
+ "\n",
+ "\n",
+ "# Calculations and Results\n",
+ "A = B+2*D; \t\t\t\t#area of lining\n",
+ "#let B1 and D1 be new width and depth of bed\n",
+ "#for getting maximum discharge we diffrentiate Q and equating it to zero\n",
+ "#Q = S**0.5*B1D1**5/3/n\n",
+ "#we get\n",
+ "D1 = 45./16;\n",
+ "B1 = 9-2*D1;\n",
+ "Q1 = S**0.5*B1*D1**5/3/n;\n",
+ "D1 = round(D1*10000)/10000;\n",
+ "print \"new width of bed = %.2f m.\"%(B1);\n",
+ "print \"new depth of bed = %.2f m.\"%(D1);\n",
+ "print \" maximum discharge = %.2f cumec.\"%(Q1);\n",
+ "R = D;\n",
+ "V = R**(2./3)*S**0.5/n;\n",
+ "F = V/(9.81*D)**0.5; \t\t\t\t#froud number\n",
+ "R = D1;\n",
+ "V = R**(2./3)*S**0.5/n;\n",
+ "F = V/(9.81*D1)**0.5; \t\t\t\t#froud number\n",
+ "print \"Froud number is less than 1 in both case.Hence flow doesnot change from sub-critical to super critical.\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "new width of bed = 3.38 m.\n",
+ "new depth of bed = 2.81 m.\n",
+ " maximum discharge = 329.96 cumec.\n",
+ "Froud number is less than 1 in both case.Hence flow doesnot change from sub-critical to super critical.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.15 pg : 779"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from sympy import acot\n",
+ "\n",
+ "#area to be irrigated\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "B = 5.; \t\t\t\t#bed width\n",
+ "D = 2.5; \t\t\t\t#bed depth\n",
+ "s = 1.5; \t\t\t\t#side slope\n",
+ "S = 1./1000; \t\t\t\t#bed slope\n",
+ "n = 0.016; \t\t\t\t#manning n\n",
+ "k = 10.; \t\t\t\t#kor period\n",
+ "d = 150.; \t\t\t\t#field irrigation requirement \n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "theta = acot(s);\n",
+ "A = B*D+D**2*(theta+1/math.tan(theta));\n",
+ "P = B+2*D*(theta+1/math.tan(theta));\n",
+ "R = A/P;\n",
+ "Q = A*R**(2./3)*S**0.5/n;\n",
+ "V = Q*k*24*3600; \t\t\t\t#volum of water supply by channel\n",
+ "A = V*10/(d*10000);\n",
+ "Q = round(Q*100)/100;\n",
+ "A = round(A)*100;\n",
+ "\n",
+ "# Results\n",
+ "print \"maximum carrying capacity of canal = %.2f cumec.\"%(Q);\n",
+ "print \"Area to be irrigated = %.2f hectares.\"%(A);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum carrying capacity of canal = 70.65 cumec.\n",
+ "Area to be irrigated = 40700.00 hectares.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch17_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch17_2.ipynb
new file mode 100644
index 00000000..4cb73dad
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch17_2.ipynb
@@ -0,0 +1,221 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:06ec184185f2d3771e5e9a8334a24a140307b0ca6ee46117ed9968f716f623ca"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 17 : CANAL OUTLETS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.1 pg : 788"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "D = 100.0; \t\t\t\t#F.S.L of distributory\n",
+ "wc = 99.90; \t\t\t\t#F.S.L of water course\n",
+ "L = 9.; \t\t\t\t#length of pipe\n",
+ "d = 20.; \t\t\t\t#diameter of pipe\n",
+ "f = 0.005; \t\t\t\t#coefficient of friction\n",
+ "g = 9.81; \t\t\t\t#acceleration due to gravity\n",
+ "\n",
+ "# Calculations\n",
+ "H = D-wc; \t\t\t\t#working head\n",
+ "C = (d/((1.5*d/(400*f)+L)*f))**0.5/20;\n",
+ "A = math.pi*d**2/(4*10000);\n",
+ "q = C*A*(2*g*H)**0.5;\n",
+ "q = round(q*10000)/10000;\n",
+ "\n",
+ "# Results\n",
+ "print \"discharge through the outlet = %.5f cumec.\"%(q);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "discharge through the outlet = 0.02840 cumec.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.2 pg : 788"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#design a submerged pipe\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "q = 0.04; \t\t\t\t#discharge through outlet\n",
+ "D = 100.0; \t\t\t\t#F.S.L of distributing canal\n",
+ "wc = 99.90; \t\t\t\t#F.S.L of water course\n",
+ "dep = 1.1; \t\t\t\t#full supply depth distributing canal\n",
+ "C = 0.7; \t\t\t\t#average value of coefficient of discharge\n",
+ "g = 9.81; \t\t\t\t#acceleration due to gravity\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "H = D-wc; \t\t\t\t#available head\n",
+ "A = q/(C*(2*g*H)**0.5);\n",
+ "d = (4*A/math.pi)**0.5*100;\n",
+ "d = round(d*10)/10;\n",
+ "\n",
+ "# Results\n",
+ "print \"diameter of pipe required = %.2f cm.\"%(d);\n",
+ "print \"use pipe of diameter 25 cm.\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "diameter of pipe required = 22.80 cm.\n",
+ "use pipe of diameter 25 cm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.3 pg : 788"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "#design submerged pipe\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "q = 0.04; \t\t\t\t#discharge through outlet\n",
+ "D = 100.0; \t\t\t\t#F.S.L of distributing canal\n",
+ "wc = 99.90; \t\t\t\t#F.S.L of water course\n",
+ "dep = 1.1; \t\t\t\t#full supply depth distributing canal\n",
+ "f = 0.01; \t\t\t\t#coefficient of friction\n",
+ "g = 9.81; \t\t\t\t#acceleration due to gravity\n",
+ "L = 9.; \t\t\t\t#Length of pipe\n",
+ "\n",
+ "H = D-wc; \t\t\t\t#working head\n",
+ "\n",
+ "# Calculations\n",
+ "#first trial\n",
+ "#taking d = 22.8 cm\n",
+ "d = 22.8;\n",
+ "C = (d/((1.5*d/(400*f)+L)*f))**0.5/20;\n",
+ "A = q/(C*(2*g*H)**0.5);\n",
+ "d = (4*A/math.pi)**0.5*100;\n",
+ "\t\t\t\t#second trial\n",
+ "C = (d/((1.5*d/(400*f)+L)*f))**0.5/20;\n",
+ "A = q/(C*(2*g*H)**0.5);\n",
+ "d = (4*A/math.pi)**0.5*100;\n",
+ "d = round(d*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"diameter of pipe required = %.2f cm.\"%(d);\n",
+ "print \"provide diameter of pipe as 25 cm.\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "diameter of pipe required = 24.94 cm.\n",
+ "provide diameter of pipe as 25 cm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.4 pg : 795"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "#design an open flume outlet\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 0.06; \t\t\t\t#discharge\n",
+ "D = 0.85; \t\t\t\t#full supply depth\n",
+ "Hw = 15.; \t\t\t\t#available working head\n",
+ "Bt = 7.;\n",
+ "C = 1.6; \t\t\t\t#let us choose\n",
+ "\n",
+ "# Calculations and Results\n",
+ "H = (Q*100/(C*Bt))**(2./3);\n",
+ "mh = 0.2*H; \t\t\t\t#minimum modular head\n",
+ "mh = round(mh*1000)/1000;\n",
+ "print \"minimum modular head = %.2f m. < available working head.hemce,design is safe.\"%(mh);\n",
+ "o = H/D;\n",
+ "o = round(o*1000)/1000;\n",
+ "print \"setting of outlet = %.2f. <0.9.hence,outlet will work as hyper propotional outlet.\"%(o);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "minimum modular head = 0.13 m. < available working head.hemce,design is safe.\n",
+ "setting of outlet = 0.78. <0.9.hence,outlet will work as hyper propotional outlet.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch18_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch18_2.ipynb
new file mode 100644
index 00000000..11ccf93e
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch18_2.ipynb
@@ -0,0 +1,733 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:9d6614c4fb702767c601f4bf4c9d2e616fc5722613b10aacef812ff7d5ad3183"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 18 : CANAL REGULATION WORKS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.1 pg : 811"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "#design Sarda type fall\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 40.; \t\t\t\t#full supply discharge\n",
+ "sl_u = 218.3; \t\t\t\t#supply level at upstream\n",
+ "sl_d = 216.8; \t\t\t\t#supply level at downstream\n",
+ "D = 1.8; \t\t\t\t#suplly depth\n",
+ "L = 26.; \t\t\t\t#bed width\n",
+ "bl_u = 216.5; \t\t\t\t#bed level upstream\n",
+ "bl_d = 215.; \t\t\t\t#bed level downstream\n",
+ "drop = 1.5;\n",
+ "\n",
+ "#from the eqauation; Q = 1.99LH**1.5*(H/B)**(1/6);\n",
+ "#B = 0.55*(H+d)**0.5;\n",
+ "#H+d = drop+D;\n",
+ "#we get\n",
+ "H = (0.774)**0.6;\n",
+ "d = 3.3-H;\n",
+ "Hc = D-H;\n",
+ "d = round(d*100)/100;\n",
+ "H = round(H*100)/100;\n",
+ "Hc = round(Hc*100)/100;\n",
+ "print \"H = %.2f m.d = %.2f m.\"%(H,d);\n",
+ "print \"crest height above bed = %.2f m.\"%(Hc);\n",
+ "\n",
+ "\t\t\t\t#adopt trapezoidal crest\n",
+ "B = 1; \t\t\t\t#top width\n",
+ "print \"D/S batter = 1:3; U/S batter = 1:8.\";\n",
+ "Va = Q/((27+D)*D);\n",
+ "vh = Va**2/(2*9.81);\n",
+ "tel_up = sl_u+vh;\n",
+ "crest = sl_u-H;\n",
+ "E = sl_u-crest;\n",
+ "print \"R.L of crest = %.2f m.\"%(crest);\n",
+ "print 'E = %.2f m.'%(E);\n",
+ "\t\t\t\t#design of cistern\n",
+ "x = (E*drop)**(2/3)/4; \t\t\t\t#depth of cistern\n",
+ "lc = 5*(E*drop)**0.5; \t\t\t\t#length of cistern\n",
+ "cb = bl_d-x;\n",
+ "x = round(x*100)/100;\n",
+ "cb = round(cb*1000)/1000;\n",
+ "lc = round(lc*10)/10;\n",
+ "print \"depth of cistern = %.2f m.\"%(x);\n",
+ "print \"length of cistern = %.2f m.\"%(lc);\n",
+ "print \"R.L of bed of cistern = %.2f m.\"%(cb);\n",
+ "print \"keep cistern at R.L 214.69.\";\n",
+ "\t\t\t\t#design of impervious floor\n",
+ "Hs = 2.44; \t\t\t\t#seepage head\n",
+ "c = 8.; \t\t\t\t#Bligh's coefficient\n",
+ "li = Hs*c;\n",
+ "d1 = 1;d2 = 1.6;\n",
+ "vl = 2*(d1+d2);\n",
+ "lh = li-vl;\n",
+ "print \"design of impervious floor:\";\n",
+ "print \"provide upstream cut-off = %i m.; downstream cut-off = %.2f m.\"%(d1,d2);\n",
+ "print \"length of horizontal impervious floor = %.2f m.\"%(lh);\n",
+ "print \"provide 15 m length impervious floor.\";\n",
+ "ld = 2*(D+1.2)+drop;\n",
+ "print \"minimum length of impervious floor to the d/s of toe of crest wall = %.2f m.\"%(ld);\n",
+ "print \"provide ld = 8 m.\";\n",
+ "bl = 15-8;\n",
+ "print \"the balance of the length %i m is to be provided under and u/s of the crest.\"%(bl);\n",
+ "\n",
+ "tcl = 15+2*(1+16);\n",
+ "print \"uplift pressure is counter balanced by weigth of water. hence provide thickness of 0.4 m.\";\n",
+ "rho = 2.24; \n",
+ "static = 2.44*(1-0.446)+x;\n",
+ "t = static/(rho-1);\n",
+ "t = round(t*100)/100;\n",
+ "print \"for other points; thickness required = %.2f m.\"%(t);\n",
+ "print \"provide thickness of 1.40 m.\";\n",
+ "print \"at downstream end of floor provide thickness of 0.6 m overlaid by 0.2 m brick pitching.\";\n",
+ "\n",
+ "n = d2/(Hs*5); \t\t\t\t#n = 1/math.pi*(lambda)**0.5\n",
+ "\t\t\t\t#from khosla exit curve we get\n",
+ "alpha = 10.5;\n",
+ "lambda1 = (1/(math.pi*n))**2;\n",
+ "alpha = ((2*lambda1-1)**2-1)**0.5;\n",
+ "b = alpha*d2;\n",
+ "b = round(b*100)/100;\n",
+ "print \"checking of floor thickness by khosla theory:\";\n",
+ "print \"length of floor provided = %.2f m. > length by Bligh theory.\"%(b);\n",
+ "b = 15;\n",
+ "d2 = 1.8;\n",
+ "alpha = b/d2;\n",
+ "n = 0.145;\n",
+ "Ge = Hs*n/d2;\n",
+ "Ge = round(Ge*10)/10;\n",
+ "print \"exit gradient after increase in depth cut-off = %.2f. which is in permissible limit\"%(Ge);\n",
+ "print 'provide depth cut-off to 1.8 m.';\n",
+ "\t\t\t\t#calculation of pressure\n",
+ "print \"calculation of pressure:\";\n",
+ "print \"U/S cut-off:\";\n",
+ "d1 = 1.;\n",
+ "b = 15.;\n",
+ "alpha_ = d1/b;\n",
+ "fic1 = 100-24;\n",
+ "fid1 = 100-17;\n",
+ "t = 0.4;\n",
+ "fic1 = fic1+(fid1-fic1)*t/d1;\n",
+ "print \"corrected fic1 = %.2f percent.\"%(fic1);\n",
+ "print \"D/S cut-off wall:\";\n",
+ "d2 = 1.8;\n",
+ "b = 15.;\n",
+ "alpha_ = d1/b;\n",
+ "fie2 = 31.;\n",
+ "fid2 = 21.5;\n",
+ "t = 0.6;\n",
+ "fie2 = fie2-(fie2-fid2)*t/1.8;\n",
+ "fie2 = round(fie2*10)/10;\n",
+ "print \"correcte fie2 = %.2f percent.\"%(fie2);\n",
+ "\t\t\t\t#calculation of thickness\n",
+ "print \"provide a minimum thickness of 0.4 m for u/s floor.\";\n",
+ "pre = fie2+(fic1-fie2)*8/b;\n",
+ "static = pre*Hs/100+x;\n",
+ "t = static/(rho-1);\n",
+ "t = round(t*100)/100;\n",
+ "print \"thickness at d/s toe of crest = %.2f m.\"%(t);\n",
+ "print \"provide thickness of 1.4 m thick concrete overlaid by 0.2 m brick pitching.\";\n",
+ "pre = fie2+(fic1-fie2)*5/b;\n",
+ "static = pre*Hs/100+x;\n",
+ "t = static/(rho-1);\n",
+ "t = round(t*100)/100;\n",
+ "print \"thickness at 3 m from d/s toe of crest = %.2f m.\"%(t);\n",
+ "print \"provide thickness of 1.2 m thick concrete overlaid by 0.2 m brick pitching.\";\n",
+ "pre = fie2+(fic1-fie2)*2/b;\n",
+ "static = pre*Hs/100; \t\t\t\t#calculation is wrong in book\n",
+ "t = static/(rho-1);\n",
+ "t = round(t*100)/100;\n",
+ "print \"thickness at 6m from d/s toe of crest = %.2f m.\"%(t);\n",
+ "print \"provide thickness of 0.7 m thick concrete overlaid by 0.2 m brick pitching.\";\n",
+ "\t\t\t\t#design of downstream wings\n",
+ "wing = 6*(E*drop)**0.5;\n",
+ "hw = D+0.5;\n",
+ "print \"heigth of top of downstream wings above the bed = %.2f m.\"%(hw);\n",
+ "projec = hw*3;\n",
+ "print \"length of warped wing measured along centre line of canal = %.2f m.\"%(projec);\n",
+ "\t\t\t\t#downstream pitching\n",
+ "l = 9+2*1.5;\n",
+ "print \"length of bed pitching = %.2f m.\"%(l);\n",
+ "print \"length of sloping pitching = 7 m.length of horizontal pitching = 6 m.\";\n",
+ "print \"provide one toe wall of 1 m depth and 0.4 m width.\";\n",
+ "print \"side pitching is curtailed at 45 degree from the end of bed pitching \\\n",
+ "in plan.supprot the side pitching on toe wall 0.4 m thick and 1 m deep. \";\n",
+ "\t\t\t\t#energy dissipators\n",
+ "q = Q/L;\n",
+ "dc = (q**2/9.81)**(1./3);\n",
+ "print \"size and position of friction blocks:\";\n",
+ "L = 2*dc;\n",
+ "w = dc;\n",
+ "h = dc;\n",
+ "di = 1.5*dc;\n",
+ "L = round(L*10)/10;\n",
+ "w = round(w*10)/10;\n",
+ "h = round(h*10)/10;\n",
+ "di = round(di);\n",
+ "print \"length of block = %.2f m.width of block = %.2f m.height of block = %.2f \\\n",
+ "m.dismath.tance from toe of crest = %.2f m.\"%(L,w,h,di);\n",
+ "print \"provide two rows staggered ata dismath.tance of 1 m from toe of crest.\";\n",
+ "print \"size and position of cube blocks:\";\n",
+ "L = D/10;\n",
+ "w = D/10;\n",
+ "h = w;\n",
+ "L = round(L*10)/10;\n",
+ "w = round(w*10)/10;\n",
+ "h = round(h*10)/10;\n",
+ "print \"length of block = %.2f m.width of block = %.2f m.height of block = %.2f m.\"%(L,w,h);\n",
+ "print \"provide two rows staggered at the end of impervious floor.\";\n",
+ "\t\t\t\t#u/s approach\n",
+ "r = 6*H;\n",
+ "print \"provide wing wall segmental with 5 m radius subtending angle of 60 degree at the centre.\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "H = 0.86 m.d = 2.44 m.\n",
+ "crest height above bed = 0.94 m.\n",
+ "D/S batter = 1:3; U/S batter = 1:8.\n",
+ "R.L of crest = 217.44 m.\n",
+ "E = 0.86 m.\n",
+ "depth of cistern = 0.25 m.\n",
+ "length of cistern = 5.70 m.\n",
+ "R.L of bed of cistern = 214.75 m.\n",
+ "keep cistern at R.L 214.69.\n",
+ "design of impervious floor:\n",
+ "provide upstream cut-off = 1 m.; downstream cut-off = 1.60 m.\n",
+ "length of horizontal impervious floor = 14.32 m.\n",
+ "provide 15 m length impervious floor.\n",
+ "minimum length of impervious floor to the d/s of toe of crest wall = 7.50 m.\n",
+ "provide ld = 8 m.\n",
+ "the balance of the length 7 m is to be provided under and u/s of the crest.\n",
+ "uplift pressure is counter balanced by weigth of water. hence provide thickness of 0.4 m.\n",
+ "for other points; thickness required = 1.29 m.\n",
+ "provide thickness of 1.40 m.\n",
+ "at downstream end of floor provide thickness of 0.6 m overlaid by 0.2 m brick pitching.\n",
+ "checking of floor thickness by khosla theory:\n",
+ "length of floor provided = 17.18 m. > length by Bligh theory.\n",
+ "exit gradient after increase in depth cut-off = 0.20. which is in permissible limit\n",
+ "provide depth cut-off to 1.8 m.\n",
+ "calculation of pressure:\n",
+ "U/S cut-off:\n",
+ "corrected fic1 = 78.80 percent.\n",
+ "D/S cut-off wall:\n",
+ "correcte fie2 = 27.80 percent.\n",
+ "provide a minimum thickness of 0.4 m for u/s floor.\n",
+ "thickness at d/s toe of crest = 1.28 m.\n",
+ "provide thickness of 1.4 m thick concrete overlaid by 0.2 m brick pitching.\n",
+ "thickness at 3 m from d/s toe of crest = 1.08 m.\n",
+ "provide thickness of 1.2 m thick concrete overlaid by 0.2 m brick pitching.\n",
+ "thickness at 6m from d/s toe of crest = 0.68 m.\n",
+ "provide thickness of 0.7 m thick concrete overlaid by 0.2 m brick pitching.\n",
+ "heigth of top of downstream wings above the bed = 2.30 m.\n",
+ "length of warped wing measured along centre line of canal = 6.90 m.\n",
+ "length of bed pitching = 12.00 m.\n",
+ "length of sloping pitching = 7 m.length of horizontal pitching = 6 m.\n",
+ "provide one toe wall of 1 m depth and 0.4 m width.\n",
+ "side pitching is curtailed at 45 degree from the end of bed pitching in plan.supprot the side pitching on toe wall 0.4 m thick and 1 m deep. \n",
+ "size and position of friction blocks:\n",
+ "length of block = 1.20 m.width of block = 0.60 m.height of block = 0.60 m.dismath.tance from toe of crest = 1.00 m.\n",
+ "provide two rows staggered ata dismath.tance of 1 m from toe of crest.\n",
+ "size and position of cube blocks:\n",
+ "length of block = 0.20 m.width of block = 0.20 m.height of block = 0.20 m.\n",
+ "provide two rows staggered at the end of impervious floor.\n",
+ "provide wing wall segmental with 5 m radius subtending angle of 60 degree at the centre.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.2 pg : 820"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "#design an unflumed straight glacis non-meter fall\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 40.; \t\t\t\t#full supply discharge\n",
+ "sl_u = 218.3; \t\t\t\t#supply level at upstream\n",
+ "sl_d = 216.8; \t\t\t\t#supply level at downstream\n",
+ "D = 1.8; \t\t\t\t#suplly depth\n",
+ "L = 26.; \t\t\t\t#bed width\n",
+ "bl_u = 216.5; \t\t\t\t#bed level upstream\n",
+ "bl_d = 215.; \t\t\t\t#bed level downstream\n",
+ "drop = 1.5;\n",
+ "Ge = 1./6; \t\t\t\t#permissible exit gradient\n",
+ "\n",
+ "\t\t\t\t#design of crest\n",
+ "print \"design of crest:\";\n",
+ "E = (Q/(1.84*L))**(2/3);\n",
+ "V = Q/((L+D)*D);\n",
+ "vh = V**2/(2*9.81);\n",
+ "tel_up = sl_u+vh;\n",
+ "cl = tel_up-E;\n",
+ "w = 2*E/3;\n",
+ "w = round(w*10)/10;\n",
+ "print \"length of crest = %.2f m.\"%(L);\n",
+ "print \"width of crest = %.2f m.\"%(w);\n",
+ "\t\t\t\t#design of cistern\n",
+ "q = Q/L;\n",
+ "Hl = 1.5;\n",
+ "\t\t\t\t#from blench curve\n",
+ "Ef2 = 1.44;\n",
+ "cistern = sl_d+0.03-1.25*Ef2;\n",
+ "print \"R.L of cistern = %.2f m. > d/s bed level.\"%(cistern);\n",
+ "print \"keep R.L of cistern at 214.5 m.\";\n",
+ "l = 6*Ef2;\n",
+ "print \"length of cistern = %.2f m.\"%(l);\n",
+ "print \"provide cistern of 9 m length \";\n",
+ "d = bl_d-214.5;\n",
+ "print \"depth of cistern = %.2f m.\"%(d);\n",
+ "\n",
+ "\t\t\t\t#design of impervious floor\n",
+ "d1 = D/3;\n",
+ "print \"design of impervious floor:\";\n",
+ "print \"provide 0.4 m wide and 1 m deep curtain wall at u/s.\";\n",
+ "d2 = D/2;\n",
+ "print \"provide 0.4 m wide and 1 m deep curtain wall at d/s.the curtain wall will project the above the d/s bed by 0.18 m.\";\n",
+ "Hs = cl-bl_d;\n",
+ "d2 = 1;\n",
+ "n = d2*Ge/Hs; \t\t\t\t#n = 1/(math.pi*(lambda)**0.5)\n",
+ "\t\t\t\t#from khosla exit curves we get\n",
+ "alpha = 40;\n",
+ "lambda1 = (1/(math.pi*n))**2;\n",
+ "alpha = ((2*lambda1-1)**2-1)**0.5;\n",
+ "b = alpha*d2;\n",
+ "\t\t\t\t#math.since length is to excessive\n",
+ "d2 = 2;\n",
+ "n = d2*Ge/Hs; \t\t\t\t#n = 1/(math.pi*(lambda)**0.5)\n",
+ "\t\t\t\t#from khosla exit curves we get\n",
+ "alpha = 10;\n",
+ "lambda1 = (1/(math.pi*n))**2;\n",
+ "alpha = ((2*lambda1-1)**2-1)**0.5;\n",
+ "b = alpha*d2+1;\n",
+ "print \"total length = %i m.length of cistern = 9 m.length of d/s glacis = 5.88\\\n",
+ " m.width of crest = 0.6 m.length of u/s glacis = 0.47 m.balance to be provided to u/s of the u/s glacis = 4.05 m.\"%(b);\n",
+ "\n",
+ "\t\t\t\t#pressure calculations\n",
+ "print \"pressure calculations:\";\n",
+ "print \"upstream curtain wall:\";\n",
+ "d1 = 1.;\n",
+ "b = 20;\n",
+ "alpha_ = d1/b;\n",
+ "t = 0.3;\n",
+ "fic1 = 100-22;\n",
+ "fid1 = 100-15;\n",
+ "corec = (fid1-fic1)*t/d1\n",
+ "fic1 = fic1+corec;\n",
+ "print \"corrected fi_c1 = %.2f percent.\"%(fic1);\n",
+ "print \"downstream curtain wall:\";\n",
+ "d2 = 2.;b = 20;\n",
+ "alpha_ = d2/b;\n",
+ "t = 0.5;\n",
+ "fie = 29.;\n",
+ "fid = 21;\n",
+ "corec = (fie-fid)*t/d2\n",
+ "fie = fie-corec;\n",
+ "print \"corrected fi_e = %.2f percent.\"%(fie);\n",
+ "print \"toe of glacis:\";\n",
+ "\t\t\t\t#assuming linear variation of pressure\n",
+ "p = fie+(80-fie)*9/20;\n",
+ "print \"pressure at downstream of the glacis = %.2f percent.\"%(p);\n",
+ "\n",
+ "\t\t\t\t#floor thickness\n",
+ "rho = 2.24;\n",
+ "print \"floor thickness:provide minimum thickness of 0.3 m at the u/s floor.\";\n",
+ "static = p*2.44/100+(bl_d-214.5);\n",
+ "t = static/(rho-1);\n",
+ "t = round(t*100)/100;\n",
+ "print \"floor thickness required at toe of glacis = %.2f m.provide 1.5 m thick floor for length of 3 m.\"%(t);\n",
+ "p = fie+(80-fie)*6/20;\n",
+ "static = p*2.44/100+(bl_d-214.5);\n",
+ "t = static/(rho-1);\n",
+ "t = round(t*100)/100;\n",
+ "print \"floor thickness required at 3m from toe of glacis = %.2f m.provide \\\n",
+ "1.3 m thick floor from 3 m to 6.5 m from toe of glacis.\"%(t);\n",
+ "t = 0.27*2.44/(rho-1);\n",
+ "t = round(t*100)/100;\n",
+ "print \"thickness of d/s end of cistern = %.2f m.provide thickness of 0.6 m at d/s end of floor.\"%(t);\n",
+ "\n",
+ "\t\t\t\t#design of d/s protection\n",
+ "print \"no bed protection is needed as deflector wall is provided.\";\n",
+ "sp = 3*D;\n",
+ "print \"length of side protection = %.2f m.provide 5.5 m length of 20 cm\\\n",
+ " thick brick pitching beyond impervious floor.pitching will rest on toe wall 0.4 \\\n",
+ " m wide and 0.9 m deep.provide 0.4 m wide profile at the end of pitching\"%(sp);\n",
+ "\t\t\t\t#design of u/s approach\n",
+ "print \"u/s wing wall is splayed at 45 degree from u/s end of impervious\\\n",
+ " floor.extend 1 m into earthen banks from line of F.S.L.\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "design of crest:\n",
+ "length of crest = 26.00 m.\n",
+ "width of crest = 0.70 m.\n",
+ "R.L of cistern = 215.03 m. > d/s bed level.\n",
+ "keep R.L of cistern at 214.5 m.\n",
+ "length of cistern = 8.64 m.\n",
+ "provide cistern of 9 m length \n",
+ "depth of cistern = 0.50 m.\n",
+ "design of impervious floor:\n",
+ "provide 0.4 m wide and 1 m deep curtain wall at u/s.\n",
+ "provide 0.4 m wide and 1 m deep curtain wall at d/s.the curtain wall will project the above the d/s bed by 0.18 m.\n",
+ "total length = 18 m.length of cistern = 9 m.length of d/s glacis = 5.88 m.width of crest = 0.6 m.length of u/s glacis = 0.47 m.balance to be provided to u/s of the u/s glacis = 4.05 m.\n",
+ "pressure calculations:\n",
+ "upstream curtain wall:\n",
+ "corrected fi_c1 = 80.10 percent.\n",
+ "downstream curtain wall:\n",
+ "corrected fi_e = 27.00 percent.\n",
+ "toe of glacis:\n",
+ "pressure at downstream of the glacis = 50.85 percent.\n",
+ "floor thickness:provide minimum thickness of 0.3 m at the u/s floor.\n",
+ "floor thickness required at toe of glacis = 1.40 m.provide 1.5 m thick floor for length of 3 m.\n",
+ "floor thickness required at 3m from toe of glacis = 1.25 m.provide 1.3 m thick floor from 3 m to 6.5 m from toe of glacis.\n",
+ "thickness of d/s end of cistern = 0.53 m.provide thickness of 0.6 m at d/s end of floor.\n",
+ "no bed protection is needed as deflector wall is provided.\n",
+ "length of side protection = 5.40 m.provide 5.5 m length of 20 cm thick brick pitching beyond impervious floor.pitching will rest on toe wall 0.4 m wide and 0.9 m deep.provide 0.4 m wide profile at the end of pitching\n",
+ "u/s wing wall is splayed at 45 degree from u/s end of impervious floor.extend 1 m into earthen banks from line of F.S.L.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.3 pg : 831"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#design a cross -regulator and head regulatorfor a distributory channel\n",
+ "#givrn\n",
+ "Q = 100.; \t\t\t\t#discharge of parent channel\n",
+ "Qd = 15.; \t\t\t\t#discharge ofdistributory\n",
+ "fsl_u = 218.1; \t\t\t\t#F.S.L of upstream parent channel\n",
+ "fsl_d = 217.9; \t\t\t\t#F.S.L of downstream of parent channel\n",
+ "bw_u = 42.; \t\t\t\t#bed width of parent channel upstream\n",
+ "bw_d = 38.; \t\t\t\t#bed width of parent channel downstream\n",
+ "hw = 2.5; \t\t\t\t#depth of water in parent channel\n",
+ "fsl_dis = 217.1; \t\t\t\t#F.S.L of distributory\n",
+ "hw_dis = 1.5; \t\t\t\t#depth of water in distributory\n",
+ "Ge = 1./5; \t\t\t\t#permissible exit gradient\n",
+ "\n",
+ "#design of cross regulator\n",
+ "print \"DESIGN OF CROSS-REGULATOR::\";\n",
+ "#design of crest and waterway\n",
+ "print \"design of crest and waterway:\";\n",
+ "cl = fsl_u-hw;\n",
+ "h = fsl_u-fsl_d;\n",
+ "d = fsl_d-cl;\n",
+ "C1 = 0.557;C2 = 0.8;\n",
+ "L = Q/(2*C1*(2*9.81)**0.5*h**1.5/3+C2*d*(2*9.81*h)**0.5);\n",
+ "L = round(L*10)/10;\n",
+ "print \"crest level = %.2f m.\"%(cl);\n",
+ "print \"length of crest = %.2f m.\"%(L);\n",
+ "tw = 28+4.5;\n",
+ "print \"provide 3 piers of 1.5 m width each.total width of cross regulator = %.2f m.\"%(tw);\n",
+ "#design of d/s floor\n",
+ "L = 28.;\n",
+ "q = Q/L;\n",
+ "Hl = fsl_u-fsl_d;\n",
+ "Ef2 = 1.89; \t\t\t\t#from blench curve\n",
+ "fl_d = fsl_d-Ef2;\n",
+ "print \"design of d/s floor:\";\n",
+ "print \"d/s floor level = %.2f m.; which is higher than d/s bed level.adopt floor level = d/s bed level = 215.40 m.\"%(fl_d);\n",
+ "Ef1 = Ef2+Hl;\n",
+ "#from specific energy curve\n",
+ "D1 = 0.7;\n",
+ "D2 = 1.65;\n",
+ "cil = 5*(D2-D1); \t\t\t\t#cistern length\n",
+ "tl = 2*16/3;\n",
+ "tl = round(tl*10)/10;\n",
+ "print \"cistern length = %.2f m.length of d/s floor = %.2f m.\"%(cil,tl);\n",
+ "#design of impervious floor\n",
+ "d1 = hw/3+0.6; \t\t\t\t#depth of u/s cut-off\n",
+ "w = 0.5; \t\t\t\t#width of cut-off\n",
+ "d2 = hw/2+0.6; \t\t\t\t#deth of d/s cut-off\n",
+ "d2 = 2; \t\t\t\t#keep\n",
+ "Hs = fsl_u-(fsl_d-hw); \t\t\t\t#maximum static head\n",
+ "n = Ge*d2/Hs; \t\t\t\t#n = 1/math.pi*(lambda)**0.5;\n",
+ "#from exit gradient curves we get\n",
+ "alpha = 8.;\n",
+ "n = 0.148;\n",
+ "b = alpha*d2;\n",
+ "print \"design of impervious floor:\";\n",
+ "print \"total length of impervious floor = %i m.;which is divided as-\"%(b);\n",
+ "print \"d/s floor length = 10.6 m.d/s glacis length with 2:1 slope = 0.4 m.balance to be provided upstream = 5 m.\";\n",
+ "d1 = 1.5;b = 16;\n",
+ "alpha_ = d1/b;\n",
+ "\t\t\t\t#hence\n",
+ "fic1 = 100-28;\n",
+ "fid1 = 100-19;\n",
+ "t = 0.5;\n",
+ "fic1 = fic1+(fid1-fic1)*t/d1;\n",
+ "print \"pressure calculation:upstream cut-off:pressure = %.2f percent.\"%(fic1);\n",
+ "d2 = 2.;\n",
+ "b = 16;\n",
+ "alpha_ = d2/b;\n",
+ "\t\t\t\t#hence\n",
+ "t = 0.6;\n",
+ "fie2 = 31.;\n",
+ "fid2 = 22.;\n",
+ "fie2 = fie2-(fie2-fid2)*t/d2;\n",
+ "print \"downstream cut-off:pressure = %.2f percent.\"%(fie2);\n",
+ "t = 10.6;\n",
+ "p = fie2+(fic1-fie2)*t/b;\n",
+ "p = round(p*10)/10;\n",
+ "print \"toe of glacis:pressure = %.2f percent.\"%(p);\n",
+ "print \"thickness of floor:minimu thickness for u/s floor = 0.5 m.\";\n",
+ "rho = 2.24;\n",
+ "t = fie2*2.7/(100*(rho-1));\n",
+ "t = round(t*100)/100;\n",
+ "print \"thickness of floor near d/s cut-off = %.2f m.provide 0.7 m thick floor for last 2.1 m length.\"%(t);\n",
+ "t = 1.6/(rho-1);\n",
+ "t = round(t*100)/100;\n",
+ "print \"thickness of floor at toe of glacis = %.2f m.\"%(t);\n",
+ "t = 6.6;\n",
+ "p = fie2+(fic1-fie2)*t/b;\n",
+ "t = p*2.7/(100*(rho-1));\n",
+ "t = round(t*100)/100;\n",
+ "print \"thickness of floor at 4 m from toe of glais = %.2f m.provide 1.1 m thick floor for next 2 m length\"%(t);\n",
+ "t = 4.6;\n",
+ "p = fie2+(fic1-fie2)*t/b;\n",
+ "t = p*2.7/(100*(rho-1));\n",
+ "t = round(t*100)/100;\n",
+ "print \"thickness of floor at 6 m from toe of glais = %.2f m.provide 0.9 m thick floor for next 2.5 m length\"%(t);\n",
+ "\n",
+ "\t\t\t\t#design of u/s protection\n",
+ "d1 = hw/3+0.6;\n",
+ "v = d1;\n",
+ "v = round(v*100)/100;\n",
+ "print \"design of u/s protection:volume of block protection = %.2f cubic metre/metre.\"%(v);\n",
+ "print \"keep thickness of protection = 1 m.provide 0.8mx0.8mx0.6m thick concret blocks over 0.4 m thick apron in length of 0.6 m.\";\n",
+ "cu = 2.25*d1;\n",
+ "cu = round(cu*100)/100;\n",
+ "print \"cubic content of launching apron = %.2f cubic metre/metre.provide 1 m thick and 3.5 m long launching apron.\"%(cu);\n",
+ "\t\t\t\t#design of d/s protection\n",
+ "d2 = hw/2+0.6;\n",
+ "v = d2;\n",
+ "v = round(v*100)/100;\n",
+ "print \"design of d/s protection:volume of inverted filter = %.2f cubic metre/metre.\"%(v);\n",
+ "print \"keep thickness of concrete block = 0.6 m.provide 2 rows of 0.8mx0.8mx0.6m thick \\\n",
+ "concret blocks over 0.6 m graded filter for length of 1.6 m.\";\n",
+ "cu = 2.25*d2;\n",
+ "cu = round(cu*100)/100;\n",
+ "print \"launching apron volume = %.2f cubic metre/metre.provide 1 m thick launching apron\\\n",
+ " for length of 4.5 m.provide a toe wall 0.4 m wide and 1.5 m deep between filter and launching apron.\"%(cu);\n",
+ "\n",
+ "\t\t\t\t#design of head regulator\n",
+ "print \"DESIGN OF DISTRIBUTORY HEAD REGULATOR::\";\n",
+ "\t\t\t\t#design of crest and waterway\n",
+ "print \"design of crest and waterway:\";\n",
+ "cl = fsl_u-hw+0.5;\n",
+ "h = fsl_u-fsl_dis;\n",
+ "d = fsl_dis-cl;\n",
+ "C1 = 0.557;C2 = 0.8;\n",
+ "L = Qd/(2*C1*(2*9.81)**0.5*h**1.5/3+C2*d*(2*9.81*h)**0.5);\n",
+ "L = round(L*100)/100;\n",
+ "print \"crest level = %.2f m.\"%(cl);\n",
+ "print \"length of crest = %.2f m.\"%(L);\n",
+ "print \"provide 2 bays of 3.5 m each with a 1 m thick pier in between.\";\n",
+ "tw = 8;\n",
+ "print \"total width of cross regulator = %.2f m.\"%(tw);\n",
+ "\t\t\t\t#design of d/s floor\n",
+ "L = 7.5;\n",
+ "q = Q/L;\n",
+ "Hl = fsl_u-fsl_dis;\n",
+ "Ef2 = 1.58; \t\t\t\t#from blench curve\n",
+ "fl_d = fsl_dis-Ef2;\n",
+ "print \"design of d/s floor:\";\n",
+ "print \"d/s floor level = %.2f m.;keepR.L of d/s floor = 215.50 m.\"%(fl_d);\n",
+ "Ef1 = Ef2+Hl;\n",
+ "\t\t\t\t#from specific energy curve\n",
+ "D1 = 0.42;D2 = 2.55;\n",
+ "cil = 5*(D2-D1); \t\t\t\t#cistern length\n",
+ "tl = 2*14/3;\n",
+ "print \"cistern length = %.2f m.\"%(cil);\n",
+ "\n",
+ "\t\t\t\t#design of impervious floor\n",
+ "d1 = hw/3+0.6; \t\t\t\t#depth of u/s cut-off\n",
+ "w = 0.5; \t\t\t\t#width of cut-off\n",
+ "d2 = hw_dis/2+0.6; \t\t\t\t#deth of d/s cut-off\n",
+ "d2 = 2; \t\t\t\t#keep\n",
+ "Hs = fsl_u-215.5; \t\t\t\t#maximum static head\n",
+ "n = Ge*d2/Hs; \t\t\t\t#n = 1/math.pi*(lambda)**0.5;\n",
+ "\t\t\t\t#from exit gradient curves we get\n",
+ "alpha = 7;n = 0.154;\n",
+ "b = alpha*d2;\n",
+ "print \"design of impervious floor:\";\n",
+ "print \"total length of impervious floor = %i m.;which is divided as-\"%(b);\n",
+ "print \"length below the toe of glacis = 10.5 mlength of d/s glacis at 2:1 slope =\\\n",
+ " 1.2 m.width of crest = 1 m.length of u/s glacis at 1:1 slope = 0.5 m.u/s floor:balnce = 0.8 m.\";\n",
+ "d1 = 1.5;\n",
+ "b = 16.;\n",
+ "alpha_ = d1/b;\n",
+ "\t\t\t\t#hence\n",
+ "fic1 = 100-28;\n",
+ "fid1 = 100-19;\n",
+ "t = 0.5;\n",
+ "fic1 = fic1+(fid1-fic1)*t/d1;\n",
+ "print \"pressure calculation:upstream cut-off:pressure = %.2f percent.\"%(fic1);\n",
+ "d2 = 2.;\n",
+ "b = 16;\n",
+ "alpha_ = d2/b;\n",
+ "\t\t\t\t#hence\n",
+ "t = 0.6;\n",
+ "fie2 = 31.;\n",
+ "fid2 = 22;\n",
+ "fie2 = fie2-(fie2-fid2)*t/d2;\n",
+ "print \"downstream cut-off:pressure = %.2f percent.\"%(fie2);\n",
+ "t = 10.6;\n",
+ "p = fie2+(fic1-fie2)*t/b;\n",
+ "p = round(p*100)/100;\n",
+ "print \"toe of glacis:pressure = %.2f percent.\"%(p);\n",
+ "print \"thickness of floor:minimu thickness for u/s floor = 0.5 m.\";\n",
+ "rho = 2.24;\n",
+ "t = p*2.6/(100*(rho-1));\n",
+ "t = round(t*100)/100;\n",
+ "print \"thickness under the crest = 1 m.\";\n",
+ "print \"thickness of floor at toe of glacis = %.2f m.\"%(t);\n",
+ "t = 9.5;\n",
+ "p = fie2+(fic1-fie2)*t/b;\n",
+ "t = p*2.7/(100*(rho-1));\n",
+ "t = round(t*100)/100;\n",
+ "print \"thickness of floor at 2 m from toe of glais = %.2f m.provide 1.1 m thick floor for next 4 m length\"%(t);\n",
+ "t = 4.5;\n",
+ "p = fie2+(fic1-fie2)*t/b;\n",
+ "t = p*2.7/(100*(rho-1));\n",
+ "t = round(t*100)/100;\n",
+ "print \"thickness of floor at 6 m from toe of glais = %.2f m.provide 0.9 m thick floor for next 2.5 m length\"%(t);\n",
+ "t = 2;\n",
+ "p = fie2+(fic1-fie2)*t/b;\n",
+ "t = p*2.7/(100*(rho-1));\n",
+ "t = round(t*100)/100;\n",
+ "print \"thickness of floor at 8.5 m from toe of glais = %.2f m.provide 0.7 m thick floor for next 2 m length\"%(t);\n",
+ "\n",
+ "\t\t\t\t#design of upstream protection\n",
+ "d = hw/3+0.6;\n",
+ "d = round(d*10)/10;\n",
+ "print \"design of u/s protection:u/s scour depth = %.2f m.provide same protection as in cross regulator\"%(d);\n",
+ "\n",
+ "\t\t\t\t#design of d/s protection\n",
+ "d2 = hw_dis/2+0.6;\n",
+ "v = d2;\n",
+ "print \"design of d/s protection:volume of inverted filter = %.2f cubic metre/metre.\"%(v);\n",
+ "print \"keep thickness of concrete block = 0.5 m.provide 2 rows of \\\n",
+ "0.8mx0.8mx0.5m thick concret blocks over 0.5 m thick graded filter.\";\n",
+ "cu = 2.25*d2;\n",
+ "print \"launching apron volume = %.2f cubic metre/metre.provide 1 m thick \\\n",
+ "launching apron for length of 3.5 m.provide a masonary toe wall 0.4 m wide and 1.2 m deep between filter and launching apron.\"%(cu);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "DESIGN OF CROSS-REGULATOR::\n",
+ "design of crest and waterway:\n",
+ "crest level = 215.60 m.\n",
+ "length of crest = 26.40 m.\n",
+ "provide 3 piers of 1.5 m width each.total width of cross regulator = 32.50 m.\n",
+ "design of d/s floor:\n",
+ "d/s floor level = 216.01 m.; which is higher than d/s bed level.adopt floor level = d/s bed level = 215.40 m.\n",
+ "cistern length = 4.75 m.length of d/s floor = 10.00 m.\n",
+ "design of impervious floor:\n",
+ "total length of impervious floor = 16 m.;which is divided as-\n",
+ "d/s floor length = 10.6 m.d/s glacis length with 2:1 slope = 0.4 m.balance to be provided upstream = 5 m.\n",
+ "pressure calculation:upstream cut-off:pressure = 75.00 percent.\n",
+ "downstream cut-off:pressure = 28.30 percent.\n",
+ "toe of glacis:pressure = 59.20 percent.\n",
+ "thickness of floor:minimu thickness for u/s floor = 0.5 m.\n",
+ "thickness of floor near d/s cut-off = 0.62 m.provide 0.7 m thick floor for last 2.1 m length.\n",
+ "thickness of floor at toe of glacis = 1.29 m.\n",
+ "thickness of floor at 4 m from toe of glais = 1.04 m.provide 1.1 m thick floor for next 2 m length\n",
+ "thickness of floor at 6 m from toe of glais = 0.91 m.provide 0.9 m thick floor for next 2.5 m length\n",
+ "design of u/s protection:volume of block protection = 1.43 cubic metre/metre.\n",
+ "keep thickness of protection = 1 m.provide 0.8mx0.8mx0.6m thick concret blocks over 0.4 m thick apron in length of 0.6 m.\n",
+ "cubic content of launching apron = 3.23 cubic metre/metre.provide 1 m thick and 3.5 m long launching apron.\n",
+ "design of d/s protection:volume of inverted filter = 1.85 cubic metre/metre.\n",
+ "keep thickness of concrete block = 0.6 m.provide 2 rows of 0.8mx0.8mx0.6m thick concret blocks over 0.6 m graded filter for length of 1.6 m.\n",
+ "launching apron volume = 4.16 cubic metre/metre.provide 1 m thick launching apron for length of 4.5 m.provide a toe wall 0.4 m wide and 1.5 m deep between filter and launching apron.\n",
+ "DESIGN OF DISTRIBUTORY HEAD REGULATOR::\n",
+ "design of crest and waterway:\n",
+ "crest level = 216.10 m.\n",
+ "length of crest = 2.89 m.\n",
+ "provide 2 bays of 3.5 m each with a 1 m thick pier in between.\n",
+ "total width of cross regulator = 8.00 m.\n",
+ "design of d/s floor:\n",
+ "d/s floor level = 215.52 m.;keepR.L of d/s floor = 215.50 m.\n",
+ "cistern length = 10.65 m.\n",
+ "design of impervious floor:\n",
+ "total length of impervious floor = 14 m.;which is divided as-\n",
+ "length below the toe of glacis = 10.5 mlength of d/s glacis at 2:1 slope = 1.2 m.width of crest = 1 m.length of u/s glacis at 1:1 slope = 0.5 m.u/s floor:balnce = 0.8 m.\n",
+ "pressure calculation:upstream cut-off:pressure = 75.00 percent.\n",
+ "downstream cut-off:pressure = 28.30 percent.\n",
+ "toe of glacis:pressure = 59.24 percent.\n",
+ "thickness of floor:minimu thickness for u/s floor = 0.5 m.\n",
+ "thickness under the crest = 1 m.\n",
+ "thickness of floor at toe of glacis = 1.24 m.\n",
+ "thickness of floor at 2 m from toe of glais = 1.22 m.provide 1.1 m thick floor for next 4 m length\n",
+ "thickness of floor at 6 m from toe of glais = 0.90 m.provide 0.9 m thick floor for next 2.5 m length\n",
+ "thickness of floor at 8.5 m from toe of glais = 0.74 m.provide 0.7 m thick floor for next 2 m length\n",
+ "design of u/s protection:u/s scour depth = 1.40 m.provide same protection as in cross regulator\n",
+ "design of d/s protection:volume of inverted filter = 1.35 cubic metre/metre.\n",
+ "keep thickness of concrete block = 0.5 m.provide 2 rows of 0.8mx0.8mx0.5m thick concret blocks over 0.5 m thick graded filter.\n",
+ "launching apron volume = 3.04 cubic metre/metre.provide 1 m thick launching apron for length of 3.5 m.provide a masonary toe wall 0.4 m wide and 1.2 m deep between filter and launching apron.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch19_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch19_2.ipynb
new file mode 100644
index 00000000..32d7ab84
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch19_2.ipynb
@@ -0,0 +1,392 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:6fd287c1935869ab0dbf969e29246715100ab63b1d219a58fec4220f2b19494d"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 19 : CROSS DRAINAGE WORKS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19.1 pg : 857"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import linspace,zeros\n",
+ "\n",
+ "#design an expansion transition for canal by Mitra's method\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Lf = 16.; \t\t\t\t#length of flume\n",
+ "Bf = 9.; \t\t\t\t#width of throat\n",
+ "Bo = 15.; \t\t\t\t#width of canal\n",
+ "\n",
+ "#width at any dismath.tance x from flumed section is given by\n",
+ "#Bx = Bo*Bf*Lf/(Lf*Bo-(Bo-Bf)x)\n",
+ "#on solving we get\n",
+ "#Bx = 2160/(240-6x)\n",
+ "\n",
+ "x = linspace(2,16,8) \t\t\t\t#dismath.tance\n",
+ "print \"width at any dismath.tance x from flumed section:\";\n",
+ "Bx = zeros(8)\n",
+ "for i in range(8):\n",
+ " Bx[i] = 2160./(240-6*x[i]);\n",
+ " Bx[i] = round(Bx[i]*100)/100;\n",
+ " print '%.2f'%(Bx[i]);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "width at any dismath.tance x from flumed section:\n",
+ "9.47\n",
+ "10.00\n",
+ "10.59\n",
+ "11.25\n",
+ "12.00\n",
+ "12.86\n",
+ "13.85\n",
+ "15.00\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19.2 pg : 857"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import linspace,zeros\n",
+ "\n",
+ "#design an expansion transition for canal by Chaturvedi's method\n",
+ "\t\t\t\t\n",
+ "#Given;\n",
+ "Lf = 16.; \t\t\t\t#length of flume\n",
+ "Bf = 9.; \t\t\t\t#width of throat\n",
+ "Bo = 15.; \t\t\t\t#width of canal\n",
+ "\n",
+ "x = linspace(2,16,8); \t\t\t\t#dismath.tance\n",
+ "\n",
+ "#dismath.tance x is related as x = Lf*Bo**(2/3)(1-(Bf/Bx)**1.5)/(Bo**1.5-Bf**1.5)\n",
+ "#on solving we get\n",
+ "#(Bf/Bx)**1.5 = 1-(x/29.893) (relation is misprinted in book)\n",
+ "#let (Bf/Bx)**1.5 = r\n",
+ "r = zeros(8)\n",
+ "R = zeros(8)\n",
+ "Bx = zeros(8)\n",
+ "\n",
+ "print \"width at any dismath.tance x from flumed section:\";\n",
+ "for i in range(8):\n",
+ " r[i] = 1-(x[i]/29.893); \t\t\t\t#Bf/Bx**(1.5)\n",
+ " R[i] = r[i]**(2./3); \t\t\t\t#Bf/Bx\n",
+ " Bx[i] = Bf/R[i]; \n",
+ " Bx[i] = round(Bx[i]*100)/100; \n",
+ " print \"%.2f.\"%(Bx[i]);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "width at any dismath.tance x from flumed section:\n",
+ "9.43.\n",
+ "9.90.\n",
+ "10.45.\n",
+ "11.08.\n",
+ "11.81.\n",
+ "12.67.\n",
+ "13.71.\n",
+ "15.00.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 19.3 pg : 860"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import linspace,zeros,zeros_like\n",
+ "\n",
+ "#design a syphon aqueduct\n",
+ "\n",
+ "#Given\n",
+ "Q = 25.; \t\t\t\t#design discharge of canal\n",
+ "B = 20.; \t\t\t\t#bed width of canal\n",
+ "D = 1.5; \t\t\t\t#depth of water in canal\n",
+ "bl = 160.; \t\t\t\t#bed level of canal\n",
+ "hfq = 400.; \t\t\t\t#high flood discharge of drainage\n",
+ "hfl = 160.5; \t\t\t\t#high flood level of drainage\n",
+ "bl_drain = 158.; \t\t\t\t#bed level of drainage\n",
+ "gl = 160.; \t\t\t\t#general ground level\n",
+ "\n",
+ "#demath.sing of drainage water-way\n",
+ "P = 4.75*(hfq)**0.5; \t\t\t\t#laecey P-Q formula\n",
+ "print \"design of drainage water-way:wetted perimeter of river = %i m.provide 13 spans \\\n",
+ "of 6 m each,separated by 12 piers each of 1.25 m thick.\"%(P);\n",
+ "t = 78.+15;\n",
+ "print \"total length of water-way = %i m.\"%(t);\n",
+ "v = 2; \t\t\t\t#velocity through syphon\n",
+ "hb = hfq/(78*v);\n",
+ "ac = hfq/(6*2.5*1.3); \t\t\t\t#calculation is wrong in book\n",
+ "hb = round(hb*100)/100;\n",
+ "ac = round(ac*100)/100;\n",
+ "print \"height of barrels = %.2f m.provide recmath.tangular barrels 6 m wide and 2.5 m high.actual \\\n",
+ "velocity through barrels = %.2f m/sec.\"%(hb,ac);\n",
+ "\n",
+ "#design of canal waterway\n",
+ "print \"design of canal waterway:Type 3 aqueduct is adopted.\";\n",
+ "l1 = B-10;\n",
+ "l2 = (20-10)*3/2;\n",
+ "print \"providing a splay 2:1 in expansion,length of contraction transition = %i m.providing\\\n",
+ " a splay of 3:1 in expansion,length of expansion transition = %i m.\"%(l1,l2);\n",
+ "print 'In transition side slopes are warped from original slope of 1.5:1 to vertical.';\n",
+ "\n",
+ "#design of levels of different sectionn\n",
+ "print \"design of levels of different sectionn:at section 4-4:\";\n",
+ "A = (B+1.5*D); \t\t\t\t#area\n",
+ "V = Q/A; \t\t\t\t#velocity of flow\n",
+ "vh = V**2/(2*9.81); \t\t\t\t#velocity head\n",
+ "ws = gl+D; \t\t\t\t#R.L of water surface\n",
+ "tel = ws+vh;\n",
+ "tel = round(tel*1000)/1000;\n",
+ "print \"R.L of T.E.L = %.2f m. at section 3-3:\"%(tel);\n",
+ "A = 10*D; \t\t\t\t#area of trough\n",
+ "V = Q/A; \t\t\t\t#velocity\n",
+ "vh1 = V**2/(2*9.81); \t\t\t\t#velocity head\n",
+ "le = 0.3*(vh1-vh); \t\t\t\t#loss of head in expansion from section 3-3 to 4-4\n",
+ "tel = tel+le;\n",
+ "rlw = tel-vh1;\n",
+ "rlb = rlw-D;\n",
+ "tel = round(tel*1000)/1000;\n",
+ "rlb = round(rlb*1000)/1000;\n",
+ "print \"elevation of T.E.L = %.2f m.R.L of bed to maintain consmath.tant water depth = %.2f m.\"%(tel,rlb);\n",
+ "\n",
+ "#at section 2-2\n",
+ "R = A/P;\n",
+ "N = 0.016;\n",
+ "S = V**2*N**2/R**(4./3); \t\t\t\t#from manning's formula\n",
+ "L = 93; \t\t\t\t#length of trough\n",
+ "hl = L*S; \t\t\t\t#head loss\n",
+ "tel = tel+hl;\n",
+ "rlw = tel-vh1;\n",
+ "rlb = rlw-D;\n",
+ "tel = round(tel*1000)/1000;\n",
+ "rlb = round(rlb*1000)/1000;\n",
+ "print \"at section 2-2:R.L of T.E.L = %.2f m.R.L of bed to maintain consmath.tant water depth = %.2f m.\"%(tel,rlb);\n",
+ "\n",
+ "#at section 1-1\n",
+ "hl = 0.2*(vh1-vh); \t\t\t\t#loss of hed in contraction transition\n",
+ "tel = tel+hl;\n",
+ "rlw = tel-vh;\n",
+ "rlb = tel-D;\n",
+ "tel = round(tel*1000)/1000;\n",
+ "rlb = round(rlb*1000)/1000;\n",
+ "print \"at section 1-1:R.L of T.E.L = %.2f m.R.L of bed to maintain consmath.tant water depth = %.2f m.\"%(tel,rlb);\n",
+ "\n",
+ "#design of contraction transition\n",
+ "#it is designed on the basis of chaturvedi's formula\n",
+ "Bo = 20.;\n",
+ "Bf = 10.;\n",
+ "L = 10.;\n",
+ "#from chaturvedi formula we get relation between x and Bx as: x = 15.45(1-(10/Bx)**1.5);\n",
+ "Bx = linspace(10,20,11)\n",
+ "print \"design of contraction transition on the basis of chaturvedi formula:\\nBx x\";\n",
+ "x = zeros_like(Bx)\n",
+ "for i in range(11):\n",
+ " x[i] = 15.45*(1-(10/Bx[i])**1.5);\n",
+ " x[i] = round(x[i]*100)/100;\n",
+ " print \"%i %.2f\"%(Bx[i],x[i]);\n",
+ "\n",
+ "\n",
+ "#design of expansion transition on the basis of chaturvedi formula\n",
+ "L = 15.;\n",
+ "Bf = 10.;Bo = 20.;\n",
+ "#from chaturvedi formula we get relation between x and Bx as: x = 23.15(1-(10/Bx)**1.5);\n",
+ "print \"design of expansion transition on the basis of chaturvedi formula:\\nBx x\";\n",
+ "for i in range(11):\n",
+ " x[i] = 23.15*(1-(10/Bx[i])**1.5);\n",
+ " x[i] = round(x[i]*100)/100;\n",
+ " print \"%i %.2f\"%(Bx[i],x[i]);\n",
+ "\n",
+ "\n",
+ "#design of trough\n",
+ "print \"design of the trough:\";\n",
+ "print \"flumed water way of canal = 10 m.trough carrying canal will divide into two \\\n",
+ "compartments each 5 m wide an dseparated by 0.3 m thick partiions.heigth of trough will be \\\n",
+ " = 2 m.trough iss constructed umath.sing monolithic reinforced concrete.the outer and inner walls\\\n",
+ " ca be kept 0.4 m thick.thus,outer width of trough = 11.1 m.\";\n",
+ "\n",
+ "#head loss through syphon barrels\n",
+ "V = 2.05; \t\t\t\t#velocity through barrels\n",
+ "f1 = 0.505; \t\t\t\t#coefficient of loss of head at entry\n",
+ "a = 0.00316;\n",
+ "b = 0.030;\n",
+ "R = (6*2.5)/(2*(6+2.5));\n",
+ "f2 = a*(1+b/R);\n",
+ "L = 11.1; \t\t\t\t#length of barrel\n",
+ "h = (1+f1+f2*L/R)*V**2/(2*9.81);\n",
+ "hfl_up = hfl+h;\n",
+ "h = round(h*1000)/1000;\n",
+ "hfl_up = round(hfl_up*1000)/1000;\n",
+ "print \"head loss through syphon barrels = %.2f m.upstream H.F.L = %.2f m.\"%(h,hfl_up)\n",
+ "\n",
+ "#uplift pressure on the roof\n",
+ "bt = gl-0.4; \t\t\t\t#R.L of bottom of the trough\n",
+ "hl = 0.505*V**2/(2*9.81);\n",
+ "u = hfl_up-hl-159.6;\n",
+ "up = u*9.81;\n",
+ "print \"uplift pressure on the roof = %.2f kN/square m.trough slab is 0.4 m thick and exert a downward load of 9.42 kN.\"%(up);\n",
+ "print \"th ebalance of the uplift pressure has to be resisted by bending action of \\\n",
+ "trough slab.so,reinforcement has to be provided at the top of the slab.\";\n",
+ "\n",
+ "#uplift on the floor of the barrel and its design\n",
+ "#(a) static head\n",
+ "print \"uplift on the floor of the barrel and its design:a static head:\";\n",
+ "bf = bt-2.5; \t\t\t\t#R.L of barrel floor\n",
+ "t = 0.8; \t\t\t\t#tentative thickness of floor\n",
+ "bot = bf-t;\n",
+ "static = bl_drain-bot;\n",
+ "static = round(static*100)/100;\n",
+ "print \"static uplift on the floor = %.2f m.\"%(static);\n",
+ "\n",
+ "#(b) seepage head\n",
+ "L = 10.; \t\t\t\t#length of u/s transition\n",
+ "bs = 3.; \t\t\t\t#half the barrel span\n",
+ "df = 11.; \t\t\t\t#end drainage floor\n",
+ "tcl = 24.; \t\t\t\t#total creep length\n",
+ "tsh = 161.5-bl_drain; \t\t\t\t#total seepage head\n",
+ "rs = tsh*(1-13/tcl); \t\t\t\t#residual seepage at B\n",
+ "tu = (static+rs)*9.81;\n",
+ "tu = round(tu*100)/100;\n",
+ "print \"b) seepage head:total uplift = %.2f kN/square m.provide thickness of floor 0.8 m\"%(tu);\n",
+ "bending = tu-17.58;\n",
+ "bending = round(bending*100)/100;\n",
+ "print \"uplift to be resisted by bending action of floor = %.2f kN/square m.\"%(bending);\n",
+ "\n",
+ "#design of cut-off and protection works for drainage floor\n",
+ "print \"design of cut-off and protection works for drainage floor:\";\n",
+ "Q = 400;f = 1;\n",
+ "R = 0.47*(Q/f)**(1/3);\n",
+ "d_up = 1.5*R; \t\t\t\t#depth of u/s cut-off\n",
+ "bot_up = hfl_up-d_up; \t\t\t\t#R.L of bottom of u/s cut-off\n",
+ "d_down = 1.5*R; \t\t\t\t#depth of d/s cut-off\n",
+ "bot_down = hfl-d_down; \t\t\t\t#R.L of bottom of d/s cut-off\n",
+ "l_down = 2.5*(bl_drain-bot_down);\n",
+ "l_down1 = 2*(bl_drain-bot_up);\n",
+ "bot_up = round(bot_up*100)/100;\n",
+ "bot_down = round(bot_down*100)/100;\n",
+ "l_down = round(l_down);\n",
+ "l_down1 = round(l_down1);\n",
+ "print \"R.L of bottom of u/s cut-off = %.2f m.R.L of bottom of d/s cut-off = %.2f m.\"%(bot_up,bot_down);\n",
+ "print \"length of d/s protection consisting of 40 cm brick pritching = %.2f m.pitching is \\\n",
+ "supported by toe wall 0.4 m wide and 1.5 m deep at its d/s end.length of d/s protection consisting\\\n",
+ " of 0.4 cm brick pritching = %.2f m.pitching is supported by toe wall 0.4 m wide and\\\n",
+ " 1 m deep at its u/s end.\"%(l_down,l_down1);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "design of drainage water-way:wetted perimeter of river = 95 m.provide 13 spans of 6 m each,separated by 12 piers each of 1.25 m thick.\n",
+ "total length of water-way = 93 m.\n",
+ "height of barrels = 2.56 m.provide recmath.tangular barrels 6 m wide and 2.5 m high.actual velocity through barrels = 20.51 m/sec.\n",
+ "design of canal waterway:Type 3 aqueduct is adopted.\n",
+ "providing a splay 2:1 in expansion,length of contraction transition = 10 m.providing a splay of 3:1 in expansion,length of expansion transition = 15 m.\n",
+ "In transition side slopes are warped from original slope of 1.5:1 to vertical.\n",
+ "design of levels of different sectionn:at section 4-4:\n",
+ "R.L of T.E.L = 161.56 m. at section 3-3:\n",
+ "elevation of T.E.L = 161.59 m.R.L of bed to maintain consmath.tant water depth = 159.95 m.\n",
+ "at section 2-2:R.L of T.E.L = 162.36 m.R.L of bed to maintain consmath.tant water depth = 160.72 m.\n",
+ "at section 1-1:R.L of T.E.L = 162.38 m.R.L of bed to maintain consmath.tant water depth = 160.88 m.\n",
+ "design of contraction transition on the basis of chaturvedi formula:\n",
+ "Bx x\n",
+ "10 0.00\n",
+ "11 2.06\n",
+ "12 3.70\n",
+ "13 5.03\n",
+ "14 6.12\n",
+ "15 7.04\n",
+ "16 7.82\n",
+ "17 8.48\n",
+ "18 9.05\n",
+ "19 9.55\n",
+ "20 9.99\n",
+ "design of expansion transition on the basis of chaturvedi formula:\n",
+ "Bx x\n",
+ "10 0.00\n",
+ "11 3.08\n",
+ "12 5.54\n",
+ "13 7.53\n",
+ "14 9.17\n",
+ "15 10.55\n",
+ "16 11.71\n",
+ "17 12.71\n",
+ "18 13.56\n",
+ "19 14.31\n",
+ "20 14.97\n",
+ "design of the trough:\n",
+ "flumed water way of canal = 10 m.trough carrying canal will divide into two compartments each 5 m wide an dseparated by 0.3 m thick partiions.heigth of trough will be = 2 m.trough iss constructed umath.sing monolithic reinforced concrete.the outer and inner walls ca be kept 0.4 m thick.thus,outer width of trough = 11.1 m.\n",
+ "head loss through syphon barrels = 0.33 m.upstream H.F.L = 160.83 m.\n",
+ "uplift pressure on the roof = 11.01 kN/square m.trough slab is 0.4 m thick and exert a downward load of 9.42 kN.\n",
+ "th ebalance of the uplift pressure has to be resisted by bending action of trough slab.so,reinforcement has to be provided at the top of the slab.\n",
+ "uplift on the floor of the barrel and its design:a static head:\n",
+ "static uplift on the floor = 1.70 m.\n",
+ "b) seepage head:total uplift = 32.41 kN/square m.provide thickness of floor 0.8 m\n",
+ "uplift to be resisted by bending action of floor = 14.83 kN/square m.\n",
+ "design of cut-off and protection works for drainage floor:\n",
+ "R.L of bottom of u/s cut-off = 160.13 m.R.L of bottom of d/s cut-off = 159.79 m.\n",
+ "length of d/s protection consisting of 40 cm brick pritching = -4.00 m.pitching is supported by toe wall 0.4 m wide and 1.5 m deep at its d/s end.length of d/s protection consisting of 0.4 cm brick pritching = -4.00 m.pitching is supported by toe wall 0.4 m wide and 1 m deep at its u/s end.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch20_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch20_2.ipynb
new file mode 100644
index 00000000..72e1d5c9
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch20_2.ipynb
@@ -0,0 +1,142 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:9fa9b8923853c5929c3c0b3b718ed4db74e8cca06a82acc75a09e2384344b2e1"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 20 : RIVER ENGINEERING"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 20.1 pg : 888"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#design a guide bank required for a bridge in a river\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 50000.; \t\t\t\t#discharge\n",
+ "f = 1.1; \t\t\t\t#silt factor\n",
+ "bl = 130.; \t\t\t\t#bed level of river\n",
+ "hfl = 140.; \t\t\t\t#high flood level\n",
+ "\n",
+ "# Calculations and Results\n",
+ "L = 4.75*(Q)**0.5;\n",
+ "L = L+212; \t\t\t\t#providing 20 percent more length\n",
+ "L_up = 5*L/4; \t\t\t\t#upstream length of guide bund\n",
+ "L_down = L/4; \t\t\t\t#downstream length of guide bund\n",
+ "r_up = 0.45*L; \t\t\t\t#radius of upstream curved head\n",
+ "print \"upstream length of guide bund = %i m.\"%(L_up);\n",
+ "print \"downstream length of guide bund = %i m.\"%(L_down);\n",
+ "print \"upstream radius of curved head = %i m.;it can be carved at 145 degrees.\"%(r_up);\n",
+ "print \"downstream radius of curved head = 287m.;it can be carved at 60 degrees.\";\n",
+ "\n",
+ "fb = 1.5; \t\t\t\t#free board\n",
+ "ltop = fb+hfl; \t\t\t\t#level of top of guide bund\n",
+ "print \"level of top of guide bund = %.2f m.\"%(ltop);\n",
+ "print \"adopt top level = 142 m.\";\n",
+ "ltop = 142;\n",
+ "Hr = ltop-bl;\n",
+ "print \"keep top width = 4 m. and side slope as 2:1.\";\n",
+ "T = 0.06*(Q)**(1./3); \t\t\t\t#thickness of stone pitching\n",
+ "T = round(T*100)/100;\n",
+ "print \"Thickness of stone pitching = %.2f m.\"%(T);\n",
+ "R = 0.47*(Q/f)**(1./3); \t\t\t\t#depth of scour\n",
+ "Rmax = 1.25*R; \t\t\t\t#maximum scour\n",
+ "rl = hfl-Rmax; \t\t\t\t#R.L at maximum anticipated cover\n",
+ "D = bl-rl; \t\t\t\t#depth of maximum scour\n",
+ "Lapron = 1.5*D;\n",
+ "R = round(R*100)/100;\n",
+ "Lapron = round(Lapron*100)/100;\n",
+ "print \"depth of scour = %.2f m.\"%(R);\n",
+ "print \"for straigtht reach of guide band:\";\n",
+ "print \"length of apron = %.2f m.\"%(Lapron);\n",
+ "Rmax = 1.5*R;\n",
+ "rl = hfl-Rmax;\n",
+ "D1 = bl-rl;\n",
+ "Lapron = 1.5*D1;\n",
+ "R = round(R*100)/100;\n",
+ "print \"for curvilinear transition portion of guide band:\";\n",
+ "print \"length of apron = %.2f m.\"%(Lapron);\n",
+ "T1 = 1.9*T;\n",
+ "T1 = round(T1*10)/10;\n",
+ "print \"thickness of apron = %.2f m.\"%(T1);\n",
+ "print \"volume of stones:\";\n",
+ "ss = 5**0.5*(141-130)*T;\n",
+ "as1 = 5**0.5*D*1.25*T;\n",
+ "ss = round(ss*100)/100;\n",
+ "as1 = round(as1*100)/100;\n",
+ "print \"at shank:\";\n",
+ "print \"on slope = %.2f cubic metre/m.\"%(ss);\n",
+ "print \"on apron with a slope 2:1 = %.2f cubic metre/m.\"%(as1);\n",
+ "\n",
+ "va = 5**0.5*D1*1.25*T;\n",
+ "vs = ss;\n",
+ "vs = round(vs*100)/100;\n",
+ "va = round(va*100)/100;\n",
+ "print \"U/S andD/S curved portion:\";\n",
+ "print \"on slope = %.2f cubic metre/m.\"%(vs);\n",
+ "print \"on apron = %.2f cubic metre/m.\"%(va);\n",
+ "\n",
+ "ta = va/(1.5*D1);\n",
+ "ta = round(ta*10)/10;\n",
+ "print \"thickness of launching apron = %.2f m.\"%(ta);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "upstream length of guide bund = 1592 m.\n",
+ "downstream length of guide bund = 318 m.\n",
+ "upstream radius of curved head = 573 m.;it can be carved at 145 degrees.\n",
+ "downstream radius of curved head = 287m.;it can be carved at 60 degrees.\n",
+ "level of top of guide bund = 141.50 m.\n",
+ "adopt top level = 142 m.\n",
+ "keep top width = 4 m. and side slope as 2:1.\n",
+ "Thickness of stone pitching = 2.21 m.\n",
+ "depth of scour = 16.77 m.\n",
+ "for straigtht reach of guide band:\n",
+ "length of apron = 16.45 m.\n",
+ "for curvilinear transition portion of guide band:\n",
+ "length of apron = 22.73 m.\n",
+ "thickness of apron = 4.20 m.\n",
+ "volume of stones:\n",
+ "at shank:\n",
+ "on slope = 54.36 cubic metre/m.\n",
+ "on apron with a slope 2:1 = 67.74 cubic metre/m.\n",
+ "U/S andD/S curved portion:\n",
+ "on slope = 54.36 cubic metre/m.\n",
+ "on apron = 93.61 cubic metre/m.\n",
+ "thickness of launching apron = 4.10 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch21_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch21_2.ipynb
new file mode 100644
index 00000000..a51714d4
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch21_2.ipynb
@@ -0,0 +1,180 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:cfc0d5f8100e77d08cba72409c2d6158116c0c87f0c1bc2797c7cdf67223be53"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 21 : WATER POWER ENGINEERING"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21.1 pg : 906"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#total installed capacity\n",
+ "#load factor\n",
+ "#plant factor\n",
+ "#utilization factor\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "c = 10000.; \t\t\t\t#capacity of each generator;\n",
+ "n = 3.; \t\t\t\t#number of generator\n",
+ "l1 = 12000.; \t\t\t\t#initial load on plant\n",
+ "l2 = 26000.; \t\t\t\t#final load on plant\n",
+ "\n",
+ "\n",
+ "# Calculations and Results\n",
+ "tc = n*c;\n",
+ "print \"Total installed capacity = %i kW.\"%(tc);\n",
+ "\n",
+ "avg = (l1+l2)/2; \t\t\t\t#average load\n",
+ "pk = l2; \t\t\t\t#peak load\n",
+ "lf = avg*100/pk;\n",
+ "lf = round(lf*10)/10;\n",
+ "print \"load factor = %.2f percent.\"%(lf);\n",
+ "\n",
+ "\t\t\t\t#take any time duration t hours\n",
+ "pf = avg*100/tc;\n",
+ "pf = round(pf*10)/10;\n",
+ "print \"plant factor = %.2f percent.\"%(pf);\n",
+ "\n",
+ "uf = pk*100/tc;\n",
+ "uf = round(uf*10)/10;\n",
+ "print \"utilization ratio = %.2f percent.\"%(uf);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total installed capacity = 30000 kW.\n",
+ "load factor = 73.10 percent.\n",
+ "plant factor = 63.30 percent.\n",
+ "utilization ratio = 86.70 percent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21.2 pg : 906"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#pondage to be provided\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 40.; \t\t\t\t# minimum flow in river\n",
+ "H = 30.; \t\t\t\t#net head\n",
+ "lf = 0.73; \t\t\t\t#load factor\n",
+ "eita = 0.6; \t\t\t\t#plant efficiency\n",
+ "\n",
+ "# Calculations and Results\n",
+ "P = 9.81*Q*H*eita;\n",
+ "pk = P/lf;\n",
+ "pk = round(pk*10)/10;\n",
+ "print \"maximum generation capacity of generator = %.2f kW.\"%(pk);\n",
+ "\n",
+ "pp = pk-P; \t\t\t\t#power develop from pondage\n",
+ "Q = pp/(9.81*H*eita);\n",
+ "pr = Q*4*3600/10000;\n",
+ "pr = round(pr*10)/10;\n",
+ "print \"Pondage required = %.2fD+4 cubic metre.\"%(pr);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum generation capacity of generator = 9675.60 kW.\n",
+ "Pondage required = 21.30D+4 cubic metre.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 21.3 pg : 907"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#maximum load factor\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "c = 15000.; \t\t\t\t#installed capacity of plant\n",
+ "lf = 0.3; \t\t\t\t#load factor\n",
+ "eita = 0.82; \t\t\t\t#plant efficiency\n",
+ "H = 25; \t\t\t\t#working head\n",
+ "\n",
+ "# Calculations and Results\n",
+ "avg = c*lf; \t\t\t\t#average power developed\n",
+ "Q = avg/(9.81*H*eita);\n",
+ "Q = round(Q*100)/100;\n",
+ "print \"minimum discharge required in the stream = %.2f cumecs.\"%(Q);\n",
+ "\n",
+ "Q = 32; \t\t\t\t#for second case\n",
+ "P = 9.81*H*Q*eita;\n",
+ "lf = P*100/c;\n",
+ "lf = round(lf*10)/10;\n",
+ "print \"maximum load factor = %.2f percent.\"%(lf);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "minimum discharge required in the stream = 22.38 cumecs.\n",
+ "maximum load factor = 42.90 percent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch2_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch2_2.ipynb
new file mode 100644
index 00000000..9eb5c1ee
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch2_2.ipynb
@@ -0,0 +1,428 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:3545b25396a8ddd5a6290547da9d278c18ef204a72b66bd3a11c0eea3ce41199"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2 : METHODS OF IRRIGATION"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.1 pg : 21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "#Given\n",
+ "Q = 0.0108 #discharge through well\n",
+ "y = 0.075 #average depth of flow\n",
+ "I = 0.05 #average infiltration rate\n",
+ "A = 0.1 #area to cover\n",
+ "\n",
+ "# Calculations\n",
+ "t = (60*2.303*y*math.log10(Q/(Q-I*A)))/I\n",
+ "\n",
+ "# Results\n",
+ "print \"Time required to cover given area = %.f minutes.\"%(t)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Time required to cover given area = 56 minutes.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2 pg : 21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Given\n",
+ "Q = 0.0108 #discharge through well\n",
+ "y = 0.075 #average depth of flow\n",
+ "I = 0.05 #average infiltration rate\n",
+ "A = 0.1 #area to cover\n",
+ "\n",
+ "# Calculations\n",
+ "Amax = Q/I;\n",
+ "\n",
+ "# Results\n",
+ "print \"Maximum area that can be irrigated = %.2f hectare.\"%(Amax);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum area that can be irrigated = 0.22 hectare.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.3 pg : 22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "\n",
+ "#time of water application\n",
+ "#optimum length of each border strip\n",
+ "#dischrge for each border strip\n",
+ "\n",
+ "#Given\n",
+ "d = 0.05;\t\t\t\t\t\t\t\t#depth of root zone\n",
+ "I = 1.25E-5;\t\t\t\t\t\t\t\t#average infiltration rate\n",
+ "s = 0.0035\t\t\t\t\t\t\t\t#slope of border strip\n",
+ "t = d/(I*3600);\n",
+ "\n",
+ "# Calculations and Results\n",
+ "t = round(t*1000)/1000;\n",
+ "print \"Time of water application = %.2f hours.\"%(t);\n",
+ "\n",
+ "#Part (a)\n",
+ "q = 2E-3;\t\t\t\t\t\t\t\t#discharge entering water source\n",
+ "qdash = q*100**2*60;\n",
+ "n = 0.55425-(0.0001386*qdash);\n",
+ "yo = (n*q/(s**0.5))**0.6;\n",
+ "y = 0.665*yo;\n",
+ "L = (q/I)*(1-math.e**(-d/y));\n",
+ "L = round(10*L)/10;\n",
+ "print \"Part a:\";\n",
+ "print \"Optimum length of each border strip = %.2f m.\"%(L);\n",
+ "\n",
+ "#Part (b)\n",
+ "Lgiven = 150\t\t\t\t\t\t\t\t#given value of length\n",
+ "#First Trial\n",
+ "q = 3E-3;\n",
+ "qdash = q*100**2*60;\n",
+ "n = 0.55425-(0.0001386*qdash);\n",
+ "yo = (n*q/(s**0.5))**0.6;\n",
+ "y = 0.665*yo;\n",
+ "L = (q/I)*(1-math.e**(-d/y));\n",
+ "#second trial\n",
+ "q = 3.15E-3;\n",
+ "qdash = q*100**2*60;\n",
+ "n = 0.55425-(0.0001386*qdash);\n",
+ "yo = (n*q/(s**0.5))**0.6;\n",
+ "y = 0.665*yo;\n",
+ "L = (q/I)*(1-math.e**(-d/y));\n",
+ "q = 9*Lgiven*q*1000/L;\n",
+ "q = round(q*10)/10;\n",
+ "print \"Part b:\";\n",
+ "print \"Discharge for each border strip = %.2f lps.\"%(q);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Time of water application = 1.11 hours.\n",
+ "Part a:\n",
+ "Optimum length of each border strip = 101.90 m.\n",
+ "Part b:\n",
+ "Discharge for each border strip = 28.20 lps.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.4 pg : 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "#deep percolation loss\n",
+ "#water application efficiency and time of irrigation.\n",
+ "\n",
+ "#Given\n",
+ "B = 12.;\t\t\t\t#breadth of bamath.sin\n",
+ "L = 36.\t\t\t\t#length of bamath.sin\n",
+ "d = 70.\t\t\t\t#depth of irrigation\n",
+ "Ic = 70.\t\t\t\t#cumulative infiltration\n",
+ "kdash = 9;\n",
+ "ndash = 0.42;\n",
+ "#Part (a) \n",
+ "a = 5;\n",
+ "b = 0.6;\n",
+ "q = 1.5;\t\t\t\t#stream size\n",
+ "\n",
+ "# Calculations and Results\n",
+ "Q = (q*B)/1000;\n",
+ "tl = (L/a)**(1/b);\n",
+ "td = (Ic/kdash)**(1/ndash);\n",
+ "T = tl+td;\n",
+ "p = (1-(td/T)**(ndash))*100;\n",
+ "eita = (1-p/100)*100;\n",
+ "Tdash = (d*L*B)/(10*eita*Q*60);\n",
+ "p = round(p*100)/100;\n",
+ "eita = round(eita*100)/100;\n",
+ "Tdash = round(Tdash*10)/10;\n",
+ "print \"Part a:\"\n",
+ "print \"Deep percolation loss = %.2f percent.\"%(p);\n",
+ "print \"Water application efficiency = %.2f percent.\"%(eita);\n",
+ "print \"Time of irrigation = %.2f minutes.\"%(Tdash);\n",
+ "#part (b)\n",
+ "a = 8;\n",
+ "b = 0.6;\n",
+ "q = 3;\n",
+ "Q = (q*B)/1000;\n",
+ "tl = (L/a)**(1/b);\n",
+ "td = (Ic/kdash)**(1/ndash);\n",
+ "T = tl+td;\n",
+ "p = (1-(td/T)**(ndash))*100;\n",
+ "eita = (1-p/100)*100;\n",
+ "Tdash = (d*L*B)/(10*eita*Q*60);\n",
+ "p = round(p*100)/100;\n",
+ "eita = round(eita*100)/100;\n",
+ "Tdash = round(Tdash*10)/10;\n",
+ "\n",
+ "print \"Part b:\"\n",
+ "print \"Deep percolation loss = %.2f percent.\"%(p);\n",
+ "print \"Water application efficiency = %.2f percent.\"%(eita);\n",
+ "print \"Time of irrigation = %.2f minutes.\"%(Tdash);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part a:\n",
+ "Deep percolation loss = 7.47 percent.\n",
+ "Water application efficiency = 92.53 percent.\n",
+ "Time of irrigation = 30.30 minutes.\n",
+ "Part b:\n",
+ "Deep percolation loss = 3.66 percent.\n",
+ "Water application efficiency = 96.34 percent.\n",
+ "Time of irrigation = 14.50 minutes.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.5 pg : 31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import zeros\n",
+ "\n",
+ "\n",
+ "#given\n",
+ "d = 37.5\t\t\t\t#crop water requirement\n",
+ "W = 1.\t\t\t\t#furrow spacing\n",
+ "L = 120.\t\t\t\t#length of furrow\n",
+ "n = -0.49;\n",
+ "k = 38.;\n",
+ "Ttotal = 143.;\t\t\t\t#Total time of irrigation\n",
+ "A = [0 ,23, 52 ,88, 127]\t\t\t\t#given values of time of advance\n",
+ "B = zeros(5)\n",
+ "C = zeros(5)\n",
+ "D = zeros(5)\n",
+ "E = zeros(5)\n",
+ "\n",
+ "# Calculations\n",
+ "for i in range(5):\t\t\t\t#loop to find respective values of time of ponding\n",
+ " B[i] = 143-A[i] \n",
+ "\n",
+ "for j in range(5):\t\t\t\t#loop to find respective furrow infiltration\n",
+ " C[j] = B[j]**(n)*k;\n",
+ "\n",
+ "for K in range(4):\t\t\t\t#loop to find respective average infiltration\n",
+ " D[K] = (C[K]+C[K+1])/2;\n",
+ "\n",
+ "\n",
+ "E[0] = D[0];\n",
+ "for l in range(1,4):\t\t\t\t#loop to determine cumulative infiltration\n",
+ " E[l] = D[l]+E[l-1];\n",
+ "\n",
+ "I = E[3];\n",
+ "\n",
+ "T = (30*d*W*(n+1)/k)**(1/(n+1));\n",
+ "dav = ((24.5*Ttotal)+(I*(T-Ttotal)))/L;\n",
+ "q = ((120*37.5)-(24.5*143))/62;\n",
+ "T = round(T);\n",
+ "dav = round(dav*10)/10;\n",
+ "q = round(q*100)/100;\n",
+ "I = round(I*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"Maximum size of cut-back stream = %.2f lpm.\"%(I);\n",
+ "print \"Minimum size of cut-back stream = %.2f lpm.\"%(q);\n",
+ "print \"Time required for putting 37.5mm depth of water = %.2f minutes.\"%(T);\n",
+ "print \"Average depth of water required = %.2f mm.\"%(dav);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum size of cut-back stream = 19.69 lpm.\n",
+ "Minimum size of cut-back stream = 16.07 lpm.\n",
+ "Time required for putting 37.5mm depth of water = 205.00 minutes.\n",
+ "Average depth of water required = 39.40 mm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.6 pg : 32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Given\n",
+ "L = 100.;\t\t\t\t#length of furrow\n",
+ "W = 1.;\t\t\t\t#furrow spacing\n",
+ "s = 0.3\t\t\t\t#longitudnal slope of furrow\n",
+ "t1 = 80.\t\t\t\t#initial time flow of stream\n",
+ "t2 = 35.\t\t\t\t#final time flow of stream\n",
+ "\n",
+ "# Calculations\n",
+ "qm = 0.6/s;\n",
+ "q = qm*0.4;\n",
+ "dav = ((q*t2*60)+(2*t1*60))/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"Average depth of water applied = %.2f mm.\"%(dav);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Average depth of water applied = 112.80 mm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.7 pg : 40"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "#Given\n",
+ "Q = 0.0072;\t\t\t\t#discharge through well\n",
+ "y = 0.1;\t\t\t\t#average depth of flow\n",
+ "I = 0.05\t\t\t\t#infiltration capacity of soil\n",
+ "A = 0.04\t\t\t\t#area of land\n",
+ "\n",
+ "# Calculations\n",
+ "t = (2.303*y*60/I)*math.log10(Q/(Q-I*A));\n",
+ "Amax = Q/I;\n",
+ "t = round(t*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"Time required to irrigate = %.2f minutes.\"%(t);\n",
+ "print \"Maximum area that can be irrigated = %.2f ha.\"%(Amax);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Time required to irrigate = 39.06 minutes.\n",
+ "Maximum area that can be irrigated = 0.14 ha.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch3_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch3_2.ipynb
new file mode 100644
index 00000000..3e27009a
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch3_2.ipynb
@@ -0,0 +1,1440 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:fb46725fd841b00338dce4327765570824d962464729228190009d6ed499fe86"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3 : WATER REQUIREMENTS OF CROPS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.1 pg : 44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Given\n",
+ "Na = 24.; \t\t\t\t#concentration of sodium ion\n",
+ "Ca = 3.6; \t\t\t\t#concentration of calcium ion\n",
+ "Mg = 2.; \t\t\t\t#concentration of magnesium ion\n",
+ "EC = 180.; \t\t\t\t#electrical conductivity\n",
+ "\n",
+ "# Calculations\n",
+ "SAR = Na/(((Ca+Mg)/2)**(0.5)); \t\t\t\t#Sodium absorption ratio\n",
+ "SAR = round(SAR*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"SAR = %.2f.\"%(SAR);\n",
+ "print \"Water falls under S2 class.\"; \t\t\t\t#from table 3.2\n",
+ "print \"For EC = 180\";\n",
+ "print \"water falls under C1 class.\"; \t\t\t\t#from table 3.1\n",
+ "print \"Water is medium sodium and low saline water.\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "SAR = 14.34.\n",
+ "Water falls under S2 class.\n",
+ "For EC = 180\n",
+ "water falls under C1 class.\n",
+ "Water is medium sodium and low saline water.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.2 pg : 52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Given\n",
+ "gammad = 15.; \t\t\t\t#dry weigth of soil\n",
+ "gammaw = 9.81; \t\t\t\t#unit weigth of water\n",
+ "Fc = 0.3; \t\t\t\t#field capacity\n",
+ "pwp = 0.08; \t\t\t\t#permanent wilting point\n",
+ "d = 0.8; \t\t\t\t#root zone depth\n",
+ "\n",
+ "# Calculations\n",
+ "d1 = gammad*Fc*1000/gammaw;\n",
+ "d2 = gammad*pwp*1000/gammaw;\n",
+ "d3 = gammad*d*(Fc-pwp)*1000/gammaw;\n",
+ "\n",
+ "# Results\n",
+ "print \"Depth of moisture in root zone at field capacity = %.f mm/m.\"%(d1);\n",
+ "print \"Depth of moisture in root zone at permanent wilting point = %.f mm/m.\"%(d2);\n",
+ "print \"Depth of moisture available in root zone = %.f mm/m.\"%(d3);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Depth of moisture in root zone at field capacity = 459 mm/m.\n",
+ "Depth of moisture in root zone at permanent wilting point = 122 mm/m.\n",
+ "Depth of moisture available in root zone = 269 mm/m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3 pg : 52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Given\n",
+ "gammad = 15.3; \t\t\t\t#dry weigth of soil\n",
+ "gammaw = 9.81; \t\t\t\t#unit weigth of water\n",
+ "Fc = 0.15; \t\t\t\t#field capacity\n",
+ "Mc = 0.08; \t\t\t\t#moisture content before irrigation\n",
+ "D = 60.; \t\t\t\t#Depth of water applied\n",
+ "\n",
+ "# Calculations\n",
+ "d = (gammaw*D)/(gammad*(Fc-Mc));\n",
+ "\n",
+ "# Results\n",
+ "print \"Depth upto which soil profile is wetted = %.f mm.\"%(d);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Depth upto which soil profile is wetted = 550 mm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.4 pg :53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#Given\n",
+ "Sg = 1.6; \t\t\t\t#Apparent specific gravity\n",
+ "Fc = 0.2; \t\t\t\t#Field capacity\n",
+ "M1 = 150.; \t\t\t\t#mass of sample soil\n",
+ "M2 = 136.; \t\t\t\t#mass of sample after drying\n",
+ "d = 0.9; \t\t\t\t#depth of soil to be irrigated\n",
+ "\n",
+ "# Calculations\n",
+ "Mc = (M1-M2)/M2;\n",
+ "D = Sg*d*1000*(Fc-Mc);\n",
+ "\n",
+ "# Results\n",
+ "print \"Depth of water required to irrigate the soil = %.f mm.\"%(D);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Depth of water required to irrigate the soil = 140 mm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.5 pg : 53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\t\n",
+ "\n",
+ "#Given\n",
+ "d = 2.; \t\t\t\t#root zone depth\n",
+ "Wc = 0.05; \t\t\t\t#existing water content\n",
+ "gammad = 15; \t\t\t\t#dry density of soil\n",
+ "gammaw = 9.81; \t\t\t\t#unit weigth of water\n",
+ "Vw = 500. \t\t\t\t#water applied to the soil\n",
+ "Wl = 0.1; \t\t\t\t#water loss\n",
+ "A = 1000.; \t\t\t\t#area of plot\n",
+ "\n",
+ "# Calculations\n",
+ "Vu = Vw*0.9; \t\t\t\t#volume of water used in soil \n",
+ "Wu = Vu*gammaw; \t\t\t\t#weigth of water used in soil\n",
+ "Ws = A*d*gammad; \t\t\t\t#total dry weigth of soil\n",
+ "Wa = Wu*100/Ws; \t\t\t\t#percent water added\n",
+ "Fc = Wc*100+Wa; \n",
+ "Fc = round(Fc*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"The Field Capacity of soil is = %.2f percent.\"%(Fc);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Field Capacity of soil is = 19.72 percent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.6 pg : 53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Fc = 0.22; \t\t\t\t#Field Capacity\n",
+ "wc = 0.1; \t\t\t\t#wilting coefficient\n",
+ "gammad = 15.; \t\t\t\t#dry unit weigth of soil\n",
+ "gammaw = 9.81; \t\t\t\t#unit wiegth of water\n",
+ "d = 0.7; \t\t\t\t#root zone depth\n",
+ "w = 0.14; \t\t\t\t#falled moisture content\n",
+ "E = 0.75; \t\t\t\t#water application efficiency\n",
+ "\n",
+ "# Calculations\n",
+ "SC = gammad*d*(Fc-wc)*100/gammaw;\n",
+ "D = gammad*d*(Fc-w)*1000/gammaw;\n",
+ "FIR = D/E; \t\t\t\t#Field irrigation requirement\n",
+ "SC = round(SC*10)/10;\n",
+ "D = round(D);\n",
+ "FIR = round(FIR)+1;\n",
+ "\n",
+ "# Results\n",
+ "print \"Maximum storage capacity of soil = %.2f cm.\"%(SC);\n",
+ "print \"Water depth required to be applied = %.2f mm\"%(D);\n",
+ "print \"Field Irrigation Requirement = %.2f mm\"%(FIR);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum storage capacity of soil = 12.80 cm.\n",
+ "Water depth required to be applied = 86.00 mm\n",
+ "Field Irrigation Requirement = 115.00 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.7 pg : 55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Fc = 0.27; \t\t\t\t#Field capacity\n",
+ "pwp = 0.14; \t\t\t\t#permanent wilting point\n",
+ "gammad = 15.; \t\t\t\t#dry density of soil\n",
+ "gammaw = 9.81; \t\t\t\t#unit weigth of water\n",
+ "d = 0.75; \t\t\t\t#effective depth of root zone\n",
+ "Du = 11.; \t\t\t\t#daily consumptive use of water\n",
+ "\n",
+ "# Calculations\n",
+ "Am = Fc-pwp; \t\t\t\t#Available moisture\n",
+ "#let readily available moisture be 80 percent of available moisture\n",
+ "RAm = 0.8*Am;\n",
+ "Mo = Fc-RAm;\n",
+ "D = gammad*d*(Fc-Mo)*100/gammaw;\n",
+ "WF = D*10/Du;\n",
+ "\n",
+ "# Results\n",
+ "print \"Watering Frequency = %i days.\"%(WF);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Watering Frequency = 10 days.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.8 pg : 56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Fc = 0.22; \t\t\t\t#Field capacity\n",
+ "Sg = 1.56; \t\t\t\t#Apparent specific gravity\n",
+ "d = 0.6; \t\t\t\t#root zone depth\n",
+ "#irrigation is started when 70 percent of moisture is used\n",
+ "l = 250.; \t\t\t\t#length of field\n",
+ "b = 40.; \t\t\t\t#width of field\n",
+ "q = 20.; \t\t\t\t#Discharge\n",
+ "\n",
+ "# Calculations\n",
+ "m = (1-0.7)*Fc;\n",
+ "D = Sg*d*(Fc-m)*1000;\n",
+ "A = l*b;\n",
+ "t = A*D/(q*3600);\n",
+ "D = round(D);\n",
+ "t = round(t);\n",
+ "\n",
+ "# Results\n",
+ "print \"Net depth of irrigation water required = %.2f mm.\"%(D);\n",
+ "print \"Time required to irrigate field = %.2f hours.\"%(t);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Net depth of irrigation water required = 144.00 mm.\n",
+ "Time required to irrigate field = 20.00 hours.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.9 pg : 64"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\t\n",
+ "#Given\n",
+ "B = 110.; \t\t\t\t#Base period\n",
+ "D = 1400.; \t\t\t\t#Duty of water\n",
+ "\n",
+ "# Calculations\n",
+ "delta = 8.64*B*100/D;\n",
+ "delta = round(delta);\n",
+ "\n",
+ "# Results\n",
+ "print \"Delta for crop is = %.2f cm.\"%(delta);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Delta for crop is = 68.00 cm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.10 pg : 64"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\t\n",
+ "#Given\n",
+ "B = 120.; \t\t\t\t#Base period\n",
+ "delta = 92.; \t\t\t\t#total depth requirement of crop\n",
+ "\n",
+ "# Calculations\n",
+ "D = 8.64*B*100/delta;\n",
+ "\n",
+ "# Results\n",
+ "print \"Duty of water = %.2f hectares/cumec.\"%(D);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Duty of water = 1126.96 hectares/cumec.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.11 pg : 65"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Cr = 2.; \t\t\t\t#crop ratio\n",
+ "A = 80000.; \t\t\t\t#Area of field\n",
+ "CI = 85.; \t\t\t\t#percent field culturable irrigable\n",
+ "IK = 30.; \t\t\t\t#irrigation intensity during kharif season\n",
+ "IR = 60.; \t\t\t\t#irrigation intensity for rabi season\n",
+ "DuK = 800.; \t\t\t\t#Duty of water for kharif season\n",
+ "DuR = 1700.; \t\t\t\t#Duty of water for rabi season\n",
+ "\n",
+ "# Calculations\n",
+ "CIA = A*CI/100; \t\t\t\t#Culturable irrigable area\n",
+ "AK = CIA*IK/100; \t\t\t\t#Area under kharif season\n",
+ "AR = CIA*IR/100; \t\t\t\t#Area under rabi season\n",
+ "DK = AK/DuK;\n",
+ "DR = AR/DuR;\n",
+ "\n",
+ "\n",
+ "# Results\n",
+ "print \"Dischage required at head of canal during Kharif season = %.2f cumecs.\"%(DK);\n",
+ "print \"Dischage required at head of canal during Rabi season = %.2f cumecs.\"%(DR);\n",
+ "print \"Water requirement during kharif is greater than during rabi season\";\n",
+ "print \"Hence,canal should be designed to carry discharge of %.2f cumecs.\"%(DK);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dischage required at head of canal during Kharif season = 25.50 cumecs.\n",
+ "Dischage required at head of canal during Rabi season = 24.00 cumecs.\n",
+ "Water requirement during kharif is greater than during rabi season\n",
+ "Hence,canal should be designed to carry discharge of 25.50 cumecs.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.12 pg : 65"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Given\n",
+ "CA = 2600.; \t\t\t\t#culturable area\n",
+ "IS = 20.; \t\t\t\t#irrigation intensity for sugarcane\n",
+ "IR = 40.; \t\t\t\t#irrigation intensity for rice\n",
+ "DuS = 750.; \t\t\t\t#Duty of water for sugarcane\n",
+ "DuR = 1800.; \t\t\t\t#Duty of water for rice\n",
+ "PK = 1.2; \t\t\t\t#Peak demand\n",
+ "\n",
+ "# Calculations\n",
+ "AS = CA*IS/100; \t\t\t\t#Area under sugarcane \n",
+ "AR = CA*IR/100; \t\t\t\t#Area under rice\n",
+ "DS = AS/DuS;\n",
+ "DR = AR/DuR;\n",
+ "DT = DS+DR;\n",
+ "DD = PK*DT-0.005333+0.01;\n",
+ "DR = round(DR*1000)/1000;\n",
+ "DT = round(DT*1000)/1000;\n",
+ "\n",
+ "# Results\n",
+ "print \"Water required for Rice = %.2f cumecs.\"%(DR);\n",
+ "print \" Sugarcane is a perennial crop.\";\n",
+ "print \"Hence,Water required for Sugarcane = %.2f cumecs.\"%(DT);\n",
+ "print \"Design dischage to meet the peak demand = %.2f cumecs.\"%(DD);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Water required for Rice = 0.58 cumecs.\n",
+ " Sugarcane is a perennial crop.\n",
+ "Hence,Water required for Sugarcane = 1.27 cumecs.\n",
+ "Design dischage to meet the peak demand = 1.53 cumecs.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.13 pg : 66"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\t\n",
+ "#Given\n",
+ "ql = 20.; \t\t\t\t#discharge in left branch\n",
+ "Al = 20000.; \t\t\t\t#culturable area in left branch\n",
+ "Bl = 120.; \t\t\t\t#Base period in left branch\n",
+ "Il = 0.8; \t\t\t\t#intensity of rabi in left branch\n",
+ "qr = 8.; \t\t\t\t#discharge in rigth branch\n",
+ "Ar = 12000.; \t\t\t\t#culturable area in rigth branch\n",
+ "Br = 120.; \t\t\t\t#Base period in rigth branch\n",
+ "Ir = 0.5; \t\t\t\t#intensity of rabi in rigth branch\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#for left canal\n",
+ "ARl = Al*Il;\n",
+ "Dl = ARl/ql;\n",
+ "print \"Duty for left canal is = %i hectares/cumecs.\"%(Dl);\n",
+ "\n",
+ "#for rigth canal\n",
+ "ARr = Ar*Ir;\n",
+ "Dr = ARr/qr;\n",
+ "print \"Duty for left canal is = %i hectares/cumecs.\"%(Dr);\n",
+ "print \"Since,left canal has higher duty,it is more efficient\";\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Duty for left canal is = 800 hectares/cumecs.\n",
+ "Duty for left canal is = 750 hectares/cumecs.\n",
+ "Since,left canal has higher duty,it is more efficient\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.14 pg : 66"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Given\n",
+ "CA = 1200.; \t\t\t\t#culturable area\n",
+ "IA = 0.4; \t\t\t\t#intensity of irrigation of crop A\n",
+ "IB = 0.35; \t\t\t\t#intensity of irrigation of crop B\n",
+ "bA = 20.; \t\t\t\t#kor period of crop A\n",
+ "bB = 15.; \t\t\t\t#kor period of crop B\n",
+ "deltaA = 0.1; \t\t\t\t#kor depth of crop A\n",
+ "deltaB = 0.16; \t\t\t\t#kor depth of crop B\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#crop A\n",
+ "A = CA*IA;\n",
+ "Du = 8.64*bA/deltaA;\n",
+ "qA = A/Du;\n",
+ "qA = round(qA*1000)/1000;\n",
+ "print \"Discharge required for crop A = %.2f cumec.\"%(qA);\n",
+ "\n",
+ "#crop B\n",
+ "A = CA*IB;\n",
+ "Du = 8.64*bB/deltaB;\n",
+ "qB = A/Du;\n",
+ "qB = round(qB*1000)/1000;\n",
+ "print \"Discharge required for crop B = %.2f cumec.\"%(qB);\n",
+ "D = qA+qB;\n",
+ "D = round(D*10)/10;\n",
+ "print \"Design discharge of water course = %.2f cumec.\"%(D);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Discharge required for crop A = 0.28 cumec.\n",
+ "Discharge required for crop B = 0.52 cumec.\n",
+ "Design discharge of water course = 0.80 cumec.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.15 pg : 67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "#Given\n",
+ "B = 12.; \t\t\t\t#transplantaion period\n",
+ "D = 0.5; \t\t\t\t#total depth of water required by the crop\n",
+ "R = 0.1; \t\t\t\t#rain falling on field\n",
+ "L = 0.2; \t\t\t\t#loss of water\n",
+ "A = 600.; \t\t\t\t#irrigated area\n",
+ "I = 0.6; \t\t\t\t#intensity of irrigation\n",
+ "delta = D-R;\n",
+ "Dui = 8.64*B/delta;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#math.since water loss is 20 percent\n",
+ "Du = (1-L)*Dui;\n",
+ "print \"Duty of water required = %.2f hectares/cumec.\"%(Du);\n",
+ "\n",
+ "TA = I*A;\n",
+ "q = TA/Du;\n",
+ "q = round(q*100)/100;\n",
+ "print \"Discharge at head of water course = %.2f cumecs.\"%(q);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Duty of water required = 207.36 hectares/cumec.\n",
+ "Discharge at head of water course = 1.74 cumecs.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.16 pg : 67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#Given\n",
+ "CF = 0.8; \t\t\t\t#Capacity factory\n",
+ "Tf = 13./20; \t\t\t\t#time factor\n",
+ "A = [850., 120., 600., 500., 360.]; \t\t\t\t\n",
+ "#Given values of area\n",
+ "B = [320., 90., 120., 120., 120.]; \t\t\t\t\n",
+ "#Given values of Base period\n",
+ "D = [580., 580., 1600. ,2000., 600.]; \t\t\t\t\n",
+ "#Given values of duty at head canal\n",
+ "\n",
+ "# Calculations and Results\n",
+ "DS = A[0]/D[0]; \t\t\t\t#discharge for sugarcane \n",
+ "DOS = A[1]/D[1]; \t\t\t\t#discharge for overlap sugarcane\n",
+ "DW = A[2]/D[2]; \t\t\t\t#discharge for wheat\n",
+ "DB = A[3]/D[3]; \t\t\t\t#discharge for bajri\n",
+ "DV = A[4]/D[4]; \t\t\t\t#discharge for vegetables\n",
+ "DR = DS+DW;\n",
+ "DM = DS+DB;\n",
+ "DH = DS+DOS+DV;\n",
+ "print \"Maximum demand is in hot weather\";\n",
+ "q = DH/Tf;\n",
+ "D = q/CF;\n",
+ "q = round(1000*q)/1000;\n",
+ "D = round(100*D)/100;\n",
+ "print \"Full supply discharge at head = %.2f cumecs\"%(q);\n",
+ "print \"Design discharge = %.2f cumecs.\"%(D);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum demand is in hot weather\n",
+ "Full supply discharge at head = 3.50 cumecs\n",
+ "Design discharge = 4.37 cumecs.\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.17 pg : 68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import zeros\n",
+ "\n",
+ "#Given\n",
+ "CL = 0.2; \t\t\t\t#Canal loss\n",
+ "RL = 0.12; \t\t\t\t#Reservior loss\n",
+ "A = [4800., 5600., 2400., 3200., 1400]; \t\t\t\t\n",
+ "#Given values of area under crop\n",
+ "D = [1800., 800., 1400., 900., 700]; \t\t\t\t\n",
+ "#Given values of duty at field\n",
+ "B = [120., 360., 200., 120., 120]; \t\t\t\t\n",
+ "#Given values of base period\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#(a) Wheat\n",
+ "d = A[0]/D[0];\n",
+ "V1 = d*B[0];\n",
+ "#(b) Sugarcane\n",
+ "d = A[1]/D[1];\n",
+ "V2 = d*B[1];\n",
+ "#(c) Cotton\n",
+ "d = A[2]/D[2];\n",
+ "V3 = round(d*B[2]);\n",
+ "#(d) Rice\n",
+ "d = A[3]/D[3];\n",
+ "V4 = round(d*B[3]);\n",
+ "#(e) vegetables\n",
+ "d = A[4]/D[4];\n",
+ "V5 = d*B[4];\n",
+ "\n",
+ "Vd = (V1+V2+V3+V4+V5)*8.64;\n",
+ "SC = Vd/((1-CL)*(1-RL));\n",
+ "print \"Reservior capacity = %.2f hectare-metres.\"%(SC);\n",
+ "\n",
+ "#Alternative method\n",
+ "delta = zeros(5)\n",
+ "for i in range(5):\n",
+ " delta[i] = 8.64*B[i]/D[i];\n",
+ "V = zeros(5)\n",
+ "for j in range(5):\n",
+ " V[j] = A[j]*delta[j];\n",
+ "\n",
+ "s = 0;\n",
+ "for k in range(5):\n",
+ " s = s+V[k];\n",
+ "\n",
+ "SC = s/((1-CL)*(1-RL));\n",
+ "\n",
+ "print \" By Alternative method.Storage capacity = %.f hectare-metres.\"%(SC);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Reservior capacity = 47250.00 hectare-metres.\n",
+ " By Alternative method.Storage capacity = 47244 hectare-metres.\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.18 pg : 82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import zeros\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "eita = 0.7; \t\t\t\t#water application efficiency\n",
+ "k = 0.75; \t\t\t\t#crop factor\n",
+ "T = [19., 16., 12.,.5, 13.]; \t\t\t\t\n",
+ "#Given values of temperature\n",
+ "p = [7.19 ,7.15, 7.30, 7.03]; \t\t\t\t#daytime hours of the year\n",
+ "RD = 1.2; \t\t\t\t#rainfall in december\n",
+ "RJ = 0.8; \t\t\t\t#rainfall in january\n",
+ "\n",
+ "f = zeros(4)\n",
+ "for i in range(4):\n",
+ " f[i] = p[i]*(1.8*T[i]+32)/40;\n",
+ "\n",
+ "s = 0;\n",
+ "for i in range(4): \n",
+ " s = s+f[i];\n",
+ "\n",
+ "C = k*s;\n",
+ "R = RD+RJ;\n",
+ "CIR = C-R;\n",
+ "FIR = CIR/eita;\n",
+ "C = round(10*C)/10;\n",
+ "CIR = round(CIR*10)/10;\n",
+ "FIR = round(FIR*10)/10;\n",
+ "\n",
+ "# Results\n",
+ "print \"Consumptive use = %.2f cm.\"%(C);\n",
+ "print \"consumptive irrigatin requirement = %.2f cm.\"%(CIR);\n",
+ "print \"field irrigatio reqiurement = %.2f cm.\"%(FIR);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Consumptive use = 28.70 cm.\n",
+ "consumptive irrigatin requirement = 26.70 cm.\n",
+ "field irrigatio reqiurement = 38.20 cm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.19 pg : 83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "L = 20.; \t\t\t\t#latitude of place(degree North)\n",
+ "T = 15.; \t\t\t\t#mean monthly temperature(degree celcius)\n",
+ "RH = 0.5; \t\t\t\t#relative humidity\n",
+ "E = 250.; \t\t\t\t#elevation of area\n",
+ "V = 25.; \t\t\t\t#wind velocity at 2 m heigth\n",
+ "\n",
+ "#from table 3.10\n",
+ "VP = 12.79; \t\t\t\t#saturation vapour pressure\n",
+ "s = 0.8; \t\t\t\t#slope of curve between vapur pressure and temperature\n",
+ "#from table 3.11\n",
+ "R = 10.8;\n",
+ "#from table 3.12\n",
+ "N = 11.1;\n",
+ "#from table 3.9\n",
+ "n = 7.74;\n",
+ "\n",
+ "# Calculations\n",
+ "p = n/N;\n",
+ "e = VP*RH;\n",
+ "Ea = 0.002187*(160+V)*(VP-e);\n",
+ "r = 0.2;\n",
+ "alpha = 0.49;\n",
+ "sigma = 2.01E-9;\n",
+ "Ta = 293;\n",
+ "H = R*(1-r)*(0.29*math.cos(math.pi/9)+0.55*p)-sigma*Ta**4*(0.56-0.092*e**0.5)*(0.10+0.9*p);\n",
+ "Et = (s*H+alpha*Ea)*31/(s+alpha);\n",
+ "Et = round(Et*10)/10;\n",
+ "\n",
+ "# Results\n",
+ "print \"consumptive use of rice in january = %.2f mm of water.\"%(Et);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "consumptive use of rice in january = 71.60 mm of water.\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.20 pg : 89"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Fc = 0.27; \t\t\t\t#Field capacity\n",
+ "pwp = 0.13; \t\t\t\t#permanent wilting point\n",
+ "d = 80.; \t\t\t\t#depth of soil(cm)\n",
+ "gammad = 1.5; \t\t\t\t#dry unit weigth of soil(g/cc)\n",
+ "gammaw = 1.; \t\t\t\t#unit weigth of water(g/cc)\n",
+ "M = 0.18; \t\t\t\t#avearge soil moisture\n",
+ "eita = 0.8; \t\t\t\t#field efficiency\n",
+ "FC = 0.15; \t\t\t\t#field channel\n",
+ "\n",
+ "# Calculations\n",
+ "SC = gammad*d*(Fc-pwp)/gammaw;\n",
+ "D = gammad*d*(Fc-M)/gammaw;\n",
+ "FIR = D/eita;\n",
+ "W = FIR/(1-FC);\n",
+ "W = round(W*10)/10;\n",
+ "\n",
+ "# Results\n",
+ "print \"maximum storage capacity = %.2f cm\"%(SC);\n",
+ "print \"depth of irrigation water = %.2f cm\"%(D);\n",
+ "print \"field irrigation requirement = %.2f cm\"%(FIR);\n",
+ "print \"water required at canal outlet = %.2f cm\"%(W);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum storage capacity = 16.80 cm\n",
+ "depth of irrigation water = 10.80 cm\n",
+ "field irrigation requirement = 13.50 cm\n",
+ "water required at canal outlet = 15.90 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.21 pg : 89"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import zeros\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "W = 0.4; \t\t\t\t#amount of water available from precipitation\n",
+ "Cl = 0.15; \t\t\t\t#Channel loss\n",
+ "RL = 0.1; \t\t\t\t#reservior loss\n",
+ "B = [120., 320., 120., 200., 100]; \t\t\t\t#Base period\n",
+ "D = [1800., 800., 900., 1400., 1200];\t\t\t\t#Duty at field\n",
+ "A = [500., 600., 300., 1200., 500]; \t\t\t\t#Area under crop\n",
+ "\n",
+ "# Calculations\n",
+ "for i in range(5):\n",
+ " delta[i] = 8.64*B[i]/D[i];\n",
+ "\n",
+ "V = zeros(5)\n",
+ "for i in range(5):\n",
+ " V[i] = delta[i]*A[i];\n",
+ "\n",
+ "s = 0;\n",
+ "for i in range(5):\n",
+ " s = s+V[i];\n",
+ "\n",
+ "C = s*(1-W)/((1-Cl)*(1-RL));\n",
+ "\n",
+ "# Results\n",
+ "print \"Reservior capacity = %.f ha-m.\"%(C);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Reservior capacity = 3567 ha-m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.22 pg : 90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\t\n",
+ "#Given\n",
+ "GCA = 10000.; \t\t\t\t#gross commanded area\n",
+ "CCA = 0.75*GCA; \t\t\t\t#Culturable commanded area\n",
+ "IR = 0.6; \t\t\t\t#intensity of irrigation during rabi season\n",
+ "IK = 0.3; \t\t\t\t#intensity of irrigation during kharif season \n",
+ "DuR = 2500.; \t\t\t\t#duty during rabi season\n",
+ "DuK = 1000.; \t\t\t\t#duty during kharif season\n",
+ "\n",
+ "# Calculations\n",
+ "AR = IR*CCA; \t\t\t\t#area under irrigation in rabi season\n",
+ "AK = IK*CCA; \t\t\t\t#area under irrigation in kharif season\n",
+ "DR = AR/DuR;\n",
+ "DK = AK/DuK;\n",
+ "\n",
+ "# Results\n",
+ "print \"discharge required at head of distributory = %.2f cumecs.\"%(DK);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "discharge required at head of distributory = 2.25 cumecs.\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.23 pg : 90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Fc = 0.18; \t\t\t\t#field capacity\n",
+ "wc = 0.07; \t\t\t\t#wilting cofficient\n",
+ "Sg = 1.35; \t\t\t\t#bulk density of soil\n",
+ "d = 1.2; \t\t\t\t#root zone depth\n",
+ "\n",
+ "# Calculations and Results\n",
+ "m = Fc-wc;\n",
+ "mo = wc+m/3;\n",
+ "dw = 100*Sg*d*(Fc-mo);\n",
+ "print \"Depth of water required = %.2f cm\"%(dw);\n",
+ "ev1 = 1.1; \t\t\t\t#average evapotranspiration rates in 1 NOV-30 NOV\n",
+ "ev2 = 1.7; \t\t\t\t#average evapotranspiration rates in 1 DEC-31 DEC\n",
+ "ev3 = 2.4; \t\t\t\t#average evapotranspiration rates in 1 JAN-31 JAN\n",
+ "ev4 = 1.5; \t\t\t\t#average evapotranspiration rates in 1 FEB-28 FEB\n",
+ "ev5 = 3.5; \t\t\t\t#average evapotranspiration rates in 1 MAR-25 MAR\n",
+ "\t\t\t\t#irrigation requirement from 1 NOV to 3 JAn\n",
+ "dev = (ev1*30+ev2*31+ev3*3)/10;\n",
+ "print \"Water consumed by evapotranspiration = %.2f cm.\"%(dev);\n",
+ "print \"No water is required during 1 NOV-3 JAN\";\n",
+ "\n",
+ "\t\t\t\t#irrigation requirement after 3rd JAN\n",
+ "ws = (ev3-1.5)*16/10; \t\t\t\t#water consumed from soil from 4 JAN-19 JAN\n",
+ "ts = ws+dev; \t\t\t\t#water withdrawn from soil from 1 NOV-19 JAN\n",
+ "s = (dw-ts)*10;\n",
+ "day = s/ev3;\n",
+ "depth = ts+(4*ev3)/10+(2*ev3)/10;\n",
+ "print \"depth of water required in first irrigation = %.2f cm.\"%(depth);\n",
+ "\t\t\t\t#/irrigation requirement from 26 JAn to 25 MAR\n",
+ "w1 = ev3*6;\n",
+ "w2 = ev4*28;\n",
+ "w3 = ev5*25;\n",
+ "W = w1+w2+w3;\n",
+ "x = (dw*10-(14.4+42))/ev5;\n",
+ "print \"Hence second irrigation is required after %.2f days i.e on 18th March.\"%(x);\n",
+ "depth1 = (W-(dw*10))/10;\n",
+ "print \"required water depth = %.2f cm\"%(depth1);\n",
+ "print \"First Watering on 29 JAn and 30 JAN = %.2f cm.Second watering required on 18th March = %.2f cm.\"%(depth,depth1);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Depth of water required = 11.88 cm\n",
+ "Water consumed by evapotranspiration = 9.29 cm.\n",
+ "No water is required during 1 NOV-3 JAN\n",
+ "depth of water required in first irrigation = 12.17 cm.\n",
+ "Hence second irrigation is required after 17.83 days i.e on 18th March.\n",
+ "required water depth = 2.51 cm\n",
+ "First Watering on 29 JAn and 30 JAN = 12.17 cm.Second watering required on 18th March = 2.51 cm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.24 pg : 91"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Fc = 0.26; \t\t\t\t#Field capacity of soil\n",
+ "A = 3000.; \t\t\t\t#Area of field\n",
+ "OM = 0.12; \t\t\t\t#optimum moisture \n",
+ "pwp = 0.1; \t\t\t\t#permanent wilting point\n",
+ "d = 80.; \t\t\t\t#depth of root zone\n",
+ "RD = 1.4; \t\t\t\t#relative density of soil\n",
+ "f = 10.; \t\t\t\t#frequency of irrigation\n",
+ "eita = 0.23; \t\t\t\t#overall efficiency\n",
+ "\n",
+ "# Calculations\n",
+ "D = RD*d*(Fc-OM);\n",
+ "U = D*10/f;\n",
+ "Wr = A*D*100;\n",
+ "q = Wr/(f*24*3600);\n",
+ "q = round(q*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"daily consumptive = %.2f mm.\"%(U);\n",
+ "print \"discharge in canal = %.2f q cumecs.\"%(q);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "daily consumptive = 15.68 mm.\n",
+ "discharge in canal = 5.44 q cumecs.\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.25 pg : 92"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\t\n",
+ "#Given\n",
+ "C1 = 0.2; \t\t\t\t#consumptive requirement of crop for 1 to 15 days\n",
+ "C2 = 0.3; \t\t\t\t#consumptive requirement of crop for 16 to 40 days\n",
+ "C3 = 0.5; \t\t\t\t#consumptive requirement of crop for 41 to 50 days\n",
+ "C4 = 0.1; \t\t\t\t#consumptive requirement of crop for 51 to 55 days\n",
+ "A = 50.; \t\t\t\t#area of land\n",
+ "wr = 5.; \t\t\t\t#presowing water requirement\n",
+ "R = 3.5; \t\t\t\t#rainfall during 36th and 45th day\n",
+ "\n",
+ "# Calculations\n",
+ "w1 = 15*C1*100;\n",
+ "w2 = 25*C2*100;\n",
+ "w3 = 10*C3*100;\n",
+ "w4 = 5*C4*100;\n",
+ "w5 = 5*100;\n",
+ "W = w1+w2+w3+w4+w5;\n",
+ "ER = 3.5*100;\n",
+ "q = (W-ER)*A;\n",
+ "\n",
+ "# Results\n",
+ "print \"total water to be delivered = %i cubic metre.\"%(q);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "total water to be delivered = 87500 cubic metre.\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.26 pg : 93"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Fc = 0.3; \t\t\t\t#field capacity\n",
+ "pwp = 0.11; \t\t\t\t#permanent wilting percent\n",
+ "gammad = 1300.; \t\t\t\t#density of soil\n",
+ "gammaw = 1000.; \t\t\t\t#density of water\n",
+ "d = 700.; \t\t\t\t#root zone depth\n",
+ "CW = 12.; \t\t\t\t#daily consumptive use of water\n",
+ "\n",
+ "# Calculations\n",
+ "WHC = Fc-pwp;\n",
+ "mo = Fc-(0.75*WHC);\n",
+ "D = gammad*d*(Fc-mo)/gammaw;\n",
+ "I = D/CW;\n",
+ "\n",
+ "# Results\n",
+ "print \" watering interval = %i days\"%(I); "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " watering interval = 10 days\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.27 pg : 94"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\t\n",
+ "#Given\n",
+ "A = 1000.; \t\t\t\t#total area\n",
+ "AI = 0.7*A; \t\t\t\t#area under irrigation\n",
+ "B = 15.; \t\t\t\t#Base period\n",
+ "d = 500.; \t\t\t\t#depth of water required during transplantation\n",
+ "R = 120.; \t\t\t\t#useful rain falling\n",
+ "Wl = 0.2; \t\t\t\t#water loss\n",
+ "\n",
+ "# Calculations\n",
+ "delta = d-R;\n",
+ "Du = 8.64*B*1000/delta;\n",
+ "DuH = Du*(1-Wl);\n",
+ "q = AI/DuH;\n",
+ "q = round(q*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"Duty of water = %i hec/cumec.\"%(Du);\n",
+ "print \"discharge required in water course = %.2f cumecs.\"%(q);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Duty of water = 341 hec/cumec.\n",
+ "discharge required in water course = 2.57 cumecs.\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.28 pg : 94"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy import zeros\n",
+ "\n",
+ "#Given\n",
+ "Ar = 4000.; \t\t\t\t#culturable commanded area\n",
+ "CL = 0.25; \t\t\t\t#canal loss\n",
+ "RL = 0.15; \t\t\t\t#reservior loss\n",
+ "B = [120., 360., 180., 120., 120.]; \t\t\t\t#base period\n",
+ "D = [1800., 1700., 1400., 800., 700.];\t\t\t\t#duty of water\n",
+ "I = [20., 20., 10., 15., 15.]; \t\t\t\t#intensity of irrigation\n",
+ "\n",
+ "A = zeros(5)\n",
+ "# Calculations\n",
+ "for i in range(5):\n",
+ " A[i] = Ar*I[i]/10; \t\t\t\t#area under crop\n",
+ "\n",
+ "Q = zeros(5)\n",
+ "for i in range(5):\n",
+ " Q[i] = A[i]/D[i]; \t\t\t\t#discharge required\n",
+ "\n",
+ "for i in range(5):\n",
+ " V[i] = 8.64E4*Q[i]*B[i]; \t\t\t\t#quantity of water\n",
+ "\n",
+ "s = 0;\n",
+ "for i in range(5):\n",
+ " s = s+V[i];\n",
+ "\n",
+ "SC = round(s/((1-CL)*(1-RL)*1000000));\n",
+ "\n",
+ "# Results\n",
+ "print \"Storage capacity = %iD+06 cubic metre.\"%(SC);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Storage capacity = 633D+06 cubic metre.\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch4_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch4_2.ipynb
new file mode 100644
index 00000000..18b7f145
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch4_2.ipynb
@@ -0,0 +1,4206 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:033745b410f5600277c72898ac863673544d034d47cd6c2ef34b30fd421a95c8"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4 : HYDROLOGY\n"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.1 pg : 113"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\t\n",
+ "#Given\n",
+ "p = [78.8, 90.2, 98.6, 102.4, 70.4]; \t\t\t\t#rain guage readings at respective stations\n",
+ "s = 0.;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "for i in range(5):\n",
+ " s = s+p[i];\n",
+ "\n",
+ "pavg = s/5;\n",
+ "u = 0;\n",
+ "for i in range(5):\n",
+ " u = u+(p[i]-pavg)**2;\n",
+ "\n",
+ "sx = (u/4)**0.5;\n",
+ "Cv = sx*100/pavg;\n",
+ "N = (Cv/6)**2;\n",
+ "N = round(N*100)/100;\n",
+ "print \"mean rainfall = %.2f cm.\"%(pavg);\n",
+ "print \"total stations needed = %.2f.\"%(N);\n",
+ "#taking N = 7\n",
+ "N = 7;\n",
+ "n = N-5;\n",
+ "print \"additional guages needed = %i.\"%(n);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "mean rainfall = 88.08 cm.\n",
+ "total stations needed = 6.44.\n",
+ "additional guages needed = 2.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.2 pg : 115"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\t\n",
+ "#Given\n",
+ "pB = 48.; \t\t\t\t#precipitation at B\n",
+ "pC = 51.; \t\t\t\t#precpitation at C\n",
+ "pD = 45.; \t\t\t\t#precipitation at D\n",
+ "\n",
+ "# Calculations\n",
+ "pA = (pB+pC+pD)/3;\n",
+ "\n",
+ "# Results\n",
+ "print \"precipitation at A = %i mm.\"%(pA);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "precipitation at A = 48 mm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.3 pg : 115"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\t\n",
+ "#Given\n",
+ "pA = 6.6; \t\t\t\t#precipitation at A\n",
+ "pB = 4.8; \t\t\t\t#precpitation at B\n",
+ "pC = 3.7; \t\t\t\t#precipitation at C\n",
+ "nA = 72.6; \t\t\t\t#normal precipitation at A\n",
+ "nB = 51.8; \t\t\t\t#normal precipitation at B\n",
+ "nC = 38.2; \t\t\t\t#normal precipitation at C\n",
+ "nX = 65.6; \t\t\t\t#normal precipitation at X\n",
+ "\n",
+ "# Calculations\n",
+ "pX = (nX*pA/nA+nX*pB/nB+nX*pC/nC)/3;\n",
+ "pX = round(pX*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"precipitation at x = %.2f cm.\"%(pX);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "precipitation at x = 6.13 cm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.4 pg : 115"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\t\n",
+ "#Given\n",
+ "pB = 74.; \t\t\t\t#precipitation at B\n",
+ "pC = 88.; \t\t\t\t#precpitation at C\n",
+ "pD = 71.; \t\t\t\t#precipitation at D\n",
+ "pE = 80.; \t\t\t\t#precipitation at E\n",
+ "Bx = 9.;\n",
+ "By = 6.;\n",
+ "Cx = 12.;\n",
+ "Cy = -9.;\n",
+ "Dx = -11.;\n",
+ "Dy = -6.;\n",
+ "Ex = -7.;\n",
+ "Ey = 7.;\n",
+ "Ax = 0;\n",
+ "Ay = 0;\n",
+ "\n",
+ "# Calculations\n",
+ "Db = (Bx**2+By**2);\n",
+ "Dc = (Cx**2+Cy**2);\n",
+ "Dd = (Dx**2+Dy**2);\n",
+ "De = (Ex**2+Ey**2);\n",
+ "Wb = 1/Db;\n",
+ "Wc = 1/Dc;\n",
+ "Wd = 1/Dd;\n",
+ "We = 1/De;\n",
+ "s = pB*Wb+pC*Wc+pD*Wd+pE*We;\n",
+ "pA = s/(Wb+Wc+Wd+We);\n",
+ "pA = round(pA*10)/10;\n",
+ "\n",
+ "# Results\n",
+ "print \"precipitation at A = %.2f mm.\"%(pA);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "precipitation at A = 77.50 mm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.5 pg : 119"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import zeros\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "p = [58., 61., 69., 56., 84., 86., 69., 79., 71.]; \t\t\t\t#values of precipitation\n",
+ "s = 0;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "for i in range(9):\n",
+ " s = s+p[i];\n",
+ "ar = s/9;\n",
+ "ar = round(ar*10)/10;\n",
+ "print \"umath.sing arithmatic average method:\"\n",
+ "print \"Average rainfall = %.2f cm.\"%(ar);\n",
+ "\n",
+ "I = [86., 85., 80., 75., 70., 65., 60., 55., 50.]; \t\t\t\t#isphytes\n",
+ "A = [0.43, 5.20, 4.0, 5.04, 5.85, 4.53, 4.09, 1.27]; \t\t\t\t#area between isohytes\n",
+ "\n",
+ "a = zeros(9)\n",
+ "for i in range(8):\n",
+ " a[i] = (I[i]+I[i+1])/2;\n",
+ "\n",
+ "P = zeros(8)\n",
+ "for i in range(8):\n",
+ " P[i] = A[i]*a[i];\n",
+ "\n",
+ "s = 0;\n",
+ "for i in range(8):\n",
+ " s = s+P[i];\n",
+ "\n",
+ "t = 0;\n",
+ "for i in range(8):\n",
+ " t = t+A[i];\n",
+ "\n",
+ "ar = s/t;\n",
+ "ar = round(ar*10)/10;\n",
+ "print \"isohytel method:\"\n",
+ "print \"Average rainfall = %.2f cm.\"%(ar);\n",
+ "\n",
+ "A = [3.26, 0.39, 1.61, 2.04, 2.46, 0.84, 3.91, 5.09, 0.41, 3.94, 2.06, 4.40]; \t\t\t\t#thiessen area\n",
+ "p = [58., 63., 71., 69., 86., 81., 84., 56., 53., 69., 61., 79.]; \t\t\t\t#observed precipitation\n",
+ "P = zeros(12)\n",
+ "for i in range(12):\n",
+ " P[i] = A[i]*p[i];\n",
+ "\n",
+ "s = 0;\n",
+ "for i in range(12):\n",
+ " s = s+P[i];\n",
+ "\n",
+ "t = 0;\n",
+ "for i in range(12):\n",
+ " t = t+A[i];\n",
+ "\n",
+ "ar = s/t;\n",
+ "ar = round(ar*10)/10;\n",
+ "print \"thiesson polygon method:\"\n",
+ "print \"Average rainfall = %.2f cm.\"%(ar);\n",
+ "\n",
+ "#mean rainfall obtained by thiesson polygon method is different from book as product(A*P) is round offed in book.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "umath.sing arithmatic average method:\n",
+ "Average rainfall = 70.30 cm.\n",
+ "isohytel method:\n",
+ "Average rainfall = 69.70 cm.\n",
+ "thiesson polygon method:\n",
+ "Average rainfall = 70.00 cm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.6 pg : 127"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%matplotlib inline\n",
+ "import math \n",
+ "from matplotlib.pyplot import plot\n",
+ "from numpy import zeros\n",
+ "\n",
+ "\n",
+ "#Given\n",
+ "X = [69., 55., 62., 67., 87., 70., 65., 75., 90., 100., 90., 95., 85., 90., 75., 95.]; \t\t\t\t#annual rainfall at X\n",
+ "Y = [77., 62., 67., 68., 86., 90., 65., 75, 70, 70, 70 ,75 ,65 ,70, 55, 75]; \t\t\t\t#average rainfall at 10 base stations\n",
+ "cx = zeros(16)\n",
+ "cx[0] = 69; \t\t\t\t#accumulated annual values at station X \n",
+ "for i in range(1,16):\n",
+ " cx[i] = cx[i-1]+X[i];\n",
+ "\n",
+ "cy = zeros(16)\n",
+ "cy[0] = 77;\n",
+ "for i in range(1,16):\n",
+ " cy[i] = cy[i-1]+Y[i]; \t\t\t\t#accumulated annual values at ten stations\n",
+ " \n",
+ "\n",
+ "#since curve is not having unform slope\n",
+ "print \"Record at X is not consistent.\";\n",
+ "print \"From the curve regime is observed in the year 1978.\"\n",
+ "\n",
+ "Q = [1970., 1971., 1972., 1973., 1974., 1975., 1976., 1977.];\n",
+ "O = [95., 75., 90., 85., 95., 90., 100., 90.];\n",
+ "A = zeros(8)\n",
+ "for i in range(8):\n",
+ " A[i] = 0.7051*O[i];\n",
+ "\n",
+ "print \"Year Observed rainfall Adjusted rainfall\";\n",
+ "for i in range(8):\n",
+ " print \"%i %i %i\"%(Q[i],O[i],A[i]);\n",
+ "\n",
+ "#graph is plotted between cx and cy\n",
+ "plot(cy,cx,cy,cx,\"ro\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Record at X is not consistent.\n",
+ "From the curve regime is observed in the year 1978.\n",
+ "Year Observed rainfall Adjusted rainfall\n",
+ "1970 95 66\n",
+ "1971 75 52\n",
+ "1972 90 63\n",
+ "1973 85 59\n",
+ "1974 95 66\n",
+ "1975 90 63\n",
+ "1976 100 70\n",
+ "1977 90 63\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 3,
+ "text": [
+ "[<matplotlib.lines.Line2D at 0x107357550>,\n",
+ " <matplotlib.lines.Line2D at 0x1073577d0>]"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEACAYAAACznAEdAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHfpJREFUeJzt3Xt4VNW5x/EvDRAvWBHtg1zUaACBlhakgojo6DGYOq14\nvHGTkwry2IMweClKQCWPiAJVKcS7CKJClIrHqlwkUEZUGlAuikI0jKIGSxSviHJJMuePtWMmw4SQ\nue3Ze36f58kze9bszF5Lh3mz1+VdICIiIiIiIiIiIiIiIiIiIiIiIiIiErM5QAWwOcJrNwPVQKuQ\nsnygDCgF+oeU97TeowyYmZCaiohIQvUDenBwQDgJWAZ8TG1A6ApsApoBWcA2oIn12jqgl3W8BMhN\nWI1FRCQqv2jg9deBbyKU3w/cElY2ACgCDgDbMQGhN9AGOAYTFACeAi6NrroiIpIoDQWESAYA5cC7\nYeVtrfIa5UC7COU7rHIREUkhTRt5/lHABCAnpKxJPeeKiIiDNDYgZGPGB96xnrcH1mO6hnZgxhYI\nea3cKm8fVr4j4ptnZwcDgUAjqyQikvYCQIdkXCiLyLOMIPKgcnPgVEwFa+4e1mKCRhMOPagcdLNJ\nkybZXYWEcXPbgkG1z+nc3j4gGPM3PQ2PIRQBa4BOwGfANeFf4CHHW4CF1uNSYFTI66OA2Zhpp9sw\nM5RERCSFNNRlNLiB108Le3639RNuPdDtcCslIiLJF80sI4mSx+OxuwoJ4+a2gdrndG5vX7yk2gwh\nqztMREQOV5MmTSAO3+e6QxAREUABQURELAoIIiICKCC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AAABJRU5ErkJggg==\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x10667f510>"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.7 pg : 130"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%matplotlib inline\n",
+ "from matplotlib.pylab import bar,xlabel,ylabel\n",
+ "from numpy import zeros,linspace\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "c = [0, 12.4, 22.1, 35.1, 52.7, 63.7, 81.9, 109.2, 123.5, 132.6, 143.3, 146., 146.]; \t\t\t\t#cumulative rainfall\n",
+ "T = linspace(0,13,len(c)) \t\t\t\t#Time\n",
+ "t = 15./60; \t\t\t\t#time interval\n",
+ "r = zeros(13)\n",
+ "I = zeros(13)\n",
+ "r[0] = 0;\n",
+ "print \"Rainfall intensity:\";\n",
+ "I[0] = 0;\n",
+ "for i in range(1,13):\n",
+ " r[i] = c[i]-c[i-1]; \n",
+ " I[i] = r[i]/t; \t\t\t\t#Rainfall intensity\n",
+ " print \"%.2f\"%(I[i]);\n",
+ "\n",
+ "\n",
+ "#graph is plotted between I and T\n",
+ "bar(T,I)\n",
+ "xlabel(\"Time hr\")\n",
+ "ylabel(\"Rain fall insentity\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rainfall intensity:\n",
+ "49.60\n",
+ "38.80\n",
+ "52.00\n",
+ "70.40\n",
+ "44.00\n",
+ "72.80\n",
+ "109.20\n",
+ "57.20\n",
+ "36.40\n",
+ "42.80\n",
+ "10.80\n",
+ "0.00\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 5,
+ "text": [
+ "<matplotlib.text.Text at 0x1073839d0>"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KG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BbwXUIX9JqCa+nE24ElhO7nZcC7gUsKragzjye3\nnyaPryIERFm8DfgJ8AzwAmHH59sLrag7Y4QhJIB5hA8bZXMCcATlC+YFhA8WdxH+j+cDtwOvLbCm\nTJT95LcaYWP61aIL6dFBlG8fA8DNwMJkeZT4bPpBty/hSLbtCH9HK4BPFVpROiNsuvN54mjCpQz2\nzlvYtP7FhCPDdi6kms6NsPl9JJXZ+QzlPvntnYTx+TsJQzKrmJz6o0wOopxHJe1L6DGU4VDD6ZzO\n5OGqKwi9z0F2GWF/yAbCvsFPEDZEN1COw1Wn1n8i4TD5XzD5/3tBYdVt2UT9f2Ly59/qESoUDJIk\nSZIkSZIkSZIkSZIkSZJUMq9m8tj0XxLOkl4FjAPn59Det4AP5PC+UmZmFl2AVLBnCJMaQphLZhw4\nN8f20swRNJMw/YVUiLLMlST1y8TkYnUmp/8YJZxxfDOwFng/8M+EmSr/h8kPWG8FGsDPCNPET8wN\nNNVfAf9LmOZlovdQB34M/BfhLGepMAaDlM4ehOtRLCFMhLiSMLf9H4D3Eqap+BphQ/82wjTf/zTN\n+9QIgfEOwsy1rXMG7Ue4ut+bcvkOpJQcSpK2rEnoGbxImNDuFcAPk6/dQ5iwbCGwF5PXSphBmK9m\nuveamF33AeLrEtxGmI9HKpTBIKWzIbl/CdjYsv4lwv9RjTAElGZK7A0ty63z4j/fS4FSVhxKkrYs\nzQWKfg68BjggeTwLWJRbRVKODAYp1my5n24ZNj2yqEnoRXyQcK2HienVD9xCG+2WJUmSJEmSJEmS\nJEmSJEmSJEmSJEmSti7/D/HgBKyAP/WaAAAAAElFTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x10736ba10>"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.8 pg : 131"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%matplotlib inline\n",
+ "import math \n",
+ "from numpy import zeros_like,array\n",
+ "from matplotlib.pylab import plot,xlabel,ylabel\n",
+ "\n",
+ "\n",
+ "#Given\n",
+ "CR = array([0, 12.4, 22.1 ,35.1, 52.7, 63.7, 81.9, 109.2, 123.5, 132.6, 143.3, 146.0, 146.0]); \t\t\t\t#cumulative rainfall\n",
+ "\n",
+ "c15 = zeros_like(CR)\n",
+ "c30 = zeros_like(CR)\n",
+ "c45 = zeros_like(CR)\n",
+ "c60 = zeros_like(CR)\n",
+ "c90 = zeros_like(CR)\n",
+ "c120 = zeros_like(CR)\n",
+ "\n",
+ "# Calculations and Results\n",
+ "c15[1] = 12.4;\n",
+ "c30[2] = 22.1;\n",
+ "c45[3] = 35.1;\n",
+ "c60[4] = 52.7;\n",
+ "c90[6] = 81.9;\n",
+ "c120[8] = 123.5;\n",
+ "for i in range(2,13):\n",
+ " c15[i] = CR[i]-CR[i-1];\n",
+ "\n",
+ "for i in range(3,13):\n",
+ " c30[i] = CR[i]-CR[i-2];\n",
+ "\n",
+ "for i in range(4,13):\n",
+ " c45[i] = CR[i]-CR[i-3];\n",
+ "\n",
+ "for i in range(5,13):\n",
+ " c60[i] = CR[i]-CR[i-4];\n",
+ "\n",
+ "for i in range(7,13):\n",
+ " c90[i] = CR[i]-CR[i-6];\n",
+ "\n",
+ "for i in range(9,13):\n",
+ " c120[i] = CR[i]-CR[i-8];\n",
+ "\n",
+ "print \"15min 30min 45min 60min 90min 120min\";\n",
+ "for i in range(13):\n",
+ " print \"%.2f %.2f %.2f %.2f %.2f %.2f\"%(c15[i],c30[i],c45[i],c60[i],c90[i],c120[i]);\n",
+ "\n",
+ "I = [109.2, 91, 79.7, 74.1, 67.6, 61.75]; \t\t\t\t#maximum intensity at respective durations\n",
+ "D = [15 ,30 ,45 ,60 ,90 ,120]; \t\t\t\t#durations\n",
+ "#greph is plotted between I and D\n",
+ "plot(D,I,D,I,\"ro\")\n",
+ "xlabel(\"Duration\")\n",
+ "ylabel(\"max rain fall intensity\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "15min 30min 45min 60min 90min 120min\n",
+ "0.00 0.00 0.00 0.00 0.00 0.00\n",
+ "12.40 0.00 0.00 0.00 0.00 0.00\n",
+ "9.70 22.10 0.00 0.00 0.00 0.00\n",
+ "13.00 22.70 35.10 0.00 0.00 0.00\n",
+ "17.60 30.60 40.30 52.70 0.00 0.00\n",
+ "11.00 28.60 41.60 51.30 0.00 0.00\n",
+ "18.20 29.20 46.80 59.80 81.90 0.00\n",
+ "27.30 45.50 56.50 74.10 96.80 0.00\n",
+ "14.30 41.60 59.80 70.80 101.40 123.50\n",
+ "9.10 23.40 50.70 68.90 97.50 120.20\n",
+ "10.70 19.80 34.10 61.40 90.60 121.20\n",
+ "2.70 13.40 22.50 36.80 82.30 110.90\n",
+ "0.00 2.70 13.40 22.50 64.10 93.30\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 7,
+ "text": [
+ "<matplotlib.text.Text at 0x10741e950>"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEPCAYAAABcA4N7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl4lPXd7/E3EEgAN0BUEGWJgKKyCggKRpYgghIXClSf\ng0t7To+WYNWnKkjBqr2sy2kB5elTWxWrRhEFgciugaqgIlVZG0zBijwsihtgAoQ5f3wnzBCSMMxy\n/+ae+byua66ZuXPPfX9/Guab3w4iIiIiIiIiIiIiIiIiIiIiIiIiIiISgWeAHcCasGPDgXVAOdC1\n0vn3AZuAjUCuFwGKiIhbfYAuHJkozgXaAW9zZKLoAHwM1AVaAZ8BtT2JUkREapTIL+O/A99UOrYR\nKK7i3GFAAXAA2IIlih4JjE1ERCKULH+1Nwe2hr3fCpzpKBYREQmTLIm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x1072925d0>"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.9 pg : 132"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Given\n",
+ "p = [475, 377, 731, 1066, 361, 305, 926, 628, 409, 236, 337, 853]; \t\t\t\t#precipitation value\n",
+ "N = 12.; \t\t\t\t#total number of years\n",
+ "T = 6; \t\t\t\t#recurrence interval\n",
+ "\n",
+ "# Calculations\n",
+ "m = N/T;\n",
+ "\n",
+ "# Results\n",
+ "print \"Ranking of storm = %i.\"%(m);\n",
+ "#hence pick 2nd severest storm\n",
+ "print \"preciptation value which has recurrence period of 6 years = %i mm.\"%(p[6]);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ranking of storm = 2.\n",
+ "preciptation value which has recurrence period of 6 years = 926 mm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.10 pg : 132"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%matplotlib inline\n",
+ "import math \n",
+ "from numpy import arange,array,zeros_like\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "I = linspace(25,16,10) \t\t\t\t#isohytes\n",
+ "a = array([407 ,1008, 1522, 1909, 2216, 2460, 2651, 2782, 2910, 2936]); \t\t\t\t#enclosed area\n",
+ "ia = zeros_like(a)\n",
+ "ia[0] = 407.;\n",
+ "\n",
+ "# Calculations\n",
+ "for i in range(1,10):\n",
+ " ia[i] = a[i]-a[i-1];\n",
+ "r = linspace(25.5,16.5,10)\n",
+ "rv = r*ia\n",
+ "\n",
+ "cv = zeros_like(rv)\n",
+ "cv[0] = 10378;\n",
+ "for i in range(1,10):\n",
+ " cv[i] = cv[i-1]+rv[i];\n",
+ "\n",
+ "eud = cv/a\n",
+ "print \"From depth area curve we obtain average depth of precipitation = 24.1 mm for an area of 1800 sq. km.\";\n",
+ "#graph is plotted between eud and a.\n",
+ "# Results\n",
+ "plot(a,eud,a,eud,\"ro\")\n",
+ "xlabel(\"Area\")\n",
+ "ylabel(\"mean precipitation depth\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "From depth area curve we obtain average depth of precipitation = 24.1 mm for an area of 1800 sq. km.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 8,
+ "text": [
+ "<matplotlib.text.Text at 0x1074d2250>"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAZEAAAEPCAYAAACDTflkAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8VPX1//FXTDBREXFBWQSDKSpUZVEWy2IshYBRlp9o\nXSkqLhUTpFZRkC+xStVWXAh1KQU3LO5SSkAJSAqKEJRdQCWKinWrdUMbJDG/P84NWZiEm2TuvXMn\n7+fjMY+585l7Z851kMNnBxEREREREREREREREREREREREREREWkk2gJLgbeATUC2U54D7ADWOo9B\nNVy/HdjgnFPoYZwiIhKDWgJdnOOmwNtAR2Ay8DsX178PHOZNaCIiEg1JHn72p84DYCewBWjjvE5w\n+RluzxMRkQDs59P3pAJdgZXO6yxgPTATaF7DNWXAYuAN4AqP4xMRkRjVFEsEw5zXR2I1jATgdiyR\nRNLKeW4BrAP6ehijiIjUg9fNRU2A+cBC4L4I76cC/wRO2sfnTMaaxKZWLkxLSysrKipqeJQiIo1L\nEfCzaHyQl81ZCVgtYzNVE0irSsfDgY0Rrj0QONg5PggYGOm8oqIiysrKYv4xceBAymCvR5+UDBYt\nqvm6yZMnBx67l494vr94vjfdX/g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+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.11 pg :133"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%matplotlib inline\n",
+ "import math \n",
+ "from numpy import array,float64\n",
+ "\n",
+ "#24h max. rainfall with return period of 8,15 and 25.\n",
+ "#24h max rainfall with 40%,24% and 8% probability.\n",
+ "#probabilty of rainfall of magnitude equal to or exceeding 100 mm.\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "N = 20.;\n",
+ "r = array([142, 126, 116, 108, 102, 95, 92, 88, 86, 82, 80, 78, 76, 73, 71, 69, 68, 66, 65, 64],dtype=float64); \t\t\t\t#rainfall in respective years\n",
+ "m = linspace(1,20,20) \t\t\t\t#ranking of storm\n",
+ "p = m*100/(N+1)\n",
+ "T = 100/p\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#from frequency curve obtained we get\n",
+ "#Part (a)\n",
+ "T1 = array([8, 15, 25]);\n",
+ "r1 = array([119, 134, 149]);\n",
+ "print \"Tyears Rainfallmm\";\n",
+ "for i in range(3):\n",
+ " print \"%i %i\"%(T1[i],r1[i]);\n",
+ "\n",
+ "\n",
+ "#Part (b)\n",
+ "p1 = [40 ,24, 8];\n",
+ "r2 = [87, 101, 130];\n",
+ "print \"probabilitypercent Rainfallmm\";\n",
+ "for i in range(3):\n",
+ " print \"%i %i\"%(p1[i],r2[i]);\n",
+ "\n",
+ "print \"For rainfall = 100 m.T = 4 years.Probability = 25 percent.\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Tyears Rainfallmm\n",
+ "8 119\n",
+ "15 134\n",
+ "25 149\n",
+ "probabilitypercent Rainfallmm\n",
+ "40 87\n",
+ "24 101\n",
+ "8 130\n",
+ "For rainfall = 100 m.T = 4 years.Probability = 25 percent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.12 pg : 135"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%matplotlib inline\n",
+ "import math \n",
+ "from matplotlib.pylab import plot,xlabel,ylabel\n",
+ "from numpy import array,float64\n",
+ "\n",
+ "#plot IDF curve for return period of 10,2 and 1 years umath.sing california formula\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "t = array([5, 10, 20, 30, 60, 90, 120],dtype=float64); \t\t\t\t#duration\n",
+ "\t\t\t\t#value of P for respective return period is\n",
+ "p10 = array([10.6, 14.7, 19.3, 20.8, 25.5, 29, 34.7]); \t\t\t\t#rainfall for T = 10 years\n",
+ "p2 = array([8.2, 10.3, 13.2, 14.2, 16.6 ,19.4, 21.4]); \t\t\t\t#rainfall for T = 2 years\n",
+ "p1 = array([3.5, 6.2, 8.9, 10, 13.2, 15, 16.5]); \t\t\t\t#rainfall for T = 1 year\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "i1 = p10*60/t; \t\t\t\t#intensity of rainfall with return period of 10 years\n",
+ "i2 = p2*60/t; \t\t\t\t#intensity of rainfall with return period of 2 years\n",
+ "i3 = p1*60/t; \t\t\t\t#intensity of rainfall with return period of 1 year\n",
+ "\n",
+ "# Results\n",
+ "#graph is plotted between #t and i1 #t and i2 #t and i3\n",
+ "plot(t,i1)\n",
+ "plot(t,i2)\n",
+ "plot(t,i3)\n",
+ "xlabel(\"Duration\")\n",
+ "ylabel(\"Intensity\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 14,
+ "text": [
+ "<matplotlib.text.Text at 0x107511cd0>"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEPCAYAAABcA4N7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALE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fu/adjVpeNA9IoC45fARvcn/G+psNJ4G/ufS8Dzq7dqYmIiBUq\nBgXAEcyX8xjKB8V8yoKiBBMEHs29Hv8Hs3IumBrFxV6veZ4nYpZVaIm5INdCzFo8nn1f5X78DGbV\nT5Ggc8qigCKB4sJ3X0UxZsVfjyHAckwNYQjm6mEeFfcTBfTF1C4Ou/f1FmUhVAB84n68BrMIpkjQ\nRQe7ACIhogvmi/sgZmlt7x9RcV6P8yhbuz8OeAnTpJQFTKjw3srW+K+4LcprW6HX9hL071NChGoU\nIqYz+9+UNTftxFzPPAqzXHq/Kj7nCYXDmIv7jPZ67QTQpML7XZj+jMGUNT3dDHxTt+KL2Eu/WCRS\nxWOGx8ZgahD/wVy+FeA7TFhsAjZjmoE8vGsERzHDXn/EXKNihddrMzHhk4u5kJNHNuZqeIswQfQx\nZdcU9953uF1BTkRERERERERERERERERERERERERERERERERERMTZ/j9cbU2THLkDTwAAAABJRU5E\nrkJggg==\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x1074e3690>"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.13 pg : 137"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%matplotlib inline\n",
+ "import math \n",
+ "from numpy import linspace,array\n",
+ "from matplotlib.pylab import subplot,plot,xlabel,ylabel\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "N = 20.;\n",
+ "m = linspace(1,20,20) \t\t\t\t#rank number\n",
+ "rd = array([82, 78, 75, 72, 70, 68, 65, 63, 61, 58, 56, 54, 52, 50, 46, 40, 36, 34, 32, 30]); \t\t\t\t#rainfall in decremath.sing order\n",
+ "\n",
+ "# Calculations\n",
+ "ri = rd[::-1]\n",
+ "T = N/(m-0.5);\n",
+ "\n",
+ "# Results\n",
+ "#from the curves\n",
+ "print \"maximum rainfall = 79cm for T = 15 years.\";\n",
+ "print \"minimum rainfall = 31 cm for T = 15 years.\";\n",
+ "#graph is plotted between rd and T;ri and T\n",
+ "subplot(121)\n",
+ "plot(T,rd)\n",
+ "xlabel(\"Reccurance interval\")\n",
+ "ylabel(\"rainfall cm\")\n",
+ "subplot(122)\n",
+ "plot(T,ri)\n",
+ "xlabel(\"Reccurance interval\")\n",
+ "ylabel(\"rainfall cm\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum rainfall = 79cm for T = 15 years.\n",
+ "minimum rainfall = 31 cm for T = 15 years.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 15,
+ "text": [
+ "<matplotlib.text.Text at 0x107643c10>"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEPCAYAAACk43iMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XuUXGWZ7/Fvp3Pt3DvkRhJIkwtGEOQOClJyG0WIYjDg\n4CE6Oejg0eBioeAZj7SsYQmcI3KcWWcY5BwBr0QdkJvKRVpGQoRAAggJnYQ0CYZ0x9zT6SSddJ0/\nnl2p6k5V9a6qvevdu/bvs1atunTVW08qT9Wz3/fd+90gIiIiIiIiIiIiIiIiIiIiIiIiIiJSkuuA\n14G/eLcBGoGngFbgSWCMm9BEKqLcFunH8diXZChQj305ZgB3AN/wnnMjcJuT6ETKp9wW8eFy4N6c\n+9/CviCrgIneY5O8+yJxotwW8eF9wFtYF7kBWAL8ANiW85y6PvdF4kC5LTVjYIhtrwJux8ZGO4EV\nwME+z0l7F5E4UW6LlOFW4FrsCzTJe2wyBbrMM2bMyHyJdNEljMsaguM7t5XXulThUlJuDyjlyWWY\n4F0fBXwa+BnwCLDAe3wB8HC+F65du5Z0Oh3I5eabb1ZbaqvXBZvIrXpuK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WCmd/sM7z7Ag2TPVlQHjAKOw5YFyJzs\nI3O49o/o/WXJvFcKS9Kjc/421rsehq0fkrnfA3zCu3078E9F4piDHUKe2XL5P9iaIn09S/bLUqj9\nHwGfznlNoc/jPu89M6sZ3oV1hTPPe9K7nXsI+38F/pd3+/NEvNscU8pr5XVRLrpqUTUM2yqYgp34\n425s/PQs4Jc5zxvsXX8U2yoB6/LtxFbxWwxs9R7f7uN9XwTeybl/HdmTQEzDFh17EVub5XHv8Zex\nhacKxXE1tsrhspx/26Z+4ijUPmS/AMU+j7T3eKb7+yDwbexLdKV3P/NvWowtmDUYeLufuKQyymvl\ndVEqAlld2NjpMOD32MTR01jCn1TgNX3X8E7neQzgANlu6wCyCQbQmXM7BZyPdX33Yls0Q72/dec8\nr4fe/3f53vN+bJVBv4q1n/kCDKD457En5/ZSbMvqCOyzvMV7/F+wraTHsEWvmkuIUUqnvC7cvvIa\nzQnk04V1Q2/FurTrgMu9v9VhE2xg3cVrvdv1WHf1D8BnyHabM13eNmwLBmz970EF3nsUdqq5vcD7\nyI6DFpMvjme8mMd7jzcCR/loK59dXptgW2OFPo++0tiY7vex5Xwzp9Abha06CdlutYRPed2b8tqj\nIpCVO4u/Alvudz5wFbCQ7LK9c73nXId1WV/DuqdzsKS4Ffij9/zM2YF+iG0dZCa4MhNofd/3d9iW\nypvAd7GJrHzPyz1bUL44VgLfwsYrX/Wuc9cr7+/fn9v+L7Dlbl/GJtAKfR592wDrKl9FtssMtoX0\nSy/WzTmvqcbZvZJIeZ2/feW1iIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIjUjv8PwXoUiDrcApwA\nAAAASUVORK5CYII=\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x1075f9c10>"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.14 pg : 144"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import zeros\n",
+ "\t\t\t\t#average evaporation for one week\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "w = [12, 5, 2, -3, 1, 6, 11]; \t\t\t\t#water added or taken out\n",
+ "r = [0, 6, 8, 12, 9, 5, 0]; \t\t\t\t#rainfall\n",
+ "pan = zeros(7)\n",
+ "le = zeros(7)\n",
+ "for i in range(7):\n",
+ " pan[i] = w[i]+r[i]; \t\t\t\t#Pan evaporation\n",
+ " le[i] = 0.8*pan[i]; \t\t\t\t#lake evaporation\n",
+ "s = sum(le)\n",
+ "\n",
+ "print \"daily lake evaporationmm:\";\n",
+ "for i in range(7):\n",
+ " print \"%.2f\"%(le[i]);\n",
+ "\n",
+ "av = s/7;\n",
+ "av = round(av*100)/100;\n",
+ "print \"average evaporation for one week = %.2f mm.\"%(av);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "daily lake evaporationmm:\n",
+ "9.60\n",
+ "8.80\n",
+ "8.00\n",
+ "7.20\n",
+ "8.00\n",
+ "8.80\n",
+ "8.80\n",
+ "average evaporation for one week = 8.46 mm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.15 pg : 145"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#total depth and volume of evaporation loss\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Rh = 0.4; \t\t\t\t#relative humidity\n",
+ "A = 4.8; \t\t\t\t#average surface spread of reservior\n",
+ "v3 = 18.; \t\t\t\t#wind velocity at 3m above ground\n",
+ "es = 31.81; \t\t\t\t#saturated vapour pressure\n",
+ "Km = 0.36; \t\t\t\t#for large deep waters\n",
+ "\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#umath.sing Meyer's formula\n",
+ "ea = es*Rh;\n",
+ "v9 = v3*(9./3)**(1./7);\n",
+ "E = Km*(es-ea)*(1+v9/16);\n",
+ "d = 7*E;\n",
+ "v = d*A*100/1000;\n",
+ "E = round(E*10)/10;\n",
+ "d = round(d*10)/10;\n",
+ "v = round(v*100)/100;\n",
+ "print \"umath.sing Meyers formula:\";\n",
+ "print \"average evaporation loss from reservior = %.2f mm/day.\"%(E);\n",
+ "print \"total depth = %.2f mm\"%(d);\n",
+ "print \"total volume = %.2f hectare-m.\"%(v);\n",
+ "\n",
+ "\t\t\t\t#umath.sing Rohwer's formula\n",
+ "Pa = 760.;\n",
+ "vdash = (0.6/2)**(1./7)*18;\n",
+ "E = 0.771*(1.465-0.000732*Pa)*(0.44+0.0733*vdash)*(es-ea);\n",
+ "d = 7*E;\n",
+ "v = d*A*100/1000;\n",
+ "E = round(E*10)/10;\n",
+ "d = round(d*10)/10;\n",
+ "v = round(v*10)/10;\n",
+ "print \"umath.sing Rohwers formula:\";\n",
+ "print \"average evaporation loss from reservior = %.2f mm/day.\"%(E);\n",
+ "print \"total depth = %.2f mm\"%(d);\n",
+ "print \"total volume = %.2f hectare-m.\"%(v);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "umath.sing Meyers formula:\n",
+ "average evaporation loss from reservior = 15.90 mm/day.\n",
+ "total depth = 111.40 mm\n",
+ "total volume = 53.47 hectare-m.\n",
+ "umath.sing Rohwers formula:\n",
+ "average evaporation loss from reservior = 20.70 mm/day.\n",
+ "total depth = 145.20 mm\n",
+ "total volume = 69.70 hectare-m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 46
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.16 pg : 149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%matplotlib inline\n",
+ "import math \n",
+ "from numpy import array,zeros_like\n",
+ "from matplotlib.pylab import plot,xlabel,ylabel\n",
+ "\n",
+ "\n",
+ "#plot infiltration capacity curve\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "D = 30.; \t\t\t\t#diameter of inside ring of infiltrometer\n",
+ "A = math.pi*D**2/4;\n",
+ "V = array([0, 200, 470, 840, 1405, 1840, 2245, 2510, 2745, 2885, 2990, 3130, 3270],dtype=float64); \t\t\t\t#cumulative volume;\n",
+ "t = array([0, 2, 5, 10, 20, 30, 45, 60, 80, 100, 120, 150, 180],dtype=float64); \t\t\t\t#Time(minutes)\n",
+ "\n",
+ "# Calculations and Results\n",
+ "dt = zeros_like(t)\n",
+ "\n",
+ "for i in range(1,13):\n",
+ " dt[i] = (t[i]-t[i-1])/60;\n",
+ "\n",
+ "F = V/A;\n",
+ "\n",
+ "Fd = zeros_like(F)\n",
+ "Fd[0] = F[0];\n",
+ "for i in range(1,13):\n",
+ " Fd[i] = F[i]-F[i-1];\n",
+ "\n",
+ "ft = Fd/dt \t\t\t\t#infirltration rate\n",
+ "\n",
+ "#from the graph\n",
+ "print \"constant rate of infiltration = 0.40 cm/hr.\";\n",
+ "avg10 = F[3]*60/10;\n",
+ "avg30 = F[5]*60/30;\n",
+ "avg10 = round(avg10*100)/100;\n",
+ "avg30 = round(avg30*100)/100;\n",
+ "print \"average rate of infiltration for first 10 min = %.2f cm/hr.\"%(avg10);\n",
+ "print \"average rate of infiltration for first 30 min = %.2f cm/hr.\"%(avg30);\n",
+ "#graph is plotted between ft and t\n",
+ "plot(t,ft)\n",
+ "xlabel(\"time in mins\")\n",
+ "ylabel(\"Infiltrtion rate\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "constant rate of infiltration = 0.40 cm/hr.\n",
+ "average rate of infiltration for first 10 min = 7.13 cm/hr.\n",
+ "average rate of infiltration for first 30 min = 5.21 cm/hr.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 17,
+ "text": [
+ "<matplotlib.text.Text at 0x107365850>"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEPCAYAAABFpK+YAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHk9JREFUeJzt3Xt4VNW9//F3SMItXFNAooJB1CpXQURuyoCA1daqIP5q\n0aLWWu1R9Kj9eemxpD3n8dgLtVjrsUpFpWpbrdXSWgSRgdoiUO5oUIwCKmgvnCoCEgg5f3z3MJOQ\ny2Rm9l57Zj6v55kne257fUmG71qz1tprgYiIiIiIiIiIiIiIiIiIiIiIiIiI5LAbgY3AJu9YRERy\n2AAs6bcFCoFFQF+nEYmICK18PPfJwArgU6AGWApM9rE8ERFJgp+JfxNwJlAKtAc+DxzrY3kiIpKE\nIh/PvRn4HrAQ2AOsBQ75WJ6IiCShIMCy7ga2Aw/GHujbt29tVVVVgCGIiOSEKuCEVN/sZ1cPQA/v\nZ2/gIuDJxCerqqqora0N3W3mzJnOY1BMiikf41JMyd1Ic6KMn109AM8AnwEOAN8APva5PBERaYbf\nif8sn88vIiIt5HdXT1aKRCKuQziCYkqOYkpeGONSTMEIcnC3IbVef5WIiCSpoKAA0sjfavGLiOQZ\nJX4RkTyjxC8ikmeU+EVE8owSv4hInglN4v/kE9i82XUUIiK5LzSJf/VqmD7ddRQiIrkvNPP49++H\n7t1h2zbo2tVxVCIiIZYz8/jbtIFRoyAadR2JiEhuC03iB5gwAV56yXUUIiK5TYlfRCTPhCrxDxoE\nu3bB9u2uIxERyV2hSvytWsHZZ8Pixa4jERHJXaFK/GCJX909IiL+8Tvx3wG8BmzEtl1s09wbJkyw\nFr9WaxYR8Yefib8c+BowFBgIFAJfau5NffpASQm89pqPkYmI5DE/E//H2F677bEtHtsD7yfzRs3u\nERHxj5+JfxcwC9gO7AD+BSSVzpX4RUT84+dm632Bm7Aun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VORK5CYII=\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x107621790>"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.17 pg : 162"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#drainage desity\n",
+ "#form factor\n",
+ "#channel slope\n",
+ "#average overland flow length\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "A = 82.; \t\t\t\t#area of watershed\n",
+ "d = 12.6; \t\t\t\t#dismath.tance between outlet and farther most point\n",
+ "l = 440.; \t\t\t\t#total length of channel\n",
+ "e = 656.; \t\t\t\t#elevation differnce between outlet and further most point\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "Dd = l/A;\n",
+ "ff = A/d**2;\n",
+ "cs = e/(d*1000);\n",
+ "lo = 1000/(2*Dd);\n",
+ "Dd = round(Dd*100)/100;\n",
+ "ff = round(ff*1000)/1000;\n",
+ "\n",
+ "# Results\n",
+ "print \"drainage desity = %.2f km/square.km.\"%(Dd);\n",
+ "print \"form factor = %.2f.\"%(ff);\n",
+ "print \"channel slope = %.2f.\"%(cs);\n",
+ "print \"average overland flow length = %i m.\"%(lo);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "drainage desity = 5.37 km/square.km.\n",
+ "form factor = 0.52.\n",
+ "channel slope = 0.05.\n",
+ "average overland flow length = 93 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.18 pg : 163"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#compute fi and W index\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "R = 3.6; \t\t\t\t#surface runoff\n",
+ "r = [0, 1.3, 2.8, 4.1, 3.9, 2.8, 2.0, 1.8, 0.9]; \t\t\t\t#rainfall at respective time\n",
+ "t = 4.; \t\t\t\t#total time\n",
+ "s = sum(r[2:]);\n",
+ "\n",
+ "# Calculations and Results\n",
+ "fi = (s-R*2)/6;\n",
+ "#math.since fi >1.3 and <1.8\n",
+ "print \"fi index = %.2f cm.\"%(fi);\n",
+ "print \"computations are correct.\";\n",
+ "\n",
+ "s = sum(r);\n",
+ "P = s/2;\n",
+ "Sr = 0.;\n",
+ "W = (P-R-Sr)/t;\n",
+ "print \"W index = %.2f cm/hr.\"%(W);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "fi index = 1.85 cm.\n",
+ "computations are correct.\n",
+ "W index = 1.55 cm/hr.\n"
+ ]
+ }
+ ],
+ "prompt_number": 51
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.19 pg : 163"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import linspace,array\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "T = linspace(1,9,9) \t\t\t\t#time from start\n",
+ "r = array([0.7, 1.4, 2.4, 3.7, 2.9, 2.6, 1.7, 0.8, 0.5]); \t\t\t\t#increamental rainfall\n",
+ "R = 9.3; \t\t\t\t#total run-off\n",
+ "s = sum(r)\n",
+ "\n",
+ "ti = s-R;\n",
+ "#first trial\n",
+ "tr = 9.; \t\t\t\t#assumed\n",
+ "fi1 = ti/tr;\n",
+ "#this makes 1st,8th and 9th hour ineffective\n",
+ "\n",
+ "#second trial\n",
+ "tr = 6.;\n",
+ "ti = s-R-r[0]-r[7]-r[8];\n",
+ "fi = ti/tr;\n",
+ "P = zeros_like(r)\n",
+ "for i in range(9):\n",
+ " P[i] = r[i]-fi;\n",
+ " if (P[i]<0):\n",
+ " P[i] = 0;\n",
+ " \n",
+ "print \"Timeh rainfall excess.\";\n",
+ "for i in range(9):\n",
+ " print \"%.2f %.2f\"%(T[i],P[i]);\n",
+ "\n",
+ "print \"fi index = %.2f cm/hr.\"%(fi);\n",
+ "print \"time of rainfall excess = %i hours..\"%(tr);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Timeh rainfall excess.\n",
+ "1.00 0.00\n",
+ "2.00 0.50\n",
+ "3.00 1.50\n",
+ "4.00 2.80\n",
+ "5.00 2.00\n",
+ "6.00 1.70\n",
+ "7.00 0.80\n",
+ "8.00 0.00\n",
+ "9.00 0.00\n",
+ "fi index = 0.90 cm/hr.\n",
+ "time of rainfall excess = 6 hours..\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.20 pg : 164"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy import array\n",
+ "import math \n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "P = array([72.2, 70.1, 73.3, 42.5, 81.3, 50.6, 52.9, 59.4, 60.3, 64.3, 68.8, 56.7, 77.2, 40.5, 44.1, 65.5]); \t\t\t\t#Precipitation\n",
+ "R = array([24.1, 22.7, 25.6, 11.3, 28.4, 12.7, 13.4, 15.7, 16.2, 17.7, 19.2, 14.9, 25.4, 10.6, 11.7, 17.9]); \t\t\t\t#runoff\n",
+ "\n",
+ "# Calculations\n",
+ "Ps = P**2\n",
+ "Rs = R**2;\n",
+ "PR = P*R;\n",
+ "\n",
+ "s = sum(Ps)\n",
+ "t = sum(Rs)\n",
+ "u = sum(PR)\n",
+ "q = sum(P)\n",
+ "w = sum(R)\n",
+ "N = 16.;\n",
+ "a = (N*u-q*w)/(N*s-q**2);\n",
+ "b = (w-a*q)/N;\n",
+ "b = round(b*1000)/1000;\n",
+ "a = round(a*10000)/10000;\n",
+ "\n",
+ "# Results\n",
+ "print \"Equation is:%.4f P %.3f.\"%(a,b);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Equation is:0.4375 P -8.823.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.21 pg : 165"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%matplotlib inline\n",
+ "from numpy import linspace,array\n",
+ "import math \n",
+ "from matplotlib.pylab import plot,xlabel,ylabel\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "A = 8.6; \t\t\t\t#catchment area\n",
+ "T = linspace(0,4,9) \t\t\t\t#time\n",
+ "r = array([0, 0.4, 1.1, 2.3, 3.8, 4.8, 5.6, 6.2, 6.7]); \t\t\t\t#accumulated rainfall\n",
+ "fi = 0.4; \t\t\t\t#fi index\n",
+ "dt = 0.5; \t\t\t\t#time interval\n",
+ "\n",
+ "# Calculations and Results\n",
+ "d = zeros_like(r)\n",
+ "\n",
+ "for i in range(1,9):\n",
+ " d[i] = r[i]-r[i-1]; \t\t\t\t#accumulated rainfall\n",
+ "\n",
+ "print \"Intensity of effective Rainfall:\";\n",
+ "I = zeros_like(r)\n",
+ "p = zeros_like(r)\n",
+ "s = 0;\n",
+ "for i in range(1,9):\n",
+ " p[i] = d[i]-fi; \t\t\t\t#effective rainfall\n",
+ " I[i] = p[i]/dt; \t\t\t\t#Intensity of effective Rainfall\n",
+ " s = s+I[i];\n",
+ " print \"%.2f\"%(I[i]);\n",
+ "\n",
+ "#graph is plotted between I and T\n",
+ "run = s*dt;\n",
+ "V = run*A*10000;\n",
+ "print \"Volume of direct run-off = %.2f cubic metre.\"%(V);\n",
+ "plot(T,I)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Intensity of effective Rainfall:\n",
+ "0.00\n",
+ "0.60\n",
+ "1.60\n",
+ "2.20\n",
+ "1.20\n",
+ "0.80\n",
+ "0.40\n",
+ "0.20\n",
+ "Volume of direct run-off = 301000.00 cubic metre.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 19,
+ "text": [
+ "[<matplotlib.lines.Line2D at 0x1078dcf10>]"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEACAYAAABI5zaHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHzVJREFUeJzt3Xl4VGWaxuFf2EWglUFRQQ0C2uLY7mxiU6Ki0goOiIA6\nTrthYyOOCLTSdot0jwIqS0BAZJF9kcUGBEXUsIxAgyCLEmRTXFimQUBAhJCaP95CMCSpSlJV3zmn\nnvu66kqROlQej+TNl28FEREREREREREREREREREREREREZHAOh/4CPgMWAd0yuOaELAPWBV5PJes\ncCIiUjTnAFdGnlcANgCX5romBMxMYiYREYmiRJTXdwCfRp4fANYD5+VxXVo8Q4mISPKkA19hLfiT\nNQZ2A6uBOUCd5MYSEZGiqgCsAO7K47WKQPnI89uBL5IVSkRE8hZLd0ppYDYwF+gfw/VbgWuAPSd/\nsmbNmuHNmzcXOqCISIrbDNQq7F+K1ueeBowAPif/wl6VEz8k6kae78l90ebNmwmHw55/PP/8884z\nBCWnHzIqp3J6/QHULGxhBygV5fXrgfuBNdg0R4DuwAWR568DdwMdgGzgENC2KEFERCR+ohX3xURv\n3b8WeYiIiEdEK9wpJxQKuY4QEz/k9ENGUM54U05vSOb89HCk/0hERGKUlpYGRajVarmLiASQiruI\nSACpuIuIBJCKu4hIAKm4i4gEkIq7iEgAqbiLiASQiruISACpuIuIBJCKu4hIAKm4i4gEkIq7iEgA\nqbiLiASQiruISACpu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M0L9zNaTtf38w5gF9bfXtBvEIW6l/Eu7t9iN+m487GfMAVdUz3yuWSJJeMPnPhV\nbi7WN1858dEKxfV9jJWX7mVpYBowjry/gb1yT6Pl9NI9BRuMfAe4NtfnvXI/j8svp+v72RDrdtkK\nTASaAGNyXeP8Xvph0VMsGaty4qdkXax/3oV0YhtQdb14LJ38c3rlXqZh3zD9CrjGC/c0lpxeuKdV\nsH5fgNOAhcBNua7xwv2MJacX7udxjcl7towX7qUvFj1Fy/hHbBrap8DH2M1MtonAd8ARrK/tIbx3\nHyF6Ti/cS7AZEjmRHMenvN2O9+5pLDm9cE8vx7ozPgXWYP3F4L37GUtOL9zP4xpzYraM1+6liIiI\niIiIiIiIiIiIiIiIiIiIiIiIiIiIiMgJ/w/tPDqafh5U1AAAAABJRU5ErkJggg==\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x10751f450>"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.22 pg : 166"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%matplotlib inline\n",
+ "from numpy import array,linspace\n",
+ "#total rainfall\n",
+ "#total rainfall excess\n",
+ "#W index\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "r = array([3.5, 6.5, 8.5 ,7.8, 6.4, 4, 4, 6]); \t\t\t\t#rainfall intensity\n",
+ "T = linspace(0,240,8) \t\t\t\t#time\n",
+ "dt = 30.; \t\t\t\t#time interval\n",
+ "\n",
+ "# Calculations\n",
+ "s = sum(r);\n",
+ "P = s*dt/60;\n",
+ "Pe = ((6.5-4.5)+(8.5-4.5)+(7.8-4.5)+(6.4-4.5)+(6-4.5))*dt/60; \t\t\t\t#area of graph above r = 4.5.\n",
+ "w = (P-Pe)/4;\n",
+ "\n",
+ "# Results\n",
+ "print \"total rainfall = %.2f cm.\"%(P);\n",
+ "print \"total rainfall excess = %.2f cm.\"%(Pe);\n",
+ "print \"W index = %.2f cm/hr.\"%(w);\n",
+ "plot(T,r)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "total rainfall = 23.35 cm.\n",
+ "total rainfall excess = 6.35 cm.\n",
+ "W index = 4.25 cm/hr.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 20,
+ "text": [
+ "[<matplotlib.lines.Line2D at 0x1078e6590>]"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAW8AAAEACAYAAAB8nvebAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHxZJREFUeJzt3Xm8lnP+x/HXaVPJtFGWpCYzohQmhmo4spU1MYZfE2KE\nUESWmdSRmaKSbVpVKI1CpJCU3FKJUqnTokUpabO2aD3dvz8+5zhHqrNd9/W9lvfz8TiPs9y3+/qc\ny9XnfO/P9f1+viAiIiIiIiIiIiIiIiIiIiIiIiIiMdcRWABkZn8tIiIBVx9L3GWBksAkoI7TiERE\nhBL5PF4X+ATYAWQBHwKtUh2UiIgcXH7JOxP4C1AFKA9cAtRIdVAiInJwpfJ5fAnwOPAesA2YC+xN\ndVAiInJwaYV8fg9gNTAw5wd16tRJrlixwtOgRERiYAVwfFH/4/zKJgDVsj/XBK4E/vero69YQTKZ\n1EcySbdu3ZzHEJQPnQudC52Lg39QzMkf+ZVNAF4DqgK7gfbA5uIcUEREiq8gyfvslEchIiKFUpCy\niRRQenq66xACQ+cil85FLp0L7xT2huX+JLPrNyIiUkBpaWlQjByskbeISAgpeYuIhJCSt4hICCl5\ni4iEkJK3iEgIKXmLiISQkreISAgpeYuIhJCSt4hICCl5i4iEkJK3iEgIKXmHSFYWzJvnOgoRCQIl\n7xB5+mk4/XS4+GJYvNh1NCLikpJ3SKxZAz16wOefw4UXwtlnw513wr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U\nz3Esv/7LEQfrsj9vAt7A3uZswOpdYNMsNzqIy5UD/e77Xis1sn8WZRvJTVJDyH0LHIdzURpL3COA\nsdk/i+O1kXMeXiL3PATiuiiFrRCqhTWsitsNy/LAYdlfHwpMx+4Q9yJ35s2DRPeGJdj/+31vWO7v\nd8+5GVMGG3WsoGire4OsFr8+F0fl+foe4H/ZX0f9XKQBw4En9/l53K6NA52HwFwXLbC7qMuxaS5x\nUhs72fOwqUA5v38VrA4e9amCLwPfALuwex9tOfjv/k/sOlkCXORrpKm377m4CfuHOx+rbY7l1/c+\nonwummK9kOaROx2uOfG7NvZ3HloQ3+tCREREREREREREREREREREREREREREREREJHj+HwzG1UV6\no0m7AAAAAElFTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x1075f9490>"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.23 pg : 166"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import array,zeros_like\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "r = array([0, 8, 22, 74, 92, 105, 114, 120],dtype=float64); \t\t\t\t#raccumulated rainfall\n",
+ "T = array([0, 2, 4, 6, 8, 10, 12, 14],dtype=float64); \t\t\t\t#time for start of rainfall\n",
+ "V = 2e6; \t\t\t\t#volume of run-off\n",
+ "A = 40.; \t\t\t\t#catchment area\n",
+ "tr = 14.; \t\t\t\t#duration of rainfall\n",
+ "\n",
+ "# Calculations\n",
+ "d = V*1000/(40*1000000);\n",
+ "\n",
+ "l = r[7]-d;\n",
+ "W = l/tr;\n",
+ "I = zeros_like(r)\n",
+ "for i in range(1,8):\n",
+ " I[i] = r[i]-r[i-1]; \t\t\t\t#incremental rainfall\n",
+ "\n",
+ "\n",
+ "#rainfall excess is available in 4 time intervals of 2 hrs\n",
+ "tre = 8.;\n",
+ "fi = (l-I[1]-I[6]-I[7])/tre;\n",
+ "fi = round(fi*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"fi index = %.2f mm/hr.\"%(fi);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "fi index = 5.88 mm/hr.\n"
+ ]
+ }
+ ],
+ "prompt_number": 66
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.24 pg : 167"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import array\n",
+ "\n",
+ "#Given\n",
+ "r = array([2.0 ,2.5, 7.6, 3.8, 10.6, 5.0, 7.0, 10.0, 6.4, 3.8, 1.4, 1.4]); \t\t\t\t#rainfall depths\n",
+ "R = 25.5;\n",
+ "\n",
+ "# Calculations\n",
+ "s = sum(r)\n",
+ "tf = s-R;\n",
+ "af = tf/12;\n",
+ "#rainfall is less than average infiltration in1st,2nd,11th and 12th hours\n",
+ "\n",
+ "f = (tf-r[0]-r[1]-r[10]-r[11])/8;\n",
+ "f = round(f*10)/10;\n",
+ "\n",
+ "# Results\n",
+ "print \"average infiltration index = %d cm/hour.\"%(f);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "average infiltration index = 3 cm/hour.\n"
+ ]
+ }
+ ],
+ "prompt_number": 68
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.25 pg : 167"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import zeros,zeros_like,array\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "r = array([2.0, 2.5, 7.6, 3.8, 10.6, 5.0, 7.0, 10.0, 6.4, 3.8, 1.4, 1.4]); \t\t\t\t#rainfall depths\n",
+ "A1 = 20.;\n",
+ "A2 = 40.;\n",
+ "A3 = 60.;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "A = A1+A2+A3;\n",
+ "fi1 = 7.6;\n",
+ "fi2 = 3.8;\n",
+ "fi3 = 1.0;\n",
+ "R1 = zeros_like(r)\n",
+ "R2 = zeros_like(r)\n",
+ "R3 = zeros_like(r)\n",
+ "for i in range(12):\n",
+ " R1[i] = r[i]-fi1; \t\t\t\t#rainfall excess\n",
+ " R2[i] = r[i]-fi2;\n",
+ " R3[i] = r[i]-fi3;\n",
+ " if (R1[i]<0):\n",
+ " R1[i] = 0;\n",
+ " if (R2[i]<0):\n",
+ " R2[i] = 0;\n",
+ " if (R3[i]<0):\n",
+ " R3[i] = 0;\n",
+ "\n",
+ "print \"average depth of hourly rainfall excesscm/hr\";\n",
+ "a1 = zeros(12)\n",
+ "a2 = zeros(12)\n",
+ "a3 = zeros(12)\n",
+ "T = zeros(12)\n",
+ "for i in range(12):\n",
+ " a1[i] = R1[i]*A1/A; \t\t\t\t#average rainfall excess\n",
+ " a2[i] = R2[i]*A2/A;\n",
+ " a3[i] = R3[i]*A3/A;\n",
+ " T[i] = a1[i]+a2[i]+a3[i]; \t\t\t\t#total hourly rainfall excess\n",
+ " T[i] = round(T[i]*100)/100;\n",
+ " print \"%.2f\"%(T[i]);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "average depth of hourly rainfall excesscm/hr\n",
+ "0.50\n",
+ "0.75\n",
+ "4.57\n",
+ "1.40\n",
+ "7.57\n",
+ "2.40\n",
+ "4.07\n",
+ "6.97\n",
+ "3.57\n",
+ "1.40\n",
+ "0.20\n",
+ "0.20\n"
+ ]
+ }
+ ],
+ "prompt_number": 69
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.26 pg : 185"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy import array,linspace\n",
+ "#derive the unit hydrograph\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "A = 92.; \t\t\t\t#area of drainage bamath.sin\n",
+ "t = array([6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 2, 4, 6, 8, 10, 12, 14, 16],dtype=float64); \t\t\t\t#time\n",
+ "r = array([10.6, 9.7, 107.8, 175.6, 193.9, 150.3, 126.2, 106.9, 90, 72.8, 58.2, 48, 36.2, 28.4, 20.2, 14, 10.2, 10.4]); \t\t\t\t#total run-off\n",
+ "B = array([10.6, 9.7, 9.73, 9.77, 9.8, 9.83, 9.87, 9.9, 9.93, 9.97, 10, 10.03, 10.07, 10.10, 10.13, 10.16, 10.20, 10.40]); \t\t\t\t#base flow\n",
+ "s = 0;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "d = r - B\n",
+ "s = sum(d)\n",
+ "\n",
+ "n = 0.36*s*2/A;\n",
+ "print \"ordinates of unit hydrograph:\";\n",
+ "u = zeros(18)\n",
+ "for i in range(18):\n",
+ " u[i] = d[i]/n; \t\t\t\t#ordinates of unit hydrograph\n",
+ " u[i] = round(u[i]*100)/100;\n",
+ " print \"%.2f\"%(u[i]);\n",
+ "\n",
+ "print \"Hydograph is 4-hr unit hydrograph\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ordinates of unit hydrograph:\n",
+ "0.00\n",
+ "0.00\n",
+ "11.50\n",
+ "19.45\n",
+ "21.60\n",
+ "16.48\n",
+ "13.65\n",
+ "11.38\n",
+ "9.39\n",
+ "7.37\n",
+ "5.65\n",
+ "4.45\n",
+ "3.07\n",
+ "2.15\n",
+ "1.18\n",
+ "0.45\n",
+ "0.00\n",
+ "0.00\n",
+ "Hydograph is 4-hr unit hydrograph\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.27 pg : 186"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import zeros\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "A = 316.; \t\t\t\t#drainage area\n",
+ "B = 17.; \t\t\t\t#base flow\n",
+ "t = 6.;\n",
+ "O = [17.0, 113.2, 254.5, 198.0, 150.0, 113.2, 87.7, 67.9, 53.8, 42.5, 31.1, 22.6, 17.0]; \t\t\t\t#ordinates of storm hydrograph\n",
+ "Or = zeros(13)\n",
+ "Oh = zeros(13)\n",
+ "for i in range(13): \n",
+ " Or[i] = O[i]-B; \t\t\t\t#ordinates of direct run-off\n",
+ " Oh[i] = Or[i]/6.477; \t\t\t\t#ordinates of unit hydrograph\n",
+ "\n",
+ "\n",
+ "s = sum(Or);\n",
+ "re = s*60*60*t/(A*10000);\n",
+ "re = round(re*1000)/1000;\n",
+ "\n",
+ "# Results\n",
+ "print \"rainfall excess = %.2f cm.\"%(re);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "rainfall excess = 6.48 cm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 74
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.28 pg : 188"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import zeros\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "fi = 2.5; \t\t\t\t#infiltration index\n",
+ "B = 10; \t\t\t\t#Base flow\n",
+ "O = [0, 110, 365, 500, 390, 310, 250, 235, 175, 130, 95, 65, 40, 22, 10, 0, 0, 0]; \t\t\t\t#ordinates of unit hydrograph\n",
+ "R1 = 2;R2 = 6.75;R3 = 3.75;\n",
+ "r1 = (R1*10-(fi*3)-5)/10; \t\t\t\t#rainfall excess in first three hour\n",
+ "r2 = (R2*10-(fi*3))/10; \t\t\t\t#rainfall excess in second three hour\n",
+ "r3 = (R3*10-(fi*3))/10; \t\t\t\t#rainfall excess in third three hour\n",
+ "\n",
+ "s1 = zeros(18)\n",
+ "for i in range(18):\n",
+ " s1[i] = r1*O[i]; \n",
+ "s2 = zeros(18)\n",
+ "for i in range(1,18):\n",
+ " s2[i] = r2*O[i-1];\n",
+ "s3 = zeros(18)\n",
+ "for i in range(2,18):\n",
+ " s3[i] = r3*O[i-2];\n",
+ " \t\t\t\t#surface run-off from rainfall excess during succesive unit periods\n",
+ "print \"ordinates of storm hydrograph\";\n",
+ "T = zeros(18)\n",
+ "t = zeros(18)\n",
+ "for i in range(18):\n",
+ " T[i] = s1[i]+s2[i]+s3[i];\n",
+ " t[i] = T[i]+B;\n",
+ " t[i] = round(t[i]*10)/10;\n",
+ " print \"%.2f\"%(t[i]);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ordinates of storm hydrograph\n",
+ "10.00\n",
+ "92.50\n",
+ "943.80\n",
+ "2905.00\n",
+ "4397.50\n",
+ "4082.50\n",
+ "3227.50\n",
+ "2616.30\n",
+ "2301.30\n",
+ "1862.50\n",
+ "1386.30\n",
+ "1018.80\n",
+ "715.00\n",
+ "461.50\n",
+ "269.50\n",
+ "136.00\n",
+ "40.00\n",
+ "10.00\n"
+ ]
+ }
+ ],
+ "prompt_number": 75
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.29 pg : 189"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%matplotlib inline\n",
+ "from numpy import array,linspace,zeros\n",
+ "from matplotlib.pylab import plot,xlabel,ylabel\n",
+ "#derive and plot 6 hr unit hydrograph\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "A = 103.4; \t\t\t\t#area of bamath.sin\n",
+ "t = linspace(0,36,9); \t\t\t\t#time\n",
+ "q = [0, 21, 80, 82, 189, 123, 184, 87, 55.5, 25.25, 9, 6, 0]; \t\t\t\t#flow\n",
+ "print \"ordinates of unit hydrograph are:\";\n",
+ "u = zeros(9)\n",
+ "u[0] = 0;\n",
+ "u[1] = q[1]/2.;\n",
+ "u[2] = (q[2]-4*u[0])/2;\n",
+ "u[3] = (q[3]-4*u[1])/2;\n",
+ "for i in range(4,9):\n",
+ " u[i] = (q[i]-3*u[i-4]-4*u[i-2])/2; \t\t\t\t#ordinates of unit hydrograph\n",
+ "\n",
+ "for i in range(9):\n",
+ " print \"%.2f\"%(u[i]);\n",
+ "print \"The succesive unit hydrograph will have same ordinates but will be shiftedlaterally by 6 hrs.\";\n",
+ "#graph is plotted between u and t.\n",
+ "plot(t,u)\n",
+ "xlabel(\"Time in hours\")\n",
+ "ylabel(\"Discharge\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ordinates of unit hydrograph are:\n",
+ "0.00\n",
+ "10.50\n",
+ "40.00\n",
+ "20.00\n",
+ "14.50\n",
+ "5.75\n",
+ "3.00\n",
+ "2.00\n",
+ "0.00\n",
+ "The succesive unit hydrograph will have same ordinates but will be shiftedlaterally by 6 hrs.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 21,
+ "text": [
+ "<matplotlib.text.Text at 0x107903850>"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEPCAYAAACk43iMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmYFOW1x/HvwICyiMgSJCyCEpC4gaKAEm1QAgoiu3u4\nUROXqHFLYmKMk2siiVeNXqOSq2Lc44IiqKigtooIgmyCCoKiQNgUIWwizPT941Q7zdgz0z3T1W9V\n9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buaz59TAIF3T\ndDGeTPCu52HAXCzOhVhfNgTrWkLlcQbteqY6gfI/mIN2PUVEREREREREREREREREREREREREREQq\n05zyefBrKC/ruwX4uw/nuxBbfJOpGOXlfEVExEdBLOsbw58kUOzDZ4oAwSsbIZKNZNGsGOVfviVY\n+dw3sZLkw4FbsJWeUyj/Qj0KiGOlSl5iz5IASSXA1d79OFaXfRa2or1PmtcnsCJuT2HlnB9Jee5E\nbBXqQqzEQ33v+ArK96XogVWsTJ77YWC6999zCLZ50TxsxWrgNxKXcFASkCjqiFWnHIJ9EU8FDgd2\nAIOwYmt3AiOwL94HgD+n+ZzUCowJrK58T+AKrCVSURFWWfaXwA+BA7EiX3t75xjtxVEMXJzyuZU5\nGEseZ2NdU7d7n38UwS2sKCGjZqZETQL7i78Uq+tUB3jZe+59rDhhZ+wv62ne8bpYHaPqPOP9nOt9\nTjrvpnzWfCwhbcMqPS7zjj+IlR+/o5r/jknATu/xO8B1WGnjZ1I+S6RWlAQkir7xfpZhO9SR8rgY\n+4t9MfZXejaSX8ilVP5vZ2fK/eTrKv61X5RybDflLfK9K7xue8r9x7GNYgYDL2Itg9cRqSV1B0nU\nZLL93xKgJdDLe1wP676p6edVJeGdrwNwkHfsXOAN7/4KrEsKrHuqsvN2xFoTdwLPYZUuRWpNSUDC\nLLW/Pt19+O5f4QmsdTAS+Cvl5Zd7V3OOTI5XtovTTqyk91PYwPBuYJz33B+xbqHZ3vHK/jtGY91b\n87CurIcqiUtEREREREREREREREREREREREREREREREREREQKzf8DeqePJCpdlVkAAAAASUVORK5C\nYII=\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x107781f50>"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.30 pg : 190"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import zeros\n",
+ "\n",
+ "\n",
+ "\n",
+ "#derive ordinates of 6 hrs unit hydrograph\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "R = [0, 1, 2.7, 5, 8, 9.8, 9, 7.5, 6.3, 5, 4, 2.9, 2.1, 1.3 ,0.5, 0, 0, 0, 0, 0]; \t\t\t\t#2hrs unit hydrograph\n",
+ "print \"ordinates of 6 hrs unit hydrograph\";\n",
+ "O1 = zeros(20)\n",
+ "for i in range(18):\n",
+ " O1[i+2] = R[i];\n",
+ "O2 = zeros(20)\n",
+ "for i in range(16):\n",
+ " O2[i+4] = R[i];\n",
+ "S = zeros(20)\n",
+ "f = zeros(20)#offset unit hydrograph\n",
+ "for i in range(20):\n",
+ " S[i] = O1[i]+O2[i]+R[i]; \t\t\t\t#sum\n",
+ " f[i] = S[i]/3; \t\t\t\t#ordinates of 6 hrs unit hydrograph\n",
+ " f[i] = round(f[i]*10)/10;\n",
+ " print \"%.2f\"%(f[i]);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ordinates of 6 hrs unit hydrograph\n",
+ "0.00\n",
+ "0.30\n",
+ "0.90\n",
+ "2.00\n",
+ "3.60\n",
+ "5.30\n",
+ "6.60\n",
+ "7.40\n",
+ "7.80\n",
+ "7.40\n",
+ "6.40\n",
+ "5.10\n",
+ "4.10\n",
+ "3.10\n",
+ "2.20\n",
+ "1.40\n",
+ "0.90\n",
+ "0.40\n",
+ "0.20\n",
+ "0.00\n"
+ ]
+ }
+ ],
+ "prompt_number": 79
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.31 pg : 190"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import array,linspace,zeros\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "t = linspace(0,45,16) \t\t\t\t#time\n",
+ "O = [0 ,9, 20, 35, 49, 43, 35, 28, 22, 17, 12, 9, 6, 3, 0, 0]; \t\t\t\t#ordinate of 2 hr unit hydrograph\n",
+ "\n",
+ "# Calculations and Results\n",
+ "of = zeros(16)\n",
+ "for i in range(2,16):\n",
+ " of[i] = O[i-2]+of[i-2]; \t\t\t\t#offset ordinate\n",
+ "\n",
+ "s = zeros(16)\n",
+ "for i in range(16):\n",
+ " s[i] = O[i]+of[i]; \t\t\t\t#ordinate of s-curve\n",
+ "\n",
+ "of1 = zeros(16)\n",
+ "for i in range(3,16):\n",
+ " of1[i] = s[i-3]; \t\t\t\t#offset of s-curve\n",
+ "\n",
+ "print \"ordinates of 9 hrs unit hydrograph:\";\n",
+ "y = zeros(16)\n",
+ "u = zeros(16)\n",
+ "for i in range(16):\n",
+ " y[i] = s[i]-of1[i];\n",
+ " u[i] = 2*y[i]/3; \t\t\t\t#ordinate of 9 hrs unit hydrograph\n",
+ " u[i] = round(u[i]*10)/10;\n",
+ " print \"%.2f\"%(u[i]);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ordinates of 9 hrs unit hydrograph:\n",
+ "0.00\n",
+ "6.00\n",
+ "13.30\n",
+ "29.30\n",
+ "40.00\n",
+ "44.70\n",
+ "40.00\n",
+ "30.70\n",
+ "26.00\n",
+ "18.70\n",
+ "15.30\n",
+ "10.00\n",
+ "8.00\n",
+ "4.00\n",
+ "2.00\n",
+ "0.00\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.32 pg : 210"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import zeros,linspace\n",
+ "\n",
+ "\n",
+ "#california method\n",
+ "#Hazens method\n",
+ "#gumbels method\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "q = [9200, 7800, 6600, 5800, 5260, 4980, 4525, 3810, 3630, 3250, 3110, 3090, 2380, 2390, 1723]; \t\t\t\t#Discharge arranged in decreamath.sing order\n",
+ "N = 15;\n",
+ "C = 0.3;\n",
+ "m = linspace(1,15,15)\n",
+ "C = [0.3, 0.44, 0.52, 0.57, 0.61, 0.66, 0.7, 0.74, 0.78, 0.82, 0.86, 0.88, 0.94, 0.96, 1]; \t\t\t\t#from table 4.25\n",
+ "print \"California Hazen Gumbel\";\n",
+ "Ca = zeros(15)\n",
+ "H = zeros(15)\n",
+ "G = zeros(15)\n",
+ "Ca = zeros(15)\n",
+ "G = zeros(15)\n",
+ "\n",
+ "for i in range(15):\n",
+ " Ca[i] = N/m[i];\n",
+ " H[i] = 2*N/(2*m[i]-1);\n",
+ " G[i] = N/(m[i]+C[i]-1);\n",
+ " Ca[i] = round(Ca[i]*100)/100;\n",
+ " G[i] = round(G[i]*100)/100;\n",
+ " H[i] = round(H[i]*100)/100;\n",
+ " print \"%.2f %.2f %.2f\"%(Ca[i],H[i],G[i]);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "California Hazen Gumbel\n",
+ "15.00 30.00 50.00\n",
+ "7.50 10.00 10.42\n",
+ "5.00 6.00 5.95\n",
+ "3.75 4.29 4.20\n",
+ "3.00 3.33 3.25\n",
+ "2.50 2.73 2.65\n",
+ "2.14 2.31 2.24\n",
+ "1.88 2.00 1.94\n",
+ "1.67 1.76 1.71\n",
+ "1.50 1.58 1.53\n",
+ "1.36 1.43 1.38\n",
+ "1.25 1.30 1.26\n",
+ "1.15 1.20 1.16\n",
+ "1.07 1.11 1.07\n",
+ "1.00 1.03 1.00\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.33 pg : 211"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "T1 = 40.;\n",
+ "T2 = 80.; \t\t\t\t#Return period\n",
+ "F1 = 27000.;\n",
+ "F2 = 31000.; \t\t\t\t#Peak flood\n",
+ "\n",
+ "# Calculations\n",
+ "y80 = -(2.303*math.log10(2.303*math.log10(T2/(T2-1))));\n",
+ "y40 = -(2.303*math.log10(2.303*math.log10(T1/(T1-1))));\n",
+ "y = (F2-F1)/(y80-y40);\n",
+ "T = 240.;\n",
+ "y240 = -(2.303*math.log10(2.303*math.log10(T/(T-1))));\n",
+ "x240 = F2+(y240-y80)*y;\n",
+ "\n",
+ "# Results\n",
+ "print \"flood magnitude with return period of 240 years = %i cumec.\"%(x240);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "flood magnitude with return period of 240 years = 37306 cumec.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.34 pg : 212"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "N = 40;\n",
+ "Sn = 1.1413;\n",
+ "yn = 0.5436; \t\t\t\t#from table 4.21 (a) and(b)\n",
+ "q = [1330, 1095, 1030, 980, 975, 950, 945, 940, 925, 855, 853, 840, 835, 825, 810, 795, 756, 710, 708, 705, 700, 670, 625, 620, 610, 605, 595, 585, 570, 550, 530, 505, 500, 495, 485, 465, 460, 420, 390, 380]; \t\t\t\t#discharge\n",
+ "s = sum(q)\n",
+ "xavg = s/N;\n",
+ "w = 0;\n",
+ "\n",
+ "# Calculations\n",
+ "t = zeros(40)\n",
+ "for i in range(40):\n",
+ " t[i] = (q[i]-xavg)**2;\n",
+ " w = w+t[i];\n",
+ "\n",
+ "sigma = (w/(N-1))**0.5;\n",
+ "N = 10.;\n",
+ "y10 = -(2.303*math.log10(2.303*math.log10(N/(N-1))));\n",
+ "K10 = (y10-yn)/Sn;\n",
+ "x10 = xavg+K10*sigma;\n",
+ "N = 20.;\n",
+ "y20 = -(2.303*math.log10(2.303*math.log10(N/(N-1))));\n",
+ "K20 = (y20-yn)/Sn;\n",
+ "x20 = xavg+K20*sigma;\n",
+ "N = 5.;\n",
+ "y5 = -(2.303*math.log10(2.303*math.log10(N/(N-1))));\n",
+ "K5 = (y5-yn)/Sn;\n",
+ "x5 = xavg+K5*sigma;\n",
+ "\n",
+ "T = 100.;\n",
+ "y100 = -(2.303*math.log10(2.303*math.log10(T/(T-1))));\n",
+ "K100 = (y100-yn)/Sn;\n",
+ "x100 = xavg+K100*sigma;\n",
+ "\n",
+ "T = 200.;\n",
+ "y200 = -(2.303*math.log10(2.303*math.log10(T/(T-1))));\n",
+ "K200 = (y200-yn)/Sn;\n",
+ "x200 = xavg+K200*sigma;\n",
+ "x100 = round(x100);\n",
+ "\n",
+ "# Results\n",
+ "print \"For T = 100 years:flood discharge = %.2f cumecs.\\\n",
+ "\\nFor T = 200 years:flood discharge = %.f cumecs.\"%(x100,x200);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For T = 100 years:flood discharge = 1487.00 cumecs.\n",
+ "For T = 200 years:flood discharge = 1620 cumecs.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.35 pg : 214"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy.linalg import solve\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "sigma = 1.1413; \t\t\t\t#smath.radians(numpy.arcmath.tan(ard deviation\n",
+ "yn = 0.5436;\n",
+ "T = 50.;\n",
+ "\n",
+ "# Calculations\n",
+ "y50 = -2.303*math.log10(2.303*math.log10(T/(T-1)));\n",
+ "K50 = (y50-yn)/sigma;\n",
+ "T = 100.;\n",
+ "y100 = -2.303*math.log10(2.303*math.log10(T/(T-1)));\n",
+ "K100 = (y100-yn)/sigma;\n",
+ "x50 = 878; x100 = 970; \t\t\t\t\n",
+ "#Given peak flood\n",
+ "A = [[K50, 1],[K100, 1]];\n",
+ "B = [x50,x100];\n",
+ "C = solve(A,B)#A\\B;\n",
+ "xavg = C[1];\n",
+ "sigmad = C[0];\n",
+ "T = 200.;\n",
+ "y200 = -2.303*math.log10(2.303*math.log10(T/(T-1)));\n",
+ "K200 = (y200-yn)/sigma;\n",
+ "x200 = xavg+K200*sigmad;\n",
+ "x200 = round(x200);\n",
+ "\n",
+ "# Results\n",
+ "print \"200 year flood for stream = %.2f cumecs.\"%(x200);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "200 year flood for stream = 1062.00 cumecs.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.36 pg : 214"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "#risk of failure of cofferdam\n",
+ "#return period\n",
+ "\n",
+ "#Given\n",
+ "T = 30.; \t\t\t\t#deign for period\n",
+ "n = 6.; \t\t\t\t#period of construction\n",
+ "\n",
+ "# Calculations\n",
+ "R = (1-(1-(1/T))**n)*100;\n",
+ "R1 = 0.1; \t\t\t\t#reduced risk\n",
+ "T1 = 1./(1-(1-R1)**(1./6));\n",
+ "R = round(R*10)/10;\n",
+ "T1 = round(T1*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"risk of failure of cofferdam = %.2f percent.\"%(R);\n",
+ "print \"return period = %.2f years.\"%(T1);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "risk of failure of cofferdam = 18.40 percent.\n",
+ "return period = 57.45 years.\n"
+ ]
+ }
+ ],
+ "prompt_number": 85
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.37 pg : 215"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "#probability of excedence\n",
+ "#probability of flood magnitude occuring at:\n",
+ "#at least once in 10 years\n",
+ "#two times in 10 succesive years\n",
+ "#once in 10 succesive years\n",
+ "\n",
+ "#Given\n",
+ "T = 40.; \t\t\t\t#return period\n",
+ "P = 1./T;\n",
+ "n = 10;\n",
+ "Rsk = 1.-(1-P)**n;\n",
+ "s = 1.;\n",
+ "t = 1.;\n",
+ "for i in range(1,n+1): \n",
+ " s = s*i;\n",
+ "\n",
+ "for i in range(1,n-1):\n",
+ " t = t*i;\n",
+ "\n",
+ "P2n = s*P**2*(1-P)**8/(t*2);\n",
+ "P1n = n*P*(1-P)**(n-1);\n",
+ "Rsk = round(Rsk*1000)/1000;\n",
+ "P2n = round(P2n*10000)/10000;\n",
+ "P1n = round(P1n*1000)/1000;\n",
+ "\n",
+ "# Results\n",
+ "print \"probability of excedence = %.2f.\"%(P);\n",
+ "print \"probability of flood magnitude occuring at least once in 10 years = %.2f\"%(Rsk);\n",
+ "print \"probability of flood magnitude occuring at two times in 10 succesive years = %.2f\"%(P2n);\n",
+ "print \"probability of flood magnitude occuring at once in 10 succesive years = %.2f\"%(P1n);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "probability of excedence = 0.03.\n",
+ "probability of flood magnitude occuring at least once in 10 years = 0.22\n",
+ "probability of flood magnitude occuring at two times in 10 succesive years = 0.02\n",
+ "probability of flood magnitude occuring at once in 10 succesive years = 0.20\n"
+ ]
+ }
+ ],
+ "prompt_number": 87
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.38 pg : 215"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "C1 = 0.22;C2 = 0.12;C3 = 0.32; \t\t\t\t#run-off coefficient\n",
+ "A1 = 3.2;A2 = 4.8;A3 = 1.8; \n",
+ "L = 2.4; \t\t\t\t#length of water course\n",
+ "H = 30; \t\t\t\t#fall\n",
+ "T = 30; \t\t\t\t#frequency\n",
+ "\n",
+ "# Calculations\n",
+ "t = 60*0.000323*(L*1000)**0.77*(H/(L*1000))**(-0.385);\n",
+ "i = 78*T**0.22/(t+12)**0.45;\n",
+ "q = 2.778*i*(C1*A1+C2*A2+C3*A3);\n",
+ "q = round(q*10)/10;\n",
+ "\n",
+ "# Results\n",
+ "print \"peak rate of run off = %.2f cumecs.\"%(q);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "peak rate of run off = 141.20 cumecs.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.39 pg : 216"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "T = 30; \t\t\t\t#return period\n",
+ "A = 2.4; \t\t\t\t#area of watershed\n",
+ "s = 1./200; \t\t\t\t#slope oof catchment\n",
+ "L = 1.8; \t\t\t\t#length of travel of water\n",
+ "C = 0.25; \t\t\t\t#average run-off coefficient\n",
+ "r = [2.5, 3.8, 4.8, 5.9, 6.7, 7.4, 8.4, 8.7, 9.2]; \t\t\t\t#rmath.sinfall depth\n",
+ "\n",
+ "# Calculations\n",
+ "t = 60*0.000323*(L*1000)**0.77*(s)**(-0.385); \n",
+ "rmax = r[6]+(r[7]-r[6])*7.84/10;\n",
+ "i = rmax*60/t;\n",
+ "q = 2.778*C*A*i;\n",
+ "q = round(q*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"peak flow rate = %.2f cumecs.\"%(q);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "peak flow rate = 18.05 cumecs.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.40 pg : 216"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "pA = 75.; \t\t\t\t#precipitation at A\n",
+ "pB = 58; \t\t\t\t#precpitation at B\n",
+ "pC = 47; \t\t\t\t#precipitation at C\n",
+ "nA = 826; \t\t\t\t#normal precipitation at A\n",
+ "nB = 618; \t\t\t\t#normal precipitation at B\n",
+ "nC = 482; \t\t\t\t#normal precipitation at C\n",
+ "nX = 757; \t\t\t\t#normal precipitation at X\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "pX = (nX*pA/nA+nX*pB/nB+nX*pC/nC)/3.;\n",
+ "pX = round(pX*10)/10;\n",
+ "\n",
+ "# Results\n",
+ "print \"precipitation at x = %.2f cm.\"%(pX);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "precipitation at x = 70.90 cm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.41 pg : 216"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "p = [41, 51, 32, 55, 50, 68]; \t\t\t\t#rain guage readings at respective stations\n",
+ "s = sum(p)\n",
+ "pavg = s/6;\n",
+ "u = 0;\n",
+ "for i in range(5):\n",
+ " u = u+(p[i]-pavg)**2;\n",
+ "\n",
+ "# Calculations\n",
+ "sx = (u/5)**0.5;\n",
+ "Cv = sx*100/pavg;\n",
+ "N = (Cv/8)**2;\n",
+ "N = round(N*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"mean rainfall = %.2f cm.\"%(pavg);\n",
+ "print \"total stations needed = %.2f.\"%(N);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "mean rainfall = 49.00 cm.\n",
+ "total stations needed = 5.08.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.42 pg : 217"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "a = 4; \t\t\t\t#dimension of plot sides\n",
+ "P1 = 4.8;P2 = 13;P3 = 8;P4 = 5.4;P5 = 3.2;P6 = 9.4; \t\t\t\t#precipitaion at respective stations\n",
+ "\n",
+ "# Calculations\n",
+ "A1 = a**2/8+a**2/(4*1.73);\n",
+ "A2 = a**2/8;\n",
+ "A3 = A2;A4 = A1;\n",
+ "A5 = a**2/(4*1.73);\n",
+ "A6 = a**2/2;\n",
+ "A = A1+A2+A3+A4+A5+A6;\n",
+ "Pavg = (P1*A1+P2*A2+P3*A3+P4*A4+P5*A5+P6*A6)/A;\n",
+ "\n",
+ "# Results\n",
+ "print \"Mean precipitaion = %.2f cm.\"%(Pavg);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mean precipitaion = 7.35 cm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.43 pg : 218"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import linspace\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "A = [90, 140, 125, 140, 85, 40, 20]; \t\t\t\t#area of isohytes\n",
+ "I = linspace(13,1,7) \t\t\t\t#average isohytel interval\n",
+ "s = 0;t = 0;\n",
+ "for i in range(7):\n",
+ " s = s+A[i]*I[i];\n",
+ " t = t+A[i];\n",
+ "\n",
+ "Pavg = s/t;\n",
+ "Pavg = round(Pavg*10)/10;\n",
+ "\n",
+ "# Results\n",
+ "print \" average depth of precipitation = %.2f cm.\"%(Pavg);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " average depth of precipitation = 8.40 cm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.44 pg : 218"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "p = [120, 95, 96, 60, 65, 70, 45, 21]; \t\t\t\t#rain guage readings at respective stations\n",
+ "\n",
+ "# Calculations and Results\n",
+ "s = sum(p)\n",
+ "pavg = s/8;\n",
+ "u = 0;\n",
+ "for i in range(8):\n",
+ " u = u+(p[i]-pavg)**2;\n",
+ "\n",
+ "sx = (u/7)**0.5;\n",
+ "Cv = sx*100/pavg;\n",
+ "N = (Cv/13.99)**2;\n",
+ "N = round(N*100)/100;\n",
+ "print \"mean rainfall = %.2f cm.\"%(pavg);\n",
+ "print \"total stations needed = %.2f.\"%(N);\n",
+ "\t\t\t\t#taking N = 10\n",
+ "N = 10;\n",
+ "n = N-8;\n",
+ "print \"additional guages needed = %i.\"%(n);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "mean rainfall = 71.00 cm.\n",
+ "total stations needed = 10.03.\n",
+ "additional guages needed = 2.\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.45 pg : 219"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%matplotlib inline\n",
+ "from matplotlib.pylab import plot\n",
+ "from numpy import zeros,linspace\n",
+ "import math \n",
+ "#compute maximum rainfall intensities for 5,10,15,20,25,30,35,40,45,50 minutes\n",
+ "#plot intensity duration graph\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "CR = [0, 1.02, 2.08, 3.30, 4.72, 5.58, 6.40, 7.16, 7.88, 8.54, 9.14]; \t\t\t\t#cumulative rainfall\n",
+ "\n",
+ "c5 = zeros(11)\n",
+ "c10 = zeros(11)\n",
+ "c15 = zeros(11)\n",
+ "c20 = zeros(11)\n",
+ "c25 = zeros(11)\n",
+ "c30 = zeros(11)\n",
+ "c35 = zeros(11)\n",
+ "c40 = zeros(11)\n",
+ "c45 = zeros(11)\n",
+ "c50 = zeros(11)\n",
+ "\n",
+ "c5[1] = CR[1];\n",
+ "c10[2] = CR[2];\n",
+ "c15[3] = CR[3];\n",
+ "c20[4] = CR[4];\n",
+ "c25[5] = CR[5];\n",
+ "c30[6] = CR[6];\n",
+ "c35[7] = CR[7];\n",
+ "c40[8] = CR[8];\n",
+ "c45[9] = CR[9];\n",
+ "c50[10] = CR[10];\n",
+ "for i in range(2,11):\n",
+ " c5[i] = CR[i]-CR[i-1];\n",
+ "\n",
+ "for i in range(3,11):\n",
+ " c10[i] = CR[i]-CR[i-2];\n",
+ "\n",
+ "for i in range(4,11):\n",
+ " c15[i] = CR[i]-CR[i-3];\n",
+ "\n",
+ "for i in range(5,11):\n",
+ " c20[i] = CR[i]-CR[i-4];\n",
+ "\n",
+ "for i in range(6,11):\n",
+ " c25[i] = CR[i]-CR[i-5];\n",
+ "\n",
+ "for i in range(7,11):\n",
+ " c30[i] = CR[i]-CR[i-6];\n",
+ "\n",
+ "for i in range(8,11):\n",
+ " c35[i] = CR[i]-CR[i-7];\n",
+ "\n",
+ "for i in range(9,11):\n",
+ " c40[i] = CR[i]-CR[i-8];\n",
+ "\n",
+ "for i in range(10,11):\n",
+ " c45[i] = CR[i]-CR[i-9];\n",
+ " \t\t\t\t#rainfall in any possible time interval\n",
+ "\n",
+ "print \"5min 10min 15min 20min 25min 30min 35min 40min 45min 50min\";\n",
+ "for i in range(11):\n",
+ " print \"%4.2f %5.2f %5.2f %5.2f %5.2f %5.2f %5.2f %5.2f %5.2f %5.2f\"%(c5[i],c10[i],c15[i],c20[i],c25[i],c30[i],c35[i],c40[i],c45[i],c50[i]);\n",
+ "\n",
+ "I = [17.04, 15.84, 14.80, 14.16, 13.39, 12.80, 12.27, 11.82, 11.39, 10.97]; \t\t\t\t#maximum intensity at respective durations\n",
+ "D = linspace(5,50,len(I)) \t\t\t\t#durations\n",
+ "#graph is plotted between I and D\n",
+ "plot(I,D)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "5min 10min 15min 20min 25min 30min 35min 40min 45min 50min\n",
+ "0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00\n",
+ "1.02 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00\n",
+ "1.06 2.08 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00\n",
+ "1.22 2.28 3.30 0.00 0.00 0.00 0.00 0.00 0.00 0.00\n",
+ "1.42 2.64 3.70 4.72 0.00 0.00 0.00 0.00 0.00 0.00\n",
+ "0.86 2.28 3.50 4.56 5.58 0.00 0.00 0.00 0.00 0.00\n",
+ "0.82 1.68 3.10 4.32 5.38 6.40 0.00 0.00 0.00 0.00\n",
+ "0.76 1.58 2.44 3.86 5.08 6.14 7.16 0.00 0.00 0.00\n",
+ "0.72 1.48 2.30 3.16 4.58 5.80 6.86 7.88 0.00 0.00\n",
+ "0.66 1.38 2.14 2.96 3.82 5.24 6.46 7.52 8.54 0.00\n",
+ "0.60 1.26 1.98 2.74 3.56 4.42 5.84 7.06 8.12 9.14\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 22,
+ "text": [
+ "[<matplotlib.lines.Line2D at 0x107a3ca50>]"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXIAAAEACAYAAACuzv3DAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHNpJREFUeJzt3X2czXXex/HXDDaR+zKEkJLN/b0NOesuqZDKEhnSze61\nl5VKlC2zVEJu1m5pt1RuFpWKRCXlXFKbjcZNpBt3S4WSonTvXH98zphpOmbOmTnnfH/nnPfz8ZjH\n/M6ZOc77MfTpO5/f9wZERERERERERERERERERERERERERCKSFub37QaOAD8BPwBtgMrAE0Dt4Nf7\nAV9EPaGIiETFLqxw5zUZuC14PRq4L66JREQkIruAKvme2w5kBK+rBR+LiIhH7QSygfXA9cHnDuf5\nelq+xyIi4jHVg5/PADYCHfll4f48rolERASAkmF+3yfBz58Cz2I3Ow9gLZX9WKE/mP9F9erVC+zY\nsSMKMUVEUsoO4Jxwvzk9jO8pA5QLXpcFugNbgOeAzODzmcCSXyTZsYNAIODZjyNHApx9doB+/cY5\nz1LYx7hx3s+onMrp9Y9EyQnUC7eIQ3gj8gxsFJ7z/f8CVmL98ieBYeROP0wo5crB/PnQtSt8/DGc\neabrRCIikQunkO8CmoV4/nOga3TjxN9vfgOtW0NmJrz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2fEO1QIJ/s7z3E/8Of4\nxTmpUDn9wEXB64ux2lSgaO218hpwON9zvYA5wes5QJ8ovVdxhMq5HfutwUtC5XwZGzkCrANqxjVR\naKFyHs1zfRrwWfzinFSonADTyB1seMHJcnpp0V2ojH8AJgI/BB974Sjlk/0swX6e/YCF8YtzUqFy\nfkLub9wVgULPSYrlplkZ2K8MBD9nxPC9Us21wArXIQpwD/BfIBNv/OYQSm+sZbHZdZAwDMfaVbPx\nRosyv3OBC4E3sdFkK6dpCtcRq0le3QR3DDaN+79YS/X2wl4Qr90PA8EPKb6xwPfAAtdBCjAWOAt4\nHJjuNkpIZYA7sLZFDi+NevOaBdQFmmEjtakFf7sTJYFKQDtgFPCk2ziFGoC3//uZDfwJ+29oJNZH\nL1AsC/kBoFrwujpwMIbvlSqGAD2BgY5zhGsBcbxRE4F6QB1slLsLa1NtAKo6zHQyB8kdCD2CNzen\n24fdgAe7OXccqOIuToFKApcDT7gOUoA25E7tXkwYf+exLOTPYb9aE/y8JIbvFS1eHZWBzVYYhbUE\nvnWcpSDn5rnujTdmBuS3BWv11Q1+7MNudHtxsFE9z/XlnPzmnUtLgM7B6/rAr4BD7uIUqCs2u8bL\nu658CHQKXncmjvfwFmI/mO+BvcBQbBbAKrw1/TB/zmuxm7B7gW+A/cALztLlCpXzA2APudOnHnSW\nLleonIuxYrMReBpvjHJzcn5H7r/PvHbijVkroX6ec7E+/iasYLq+1xTqZ1kKmIf9vW/AtrZ27WR/\n548BN7gKFUKo2tkKm9CwEfg3NqtFRERERERERERERERERERERERERERERERERJLF/wMU/nSXoED/\n2gAAAABJRU5ErkJggg==\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x107749510>"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.46 pg : 221"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%matplotlib inline\n",
+ "import math\n",
+ "from matplotlib.pylab import plot\n",
+ "#draw storm hyetograph and intensity duration curve\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "p = [0, 5, 7.5, 8.5, 9]; \t\t\t\t#accumulated precipitation\n",
+ "t = [0, 30, 60, 90, 120]; \t\t\t\t#time\n",
+ "r = zeros(5)\n",
+ "I = zeros(5)\n",
+ "\n",
+ "print \"Rainfall intensity:\";\n",
+ "for i in range(1,5):\n",
+ " r[i] = p[i]-p[i-1]; \t\t\t\t#rainfall in succesive 30 min interval\n",
+ " I[i] = r[i]*60/30; \t\t\t\t#rainfall intensity\n",
+ " print \"%.2f\"%(I[i]);\n",
+ "\n",
+ "#graph is plotted between I and t.\n",
+ "plot(I,t)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rainfall intensity:\n",
+ "10.00\n",
+ "5.00\n",
+ "2.00\n",
+ "1.00\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 23,
+ "text": [
+ "[<matplotlib.lines.Line2D at 0x107a6a850>]"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEACAYAAABI5zaHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAES1JREFUeJzt3XuQnWV9wPFvyAYbiiVkpEmAJEsDMYQ6lABBECaHKEod\nBf5QiAMMRW3HkQ5YQXNT2T8sJgFGBAZnKgPEWgLhIspMbQHdA2KK0AIpzQVC2gwkDkESoBdhjGb7\nx/Nu9mSzt3N7n+c97/czc+Zc9pzdhzPky8vze88GJEmSJEmSJEmSJEmSJEmSOtYdwE7ghZrHrgc2\nAeuBB4HDar62FNgCbAY+mtMaJUl1Ogs4if3jfg5wUHZ7RXYBmAs8D0wAuoGXa54nScrRaPH9OfDm\noMceBfZmt38JHJ3dPh9YA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xPIJ4HXCfnuM\n31Kaki5gHnBbdv1/lPf/bmcBXyIc/BxJ+LNyccwFJaaPUZqaZ9x3EAaJ/aYTjt7LagLwAPADwrZM\nWZ0BnAf8F7AGWAh8P+qK4tmeXZ7J7t9PiHwZnQKsA3YBvwMeJPy7UmY7CdsxANMIB0VJ8ANOA8YR\nAvbt2AtJzALKvecO8AQwO7vdw4G/MrssTiScSTaR8OdlNXBF1BXlr5sDB6r9ZxkuIaGBKvgBp35n\nEvaXnydsRzzHwK9sKLMFeLbMiYQj9/WEo9Wyni0D4cyQ/lMhVxP+b7cs1hBmDb8lzCovJwyZHyPB\nUyElSZIkSZIkSZIkSZIkSZIkSZIkldD/Aw0v7UUBAzTHAAAAAElFTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x10775c090>"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.47 pg : 222"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%matplotlib inline\n",
+ "import math\n",
+ "from numpy import zeros,linspace\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "I = linspace(21,12,10) \t\t\t\t#isohytes\n",
+ "a = [543, 1345, 2030, 2545, 2955, 3280, 3535, 3710, 3880, 3915]; \t\t\t\t#enclosed area\n",
+ "ia = zeros(10)\n",
+ "ia[0] = 543;\n",
+ "for i in range(1,10):\n",
+ " ia[i] = a[i]-a[i-1]; \t\t\t\t#net incremental area between isohytes\n",
+ "\n",
+ "rv = zeros(10)\n",
+ "r = linspace(21.5,12.5,10) \n",
+ "for i in range(10):\n",
+ " rv[i] = r[i]*ia[i]; \t\t\t\t#rainfall volume\n",
+ "\n",
+ "cv = zeros(10)\n",
+ "cv[0] = 11675;\n",
+ "for i in range(10):\n",
+ " cv[i] = cv[i-1]+rv[i]; \t\t\t\t#cumulative volume\n",
+ "\n",
+ "eud = zeros(10)\n",
+ "for i in range(10):\n",
+ " eud[i] = cv[i]/a[i]; \t\t\t\t#depth(mm)\n",
+ "\n",
+ "\n",
+ "print \"From depth area curve we obtain average depth of precipitation = 20.15 mm for anarea of 2400 sq. km.\";\n",
+ "#graph is plotted between eud and a\n",
+ "plot(eud,a)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "From depth area curve we obtain average depth of precipitation = 20.15 mm for anarea of 2400 sq. km.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 24,
+ "text": [
+ "[<matplotlib.lines.Line2D at 0x107afa410>]"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAEACAYAAABRQBpkAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl4VOXZx/FvIAmLqIhYCKACiiwFJYRNEBgQEFwAF1bF\nKCjaqLi1Alpe0tIqoqj4WhABLciiqJUXEJBFIghCBIKyRQgVNFHQ1r1qBcn7x31whjiYSTKZM2fm\n97muuc6ZZ86ZuU+PzcNzP8sBERERERERERERERERERERERERERGREqkI5ACLnfc1gJXAHmAFUD3g\n2DHAXiAX6BlQngZsdz6bXM7xiohIObgHmAssct5PBO5z9kcBE5z9ZsA2IAmoD+QBCc5n2UBbZ38p\n0KtcIxYRkbCqB6wCuuJvGeQCtZz92s57sFbBqIBzlwPtgRRgd0D5IODpcopXRERKqEIIxzwO/AE4\nGlBWCzjk7B/CXzHUAfIDjssH6gYpL3DKRUQkChRXGVwOfIr1FySc4JhC5yUiIh6VWMznHYA+wKVA\nZeAU4HmsNVAbOIilgD51ji8Azgw4vx7WIihw9gPLC4L94DnnnFO4b9++El2EiEic2wecG6kf64K/\nz2Ai/r6B0fyyAzkZaOAEeKxFsQlo57z/tQ7kwlg1btw4t0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REREREREREREREREREREREREREREREREQkGv0/xX+6BI93\n2EwAAAAASUVORK5CYII=\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x107819650>"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.48 pg : 222"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "h1 = 7.75; \t\t\t\t#initial depth of water\n",
+ "r = 3.80; \t\t\t\t#rainfall during the week\n",
+ "hr = 2.50; \t\t\t\t#depth of water removed\n",
+ "C = 0.7; \t\t\t\t#pan coefficient\n",
+ "\n",
+ "# Calculations\n",
+ "ha = r-hr;\n",
+ "hl = ha+h1;\n",
+ "h2 = 8.32;\n",
+ "ev = hl-h2;\n",
+ "evs = ev*C;\n",
+ "evs = round(evs*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"evaporation from reservior surface during the week = %.2f cm.\"%(evs);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "evaporation from reservior surface during the week = 0.51 cm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.49 pg : 223"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import linspace\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "T = linspace(1,12,12) \t\t\t\t#time from start\n",
+ "r = [1.8, 2.6, 7.8, 3.9, 10.6, 5.4, 7.8, 9.2, 6.5, 4.4, 1.8, 1.6]; \t\t\t\t#increamental rainfall\n",
+ "R = 24.4; \t\t\t\t#total run-off\n",
+ "s = sum(r)\n",
+ "\n",
+ "ti = s-R;\n",
+ "\n",
+ "#first trial\n",
+ "tr = 7; \t\t\t\t#assumed\n",
+ "ti = s-R-r[0]-r[1]-r[3]-r[10]-r[11];\n",
+ "fi = ti/tr;\n",
+ "P = zeros(12)\n",
+ "for i in range(12):\n",
+ " P[i] = r[i]-fi;\n",
+ " if (P[i]<0):\n",
+ " P[i] = 0;\n",
+ "\n",
+ "print \"Timeh rainfall excess.\";\n",
+ "for i in range(12):\n",
+ " print \"%.2f %.2f\"%(T[i],P[i]);\n",
+ "\n",
+ "print \"fi index = %.2f cm/hr.\"%(fi);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Timeh rainfall excess.\n",
+ "1.00 0.00\n",
+ "2.00 0.00\n",
+ "3.00 3.90\n",
+ "4.00 0.00\n",
+ "5.00 6.70\n",
+ "6.00 1.50\n",
+ "7.00 3.90\n",
+ "8.00 5.30\n",
+ "9.00 2.60\n",
+ "10.00 0.50\n",
+ "11.00 0.00\n",
+ "12.00 0.00\n",
+ "fi index = 3.90 cm/hr.\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.50 pg : 224"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import linspace\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "r = [0.6, 1.35, 2.25, 3.45, 2.7, 2.4, 1.5, 0.75]; \t\t\t\t#incremental rainfall\n",
+ "T = linspace(1,8,8) \t\t\t\t#time from start of rainfal\n",
+ "t = 8.;\n",
+ "P = 15.; \t\t\t\t#total rainfall\n",
+ "R = 8.7; \t\t\t\t#direct run-off\n",
+ "\n",
+ "# Calculations\n",
+ "W = (P-R)/t;\n",
+ "#math.since fi wil be more than W\n",
+ "tre = 6;\n",
+ "fi = ((P-R)-r[0]-r[7])/tre;\n",
+ "\n",
+ "# Results\n",
+ "print \"fi index = %.2f cm/hr.\"%(fi);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "fi index = 0.83 cm/hr.\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.51 pg : 224"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "I = 10; \t\t\t\t#total infiltration rate\n",
+ "fI = 5; \t\t\t\t#final infiltration rate\n",
+ "k = 0.95; \t\t\t\t#rate of decay of difference between final and initial infiltration rate\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "def f8(t): \n",
+ "\t return fI+(I-fI)*math.e**(-k*t)\n",
+ "\n",
+ "q = quad(f8,0,6)[0]\n",
+ "q = round(q*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"total infiltration depth = %.2f mm.\"%(q);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "total infiltration depth = 35.25 mm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.52 pg : 224"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import linspace\n",
+ "\n",
+ "#find the equation of infiltration capacity\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "fc = 1; \t\t\t\t#consmath.tant infiltration rate\n",
+ "ft = [10.4, 5.6, 3.2, 2.1, 1.5, 1.2, 1.1, 1, 1]; \t\t\t\t#infiltration capacity\n",
+ "f = ft[0]-fc;\n",
+ "t = linspace(0,2,9)\n",
+ "\n",
+ "r = zeros(9)\n",
+ "for i in range(9):\n",
+ " r[i] = ft[i]-fc;\n",
+ "\n",
+ "h = zeros(7)\n",
+ "for i in range(7):\n",
+ " h[i] = math.log10(r[i]);\n",
+ "\n",
+ "s = 0.775; \t\t\t\t#from graph\n",
+ "k = 1/(math.log10(math.e)*s);\n",
+ "k = round(k*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"Equation is:ft = fc+%.2fe**-%.2ft)\"%(f,k);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Equation is:ft = fc+9.40e**-2.97t)\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.53 pg : 226"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%matplotlib inline\n",
+ "from matplotlib.pylab import bar\n",
+ "import math \n",
+ "#total rainfall\n",
+ "#net run-off\n",
+ "#W index\n",
+ "\n",
+ "#Given\n",
+ "r = [2, 2, 8, 7, 1.25, 1.25, 4.5]; \t\t\t\t#rainfall intensity\n",
+ "T = [15, 30, 45, 60, 70, 90, 105]; \t\t\t\t#time\n",
+ "dt = 15.; \t\t\t\t#time interval\n",
+ "fi = 3.; \t\t\t\t#fi index\n",
+ "#graph is plotted between r and T\n",
+ "bar(T,r)\n",
+ "s = sum(r)\n",
+ "P = s*dt/60;\n",
+ "Pe = ((8-3)+(7-3)+(4.5-3))*dt/60; \t\t\t\t#area of graph above r = 3.0.\n",
+ "w = (P-Pe)/(105./60);\n",
+ "w = round(w*1000)/1000;\n",
+ "\n",
+ "# Results\n",
+ "print \"total rainfall = %.2f cm.\"%(P);\n",
+ "print \"net run-off = %.2f cm.\"%(Pe);\n",
+ "print \"W index = %.2f cm/hr.\"%(w);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "total rainfall = 6.50 cm.\n",
+ "net run-off = 2.62 cm.\n",
+ "W index = 2.21 cm/hr.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAW8AAAEACAYAAAB8nvebAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAADU9JREFUeJzt3X2MHHUdx/H30qPy1ANOjQUhOaxgIDEqMQiKcTBVkaBo\nYqJGUSHRvwwYI2g1yv6liBowMfzhE0HkKUEh1OATyiQaDIIWRUpVTsWKUohFWx+IKOsfv7ne9uh1\nZ3dnbvc7834lm9udndv5fm9nP/e7387egCRJkiRJkiRJkiRJkiRJarlNwP3AfcB1wDMmW44kaZB5\n4HcsBfaNwLsnVo0kCYCZAffvAp4EDgH+V3x9uO6iJEnjex+wG3gUuGbCtUiSStgAbAWeSRql3wy8\nY6IVSZIGTpu8FLgT+Gtx+5vAy4FrF1fYsGFDb2FhoZ7qJKm5FoDnj/rNBwy4fxtwKnAw0AE2kkbi\nS1tfWKDX6zX2cskll0y8hmnsL0lfJ92Dz9/k67C34S+kmY2RDQrvXwBfA+4Bflks++I4G5QkjW/Q\ntAnAZcVFkjQlBo28Wy/LskmXUCv7i63J/TW5typ0KniMXjF/oxbpdDqkOe8OPv/S8NJraPQMduQt\nSQEZ3pIUkOEtSQEZ3pIUkOEtSQEZ3pIUkOEtSQEZ3pIUkOEtSQEZ3pIUkOEtSQEZ3pIUkOEtSQEZ\n3pIUkOEtSQEZ3pIUkOEtSQGVCe8XAFv6Ln8HLqizKEnS/g17Cp4DgIeBU4DtxTJPg9ZCngZNGs9q\nnwZtI7DAUnBLkiZg2PB+G3BdHYVIksobZsi+ljRlchLwWN9yp01ayGkTaTzjTpvMDLHu64GfsXdw\nA9Dtdvdcz7KMLMtGrUeq1OzsHLt3P866dUeya9fOSZejFsvznDzPK3u8YVL/BuDbwNXLljvybqEo\nI+8odap9xh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lnauaC4HLiId\n7rmoKb0dBzwGXAX8HPgScCjN6W8n8Dngj8Cfgb+Rphea0t+ilfo5mpQxi5qQN+cDtxXXh+5vnPBu\n8gd4DgO+AVwI7F52X4+YvZ8NPEqa717p+P6ovUEajZ4MXFl8/SdP/0swcn8bgA+QBhVHk/bRdy5b\nJ3J/+zKon8i9fgz4D+m9i5Xst79xwvth0ht8i45l798cUR1ICu5rSNMmkEYA64vrR5FCMJqXA28E\nfg9cD7ya1GMTeoO07/0JuLu4fRMpxB+hGf29FLgT+CvwX9KbXafRnP4WrbQ/Ls+bY4plEb0HOAt4\nR9+yofsbJ7zvAY5n6QM8b2XpTbCoOsBXSEcqXNG3/FbSm0MUX28hno+Sdo7jgLcBPwTOpRm9QQqx\n7cAJxe2NpCMzNtOM/raR5kAPJu2nG0n7aVP6W7TS/ngrab9dS9qHjwd+uurVje9M0tTlOcATfctX\nvb+mfYDndNJ88L2k6YUtpB/2HOmNvoiHY+3Lq1j6Rduk3l5EGnn3H4bVpP4uZulQwatJfyVG7u96\n0vz9f0i/eM9j//18lJQ124DXrWqlo1ne3/mkQwEfYilfruxbP1p/kiRJkiRJkiRJkiRJkiRJkiRJ\nUmz/B97QUHeIqu3oAAAAAElFTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x1078e6e10>"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.54 pg : 226"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "#run-off by rainfall of 3.3cm in 3hrs\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "A = [36, 18, 66]; \t\t\t\t#area of catchment\n",
+ "fi = [0.9 ,1.1, 0.5]; \t\t\t\t#fi index\n",
+ "r1 = [0.6 ,0.9, 1.0]; \t\t\t\t#rainfall in first hour\n",
+ "r2 = [2.4 ,2.1, 2.0]; \t\t\t\t#rainfall in second hour\n",
+ "r3 = [1.3, 1.5, 0.9]; \t\t\t\t#rainfall in third hour\n",
+ "\n",
+ "# Calculations and Results\n",
+ "t36 = r1[0]+r2[0]+r3[0];\n",
+ "t18 = r1[1]+r2[1]+r3[1];\n",
+ "t66 = r1[2]+r2[2]+r3[2];\n",
+ "\n",
+ "p = (t36*A[0]+t18*A[1]+t66*A[2])/(A[0]+A[1]+A[2]);\n",
+ "print \"Total rainfall in catchment = %.2f cm.\"%(p);\n",
+ "\n",
+ "ro1 = [0 ,0, 0.5];\n",
+ "ro2 = [1.5 ,1.0, 1.5];\n",
+ "ro3 = [0.4, 0.4, 0.4]; \t\t\t\t#rainfall-fi\n",
+ "t1 = ro1[0]+ro2[0]+ro3[0];\n",
+ "t2 = ro1[1]+ro2[1]+ro3[1];\n",
+ "t3 = ro1[2]+ro2[2]+ro3[2];\n",
+ "run = (A[0]*t1+A[1]*t2+A[2]*t3)/(A[0]+A[1]+A[2]); \t\t\t\t#run-off from entire catchment\n",
+ "\n",
+ "print \"run-off by rainfall of 3.3cm in 3hrs = %.2f cm.\"%(run);\n",
+ "\n",
+ "fia = (fi[0]*A[0]+fi[1]*A[1]+fi[2]*A[2])/(A[0]+A[1]+A[2]);\n",
+ "tr = (1.1-fia)*3;\n",
+ "print \"Total run-off = %.2f cm.\"%(tr);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total rainfall in catchment = 4.11 cm.\n",
+ "run-off by rainfall of 3.3cm in 3hrs = 2.10 cm.\n",
+ "Total run-off = 1.17 cm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.55 pg : 227"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import array\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "P = array([4, 22, 28, 15, 12, 8, 4, 15, 10, 5]); \t\t\t\t#Precipitation\n",
+ "R = array([0.2, 7.1, 10.9, 4.0, 3.0, 1.3, 0.4, 4.1, 2.0, 0.3]); \t\t\t\t#runoff\n",
+ "\n",
+ "# Calculations\n",
+ "Ps = P**2\n",
+ "Rs = R**2\n",
+ "PR = P*R\n",
+ "\n",
+ "s = sum(Ps)\n",
+ "t = sum(Rs)\n",
+ "u = sum(PR)\n",
+ "q = sum(P)\n",
+ "w = sum(R)\n",
+ "\n",
+ "N = 10.;\n",
+ "a = (N*u-q*w)/(N*s-q**2);\n",
+ "b = (w-a*q)/N;\n",
+ "a = round(a*10000)/10000;\n",
+ "b = round(b*10000)/10000;\n",
+ "\n",
+ "# Results\n",
+ "print \"Equation is:%.2f P %.2f.\"%(a,b);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Equation is:0.43 P -1.93.\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.56 pg : 228"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 470; \t\t\t\t#peak discharge of flood hydrograph\n",
+ "B = 15; \t\t\t\t#base flow\n",
+ "l = 0.25; \t\t\t\t#infiltration loss\n",
+ "Qr = Q-B;\n",
+ "d = 8; \t\t\t\t#average depth of rainfall\n",
+ "\n",
+ "# Calculations\n",
+ "re = d-l*6; \t\t\t\t#rainfall excess\n",
+ "q = Qr/re;\n",
+ "\n",
+ "# Results\n",
+ "print \"peak discharge of 6 hrs unit hydrograph = %i cumecs.\"%(q);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "peak discharge of 6 hrs unit hydrograph = 70 cumecs.\n"
+ ]
+ }
+ ],
+ "prompt_number": 117
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.57 pg : 228"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import array,zeros\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "fi = 0.25; \t\t\t\t#infiltration index\n",
+ "B = 20; \t\t\t\t#Base flow\n",
+ "O = array([0, 20, 60, 150, 120, 90, 70, 50, 30, 20, 10, 0, 0, 0]); \t\t\t\t#ordinates of unit hydrograph\n",
+ "R1 = 5;\n",
+ "R2 = 0.8;\n",
+ "R3 = 3;\n",
+ "r1 = R1-(fi*4); \t\t\t\t#rainfall excess in first four hour\n",
+ "r2 = R2-(fi*4); \t\t\t\t#rainfall excess in second four hour\n",
+ "r3 = R3-(fi*4); \t\t\t\t#rainfall excess in third four hour\n",
+ "if r2<0 :\n",
+ " r2 = 0;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "s1 = r1*O\n",
+ "s2 = zeros(14)\n",
+ "for i in range(1,14):\n",
+ " s2[i] = r2*O[i-1];\n",
+ "\n",
+ "s3 = zeros(14)\n",
+ "for i in range(2,14):\n",
+ " s3[i] = r3*O[i-2];\n",
+ "#surface run-off from rainfall excess during succesive unit periods\n",
+ "print \"ordinates of storm hydrograph\";\n",
+ "T = zeros(14)\n",
+ "t = zeros(14)\n",
+ "for i in range(14):\n",
+ " T[i] = s1[i]+s2[i]+s3[i]; \t\t\t\t#sub-total\n",
+ " t[i] = T[i]+B; \t\t\t\t#ordinate of flood hydrograph\n",
+ " print \"%i\"%(t[i]);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ordinates of storm hydrograph\n",
+ "20\n",
+ "100\n",
+ "260\n",
+ "660\n",
+ "620\n",
+ "680\n",
+ "540\n",
+ "400\n",
+ "280\n",
+ "200\n",
+ "120\n",
+ "60\n",
+ "40\n",
+ "20\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.58 pg : 229"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import array\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "fi = 2.5; \t\t\t\t#fi index\n",
+ "t = 24.;\n",
+ "A = 200.; \t\t\t\t#area of catchment\n",
+ "R1 = 7.5;\n",
+ "R2 = 2.0;\n",
+ "R3 = 5.; \t\t\t\t#rainfall\n",
+ "r1 = R1-fi;\n",
+ "r2 = R2-fi;\n",
+ "r3 = R3-fi;\n",
+ "r2 = 0;\n",
+ "r = [5, 0, 2.5]; \t\t\t\t#excess rainfall\n",
+ "D = array([5 ,15, 40, 25, 10, 5, 0, 0, 0]); \t\t\t\t#distribution\n",
+ "d1 = D*r[0]/100\n",
+ "d2 = zeros(9)\n",
+ "for i in range(8):\n",
+ " d2[i+1] = D[i]*r[1]/100;\n",
+ "\n",
+ "d3 = zeros(9)\n",
+ "for i in range(7):\n",
+ " d3[i+2] = D[i]*r[2]/100;\n",
+ "#distribution run-off for rainfall excess\n",
+ "\n",
+ "tr1 = zeros(9)\n",
+ "tr2 = zeros(9)\n",
+ "for i in range(9):\n",
+ " tr1[i] = d1[i]+d2[i]+d3[i]; \t\t\t\t#total run-off as depth\n",
+ " tr2[i] = 23.148*tr1[i]; \t\t\t\t#total run-off as discharge\n",
+ " tr2[i] = round(tr2[i]*1000)/1000;\n",
+ "\n",
+ "s = sum(tr2)\n",
+ "\n",
+ "print \"Total run-off:\";\n",
+ "print \"as depth as discharge\";\n",
+ "for i in range(9):\n",
+ " print \"%.2f %.2f\"%(tr1[i],tr2[i]);\n",
+ "\n",
+ "r = 0.36*s*t/A;\n",
+ "r = round(r*10)/10;\n",
+ "print \"total run-off = %.2f cm.\"%(r);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total run-off:\n",
+ "as depth as discharge\n",
+ "0.00 0.00\n",
+ "0.00 0.00\n",
+ "2.12 49.19\n",
+ "1.38 31.83\n",
+ "1.00 23.15\n",
+ "0.62 14.47\n",
+ "0.25 5.79\n",
+ "0.12 2.89\n",
+ "0.00 0.00\n",
+ "total run-off = 5.50 cm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.59 pg : 230"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import zeros\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "O = [10, 30, 90, 220, 280, 220, 166, 126, 92, 62, 40, 20, 10]; \t\t\t\t#ordinates of 6 hr flood hydrograph\n",
+ "B = 10; \t\t\t\t#Base flow\n",
+ "r = zeros(13)\n",
+ "\n",
+ "for i in range(13):\n",
+ " r[i] = O[i]-B; \t\t\t\t#ordinates of direct run-off\n",
+ "\n",
+ "print \"Ordinates of 6 hr unit hydrograph\";\n",
+ "u = zeros(13)\n",
+ "\n",
+ "for i in range(1,13):\n",
+ " u[i] = r[i]-u[i-1]; \t\t\t\t#ordinates of 6 hrs unit hydrograph\n",
+ "\n",
+ "for i in range(13): \n",
+ " print \"%i\"%(u[i]);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ordinates of 6 hr unit hydrograph\n",
+ "0\n",
+ "20\n",
+ "60\n",
+ "150\n",
+ "120\n",
+ "90\n",
+ "66\n",
+ "50\n",
+ "32\n",
+ "20\n",
+ "10\n",
+ "0\n",
+ "0\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.60 pg : 231"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import zeros\n",
+ "\n",
+ "#determine the ordinates of 1 cm-6 hour hydrograph\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "t = 6;\n",
+ "A = 450; \t\t\t\t#catchment area\n",
+ "O = [5, 15, 40, 80, 60, 50, 25, 15, 5]; \t\t\t\t#ordinates of flood hydrograph\n",
+ "B = 5; \t\t\t\t#base flow assumed\n",
+ "s = 0;\n",
+ "r = zeros(9)\n",
+ "for i in range(9):\n",
+ " r[i] = O[i]-B; \t\t\t\t#ordinates of direct run-off\n",
+ " s = s+r[i];\n",
+ "\n",
+ "n = s*0.36*12/A;\n",
+ "print \"ordinates of unit hydrograph\";\n",
+ "for i in range(9):\n",
+ " u[i] = r[i]/n;\n",
+ " u[i] = round(u[i]*100)/100;\n",
+ " print \"%.2f\"%(u[i]);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ordinates of unit hydrograph\n",
+ "0.00\n",
+ "4.17\n",
+ "14.58\n",
+ "31.25\n",
+ "22.92\n",
+ "18.75\n",
+ "8.33\n",
+ "4.17\n",
+ "0.00\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.61 pg : 232"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import zeros\n",
+ "\n",
+ "#obtain ordinates 24 hr unit hydrograph\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "O = [0, 5.5, 13.5, 26.5, 45, 82, 162, 240, 231, 165, 112, 79, 57, 42, 31, 22, 14, 9.5, 6.6, 4, 2, 1, 0, 0, 0, 0, 0]; \t\t\t\t#ordinates of 1st 8 hrs unit hydrograph\n",
+ "o1 = zeros(27)\n",
+ "o2 = zeros(29)\n",
+ "for i in range(25):\n",
+ " o1[i+2] = O[i]; \t\t\t\t#ordinates of 2nd 8 hrs unit hydrograph\n",
+ " o2[i+4] = O[i]; \t\t\t\t#ordinates of 3rd 8 hrs unit hydrograph\n",
+ "\n",
+ "o3 = zeros(27)\n",
+ "t = zeros(27)\n",
+ "print \"ordinates 24 hr unit hydrograph:\";\n",
+ "for i in range(27):\n",
+ " o3[i] = o1[i]+o2[i]+O[i]; \t\t\t\t#total 24 hr hydrograph of 3 cm run-off\n",
+ " t[i] = o3[i]/3;\n",
+ " t[i] = round(t[i]*10)/10;\n",
+ " print \"%.2f\"%(t[i]);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ordinates 24 hr unit hydrograph:\n",
+ "0.00\n",
+ "1.80\n",
+ "4.50\n",
+ "10.70\n",
+ "19.50\n",
+ "38.00\n",
+ "73.50\n",
+ "116.20\n",
+ "146.00\n",
+ "162.30\n",
+ "168.30\n",
+ "161.30\n",
+ "133.30\n",
+ "95.30\n",
+ "66.70\n",
+ "47.70\n",
+ "34.00\n",
+ "24.50\n",
+ "17.20\n",
+ "11.80\n",
+ "7.50\n",
+ "4.80\n",
+ "2.90\n",
+ "1.70\n",
+ "0.70\n",
+ "0.30\n",
+ "0.00\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.62 pg : 233"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%matplotlib inline\n",
+ "import math \n",
+ "from numpy import zeros,linspace\n",
+ "\n",
+ "\n",
+ "#ordinates of 1 hr unit hydrograph\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "t = linspace(0,12,13) \t\t\t#time\n",
+ "O = [0, 0, 54, 0, 175, 0, 127, 0, 58, 0, 25, 0, 0, 0]; \t\t\t\t#ordinate of 2 hr unit hydrograph\n",
+ "of = zeros(13)\n",
+ "for i in range(2,13):\n",
+ " if (i%2) == 0:\n",
+ " of[i] = 0\n",
+ " else:\n",
+ " of[i] = O[i-2]+of[i-2];\n",
+ "\n",
+ "s = [0, 25, 54, 120, 229, 300, 356, 390, 414, 430, 439, 439, 439]; \t\t\t\t#Ordinates of S-curve\n",
+ "of1 = zeros(13)\n",
+ "for i in range(1,13):\n",
+ " of1[i] = s[i-1];\n",
+ "\n",
+ "y = zeros(13)\n",
+ "u = zeros(13)\n",
+ "print \"ordinates of 1 hr unit hydrograph:\";\n",
+ "for i in range(13):\n",
+ " y[i] = s[i]-of1[i];\n",
+ " u[i] = y[i]*2;\n",
+ " print \"%i\"%(u[i]);\n",
+ "\n",
+ "#graph is plotted between u and t\n",
+ "plot(t,u)\n",
+ "\n",
+ "\n",
+ "# graph in book is wrong. Please check."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ordinates of 1 hr unit hydrograph:\n",
+ "0\n",
+ "50\n",
+ "58\n",
+ "132\n",
+ "218\n",
+ "142\n",
+ "112\n",
+ "68\n",
+ "48\n",
+ "32\n",
+ "18\n",
+ "0\n",
+ "0\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 26,
+ "text": [
+ "[<matplotlib.lines.Line2D at 0x107bea8d0>]"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXgAAAEACAYAAAC57G0KAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHv5JREFUeJzt3Xl41NX1x/F32GSVRYtABIKIbIogiyAqASWApVixUl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"heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.63 pg : 234"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "xavg = 1200; \t\t\t\t#sample mean\n",
+ "n = 50.; \t\t\t\t#assurance year\n",
+ "A = 0.95; \t\t\t\t#assurance percent\n",
+ "Rsk = 1-A;\n",
+ "sigma = 650; \t\t\t\t#smath.radians(numpy.arcmath.tan(ard deviation\n",
+ "yn = 0.53622; \t\t\t\t#mean of reduced variate\n",
+ "sigma30 = 1.11238; \t\t\t\t#smath.radians(numpy.arcmath.tan(ard deviation of reduced variate\n",
+ "\n",
+ "# Calculations\n",
+ "T = 1/(1-(1-Rsk)**(1/n));\n",
+ "yt = -2.303*math.log10(2.303*math.log10(T/(T-1)));\n",
+ "K = (yt-yn)/sigma30;\n",
+ "xt = xavg+K*sigma;\n",
+ "\n",
+ "# Results\n",
+ "print \" design disharge = %i cumecs.\"%(xt);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " design disharge = 4908 cumecs.\n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.64 pg : 235"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "T1 = 50.;\n",
+ "T2 = 100.; \t\t\t\t#Return period\n",
+ "F1 = 20600.;\n",
+ "F2 = 22150; \t\t\t\t#Peak flood\n",
+ "\n",
+ "# Calculations\n",
+ "y100 = -(2.303*math.log10(2.303*math.log10(T2/(T2-1))));\n",
+ "y50 = -(2.303*math.log10(2.303*math.log10(T1/(T1-1))));\n",
+ "y = (F2-F1)/(y100-y50);\n",
+ "T = 500.;\n",
+ "y500 = -(2.303*math.log10(2.303*math.log10(T/(T-1))));\n",
+ "x500 = F2+(y500-y100)*y;\n",
+ "x500 = round(x500);\n",
+ "\n",
+ "# Results\n",
+ "print \"flood magnitude with return period of 240 years = %.2f cumec.\"%(x500);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "flood magnitude with return period of 240 years = 25732.00 cumec.\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.65 pg : 235"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "xavg = 1.65; \t\t\t\t#mean of data\n",
+ "sigma = 0.45; \t\t\t\t#smath.radians(numpy.arcmath.tan(ard deviation\n",
+ "x = 3;\n",
+ "\n",
+ "# Calculations\n",
+ "y = 1.2825*(x-xavg)/sigma+0.577;\n",
+ "l = math.e**(math.e**(-y));\n",
+ "T = l/(l-1);\n",
+ "T = round(T*10)/10;\n",
+ "\n",
+ "# Results\n",
+ "print \"recurrence interval of 10 minutes storm = %.2f years.\"%(T);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "recurrence interval of 10 minutes storm = 84.00 years.\n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.66 pg : 236"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "T1 = 50.;\n",
+ "T2 = 100.; \t\t\t\t#Return period\n",
+ "F1 = 30800.;\n",
+ "F2 = 36300.; \t\t\t\t#Peak flood\n",
+ "\n",
+ "# Calculations\n",
+ "y100 = -(2.303*math.log10(2.303*math.log10(T2/(T2-1))));\n",
+ "y50 = -(2.303*math.log10(2.303*math.log10(T1/(T1-1))));\n",
+ "y = (F2-F1)/(y100-y50);\n",
+ "T = 200.;\n",
+ "y200 = -(2.303*math.log10(2.303*math.log10(T/(T-1))));\n",
+ "x200 = F2+(y200-y100)*y;\n",
+ "x200 = round(x200);\n",
+ "\n",
+ "# Results\n",
+ "print \"flood magnitude with return period of 240 years = %.2f cumecs.\"%(x200);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "flood magnitude with return period of 240 years = 41780.00 cumecs.\n"
+ ]
+ }
+ ],
+ "prompt_number": 46
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.67 pg : 236"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "xavg = 4200.; \t\t\t\t#mean\n",
+ "sigma = 1705.; \t\t\t\t#smath.radians(numpy.arcmath.tan(ard deviation\n",
+ "xt = 9550.; \t\t\t\t#flood value\n",
+ "\n",
+ "# Calculations\n",
+ "K = (xt-xavg)/sigma;\n",
+ "yt = 1.2825*K+0.577;\n",
+ "l = math.e**(math.e**(-yt));\n",
+ "T = l/(l-1);\n",
+ "\n",
+ "# Results\n",
+ "print \"Return period of flood of 9950 cumec/s = %.2f years.\"%(T);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Return period of flood of 9950 cumec/s = 100.11 years.\n"
+ ]
+ }
+ ],
+ "prompt_number": 49
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.68 pg : 237"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "T1 = 100.;\n",
+ "T2 = 50.; \t\t\t\t#Return period\n",
+ "F1 = 485.;\n",
+ "F2 = 445.; \t\t\t\t#Peak flood\n",
+ "\n",
+ "# Calculations\n",
+ "y50 = -(2.303*math.log10(2.303*math.log10(T2/(T2-1))));\n",
+ "y100 = -(2.303*math.log10(2.303*math.log10(T1/(T1-1))));\n",
+ "y = (F2-F1)/(y50-y100);\n",
+ "T = 1000.;\n",
+ "y1000 = -(2.303*math.log10(2.303*math.log10(T/(T-1))));\n",
+ "x1000 = F2+(y1000-y50)*y;\n",
+ "x1000 = round(x1000*10)/10;\n",
+ "\n",
+ "# Results\n",
+ "print \"flood magnitude with return period of 240 years = %.2f cumecs.\"%(x1000);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "flood magnitude with return period of 240 years = 617.20 cumecs.\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.69 pg : 238"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#probability of exceedence\n",
+ "#probability of occurence in next 12 years\n",
+ "\n",
+ "#Given\n",
+ "T = 25.; \t\t\t\t#return period\n",
+ "n = 12.;\n",
+ "\n",
+ "# Calculations\n",
+ "P = 1/T;\n",
+ "Rsk = 1-(1-P)**n;\n",
+ "P = round(P*100)/100;\n",
+ "Rsk = round(Rsk*10000)/10000;\n",
+ "\n",
+ "# Results\n",
+ "print \"probability of exceedence = %.2f.\"%(P);\n",
+ "print \"probability of occurence in next 12 years = %.2f.\"%(Rsk);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "probability of exceedence = 0.04.\n",
+ "probability of occurence in next 12 years = 0.39.\n"
+ ]
+ }
+ ],
+ "prompt_number": 51
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch5_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch5_2.ipynb
new file mode 100644
index 00000000..5a51e2fc
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch5_2.ipynb
@@ -0,0 +1,1215 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:bcdc954bb2d82ee9797b3a585d54241820072bea3f7c78ca9c6a68f4f6eefc10"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5 : GROUND WATER WELL IRRIGATION"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.1 pg : 277"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t#design an open wellin fine sand\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 0.003; \t\t\t\t#required discharge\n",
+ "H = 2.5; \t\t\t\t#depression head\n",
+ "A = Q*3600/(0.5*H);\n",
+ "d = (4*A/math.pi)**0.5;\n",
+ "d = round(d*100)/100\n",
+ "print \"Well diameter = %.2f m.\"%(d);\n",
+ "\n",
+ "\t\t\t\t#Alternative solution\n",
+ "C = 7.5e-5; \t\t\t\t#permeability consmath.tant from table 5.2\n",
+ "A = Q/(C*H);\n",
+ "d = (16*3/math.pi)**0.5;\n",
+ "d = round(d*10)/10;\n",
+ "print \"By alternative solution:\"\n",
+ "print \"Well diameter = %.2f m\"%(d);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Well diameter = 3.32 m.\n",
+ "By alternative solution:\n",
+ "Well diameter = 3.90 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.2 pg : 278"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#yield from well\n",
+ "#diameter of well\n",
+ "\n",
+ "#Given\n",
+ "h1 = 2.5; \t\t\t\t#initial pumping depression\n",
+ "h = 1.8; \t\t\t\t#heigth after recuperation\n",
+ "t = 80; \t\t\t\t#time\n",
+ "h2 = h1-h;\n",
+ "KbyA = 2.303*60*math.log10(h1/h2)/t;\n",
+ "\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#Part (a)\n",
+ "d = 4; \t\t\t\t#diameter of well\n",
+ "H = 3; \t\t\t\t#depression head\n",
+ "A = math.pi*d**2/4;\n",
+ "Q = (KbyA)*A*H/3.6;\n",
+ "print \"Part a\";\n",
+ "Q = round(Q);\n",
+ "print \"Yield from well = %.2f lit/sec.\"%(Q);\n",
+ "\n",
+ "#Part (b)\n",
+ "Q = 8; \t\t\t\t#yield(lit/sec)\n",
+ "H = 2;\n",
+ "A = Q*3.6/(H*(KbyA));\n",
+ "d = (4*A/math.pi)**0.5;\n",
+ "d = round(d*10)/10;\n",
+ "print \"Part b\";\n",
+ "print \"Daimeter of well = %.2f m\"%(d);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part a\n",
+ "Yield from well = 10.00 lit/sec.\n",
+ "Part b\n",
+ "Daimeter of well = 4.40 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3 pg : 279"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "#Given\n",
+ "d = 30; \t\t\t\t#well diameter\n",
+ "L = 15; \t\t\t\t#strainer length\n",
+ "P = 50; \t\t\t\t#coefficient of permeability\n",
+ "s = 0.2; \t\t\t\t#effective size of sand\n",
+ "b = 3; \t\t\t\t#drawdown\n",
+ "r = 150; \t\t\t\t#radius of drawdown\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "Q = 2.72*L*P*b/(math.log10(r*2*100/d)*24*3.6);\n",
+ "Q = round(Q*10)/10;\n",
+ "\n",
+ "# Results\n",
+ "print \" yield from well = %.2f lit/sec.\"%(Q);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " yield from well = 23.60 lit/sec.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.4 pg : 280"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "d = 30; \t\t\t\t#diameter of well\n",
+ "s = 2; \t\t\t\t#drawdown\n",
+ "L = 10; \t\t\t\t#length of stainer\n",
+ "k = 0.05; \t\t\t\t#coefficient of permeability\n",
+ "r = 300; \t\t\t\t#radius of zero drawdown\n",
+ "\n",
+ "# Calculations\n",
+ "Q = 2.72*k*s*(L+s/2)/(100*math.log10(2*100*r/d));\n",
+ "\n",
+ "# Results\n",
+ "print \" discharge from tubewell = %.4f cumec.\"%(Q);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " discharge from tubewell = 0.0091 cumec.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5 pg: 280"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t#design tube well\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 0.08; \t\t\t\t#yield required\n",
+ "b = 30; \t\t\t\t#thickness of acquifer\n",
+ "R = 300; \t\t\t\t#Radius of circle of influence\n",
+ "k = 60; \t\t\t\t#permeability coefficient\n",
+ "s = 5; \t\t\t\t#Drawdown\n",
+ "\n",
+ "# Calculations\n",
+ "r = R/(10**(2.72*b*s*k/(3600*24*Q)));\n",
+ "r = round(r*10000)/10000;\n",
+ "\n",
+ "# Results\n",
+ "print \"Radius of well = %.2f m\"%(r);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Radius of well = 0.09 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.6 pg : 281"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "b = 30.; \t\t\t\t#thickness of acquifer\n",
+ "s = 4.; \t\t\t\t#drawdown\n",
+ "r = 0.1; \t\t\t\t#well radius\n",
+ "k = 36.; \t\t\t\t#permeability coefficient\n",
+ "R = 3000*s*(k/(24*3600))**0.5;\n",
+ "\n",
+ "Q = 2.72*b*k*s/(math.log10(R/r)*24*3.6);\n",
+ "Q = round(Q*10)/10;\n",
+ "print \"yield from well = %.2f lit/sec.\"%(Q);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "yield from well = 40.10 lit/sec.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.7 pg : 281"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#Given\n",
+ "k = 0.005; \t\t\t\t#coefficient of permeability\n",
+ "r = 0.1; \t\t\t\t#well radius\n",
+ "s = 4; \t\t\t\t#drawdown\n",
+ "b = 10; \t\t\t\t#thickness\n",
+ "R = 300; \t\t\t\t#radius of circle of influence\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#Part(a)\n",
+ "Q1 = 2.72*b*k*s/math.log10(R/r);\n",
+ "Q1 = round(Q1*10000)/10000;\n",
+ "print \"Discharge = %.2f cumec\"%(Q1);\n",
+ "\n",
+ "#Part (b)\n",
+ "r = 0.2;\n",
+ "Q2 = 2.72*b*k*s/math.log10(R/r);\n",
+ "I = (Q2-Q1)*100/Q1;\n",
+ "I = round(I*10)/10;\n",
+ "print \"percent increase in discharge = %.2f percent.\"%(I);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Discharge = 0.16 cumec\n",
+ "percent increase in discharge = 9.40 percent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.8 pg : 282"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "#percentage error\n",
+ "#actual radius of influence\n",
+ "\n",
+ "#Given\n",
+ "d = 0.2; \t\t\t\t#diameter of well\n",
+ "Q = 240; \t\t\t\t#discharge\n",
+ "RL1 = 240.5; \t\t\t\t#reduce level of original water surface\n",
+ "RL2 = 235.6; \t\t\t\t#reduced level of water at pumping\n",
+ "RL3 = 210; \t\t\t\t#reduced level of impervious layer\n",
+ "RL4 = 239.8; \t\t\t\t#reduced level of water in well\n",
+ "D = 50; \t\t\t\t#radial dismath.tance of well from tube well\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#Part(a)\n",
+ "h1 = RL2-RL3;\n",
+ "h2 = RL4-RL3;\n",
+ "k1 = Q*24*math.log10(D*2/d)/(1.36*(h2**2-h1**2));\n",
+ "k1 = round(k1*100)/100;\n",
+ "print \"Parta\";\n",
+ "print \"coefficient of permeability = %.2f m/day.\"%(k1);\n",
+ "#Part (b)\n",
+ "R = 300; \t\t\t\t#radius of influence\n",
+ "H = RL1-RL3;\n",
+ "h = RL2-RL3;\n",
+ "k2 = Q*24*math.log10(R*2/d)/(1.36*(H**2-h**2));\n",
+ "PE = (k2-k1)*100/k1;\n",
+ "print \"Partb\";\n",
+ "print \"percentage error = %i percent.\"%(PE);\n",
+ "#Part (b)\n",
+ "R = (d/2)*10**(1.36*k1*(H**2-h**2)/(24*Q));\n",
+ "print \"Partc\";\n",
+ "print \"Actual radius of influence = %i m.\"%(R);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Parta\n",
+ "coefficient of permeability = 49.13 m/day.\n",
+ "Partb\n",
+ "percentage error = 9 percent.\n",
+ "Partc\n",
+ "Actual radius of influence = 154 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.9 pg : 283"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "A = 20.; \t\t\t\t#area of field\n",
+ "H = 129.; \t\t\t\t#level to the highest land\n",
+ "h1 = 120.2; \t\t\t\t#water level in well during discharge\n",
+ "Du = 800; \t\t\t\t#duty for rise;\n",
+ "eita = 0.6; \t\t\t\t#efficiency of the pump\n",
+ "\n",
+ "# Calculations\n",
+ "Q = A/Du;\n",
+ "w = Q*1000;\n",
+ "lift = H-h1;\n",
+ "\t\t\t\t#design lift is taken as 9m\n",
+ "wd = w*9;\n",
+ "o = wd/75;\n",
+ "i = o/eita;\n",
+ "\n",
+ "# Results\n",
+ "print \"Input h.p of pump = %i h.p\"%i;\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Input h.p of pump = 5 h.p\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.10 pg : 284"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 150; \t\t\t\t#discharge from tubewell\n",
+ "t = 4000; \t\t\t\t#working period of tubewell\n",
+ "I = 0.45; \t\t\t\t#intensity of irrigation\n",
+ "d = 0.38; \t\t\t\t#average depth of rabi and kharif crop\n",
+ "\n",
+ "# Calculations\n",
+ "V = Q*t;\n",
+ "A = V/d;\n",
+ "CA = A/(I*10000);\n",
+ "CA = round(CA);\n",
+ "\n",
+ "# Results\n",
+ "print \"culturable area = %.2f hectares.\"%(CA);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "culturable area = 351.00 hectares.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.11 pg : 284"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#percent decrease when two well discharges\n",
+ "\n",
+ "#Given\n",
+ "d = 0.2; \t\t\t\t#diameter of well\n",
+ "r = d/2;\n",
+ "B = 100; \t\t\t\t#dismath.tance between wells\n",
+ "b = 12; \t\t\t\t#thickness of acquifer\n",
+ "k = 60; \t\t\t\t#coefficient of permeability\n",
+ "s = 3; \t\t\t\t#print ersion head\n",
+ "R = 250; \t\t\t\t#radius of influence\n",
+ "Q = 2.72*b*k*s/(24*math.log10(R/r));\n",
+ "print \"discharge if one well discharges = %i cubic metre/hour.\"%(Q);\n",
+ "#when both well are discharging\n",
+ "Q1 = 2.72*k*b*s/(24*math.log10(R**2/(r*B)));\n",
+ "Q1 = round(Q1*10)/10;\n",
+ "print \"discharge if both wells discharges = %.2f cubic metre/hour.\"%(Q1);\n",
+ "PE = (Q-Q1)*100/Q;\n",
+ "PE = round(PE*100)/100;\n",
+ "print \"percentage decrease in discharge = %.2f percent.\"%(PE);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "discharge if one well discharges = 72 cubic metre/hour.\n",
+ "discharge if both wells discharges = 64.50 cubic metre/hour.\n",
+ "percentage decrease in discharge = 10.47 percent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.12 pg : 285"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#coefficient of permeability\n",
+ "#drawdown in well\n",
+ "#specific capacity\n",
+ "#maximum rate at which water can be pumped\n",
+ "\n",
+ "#Given\n",
+ "d = 0.6; \t\t\t\t#diameter of well;\n",
+ "rw = d/2;\n",
+ "H = 40.; \t\t\t\t#depth of water in well before pumping\n",
+ "Q = 2000.; \t\t\t\t#discharge from well\n",
+ "s1 = 4.; \t\t\t\t#drawdown in well\n",
+ "B1 = 10.; \t\t\t\t#dismath.tance between well\n",
+ "s2 = 2.;\n",
+ "B2 = 20.;\n",
+ "#Part (a)\n",
+ "h1 = H-s1;\n",
+ "h2 = H-s2;\n",
+ "t = (H**2-h2**2)/(H**2-h1**2);\n",
+ "R = (B2/(B1**t))**(1/(1-t));\n",
+ "R = round(R*100)/100;\n",
+ "print \" radius of zero drawdown = %.2f m\"%(R);\n",
+ "#Part (b)\n",
+ "r = 10;\n",
+ "k = Q*math.log10(R/r)*60*24/(1.36*(H**2-h1**2)*1000);\n",
+ "k = round(k*100)/100;\n",
+ "print \"coefficient of permeability = %.2f m/day.\"%(k);\n",
+ "\n",
+ "#part (c)\n",
+ "Ho = (H**2-(Q*math.log10(R/rw)*24*60/(1000*1.36*k)))**0.5;\n",
+ "D = H-Ho;\n",
+ "D = round(D*100)/100;\n",
+ "print \"drawdown in well = %.2f m.\"%(D);\n",
+ "\n",
+ "#part (d)\n",
+ "C = Q/(1000*R);\n",
+ "#for R = 1 m;Q = Sc\n",
+ "#hence on putting the values in discharge equation we get\n",
+ "#Sc*math.log10(61.2*Sc) = 0.3223.\n",
+ "#on solving this by trial and error method we get Sc = 0.266 m**2/min.\n",
+ "print \"Specific capacity = 0.266 cubic metre/minutes/metre.\";\n",
+ "\n",
+ "#part (e)\n",
+ "#this is obtained when Q = H\n",
+ "#hence from equation of discharge,we get\n",
+ "#Q*math.log10(69.2*Q) = 6.528.\n",
+ "#solving it by trial and error method we get Q = 2.85 m**3/min.\n",
+ "print \"maximum rate at which water can be pumped = 2.85 cubic metre/min\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " radius of zero drawdown = 41.53 m\n",
+ "coefficient of permeability = 4.31 m/day.\n",
+ "drawdown in well = 16.59 m.\n",
+ "Specific capacity = 0.266 cubic metre/minutes/metre.\n",
+ "maximum rate at which water can be pumped = 2.85 cubic metre/min\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.13 pg : 298"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%matplotlib inline\n",
+ "import math \n",
+ "from numpy import zeros,linspace\n",
+ "from matplotlib.pylab import plot\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 2500.; \t\t\t\t#discharge(l/min)\n",
+ "r = 60.; \t\t\t\t#dismath.tance of observation well from acquifer\n",
+ "tmin = [1, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10, 12, 14, 18, 24, 30, 40, 50, 60, 80, 100, 120, 150, 180, 210, 240]; \t\t\t\t#time in minutes\n",
+ "s = [0.2, 0.26, 0.3, 0.33, 0.36, 0.41, 0.45, 0.48, 0.53, 0.56, 0.59, 0.62, 0.66, 0.71, 0.75, 0.80, 0.83, 0.86, 0.91, 0.95, 0.98, 1.03, 1.05, 1.08, 1.10]; \t\t\t\t#drawdown\n",
+ "u = linspace(1,9,9)\n",
+ "Wu = [0.2194, 0.04891, 0.01315, 0.003779, 0.001148, 0.000360, 0.000116, 0.0000377, 0.0000125];\n",
+ "tday = zeros(25)\n",
+ "for i in range(25):\n",
+ " tday[i] = tmin[i]/(60.*24);\n",
+ "\n",
+ "\n",
+ "rt = zeros(25)\n",
+ "for i in range(25):\n",
+ " rt[i] = r**2/tday[i];\n",
+ "\n",
+ "#graph is plotted between s and r**2/t and W(u) and u and they are superimposed.\n",
+ "#from which we get\n",
+ "plot(s,rt)\n",
+ "plot(Wu,u)\n",
+ "s1 = 0.52;\n",
+ "Wu1 = 2.96;\n",
+ "rt1 = 700000; \n",
+ "u1 = 0.03;\n",
+ "Q = 3600; \t\t\t\t#discharge in cumec/day\n",
+ "T = Q*Wu1/(4*math.pi*s1);\n",
+ "S = 4*u1*T/rt1;\n",
+ "T = round(T);\n",
+ "print \"formation consmath.tant of acquifer:\";\n",
+ "print \"T = %.2f cubic metre/day/m.S = %.2f.\"%(T,S);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "formation consmath.tant of acquifer:\n",
+ "T = 1631.00 cubic metre/day/m.S = 0.00.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAZMAAAEACAYAAAB27puMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAH8dJREFUeJzt3XuUFOWd//H33LiIMjDg4ToICohEjMiKiCG2IjC4ibir\nAolRArNZE9xIspconj06JP7cZV1/qJsFs0YjsgmXxcR7FAQmklVARQRFwgyCwiDjyNUbymRm//g+\nbRdjD1Mzfamu7s/rnDr99NNV1d86aH3nuVWDiIiIiIiIiIiIiIiIiIiIiIiIiIiI5JAuwHLgLWAr\ncAFQAqwEtgMr3D5Rs4EqYBsw3lM/AtjiPrvXU98eWOrq1wGneT6b5r5jO3C9p34AsN4dswQoSuD6\nREQkDRYCM1y5ECgG/g34iau7GfhXVx4KbMJu7v2BaiDPfbYBGOnKzwBlrjwTmO/KU7DkAJawdmCJ\nqosrF7vPlgGTXXkB8P22X56IiKRaMfB2nPptQA9X7uneg7VKbvbs9ywwCuiFtWyipgL3e/a5wJUL\ngTpX/haWKKLud8fluX3yXf0odw4REQlAfsu7MAC7cf8K2Ag8AHTCEkmt26eWWGLpDezxHL8H6BOn\nvsbV4153u3I9cBjodoJzlQCHgIY45xIRkTTzk0wKgfOwbqjzgI+BW5rs0+i2dEjX94iIiE9+kske\nt73s3i/Hkso+rHsLrAvrfVeuAUo9x/d1x9e4ctP66DH9XDk6JrM/zrlKXd0BbAwlGn9fV3+cM844\nI5rktGnTpk2bv62aNvCTTPZhXVCD3fvLgDeBJ7GZVrjXx1z5CWxcox3WRTYIG3jfBxzBxkbygOuA\nxz3HRM91NbDKlVdgs8G6AF2BccBz2AWvAa6J8/1f2LFjB42NjVm53X777YHHoOvT9en6sm8DzvCR\nF76k0Od+PwR+jSWIHcB0oACbUVUO7CI2s2qrq9+KjX/MxG7+uPLDQEdsNld00PxBYBE2zXc/lozA\nWi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Ah+mLqy0Cuu9pTV83VvCnkxqgFLP\n+1Ji3QXN7dPX1YWBn+sDGxh7AOvXPFGzNdP4ub4RWPcJWJ/7RKxL5YmUR5c4P9e3G+va+tRtL2A3\n2zAkEz/XNxr4f668A9gJnIm1wsIuzPcWv8J6b2k1PwsXvYNkowjXIJmf6+uH9VuPSmtkydHahae/\nIlyzufxc3xDgeWww+yRsMHRo+kJMiJ/r+//A7a7cA0s2JWmKLxn6428APmz3lqj+NH99Yb63tEm8\nhYs3uC3q5+7z17EuhTBp6fp+iQ1qvua2DekOMEF+/v2iwpZMwN/1/SM2o2sLcFNao0tcS9fXHXgS\n+39vCzbhICwWY2M9n2MtyBlk172lpesL+71FREREREREREREREREREREREREREREREREREREwuj/\nANm4HC3M5K62AAAAAElFTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x10a5625d0>"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.14 pg : 299"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%matplotlib inline\n",
+ "import math\n",
+ "from numpy import zeros\n",
+ "from matplotlib.pylab import plot\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 2500; \t\t\t\t#discharge(l/min)\n",
+ "r = 60; \t\t\t\t#dismath.tance of observation well from acquifer\n",
+ "tmin = [1, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10, 12, 14, 18, 24, 30, 40, 50, 60, 80, 100, 120, 150, 180, 210, 240]; \t\t\t\t#time in minutes\n",
+ "s = [0.2, 0.26, 0.3, 0.33, 0.36, 0.41, 0.45, 0.48, 0.53, 0.56, 0.59, 0.62, 0.66, 0.71, 0.75, 0.80, 0.83, 0.86, 0.91, 0.95, 0.98, 1.03, 1.05, 1.08, 1.10]; \t\t\t\t#drawdown\n",
+ "tday = zeros(25)\n",
+ "for i in range(25):\n",
+ " tday[i] = tmin[i]/(60*24);\n",
+ "\n",
+ "#from the graph between s and t we get\n",
+ "plot(s,tday)\n",
+ "ds = 0.38;\n",
+ "Q = 3600; \t\t\t\t#discharge in cumec/day\n",
+ "T = 2.303*Q/(4*math.pi*ds);\n",
+ "\t\t\t\t#extending the straight line we get\n",
+ "to = 0.00024;\n",
+ "S = 2.25*T*to/r**2;\n",
+ "print \"formation constant of acquifer:\";\n",
+ "print \"T = %i cubic metre/day/m.S = %.2f.\"%(T,S);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "formation constant of acquifer:\n",
+ "T = 1736 cubic metre/day/m.S = 0.00.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEACAYAAACtVTGuAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAH39JREFUeJzt3X+QFOd95/H3aH8ghCUjhAXsstLa/JBBiVzIPsz5cvI4\ncXyISoF8KpmQRFIUVUHiIr4/conk/KPdquROp1TJKYoyRcXy1cZ3J6Lyxc7eCRnpUKakuCQcVDJC\nEssCgvKCYNEvJO0KwS7M/fF9Rjs0M9PPzHTPTvd8XlVTdPc8T29PV9GfeZ6nex4QERERERERERER\nERERERERERERERFpKauBIeAQ8ECZMlvc+/uAFR517wJeAy4AtxZtvxJ4HHgFeB14sP7DFxGROLUB\nh4FeoAP4JbAsUGYNsNMtfxl40aPu54GlwD9zaVD8IRYUADOBo8ANEXwOERGp0RUh76/ELvbHgAlg\nB7AuUGYtMOCW9wCzgfkhdYeA4RJ/7yQwCwuZWcB54APPzyIiIjEIC4puYKRo/bjb5lOmy6Nu0C4s\nGE5iAfM3wJmQOiIiEqP2kPfznvvJ1Hsgzh9gXU4LgDnA88BurAtKRESmQVhQnAB6itZ7sJZBpTIL\nXZkOj7pBXwF+gg1yvw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CL+JJYn+PXbxL3dxLB5L\n/TLpvVZA+Lmo+rrZzL/15POw3wvA+255D1MXhrTxORcAfwr8GHirYUfWeD7n4veA/83UHXpvN+rg\nGsznXJwErnHL12BBMdmg42uk54H3Krxf6sHgaXxsN1Zh56Lq62YzB4XPw37F7mfqG0Pa+D74uI6p\nn1BpuudPIuJzLpZgN0z8M7AXuLsxh9ZwPufi74CbgTex7ob/1JhDazqlzlVav1hWw+u62cxN0Gou\ndF8D/gj4dzEdy3TzORd/i91qnMduKU7rbcU+56IDu/vut4CrsG9QL2L902nicy7+EuuSygKLsN9Y\n+wLwYXyH1bSC/yfS+mXKl/d1s5mDwudhP7CBmL/D+toqNbeSzOdcfBHregDri74d644YjP3oGsvn\nXIxg3U1n3es57OKYtqDwORdfAf7aLR8BjgI3YS2tVuL7MG+rSM110+dhvxuwPtpVDT2yxvM5F8X+\nO+m968nnXHwee06nDWtR7Mce5kwbn3PxKPCQW56HBcmcBh1fo/XiN5hd/GBwWvVS/lyk7roZ9rDf\nD7DBuZfd6xeNPsAG8nnwsSDNQQF+5+I/Y3c+7Qe+09Cja6ywczEX+D/Y+MR+bKA/jR7HxmHOYy3K\nP8L/weC0CTsXrXTdFBERERERERERERERERERERERERERERERERERic7/B1G0iHxZaA7OAAAAAElF\nTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x10a5679d0>"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.15 pg : 299"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%matplotlib inline\n",
+ "import math\n",
+ "from numpy import zeros\n",
+ "from matplotlib.pylab import plot\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 2500; \t\t\t\t#discharge(l/min)\n",
+ "r = 60; \t\t\t\t#dismath.tance of observation well from acquifer\n",
+ "tmin = [1, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10, 12, 14, 18, 24, 30, 40, 50, 60, 80, 100, 120, 150, 180, 210, 240]; \t\t\t\t#time in minutes\n",
+ "s = [0.2, 0.26, 0.3, 0.33, 0.36, 0.41, 0.45, 0.48, 0.53, 0.56, 0.59, 0.62, 0.66, 0.71, 0.75, 0.80, 0.83, 0.86, 0.91, 0.95, 0.98, 1.03, 1.05, 1.08, 1.10]; \t\t\t\t#drawdown\n",
+ "tday = zeros(25)\n",
+ "for i in range(25):\n",
+ " tday[i] = tmin[i]/(60.*24);\n",
+ "\n",
+ "#graph is plotted between s and t\n",
+ "#point P is choosen on it whose ordinate is:\n",
+ "plot(s,tday)\n",
+ "s1 = 0.45;\n",
+ "t = 0.00347;\n",
+ "ds = 0.38; \t\t\t\t#for one math.log cycle of time\n",
+ "Fu = s1/ds;\n",
+ "#from fig 5.43\n",
+ "#or umath.sing relation\n",
+ "Wu = 2.303*Fu; \n",
+ "u = 0.035; \t\t\t\t#from table 5.2\n",
+ "Q = 3600; \t\t\t\t#discharge in cumec/day\n",
+ "T = Q*Wu/(4*math.pi*s1);\n",
+ "S = 4*u*t*T/r**2;\n",
+ "print \"formation consmath.tant of acquifer:\";\n",
+ "print \"T = %i cubic metre/day/m.S = %.2f.\"%(T,S);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "formation consmath.tant of acquifer:\n",
+ "T = 1736 cubic metre/day/m.S = 0.00.\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAEACAYAAABfxaZOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHX5JREFUeJzt3Xt0VfWZ//E3DYQCcmmFwnDRMAIC1gtVMVJbjkBnRVDo\nWKtV1BYVWV1CsYNdlM6MRKelS7sc0aLCSLS4qs2vo+0QFUEhHHUEu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R2Byu8mamvho2J2ldDdwB\nfDtNsXjNzbWYDfzSObYV/ngaajq4uRZtsBFhI4H2WMvmXayeGyRursWvsLJPCDgPeAO4GDiSvrB8\nK/bfRFAbRm65zpuZSvpVQJ+o9T7Uf12PdhHWmimi6a802czNtbgU+3oPVru9BvvKX5b26DLLzbXY\nhZV0TjjLW1iiC1rSd3MthgG/cd5XAjuA87FvQLkk9lr1drblKl/mTTc3ap2D1TQLMxpZ5jX3prVn\nCe7oHTfXYiCwFOvobI91aA3OXIgZ4+Za/Ccw03nfHfuj8PUMxZdpBbjryI2+ITSoCmj8Wvg6bya6\nyWs+1jH1nrOsznSAGeTmhrc6QU764O5a3IeN4PkA+FlGo8usRNeiK/AyVs//AOvkDqI/Yf0Wp7Bv\nenfg/obQoEl0LXIpb4qIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIeOf/A0ZprnC5+57cAAAAAElF\nTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x10a548a90>"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.15 pg : 300"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t#draw daown in main well\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "H = 25; \t\t\t\t#static water level\n",
+ "rw = 0.15; \t\t\t\t#radius of well\n",
+ "Q = 5400; \t\t\t\t#discharge(litre/min)\n",
+ "t = 24; \t\t\t\t#time of discharge\n",
+ "r1 = 30; \t\t\t\t#dismath.tance of first well\n",
+ "s1 = 1.11; \t\t\t\t#drawdown\n",
+ "h1 = H-s1;\n",
+ "r2 = 90; \t\t\t\t#dismath.tance of second well\n",
+ "s2 = 0.53; \t\t\t\t#drawdown\n",
+ "h2 = H-s2;\n",
+ "k = (Q*2.303*math.log10(r2/r1))/(math.pi*(h2**2-h1**2)*60000);\n",
+ "T = k*H;\n",
+ "T = round(T*10000)/10000;\n",
+ "print \"transmissibility of acquifer = %.2f cumec/sec.\"%(T);\n",
+ "hw = (h2**2-(Q*2.303*math.log10(r2/rw))/(math.pi*k*60000))**0.5;\n",
+ "sw = H-hw;\n",
+ "sw = round(sw*100)/100;\n",
+ "print \"draw daown in main well = %.2f m.\"%(sw);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "transmissibility of acquifer = 0.03 cumec/sec.\n",
+ "draw daown in main well = 4.13 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.16 pg : 300"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 250; \t\t\t\t#discharge(lit/min)\n",
+ "H = 100; \t\t\t\t#water level in acquifer\n",
+ "s1 = 12; \t\t\t\t#drawdown\n",
+ "h1 = H-s1;\n",
+ "\t\t\t\t#let t = ln(R/r)/(pi*k)\n",
+ "t = (H**2-h1**2)/Q;\n",
+ "h2 = H-18;\n",
+ "Q1 = (H**2-h2**2)/t;\n",
+ "print \"discharge at 18m drawdown = %d lpm\"%(Q1);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "discharge at 18m drawdown = 364 lpm\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.17 pg : 301"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "b = 10; \t\t\t\t#thickness of acquifer\n",
+ "k = 48; \t\t\t\t#permeability coefficient\n",
+ "R = 500.; \t\t\t\t#radius of influence\n",
+ "s = 12; \t\t\t\t#drawdown\n",
+ "Q = 5000; \t\t\t\t#discharge(cumec/day)\n",
+ "r = R/math.e**(2*math.pi*b*k*s/Q);\n",
+ "D = 2*r;\n",
+ "D = round(D*100)/100;\n",
+ "print \"effective well diameter = %.2f m.\"%(D);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "effective well diameter = 0.72 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.18 pg : 301"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Q = 1500; \t\t\t\t#discharge(lit/min)\n",
+ "S = 0.004; \t\t\t\t#storage coefficient\n",
+ "k = 35; \t\t\t\t#permeability\n",
+ "t = 20; \t\t\t\t#time of pumping\n",
+ "b = 30; \t\t\t\t#thickness of acquifer\n",
+ "r = 40; \t\t\t\t#dismath.tance of observation well\n",
+ "T = k*b;\n",
+ "s = Q*(2.303*math.log10(4*T*t*3600/(60*60*24*r**2*S))-0.5772)*60*60*24/(4*math.pi*T*60000); \t\t\t\t#Jacob's equation\n",
+ "s = round(s*100)/100;\n",
+ "print \"drawdown at 40m = %.2f m.\"%(s);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "drawdown at 40m = 0.94 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.19 pg : 301"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#Given\n",
+ "h1 = 2.5; \t\t\t\t#initial pumping depression\n",
+ "h = 1.8; \t\t\t\t#heigth after recuperation\n",
+ "t = 80; \t\t\t\t#time\n",
+ "h2 = h1-h;\n",
+ "KbyA = 2.303*60*math.log10(h1/h2)/t;\n",
+ "d = 4; \t\t\t\t#diameter of well\n",
+ "H = 3; \t\t\t\t#depression head\n",
+ "A = math.pi*d**2/4;\n",
+ "Q = (KbyA)*A*H/3.6;\n",
+ "Q = round(Q);\n",
+ "print \"Yield from well = %.2f lit/sec.\"%(Q);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Yield from well = 10.00 lit/sec.\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.20 pg : 301"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#Given\n",
+ "rw = 0.15; \t\t\t\t#radius of well\n",
+ "b = 40; \t\t\t\t#depth of acquifer\n",
+ "Q = 1500; \t\t\t\t#discharge(lpm)\n",
+ "s1 = 3.5; \t\t\t\t#drawdown of first well\n",
+ "s2 = 2; \t\t\t\t#drawdown of second well\n",
+ "H = 40; \n",
+ "r1 = 25; \t\t\t\t#dismath.tance of first well\n",
+ "r2 = 75; \t\t\t\t#dismath.tance of second well\n",
+ "h1 = H-s1;\n",
+ "h2 = H-s2;\n",
+ "k = Q*2.303*math.log10(r2/r1)/(math.pi*1000*60*(h2**2-h1**2));\n",
+ "T = b*k*1000;\n",
+ "print \"transmissibility = %.2fD-3 square metre/sec\"%(T);\n",
+ "\n",
+ "hw = (h2**2-(Q*2.303*math.log10(r2/rw)/(math.pi*k*60000)))**0.5;\n",
+ "sw = H-hw;\n",
+ "sw = round(sw*100)/100;\n",
+ "print \"drawdown at pumping well = %.2f m.\"%(sw);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "transmissibility = 3.13D-3 square metre/sec\n",
+ "drawdown at pumping well = 11.51 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.21 pg : 302"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "r = 0.25; \t\t\t\t#radius of test well\n",
+ "r1 = 10; \t\t\t\t#dismath.tance of first well\n",
+ "r2 = 60; \t\t\t\t#dismath.tance of second well\n",
+ "Q = 0.1; \t\t\t\t#discharge(cumec/sec)\n",
+ "s1 = 4; \t\t\t\t#drawdown of first well\n",
+ "s2 = 3; \t\t\t\t#drawdown of second well\n",
+ "b = 20; \t\t\t\t#thickness of well\n",
+ "k = 1000*Q*math.log10(r2/r1)/(2.72*b*(s1-s2));\n",
+ "print \"coefficient of permeability = %.2fD-3 m/sec\"%(k);\n",
+ "s = s2+Q*math.log10(r2/r)/(2.72*b*k);\n",
+ "s = round(s*100)/100;\n",
+ "print \"drawdown in test well = %.2f m.\"%(s); \n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "coefficient of permeability = 1.43D-3 m/sec\n",
+ "drawdown in test well = 3.00 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.22 pg : 303"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "h1 = 2.1; \t\t\t\t#initial pumping depression\n",
+ "h = 1.6; \t\t\t\t#heigth after recuperation\n",
+ "t = 90; \t\t\t\t#time\n",
+ "h2 = h1-h;\n",
+ "KbyA = 2.303*60*math.log10(h1/h2)/t;\n",
+ "Q = 10; \t\t\t\t#yield(lit/sec)\n",
+ "H = 2;\n",
+ "A = Q*3.6/(H*(KbyA));\n",
+ "d = (4*A/math.pi)**0.5;\n",
+ "d = round(d*10)/10;\n",
+ "print \"Daimeter of well = %.2f m\"%(d);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Daimeter of well = 4.90 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.23 pg : 303"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "h1 = 2.5; \t\t\t\t#initial pumping depression\n",
+ "h = 1; \t\t\t\t#heigth after recuperation\n",
+ "t = 60; \t\t\t\t#time\n",
+ "h2 = h1-h;\n",
+ "\n",
+ "# Calculations\n",
+ "KbyA = 2.303*60*math.log10(h1/h2)/t;\n",
+ "d = 2.; \t\t\t\t#diameter of well\n",
+ "H = 3.; \t\t\t\t#depression head\n",
+ "A = math.pi*d**2/4;\n",
+ "Q = (KbyA)*A*H;\n",
+ "Q = round(Q*1000)/1000;\n",
+ "\n",
+ "# Results\n",
+ "print \"Yield from well = %.2f cubic metre/hour.\"%(Q);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Yield from well = 4.82 cubic metre/hour.\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch6_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch6_2.ipynb
new file mode 100644
index 00000000..23b46e1d
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch6_2.ipynb
@@ -0,0 +1,654 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:cdf8fdbaa560cd66d2c449918f65db6ec9d56e694a7e8698e703276e2f6f0ae8"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 6 : RESERVIOR PLANNING"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.1 pg : 328"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import zeros,linspace\n",
+ "#determine maximum reservior level\n",
+ "#maximum discharge over spillway\n",
+ "#plot inflow and routed hydrograph and find peak flow and peak lag\n",
+ "\n",
+ "#Given\n",
+ "e = [100, 100.3, 100.6, 100.9, 101.2, 101.5, 101.8, 102.1, 102.4, 102.7]; \t\t\t\t#elevation(km)\n",
+ "A = [405, 412, 420, 425, 428, 436, 445, 453, 460, 469]; \t\t\t\t#area\n",
+ "o = [0, 14.9, 42.2, 77.3, 119, 169, 217, 272, 334, 405]; \t\t\t\t#outflow\n",
+ "c = zeros(10)\n",
+ "dh = zeros(10)\n",
+ "s = zeros(10)\n",
+ "h = zeros(10)\n",
+ "h1 = zeros(10)\n",
+ "h2 = zeros(10)\n",
+ "for i in range(10):\n",
+ " dh[i] = e[i]-e[i-1];\n",
+ " s[i] = dh[i]/3*(A[i-1]+A[i]+(A[i-1]*A[i])**0.5); \t\t\t\t#storage between contours\n",
+ " c[i] = c[i-1]+s[i]; \t\t\t\t#cumulative storage\n",
+ " h[i] = c[i]/1.08; \t\t\t\t#2s/t\n",
+ " h1[i] = h[i]-o[i]; \t\t\t\t#2s/t-o\n",
+ " h2[i] = h[i]+o[i]; \t\t\t\t#2s/t+o\n",
+ "\n",
+ "T = linspace(0,102,17)\n",
+ "I = [42, 45, 57, 88, 147, 210, 272, 340, 350, 338, 314, 288, 263, 240, 198, 170, 143, 120]; \t\t\t\t#inflow\n",
+ "h4 = [0, 0, 60, 122, 185, 266, 362, 455, 545, 605, 623, 620, 600, 575, 550, 515, 470, 430]; \t\t\t\t#2s/t-0 obtained from curve a\n",
+ "O = [0, 10, 24, 42, 74, 130, 194, 260, 316, 334, 328, 312, 286, 264, 236, 204, 177, 150]; \t\t\t\t#outflow read from curve a\n",
+ "re = [100.2, 100.39, 100.58, 100.86, 101.26, 101.65, 102.03, 102.31, 102.4, 102.37, 102.3, 102.18, 102.06, 101.9, 101.72, 101.56, 102.4]; \t\t\t\t#reservior elevation read from curve b\n",
+ "t = zeros(17)\n",
+ "h3 = zeros(17)\n",
+ "for i in range(1,17):\n",
+ " t[i] = I[i-1]+I[i]; \t\t\t\t#I1+I2\n",
+ " h3[i] = t[i]+h4[i]; \t\t\t\t#2s/t+O\n",
+ "\n",
+ "pt = T[9]-T[8];\n",
+ "d = I[8]-O[9];\n",
+ "#results\n",
+ "print \" maximum reservior level = %.2f m.\"%(re[9]);\n",
+ "print \"maximum discharge over spillway = %.2f cumecs.\"%(O[9]);\n",
+ "print \"reduction in peak discharge = %.2f cumecs.\"%(d);\n",
+ "print \"peak lag = %.f hours.\"%(pt);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " maximum reservior level = 102.37 m.\n",
+ "maximum discharge over spillway = 334.00 cumecs.\n",
+ "reduction in peak discharge = 16.00 cumecs.\n",
+ "peak lag = 6 hours.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.2 pg : 331"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import zeros\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "in1 = [8.6, 2.2, 1.8, 0, 0, 13.5, 280.6, 510.2, 136, 52.5, 20.6, 12.3]; \t\t\t\t#inflow(ha-m)\n",
+ "pan = [2.2, 2.3, 3.1, 8.6, 12.8, 15.6, 12.3, 10.6, 10, 8.2, 5.8, 3]; \t\t\t\t#pan evaporation\n",
+ "p = [0.8, 1.2, 0, 0, 0, 4.8, 12.2, 18.6, 8.6, 1.5, 0, 0] \t\t\t\t#precipitation\n",
+ "D = [14.5, 15.8, 16.2, 16.8, 17.5, 18, 18, 17, 16.5, 16, 15.8, 15]; \t\t\t\t#Demand\n",
+ "s = 0;\n",
+ "r = zeros(12)\n",
+ "E = zeros(12)\n",
+ "P = zeros(12)\n",
+ "S = zeros(12)\n",
+ "# Calculations\n",
+ "for i in range(12):\n",
+ " if in1[i]<10:\n",
+ " r[i] = in1[i]; \t\t\t\t#D/S requirement\n",
+ " else:\n",
+ " r[i] = 10;\n",
+ "\n",
+ " E[i] = 3.6*pan[i]; \t\t\t\t#Evaporation over reservior area\n",
+ " P[i] = 3.5*p[i]; \t\t\t\t#Precipitation\n",
+ " I[i] = in1[i]-r[i]-E[i]+P[i]; \t\t\t\t#Adjusted inflow\n",
+ " S[i] = D[i]-I[i]; \t\t\t\t#Water required from storage\n",
+ " if S[i]<0:\n",
+ " S[i] = 0;\n",
+ "\n",
+ " s = s+S[i];\n",
+ "\n",
+ "\n",
+ "# Results\n",
+ "print \"required useful storage = %.2f ha-m.\"%(s);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "required useful storage = 281.64 ha-m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.3 pg : 333"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import zeros\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "V = 475; \t\t\t\t#flow required to be maintained throughout the year\n",
+ "Y = V*365*8.64; \t\t\t\t#yearly demand\n",
+ "\t\t\t\t#yearly demand gives the slope of demand curve\n",
+ "t = linspace(0,36,37) \t\t\t\t#number of season startin from 1960;each year is diveded into 3 seasons.\n",
+ "q = [0, 1050, 300, 50, 3000, 250, 40, 3500, 370, 90, 2000, 150, 120, 1200, 350, 65, 1400, 400, 100, 3600, 200, 80, 3000, 200, 80, 3000, 150, 120, 700, 210, 50, 800, 120, 80, 2400, 320, 120, 3200, 280, 80]; \t\t\t\t#average discharge\n",
+ "v = [0, 0.9707, 0.4717, 0.0328, 2.7734, 0.3981, 0.0263, 3.2357, 0.5818, 0.0591, 1.8490, 0.2356, 0.0788, 1.1094, 0.5504, 0.0427, 1.2943, 0.6290, 0.0657, 3.3281, 0.3145, 0.0525, 2.7734, 0.2359, 0.0788, 0.6441, 0.3302, 0.028, 0.7396, 0.1887, 0.0525, 2.2188, 0.5032, 0.0788, 2.9583, 0.4403, 0.0525]; \t\t\t\t#voloume\n",
+ "cv = zeros(37)\n",
+ "cv[0] = v[0];\n",
+ "for i in range(37):\n",
+ " cv[i] = cv[i-1]+v[i];\n",
+ "\n",
+ "#each year is divided into three seasons(monsoon,winter and summer).and readings are taken for 12 years\n",
+ "#mass inflow curve is plotted and math.tangent are drawn at the apexes and parellel to demand curve slope;\n",
+ "#the respectiv ordinates represent the deficiency during dry period\n",
+ "#maximum of these ordinates gives the desired reservior capacity\n",
+ "print \"storage capacity of reservior = 1.6 million ha-m.\";\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "storage capacity of reservior = 1.6 million ha-m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.4 pg : 336"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import linspace,zeros\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "asi = 3.6; \t\t\t\t#annual sediment inflow(x10**6)\n",
+ "gamma_s = 12; \t\t\t\t#specific weigth of sediment\n",
+ "vs = asi/12;\n",
+ "ir = 30.; \t\t\t\t#initial reservior capacity\n",
+ "fr = 60.; \t\t\t\t#final reservior capacity \n",
+ "r = ir/fr; \t\t\t\t#initial capacity/inflow ratio\n",
+ "\n",
+ "# Calculations\n",
+ "#r = 0.5; hence we start capacity/inflow ratio from 0.5\n",
+ "c = linspace(0.5,0.1,5) \t\t\t\t#capacity inflow ratio\n",
+ "e = [0.96 ,0.955, 0.95, 0.93, 0.87]; \t\t\t\t#trap efficiency\n",
+ "ae = zeros(4)\n",
+ "for i in range(4):\n",
+ " ae[i] = (e[i]+e[i+1])/2; \t\t\t\t#average efficiency for interval\n",
+ "\n",
+ "as1 = [0.2872, 0.2857, 0.2820, 0.2700]; \t\t\t\t#annual sediment trapped\n",
+ "s = 0\n",
+ "y = zeros(4)\n",
+ "for i in range(4):\n",
+ " y[i] = 6/as1[i]; \t\t\t\t#year to fill\n",
+ " s = s+y[i];\n",
+ "\n",
+ "# Results\n",
+ "print \" probable life of reservior = %i years.\"%(s);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " probable life of reservior = 85 years.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.5 pg : 337"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#corresponding maximum level of water above spillway crest\n",
+ "\n",
+ "#Given\n",
+ "I = [60, 480, 900, 470, 270, 160, 110, 80, 60]; \t\t\t\t#inflow\n",
+ "#for the first time interval 0 hours to 3 hours\n",
+ "I1 = I[0];\n",
+ "I2 = I[1];\n",
+ "t = 3*3600.;\n",
+ "ti = (I1+I2)*t/2; \t\t\t\t#total inflow\n",
+ "#outflow = 1.62*h1**1.5;\n",
+ "#storage change = (30+3h1)h1\n",
+ "#from the basic equation i.e total inflow = total outflow+change in storage\n",
+ "#on solving we get\n",
+ "#h1**2+0.54h1**1.5+10h1-0.972 = 0;\n",
+ "#solving it by trial and error method;we get\n",
+ "h1 = 0.0954;\n",
+ "#for the second time interval 3 hours to 6 hours\n",
+ "I1 = I[1];\n",
+ "I2 = I[2];\n",
+ "t = 3*3600.;\n",
+ "ti = (I1+I2)*t/2; \t\t\t\t#total inflow\n",
+ "#outflow = 0.0477+1.62*h2**1.5;\n",
+ "#storage change = (30+3h2)h2\n",
+ "#from the basic equation i.e total inflow = total outflow+change in storage\n",
+ "#on solving we get\n",
+ "#h2**2+0.54h2**1.5+10h2-3.4312 = 0;\n",
+ "#solving it by trial and error method;we get\n",
+ "h2 = 0.323;\n",
+ "#for the third time interval 6 hours to 9 hours\n",
+ "I1 = I[2];\n",
+ "I2 = I[3];\n",
+ "t = 3*3600.;\n",
+ "ti = (I1+I2)*t/2; \t\t\t\t#total inflow\n",
+ "#outflow = 0.2974+1.62*h3**1.5;\n",
+ "#storage change = (30+3h3)h3\n",
+ "#from the basic equation i.e total inflow = total outflow+change in storage\n",
+ "#on solving we get\n",
+ "#h3**2+0.54h3**1.5+10h3-5.7012 = 0;\n",
+ "#solving it by trial and error method;we get\n",
+ "h3 = 0.522;\n",
+ "#for the fourth time interval 9 hours to 12 hours\n",
+ "I1 = I[3];\n",
+ "I2 = I[4];\n",
+ "t = 3*3600.;\n",
+ "ti = (I1+I2)*t/2; \t\t\t\t#total inflow\n",
+ "#outflow = 0.611+1.62*h4**1.5;\n",
+ "#storage change = (30+3h4)h4\n",
+ "#from the basic equation i.e total inflow = total outflow+change in storage\n",
+ "#on solving we get\n",
+ "#h4**2+0.54h4**1.5+10h4-6.6208 = 0;\n",
+ "#solving it by trial and error method;we get\n",
+ "h4 = 0.601;\n",
+ "#for the fifth time interval 12 hours to 15 hours\n",
+ "I1 = I[4];\n",
+ "I2 = I[5];\n",
+ "t = 3*3600;\n",
+ "ti = (I1+I2)*t/2; \t\t\t\t#total inflow\n",
+ "#outflow = 0.7548+1.62*h5**1.5;\n",
+ "#storage change = (30+3h5)h5\n",
+ "#from the basic equation i.e total inflow = total outflow+change in storage\n",
+ "#on solving we get\n",
+ "#h5**2+0.54h5**1.5+10h5-6.8936 = 0;\n",
+ "#solving it by trial and error method;we get\n",
+ "h5 = 0.624;\n",
+ "#for the sixth time interval 12 hours to 15 hours\n",
+ "I1 = I[5];\n",
+ "I2 = I[6];\n",
+ "t = 3*3600.;\n",
+ "ti = (I1+I2)*t/2; \t\t\t\t#total inflow\n",
+ "#outflow = 0.7985.62*h6**1.5;\n",
+ "#storage change = (30+3h6)h6\n",
+ "#from the basic equation i.e total inflow = total outflow+change in storage\n",
+ "#on solving we get\n",
+ "#h6**2+0.54h6**1.5+10h6-6.8492 = 0;\n",
+ "#solving it by trial and error method;we get\n",
+ "h6 = 0.620;\n",
+ "hmax = h5;\n",
+ "q = 300*(h5)**1.5; \t\t\t\t#equation given\n",
+ "q = round(q*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"maximum outflow discharge over spillway = %.2f cumecs.\"%(q);\n",
+ "print \"maximum level of water above spillway crest = %.2f m.\"%(h5);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum outflow discharge over spillway = 147.88 cumecs.\n",
+ "maximum level of water above spillway crest = 0.62 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6 pg : 339"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import zeros\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "t = 240.; \t\t\t\t#total math.cost of project(million rupees)\n",
+ "s = [32., 88., 72.]; \t\t\t\t#separable math.cost\n",
+ "eb = [40., 138., 112.]; \t\t\t\t#estimated benifit\n",
+ "sp = [47., 104., 101.]; \t\t\t\t#alternate math.single purpose math.cost\n",
+ "\t\t\t\t#umath.sing remaining benifit method\n",
+ "ts = s[0]+s[1]+s[2]; \t\t\t\t#total separable math.cost\n",
+ "tj = t-ts; \t\t\t\t#total joint math.cost\n",
+ "w = 0;\n",
+ "b = zeros(3)\n",
+ "rb = zeros(3)\n",
+ "for i in range(3):\n",
+ " if eb[i]<sp[i]:\n",
+ " b[i] = eb[i]; \t\t\t\t#benifit limited by alternate math.cost\n",
+ " else:\n",
+ " b[i] = sp[i];\n",
+ "\n",
+ " rb[i] = b[i]-s[i]; \t\t\t\t#remaining benifit\n",
+ " w = w+rb[i]; \n",
+ "y = 0;\n",
+ "aj = zeros(3)\n",
+ "ta = zeros(3)\n",
+ "for i in range(3):\n",
+ " aj[i] = tj*rb[i]/w; \t\t\t\t#allocated joint math.cost\n",
+ " ta[i] = s[i]+aj[i]; \t\t\t\t#total allocations\n",
+ " y = y+ta[i];\n",
+ "\n",
+ "print \"Using remaining benifit method.\";\n",
+ "print \"allocations to each project purposepercent:\";\n",
+ "per = zeros(3)\n",
+ "for i in range(3):\n",
+ " per[i] = ta[i]*100/y; \t\t\t\t#total allocation percent\n",
+ " print \"%.2f\"%(per[i]);\n",
+ "\n",
+ "\n",
+ "\n",
+ "#umath.sing alternate justifiable method\n",
+ "w = 0;\n",
+ "ac = zeros(3)\n",
+ "for i in range(3):\n",
+ " ac[i] = sp[i]-s[i]; \t\t\t\t#alternate math.cost less separable math.cost\n",
+ " w = w+ac[i]; \n",
+ "\n",
+ "y = 0;\n",
+ "ajc = zeros(3)\n",
+ "ta = zeros(3)\n",
+ "for i in range(3):\n",
+ " ajc[i] = tj*ac[i]/w; \t\t\t\t#allocated joint math.cost\n",
+ " ta[i] = s[i]+ajc[i]; \t\t\t\t#total allocation\n",
+ " y = y+ta[i];\n",
+ " \n",
+ "print \"Using alternate justifiable expenditure method method.\";\n",
+ "print \"allocations to each project purposepercent:\";\n",
+ "pr = zeros(3)\n",
+ "for i in range(3):\n",
+ " pr[i] = ta[i]*100/y; \t\t\t\t#total allocation percent\n",
+ " print \"%.2f\"%(pr[i]);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Using remaining benifit method.\n",
+ "allocations to each project purposepercent:\n",
+ "16.35\n",
+ "42.70\n",
+ "40.94\n",
+ "Using alternate justifiable expenditure method method.\n",
+ "allocations to each project purposepercent:\n",
+ "18.33\n",
+ "42.00\n",
+ "39.67\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.8 pg : 342"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import zeros\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "I = [35, 55, 92, 130, 160, 140]; \t\t\t\t#inflow(cumec/sec)\n",
+ "x = 0.28;\n",
+ "K = 1.6; \t\t\t\t#studied value\n",
+ "t = 6;\n",
+ "K = K*24; \t\t\t\t#in hours\n",
+ "co = (-K*x+0.5*t)/(K-K*x+0.5*t);\n",
+ "c1 = (K*x+0.5*t)/(K-K*x+0.5*t);\n",
+ "c2 = (K-K*x-0.5*t)/(K-K*x+0.5*t);\n",
+ "c = co+c1+c2;\n",
+ "#c = 1; which implies (OK)\n",
+ "#from Muskingum equation\n",
+ "p1 = zeros(6)\n",
+ "p2 = zeros(6)\n",
+ "p3 = zeros(6)\n",
+ "O = zeros(6)\n",
+ "O[0] = 35;\n",
+ "print \"outflow hydrograph:%.2f\"%(O[0]);\n",
+ "for i in range(1,6):\n",
+ " p1[i] = co*I[i];\n",
+ " p2[i] = c1*I[i-1];\n",
+ " p3[i] = c2*O[i-1];\n",
+ " O[i] = p1[i]+p2[i]+p3[i];\n",
+ " O[i] = round(O[i]*100)/100;\n",
+ " print \"%.2f\"%(O[i]);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "outflow hydrograph:35.00\n",
+ "29.94\n",
+ "25.49\n",
+ "28.90\n",
+ "41.10\n",
+ "69.44\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.9 pg : 343"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import zeros_like,zeros\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "md = [50, 75, 80, 85, 130, 120, 25, 25, 40, 45, 50, 60]; \t\t\t\t#monthly demand\n",
+ "e = [6, 8, 13, 17, 22, 22, 14,11, 13, 12, 7, 5]; \t\t\t\t#evaporation\n",
+ "r = [1, 0, 0, 0, 0, 19, 43, 39, 22, 6, 2, 1]; \t\t\t\t#rain1fall\n",
+ "in1 = [50, 40, 30, 25, 20, 30, 200, 225, 150, 90, 70, 60]; \t\t\t\t#monthly in1flow\n",
+ "A = 30.; \t\t\t\t#area of reservior\n",
+ "Cr = 0.4; \t\t\t\t#run-off coefficient\n",
+ "er = zeros_like(md)\n",
+ "ni = zeros(12)\n",
+ "niv = zeros(12)\n",
+ "nd =zeros(12)\n",
+ "for i in range(12):\n",
+ " er[i] = 0.4*r[i]; \t\t\t\t#effective rain1fall\n",
+ " ni[i] = er[i]-e[i]; \t\t\t\t#net in1flow\n",
+ " niv[i] = ni[i]*0.01*A; \t\t\t\t#net in1flow volume\n",
+ " nd[i] = md[i]-niv[i]; \t\t\t\t#net demand\n",
+ "\n",
+ "cnd = zeros(12)\n",
+ "ci = zeros(12)\n",
+ "cnd[0] = nd[0]; \t\t\t\t#cumulative demand\n",
+ "ci[0] = in1[0]; \t\t\t\t#cumulative in1flow\n",
+ "for i in range(1,12):\n",
+ " cnd[i] = cnd[i-1]+nd[i];\n",
+ " ci[i] = ci[i-1]+in1[i];\n",
+ "\n",
+ "ed = zeros(12,dtype=float)\n",
+ "es = zeros(12)\n",
+ "print \"Excess demand:\";\n",
+ "for i in range(12):\n",
+ " ed[i] = cnd[i]-ci[i]; \t\t\t\t#excess demand\n",
+ " if ed[i]<0: \n",
+ " es[i] = ed[i]; \t\t\t\t#excess supply\n",
+ " ed[i] = 0;\n",
+ "\n",
+ " print \"%.2f\"%(ed[i]);\n",
+ "\n",
+ "print \"min1imum storage required = Maximum of excess demand = %.2f Mm**3.\"%(ed[5]);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Excess demand:\n",
+ "1.80\n",
+ "39.20\n",
+ "93.10\n",
+ "158.20\n",
+ "274.80\n",
+ "369.30\n",
+ "193.40\n",
+ "0.00\n",
+ "0.00\n",
+ "0.00\n",
+ "0.00\n",
+ "0.00\n",
+ "min1imum storage required = Maximum of excess demand = 369.30 Mm**3.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.10 pg : 344"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import array,zeros_like\n",
+ "#minimum capacity of reservior\n",
+ "#the initial storage storage required to maintain uniform demand\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "in1 = array([2.83, 4.25, 5.66, 18.4, 22.64, 22.64, 19.81, 8.49, 7.1, 7.1, 5.66, 5.66]); \t\t\t\t#inflow(x10**5)\n",
+ "s = sum(in1)\n",
+ "avd = s/12; \t\t\t\t#average demand(x10**5)\n",
+ "s = 0\n",
+ "t = 0;\n",
+ "e = zeros_like(in1)\n",
+ "D = zeros_like(in1)\n",
+ "for i in range(12):\n",
+ " e[i] = avd-in1[i];\n",
+ " if e[i]<0:\n",
+ " S[i] = -e[i]; \t\t\t\t#surplus(x10**5)\n",
+ " s = s+S[i];\n",
+ " else:\n",
+ " D[i] = e[i]; \t\t\t\t#Deficit(x10**5)\n",
+ " t = t+D[i];\n",
+ " \n",
+ "d = (s-(t-D[0]-D[1]-D[2]));\n",
+ "s = s;\n",
+ "\n",
+ "print \"minimum capacity of reservior = %.2fD+5 cumec.\"%(s);\n",
+ "print \"storage required to maintain uniform demand = %.2fD+5 cumec\"%(d);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "minimum capacity of reservior = 40.08D+5 cumec.\n",
+ "storage required to maintain uniform demand = 19.82D+5 cumec\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch8_2.ipynb b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch8_2.ipynb
new file mode 100644
index 00000000..595c81ff
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/ch8_2.ipynb
@@ -0,0 +1,1584 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:6fa8fe978c728d97fa9f04464822ea9606521023bb2c2c301624274cfcebacb1"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 8 : GRAVITY DAMS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.1 pg : 376"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "H = 100; \t\t\t\t#heigth of dam\n",
+ "wb = 70; \t\t\t\t#width of base of dam\n",
+ "wt = 7; \t\t\t\t#width of top of dam\n",
+ "l = 1; \t\t\t\t#length of dam\n",
+ "hw = 98; \t\t\t\t#heigth of water in dam\n",
+ "hsu = 90; \t\t\t\t#heigth of slope on downstream side\n",
+ "s = 1/0.7; \t\t\t\t#slope on downstream side\n",
+ "gammad = 24; \t\t\t\t#unit weigth of dam\n",
+ "gammaw = 9.81; \t\t\t\t#unit weigth of water\n",
+ "E = 2.05e7; \t\t\t\t#modulus of elasticity\n",
+ "\n",
+ "\t\t\t\t#(a) inertial forces and moments\n",
+ "alpha0 = 0.05; \t\t\t\t#from table 8.1\n",
+ "alphah = 2*alpha0;\n",
+ "\t\t\t\t#at 10m from top\n",
+ "\n",
+ "def f0(y): \n",
+ "\t return 25.2-0.25*y\n",
+ "\n",
+ "F10 = quad(f0,0,10)[0]\n",
+ "\n",
+ "\n",
+ "def f1(y): \n",
+ "\t return 25.2*(1-0.01*y)*(10-y)\n",
+ "\n",
+ "M10 = quad(f1,0,10)[0]\n",
+ "\n",
+ "\t\t\t\t#at 100m below top\n",
+ "\n",
+ "def f2(y): \n",
+ "\t return 0.15*(1-0.01*y)*16.8*y\n",
+ "\n",
+ "F100 = F10+ quad(f2,10,100)[0]\n",
+ "\n",
+ "\n",
+ "def f3(y): \n",
+ "\t return 0.15*(1-0.01*y)*16.8*y*(100-y)\n",
+ "\n",
+ "M100 = M10+90*F10+ quad(f3,10,100)[0]\n",
+ "\n",
+ "print \"Inertial forces:At 10m from top: F = %.2f kn;M = %ikn-mAt 100m from top: F = %.2f kn;M = %ikn-m.\"%(F10,M10,F100,M100);\n",
+ "\n",
+ "\t\t\t\t#(b) hydrodynamic pressure and moment\n",
+ "\t\t\t\t#at 10m from top\n",
+ "y = 8.;\n",
+ "W10 = 1680.;\n",
+ "alphah = F10/W10;\n",
+ "Cm = 0.735;\n",
+ "Cy = (Cm/2)*((y*(2-y/hw)/hw)+(y*(2-y/hw)/hw)**0.5);\n",
+ "p = Cy*alphah*gammaw*hw;\n",
+ "P10 = 0.726*p*y;\n",
+ "Mp10 = 0.299*p*y**2;\n",
+ "P10 = round(P10*100)/100;\n",
+ "Mp10 = round(Mp10*100)/100;\n",
+ "\t\t\t\t#at 100m from top\n",
+ "y = 98;\n",
+ "W100 = 84840;\n",
+ "alphah = F100/W100;\n",
+ "Cm = 0.735;\n",
+ "Cy = (Cm/2)*(y*(2-y/hw)/hw+(y*(2-y/hw)/hw)**0.5);\n",
+ "p = Cy*alphah*gammaw*hw;\n",
+ "P100 = 0.726*p*y;\n",
+ "Mp100 = 0.299*p*y**2;\n",
+ "print \"Hydrodynamic forces:At 10m from top: F = %.2f kn;\\\n",
+ "\\nM = %.2fkn-mAt 100m from top: F = %i kn;\\\n",
+ "\\nM = %ikn-m.\"%(P10,Mp10,P100,Mp100);\n",
+ "\n",
+ "# rounding off error."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Inertial forces:At 10m from top: F = 239.50 kn;M = 1218kn-mAt 100m from top: F = 4321.90 kn;M = 221790kn-m.\n",
+ "Hydrodynamic forces:At 10m from top: F = 161.58 kn;\n",
+ "M = 532.35kn-mAt 100m from top: F = 2561 kn;\n",
+ "M = 103366kn-m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.2 pg : 378"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "H = 100; \t\t\t\t#heigth of dam\n",
+ "wb = 70; \t\t\t\t#width of base of dam\n",
+ "wt = 7; \t\t\t\t#width of top of dam\n",
+ "l = 1; \t\t\t\t#length of dam\n",
+ "hw = 98; \t\t\t\t#heigth of water in dam\n",
+ "hsu = 90; \t\t\t\t#heigth of slope on downstream side\n",
+ "s = 1/0.7; \t\t\t\t#slope on downstream side\n",
+ "gammad = 24; \t\t\t\t#unit weigth of dam\n",
+ "gammaw = 9.81; \t\t\t\t#unit weigth of water\n",
+ "E = 2.05e7; \t\t\t\t#modulus of elasticity\n",
+ "beta = 1;\n",
+ "I = 2;\n",
+ "Fo = 0.25; \t\t\t\t#from table 8.2\n",
+ " \t\t\t\t#t = Sa/g;\n",
+ "t = 0.19; \t\t\t\t#from fig. 8.4\n",
+ "alphah = beta*I*Fo*t;\n",
+ "T = 5.55*H**2/wb*(gammad/(gammaw*E))**0.5;\n",
+ "\t\t\t\t#(a) Base shear\n",
+ "W = l*gammad*(wt*H+((hsu/s)*hsu)/2);\n",
+ "Fb = 0.6*W*alphah;\n",
+ "print \"Base shear = %.2f KN.\"%(Fb);\n",
+ "\n",
+ "\t\t\t\t#(b) Base moment\n",
+ "hbar = ((wt*H**2/2)+((hsu/s)*hsu**2/6))/((wt*H)+(hsu/s)*hsu/2);\n",
+ "Mb = 0.9*W*hbar*alphah;\n",
+ "print \"Base moment = %.2f KN-m.\"%(Mb);\n",
+ "\n",
+ "\t\t\t\t#(c) shear at 10m from top\n",
+ "Cv = 0.08;\n",
+ "F10 = Cv*Fb;\n",
+ "F10 = round(F10);\n",
+ "print \"shear at 10m from top = %.2f KN.\"%(F10);\n",
+ "\n",
+ "\t\t\t\t#(d) Moment at 10m from top\n",
+ "Cm = 0.02;\n",
+ "M10 = Cm*Mb;\n",
+ "M10 = round(M10);\n",
+ "print \"moment at 10m from top = %.2f KN.\"%(M10);\n",
+ "\t\t\t\t#(e) Hydrodynamic pressure\n",
+ "\t\t\t\t#at 10m from top\n",
+ "y = 8;\n",
+ "W10 = 1680;\n",
+ "Cm = 0.735;\n",
+ "Cy = (Cm/2)*((y*(2-y/hw)/hw)+(y*(2-y/hw)/hw)**0.5);\n",
+ "p = Cy*alphah*gammaw*hw;\n",
+ "P10 = 0.726*p*y;\n",
+ "Mp10 = 0.299*p*y**2;\n",
+ "P10 = round(P10*100)/100;\n",
+ "Mp10 = round(Mp10*100)/100;\n",
+ "\t\t\t\t#at 100m from top\n",
+ "y = 98;\n",
+ "W100 = 84840;\n",
+ "Cm = 0.735;\n",
+ "Cy = (Cm/2)*(y*(2-y/hw)/hw+(y*(2-y/hw)/hw)**0.5);\n",
+ "p = Cy*alphah*gammaw*hw;\n",
+ "P100 = 0.726*p*y;\n",
+ "Mp100 = 0.299*p*y**2;\n",
+ "print \"Hydrodynamic forces:At 10m from top: F = %.2f kn;\\\n",
+ "\\nM = %.2fkn-mAt 100m from top: F = %i \\\n",
+ "kn;M = %ikn-m.\"%(P10,Mp10,P100,Mp100);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base shear = 4835.88 KN.\n",
+ "Base moment = 246342.60 KN-m.\n",
+ "shear at 10m from top = 387.00 KN.\n",
+ "moment at 10m from top = 4927.00 KN.\n",
+ "Hydrodynamic forces:At 10m from top: F = 0.00 kn;\n",
+ "M = 0.00kn-mAt 100m from top: F = 4776 kn;M = 192765kn-m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.3 pg : 379"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "H = 100; \t\t\t\t#heigth of dam\n",
+ "wb = 70; \t\t\t\t#width of base of dam\n",
+ "wt = 7; \t\t\t\t#width of top of dam\n",
+ "l = 1; \t\t\t\t#length of dam\n",
+ "hw = 98; \t\t\t\t#heigth of water in dam\n",
+ "hsu = 90; \t\t\t\t#heigth of slope on downstream side\n",
+ "s = 1/0.7; \t\t\t\t#slope on downstream side\n",
+ "gammad = 24; \t\t\t\t#unit weigth of dam\n",
+ "gammaw = 9.81; \t\t\t\t#unit weigth of water\n",
+ "E = 2.05e7; \t\t\t\t#modulus of elasticity\n",
+ "\t\t\t\t#(a) Seismic coefficient method\n",
+ "alpha0 = 0.05; \t\t\t\t#from table 8.1\n",
+ "alphah = 2*alpha0;\n",
+ "alphav = 0.75*alphah;\n",
+ "\t\t\t\t#at 10m from top\n",
+ "\n",
+ "def f4(y): \n",
+ "\t return alphav*168*(1-0.01*y)\n",
+ "\n",
+ "F10 = quad(f4,0,10)[0]\n",
+ "\n",
+ "\t\t\t\t#at 100m below top\n",
+ "\n",
+ "def f5(y): \n",
+ "\t return alphav*(1-0.01*y)*16.8*y\n",
+ "\n",
+ "F100 = F10+ quad(f5,10,100)[0]\n",
+ "\n",
+ "print \"Parta):At 10m from top: F = %.2f knAt 100m from top: F = %.2f kn.\"%(F10,F100);\n",
+ "\n",
+ "\t\t\t\t#(b)Response spectrum method\n",
+ "beta = 1;\n",
+ "I = 2;\n",
+ "Fo = 0.25; \t\t\t\t#from table 8.2\n",
+ " \t\t\t\t#t = Sa/g;\n",
+ "t = 0.19; \t\t\t\t#from fig. 8.4\n",
+ "alphah = beta*I*Fo*t;\n",
+ "alphav = 0.75*alphah;\n",
+ "\t\t\t\t#at 10m from top\n",
+ "\n",
+ "def f6(y): \n",
+ "\t return alphav*168*(1-0.01*y)\n",
+ "\n",
+ "F10 = quad(f6,0,10)[0]\n",
+ "\n",
+ "\t\t\t\t#at 100m below top\n",
+ "\n",
+ "def f7(y): \n",
+ "\t return alphav*(1-0.01*y)*16.8*y\n",
+ "\n",
+ "F100 = F10+ quad(f7,10,100)[0]\n",
+ "\n",
+ "F100 = round(F100*100)/100;\n",
+ "print \"Partb):At 10m from top: F = %.2f knAt 100m from top: F = %.2f kn.\"%(F10,F100);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Parta):At 10m from top: F = 119.70 knAt 100m from top: F = 2160.90 kn.\n",
+ "Partb):At 10m from top: F = 113.72 knAt 100m from top: F = 2052.86 kn.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.4 pg : 381\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "#Given\n",
+ "H = 100.; \t\t\t\t#heigth of dam\n",
+ "wb = 73.; \t\t\t\t#width of base of dam\n",
+ "wt = 7; \t\t\t\t#width of top of dam\n",
+ "l = 1.; \t\t\t\t#length of dam\n",
+ "hw = 98.; \t\t\t\t#heigth of water in dam\n",
+ "hsu = 90.; \t\t\t\t#heigth of slope on downstream side\n",
+ "s = 1/0.7; \t\t\t\t#slope on downstream side\n",
+ "gammad = 24.; \t\t\t\t#unit weigth of dam\n",
+ "gammaw = 9.81; \t\t\t\t#unit weigth of water\n",
+ "E = 2.05e7; \t\t\t\t#modulus of elasticity\n",
+ "\n",
+ "#at 10m from top\n",
+ "y = 8;\n",
+ "alphah = 0.1;\n",
+ "Cm = 0.72;\n",
+ "Cy = (Cm/2)*((y*(2-y/hw)/hw)+(y*(2-y/hw)/hw)**0.5);\n",
+ "p10 = Cy*alphah*gammaw*hw;\n",
+ "F10 = 0.726*p10*y;\n",
+ "Mp10 = 0.299*p10*y**2;\n",
+ "\n",
+ "#at 40m from top\n",
+ "y = 38;\n",
+ "alphah = 0.1;\n",
+ "Cm = 0.72;\n",
+ "Cy = (Cm/2)*((y*(2-y/hw)/hw)+(y*(2-y/hw)/hw)**0.5);\n",
+ "p40 = Cy*alphah*gammaw*hw;\n",
+ "F40 = 0.726*p40*y;\n",
+ "Mp40 = 0.299*p40*y**2;\n",
+ "\n",
+ "#at 100m from top\n",
+ "y = 98;\n",
+ "alphah = 0.1;\n",
+ "Cm = 0.72;\n",
+ "Cy = (Cm/2)*((y*(2-y/hw)/hw)+(y*(2-y/hw)/hw)**0.5);\n",
+ "p100 = Cy*alphah*gammaw*hw;\n",
+ "F100 = 0.726*p100*y;\n",
+ "Mp100 = 0.299*p100*y**2;\n",
+ "p10 = round(p10*1000)/1000;\n",
+ "F10 = round(F10*1000)/1000;\n",
+ "Mp10 = round(Mp10*10)/10;\n",
+ "p40 = round(p40*1000)/1000;\n",
+ "F40 = round(F40*1000)/1000;\n",
+ "Mp40 = round(Mp40*10)/10;\n",
+ "p100 = round(p100*100)/100;\n",
+ "F100 = round(F100*1000)/1000;\n",
+ "Mp100 = round(Mp100*10)/10;\n",
+ "print \"Hydrodynamic Forces:At 10m from top: P = %.2f KN/square m;\\\n",
+ "\\nF = %.2f KN;\\\n",
+ "\\nM = %.2f KN-m.At 40m from top: P = %.2f KN/square m.;\\\n",
+ "\\nF = %.2f KN;\\\n",
+ "\\nM = %.2f KN-m.At 100m from top: P = %.2f KN/square m;\\\n",
+ "\\nF = %.2f KN;\\\n",
+ "\\nM = %.2f KN-m.\"%(p10,F10,Mp10,p40,F40,Mp40,p100,F100,Mp100);\n",
+ "\n",
+ "#vertical component of reservior water on horizontal section\n",
+ "s1 = 3./60;\n",
+ "Wh = (F100-F40)*s1;\n",
+ "Wh = round(Wh*100)/100;\n",
+ "print \"vertical component of reservior water on horizontal section = %.2f kN/m.\"%(Wh);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hydrodynamic Forces:At 10m from top: P = 19.12 KN/square m;\n",
+ "F = 111.03 KN;\n",
+ "M = 365.80 KN-m.At 40m from top: P = 49.00 KN/square m.;\n",
+ "F = 1351.85 KN;\n",
+ "M = 21156.60 KN-m.At 100m from top: P = 69.22 KN/square m;\n",
+ "F = 4924.82 KN;\n",
+ "M = 198770.00 KN-m.\n",
+ "vertical component of reservior water on horizontal section = 178.65 kN/m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.8 pg : 413"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "#no tension is permissible\n",
+ "#factor of safety against slidingis 1.5\n",
+ "\n",
+ "#Given\n",
+ "\n",
+ "wb = 3; \t\t\t\t#width of dam;\n",
+ "miu = 0.5; \t\t\t\t#coefficient of friction\n",
+ "Sg = 2.4; \t\t\t\t#specific gravity of masonary\n",
+ "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n",
+ "c = 1;\n",
+ "\n",
+ "#when uplift is considered\n",
+ "#when no tension is permissible then e = wb/6;\n",
+ "\n",
+ "p1 = wb*Sg*gamma_w;\n",
+ "p2 = c*wb*gamma_w/2;\n",
+ "p3 = p1-p2;\n",
+ "p4 = p1*wb/2-p2*2;\n",
+ "p5 = gamma_w/6;\n",
+ "d1 = p4/p3; d2 = p5/p3;\n",
+ "d3 = 1.5-d1;\n",
+ "H = ((0.5-d3)/d2)**0.5;\n",
+ "H = round(H*100)/100;\n",
+ "print \"when uplift is considered:\"\n",
+ "print \"Heigth of dam when no tension is permissible = %.2f m.\"%(H);\n",
+ "H = p3*0.5/(1.5*p5*3);\n",
+ "print \"Heigth of dam when factor of safety against sliding is 1.5 = %.2f m.\"%(H);\n",
+ "\n",
+ "#when uplift is not considered\n",
+ "p1 = wb*Sg*gamma_w;\n",
+ "p4 = p1*wb/2;\n",
+ "p5 = gamma_w/6;\n",
+ "d1 = p4/p1;\n",
+ "d2 = p5/p1;\n",
+ "H = (0.5/d2)**0.5;\n",
+ "H = round(H*100)/100;\n",
+ "print \"when uplift is not considered:\"\n",
+ "print \"Heigth of dam when no tension is permissible = %.2f m.\"%(H);\n",
+ "H = p1*0.5/(1.5*p5*3);\n",
+ "print \"Heigth of dam when factor of safety against sliding is 1.5 = %.2f m.\"%(H);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "when uplift is considered:\n",
+ "Heigth of dam when no tension is permissible = 3.55 m.\n",
+ "Heigth of dam when factor of safety against sliding is 1.5 = 3.80 m.\n",
+ "when uplift is not considered:\n",
+ "Heigth of dam when no tension is permissible = 4.65 m.\n",
+ "Heigth of dam when factor of safety against sliding is 1.5 = 4.80 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.9 pg : 414"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#Given\n",
+ "c = 1;\n",
+ "hw = 6; \t\t\t\t#heigth of water in reservior\n",
+ "Bt = 1.5; \t\t\t\t#width of top of dam\n",
+ "H = 6; \t\t\t\t#heigth of the dam\n",
+ "wb = 4.5; \t\t\t\t#width of base of dam\n",
+ "Sg = 2.4; \t\t\t\t#specific gravity of masonary\n",
+ "gamma_w = 9.81; \t\t\t\t#weigth density of water\n",
+ "\n",
+ "W1 = Bt*gamma_w*Sg*H;\n",
+ "W2 = gamma_w*Sg*H*(wb-Bt)/2;\n",
+ "L1 = (wb-Bt)+(Bt/2);\n",
+ "L2 = (2*(wb-Bt))/3\n",
+ "M1 = W1*L1\n",
+ "M2 = W2*L2\n",
+ "\n",
+ "#Reaervior empty\n",
+ "SumW = W1+W2;\n",
+ "SumM = M1+M2;\n",
+ "x = SumM/SumW;\n",
+ "e = wb/2-x;\n",
+ "pnt = (SumW/wb)*(1+(6*e/wb));\n",
+ "pnh = (SumW/wb)*(1-(6*e/wb));\n",
+ "pnt = round(pnt*10)/10;\n",
+ "pnh = round(pnh*10)/10;\n",
+ "print \"Reservior empty:\";\n",
+ "print \" Normal stress at toe = %.2f kN/square.m.\"%(pnt);\n",
+ "print \"Normal stress at heel = %.2f kN/square.m.\"%(pnh);\n",
+ "\n",
+ "#Reservior full\n",
+ "W3 = gamma_w*H**2/2;\n",
+ "U = gamma_w*H*c*wb/2;\n",
+ "SumV = SumW-U;\n",
+ "L3 = hw/3;\n",
+ "L4 = 2*wb/3; \t\t\t\t#lever arm\n",
+ "M3 = W3*L3;\n",
+ "M4 = U*L4; \t\t\t\t#moment about toe\n",
+ "SumM1 = SumM-M4-M3;\n",
+ "x = SumM1/SumV;\n",
+ "e = wb/2-x;\n",
+ "pnt = (SumV/wb)*(1+(6*e/wb));\n",
+ "pnh = (SumV/wb)*(1-(6*e/wb));\n",
+ "pnt = round(pnt*10)/10;\n",
+ "pnh = round(pnh*10)/10;\n",
+ "print \"Reservior full:\";\n",
+ "print \" Normal stress at toe = %.2f kN/square.m.\"%(pnt);\n",
+ "print \"Normal stress at heel = %.2f kN/square.m.\"%(pnh);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Reservior empty:\n",
+ " Normal stress at toe = 15.70 kN/square.m.\n",
+ "Normal stress at heel = 172.70 kN/square.m.\n",
+ "Reservior full:\n",
+ " Normal stress at toe = 120.30 kN/square.m.\n",
+ "Normal stress at heel = 9.20 kN/square.m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.10 pg : 415"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import roots\n",
+ "\n",
+ "\n",
+ "#check the stability\n",
+ "\n",
+ "#Given\n",
+ "c = 1;\n",
+ "hw = 6; \t\t\t\t#heigth of water in reservior\n",
+ "Bt = 1.5; \t\t\t\t#width of top of dam\n",
+ "H = 6; \t\t\t\t#heigth of the dam\n",
+ "gamma_m = 20; \t\t\t\t#unit weigth of masonary \n",
+ "gamma_w = 9.81; \t\t\t\t#weigth density of water\n",
+ "f = 1800; \t\t\t\t#compressive strength\n",
+ "miu = 0.6; \t\t\t\t#coefficient of friction\n",
+ "\n",
+ "#to develop no tension e = b/6;x = b/3.\n",
+ "#hence on solving the relations we get\n",
+ "\n",
+ "P = [1,2.944,-39.074]\n",
+ "wb = roots(P)[1]; \t\t\t\t#sign of coefficient is 2.944 is not taken correctly in book\n",
+ "#roots are 4.94 and -7.89\n",
+ "#math.since negative value cannot be taken\n",
+ "print \"Neglecting the negative value.Width of base is = 4.94 m.\";\n",
+ "W1 = Bt*gamma_m*H;\n",
+ "W2 = gamma_m*H*(wb-Bt)/2;\n",
+ "L1 = (wb-Bt)+(Bt/2);\n",
+ "L2 = (2*(wb-Bt))/3;\n",
+ "M1 = W1*L1,\n",
+ "M2 = W2*L2;\n",
+ "U = gamma_w*H*c*wb/2;\n",
+ "L4 = 2*wb/3;\n",
+ "M4 = U*L4;\n",
+ "W3 = gamma_w*H**2/2;\n",
+ "L3 = hw/3;\n",
+ "M3 = W3*L3;\n",
+ "SumW = W1+W2-U;\n",
+ "SumM = M1+M2-M4-M3;\n",
+ "pn = 2*SumW/wb;\n",
+ "pn = round(pn*10)/10;\n",
+ "print \"Maximum stress = %.2f kN/square.m.\"%(pn);\n",
+ "print \"Dam is safe against compression\";\n",
+ "FOS = miu*SumW/W3;\n",
+ "FOS = round(FOS*100)/100;\n",
+ "print \"Factor of safety against sliding = %.2f. <1\"%(FOS);\n",
+ "print \"Dam is unsafe against sliding.\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Neglecting the negative value.Width of base is = 4.94 m.\n",
+ "Maximum stress = 97.50 kN/square.m.\n",
+ "Dam is safe against compression\n",
+ "Factor of safety against sliding = 0.82. <1\n",
+ "Dam is unsafe against sliding.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.11 pg : 416"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import roots\n",
+ "\t\t\t\t#check the stability if uplift is neglected\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "c = 1;\n",
+ "hw = 6; \t\t\t\t#heigth of water in reservior\n",
+ "Bt = 1.5; \t\t\t\t#width of top of dam\n",
+ "H = 6; \t\t\t\t#heigth of the dam\n",
+ "gamma_m = 20; \t\t\t\t#unit weigth of masonary \n",
+ "gamma_w = 9.81; \t\t\t\t#weigth density of water\n",
+ "f = 1800; \t\t\t\t#compressive strength\n",
+ "miu = 0.6; \t\t\t\t#coefficient of friction\n",
+ "\n",
+ "\t\t\t\t#to develop no tension e = b/6;x = b/3.\n",
+ "\t\t\t\t#hence on solving the relations we get\n",
+ "\n",
+ "P = [1,1.5,-19.908]\n",
+ "wb = roots(P)[1];\n",
+ "\n",
+ "#roots are 3.774 and -5.27\n",
+ "#math.since negative value cannot be taken\n",
+ "\n",
+ "print \"Neglecting the negative value.Width of base is = %.2f m.\"%wb;\n",
+ "\n",
+ "W1 = Bt*gamma_m*H;\n",
+ "W2 = gamma_m*H*(wb-Bt)/2;\n",
+ "L1 = (wb-Bt)+(Bt/2);\n",
+ "L2 = (2*(wb-Bt))/3;\n",
+ "M1 = W1*L1,\n",
+ "M2 = W2*L2;\n",
+ "W3 = gamma_w*H**2/2;\n",
+ "L3 = hw/3;\n",
+ "M3 = W3*L3;\n",
+ "SumW = W1+W2;\n",
+ "SumM = M1+M2-M3;\n",
+ "pn = 2*SumW/wb;\n",
+ "pn = round(pn*10)/10;\n",
+ "print \"Maximum stress = %.2f kN/square.m.\"%(pn);\n",
+ "print \"Dam is safe against compression\";\n",
+ "\n",
+ "FOS = miu*SumW/W3;\n",
+ "FOS = round(FOS*1000)/1000;\n",
+ "print \"Factor of safety against sliding = %.2f. > 1\"%(FOS);\n",
+ "print \"Dam is safe against sliding.\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Neglecting the negative value.Width of base is = 3.77 m.\n",
+ "Maximum stress = 167.70 kN/square.m.\n",
+ "Dam is safe against compression\n",
+ "Factor of safety against sliding = 1.07. > 1\n",
+ "Dam is safe against sliding.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.12 pg : 417"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# calculate maximum permissible heigth of shutter so that no tension develops\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "Bt = 3; \t\t\t\t#width of top of dam\n",
+ "H = 12; \t\t\t\t#heigth of the dam\n",
+ "wb = 9; \t\t\t\t#width of base of dam\n",
+ "gamma_m = 21; \t\t\t\t#unit weigth of masonary\n",
+ "gamma_w = 9.81; \t\t\t\t#weigth density of water\n",
+ "\n",
+ "W1 = Bt*gamma_m*H;\n",
+ "W2 = gamma_m*H*(wb-Bt)/2;\n",
+ "\n",
+ "#taking moment about a point on base at 3m from toe\n",
+ "L1 = 3+Bt/2;\n",
+ "L2 = (2*(wb-Bt)/3)-3;\n",
+ "M1 = W1*L1\n",
+ "M2 = W2*L2;\n",
+ "M = M1+M2;\n",
+ "\n",
+ "#net moment about this point should be zero for equilibrium\n",
+ "s = (M*6/gamma_w)**(1./3)-12;\n",
+ "s = round(s*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"maximum permissible heigth of shutter = %.2f m.\"%(s);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum permissible heigth of shutter = 1.22 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.13 pg : 417"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "\t\t\t\t#moment at 50m below water surface\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "c = 1;\n",
+ "H = 100; \t\t\t\t#heigth of dam\n",
+ "hw = 100; \t\t\t\t#heigth of water in reservior\n",
+ "FB = 1; \t\t\t\t#free board\n",
+ "s = 0.15; \t\t\t\t#slope of upstream face\n",
+ "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n",
+ "alphah = 0.1;\n",
+ "\n",
+ "theta = math.atan(s);\n",
+ "y = 50;\n",
+ "Cm = 0.735*(1-(theta*2/math.pi));\n",
+ "Cy = (Cm/2)*((y*(2-y/hw)/hw)+(y*(2-y/hw)/hw)**0.5);\n",
+ "pe = Cy*alphah*gamma_w*hw;\n",
+ "F = 0.726*pe*y;\n",
+ "M = 0.299*pe*y**2;\n",
+ "pe = round(pe*1000)/1000;\n",
+ "F = round(F*10)/10;\n",
+ "M = round(M*10)/10;\n",
+ "print \"hydrodynamic earthquake pressure = %.2f kN/square.mshear = %.2f kN/m.Moment = %.2f kN-m/m.\"%(pe,F,M);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "hydrodynamic earthquake pressure = 65.27 kN/square.mshear = 2369.30 kN/m.Moment = 48788.60 kN-m/m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.14 pg : 418"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from sympy import sec\n",
+ "\n",
+ "#check stability\n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "c = 1.;\n",
+ "H = 10.; \t\t\t\t#heigth of dam\n",
+ "hw = 10.; \t\t\t\t#heigth of water in reservior\n",
+ "wb = 8.25; \t\t\t\t#bottom width\n",
+ "Bt = 1.; \t\t\t\t#top width\n",
+ "Hs1 = 0.1; \t\t\t\t#slope on upstream side\n",
+ "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n",
+ "gamma_m = 22.4; \t\t\t\t#unit weigth of masonary\n",
+ "f = 1400.; \t\t\t\t#permissible shear stress at joint\n",
+ "miu = 0.75; \t\t\t\t#coefficient of friction\n",
+ "fi = math.atan(0.625);\n",
+ "theta = math.atan(0.1);\n",
+ "\n",
+ "W1 = Bt*H*gamma_m;\n",
+ "W2 = H*H*Hs1*gamma_m/2;\n",
+ "W3 = H*6.25*gamma_m/2;\n",
+ "W4 = hw*gamma_w*H*Hs1/2;\n",
+ "P = gamma_w*hw**2/2;\n",
+ "U = wb*gamma_w*hw*c/2;\n",
+ "SumV = W1+W2+W3+W4-U;\n",
+ "L3 = 2*(wb-(Hs1*H)-Bt)/3;\n",
+ "L1 = (wb-(Hs1*H)-Bt)+Bt/2;\n",
+ "L2 = (wb-(Hs1*H)-Bt)+Bt+(Hs1*H/3);\n",
+ "L4 = (wb-(Hs1*H)-Bt)+Bt+(2*Hs1*H/3);\n",
+ "L5 = 2*wb/3;L6 = hw/3;\n",
+ "M1 = W1*L1;\n",
+ "M2 = W2*L2;\n",
+ "M3 = W3*L3;\n",
+ "M4 = W4*L4;\n",
+ "M5 = U*L5;\n",
+ "M6 = P*L6;\n",
+ "SumM = M1+M2+M3+M4-M5-M6;\n",
+ "Mplus = M1+M2+M3+M4;\n",
+ "Mminus = M5+M6;\n",
+ "FOS = miu*SumV/P;\n",
+ "SFF = (miu*SumV+wb*1400)/P;\n",
+ "FOO = Mplus/Mminus;\n",
+ "FOS = round(FOS*100)/100;\n",
+ "SFF = round(SFF*10)/10;\n",
+ "FOO = round(FOO*100)/100;\n",
+ "print \"Factor of safety against sliding = %.2f. >1 \"%(FOS);\n",
+ "print \"Shear friction factor = %.2f.\"%(SFF);\n",
+ "print \"Factor of safety against overturning = %.2f. <1.5\"%(FOO);\n",
+ "print \"Dam is unsafe against overturning\";\n",
+ "\n",
+ "x = SumM/SumV;\n",
+ "e = wb/2-x;\n",
+ "p = hw*gamma_w;\n",
+ "pnt = (SumV/wb)*(1+(6*e/wb)); \t\t\t\t#calculation is done wrong in book;value of b is not taken correctly\n",
+ "pnh = (SumV/wb)*(1-(6*e/wb));\n",
+ "sigmat = pnt*sec(fi)**2;\n",
+ "sigmah = pnh*sec(theta)**2-p*math.tan(theta)**2;\n",
+ "taut = pnt*math.tan(fi);\n",
+ "tauh = -(pnh-p)*math.tan(theta);\n",
+ "pnt = round(pnt*10)/10;\n",
+ "pnh = round(pnh*10)/10;\n",
+ "sigmat = round(sigmat*10)/10;\n",
+ "sigmah = round(sigmah*10)/10;\n",
+ "taut = round(taut*10)/10;\n",
+ "tauh = round(tauh*10)/10;\n",
+ "print \"Normal stress at toe = %.2f kN/square.m.\"%(pnt);\n",
+ "print \"Normal stress at heel = %.2f kN/square.m.\"%(pnh);\n",
+ "print \"Principal stress at toe = %.2f kN/square.m.\"%(sigmat);\n",
+ "print \"Principal stress at heel = %.2f kN/square.m.\"%(sigmah);\n",
+ "print \"Shear stress at toe = %.2f kN/square.m.\"%(taut);\n",
+ "print \"Shear stress at heel = %.2f kN/square.m.\"%(tauh);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Factor of safety against sliding = 1.04. >1 \n",
+ "Shear friction factor = 24.60.\n",
+ "Factor of safety against overturning = 1.47. <1.5\n",
+ "Dam is unsafe against overturning\n",
+ "Normal stress at toe = 170.70 kN/square.m.\n",
+ "Normal stress at heel = -5.80 kN/square.m.\n",
+ "Principal stress at toe = 237.40 kN/square.m.\n",
+ "Principal stress at heel = -6.80 kN/square.m.\n",
+ "Shear stress at toe = 106.70 kN/square.m.\n",
+ "Shear stress at heel = 10.40 kN/square.m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.15 pg : 420"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\t\t\t\t#Check the stability and determine sliding factor and shear factor\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "c = 1;\n",
+ "miu = 0.75; \t\t\t\t#coefficient of friction\n",
+ "H = 90; \t\t\t\t#heigth of dam\n",
+ "wb = 73.1; \t\t\t\t#width of base\n",
+ "Bt = 7; \t\t\t\t#width of top of dam\n",
+ "hw = 89; \t\t\t\t#heigth of water in reservior\n",
+ "Hs1 = 28; \t\t\t\t#heigth of slope on upstream side\n",
+ "Hs2 = 83; \t\t\t\t#heigth of slope on downstream side\n",
+ "Cm = 0.735;\n",
+ "alphah = 0.1;\n",
+ "gamma_m = 23.5; \t\t\t\t#unit weigth of concrete\n",
+ "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n",
+ "theta = math.atan(8./28);\n",
+ "fi = math.atan(0.7);\n",
+ "\t\t\t\t#self weigth of dam\n",
+ "W1 = (Hs1*8*gamma_m)/2\n",
+ "W2 = (Bt*H*gamma_m)\n",
+ "W3 = (Hs2**2*0.7*gamma_m)/2\n",
+ "\t\t\t\t#weigth of superimposed water\n",
+ "W4 = (Hs1*8*gamma_w)/2\n",
+ "W5 = (hw-Hs1)*8*gamma_w\n",
+ "U = hw*wb*2*gamma_w/6; \t\t\t\t#uplift force\n",
+ "wp = hw**2*gamma_w/2; \t\t\t\t#water pressure\n",
+ "hp = 0.726*Cm*alphah*gamma_w*hw**2; \t\t\t\t#hydrodynamic pressure\n",
+ "Mhp = 0.299*Cm*alphah*gamma_w*hw**3; \t\t\t\t#moment due to hydrodynamic pressure\n",
+ "\t\t\t\t#inertial load due to horizontal acceleration\n",
+ "I1 = W2/10;\n",
+ "I2 = W3/10;\n",
+ "I3 = W1/10;\n",
+ "SumV = W1+W2+W3+W4+W5-U;\n",
+ "SumH = wp+hp+I1+I2+I3;\n",
+ "L1 = (wb-8)+8/3\n",
+ "L2 = (0.7*Hs2)+(Bt/2)\n",
+ "L3 = (2*Hs2*0.7)/3.\n",
+ "L4 = (wb-8)+(2*8)/3.\n",
+ "L5 = (wb-8)+(8./2)\n",
+ "L6 = hw/3;\n",
+ "L7 = 2*wb/3;\n",
+ "M1 = W1*L1\n",
+ "M2 = W2*L2\n",
+ "M3 = W3*L3\n",
+ "M4 = W4*L4;\n",
+ "M5 = W5*L5;\n",
+ "M6 = wp*L6;\n",
+ "M7 = U*L7;\n",
+ "M8 = I1*45;\n",
+ "M9 = I2*83/3;\n",
+ "M10 = I3*28/3;\n",
+ "Mplus = M1+M2+M3+M4+M5;\n",
+ "Mminus = M6+M7+M8+M9+M10+Mhp;\n",
+ "SumM = Mplus-Mminus;\n",
+ "x = SumM/SumV;\n",
+ "e = wb/2-x;\n",
+ "pnt = (SumV/wb)*(1+(6*e/wb));\n",
+ "pnh = (SumV/wb)*(1-(6*e/wb));\n",
+ "sigmat = pnt*sec(fi)**2;\n",
+ "p = hw*gamma_w;\n",
+ "pe = Cm*alphah*gamma_w*hw;\n",
+ "sigmah = pnh*sec(theta)**2-(p+pe)*math.tan(theta)**2;\n",
+ "taut = pnt*math.tan(fi);\n",
+ "tauh = -(-pnh-(p+pe))*math.tan(theta);\n",
+ "print \"Normal stress at toe = %i kN/square.m.\"%(pnt);\n",
+ "print \"Normal stress at heel = %i kN/square.m.\"%(pnh);\n",
+ "print \"Principal stress at toe = %i kN/square.m.\"%(sigmat);\n",
+ "print \"Principal stress at heel = %i kN/square.m.\"%(sigmah);\n",
+ "print \"Shear stress at toe = %i kN/square.m.\"%(taut);\n",
+ "print \"Shear stress at heel = %i kN/square.m.\"%(tauh);\n",
+ "\n",
+ "FOS = miu*SumV/SumH;\n",
+ "SFF = (miu*SumV+wb*1400)/SumH;\n",
+ "FOO = Mplus/Mminus;\n",
+ "Ffi = 1.2;Fc = 2.4;\n",
+ "F = (miu*SumV/Ffi+1400*wb/Fc)/SumH;\n",
+ "FOS = round(FOS*100)/100;\n",
+ "F = round(F*100)/100;\n",
+ "SFF = round(SFF*100)/100;\n",
+ "FOO = round(FOO*100)/100;\n",
+ "print \"Factor of safety against sliding as per IS:6512-1972 = %.2f. <1.5\"%(FOS);\n",
+ "print \"Factor of safety against sliding as per IS:6512-1984 = %.2f. >1\"%(F);\n",
+ "print \"Shear friction factor = %.2f. <6\"%(SFF);\n",
+ "print \"Factor of safety against overturning = %.2f. <1.5\"%(FOO);\n",
+ "print \"Dam is unsafe for given loading conditions\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Normal stress at toe = 1929 kN/square.m.\n",
+ "Normal stress at heel = -323 kN/square.m.\n",
+ "Principal stress at toe = 2874 kN/square.m.\n",
+ "Principal stress at heel = -426 kN/square.m.\n",
+ "Shear stress at toe = 1350 kN/square.m.\n",
+ "Shear stress at heel = 175 kN/square.m.\n",
+ "Factor of safety against sliding as per IS:6512-1972 = 0.87. <1.5\n",
+ "Factor of safety against sliding as per IS:6512-1984 = 1.57. >1\n",
+ "Shear friction factor = 2.90. <6\n",
+ "Factor of safety against overturning = 1.45. <1.5\n",
+ "Dam is unsafe for given loading conditions\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.16 pg : 423"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\t\t\t\t#Check the stability and determine principal and shear stress at toe and heel\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "c = 1;\n",
+ "miu = 0.7; \t\t\t\t#coefficient of friction\n",
+ "H = 70; \t\t\t\t#heigth of dam\n",
+ "ht = 0; \t\t\t\t#heigth of tail water\n",
+ "Lf = 6.5; \t\t\t\t#location of foundation gallery from heel\n",
+ "wb = 52.5; \t\t\t\t#width of base\n",
+ "Bt = 7; \t\t\t\t#width of top of dam\n",
+ "hw = 70; \t\t\t\t#heigth of water in reservior\n",
+ "Hs1 = 35; \t\t\t\t#heigth of slope on upstream side\n",
+ "Hs2 = 60; \t\t\t\t#heigth of slope on downstream side\n",
+ "gamma_m = 24; \t\t\t\t#unit weigth of concrete\n",
+ "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n",
+ "theta = math.atan(0.1);\n",
+ "fi = math.atan(0.7);\n",
+ "\t\t\t\t#self weigth of dam\n",
+ "W1 = (Hs1*3.5*gamma_m)/2\n",
+ "W2 = (Bt*H*gamma_m)\n",
+ "W3 = (Hs2**2*0.7*gamma_m)/2\n",
+ "\t\t\t\t#weigth of superimposed water\n",
+ "W4 = (Hs1*3.5*gamma_w)/2\n",
+ "W5 = (hw-Hs1)*3.5*gamma_w\n",
+ "wp = hw**2*gamma_w/2; \t\t\t\t#water pressure\n",
+ "Pt = gamma_w*ht\n",
+ "Ph = gamma_w*hw\n",
+ "Pg = (ht+(hw-ht)/3)*gamma_w\n",
+ "U = (Pt*(wb-Lf))+(Pg*Lf)+((Ph-Pg)*Lf/2)+((Pg-Pt)*(wb-Lf)/2)*c\n",
+ "l1 = (wb-Lf)/2\n",
+ "l2 = (2*(wb-Lf))/3\n",
+ "l3 = (wb-Lf)+(Lf/2)\n",
+ "l4 = (wb-Lf)+((2*Lf)/3)\n",
+ "L7 = (((Pt*(wb-Lf))*l1)+((Pg-Pt)*(wb-Lf)*l2/2)+((Pg*Lf)*l3)+((Ph-Pg)*Lf*l4/2))/U\n",
+ "L1 = (wb-3.5)+3.5/3\n",
+ "L2 = (0.7*Hs2)+(Bt/2)\n",
+ "L3 = (2*Hs2*0.7)/3\n",
+ "L4 = (wb-3.5)+(2*3.5)/3\n",
+ "L5 = (wb-3.5)+(3.5/2)\n",
+ "L6 = hw/3;\n",
+ "M1 = W1*L1\n",
+ "M2 = W2*L2\n",
+ "M3 = W3*L3\n",
+ "M4 = W4*L4;\n",
+ "M5 = W5*L5;\n",
+ "M6 = wp*L6;\n",
+ "M7 = U*L7;\n",
+ "SumV1 = W1+W2+W3;\n",
+ "SumM1 = M1+M2+M3;\n",
+ "SumV2 = SumV1+W4+W5;\n",
+ "SumM2 = SumM1+M4+M5-M6;\n",
+ "SumV3 = SumV2-U;\n",
+ "SumM3 = SumM2-M7;\n",
+ "Mplus = 1547377;\n",
+ "Mminus = 870421;\n",
+ "SumH = wp;\n",
+ "\n",
+ "\t\t\t\t#case 1. Reservior empty\n",
+ "x = SumM1/SumV1;\n",
+ "e = wb/2-x;\n",
+ "pnt = (SumV1/wb)*(1+(6*e/wb));\n",
+ "pnh = (SumV1/wb)*(1-(6*e/wb));\n",
+ "sigmat = pnt*sec(fi)**2;\n",
+ "sigmah = pnh*sec(theta)**2;\n",
+ "taut = pnt*math.tan(fi);\n",
+ "tauh = pnh*math.tan(theta);\n",
+ "pnt = round(pnt*10)/10;\n",
+ "pnh = round(pnh*10)/10;\n",
+ "sigmat = round(sigmat*10)/10;\n",
+ "sigmah = round(sigmah*10)/10;\n",
+ "taut = round(taut*10)/10;\n",
+ "tauh = round(tauh*10)/10;\n",
+ "print \"case 1. Reservior empty:\";\n",
+ "print \"Normal stress at toe = %.2f kN/square.m.\"%(pnt);\n",
+ "print \"Normal stress at heel = %.2f kN/square.m.\"%(pnh);\n",
+ "print \"Principal stress at toe = %.2f kN/square.m.\"%(sigmat);\n",
+ "print \"Principal stress at heel = %.2f kN/square.m.\"%(sigmah);\n",
+ "print \"Shear stress at toe = %.2f kN/square.m.\"%(taut);\n",
+ "print \"Shear stress at heel = %.2f kN/square.m.\"%(tauh);\n",
+ "\n",
+ "\t\t\t\t#case2. reservior full without uplift\n",
+ "x = SumM2/SumV2;\n",
+ "e = wb/2-x;\n",
+ "p = hw*gamma_w;\n",
+ "pnt = (SumV2/wb)*(1+(6*e/wb));\n",
+ "pnh = (SumV2/wb)*(1-(6*e/wb));\n",
+ "sigmat = pnt*sec(fi)**2;\n",
+ "sigmah = pnh*sec(theta)**2-p*math.tan(theta)**2;\n",
+ "taut = pnt*math.tan(fi);\n",
+ "tauh = -(pnh-p)*math.tan(theta);\n",
+ "pnt = round(pnt*10)/10;\n",
+ "pnh = round(pnh*10)/10;\n",
+ "sigmat = round(sigmat*10)/10;\n",
+ "sigmah = round(sigmah*10)/10;\n",
+ "taut = round(taut*10)/10;\n",
+ "tauh = round(tauh*10)/10;\n",
+ "print \"case 2. reservior full without uplift:\";\n",
+ "print \"Normal stress at toe = %.2f kN/square.m.\"%(pnt);\n",
+ "print \"Normal stress at heel = %.2f kN/square.m.\"%(pnh);\n",
+ "print \"Principal stress at toe = %.2f kN/square.m.\"%(sigmat);\n",
+ "print \"Principal stress at heel = %.2f kN/square.m.\"%(sigmah);\n",
+ "print \"Shear stress at toe = %.2f kN/square.m.\"%(taut);\n",
+ "print \"Shear stress at heel = %.2f kN/square.m.\"%(tauh);\n",
+ "\n",
+ "\t\t\t\t#case3. reservior full with uplift\n",
+ "x = SumM3/SumV3;\n",
+ "e = wb/2-x;\n",
+ "p = hw*gamma_w;\n",
+ "pnt = (SumV3/wb)*(1+(6*e/wb));\n",
+ "pnh = (SumV3/wb)*(1-(6*e/wb));\n",
+ "sigmat = pnt*sec(fi)**2;\n",
+ "sigmah = pnh*sec(theta)**2-p*math.tan(theta)**2;\n",
+ "taut = pnt*math.tan(fi);\n",
+ "tauh = -(pnh-p)*math.tan(theta);\n",
+ "pnt = round(pnt);\n",
+ "pnh = round(pnh);\n",
+ "sigmat = round(sigmat);\n",
+ "sigmah = round(sigmah);\n",
+ "taut = round(taut);\n",
+ "tauh = round(tauh);\n",
+ "print \"case 3. reservior full with uplift:\";\n",
+ "print \"Normal stress at toe = %.2f kN/square.m.\"%(pnt);\n",
+ "print \"Normal stress at heel = %.2f kN/square.m.\"%(pnh);\n",
+ "print \"Principal stress at toe = %.2f kN/square.m.\"%(sigmat);\n",
+ "print \"Principal stress at heel = %.2f kN/square.m.\"%(sigmah);\n",
+ "print \"Shear stress at toe = %.2f kN/square.m.\"%(taut);\n",
+ "print \"Shear stress at heel = %.2f kN/square.m.\"%(tauh);\n",
+ "\n",
+ "FOS = miu*SumV3/SumH;\n",
+ "SFF = (miu*SumV3+wb*1400)/SumH;\n",
+ "FOO = Mplus/Mminus;\n",
+ "Ffi = 1.5;Fc = 3.6;\n",
+ "F = (miu*SumV3/Ffi+1400*wb/Fc)/SumH;\n",
+ "FOS = round(FOS*1000)/1000;\n",
+ "SFF = round(SFF*100)/100;\n",
+ "FOO = round(FOO*100)/100;\n",
+ "F = round(F*1000)/1000;\n",
+ "print \"Factor of safety against sliding = %.2f.\"%(FOS);\n",
+ "print \"Shear friction factor = %.2f.\"%(SFF);\n",
+ "print \"Factor of safety against overturning = %.2f.\"%(FOO);\n",
+ "print \"Factor of safety for load combination B = %.2f. > 1\"%(F);\n",
+ "print \"Dam is safe \";\n",
+ "\n",
+ "\t\t\t\t#Case4.considering seismic forces\n",
+ "Cm = 0.712;\n",
+ "alphah = 0.1;\n",
+ "alphav = 0.08;\n",
+ "hp = 0.726*Cm*alphah*gamma_w*hw**2; \t\t\t\t#hydrodynamic pressure\n",
+ "Mhp = 0.299*Cm*alphah*gamma_w*hw**3; \t\t\t\t#moment due to hydrodynamic pressure\n",
+ "\t\t\t\t#inertial load due to horizontal acceleration\n",
+ "I1 = W2/10;\n",
+ "I2 = W3/10;\n",
+ "I3 = W1/10;\n",
+ "v = SumV1*alphav;\n",
+ "Mv = 116444;\n",
+ "SumV4 = SumV3-v;\n",
+ "SumH1 = SumH+I1+I2+I3+hp;\n",
+ "M8 = I1*35;\n",
+ "M9 = I2*20;\n",
+ "M10 = I3*35/3;\n",
+ "Mminus1 = 1161849;\n",
+ "SumM4 = SumM3-M8-M9-M10-Mhp-Mv;\n",
+ "\n",
+ "x = SumM4/SumV4;\n",
+ "e = wb/2-x;\n",
+ "p = hw*gamma_w;\n",
+ "pe = Cm*alphah*gamma_w*hw;\n",
+ "pnt = (SumV4/wb)*(1+(6*e/wb));\n",
+ "pnh = (SumV4/wb)*(1-(6*e/wb));\n",
+ "sigmat = pnt*sec(fi)**2;\n",
+ "sigmah = pnh*sec(theta)**2-(p+pe)*math.tan(theta)**2;\n",
+ "taut = pnt*math.tan(fi);\n",
+ "tauh = (-pnh+(p+pe))*math.tan(theta);\n",
+ "pnt = round(pnt);\n",
+ "pnh = round(pnh);\n",
+ "sigmat = round(sigmat);\n",
+ "sigmah = round(sigmah);\n",
+ "taut = round(taut);\n",
+ "tauh = round(tauh);\n",
+ "print \"case 4.considering seismic forces\";\n",
+ "print \"Normal stress at toe = %.2f kN/square.m.\"%(pnt);\n",
+ "print \"Normal stress at heel = %.2f kN/square.m.\"%(pnh);\n",
+ "print \"Principal stress at toe = %.2f kN/square.m.\"%(sigmat);\n",
+ "print \"Principal stress at heel = %.2f kN/square.m.\"%(sigmah);\n",
+ "print \"Shear stress at toe = %.2f kN/square.m.\"%(taut);\n",
+ "print \"Shear stress at heel = %.2f kN/square.m.\"%(tauh); \t\t\t\t#answer is wrong in book\n",
+ "\n",
+ "FOS = miu*SumV4/SumH1;\n",
+ "SFF = (miu*SumV4+wb*1400)/SumH1;\n",
+ "FOO = Mplus/Mminus1;\n",
+ "Ffi = 1.2;Fc = 2.7;\n",
+ "F = (miu*SumV4/Ffi+1400*wb/Fc)/SumH1;\n",
+ "FOS = round(FOS*1000)/1000;\n",
+ "SFF = round(SFF*100)/100;\n",
+ "FOO = round(FOO*100)/100;\n",
+ "F = round(F*100)/100;\n",
+ "print \"Factor of safety against sliding = %.2f.\"%(FOS);\n",
+ "print \"Shear friction factor = %.2f.\"%(SFF);\n",
+ "print \"Factor of safety against overturning = %.2f.\"%(FOO);\n",
+ "print \"Factor of safety for load combination E = %.2f. > 1\"%(F);\n",
+ "print \"Dam is safe \";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "case 1. Reservior empty:\n",
+ "Normal stress at toe = 156.30 kN/square.m.\n",
+ "Normal stress at heel = 1499.70 kN/square.m.\n",
+ "Principal stress at toe = 232.80 kN/square.m.\n",
+ "Principal stress at heel = 1514.70 kN/square.m.\n",
+ "Shear stress at toe = 109.40 kN/square.m.\n",
+ "Shear stress at heel = 150.00 kN/square.m.\n",
+ "case 2. reservior full without uplift:\n",
+ "Normal stress at toe = 1297.10 kN/square.m.\n",
+ "Normal stress at heel = 427.60 kN/square.m.\n",
+ "Principal stress at toe = 1932.60 kN/square.m.\n",
+ "Principal stress at heel = 425.00 kN/square.m.\n",
+ "Shear stress at toe = 907.90 kN/square.m.\n",
+ "Shear stress at heel = 25.90 kN/square.m.\n",
+ "case 3. reservior full with uplift:\n",
+ "Normal stress at toe = 1344.00 kN/square.m.\n",
+ "Normal stress at heel = 70.00 kN/square.m.\n",
+ "Principal stress at toe = 2002.00 kN/square.m.\n",
+ "Principal stress at heel = 64.00 kN/square.m.\n",
+ "Shear stress at toe = 941.00 kN/square.m.\n",
+ "Shear stress at heel = 62.00 kN/square.m.\n",
+ "Factor of safety against sliding = 1.08.\n",
+ "Shear friction factor = 4.14.\n",
+ "Factor of safety against overturning = 1.00.\n",
+ "Factor of safety for load combination B = 1.57. > 1\n",
+ "Dam is safe \n",
+ "case 4.considering seismic forces\n",
+ "Normal stress at toe = 1713.00 kN/square.m.\n",
+ "Normal stress at heel = -432.00 kN/square.m.\n",
+ "Principal stress at toe = 2552.00 kN/square.m.\n",
+ "Principal stress at heel = -443.00 kN/square.m.\n",
+ "Shear stress at toe = 1199.00 kN/square.m.\n",
+ "Shear stress at heel = 117.00 kN/square.m.\n",
+ "Factor of safety against sliding = 0.76.\n",
+ "Shear friction factor = 3.14.\n",
+ "Factor of safety against overturning = 1.00.\n",
+ "Factor of safety for load combination E = 1.52. > 1\n",
+ "Dam is safe \n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.17 pg : 429"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "#design practical profile of gravity dam\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "c = 1;\n",
+ "rlb = 1450; \t\t\t\t#R.L of base of dam\n",
+ "rlw = 1480.5; \t\t\t\t#R.L of water level\n",
+ "Sg = 2.4; \t\t\t\t#specific gravity of masonary\n",
+ "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n",
+ "w = 1; \t\t\t\t#heigth of waves\n",
+ "f = 1200; \t\t\t\t#safe compressive stress for masonary\n",
+ "FB = 1.5*w;\n",
+ "rlt = FB+rlw; \t\t\t\t#R.L of top of dam\n",
+ "H = rlt-rlb; \t\t\t\t#heigth of dam\n",
+ "LH = f/(gamma_w*(Sg+1))\n",
+ "LH = round(LH*100)/100;\n",
+ "print \"Heigth of dam = %.2f m.\"%(H);\n",
+ "print \"limiting heigth of dam = %.2f m.\"%(LH);\n",
+ "print \"Dam is low gravity dam\";\n",
+ "hw = rlw-rlb;\n",
+ "\t\t\t\t#keep top width,a = 4.5.\n",
+ "a = 4.5;\n",
+ "P = hw/(Sg**0.5);\n",
+ "P = round(P*10)/10;\n",
+ "print \"Base width of elementary profile = %.2f m.\"%(P);\n",
+ "uo = a/16;\n",
+ "wb = uo+P;\n",
+ "wb = round(wb);\n",
+ "print \"Base width = %.2f m.\"%(wb);\n",
+ "D = 2*a*(Sg**0.5);\n",
+ "D = round(D);\n",
+ "print \"Dismath.tance upto which u/s slope is vertical from water level = %.2f m.\"%(D);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heigth of dam = 32.00 m.\n",
+ "limiting heigth of dam = 35.98 m.\n",
+ "Dam is low gravity dam\n",
+ "Base width of elementary profile = 19.70 m.\n",
+ "Base width = 20.00 m.\n",
+ "Dismath.tance upto which u/s slope is vertical from water level = 14.00 m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.18 pg : 430"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "#determine if dam is safe against sliding\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "hw = 97.; \t\t\t\t#heigth of water in reservior\n",
+ "Bt = 7.; \t\t\t\t#width of top of dam\n",
+ "H = 100.; \t\t\t\t#heigth of the dam\n",
+ "Hs2 = 90.; \t\t\t\t#heigth of slope on downstream side\n",
+ "wb = 75.; \t\t\t\t#width of base of dam\n",
+ "miu = 0.75; \t\t\t\t#coefficient of friction\n",
+ "gamma_d = 2.4; \t\t\t\t#weigth density of concrete\n",
+ "gamma_w = 1000.; \t\t\t\t#weigth density of water\n",
+ "\n",
+ "# Calculations\n",
+ "P = gamma_w*hw**2/(2*1000);\n",
+ "W1 = Bt*gamma_d*H;\n",
+ "W2 = (wb-Bt)*Hs2*gamma_d/2;\n",
+ "W = W1+W2;\n",
+ "FOS = miu*W/P;\n",
+ "FOS = round(FOS*1000)/1000;\n",
+ "\n",
+ "# Results\n",
+ "print \"Factor of safety against sliding = %.2f.\"%(FOS);\n",
+ "print \"Dam is safe against sliding\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Factor of safety against sliding = 1.44.\n",
+ "Dam is safe against sliding\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.19 pg : 430"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "#Factor of safety against overturning\n",
+ "#Factor of safety against sliding\n",
+ "#Shear friction factor\n",
+ "\n",
+ "#Given\n",
+ "c = 1.;\n",
+ "H = 10.; \t\t\t\t#heigth of dam\n",
+ "hw = 10.; \t\t\t\t#heigth of water in reservior\n",
+ "wb = 8.25; \t\t\t\t#bottom width\n",
+ "Bt = 1.; \t\t\t\t#top width\n",
+ "Hs1 = 0.1; \t\t\t\t#slope on upstream side\n",
+ "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n",
+ "gamma_m = 22.4; \t\t\t\t#unit weigth of masonary\n",
+ "f = 1400.; \t\t\t\t#permissible shear stress at joint\n",
+ "miu = 0.75; \t\t\t\t#coefficient of friction\n",
+ "fi = math.atan(0.625);\n",
+ "theta = math.atan(0.1);\n",
+ "\n",
+ "# Calculations\n",
+ "W1 = Bt*H*gamma_m;\n",
+ "W2 = H*H*Hs1*gamma_m/2;\n",
+ "W3 = H*6.25*gamma_m/2;\n",
+ "W4 = hw*gamma_w*H*Hs1/2;\n",
+ "P = gamma_w*hw**2/2;\n",
+ "U = wb*gamma_w*hw*c/2;\n",
+ "SumV = W1+W2+W3+W4-U;\n",
+ "L3 = 2*(wb-(Hs1*H)-Bt)/3;\n",
+ "L1 = (wb-(Hs1*H)-Bt)+Bt/2;\n",
+ "L2 = (wb-(Hs1*H)-Bt)+Bt+(Hs1*H/3);\n",
+ "L4 = (wb-(Hs1*H)-Bt)+Bt+(2*Hs1*H/3);\n",
+ "L5 = 2*wb/3;L6 = hw/3;\n",
+ "M1 = W1*L1;M2 = W2*L2;M3 = W3*L3;M4 = W4*L4;\n",
+ "M5 = U*L5;M6 = P*L6;\n",
+ "SumM = M1+M2+M3+M4-M5-M6;\n",
+ "Mplus = M1+M2+M3+M4;\n",
+ "Mminus = M5+M6;\n",
+ "FOS = miu*SumV/P;\n",
+ "SFF = (miu*SumV+wb*1400)/P;\n",
+ "FOO = Mplus/Mminus;\n",
+ "FOS = round(FOS*100)/100;\n",
+ "SFF = round(SFF*10)/10;\n",
+ "FOO = round(FOO*100)/100;\n",
+ "\n",
+ "# Results\n",
+ "print \"Factor of safety against sliding = %.2f.\"%(FOS);\n",
+ "print \"Shear friction factor = %.2f.\"%(SFF);\n",
+ "print \"Factor of safety against overturning = %.2f.\"%(FOO);\n",
+ "print \"Dam is unsafe against overturning\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Factor of safety against sliding = 1.04.\n",
+ "Shear friction factor = 24.60.\n",
+ "Factor of safety against overturning = 1.47.\n",
+ "Dam is unsafe against overturning\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.20 pg : 431"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\t\t\t\t\n",
+ "#Given\n",
+ "c = 1.;\n",
+ "hw = 80.; \t\t\t\t#heigth of water in reservior\n",
+ "Bt = 6.; \t\t\t\t#width of top of dam\n",
+ "H = 84.; \t\t\t\t#heigth of the dam\n",
+ "Hs2 = 75.; \t\t\t\t#heigth of slope on downstream side\n",
+ "wb = 56.; \t\t\t\t#width of base of dam\n",
+ "Lf = 8.; \t\t\t\t#dismath.tance of foundation gallery from heel\n",
+ "gamma_d = 23.5; \t\t\t\t#weigth density of concrete\n",
+ "gamma_w = 9.81; \t\t\t\t#weigth density of water\n",
+ "ht = 6.; \t\t\t\t#heigth of tail water\n",
+ "\n",
+ "# Calculations\n",
+ "W1 = Bt*gamma_d*H;\n",
+ "W2 = gamma_d*Hs2*(wb-Bt)/2;\n",
+ "W3 = gamma_w*ht*4/2;\n",
+ "W4 = gamma_w*hw**2/2;\n",
+ "W5 = gamma_w*ht**2/2;\n",
+ "Pt = gamma_w*ht\n",
+ "Ph = gamma_w*hw\n",
+ "Pg = (ht+(hw-ht)/3)*gamma_w\n",
+ "U = (Pt*(wb-Lf))+(Pg*Lf)+((Ph-Pg)*Lf/2)+((Pg-Pt)*(wb-Lf)/2)*c\n",
+ "l1 = (wb-Lf)/2\n",
+ "l2 = (2*(wb-Lf))/3\n",
+ "l3 = (wb-Lf)+(Lf/2)\n",
+ "l4 = (wb-Lf)+((2*Lf)/3)\n",
+ "L6 = (((Pt*(wb-Lf))*l1)+((Pg-Pt)*(wb-Lf)*l2/2)+((Pg*Lf)*l3)+((Ph-Pg)*Lf*l4/2))/U\n",
+ "L1 = (wb-Bt)+(Bt/2)\n",
+ "L2 = (2*(wb-Bt))/3\n",
+ "L3 = 4./3;\n",
+ "L4 = hw/3;\n",
+ "L5 = ht/3;\n",
+ "M1 = W1*L1\n",
+ "M2 = W2*L2\n",
+ "M3 = W3*L3\n",
+ "M4 = W4*L4\n",
+ "M5 = W5*L5\n",
+ "M6 = U*L6;\n",
+ "SumV = W1+W2+W3-U;\n",
+ "SumH = W4-W5;\n",
+ "SumM = M1+M2+M3-M4+M5-M6;\n",
+ "x = SumM/SumV;\n",
+ "e = wb/2-x;\n",
+ "pnt = (SumV/wb)*(1+(6*e/wb));\n",
+ "pnh = (SumV/wb)*(1-(6*e/wb));\n",
+ "pnt = round(pnt*10)/10;\n",
+ "pnh = round(pnh*10)/10;\n",
+ "\n",
+ "# Results\n",
+ "print \"Maximum Normal stress at toe = %.2f kN/square.m.\"%(pnt);\n",
+ "print \"Maximum Normal stress at heel = %.2f kN/square.m.\"%(pnh);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum Normal stress at toe = 1586.70 kN/square.m.\n",
+ "Maximum Normal stress at heel = -49.30 kN/square.m.\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch10_1.png b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch10_1.png
new file mode 100644
index 00000000..8fbdd9ad
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch10_1.png
Binary files differ
diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch4_1.png b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch4_1.png
new file mode 100644
index 00000000..6fd8ed7e
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch4_1.png
Binary files differ
diff --git a/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch5_1.png b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch5_1.png
new file mode 100644
index 00000000..c3a01497
--- /dev/null
+++ b/Irrigation_and_Water_Power_Engineering_by_B._C._Punmia/screenshots/ch5_1.png
Binary files differ
diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch10_1.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch10_1.ipynb
new file mode 100644
index 00000000..ff3ad88b
--- /dev/null
+++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch10_1.ipynb
@@ -0,0 +1,758 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:8da890ac5238ff5b0c8b5e2f22721a2e530a75b68b25eb33de8468d2a1b6f0fb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 10 : Refrigeration"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.1 Page No : 503"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "T1 = 70+460; \t\t\t#70F = 70+460 R \t\t\t#Energy flows into the system at reservoir at constant temperature T1(unit:R)\n",
+ "T2 = 32+460; \t\t\t#32F = 32+460 R \t\t\t#Heat is rejected to the constant temperature T2(Unit:R)\n",
+ "print \"Solution for a\"\n",
+ "COP = T2/(T1-T2); \t\t\t#Coefficient of performance\n",
+ "print \"Coefficient of performanceCOP) of the cycle is %.2f\"%(COP);\n",
+ "print \"Solution for b\"\n",
+ "Qremoved = 1000; \t\t\t#Unit:Btu/min \t\t\t#heat removal\n",
+ "WbyJ = Qremoved/COP; \t\t\t#The power required \t\t\t#Unit:Btu/min\n",
+ "print \"The power required is %.2f Btu/min\"%(WbyJ);\n",
+ "print \"Solution for c\"\n",
+ "Qrej = Qremoved+WbyJ; \t\t\t#The rate of heat rejected to the room \t\t\t#Unit:Btu/min\n",
+ "print \"The rate of heat rejected to the room is %.2f Btu/min\"%(Qrej);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Solution for a\n",
+ "Coefficient of performanceCOP) of the cycle is 12.00\n",
+ "Solution for b\n",
+ "The power required is 83.00 Btu/min\n",
+ "Solution for c\n",
+ "The rate of heat rejected to the room is 1083.00 Btu/min\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.2 Page No : 504"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "T1 = 20+273; \t\t\t#20C = 20+273 R \t\t\t#Energy flows into the system at reservoir at constant temperature T1(unit:R)\n",
+ "T2 = -5+273; \t\t\t#-5C = -5+273 R \t\t\t#Heat is rejected to the constant temperature T2(Unit:R)\n",
+ "print \"Solution for a\"\n",
+ "COP = T2/(T1-T2); \t\t\t#Coefficient of performance\n",
+ "print \"Coefficient of performanceCOP) of the cycle is %.2f\"%(COP);\n",
+ "print \"Solution for b\"\n",
+ "Qremoved = 30; \t\t\t#Unit:kW \t\t\t#heat removal \n",
+ "W = Qremoved/COP; \t\t\t#power required \t\t\t#unit:kW\n",
+ "print \"The power required is %.2f kW \"%(W);\n",
+ "print \"Solution for c\"\n",
+ "Qrej = Qremoved+W; \t\t\t#The rate of heat rejected to the room \t\t\t#Unit:kW\n",
+ "print \"The rate of heat rejected to the room is %.2f kW\"%(Qrej);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Solution for a\n",
+ "Coefficient of performanceCOP) of the cycle is 10.00\n",
+ "Solution for b\n",
+ "The power required is 3.00 kW \n",
+ "Solution for c\n",
+ "The rate of heat rejected to the room is 33.00 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.3 Page No : 505"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "T1 = 70+460; \t\t\t#70F = 70+460 R \t\t\t#Energy flows into the system at reservoir at constant temperature T1(unit:R)\n",
+ "T2 = 20+460; \t\t\t#20F = 20+460 R \t\t\t#Heat is rejected to the constant temperature T2(Unit:R)\n",
+ "print \"Solution for a\"\n",
+ "COP = T2/(T1-T2); \t\t\t#Coefficient of performance\n",
+ "print \"Coefficient of performanceCOP) of the cycle is %.2f\"%(COP);\n",
+ "print \"Solution for b\"\n",
+ "HPperTOR = 4.717/COP; \t\t\t#Horsepower per ton of refrigeration \t\t\t#Unit:hp/ton\n",
+ "COPactual = 2; \t\t\t#Actual Coefficient of performance(COP) is stated to be 2\n",
+ "HPperTORactual = 4.717/COPactual; \t\t\t#Horsepower per ton of refrigeration(actual) \t\t\t#Unit:hp/ton\n",
+ "print \"The horsepower required by the actual cycle over the minimum is %.2f hp/ton\"%(HPperTORactual-HPperTOR);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Solution for a\n",
+ "Coefficient of performanceCOP) of the cycle is 9.00\n",
+ "Solution for b\n",
+ "The horsepower required by the actual cycle over the minimum is 1.83 hp/ton\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.4 Page No : 506"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy.linalg import inv\n",
+ "\n",
+ "COP = 4.5; \t\t\t#Coefficient of performance \t\t\t#From problem 10.1\n",
+ "HPperTOR = 4.717/COP; \t\t\t#Horsepower per ton of refrigeration \t\t\t#Unit:hp/ton\n",
+ "Qremoved = 1000; \t\t\t#Unit:Btu/min \t\t\t#From problem 10.1\n",
+ "#1000 Btu/min /200 Btu/min ton = 5 tons of refrigeration\n",
+ "HPrequired = HPperTOR*5; \t\t\t#The horsepower required \t\t\t#unit:hp\n",
+ "print \"The horsepower required is %.2f hp\"%(HPrequired);\n",
+ "#In problem 10.1, 77.2 Btu/min was required\n",
+ "print \"The power required is %.2f hp\"%(77.2*778*inv([[33000]])); \t\t\t#1 Btu = 778 ft*lbf \t\t\t#1 min*hp = 33000 ft*lbf\n",
+ "#The ratio of the power required in each problem is the same as the inverse ratio of the COP value\n",
+ "#Therefore,\n",
+ "print \"The power required is %.2f hp\"%((COP/12.95)*HPrequired); \t\t\t#COPin problem 10.1) = 12.95\n",
+ "print \"This checks our results\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The horsepower required is 5.24 hp\n",
+ "The power required is 1.82 hp\n",
+ "The power required is 1.82 hp\n",
+ "This checks our results\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.5 Page No : 506"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data\n",
+ "COP = 10.72; \t\t\t#In the problem 10.2 \t\t\t#Coefficient of performance\n",
+ "P = 2.8; \t\t\t#In the problem 10.2 \t\t\t#The power was 2.8 kW\n",
+ "COPactual = 3.8; \t\t\t#Actual Coefficient of performance(COP)\n",
+ "\n",
+ "# calculation\n",
+ "power = P*COP/COPactual; \t\t\t#The power required \t\t\t#unit:kW\n",
+ "\n",
+ "# results\n",
+ "print \"The power required is %.2f kW\"%(power)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The power required is 7.90 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.6 Page No : 509"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#From Appendix 3,at 120psia,the corresponding saturation temperature is 66 F, enthalpies are\n",
+ "h1 = 116.0; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n",
+ "h2 = 116.0; \t\t\t#Unit:Btu/lbm \t\t\t#Throttling gives h1 = h2 \t\t\t#enthalpy\n",
+ "h3 = 602.4; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n",
+ "#From the consideration that s3 = s4,h4 is found at 15 psia,\n",
+ "s3 = 1.3938; \t\t\t#s = entropy \t\t\t#Unit:Btu/(lbm*F)\n",
+ "#Therefore by interpolation in the superheat tables at 120 psia,\n",
+ "t4 = 237.4; \t\t\t#Unit:fahrenheit \t\t\t#temperature\n",
+ "h4 = 733.4; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n",
+ "print \"Solution for a\"\n",
+ "COP = (h3-h1)/(h4-h3); \t\t\t#Coefficient of performance\n",
+ "print \"Coefficient of performance is %.2f\"%(COP);\n",
+ "print \"Solution for b\"\n",
+ "print \"The work of compression is %.2f Btu/lbm\"%(h4-h3);\n",
+ "print \"Solution for c\"\n",
+ "print \"The refrigatering effect is %.2f Btu/lbm\"%(h3-h1);\n",
+ "print \"Solution for d\"\n",
+ "tons = 30; \t\t\t#capacity of 30 tons is desired\n",
+ "print \"The pounds per minute of ammonia required for ciculation is %.2f lbm/min\"%((200*tons)/(h3-h1));\n",
+ "print \"Solution for e\"\n",
+ "print \"The ideal horsepower per ton of refrigeration is %.2f hp/ton\"%((4.717*h4-h3)/(h3-h1));\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Solution for a\n",
+ "Coefficient of performance is 3.71\n",
+ "Solution for b\n",
+ "The work of compression is 131.00 Btu/lbm\n",
+ "Solution for c\n",
+ "The refrigatering effect is 486.40 Btu/lbm\n",
+ "Solution for d\n",
+ "The pounds per minute of ammonia required for ciculation is 12.34 lbm/min\n",
+ "Solution for e\n",
+ "The ideal horsepower per ton of refrigeration is 5.87 hp/ton\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.7 Page No : 510"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#From Appendix 3,110 psig corresponds to 96 F, enthalpies are\n",
+ "h1 = 30.14; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n",
+ "h2 = 30.14; \t\t\t#Unit:Btu/lbm \t\t\t#Throttling gives h1 = h2 \t\t\t#enthalpy\n",
+ "h3 = 75.110; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n",
+ "#From the consideration that s3 = s4,at -20F,\n",
+ "s3 = 0.17102; \t\t\t#Unit:Btu/(lbm*F) \t\t\t#s = entropy\n",
+ "#Therefore by interpolation in the Freon-12 superheat table at these values,\n",
+ "h4 = 89.293; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n",
+ "print \"Solution for a\"\n",
+ "COP = (h3-h1)/(h4-h3); \t\t\t#Coefficient of performance\n",
+ "print \"Coefficient of performance is %.2f\"%(COP);\n",
+ "print \"Solution for b\"\n",
+ "print \"The work of compression is %.2f Btu/lbm\"%(h4-h3);\n",
+ "print \"Solution for c\"\n",
+ "print \"The refrigatering effect is %.2f Btu/lbm\"%(h3-h1);\n",
+ "print \"Solution for d\";\n",
+ "tons = 30; \t\t\t#capacity of 30 tons is desired\n",
+ "print \"The pounds per minute of ammonia required for ciculation is %.2f lbm/min\"%((200*tons)/h3-h1);\n",
+ "print \"Solution for e\"\n",
+ "print \"The ideal horsepower per ton of refrigeration is %.2f hp/ton\"%((4.717*h4-h3)/(h3-h1))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Solution for a\n",
+ "Coefficient of performance is 3.17\n",
+ "Solution for b\n",
+ "The work of compression is 14.18 Btu/lbm\n",
+ "Solution for c\n",
+ "The refrigatering effect is 44.97 Btu/lbm\n",
+ "Solution for d\n",
+ "The pounds per minute of ammonia required for ciculation is 49.74 lbm/min\n",
+ "Solution for e\n",
+ "The ideal horsepower per ton of refrigeration is 7.70 hp/ton\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.8 Page No : 517"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#From Appendix 3,Using the Freon-12 tables, enthalpies are\n",
+ "h1 = 28.713; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n",
+ "h2 = 28.713; \t\t\t#Unit:Btu/lbm \t\t\t#Throttling gives h1 = h2 \t\t\t#enthalpy\n",
+ "h3 = 78.335; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n",
+ "#From the consideration that s3 = s4,\n",
+ "s3 = 0.16798; \t\t\t#Unit:Btu/(lbm*F) \t\t\t#s = entropy\n",
+ "#Therefore by interpolation in the superheat tables at 90 F,\n",
+ "s = 0.16798; \t\t\t#entropy at 90F \t\t\t#Btu/lbm*F\n",
+ "h4 = 87.192; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n",
+ "print \"The heat extracted is %.2f Btu/lbm\"%(h3-h1);\n",
+ "print \"The work required is %.2f Btu/lbm\"%(h4-h3);\n",
+ "COP = (h3-h1)/(h4-h3); \t\t\t#Coefficient of performance\n",
+ "print \"The Coefficient of performanceCOP) of this ideal cycle is %.2f\"%(COP);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat extracted is 49.62 Btu/lbm\n",
+ "The work required is 8.86 Btu/lbm\n",
+ "The Coefficient of performanceCOP) of this ideal cycle is 5.60\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.9 Page No : 518"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#From Appendix 3,Using the HFC-134a tables, enthalpies are\n",
+ "h1 = 41.6; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n",
+ "h2 = 41.6; \t\t\t#Unit:Btu/lbm \t\t\t#Throttling gives h1 = h2 \t\t\t#enthalpy\n",
+ "h3 = 104.6; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n",
+ "#From the consideration that s3 = s4,\n",
+ "s3 = 0.2244; \t\t\t#Unit:Btu/(lbm*F) \t\t\t#s = entropy\n",
+ "h4 = 116.0; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n",
+ "print \"The heat extracted is %.2f Btu/lbm\"%(h3-h1);\n",
+ "print \"The work required is %.2f Btu/lbm\"%(h4-h3);\n",
+ "COP = (h3-h1)/(h4-h3); \t\t\t#Coefficient of performance\n",
+ "print \"The Coefficient of performanceCOP) of this ideal cycle is %.2f\"%(COP);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat extracted is 63.00 Btu/lbm\n",
+ "The work required is 11.40 Btu/lbm\n",
+ "The Coefficient of performanceCOP) of this ideal cycle is 5.53\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.10 Page No : 518"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "print \"Solution for a\";\n",
+ "#By defination,the efficiency of the compressor is the ratio of the ideal compression work to actual compression work.\n",
+ "#Based on the points on fig.10.12, \t\t\t#n = (h4-h3)/(h4'-h3);\n",
+ "#There is close correspondence between 5.3 psia and -60F for saturated conditions.Therefore,state 3 is a superheated vapour at 5.3 psia and approximately -20F,because the problem states\n",
+ "#that state 3 has a 40F superheat.Interpolation in the Freon tables in Appendix 3 yields\n",
+ "T = -20; \t\t\t#Unit:F \t\t\t#temperature\n",
+ "# p h s\n",
+ "#7.5 75.719 0.18371\n",
+ "#5.3 76.885 0.18985 h3 = 75.886 Btu/lbm\n",
+ "#5.0 75.990 0.19069\n",
+ "\n",
+ "#At 100 psia and s = 0.18985,\n",
+ "# t s h\n",
+ "# 170F 0.18996 100.571\n",
+ "# 169.6F 0.18985 100.5 h4 = 100.5 Btu/lbm\n",
+ "# 160F 0.18726 98.884\n",
+ "\n",
+ "#The weight of refrigerant is given by\n",
+ "# 200(tons)/(h3-h1) = (200*5)/(75.886-h1)\n",
+ "#In the saturated tables,h1 is\n",
+ "# p h \n",
+ "# 101.86 26.832\n",
+ "# 100psia 26.542\n",
+ "# 98.87 26.365\n",
+ "\n",
+ "#m = mass flow/min\n",
+ "h1 = 26.542; \t\t\t#enthalpy \t\t\t#Unit:Btu/lbm\n",
+ "n = 0.8; \t\t\t#Efficiency\n",
+ "h4 = 100.5; \t\t\t#enthalpy \t\t\t#Unit:Btu/lbm\n",
+ "h3 = 75.886; \t\t\t#enthalpy \t\t\t#Unit:Btu/lbm\n",
+ "m = (200*5)/(75.886-h1); \t\t\t#mass\n",
+ "h4dashminush3 = (h4-h3)/n; \n",
+ "#Total work of compression = m*(h4minush3)\n",
+ "J = 778; \t\t\t#J = Conversion factor\n",
+ "work = (h4dashminush3*m*J)/33000; \t\t\t#1 horsepower = 33,000 ft*LBf/min \t\t\t#Unit:hp \t\t\t#work\n",
+ "print \"%.2f horsepower is required to drive the compressor if it has a mechanical efficiency 100percentage\"%(work);\n",
+ "\n",
+ "print \"Solution for b\";\n",
+ "#Assuming a specific heat of the water as unity,we obtain\n",
+ "#From part (a),\n",
+ "#h4'-h3 = h4minush3\n",
+ "h4dash = h4dashminush3+h3; \t\t\t#Unit:Btu/lbm\n",
+ "mdot = (m*(h4dash-h1))/(70-60); \t\t\t#water enters at 60F and leaves at 70F \t\t\t#the required capacity in lbm/min\n",
+ "print \"%.2f lbm/min of cooling water i.e. %.2f gal/min is the required capacity of cooling water to pump\"%(mdot,mdot/8.3);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Solution for a\n",
+ "14.70 horsepower is required to drive the compressor if it has a mechanical efficiency 100percentage\n",
+ "Solution for b\n",
+ "162.35 lbm/min of cooling water i.e. 19.56 gal/min is the required capacity of cooling water to pump\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.11 Page No : 521"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "print \"Solution for a\";\n",
+ "#From appendix3,reading the p-h diagram directly,we have\n",
+ "h3 = 76.2; \t\t\t#Unit:Btu/lbm \t\t\t#Enthalpy\n",
+ "h4 = 100.5; \t\t\t#Unit:Btu/lbm \t\t\t#Enthalpy\n",
+ "n = 0.8; \t\t\t#Efficiency \t\t\t#From 10.10\n",
+ "work = (h4-h3)/n; \t\t\t#Work of compression \t\t\t#Unit:Btu/lbm\n",
+ "#The enthalpy of saturated liquid at 100 psia is given at 26.1 Btu/lbm.Proceeding as before yields\n",
+ "m = (200*5)/(h3-26.1); \t\t\t#Unit:lbm/min \t\t\t#m = massflow/min\n",
+ "J = 778; \t\t\t#J = Conversion factor\n",
+ "totalwork = (m*work*J)/33000; \t\t\t#1 horsepower = 33,000 ft*LBf/min \t\t\t#total ideal work \t\t\t#unit:hp\n",
+ "print \"Total ideal work of compression is %.2f hp\"%(totalwork);\n",
+ "\n",
+ "print \"Solution for b\";\n",
+ "h4dash = h3+work; \t\t\t#Btu/lbm\n",
+ "mdot = (m*(h4dash-26.5))/(70-60); \t\t\t#water enters at 60F and leaves at 70F \t\t\t#the required capacity in lbm/min\n",
+ "print \"%.2f lbm/min of cooling water i.e. %.2f gal/min is the required capacity of cooling water to pump\"%(mdot,mdot/8.3);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Solution for a\n",
+ "Total ideal work of compression is 14.29 hp\n",
+ "Solution for b\n",
+ "159.83 lbm/min of cooling water i.e. 19.26 gal/min is the required capacity of cooling water to pump\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.12 Page No : 526"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data\n",
+ "COP = 2.5; \t\t\t#Coefficient of performance\n",
+ "cp = 0.24; \t\t\t#Unit:Btu/(lbm*R) \t\t\t#Specific heat constant for constant pressure process\n",
+ "T1 = -100+460; \t\t\t#temperatures converted to absolute temperatures; \t\t\t#Unit:R \t\t\t#lowest temperature of the cycle\n",
+ "T3 = 150+460; \t\t\t#temperatures converted to absolute temperatures; \t\t\t#Unit:R \t\t\t#Upper temperature of the cycle\n",
+ "#T1/T4-T1 = COP\n",
+ "T4 = (3.5*T1)/COP; \t\t\t#Unit:R \t\t\t#temperature at point 4\n",
+ "#T2/T3-T2 = COP\n",
+ "T2 = (COP*T3)/3.5; \t\t\t#Unit:R \t\t\t#temperature at point 2\n",
+ "print \"The work of the expander is %.2f Btu/lbm of air\"%(cp*T4-T1);\n",
+ "print \"The work of the compressor is %.2f Btu/lbm of air\"%(cp*T3-T2);\n",
+ "print \"The net work required by the cycle is %.2f Btu/lbm\"%(((cp*T3-T2))-cp*(T4-T1));\n",
+ "print \"Per ton of refrigeration, the required airflow is %.2f lbm/min per ton\"%((200/cp*T2-T1))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The work of the expander is -239.04 Btu/lbm of air\n",
+ "The work of the compressor is -289.31 Btu/lbm of air\n",
+ "The net work required by the cycle is -323.87 Btu/lbm\n",
+ "Per ton of refrigeration, the required airflow is 362735.24 lbm/min per ton\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.13 Page No : 536"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#A VACUUM REFRIGERATION SYSTEM \n",
+ "#A vacuum refrigeration system is used to cool water from 90F to 45F\n",
+ "h1 = 58.07; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n",
+ "h2 = 13.04; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n",
+ "h3 = 1081.1; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n",
+ "m1 = 1; \t\t\t#mass \t\t\t#unit:lbm\n",
+ "#m2 = 1-m3 \t\t\t#unit:lbm\n",
+ "#Now, m1*h1 = m2*h2 + m3*h3\n",
+ "#Putting the values and arranging the equation,\n",
+ "m3 = (m1*h1-h2)/(h3+h2); \t\t\t#The mass of vapour that must be removed per pound \t\t\t#unit:lbm\n",
+ "\n",
+ "# results\n",
+ "print \"The mass of vapour that must be removed per pound of entering water is %.2f lbm\"%(m3);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass of vapour that must be removed per pound of entering water is 0.04 lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.14 Page No : 536"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#In problem 10.13,\n",
+ "#A VACUUM REFRIGERATION SYSTEM \n",
+ "#A vacuum refrigeration system is used to cool water from 90F to 45F\n",
+ "h1 = 58.07; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n",
+ "h2 = 13.04; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n",
+ "h3 = 1081.1; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n",
+ "m1 = 1; \t\t\t#mass \t\t\t#lbm\n",
+ "#m2 = 1-m3 \t\t\t#unit:lbm\n",
+ "#Now, m1*h1 = m2*h2 + m3*h3\n",
+ "#Putting the values and arranging the equation,\n",
+ "m3 = (m1*h1-h2)/(h3+h2); \t\t\t#The mass of vapour that must be removed per pound \t\t\t#unit:lbm\n",
+ "m2 = 1-m3; \t\t\t#mass \t\t\t#unit:lbm\n",
+ "print \"The mass of vapour that must be removed per pound of entering water is %.2f lbm\"%(m3);\n",
+ "#Now,in problem 10.14,\n",
+ "#The refrigeration effect can be determined as m3*(h3-h1) or m2*(h1-h2)\n",
+ "print \"The refrigeration effect Using eqn m3*h3-h1) is %.2f Btu/lbm\"%(m3*h3-h1)\n",
+ "print \"The refrigeration effect Using eqn m2*h1-h2) is %.2f Btu/lbm\"%(m2*h1-h2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass of vapour that must be removed per pound of entering water is 0.04 lbm\n",
+ "The refrigeration effect Using eqn m3*h3-h1) is -13.58 Btu/lbm\n",
+ "The refrigeration effect Using eqn m2*h1-h2) is 42.64 Btu/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.15 Page No : 539"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#THE HEAT PUMP\n",
+ "T1 = 70.+460; \t\t\t#70F = 70+460 R \t\t\t#Energy flows into the system at reservoir at constant temperature T1(unit:R) \t\t\t#from problem 10.1\n",
+ "T2 = 32+460; \t\t\t#32F = 32+460 R \t\t\t#Heat is rejected to the constant temperature T2(Unit:R) \t\t\t#from problem 10.1\n",
+ "COP = T1/(T1-T2); \t\t\t#Coefficient of performance for carnot heat pump\n",
+ "print \"Coefficient of performanceCOP) of the carnot cycle is %.2f\"%(COP);\n",
+ "print \"The COP can also be obtained from the energy items solved for in problem 10.1\"\n",
+ "#In problem 10.1, The power was found to be 77.2 Btu/min and the total tare of heat rejection was 1077.2 Btu/min\n",
+ "#Therefore,\n",
+ "print \"Coefficient of performanceCOP) of the cycle is %.2f\"%(1077.2/77.2); \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Coefficient of performanceCOP) of the carnot cycle is 13.95\n",
+ "The COP can also be obtained from the energy items solved for in problem 10.1\n",
+ "Coefficient of performanceCOP) of the cycle is 13.95\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.16 Page No : 539"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Let us first consider the cycle as a refrigeration cycle\n",
+ "#In problem 10.1\n",
+ "T1 = 70+460; \t\t\t#70F = 70+460 R \t\t\t#Energy flows into the system at reservoir at constant temperature T1(unit:R)\n",
+ "T2 = 0+460; \t\t\t#0F = 32+460 R \t\t\t#Heat is rejected to the constant temperature T2(Unit:R)\n",
+ "COP = T2/(T1-T2); \t\t\t#Coefficient of performance\n",
+ "print \"Coefficient of performanceCOP) of the cycle is %.2f\"%(COP);\n",
+ "Qremoved = 1000; \t\t\t#Unit:Btu/min \t\t\t#heat removal\n",
+ "WbyJ = Qremoved/COP; \t\t\t#the power input \t\t\t#unit:Btu/min\n",
+ "print \"The power input is %.2f Btu/min\"%(WbyJ);\n",
+ "Qrej = Qremoved+WbyJ; \t\t\t#The rate of heat rejected to the room \t\t\t#Unit:Btu/min\n",
+ "print \"The rate of heat rejected to the room is %.2f Btu/min\"%(Qrej);\n",
+ "print \"The COP as a heat pump is %.2f\"%(Qrej/WbyJ);\n",
+ "print \"As a check, COP of heat pump is %.2f = 1 + COP of carnot cycle %.2f\"%(Qrej/WbyJ,COP);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Coefficient of performanceCOP) of the cycle is 6.00\n",
+ "The power input is 166.00 Btu/min\n",
+ "The rate of heat rejected to the room is 1166.00 Btu/min\n",
+ "The COP as a heat pump is 7.00\n",
+ "As a check, COP of heat pump is 7.00 = 1 + COP of carnot cycle 6.00\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch11_1.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch11_1.ipynb
new file mode 100644
index 00000000..d0a50659
--- /dev/null
+++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch11_1.ipynb
@@ -0,0 +1,1390 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:bca14a59244f78cacc86ebeeb6d600dde8a0df0a85b519507569f4ae617ed968"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 11 : Heat Transfer"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.1 Page No : 553"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# given data\n",
+ "deltaX = 6./12; \t\t\t#6 inch = 6/12 feet \t\t\t#deltaX = length \t\t\t#unit:feet\n",
+ "k = 0.40; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n",
+ "T1 = 150; \t\t\t#temperature maintained at one face \t\t\t#fahrenheit\n",
+ "T2 = 80.; \t\t\t#tempetature maintained at other face \t\t\t#fahrenheit\n",
+ "\n",
+ "# calculations\n",
+ "deltaT = T2-T1; \t\t\t#fahrenheit \t\t\t#Change in temperature\n",
+ "Q = (-k*deltaT)/deltaX; \t\t\t#Heat transfer per square foot of wall \t\t\t#Unit:Btu/hr*ft**2\n",
+ "\n",
+ "# results\n",
+ "print \"Heat transfer per square foot of wall is %.2f Btu/hr*ft**2\"%(Q);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transfer per square foot of wall is 56.00 Btu/hr*ft**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.2 Page No : 553"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data\n",
+ "deltaX = 0.150; \t\t\t#Given,150 mm = 0.150 meter \t\t\t# \t\t\t#deltaX = length \t\t\t#Unit:meter\n",
+ "k = 0.692; \t\t\t#Unit:W/(m*celcius) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \n",
+ "T1 = 70; \t\t\t#temperature maintained at one face \t\t\t#celcius\n",
+ "T2 = 30; \t\t\t#tempetature maintained at other face \t\t\t#celcius\n",
+ "\n",
+ "# calculations\n",
+ "deltaT = T2-T1; \t\t\t#celcius \t\t\t#change in temperature\n",
+ "Q = (-k*deltaT)/deltaX; \t\t\t#Heat transfer per square foot of wall \t\t\t#unit:W/m**2\n",
+ "\n",
+ "# results\n",
+ "print \"Heat transfer per square foot of wall is %.2f W/m**2\"%(Q);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transfer per square foot of wall is 184.53 W/m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.3 Page No : 556"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#From example 11.1,\n",
+ "deltaX = 6./12; \t\t\t#6 inch = 6/12 feet \t\t\t#deltaX = length \t\t\t#unit:feet \n",
+ "A = 1; \t\t\t#area \t\t\t#ft**2\n",
+ "k = 0.40; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n",
+ "\n",
+ "Rt = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n",
+ "\n",
+ "#Q = deltaT/Rt \t\t\t#Q = heat transfer \t\t\t#ohm's law (fourier's equation)\n",
+ "#i = deltaE/Re \t\t\t#i = current in amperes \t\t\t#deltaE = The potential difference \t\t\t#Re = the electrical resistance \t\t\t#ohm's law\n",
+ "# Q/i = (deltaT/Rt)*(deltaE/Re)\n",
+ "#Q/i = 100; \t\t\t#Given \t\t\t# 1 A correspond to 100 Btu/(hr*ft**2)\n",
+ "deltaE = 9.; \t\t\t#Unit:Volt \t\t\t#potential difference\n",
+ "T1 = 150.; \t\t\t#temperature maintained at one face \t\t\t#fahrenheit\n",
+ "T2 = 80.; \t\t\t#tempetature maintained at other face \t\t\t#fahrenheit\n",
+ "deltaT = T2-T1; \t\t\t#fahrenheit \t\t\t#Change in temperature\n",
+ "Re = (100*deltaE*Rt)/deltaT; \t\t\t#Unit:Ohms \t\t\t#The electrical resistance needed\n",
+ "print \"The electrical resistance needed is %.2f ohms\"%(abs(Re));\n",
+ "i = deltaE/Re; \t\t\t#current \t\t\t#Unit:amperes\n",
+ "Q = 100*i; \t\t\t#Heat transfer per square foot of wall \t\t\t#Unit:Btu/hr*ft**2\n",
+ "print \"Heat transfer per square foot of wall is %.2f Btu/hr*ft**2\"%(abs(Q));\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The electrical resistance needed is 16.07 ohms\n",
+ "Heat transfer per square foot of wall is 56.00 Btu/hr*ft**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.4 Page No : 558"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#For Brick,\n",
+ "deltaX = 6./12; \t\t\t#6 inch = 6/12 feet \t\t\t#deltaX = length \t\t\t#unit:ft\n",
+ "A = 1.; \t\t\t#area \t\t\t#unit:ft**2\n",
+ "k = 0.40; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n",
+ "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n",
+ "print \"For brick\"\n",
+ "print \"The resistance is %.2f hr*F)/Btu\"%(R);\n",
+ "R1 = R;\n",
+ "\n",
+ "#For Concrete,\n",
+ "deltaX = (1./2)/12; \t\t\t#(1/2) inch = (1/2)/12 feet \t\t\t#deltaX = length \t\t\t#unit:ft\n",
+ "A = 1; \t\t\t#area \t\t\t#ft**2\n",
+ "k = 0.80; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n",
+ "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n",
+ "print \"For Concrete\"\n",
+ "print \"The resistance is %.2f hr*F)/Btu\"%(R);\n",
+ "R2 = R;\n",
+ "\n",
+ "#For plaster,\n",
+ "deltaX = (1./2)/12; \t\t\t# (1/2) inch = 6/12 feet \t\t\t#deltaX = length \t\t\t#unit:ft\n",
+ "A = 1; \t\t\t#area \t\t\t#ft**2\n",
+ "k = 0.30; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n",
+ "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n",
+ "print \"For plaster\"\n",
+ "print \"The resistance is %.2f hr*F)/Btu\"%(R);\n",
+ "R3 = R;\n",
+ "\n",
+ "Rot = R1+R2+R3; \t\t\t#Rot = The overall resistance \t\t\t#unit:(hr*F)/Btu\n",
+ "print \"The overall resistance is %.2f hr*F)/Btu\"%(Rot);\n",
+ "T1 = 70.; \t\t\t#temperature maintained at one face \t\t\t#fahrenheit \n",
+ "T2 = 30; \t\t\t#tempetature maintained at other face \t\t\t#fahrenheit \n",
+ "deltaT = T2-T1; \t\t\t#fahrenheit \t\t\t#Change in temperature\n",
+ "Q = deltaT/Rot; \t\t\t#Q = Heat transfer \t\t\t#Unit:Btu/(hr*ft**2); \t\t\t#ohm's law (fourier's equation)\n",
+ "print \"Heat transfer per square foot of wall is %.2f Btu/hr*ft**2\"%(abs(Q));\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For brick\n",
+ "The resistance is 1.25 hr*F)/Btu\n",
+ "For Concrete\n",
+ "The resistance is 0.05 hr*F)/Btu\n",
+ "For plaster\n",
+ "The resistance is 0.14 hr*F)/Btu\n",
+ "The overall resistance is 1.44 hr*F)/Btu\n",
+ "Heat transfer per square foot of wall is 27.76 Btu/hr*ft**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.5 Page No : 558"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "print \"In problem 11.4\"\n",
+ "#From example 11.4,,,\n",
+ "#For Brick,\n",
+ "deltaX = 6./12; \t\t\t#6 inch = 6/12 feet \t\t\t#deltaX = length \t\t\t#unit:ft\n",
+ "A = 1; \t\t\t#area \t\t\t#unit:ft**2\n",
+ "k = 0.40; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n",
+ "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n",
+ "print \"For brick\"\n",
+ "print \"The resistance is %.2f hr*F)/Btu\"%(R);\n",
+ "R1 = R;\n",
+ "\n",
+ "#For Concrete,\n",
+ "deltaX = (1./2)/12; \t\t\t#(1/2) inch = (1/2)/12 feet \t\t\t#deltaX = length \t\t\t#unit:ft\n",
+ "A = 1; \t\t\t#area \t\t\t#ft**2\n",
+ "k = 0.80; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n",
+ "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n",
+ "print \"For Concrete\"\n",
+ "print \"The resistance is %.2f hr*F)/Btu\"%(R);\n",
+ "R2 = R;\n",
+ "\n",
+ "#For plaster,\n",
+ "deltaX = (1./2)/12; \t\t\t# (1/2) inch = 6/12 feet \t\t\t#deltaX = length \t\t\t#unit:ft\n",
+ "A = 1; \t\t\t#area \t\t\t#ft**2\n",
+ "k = 0.30; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n",
+ "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n",
+ "print \"For plaster\"\n",
+ "print \"The resistance is %.2f hr*F)/Btu\"%(R);\n",
+ "R3 = R;\n",
+ "\n",
+ "Rot = R1+R2+R3; \t\t\t#Rot = The overall resistance \t\t\t#unit:(hr*F)/Btu\n",
+ "print \"The overall resistance is %.2f hr*F)/Btu\"%(Rot);\n",
+ "T1 = 70; \t\t\t#temperature maintained at one face \t\t\t#fahrenheit \n",
+ "T2 = 30; \t\t\t#tempetature maintained at other face \t\t\t#fahrenheit \n",
+ "deltaT = T2-T1; \t\t\t#fahrenheit \t\t\t#Change in temperature\n",
+ "Q = deltaT/Rot; \t\t\t#Q = Heat transfer \t\t\t#Unit:Btu/(hr*ft**2);\n",
+ "print \"Heat transfer per square foot of wall is %.2f Btu/hr*ft**2\"%(abs(Q));\n",
+ "\n",
+ "print \"Now in problem 11.5\"\n",
+ "deltaT = R*Q \t\t\t#ohm's law (fourier's equation) \t\t\t#Change in temperature \t\t\t#fahrenheit\n",
+ "#For Brick,\n",
+ "deltaT = Q*R1; \t\t\t#Unit:fahrenheit \t\t\t#ohm's law (fourier's equation) \t\t\t#Change in temperature\n",
+ "t1 = deltaT;\n",
+ "#For Concrete,\n",
+ "deltaT = Q*R2; \t\t\t#Unit:fahrenheit \t\t\t#ohm's law (fourier's equation) \t\t\t#Change in temperature\n",
+ "t2 = deltaT;\n",
+ "#For plaster,\n",
+ "deltaT = Q*R3; \t\t\t#Unit:fahrenheit \t\t\t#ohm's law (fourier's equation) \t\t\t#Change in temperature\n",
+ "t3 = deltaT;\n",
+ "\n",
+ "deltaTo = t1+t2+t3; \t\t\t#Overall Change in temperature \t\t\t#fahrenheit\n",
+ "print \"The overall change in temperature is %.2f F\"%(abs(deltaTo));\n",
+ "#The interface temperature are:\n",
+ "print \"The interface temperature are:\";\n",
+ "print \"For brick-concrete : %.2f fahrenheit\"%(abs(T2)+abs(t1));\n",
+ "print \"For concrete-plaster : %.2f fahrenheit\"%(abs(T2)+abs(t1)+abs(t2));\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "In problem 11.4\n",
+ "For brick\n",
+ "The resistance is 1.25 hr*F)/Btu\n",
+ "For Concrete\n",
+ "The resistance is 0.05 hr*F)/Btu\n",
+ "For plaster\n",
+ "The resistance is 0.14 hr*F)/Btu\n",
+ "The overall resistance is 1.44 hr*F)/Btu\n",
+ "Heat transfer per square foot of wall is 27.76 Btu/hr*ft**2\n",
+ "Now in problem 11.5\n",
+ "The overall change in temperature is 40.00 F\n",
+ "The interface temperature are:\n",
+ "For brick-concrete : 64.70 fahrenheit\n",
+ "For concrete-plaster : 66.14 fahrenheit\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.6 Page No : 559"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#For Brick,\n",
+ "deltaX = 0.150; \t\t\t#Unit:m \t\t\t#150 mm = 0.150 m \t\t\t#deltaX = length \t\t\t#unit:meter\n",
+ "A = 1; \t\t\t#area \t\t\t#unit:m**2\n",
+ "k = 0.692; \t\t\t#Unit:W/(m*C) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n",
+ "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:C/W\n",
+ "print \"For brick\"\n",
+ "print \"The resistance is %.2f Celcius/W\"%(R);\n",
+ "R1 = R;\n",
+ "\n",
+ "#For Concrete,\n",
+ "deltaX = 0.012; \t\t\t#Unit:m \t\t\t#12 mm = 0.0120 m \t\t\t#deltaX = length \t\t\t#unit:meter\n",
+ "A = 1; \t\t\t#area \t\t\t#unit:m**2\n",
+ "k = 1.385; \t\t\t#Unit:W/(m*C) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n",
+ "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:C/W\n",
+ "print \"For Concrete\"\n",
+ "print \"The resistance is %.2f Celcius/W\"%(R);\n",
+ "R2 = R;\n",
+ "\n",
+ "#For plaster,\n",
+ "deltaX = 0.0120; \t\t\t#Unit:m \t\t\t#12 mm = 0.0120 m \t\t\t#deltaX = length \t\t\t#unit:meter\n",
+ "A = 1; \t\t\t#area \t\t\t#unit:m**2\n",
+ "k = 0.519; \t\t\t#Unit:W/(m*C) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n",
+ "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:C/W\n",
+ "print \"For plaster\"\n",
+ "print \"The resistance is %.2f Celcius/W\"%(R);\n",
+ "R3 = R;\n",
+ "\n",
+ "Ro = R1+R2+R3; \t\t\t#Rot = The overall resistance \t\t\t#unit:C/W\n",
+ "print \"The overall resistance is %.2f Celcius/W\"%(Ro);\n",
+ "T1 = 0; \t\t\t#temperature maintained at one face \t\t\t#Celcius\n",
+ "T2 = 20; \t\t\t#tempetature maintained at other face \t\t\t#Celcius\n",
+ "deltaT = T2-T1; \t\t\t#Change in temperature \t\t\t#Celcius\n",
+ "Q = deltaT/Ro; \t\t\t#Q = Heat transfer \t\t\t#Unit:W/m**2; \t\t\t#ohm's law (fourier's equation)\n",
+ "print \"Heat transfer per square meter of wall is %.2f W/m**2\"%(abs(Q));\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For brick\n",
+ "The resistance is 0.22 Celcius/W\n",
+ "For Concrete\n",
+ "The resistance is 0.01 Celcius/W\n",
+ "For plaster\n",
+ "The resistance is 0.02 Celcius/W\n",
+ "The overall resistance is 0.25 Celcius/W\n",
+ "Heat transfer per square meter of wall is 80.47 W/m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.7 Page No : 560"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "print \"In problem 11.6\"\n",
+ "#For Brick,\n",
+ "deltaX = 0.150; \t\t\t#Unit:m \t\t\t#150 mm = 0.150 m \t\t\t#deltaX = length \t\t\t#unit:meter\n",
+ "A = 1; \t\t\t#area \t\t\t#unit:meter**2\n",
+ "k = 0.692; \t\t\t#Unit:W/(m*C) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n",
+ "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:Celcius/W\n",
+ "print \"For brick\"\n",
+ "print \"The resistance is %.2f Celcius/W\"%(R);\n",
+ "R1 = R;\n",
+ "\n",
+ "#For Concrete,\n",
+ "deltaX = 0.012; \t\t\t#Unit:m \t\t\t#12 mm = 0.0120 m \t\t\t#deltaX = length \t\t\t#unit:meter\n",
+ "A = 1; \t\t\t#area \t\t\t#unit:meter**2\n",
+ "k = 1.385; \t\t\t#Unit:W/(m*C) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n",
+ "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:Celcius/W\n",
+ "print \"For Concrete\"\n",
+ "print \"The resistance is %.2f Celcius/W\"%(R);\n",
+ "R2 = R;\n",
+ "\n",
+ "#For plaster,\n",
+ "deltaX = 0.0120; \t\t\t#Unit:m \t\t\t#12 mm = 0.0120 m \t\t\t#deltaX = length \t\t\t#unit:meter\n",
+ "A = 1; \t\t\t#area \t\t\t#unit:meter**2\n",
+ "k = 0.519; \t\t\t#Unit:W/(m*C) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n",
+ "R = deltaX/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:Celcius/W\n",
+ "print \"For plaster\"\n",
+ "print \"The resistance is %.2f Celcius/W\"%(R);\n",
+ "R3 = R;\n",
+ "\n",
+ "Ro = R1+R2+R3; \t\t\t#Rot = The overall resistance Celcius/W\n",
+ "print \"The overall resistance is %.2f Celcius/W\"%(Ro);\n",
+ "T1 = 0; \t\t\t#temperature maintained at one face \t\t\t#Celcius\n",
+ "T2 = 20; \t\t\t#tempetature maintained at other face \t\t\t#Celcius\n",
+ "deltaT = T2-T1; \t\t\t#Change in temperature \t\t\t#Celcius\n",
+ "Q = deltaT/Ro; \t\t\t#Q = Heat transfer \t\t\t#Unit:W/m**2;\n",
+ "print \"Heat transfer per square meter of wall is %.2f W/m**2\"%(abs(Q));\n",
+ "\n",
+ "print \"Now in problem 11.5\"\n",
+ "#deltaT = R*Q \t\t\t#ohm's law (fourier's equation)\n",
+ "#For Brick,\n",
+ "deltaT = Q*R1; \t\t\t#Unit:Celcius \t\t\t#Change in temperature\n",
+ "t1 = deltaT;\n",
+ "#For Concrete,\n",
+ "deltaT = Q*R2; \t\t\t#Unit:Celcius \t\t\t#Change in temperature\n",
+ "t2 = deltaT;\n",
+ "#For plaster,\n",
+ "deltaT = Q*R3; \t\t\t#Unit:Celcius \t\t\t#Change in temperature\n",
+ "t3 = deltaT;\n",
+ "\n",
+ "deltaTo = t1+t2+t3; \t\t\t#The overall Change in temperature \t\t\t#Celcius\n",
+ "print \"The overall change in temperature is %.2f celcius\"%(abs(deltaTo));\n",
+ "#The interface temperature are:\n",
+ "print \"The interface temperature are:\";\n",
+ "print \"%.2f Celcius\"%(abs(deltaTo)-abs(t1));\n",
+ "print \"%.2f Celcius\"%(abs(deltaTo)-abs(t1)-abs(t2));\n",
+ "print \"%.2f Celcius\"%(abs(deltaTo)-abs(t1)-abs(t2)-abs(t3));\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "In problem 11.6\n",
+ "For brick\n",
+ "The resistance is 0.22 Celcius/W\n",
+ "For Concrete\n",
+ "The resistance is 0.01 Celcius/W\n",
+ "For plaster\n",
+ "The resistance is 0.02 Celcius/W\n",
+ "The overall resistance is 0.25 Celcius/W\n",
+ "Heat transfer per square meter of wall is 80.47 W/m**2\n",
+ "Now in problem 11.5\n",
+ "The overall change in temperature is 20.00 celcius\n",
+ "The interface temperature are:\n",
+ "2.56 Celcius\n",
+ "1.86 Celcius\n",
+ "-0.00 Celcius\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.8 Page No : 561"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy.linalg import inv\n",
+ "\n",
+ "deltaX = 4./12; \t\t\t#4 inch = 6/12 feet \t\t\t#deltaX = length \t\t\t#unit:ft\n",
+ "A = 7*2.; \t\t\t#area \t\t\t#area = hight*width \t\t\t#unit:ft**2\n",
+ "k = 0.090; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity for fir \t\t\t#From the table\n",
+ "Rfir = deltaX/(k*A); \t\t\t#Resistance of fir \t\t\t#Unit:(hr*F)/Btu\n",
+ "print \"For fir\"\n",
+ "print \"The resistance is %.2f hr*F)/Btu\"%(Rfir);\n",
+ "\n",
+ "deltaX = 4./12; \t\t\t#4 inch = 6/12 feet \t\t\t#deltaX = length \t\t\t#unit:ft\n",
+ "A = 7*2; \t\t\t#area \t\t\t#area = hight*width \t\t\t#unit:ft**2\n",
+ "k = 0.065; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity for pine \t\t\t#From the table\n",
+ "Rpine = deltaX/(k*A); \t\t\t#Resistance of pine \t\t\t#Unit:(hr*F)/Btu\n",
+ "print \"For pine\"\n",
+ "print \"The resistance is %.2f hr*F)/Btu\"%(Rpine);\n",
+ "\n",
+ "deltaX = 4./12; \t\t\t#4 inch = 6/12 feet \t\t\t#deltaX = length \t\t\t#unit:ft\n",
+ "A = 7*2; \t\t\t#area \t\t\t#area = hight*width \t\t\t#unit:ft**2\n",
+ "k = 0.025; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity for corkboard \t\t\t#From the table\n",
+ "Rcorkboard = deltaX/(k*A); \t\t\t#Resistance of corkboard \t\t\t#Unit:(hr*F)/Btu\n",
+ "print \"For corkboard\"\n",
+ "print \"The resistance is %.2f hr*F)/Btu\"%(Rcorkboard);\n",
+ "\n",
+ "Roverall = inv([[inv([[Rfir]])+inv([[Rpine]])+inv([[Rcorkboard]])]]);\n",
+ "print \"The overall resistance is %.2f hr*F)/Btu\"%(Roverall);\n",
+ "\n",
+ "T1 = 60.; \t\t\t#temperature maintained at one face \t\t\t#unit:fahrenheit\n",
+ "T2 = 80.; \t\t\t#tempetature maintained at other face \t\t\t#unit:fahrenheit\n",
+ "deltaT = T2-T1; \t\t\t#Change in temperature \t\t\t#unit:fahrenheit\n",
+ "Qtotal = deltaT/Roverall; \t\t\t#Q = Total Heat loss \t\t\t#Unit:Btu/hr; \t\t\t#ohm's law (fourier's equation)\n",
+ "print \"Total Heat loss from the wall is %.2f Btu/hr\"%(abs(Qtotal));\n",
+ "\n",
+ "#As a check,\n",
+ "Qfir = deltaT/Rfir; \t\t\t#Q = Fir Heat loss \t\t\t#Unit:Btu/hr; \t\t\t#ohm's law (fourier's equation)\n",
+ "print \"Heat loss from the wall made of fir is %.2f Btu/hr\"%(abs(Qfir));\n",
+ "Qpine = deltaT/Rpine; \t\t\t#Q = Pine Heat loss \t\t\t#Unit:Btu/hr; \t\t\t#ohm's law (fourier's equation)\n",
+ "print \"Heat loss from the wall made of pine is %.2f Btu/hr\"%(abs(Qpine));\n",
+ "Qcorkboard = deltaT/Rcorkboard; \t\t\t#Q = corkboard Heat loss \t\t\t#Unit:Btu/hr; \t\t\t#ohm's law (fourier's equation)\n",
+ "print \"Heat loss from the wall made of corkboard is %.2f Btu/hr\"%(abs(Qcorkboard));\n",
+ "Qtotal = Qfir+Qpine+Qcorkboard; \t\t\t#Total Heat loss from the wall \t\t\t#unit:Btu/hr\n",
+ "print \"Total Heat loss from the wall is %.2f Btu/hr\"%(abs(Qtotal));\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For fir\n",
+ "The resistance is 0.26 hr*F)/Btu\n",
+ "For pine\n",
+ "The resistance is 0.37 hr*F)/Btu\n",
+ "For corkboard\n",
+ "The resistance is 0.95 hr*F)/Btu\n",
+ "The overall resistance is 0.13 hr*F)/Btu\n",
+ "Total Heat loss from the wall is 151.20 Btu/hr\n",
+ "Heat loss from the wall made of fir is 75.60 Btu/hr\n",
+ "Heat loss from the wall made of pine is 54.60 Btu/hr\n",
+ "Heat loss from the wall made of corkboard is 21.00 Btu/hr\n",
+ "Total Heat loss from the wall is 151.20 Btu/hr\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.9 Page No : 565"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#A bare steel pipe\n",
+ "ro = 3.50; \t\t\t#Outside diameter \t\t\t#Unit:in.\n",
+ "ri = 3.00; \t\t\t#inside diameter \t\t\t#Unit:in.\n",
+ "Ti = 240; \t\t\t#Inside temperature \t\t\t#unit:fahrenheit\n",
+ "To = 120; \t\t\t#Outside temperature \t\t\t#unit:fahrenheit\n",
+ "L = 5; \t\t\t#Length \t\t\t#Unit:ft\n",
+ "deltaT = Ti-To; \t\t\t#Change in temperature \t\t\t#unit:fahrenheit\n",
+ "k = 26 \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity\n",
+ "\n",
+ "# Calculations\n",
+ "Q = (2*math.pi*k*L*deltaT)/math.log(ro/ri); \t\t\t#The heat loss from the pipe \t\t\t#unit:Btu/hr\n",
+ "\n",
+ "# Results\n",
+ "print \"The heat loss from the pipe is %.2f Btu/hr\"%(Q);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat loss from the pipe is 635856.36 Btu/hr\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.10 Page No : 566"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#A bare steel pipe\n",
+ "ro = 90.; \t\t\t#Outside diameter \t\t\t#Unit:mm\n",
+ "ri = 75; \t\t\t#inside diameter \t\t\t#Unit:mm\n",
+ "Ti = 110; \t\t\t#Inside temperature \t\t\t#Unit:Celcius\n",
+ "To = 40; \t\t\t#Outside temperature \t\t\t#Unit:Celcius\n",
+ "L = 2; \t\t\t#Length \t\t\t#Unit:m\n",
+ "\n",
+ "# Calculations\n",
+ "deltaT = Ti-To; \t\t\t#Change in temperature \t\t\t#Unit:Celcius\n",
+ "k = 45 \t\t\t#Unit:W/(m*C) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity\n",
+ "Q = (2*math.pi*k*L*deltaT)/math.log(ro/ri); \t\t\t#The heat loss from the pipe \t\t\t#unit:W\n",
+ "\n",
+ "# Results\n",
+ "print \"The heat loss from the pipe is %.2f W\"%(Q);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat loss from the pipe is 217111.28 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.11 Page No : 567"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "from numpy.linalg import inv\n",
+ "\n",
+ "#From problem 11.9,\n",
+ "#A bare steel pipe\n",
+ "r2 = 3.50; \t\t\t#Outside diameter \t\t\t#Unit:in.\n",
+ "r1 = 3.00; \t\t\t#inside diameter \t\t\t#Unit:in.\n",
+ "Ti = 240; \t\t\t#Inside temperature \t\t\t#unit:fahrenheit\n",
+ "L = 5; \t\t\t#Length \t\t\t#Unit:ft\n",
+ "k1 = [[26]]; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity\n",
+ "ans1 = (inv(k1)*math.log(r2/r1));\n",
+ "\n",
+ "#Now,in problem 11.11,\n",
+ "#Mineral wool\n",
+ "r3 = 5.50; \t\t\t#inside diameter \t\t\t#Unit:in.\n",
+ "r2 = 3.50; \t\t\t#outside diameter \t\t\t#Unit:in.\n",
+ "To = 85; \t\t\t#Outside temperature \t\t\t#unit:fahrenheit\n",
+ "deltaT = Ti-To; \t\t\t#Change in temperature \t\t\t#unit:fahrenheit\n",
+ "k2 = [[0.026]] \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity\n",
+ "ans2 = (inv(k2)*math.log(r3/r2));\n",
+ "\n",
+ "Q = (2*math.pi*L*deltaT)/(ans1+ans2); \t\t\t#The heat loss from the pipe \t\t\t#unit:Btu/hr\n",
+ "\n",
+ "# Results\n",
+ "print \"The heat loss from the pipe is %.2f Btu/hr\"%(Q);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat loss from the pipe is 280.02 Btu/hr\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.12 Page No : 569"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "from numpy.linalg import inv\n",
+ "\n",
+ "#From problem 11.9,\n",
+ "#The bare pipe\n",
+ "r2 = 3.50; \t\t\t#Outside diameter \t\t\t#Unit:in.\n",
+ "r1 = 3.00; \t\t\t#inside diameter \t\t\t#Unit:in.\n",
+ "Ti = 240.; \t\t\t#Inside temperature \t\t\t#unit:fahrenheit\n",
+ "L = 5.; \t\t\t#Length \t\t\t#Unit:ft\n",
+ "k = 26.; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity\n",
+ "Rpipe = math.log(r2/r1)/(2*math.pi*k*L); \t\t\t#the resistance of pipe \t\t\t#Unit:(hr*F)/Btu\n",
+ "print \"The resistance of pipe is %.5f hr*F)/Btu\"%(Rpipe);\n",
+ "\n",
+ "#Now,in problem 11.12,\n",
+ "To = 70; \t\t\t#Outside temperature \t\t\t#unit:fahrenheit\n",
+ "deltaT = Ti-To; \t\t\t#Change in temperature \t\t\t#unit:fahrenheit\n",
+ "h = 0.9; \t\t\t#Coefficient of heat transfer \t\t\t#Unit:Btu/(hr*ft**2*F)\n",
+ "A = (math.pi*r2)/12*L; \t\t\t#Area \t\t\t#Unit:ft**2 \t\t\t#1 inch = 1/12 feet \t\t\t#unit:ft**2\n",
+ "Rconvection = inv([[h*A]]); \t\t\t#The resistance due to natural convection to the surrounding air \t\t\t#Unit:(hr*F)/Btu\n",
+ "print \"The resistance due to natural convection to the surrounding air is %.2f hr*F)/Btu\"%(Rconvection);\n",
+ "\n",
+ "Rtotal = Rpipe+Rconvection; \t\t\t#The total resistance \t\t\t#unit:(hr*F)/Btu\n",
+ "print \"The total resistance is %.2f hr*F)/Btu\"%(Rtotal);\n",
+ "Q = deltaT/Rtotal; \t\t\t#ohm's law (fourier's equation) \t\t\t#The heat transfer from the pipe to the surrounding air \t\t\t#unit:Btu/hr\n",
+ "print \"The heat transfer from the pipe to the surrounding air is %.2f Btu/hr\"%(Q);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resistance of pipe is 0.00019 hr*F)/Btu\n",
+ "The resistance due to natural convection to the surrounding air is 0.24 hr*F)/Btu\n",
+ "The total resistance is 0.24 hr*F)/Btu\n",
+ "The heat transfer from the pipe to the surrounding air is 700.42 Btu/hr\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.15 Page No : 574"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# given data\n",
+ "D = 3.5/12; \t\t\t#3.5 inch = 3.5/12 feet\t\t\t#Unit:ft \t\t\t#Outside diameter\n",
+ "Ti = 120; \t\t\t#Inside temperature \t\t\t#unit:fahrenheit\n",
+ "To = 70; \t\t\t#Outside temperature \t\t\t#unit:fahrenheit\n",
+ "deltaT = Ti-To; \t\t\t#unit:fahrenheit \t\t\t#Change in temperature\n",
+ "h = 0.9; \t\t\t#Coefficient of heat transfer \t\t\t#Unit:Btu/(hr*ft**2*F)\n",
+ "L = 5; \t\t\t#Length \t\t\t#Unit:ft \t\t\t#From problem 11.10\n",
+ "A = (math.pi*D)*L; \t\t\t#Area \t\t\t#Unit:ft**2 \n",
+ "Q = h*A*deltaT; \t\t\t#The heat loss due to convection \t\t\t#Unit:Btu/hr \t\t\t#Newton's law of cooling\n",
+ "\n",
+ "# Results\n",
+ "print \"The heat loss due to convection is %.2f Btu/hr\"%(Q);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat loss due to convection is 206.17 Btu/hr\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.16 Page No : 575"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy.linalg import inv\n",
+ "\n",
+ "#This problem can not be solved directly,because the individual film resistances aree functions of unknown temperature differences.Therefore,\n",
+ "#From the first approximation,\n",
+ "h = 1./2; \t\t\t#Coefficient of heat transfer \t\t\t#unit:Btu/(hr*ft**2*F)\n",
+ "#For area 1 ft**2,\n",
+ "R = (3./12)/0.07; \t\t\t#The wall resistance is deltax/(k*A) \t\t\t#k = 0.07 \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity\n",
+ "Roverall = inv([[1./2]])+inv([[1./2]])+R; \t\t\t#the overall series resistance \t\t\t#Unit:Btu/(hr*ft*F)\n",
+ "print \"For h = 0.5, the overall series resistance is %.2f Btu/hr*ft*F)\"%(Roverall);\n",
+ "#Using the value of Roverall,we can now obtain Q and individual temperature differences,\n",
+ "Ti = 80.; \t\t\t#warm air temperature \t\t\t#unit:fahrenheit\n",
+ "To = 50; \t\t\t#cold air temperature \t\t\t#unit:fahrenheit\n",
+ "deltaT = Ti-To; \t\t\t#unit:fahrenheit \t\t\t#Change in temperature\n",
+ "Q = deltaT/Roverall; \t\t\t#Unit:Btu/(hr*ft**2) \t\t\t#heat transfer \t\t\t#ohm's law (fourier's equation)\n",
+ "print \"For h = 0.5, heat transfer is %.2f Btu/hr*ft**2)\"%(Q);\n",
+ "print \"For h = 0.5\"\n",
+ "#deltaT through the hot air film is Q/(1/2)\n",
+ "print \"Temperaure difference through the hot air film is %.2f F\"%(Q/1./2);\n",
+ "#Throught the wall deltaT is R*Q\n",
+ "print \"Temperaure difference through the wall is %.2f F\"%(Q*R);\n",
+ "#deltaT through the cold air film is Q/(1/2)\n",
+ "print \"Temperaure difference through the cold air film is %.2f F\"%(Q/1./2);\n",
+ "\n",
+ "#With these temperature differences,we can now enter figures 11.12 and 11.14 to verify our approximation.From figure 11.14,we find h = 0.42 Btu/(hr*ft*2*F)\n",
+ "#Using h = 0.42,we have for the overall resistance (1/0.42)+(1/0.42)+R\n",
+ "h = [[0.42]]; \t\t\t#Coefficient of heat transfer \t\t\t#unit:Btu/(hr*ft**2*F)\n",
+ "Roverall = inv(h)+inv(h)+R; \t\t\t#the overall series resistance \t\t\t#Unit:Btu/(hr*ft*F)\n",
+ "print \"For h = 0.42, the overall series resistance is %.2f Btu/hr*ft*F)\"%(Roverall);\n",
+ "Q = deltaT/Roverall; \t\t\t#Unit:Btu/(hr*ft**2) \t\t\t#heat transfer \t\t\t#ohm's law (fourier's equation)\n",
+ "print \"For h = 0.42, heat transfer is %.2f Btu/hr*ft**2)\"%(Q);\n",
+ "print \"For h = 0.42\"\n",
+ "# deltat through both air films is Q/h\n",
+ "print \"Temperaure difference through the hot and cold air film is %.2f F\"%(Q/h);\n",
+ "#and through the wall,deltat is Q*R\n",
+ "print \"Temperaure difference through the wall is %.2f F\"%(Q*R);\n",
+ "\n",
+ "#Entering figure 11.14,we find that h stays essentially 0.42,and our solution is that the heat flow is Q,the \"hot\" side of the wall is at Ti-(Q/h),the \"cold\" side is at To+(Q/h) ,and temperature drop in the wall is Ti-(Q/h)-(To+(Q/h)).\n",
+ "print \"The temperature drop on the hot side of the wall is %.2f F\"%(Ti-Q/h)\n",
+ "print \"The temperature drop on the cold side of the wall is %.2f F\"%(To+Q/h)\n",
+ "print \"The temperature drop in the wall is %.2f F\"%(((Ti-Q/h)-To+Q/h));\n",
+ "#Which checks our wall deltat calculation.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For h = 0.5, the overall series resistance is 7.57 Btu/hr*ft*F)\n",
+ "For h = 0.5, heat transfer is 3.96 Btu/hr*ft**2)\n",
+ "For h = 0.5\n",
+ "Temperaure difference through the hot air film is 1.98 F\n",
+ "Temperaure difference through the wall is 14.15 F\n",
+ "Temperaure difference through the cold air film is 1.98 F\n",
+ "For h = 0.42, the overall series resistance is 8.33 Btu/hr*ft*F)\n",
+ "For h = 0.42, heat transfer is 3.60 Btu/hr*ft**2)\n",
+ "For h = 0.42\n",
+ "Temperaure difference through the hot and cold air film is 8.57 F\n",
+ "Temperaure difference through the wall is 12.86 F\n",
+ "The temperature drop on the hot side of the wall is 71.43 F\n",
+ "The temperature drop on the cold side of the wall is 58.57 F\n",
+ "The temperature drop in the wall is 30.00 F\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.17 Page No : 578"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#The first step is to check Reynolds number.It will be recalled that the Reynolds number is given by (D*V*rho)/mu and is dimensionless.Therefore,we can use D, diameter in feet;V velocity in ft/hr;rho density in lbm/ft**3 and mu vismath.cosity in lbm/(ft*hr).\n",
+ "#Alternatively,the Reynolds number is given by (D*G)/mu,where G is the mass flow rate per unit area (lbm/(hr*ft**2)).\n",
+ "G = ((20*60)*(4*144)/(math.pi*0.87**2)); \t\t\t#Unit:lbm/(hr*ft**2) \t\t\t#Inside diameter = 0.87 inch \t\t\t#\t\t\t#1 in.**2 = 144 ft**2 \t\t\t#20 lbm/min of water(min converted to second)\n",
+ "#the vismath.cosity of air at these conditions is obtained from figure 11.17 as 0.062 lbm/(ft*hr).So,\n",
+ "mu = 0.33; \t\t\t#the vismath.cosity of air \t\t\t#unit:lbm/(ft*hr)\n",
+ "D = 0.87/12; \t\t\t#Inside diameter \t\t\t#1 in**2 = 144 ft**2\n",
+ "#Therefore Reynolds number is \n",
+ "Re = (D*G)/mu; \t\t\t#Reynolds number\n",
+ "#which is well into the turbulent flow regime.\n",
+ "print \"The Reynolds number is %.2f\"%(Re);\n",
+ "#The next step is to enter Figure 11.18 at W/1000 of 20*(60/1000) = 1.2 and 400F to obtain h1 = 630.\n",
+ "#From the figure 11.20,we obtain F = 1.25 for an inside diameter of 0.87 inch.So,\n",
+ "h1 = 630; \t\t\t#basic heat transfer coefficient \t\t\t#unit:Btu/(hr*ft**2*F)\n",
+ "F = 1.25; \t\t\t#correction factor\n",
+ "h = h1*F; \t\t\t#heat transfer coefficient \t\t\t#the inside film coefficient \t\t\t#unit:Btu/(hr*ft**2*F)\n",
+ "print \"The heat-transfer coefficient is %.2f Btu/hr*ft**2*F)\"%(h);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Reynolds number is 63861.54\n",
+ "The heat-transfer coefficient is 787.50 Btu/hr*ft**2*F)\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.18 Page No : 579"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#We first check the Reynolds number and note that G is same as for problem 11.17.So,\n",
+ "#G is the mass flow rate per unit area (lbm/(hr*ft**2)).\n",
+ "G = ((20*60)*(4*144))/(math.pi*(0.87**2)); \t\t\t#Unit:lbm/(hr*ft**2) \t\t\t#Inside diameter = 0.87 inch \t\t\t#\t\t\t#1 in.**2 = 144 ft**2 \t\t\t#20 lbm/min of water(min converted to second)\n",
+ "#the vismath.cosity of air at these conditions is obtained from figure 11.17 as 0.062 lbm/(ft*hr).So,\n",
+ "mu = 0.062; \t\t\t#the vismath.cosity of air \t\t\t#unit:lbm/(ft*hr)\n",
+ "D = 0.87/12; \t\t\t#Inside diameter \t\t\t#1 in**2 = 144 ft**2\n",
+ "#Reynolds number is DG/mu,therefore \n",
+ "Re = (D*G)/mu; \t\t\t#Reynolds number\n",
+ "print \"The Reynolds number is %.2f\"%(Re);\n",
+ "#which places the flow in the turbulent regime.Because W/1000(W = weight flow) is same as for problem 11.17 and equals 1.2,we now enter figure 11.19 at 1.2 and 400F to obtain h1 = 135.Because the inside tube diameter is same as before,F = 1.25.Therefore,\n",
+ "h1 = 135; \t\t\t#basic heat transfer coefficient \t\t\t#unit:Btu/(hr*ft**2*F)\n",
+ "F = 1.25; \t\t\t#correction factor\n",
+ "h = h1*F; \t\t\t#heat transfer coefficient \t\t\t#the inside film coefficient \t\t\t#unit:Btu/(hr*ft**2*F)\n",
+ "print \"The inside film coefficient is %.2f Btu/hr*ft**2*F)\"%(h);\n",
+ "#It is interesting that for equal mass flow rates,water yields a heat-transfer coefficient almost five times greater than air\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Reynolds number is 339908.22\n",
+ "The inside film coefficient is 168.75 Btu/hr*ft**2*F)\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.19 Page No : 586"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#A bare steel pipe\n",
+ "#From the Table 11.5,case 2,\n",
+ "Fe = 0.79; \t\t\t#Emissivity factor to allow for the departure of the surfaces interchanging heat from complete blackness;Fe is a function of the surface emissivities and configurations\n",
+ "FA = 1; \t\t\t#geometric factor to allow for the average solid angle through which one surface \"sees\" the other\n",
+ "sigma = 0.173*10**-8; \t\t\t#Stefan-Boltzmann constant \t\t\t#Unit:Btu/(hr*ft**2*R**4)\n",
+ "T1 = 120+460; \t\t\t#outside temperature \t\t\t#Unit:R \t\t\t#fahrenheit converted to absolute temperature\n",
+ "T2 = 70+460; \t\t\t#inside temperature \t\t\t#Unit:R \t\t\t#fahrenheit converted to absolute temperature\n",
+ "D = 3.5/12; \t\t\t#3.5 inch = 3.5/12 feet\t\t\t#Unit:ft \t\t\t#Outside diameter\n",
+ "L = 5; \t\t\t#Length \t\t\t#Unit:ft \t\t\t#From problem 11.10\n",
+ "A = (math.pi*D)*L; \t\t\t#Area \t\t\t#Unit:ft**2 \n",
+ "Q = sigma*Fe*FA*A*(T1**4-T2**4); \t\t\t#The net interchange of heat by radiation between two bodies at different temperatures \t\t\t#Unit:Btu/hr \t\t\t#\t\t\t#Stefan-Boltzmann law\n",
+ "\n",
+ "# Results\n",
+ "print \"The heat loss by radiation is %.2f Btu/hr\"%(Q);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat loss by radiation is 214.52 Btu/hr\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.20 Page No : 588"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#The upper temperature is given as 120 F and the temperature difference is \n",
+ "Ti = 120; \t\t\t#Inside temperature \t\t\t#unit:fahrenheit\n",
+ "To = 70; \t\t\t#Outside temperature \t\t\t#unit:fahrenheit\n",
+ "deltaT = 120-70; \t\t\t#unit:fahrenheit \t\t\t#Change in temperature\n",
+ "#Using figure 11.28, \n",
+ "hrdash = 1.18; \t\t\t#factor for radiation coefficient \t\t\t#Unit:Btu/(hr*ft**2*F)\n",
+ "Fe = 1; \t\t\t#Emissivity factor to allow for the departure of the surfaces interchanging heat from complete blackness;Fe is a function of the surface emissivities and configurations\n",
+ "FA = 0.79; \t\t\t#geometric factor to allow for the average solid angle through which one surface \"sees\" the other\n",
+ "hr = Fe*FA*hrdash; \t\t\t#The radiation heat-transfer coefficient for the pipe \t\t\t#Unit:Btu/(hr*ft**2*F)\n",
+ "print \"The radiation heat-transfer coefficient for the pipe is %.2f Btu/hr*ft**2*F)\"%(hr);\n",
+ "\n",
+ "#As a check,Using the results of problem 11.17,\n",
+ "print \"As a check, Using the results of problem 11.17\"\n",
+ "D = 3.5/12; \t\t\t#3.5 inch = 3.5/12 feet\t\t\t#Unit:ft \t\t\t#Outside diameter\n",
+ "L = 5; \t\t\t#Length \t\t\t#Unit:ft \t\t\t#From problem 11.10\n",
+ "A = (math.pi*D)*L; \t\t\t#Area \t\t\t#Unit:ft**2 \n",
+ "Q = 214.5; \t\t\t#heat loss \t\t\t#Unit:Btu/hr\n",
+ "hr = Q/(A*deltaT); \t\t\t#The radiation heat-transfer coefficient for the pipe \t\t\t#Unit:Btu/(hr*ft**2*F) \t\t\t#Newton's law of cooling\n",
+ "print \"The radiation heat-transfer coefficient for the pipe is %.2f Btu/hr*ft**2*F)\"%(hr);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The radiation heat-transfer coefficient for the pipe is 0.93 Btu/hr*ft**2*F)\n",
+ "As a check, Using the results of problem 11.17\n",
+ "The radiation heat-transfer coefficient for the pipe is 0.94 Btu/hr*ft**2*F)\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.21 Page No : 589"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Because the conditions of illustrative problem 11.15 are the same as for problem 11.19 and 11.20,we can solve this problem in two ways to obtain a check.\n",
+ "#Thus,adding the results of these problems yields,\n",
+ "print \"Adding the results of the problems yields\"\n",
+ "Qtotal = 206.2+214.5; \t\t\t#Unit:Btu/hr \t\t\t#total heat loss\n",
+ "print \"The heat loss due to convection is %.2f Btu/hr\"%(Qtotal);\n",
+ "\n",
+ "#We can also approach this solution by obtaining radiation and convection heat-transfer co-efficcient.Thus,\n",
+ "hcombined = 0.9+0.94; \t\t\t#Coefficient of heat transfer \t\t\t#Unit:Btu/(hr*ft**2*F)\n",
+ "D = 3.5/12; \t\t\t#3.5 inch = 3.5/12 feet \t\t\t#Unit:ft \t\t\t#Outside diameter\n",
+ "Ti = 120; \t\t\t#Inside temperature \t\t\t#unit:fahrenheit\n",
+ "To = 70; \t\t\t#Outside temperature \t\t\t#unit:fahrenheit\n",
+ "deltaT = Ti-To; \t\t\t#unit:fahrenheit \t\t\t#Change in temperature\n",
+ "L = 5; \t\t\t#Length \t\t\t#Unit:ft \t\t\t#From problem 11.10\n",
+ "A = (math.pi*D)*L; \t\t\t#Area \t\t\t#Unit:ft**2 \n",
+ "Qtotal = hcombined*A*deltaT; \t\t\t#Unit:Btu/hr \t\t\t#total heat loss due to convection \t\t\t#Newton's law of cooling\n",
+ "print \"By obtaining radiation and convection heat-transfer co-efficcient\"\n",
+ "print \"The heat loss due to convection is %.2f Btu/hr\"%(Qtotal);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Adding the results of the problems yields\n",
+ "The heat loss due to convection is 420.70 Btu/hr\n",
+ "By obtaining radiation and convection heat-transfer co-efficcient\n",
+ "The heat loss due to convection is 421.50 Btu/hr\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.22 Page No : 595"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy.linalg import inv\n",
+ "\n",
+ "#For brick,concrete,plaster,hot film and cold film,\n",
+ "A = 1.; \t\t\t#area \t\t\t#Unit:ft**2\n",
+ "#For a plane wall,the areas are all the same,and if we use 1 ft**2 of wall surface as the reference area,\n",
+ "#For Brick,\n",
+ "deltax = 6./12; \t\t\t#6 inch = 6/12 feet \t\t\t#deltax = length \t\t\t#unit:ft\n",
+ "k = 0.40; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n",
+ "brickResistance = deltax/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n",
+ "print \"For brick\";\n",
+ "print \"The resistance is %.2f hr*F)/Btu\"%(brickResistance);\n",
+ "\n",
+ "#For Concrete,\n",
+ "deltax = (1./2)/12; \t\t\t#(1/2) inch = (1/2)/12 feet \t\t\t#deltax = length \t\t\t#unit:ft\n",
+ "k = 0.80; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n",
+ "concreteResistance = deltax/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n",
+ "print \"For Concrete\"\n",
+ "print \"The resistance is %.2f hr*F)/Btu\"%(concreteResistance);\n",
+ "\n",
+ "#For plaster,\n",
+ "deltax = (1./2)/12; \t\t\t# (1/2) inch = 6/12 feet \t\t\t#deltax = length \t\t\t#unit:ft\n",
+ "k = 0.30; \t\t\t#Unit:Btu/(hr*ft*F) \t\t\t#k = proportionality constant \t\t\t#k = thermal conductivity \t\t\t#From the table\n",
+ "plasterResistance = deltax/(k*A); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n",
+ "print \"For plaster\";\n",
+ "print \"The resistance is %.2f hr*F)/Btu\"%(plasterResistance);\n",
+ "\n",
+ "#For \"hot film\",\n",
+ "h = 0.9; \t\t\t#Coefficient of heat transfer \t\t\t#Unit:Btu/(hr*ft**2*F)\n",
+ "hotfilmResistance = inv([[h*A]]); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n",
+ "print \"For hot film\"\n",
+ "print \"The resistance is %.2f hr*F)/Btu\"%(hotfilmResistance);\n",
+ "\n",
+ "#For \"cold film\",\n",
+ "h = 1.5; \t\t\t#Coefficient of heat transfer \t\t\t#Unit:Btu/(hr*ft**2*F)\n",
+ "coldfilmResistance = inv([[h*A]]); \t\t\t#Thermal resistance \t\t\t#Unit:(hr*f)/Btu\n",
+ "print \"For cold film\"\n",
+ "print \"The resistance is %.2f hr*F)/Btu\"%(coldfilmResistance);\n",
+ "\n",
+ "totalResistance = brickResistance+concreteResistance+plasterResistance+hotfilmResistance+coldfilmResistance; \t\t\t#the overall resistance \t\t\t#Unit:(hr*f)/Btu\n",
+ "print \"The overall resistance is %.2f hr*F)/Btu\"%(totalResistance);\n",
+ "\n",
+ "U = inv([[totalResistance]]); \t\t\t#Unit:Btu/(hr*ft**2) \t\t\t#The overall conducmath.tance(or overall heat-transfer coefficient)\n",
+ "print \"The overall conductanceor overall heat-transfer coefficient) is %.2f Btu/hr/ft**2)\"%(U);\n",
+ "#In problem 11.21,the solution is straightforward,because the heat-transfer area is constant for all series resistances.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For brick\n",
+ "The resistance is 1.25 hr*F)/Btu\n",
+ "For Concrete\n",
+ "The resistance is 0.05 hr*F)/Btu\n",
+ "For plaster\n",
+ "The resistance is 0.14 hr*F)/Btu\n",
+ "For hot film\n",
+ "The resistance is 1.11 hr*F)/Btu\n",
+ "For cold film\n",
+ "The resistance is 0.67 hr*F)/Btu\n",
+ "The overall resistance is 3.22 hr*F)/Btu\n",
+ "The overall conductanceor overall heat-transfer coefficient) is 0.31 Btu/hr/ft**2)\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.23 Page No : 596"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# given data\n",
+ "hi = 45; \t\t\t#Film coefficient on the inside of the pipe \t\t\t#Unit:Btu/(hr*ft**2*F)\n",
+ "r1 = 3.0/2; \t\t\t#Inside radius \t\t\t#Unit:inch\n",
+ "k1 = 26; \t\t\t#Unit:Btu/(hr*ft**2*F) \t\t\t#k = proportionality constant for steel pipe \t\t\t#k = thermal conductivity for fir \t\t\t#From the table\n",
+ "r2 = 3.5/2; \t\t\t#outide radius \t\t\t#Unit:inch\n",
+ "k2 = 0.026; \t\t\t#Unit:Btu/(hr*ft**2*F) \t\t\t#k = proportionality constant for mineral wool \t\t\t#k = thermal conductivity for fir \t\t\t#From the table\n",
+ "r3 = 5.50/2; \t\t\t#radius \t\t\t#Unit:inch\n",
+ "ho = 0.9; \t\t\t#Film coefficient on the outside of the pipe \t\t\t#Unit:Btu/(hr*ft**2*F)\n",
+ "#Results of problem 11.23,\n",
+ "Ui = 1/((1/hi)+((r1/(k1*12))*math.log(r2/r1))+((r1/(k2*12))*math.log(r3/r2))+(1/(ho*(r3/r1)))); \t\t\t#Unit:Btu/(hr*ft**2*F) \t\t\t#1 in. = 12 ft \t\t\t#Heat transfer coefficient based on inside surface \n",
+ "print \"Heat transfer coefficient based on inside surface is %.2f Btu/hr*ft**2*F)\"%(Ui); \n",
+ "#Because Uo*Ao = Ui*Ai\n",
+ "Uo = Ui*(r1/r3); \t\t\t#Heat transfer coefficient based on outside surface \t\t\t#Unit:Btu/(hr*ft**2*F)\n",
+ "print \"Heat transfer coefficient based on outside surface is %.2f Btu/hr*ft**2*F)\"%(Uo);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transfer coefficient based on inside surface is 0.36 Btu/hr*ft**2*F)\n",
+ "Heat transfer coefficient based on outside surface is 0.20 Btu/hr*ft**2*F)\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.24 Page No : 601"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#A COUNTERFLOW HEAT EXCHANGER\n",
+ "#Hot oil enters at 215 F and leaves at 125 F\n",
+ "#Water enters the unit at 60 F and leaves at 90 F\n",
+ "#Therefore,From figure 11.34, \n",
+ "thetaA = 215.-90; \t\t\t#the greatest temperature difference between the fluids(at either inlet or outlet) \t\t\t#Unit:fahrenheit\n",
+ "thetaB = 125.-60; \t\t\t#the least temperature difference between the fluids(at either inlet or outlet) \t\t\t#Unit:fahrenheit\n",
+ "deltaTm = (thetaA-thetaB)/math.log(thetaA/thetaB); \t\t\t#math.logarithmic mean temperature difference \t\t\t#Unit:fahrenheit \n",
+ "#From the oil data,\n",
+ "m = 400*60; \t\t\t#mass \t\t\t#Unit:lb/sec \t\t\t#1 min = 60 sec\n",
+ "Cp = 0.85; \t\t\t#Specific heat of the oil \t\t\t#Unit:Btu/(lb*F)\n",
+ "deltaT = 215.-125; \t\t\t#Change in temperature \t\t\t#Unit:fahrenheit\n",
+ "Q = m*Cp*deltaT \t\t\t#The heat transfer \t\t\t#Unit:Btu/hr\n",
+ "#Q = U*A*deltaTm\n",
+ "U = 40.;\t\t\t#The overall coefficient of heat transfer of the unit \t\t\t#Unit:Btu/(hr*ft**2*F)\n",
+ "A = Q/(U*deltaTm); \t\t\t#Umit:ft**2 \t\t\t#The outside surface area\n",
+ "print \"The outside surface area required is %.2f ft**2\"%(A);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The outside surface area required is 500.25 ft**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.25 Page No : 602"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "\n",
+ "#In problem 11.24, A COUNTERFLOW HEAT EXCHANGER is operated in the parallel flow\n",
+ "#Hot oil enters at 215 F and leaves at 125 F\n",
+ "#Water enters the unit at 60 F and leaves at 90 F\n",
+ "#Therefore,From figure 11.35, \n",
+ "thetaA = 215.-60; \t\t\t#the greatest temperature difference between the fluids(at either inlet or outlet) \t\t\t#Unit:fahrenheit\n",
+ "thetaB = 125.-90; \t\t\t#the least temperature difference between the fluids(at either inlet or outlet) \t\t\t#Unit:fahrenheit\n",
+ "deltaTm = (thetaA-thetaB)/math.log(thetaA/thetaB); \t\t\t#math.logarithmic mean temperature difference \t\t\t#Unit:fahrenheit \n",
+ "#From the oil data,\n",
+ "m = 400*60.; \t\t\t#mass \t\t\t#Unit:lb/sec \t\t\t#1 min = 60 sec\n",
+ "Cp = 0.85; \t\t\t#Specific heat of the oil \t\t\t#Unit:Btu/(lb*F)\n",
+ "deltaT = 215.-125; \t\t\t#Change in temperature \t\t\t#Unit:fahrenheit\n",
+ "Q = m*Cp*deltaT \t\t\t#The heat transfer \t\t\t#Unit:Btu/hr\n",
+ "#Q = U*A*deltaTm\n",
+ "U = 40.;\t\t\t#The overall coefficient of heat transfer of the unit \t\t\t#Unit:Btu/(hr*ft**2*F)\n",
+ "A = Q/(U*deltaTm); \t\t\t#Umit:ft**2 \t\t\t#The outside surface area\n",
+ "print \"The outside surface area required is %.2f ft**2\"%(A);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The outside surface area required is 569.19 ft**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.26 Page No : 603"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#From the table 11.7,\n",
+ "#For the oil side,a resistance(fouling factor) of 0.005 (hr*F*ft**2)/Btu can be used\n",
+ "#and for the water side,a fouling factor of 0.001 (hr*F*ft**2)/Btu can be used\n",
+ "#From problem 11.25,\n",
+ "U = 40;\t\t\t#The coefficient of heat transfer of the unit \t\t\t#Unit:Btu/(hr*ft**2*F)\n",
+ "#therefore,\n",
+ "Roil = 0.005; \t\t\t#unit:(hr*ft**2*F)/Btu \t\t\t#resistance at oil side\n",
+ "Rwater = 0.001; \t\t\t#unit:(hr*ft**2*F)/Btu \t\t\t#resistance for water side\n",
+ "invU = 0.025 # Inv of U\n",
+ "Rcleanunit = invU; \t\t\t#unit:(hr*ft**2*F)/Btu \t\t\t#resistance at clean unit\n",
+ "Roverall = Roil+Rwater+Rcleanunit; \t\t\t#unit:(hr*ft**2*F)/Btu \t\t\t#overall resistance\n",
+ "invRoverall = 32.258065;\n",
+ "Uoverall = invRoverall; \t\t\t#Unit:Btu/(hr*ft**2*F) \t\t\t#The overall coefficient of heat transfer of the unit\n",
+ "#Because all the parameters are the same,the surface area required will vary inversely as U\n",
+ "A = 569*(U/Uoverall); \t\t\t#A = 569 ft**2 in the problem 11.25 \t\t\t#unit:ft**2 \t\t\t#The outside surface area\n",
+ "print \"The outside surface area required is %.2f ft**2\"%(A);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The outside surface area required is 705.56 ft**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.27 Page No : 605"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#HEAT EXCHANGER\n",
+ "#Oil flows in the tube side and is cooled from 280 F to 140 F\n",
+ "#Therefore,\n",
+ "t2 = 140.; \t\t\t#Unit:fahrenheit\n",
+ "t1 = 280.; \t\t\t#Unit:fahrenheit\n",
+ "#On the shell side,water is heated from 85 F to 115 F\n",
+ "T1 = 85.; \t\t\t#Unit:fahrenheit\n",
+ "T2 = 115.; \t\t\t#Unit:fahrenheit\n",
+ "P = (t2-t1)/(T1-t1); \n",
+ "R = (T1-T2)/(t2-t1);\n",
+ "#From the figure,\n",
+ "F = 0.91;\t\t\t#Correction factor\n",
+ "LMTD = ((t1-T2)-(t2-T1))/math.log((t1-T2)/(t2-T1)); \t\t\t#LMTD = Log mean temperature difference \t\t\t#Unit:fahrenheit\n",
+ "TMTD = F*LMTD; \t\t\t#TMTD = True mean temperature difference \t\t\t#Unit:fahrenheit\n",
+ "\n",
+ "# Results\n",
+ "print \"The true mean temperature is %.2f fahrenheit\"%(TMTD);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The true mean temperature is 91.11 fahrenheit\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch1_1.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch1_1.ipynb
new file mode 100644
index 00000000..ce79dd48
--- /dev/null
+++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch1_1.ipynb
@@ -0,0 +1,394 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:cda743da280474e0339734ce945527afbcb8983c5386e8ae01ef3be6064b84d0"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1 : Fundamental Concepts"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.1 Page No : 8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#C = (5/9)*(F-32);\n",
+ "#F = 32+(9*C/5);\n",
+ "#Letting C = F in equation;\n",
+ "#F = (5/9)*(F-32);\n",
+ "#Therefore\n",
+ "F = -160/4; \t\t\t#fahrenheit\n",
+ "\n",
+ "# Results\n",
+ "print \"Both fahrenheit and celsius temperature scales indicate same temperature at %.2f\"%(F);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Both fahrenheit and celsius temperature scales indicate same temperature at -40.00\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2 Page No : 18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "Mm = 0.0123\t\t\t#Unit:lb \t\t\t#Mass of the moon;\n",
+ "Me = 1 \t \t\t#Unit:lb \t\t\t#Mass of the earth;\n",
+ "Dm = 0.273 \t\t\t#Unit:feet \t\t\t#Diameter of the moon;\n",
+ "De = 1. \t \t\t#Unit:feet \t\t\t#Diameter of the earth;\n",
+ "Rm = Dm/2; \t\t\t#Radius of the moon; \t\t\t#Unit:feet\n",
+ "Re = De/2; \t\t\t#Radius of the earth; \t\t\t#Unit:feet\n",
+ "\n",
+ "#F = (K*M1*M2)/d**2 \t\t\t#Law of universal gravitation;\n",
+ "#Fe = (K*Me*m)/Re**2; \t\t\t#Fe = Force exerted on the mass;\n",
+ "#Fm = (K*Mm*m)/Rm**2; \t\t\t#Fm = Force exerted on the moon;\n",
+ "F = (Me/Mm)*(Rm/Re)**2; \t\t\t#F = Fe/Fm;\n",
+ "print \"Relation of force exerted on earth to mass is\"\n",
+ "print \"Fe/Fm = %.2f\"%F"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Relation of force exerted on earth to mass is\n",
+ "Fe/Fm = 6.06\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.3 Page No : 20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "M = 5; \t\t\t#Unit:kg \t\t\t#mass of body;\n",
+ "g = 9.81; \t\t\t#Unit:m/s**2 \t\t\t#the local acceleration of gravity\n",
+ "\n",
+ "# Calculations\n",
+ "W = M*g; \t\t\t#W = the weight of the body \t\t\t#Unit:Newton \t\t\t# 1 N = 1 kg*m/s**2\n",
+ "\n",
+ "# Results\n",
+ "print \"The weight of the body is %.2f N\"%(W);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The weight of the body is 49.05 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.4 Page No : 21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print \"Solution for a\";\n",
+ "#given\n",
+ "M = 10. \t\t\t#Unit:kg \t\t\t#mass of body;\n",
+ "g = 9.5 \t\t\t#Unit:m/s**2 \t\t\t#the local acceleration of gravity\n",
+ "W = M*g; \t\t\t#W = the weight of the body; \t\t\t#Unit:Newton \t\t\t# 1 N = 1 kg*m/s**2\n",
+ "print \"The weight of the body is %.2f N\"%(W);\n",
+ "\n",
+ "print \"Solution for b\";\n",
+ "#Given\n",
+ "F = 10; \t\t\t#Unit:Newton \t\t\t#Horizontal Force\n",
+ "a = F/M; \t\t\t\t\t\t#\t\t\t#newton's second law of motion\n",
+ "print \"The horizontal acceleration of the body is %.2f m/s**2\"%(a);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Solution for a\n",
+ "The weight of the body is 95.00 N\n",
+ "Solution for b\n",
+ "The horizontal acceleration of the body is 1.00 m/s**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.5 Page No : 25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Conversion Problem\n",
+ "# 1 inch = 0.0254 meter so, 1 = 0.0254 meter/inch \t\t\t#Eq.1\n",
+ "# 1 ft = 12 inch so, 1 = 12 inch/ft.........\t\t\t#Eq.2\n",
+ "#Multiplying Eq.1 & Eq.2 \t\t\t# We get 1 = 0.0254*12 meter/ft\n",
+ "#Taking Square both side\n",
+ "#1**2 = (0.0254*12)**2 meter**2/ft**2\n",
+ "print \"1 ft**2 = %.2f meter**2\"%((0.0254*12)**2); "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1 ft**2 = 0.09 meter**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.7 Page No : 33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#The Specific gravity of mercury is 13.6 \t\t\t#Given\n",
+ "#Converting the unit of weight of grams per cubic centimeter to pounds per cubic foot\n",
+ "# 1 lbf = 454 gram \t\t\t#1 inch = 2.54 cm\n",
+ "#So 1 gram = 1/454 lbf and 1 ft = 12*2.54 cm\n",
+ "#Gamma = (gram/cm**3)*(lb/gram)*(cm**3/ft**3) = lb/ft**3\n",
+ "#Gamma = (1 gram/cm**3)*(1 lbf/454 gram)*(2.54*12)**3 *cm**3/ft**3\n",
+ "Gamma = (1./454)*(2.54*12)**3; \t\t\t#lbf/ft**3 \t\t\t#conversion factor\n",
+ "print \"Conversion Factor = %.2f\"%Gamma\n",
+ "p = (1./12)*(Gamma*13.6); \t\t\t#lbf/ft**2 \t\t\t#gage pressure\n",
+ "p = (1./12)*Gamma*13.6*(1./144) \t\t\t#ft**2/inch**2 \t\t\t#gage pressure\n",
+ "print \"Guage Pressure is %.2f psi\"%(p);\n",
+ "print \"Local atmospheric pressure is 14.7 psia\";\n",
+ "P = p+14.7; \t\t\t#Pressure on the base of the column \t\t\t#Unit:psia\n",
+ "print \" So Pressure on the base of the column is %.2f psia\"%(P);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Conversion Factor = 62.37\n",
+ "Guage Pressure is 0.49 psi\n",
+ "Local atmospheric pressure is 14.7 psia\n",
+ " So Pressure on the base of the column is 15.19 psia\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.8 Page No : 34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "Rho = 13.595; \t\t\t#Unit: kg/m**3 \t\t\t#The density of mercury\n",
+ "h = 25.4; \t\t\t#Unit: mm \t\t\t#Height of column of mercury\n",
+ "g = 9.806; \t\t\t#Unit:m/s**2 \t\t\t#the local acceleration of gravity\n",
+ "\n",
+ "#Solution\n",
+ "p = Rho*g*h; \t\t\t#P = Pressure at the base of a column of mercury \t\t\t#Unit:Pa\n",
+ "\n",
+ "# Results\n",
+ "print \"Pressure at the base of a column of mercury is %.2f Pa\"%(p);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure at the base of a column of mercury is 3386.14 Pa\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.9 Page No : 34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "Patm = 30.0; \t\t\t#in. \t\t\t#pressure of mercury at smath.radians(numpy.arcmath.tan(ard temperature\n",
+ "Vacuum = 26.5; \t\t\t#in. \t\t\t#vaccum pressure\n",
+ "Pabs = Patm-Vacuum; \t\t\t#Absolute pressure of mercury \t\t\t#in.\n",
+ "# 1 inch mercury exerts a pressure of 0.491 psi\n",
+ "p = Pabs*0.491; \t\t\t#Absolute pressure in psia\n",
+ "\n",
+ "# Results\n",
+ "print \"Absolute pressure of mercury in is %.2f psia\"%(p);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Absolute pressure of mercury in is 1.72 psia\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.10 Page No : 35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "Rho = 2000; \t\t\t#Unit: kg/m**3 \t\t\t#The density of fluid\n",
+ "h = -10; \t\t\t#Unit: mm \t\t\t#Height of column of fluid \t\t\t#the height is negative because it is measured up from the base\n",
+ "g = 9.6 \t\t\t#Unit:m/s**2 \t\t\t#the local acceleration of gravity\n",
+ "\n",
+ "#Solution\n",
+ "p = -Rho*g*h; \t\t\t#P = Pressure at the base of a column of fluid \t\t\t#Unit:Pa\n",
+ "\n",
+ "# Results\n",
+ "print \"Pressure at the base of a column of fluid is %.2f Pa\"%(p);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure at the base of a column of fluid is 192000.00 Pa\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.11 Page No : 35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "Patm = 30.0 \t\t\t#in. \t\t\t#pressure of mercury at smath.radians(numpy.arcmath.tan(ard temperature\n",
+ "Vacuum = 26.5 \t\t\t#in. \t\t\t#vaccum pressure\n",
+ "Pabs = Patm-Vacuum; \t\t\t#Absolute pressure of mercury \t\t\t#in.\n",
+ "\n",
+ "# (3.5 inch* (ft/12 inch) * (13.6*62.4)LBf/ft**3 * kg/2.2 LBf * 9.806 N/kg)/((12 inch**2/ft**2) * (0.0254 m/inch)**2)\n",
+ "p = (3.5*(1./12)*13.6*62.4*(1/2.2)*9.806)/(12**2*0.0254**2*1000); \t\t\t#kPa \t\t\t#Absolute pressure in psia\n",
+ "\n",
+ "# Results\n",
+ "print \"Absolute pressure of mercury is %.2f kPa\"%(p)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Absolute pressure of mercury is 11.88 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch2_1.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch2_1.ipynb
new file mode 100644
index 00000000..c4ad19b7
--- /dev/null
+++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch2_1.ipynb
@@ -0,0 +1,562 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:086f4825fb4b8e83d4ca795bc6e4859da294b353e111bb33a89148489ab4ef6c"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2 : Work, Energy and Heat"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2 Page No : 62"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "k = 100; \t\t\t# Unit:lbf/in. \t\t\t#k = spring constant\n",
+ "l = 2; \t\t\t#Unit:inch \t\t\t#l = length of compression of string\n",
+ "\n",
+ "# Calculations\n",
+ "work = (1./2)*k*l**2; \t\t\t#force-print lacement relation \t\t\t#Unit:in*lbf\n",
+ "\n",
+ "# Results\n",
+ "print \"Workdone is %.2f inch*lbf\"%(work);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Workdone is 200.00 inch*lbf\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.3 Page No : 62"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "k = 20*1000; \t\t\t# Unit:N/m \t\t\t#k = 20kN \t\t\t#k = spring constant\n",
+ "l = 0.075; \t\t\t#Unit:meter \t\t\t#l = 75 mm \t\t\t#l = length of compression of string\n",
+ "\n",
+ "# Calculations\n",
+ "work = (1./2)*k*l**2; \t\t\t#force-print lacement relation \t\t\t#Unit:N*m\n",
+ "\n",
+ "# Results\n",
+ "print \"Workdone is %.2f Jule\"%(work);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Workdone is 56.25 Jule\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.4 Page No : 66"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "Z = 600; \t\t\t#Unit:ft \t\t\t#Z = The dismath.tance,the body is raised from its initial position when the force is applied\n",
+ "gc = 32.174; \t\t\t#Unit: (lbm*ft)/(lbf*s**2) \t\t\t#gc is constant of proportionality\n",
+ "g = gc; \t\t\t#Unit:ft/s**2 \t\t\t#g = The local gravity\n",
+ "m = 1.; \t\t\t#Unit:lbm \t\t\t#m = mass\n",
+ "\n",
+ "# Calculations\n",
+ "PE = (m*g*Z)/gc; \t\t\t#potential energy \t\t\t#Unit:ft*lbf\n",
+ "\n",
+ "# Results\n",
+ "print \"%.2f ft*lbf work is done lifting the water to elevation \"%(PE)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "600.00 ft*lbf work is done lifting the water to elevation \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.5 Page No : 66"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given value\n",
+ "m = 1; \t\t\t#Unit:kg \t\t\t#m = mass\n",
+ "g = 9.81 \t\t\t#Unit:m/s**2 \t\t\t#g = The local gravity\n",
+ "Z = 50 \t\t\t#Unit:m \t\t\t#\t\t\t#Z = The dismath.tance,the body is raised from its initial position when the force is applied \t\t\t#In this case Z = delivered water from well to pump\n",
+ "\n",
+ "# Calculations\n",
+ "PE = m*g*Z; \t\t\t#PE = Potential Energy \t\t\t#Unit:Joule\n",
+ "\n",
+ "# Results\n",
+ "print \"Change in potential energy per kg of water is %.2f J \"%(PE); \t\t\t#J = Joule = N*m = kg*m**2/s**2\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in potential energy per kg of water is 490.50 J \n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.6 Page No : 66"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given value\n",
+ "Rho = 62.4; \t\t\t#Unit:lbm/ft**3 \t\t\t#Rho = The density of water\n",
+ "A = 10000; \t\t\t#Flow = 10000; gal/min\n",
+ "V = (231./1728); \t\t\t# 12 inch = 1 ft \t\t\t#So,1 ft**3 = 1728 in**3 \t\t\t# One Gallon is a volumetric measure equal to 231 in**3\n",
+ "#A*V \t\t\t#Unit:ft**3/min\n",
+ "\n",
+ "#In example, 2.4:\n",
+ "# From example 2.4\n",
+ "Z = 600; \t\t\t#Unit:ft \t\t\t#Z = The dismath.tance,the body is raised from its initial position when the force is applied\n",
+ "gc = 32.174; \t\t\t#Unit: (lbm*ft)/(lbf*s**2) \t\t\t#gc is constant of proportionality\n",
+ "g = gc; \t\t\t#Unit:ft/s**2 \t\t\t#g = The local gravity\n",
+ "m = 1; \t\t\t#Unit:lbm \t\t\t#m = mass\n",
+ "\n",
+ "# Calculations and Results\n",
+ "PE = (m*g*Z)/gc; \t\t\t#potential energy \t\t\t#Unit:ft*lbf\n",
+ "print \"%.2f ft*lbf work is done lifting the water to elevation \"%(PE);\n",
+ "\n",
+ "#So,\n",
+ "# In example 2.5\n",
+ "M = Rho*A*V; \t\t\t#M = the mass flow\n",
+ "Power = M*PE; \t\t\t#Unit:ft*lbf/lbm\n",
+ "print \"Generated Power is %.2f ft*lbf/lbm \"%(Power);\n",
+ "# 1 horsepower = 33,000 ft*lbf/min\n",
+ "print \"Power = %.2f hp\"%(Power/33000);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "600.00 ft*lbf work is done lifting the water to elevation \n",
+ "Generated Power is 50050000.00 ft*lbf/lbm \n",
+ "Power = 1516.67 hp\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.7 Page No : 67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print \"In problem 2.5\";\n",
+ "m = 1; \t\t\t#Unit:kg \t\t\t#m = mass\n",
+ "g = 9.81 \t\t\t#Unit:m/s**2 \t\t\t#g = The local gravity\n",
+ "Z = 50 \t\t\t#Unit:m \t\t\t#\t\t\t#Z = The dismath.tance,the body is raised from its initial position when the force is applied \t\t\t#In this case Z = delivered water from well to pump\n",
+ "\n",
+ "# Calculations and Results\n",
+ "PE = m*g*Z; \t\t\t#PE = Potential Energy \t\t\t#Unit:Joule\n",
+ "print \"Change in potential energy per kg of water is %.2f J \"%(PE); \t\t\t#J = Joule = N*m = kg*m**2/s**2\n",
+ "#Given data in problem 2.7 is\n",
+ "M = 1000; \t\t\t#Unit;kg/min\t\t\t#M = Water density \n",
+ "Power = PE*M*(1./60); \t\t\t#1 min = 60 seconds \t\t\t#power \t\t\t#unit:Joule/s = W\n",
+ "print \"Power is %.2f Watt\"%(Power); \t\t\t#Watt = N*m/s = Joule/s = Watt\n",
+ "#1 Hp = 746 Watt\n",
+ "print \"Power is %.2f Horsepower\"%(Power/745);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "In problem 2.5\n",
+ "Change in potential energy per kg of water is 490.50 J \n",
+ "Power is 8175.00 Watt\n",
+ "Power is 10.97 Horsepower\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.8 Page No : 69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "m = 10.; \t\t\t#Unit:lb \t\t\t#m = Mass\n",
+ "V1 = 88.; \t\t\t#Unit:\t\t\t#ft/s V1 = Velocity before it is slowed down\n",
+ "V2 = 10.; \t\t\t#Unit;ft/s \t\t\t#V2 = Velocity after it is slowed down\n",
+ "gc = 32.174; \t\t\t#Unit: (lbm*ft)/(lbf*s**2) \t\t\t#gc is constant of proportionality\n",
+ "\n",
+ "# Calculations and Results\n",
+ "KE1 = m*V1**2/(2*gc); \t\t\t#The kinetic energy of the body before it is slowed down \t\t\t#Unit:ft*lbf\n",
+ "print \"The kinetic energy of the body before it is slowed down is %.2f ft*lbf\"%(KE1);\n",
+ "\n",
+ "KE2 = m*V2**2/(2*gc); \t\t\t#The kinetic energy of the body before it is slowed down \t\t\t#Unit:ft*lbf\n",
+ "print \"The kinetic energy of the body before it is slowed down is %.2f ft*lbf\"%(KE2);\n",
+ "\n",
+ "KE = KE1-KE2; \t\t\t#KE = Change in kinetic energy \t\t\t#Unit:ft*lbf\n",
+ "print \"Change in kinetic energy is %.2f ft*lbf\"%(KE);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The kinetic energy of the body before it is slowed down is 1203.46 ft*lbf\n",
+ "The kinetic energy of the body before it is slowed down is 15.54 ft*lbf\n",
+ "Change in kinetic energy is 1187.92 ft*lbf\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.9 Page No : 70"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given value\n",
+ "m = 1500.; \t\t\t#Unit:kg \t\t\t#m = mass\n",
+ "V1 = 50.; \t\t\t#Km/hour V1 = Velocity before it is slowed down\n",
+ "#V1 = (50*1000 m/hour)**2/(3600 s/hour)**2 \n",
+ "\n",
+ "# Calculations\n",
+ "KE1 = (m*(V1*1000)**2/3600**2)/2; \t\t\t#KE1 = Initial kinetic energy \t\t\t#Unit:Joule\n",
+ "\n",
+ "#After slowing down\n",
+ "V2 = 30; \t\t\t#Unit:KM/hour \t\t\t#V2 = Velocity after it is slowed down\n",
+ "#V2 = (30*1000 m/hour)**2/(3600 s/hour)**2 \n",
+ "KE2 = (m*(V2*1000)**2/3600**2)/2; \t\t\t#KE2 = After slowing down, the kinetic energy \t\t\t#Unit:Joule\n",
+ "\n",
+ "KE = KE1-KE2; \t\t\t#KE = Change in kinetic energy \t\t\t#Unit:Joule\n",
+ "\n",
+ "# Results\n",
+ "print \"Change in kinetic energy is %.2f kJ\"%(KE/1000);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in kinetic energy is 92.59 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.10 Page No : 70"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "m = 10 \t\t\t#Unit:kg \t\t\t#m = mass\n",
+ "Z = 10 \t\t\t#Unit:m \t\t\t#Z = The dismath.tance,the body is raised from its initial position when the force is applied\n",
+ "g = 9.81 \t\t\t#Unit:m/s**2 \t\t\t#g = The local gravity\n",
+ "#There are no losses in the system\n",
+ "#So,initial potential energy plus initial kinetic energy equal to sum of final potential energy plus final kinetic energy\n",
+ "#So, PE1+KE1 = PE2+KE2\n",
+ "#From the figure,KE1 = 0; PE2 = 0;\n",
+ "#So,PE1 = KE2;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "PE1 = m*g*Z; \t\t\t#PE = Potential Energy \t\t\t#Unit:Joule\n",
+ "#KE2 = (m*v**2)/2\n",
+ "v = (PE1*2)/m; \n",
+ "V = math.sqrt(v); \t\t\t#Unit:m/s \t\t\t#velocity \n",
+ "print \"Velocity = %.2f m/s\"%(V);\n",
+ "KE2 = PE1; \t\t\t#kinetic energy \t\t\t#Unit:Joule\n",
+ "print \"Kinetic energy is %.2f N*m\"%(PE1);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity = 14.01 m/s\n",
+ "Kinetic energy is 981.00 N*m\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.11 Page No : 74"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "p1 = 100.; \t\t\t#pressure at the enmath.tance \t\t\t#Unit:psia,lbf/in**2\n",
+ "Rho1 = 62.4; \t\t\t#Unit:lbm/ft**3 \t\t\t#Rho = The density\n",
+ "v1 = 144.*(1/Rho1) \t\t\t#Specific Volume at entrance or reciprocal of fluid density \t\t\t# 144 in**2 = 1 ft**2\n",
+ "#1 Btu = 778 ft*lbf \n",
+ "J = 778.; \t\t\t#Unit:ft*lbf/Btu \t\t\t#conversion factor\n",
+ "\n",
+ "# Calculations and Results\n",
+ "FW1 = (p1*v1)/J; \t\t\t#Flow work \t\t\t#Btu/lbm\n",
+ "print \"Flow work = %.2f Btu/lbm\"%(FW1);\n",
+ "\n",
+ "print \"At the exit of device\"\n",
+ "p2 = 50.; \t\t\t#pressure at the exit \t\t\t#Unit:psia,lbf/in**2\n",
+ "Rho2 = 30.; \t\t\t#Unit:lbm/ft**3 \t\t\t#Rho = The density\n",
+ "v2 = 144.*(1./Rho2) \t\t\t#Specific Volume at exit or reciprocal of fluid density \t\t\t# 144 in**2 = 1 ft**2\n",
+ "#1 Btu = 778 ft*lbf \n",
+ "J = 778.; \t\t\t#Unit:ft*lbf/Btu \t\t\t#conversion factor\n",
+ "FW2 = (p2*v2)/J; \t\t\t#Flow work \t\t\t#Btu/lbm\n",
+ "print \"Flow work = %.2f Btu/lbm\"%(FW2);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Flow work = 0.30 Btu/lbm\n",
+ "At the exit of device\n",
+ "Flow work = 0.31 Btu/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.12 Page No : 75"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "print \"At the entrance of device\"\n",
+ "p1 = 200*1000; \t\t\t#200kPa*1000 Pa/kPa \t\t\t#pressure at the entrance \t\t\t#Unit:N/m**2\n",
+ "Rho1 = 1000; \t\t\t#kg/m**3 \t\t\t#Fluid density at entrance\n",
+ "v1 = 1./Rho1; \t\t\t#Specific Volume at entrance or reciprocal of fluid density\n",
+ "FW1 = p1*v1; \t\t\t#Flow work at entrance \t\t\t#Unit:N*m/kg\n",
+ "print \"Flow work = %.2fN*m/kg\"%(FW1);\n",
+ "\n",
+ "print \"At the exit of device\"\n",
+ "p2 = 100*1000; \t\t\t#200kPa*1000 Pa/kPa \t\t\t#pressure at the exit \t\t\t#Unit:N/m**2\n",
+ "Rho2 = 250; \t\t\t#kg/m**3 \t\t\t#Fluid density at exit\n",
+ "v2 = 1./Rho2; \t\t\t#Specific Volume at entrance or reciprocal of fluid density\n",
+ "FW2 = p2*v2; \t\t\t#Flow work at exit\t\t\t#Unit:N*m/kg\n",
+ "print \"Flow work = %.2f N*m/kg\"%(FW2);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "At the entrance of device\n",
+ "Flow work = 200.00N*m/kg\n",
+ "At the exit of device\n",
+ "Flow work = 400.00 N*m/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.14 Page No : 78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#It is necessary that pressure be expressed as psfa when the volume is in cubic feet\n",
+ "#100 psia = 100*144 psfa\n",
+ "p1 = 100*144; \t\t\t#Unit:psfa \t\t\t#initial pressure\n",
+ "v1 = 2; \t\t\t#Unit:ft**3/lb \t\t\t#Initial Specific Volume\n",
+ "v2 = 1.; \t\t\t#Unit:ft**3/lb \t\t\t#Final Specific Volume\n",
+ "\n",
+ "# Calculations\n",
+ "w = p1*v1*math.log(v2/v1); \t\t\t#work done on fluid \t\t\t#Unit:ft*lbf/lbm\n",
+ "\n",
+ "# Results\n",
+ "print \"Work done on fluid = %.2f ft*lbf/lb\"%(w);\n",
+ "#1 Btu = 778 ft*lbf \n",
+ "print \"Work done on the fluid per pound of fluid is %.2f Btu/lbm\"%(w/778);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done on fluid = -19962.64 ft*lbf/lb\n",
+ "Work done on the fluid per pound of fluid is -25.66 Btu/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.15 Page No : 79"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Given value\n",
+ "#p1*v1 = p2*v2\n",
+ "p1 = 200.*1000; \t\t\t#p1 = Initial Pressure \t\t\t#Unit:Pa\n",
+ "p2 = 800*1000; \t\t\t#p2 = Final Pressure \t\t\t#Unit:Pa\n",
+ "v1 = 0.1; \t\t\t#v1 = Initial Special Volume \t\t\t#Unit:m**3/kg\n",
+ "\n",
+ "# Calculations\n",
+ "v2 = (p1/p2)*v1; \t\t\t#v1 = final Special Volume \t\t\t#Unit:m**3/kg\n",
+ "w = p1*v1*math.log(v2/v1); \t\t\t#workdone \t\t\t#Unit:kJ/kg\n",
+ "\n",
+ "# Results\n",
+ "print \"Work done per kilogram of gas is %.2f kJ/kg into the system)\"%(w/1000);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done per kilogram of gas is -27.73 kJ/kg into the system)\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch3_1.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch3_1.ipynb
new file mode 100644
index 00000000..1a72803f
--- /dev/null
+++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch3_1.ipynb
@@ -0,0 +1,901 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:d3fc279744b60850d5797d14855414b40de2e09f4541a34684deba85c06170cf"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3 : The First Law of Thermodynamics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.1 Page No : 91"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#For a constant volume process, 10 Btu/lbm heat is added to the system\n",
+ "#We can consider thet a math.tank having a fixed volume has heat added to it\n",
+ "#Under these conditions,the mechanical work done on or by the system must be 0\n",
+ "#u2-u1 = q\n",
+ "print \"Heat has been converted to internal energy of the working fluid\";\n",
+ "#So,\n",
+ "print \" So,Change in internal energy u2-u1 = 10 Btu/Lbm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat has been converted to internal energy of the working fluid\n",
+ " So,Change in internal energy u2-u1 = 10 Btu/Lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.4 Page No : 91"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print \"Solution For a\";\n",
+ "m = 10; \t\t\t#Unit:lbm \t\t\t#mass of water\n",
+ "#delataU = U2-U1\n",
+ "Heat = 100.; \t\t\t#Unit:Btu \t\t\t#heat added\n",
+ "deltaU = Heat/m; \t\t\t#Change in internal energy \t\t\t#unit:Btu/lbm\n",
+ "print \"Change in internal energy per pound of water is %.2f Btu/lbm\"%(deltaU);\n",
+ "\n",
+ "print \"Solution For b\";\n",
+ "print \"In this process,energy crosses the boundary of the system by means of fractional work\"\n",
+ "print \"The contents of the math.tank will not distinguish between the energy if it is added as\\\n",
+ " heat or the energy added as fraction work\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Solution For a\n",
+ "Change in internal energy per pound of water is 10.00 Btu/lbm\n",
+ "Solution For b\n",
+ "In this process,energy crosses the boundary of the system by means of fractional work\n",
+ "The contents of the math.tank will not distinguish between the energy if it is added as heat or the energy added as fraction work\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.5 Page No : 96"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given value\n",
+ "P1 = 100 \t\t\t#Unit:psia \t\t\t#Pressure at the entrance to a steady-flow device\n",
+ "Rho1 = 62.4 \t\t\t#Unit:lbm/ft**3 \t\t\t#the density of the fluid\n",
+ "A1V1 = 10000 \t\t\t#Unit:ft**3/min \t\t\t#Entering fluid\n",
+ "A2 = 2 \t\t\t#Unit:ft**2 \t\t\t#Exit area\n",
+ "\n",
+ "# Calculations and Results\n",
+ "m = Rho1*A1V1; \t\t\t#Unit:lbm/min \t\t\t#mass rate of flow per unit time\n",
+ "print \"Mass flow rate is %.2f LBm/min\"%(m);\n",
+ "\n",
+ "Rho2 = Rho1; \t\t\t#Unit:lbm/ft**3 \t\t\t#the density of the fluid\n",
+ "#m = Rho2*A2*V2\n",
+ "#So,\n",
+ "V2 = m/(Rho2*A2); \t\t\t#velocity at exit \t\t\t#Unit:ft/min\n",
+ "print \"The exit velocity is %.2f ft/min\"%(V2);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass flow rate is 624000.00 LBm/min\n",
+ "The exit velocity is 5000.00 ft/min\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.6 Page No : 97"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given value\n",
+ "Rho1 = 1000. \t\t\t#Unit:kg/m**3 \t\t\t#the density of the fluid at entrance\n",
+ "A1V1 = 2000 \t\t\t#Unit:m**3/min \t\t\t#Entering fluid\n",
+ "A2 = 0.5 \t\t\t#Unit:ft**2 \t\t\t#Exit area\n",
+ "\n",
+ "# Calculations and Results\n",
+ "m = Rho1*A1V1; \t\t\t#Unit:kg/min \t\t\t#mass rate of flow per unit time\n",
+ "print \"Mass flow rate is %.2f kg/min\"%(m);\n",
+ "\n",
+ "Rho2 = Rho1; \t\t\t#Unit:kg/m**3 \t\t\t#the density of the fluid at exit\n",
+ "#m = Rho2*A2*V2\n",
+ "#So,\n",
+ "V2 = m/(Rho2*A2); \t\t\t#The exit velocity \t\t\t#Unit:m/min\n",
+ "print \"The exit velocity is %.2f m/min\"%(V2);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass flow rate is 2000000.00 kg/min\n",
+ "The exit velocity is 4000.00 m/min\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.7 Page No : 97"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Given value\n",
+ "Rho = 62.4 \t\t\t#Unit:lbm/ft**3 \t\t\t#the density of the fluid\n",
+ "V = 100 \t\t\t#Unit:ft/s \t\t\t#Velocity of fluid\n",
+ "d = 1 \t\t\t#Unit:in \t\t\t#Diameter\n",
+ "\n",
+ "# Calculations\n",
+ "#1 ft**2 = 144 in**2 \t\t\t#A = (math.pi/4)*d**2\n",
+ "A = (math.pi*d**2)/(4*144) \t\t\t#Unit:ft**2 \t\t\t#area \n",
+ "m = Rho*A*V; \t\t\t#Unit:lbm/s \t\t\t#mass rate of flow per unit time\n",
+ "\n",
+ "# Results\n",
+ "print \"Mass flow rate is %.2f lbm/s\"%(m);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass flow rate is 34.03 lbm/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.8 Page No : 98"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Given value\n",
+ "m1 = 50000.; \t\t\t#Unit:LBm/hr \t\t\t#An inlet steam flow\n",
+ "v1 = 0.831 \t\t\t#Unit:ft**3/LBm \t\t\t#Specific volume of inlet steam\n",
+ "d1 = 6. \t\t\t#Unit:in \t\t\t#Inlet diameter\n",
+ "\n",
+ "# Calculations and Results\n",
+ "A1 = (math.pi*d1**2)/(4*144) \t\t\t#1 ft**2 = 144 in**2 \t\t\t#Entering area\n",
+ "V1 = (m1*v1)/(A1*60*60) \t\t\t#(60 min/hr * 60 s/min) \t\t\t#To convert hours into seconds \t\t\t#velocity at inlet\n",
+ "print \"The velocity at inlet is %.2f ft/s\"%(V1);\n",
+ "\n",
+ "\n",
+ "m2 = m1; \t\t\t#Unit:LBm/hr \t\t\t#m2 = An outlet steam flow\n",
+ "v2 = 1.825 \t\t\t#Unit:ft**3/LBm \t\t\t#Specific volume of outlet steam\n",
+ "d2 = 8 \t\t\t#Unit:in \t\t\t#Outlet diameter\n",
+ "A2 = (math.pi*d2**2)/(4*144) \t\t\t#1 ft**2 = 144 in**2 \t\t\t#Exit area\n",
+ "V2 = (m1*v2)/(A2*60*60) \t\t\t#(60 min/hr * 60 s/min) \t\t\t#To convert hours into seconds \t\t\t#velocity at outlet\n",
+ "print \"The velocity at outlet is %.2f ft/s\"%(V2);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity at inlet is 58.78 ft/s\n",
+ "The velocity at outlet is 72.61 ft/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.9 Page No : 99"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Given value\n",
+ "m1 = 10000; \t\t\t#Unit:kg/hr \t\t\t#An inlet steam flow\n",
+ "v1 = 0.05 \t\t\t#Unit:m**3/kg \t\t\t#Specific volume of inlet steam\n",
+ "d1 = 0.1 \t\t\t#Unit:m \t\t\t#Inlet diameter \t\t\t#100 mm = 0.1 m\n",
+ "\n",
+ "# Calculations and Results\n",
+ "A1 = (math.pi/4)*d1**2 \t\t\t#Unit:m**2 \t\t\t#Entering area\n",
+ "V1 = (m1*v1)/(A1*60*60) \t\t\t#(60 min/hr * 60 s/min) \t\t\t#To convert hours into seconds \t\t\t#velocity at inlet \t\t\t#Unit:m/s\n",
+ "print \"The velocity at inlet is %.2f m/s\"%(V1);\n",
+ "\n",
+ "\n",
+ "m2 = m1; \t\t\t#Unit:kg/hr \t\t\t#m2 = An outlet steam flow\n",
+ "v2 = 0.10 \t\t\t#Unit:m**3/kg \t\t\t#Specific volume of outlet steam\n",
+ "d2 = 0.2 \t\t\t#Unit:m \t\t\t#Outlet diameter \t\t\t#200 mm = 0.2 m\n",
+ "A2 = (math.pi/4)*(d2**2) \t\t\t#Unit:m**2 \t\t\t#Exit area\n",
+ "V2 = (m1*v2)/(A2*60*60) \t\t\t#(60 min/hr * 60 s/min) \t\t\t#To convert hours into seconds \t\t\t#velocity at outlet \t\t\t#Unit:m/s\n",
+ "print \"The velocity at outlet is %.2f m/s\"%(V2);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity at inlet is 17.68 m/s\n",
+ "The velocity at outlet is 8.84 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.10 Page No : 105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given value\n",
+ "Cp = 0.22; \t\t\t#Unit:Btu/(LBm*R) \t\t\t#Specific heat for constant pressure process\n",
+ "Cv = 0.17; \t\t\t#Unit:Btu/(LBm*R) \t\t\t#Specific heat for constant volume process\n",
+ "q = 800./10; \t\t\t#data given:800 Btu as heat is added to 10 LBm \t\t\t#Unit:Btu/LBm\n",
+ "T1 = 100; \t\t\t#Unit:Fahrenheit \t\t\t#Initial temperature \t\t\t#T2 = Final temperature\n",
+ "\n",
+ "# Calculations\n",
+ "#For a non-flow,constant pressure process\n",
+ "#q = deltah = h2-h1 = Cp(T2-T1) \t\t\t#deltah = change in enthalpy\n",
+ "#deltaT = T2-T1;\n",
+ "deltaT = q/Cp; \t\t\t#Fahrenheit \t\t\t#change in temperature\n",
+ "T2 = deltaT+T1; \t\t\t#Fahrenheit \t\t\t#final temperature\n",
+ "#For a constant volume pressure\n",
+ "#u2-u1 = Change in internal energy \t\t\t#w = workdone\n",
+ "#q-w = u2-u1\n",
+ "#-w = (u2-u1)-q = Cv*(T2-T1)-q\n",
+ "w = -(Cv*(T2-T1)-q); \t\t\t#Unit:Btu/lbm \t\t\t#workdone\n",
+ "\n",
+ "# Results\n",
+ "print \"%.2f Btu/lbm work is taken out of the system due to workdone by gas\"%(w);\n",
+ "print \"As there is 10 lbm in the system\"\n",
+ "print \"%.2f Btu work is taken out of the system due to workdone by gas\"%(w*10);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "18.18 Btu/lbm work is taken out of the system due to workdone by gas\n",
+ "As there is 10 lbm in the system\n",
+ "181.82 Btu work is taken out of the system due to workdone by gas\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.11 Page No : 111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Given data\n",
+ "# Inlet Outlet\n",
+ "#Pressure(psia) 1000 1\n",
+ "#Temperature(F) 1000 101.74\n",
+ "#Velocity(ft/s) 125 430\n",
+ "#Inlet position(ft) +10 0\n",
+ "#Enthalpy(Btu/LBm) 1505.4 940.0\n",
+ "#Steam flow rate of 150000 LBm/hr\n",
+ "\n",
+ "#From the table,\n",
+ "Z1 = 10; \n",
+ "V1 = 125; \n",
+ "h1 = 1505.4; \n",
+ "Z2 = 0; \n",
+ "V2 = 430; \n",
+ "h2 = 940.0;\n",
+ "\n",
+ "#Energy equation is given by\n",
+ "#((Z1/J)*(g/gc)) + (V1**2/(2*gc*J)) + h1 + q = ((Z2/J)*(g/gc)) + (V2**2/(2*gc*J)) + h2 + w/J\n",
+ "print \"Solution for a \";\n",
+ "q = 0; \t\t\t#net heat\n",
+ "J = 778.; \t\t\t#Conversion factor\n",
+ "gc = 32.174; \t\t\t#Unit: (LBm*ft)/(LBf*s**2) \t\t\t#gc is constant of proportionality\n",
+ "g = gc; \t\t\t#Unit:ft/s**2 \t\t\t#g = The local gravity\n",
+ "#W1 = w/J;\n",
+ "#Energy equation is given by\n",
+ "W1 = ((Z1/J)*(g/gc)) + (V1**2/(2*gc*J)) + h1 + q - ((Z2/J)*(g/gc)) - (V2**2/(2*gc*J)) - h2; \t\t\t#Unit:Btu/LBm\n",
+ "print \"If heat losses are negligible\"\n",
+ "print \"Total work of the turbine is %.2f Btu/LBm\"%(W1);\n",
+ "print \"Total work of the turbine is %.2f Btu/hr\"%(W1*150000); \n",
+ "#(W*150000*778)/(60*33000) \t\t\t#in terms of horsepower \t\t\t#1 hr = 60 min \t\t\t#1 hp = 33000 (ft*LBf)\n",
+ "print \"Total work of the turbine is %.2f hp \"%(((W1*150000*778)/60*33000)); \n",
+ "#1 hp = 0.746 kW\n",
+ "print \"Total work of the turbine is %.2f kW \"%((((W1*150000*778)/60*33000))*0.746);\n",
+ "\n",
+ "\n",
+ "print \"Solution for b \";\n",
+ "#Heat losses equal 50,000 Btu/hr\n",
+ "q = 50000./150000; \t\t\t#Unit:Btu/LBm \t\t\t#Heat loss\n",
+ "W2 = ((Z1/J)*(g/gc)) + (V1**2/(2*gc*J)) + h1 - q - ((Z2/J)*(g/gc)) - (V2**2/(2*gc*J)) - h2; \t\t\t#Unit:Btu/LBm\n",
+ "print \"If heat losses equal 50,000 Btu/hr , Total work of the turbine is %.2f Btu/LBm\"%(W2);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Solution for a \n",
+ "If heat losses are negligible\n",
+ "Total work of the turbine is 562.03 Btu/LBm\n",
+ "Total work of the turbine is 84304739.48 Btu/hr\n",
+ "Total work of the turbine is 36073998024056.70 hp \n",
+ "Total work of the turbine is 26911202525946.29 kW \n",
+ "Solution for b \n",
+ "If heat losses equal 50,000 Btu/hr , Total work of the turbine is 561.70 Btu/LBm\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.12 Page No : 112"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "Z1 = 2; \t\t\t#Unit:m \t\t\t#Inlet position\n",
+ "g = 9.81 \t\t\t#Unit:m/s**2 \t\t\t#g = The local gravity\n",
+ "V1 = 40; \t\t\t#Unit:m/s \t\t\t#Inlet velocity\n",
+ "h1 = 3433.8; \t\t\t#Unit:kJ/kg \t\t\t#Inlet enthalpy\n",
+ "q = 1 \t\t\t#Unit:kJ/kg \t\t\t#Heat losses\n",
+ "Z2 = 0; \t\t\t#Outlet position \t\t\t#unit:m\n",
+ "V2 = 162; \t\t\t#Unit:m/s \t\t\t#Outlet velocity\n",
+ "h2 = 2675.5; \t\t\t#Unit:kJ/kg \t\t\t#Outlet enthalpy\n",
+ "\n",
+ "#Energy equation is given by\n",
+ "#((Z1*g)) + (V1**2/2) + h1 + q = ((Z2*g) + (V2**2/2) + h2 + w\n",
+ "\n",
+ "w = ((Z1*g)/1000) + ((V1**2/2)/1000) + h1 - q - ((Z2*g)/1000) - ((V2**2/2)/1000) - h2 ; \t\t\t#Unit:kJ/kg \t\t\t#Conersation: 1 kJ = 1000 J\n",
+ "print \"The work output per kimath.logram is %.2f kJ/kg\"%(w);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The work output per kimath.logram is 744.32 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.13 Page No : 113"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "p1 = 150; \t\t\t#Unit:psia \t\t\t#Initial pressure\n",
+ "T1 = 1000; \t\t\t#Unit:R \t\t\t#Temperature at pressure p1\n",
+ "p2 = 15; \t\t\t#Unit:psia \t\t\t#Final pressure\n",
+ "T2 = 600; \t\t\t#Unit:R \t\t\t#Temperature at pressure p2\n",
+ "Cp = 0.24; \t\t\t#Unit:Btu/(LBm*R) \t\t\t#Specific heat for constant pressure process\n",
+ "v1 = 2.47; \t\t\t#Unit:ft**3/LBm \t\t\t#Specific volume at inlet conditions\n",
+ "v2 = 14.8; \t\t\t#Unit:ft**3/LBm \t\t\t#Specific volume at outlet conditions\n",
+ "\n",
+ "#For a non-flow,constant pressure process\n",
+ "#w/J = deltah = h2-h1 = Cp(T2-T1) \t\t\t#deltah = change in enthalpy\n",
+ "#W = w/J\n",
+ "W = Cp*(T1-T2); \t\t\t#W = Work output \t\t\t#Unit:Btu/LBm\n",
+ "\n",
+ "# Results\n",
+ "print \"The work output of the turbine per pound of working fluid is %.2f Btu/LBm\"%(W);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The work output of the turbine per pound of working fluid is 96.00 Btu/LBm\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.14 Page No : 114"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#In problem 3.13 ,\n",
+ "p1 = 150.; \t\t\t#Unit:psia \t\t\t#Initial pressure\n",
+ "T1 = 1000.; \t\t\t#Unit:R \t\t\t#Temperature at pressure p1\n",
+ "p2 = 15.; \t\t\t#Unit:psia \t\t\t#Final pressure\n",
+ "T2 = 600.; \t\t\t#Unit:R \t\t\t#Temperature at pressure p2\n",
+ "Cp = 0.24; \t\t\t#Unit:Btu/(LBm*R) \t\t\t#Specific heat for constant pressure process\n",
+ "v1 = 2.47; \t\t\t#Unit:ft**3/LBm \t\t\t#Specific volume at inlet conditions\n",
+ "v2 = 14.8; \t\t\t#Unit:ft**3/LBm \t\t\t#Specific volume at outlet conditions\n",
+ "\n",
+ "#For a non-flow,constant pressure process\n",
+ "#w/J = deltah = h2-h1 = Cp(T2-T1) \t\t\t#deltah = change in enthalpy\n",
+ "#W = w/J\n",
+ "W = Cp*(T1-T2); \t\t\t#W = Work output \t\t\t#Unit:Btu/LBm \t\t\t#h2-h1\n",
+ "print \"In problem 3.13, The work output of the turbine per pound of working fluid is %.2f Btu/LBm \"%(W);\n",
+ "\n",
+ "#Now,In problem 3.14 , \n",
+ "q = 1.1; \t\t\t#Unit:Btu/LBm \t\t\t#Heat losses\n",
+ "#For a non-flow,constant pressure process\n",
+ "#q-w/J = deltah = h2-h1 = Cp(T2-T1) \t\t\t#deltah = change in enthalpy\n",
+ "#W1 = w/J\n",
+ "W1 = -q+W; \t\t\t#W = Work output \t\t\t#Unit:Btu/LBm \t\t\t#W = h2-h1 \t\t\t#Because q is out of the system,it is a negative quantity\n",
+ "print \"In problem 3.14%(heat loss equal to 1.1 Btu/LBm\"\n",
+ "print \"The work output of the turbine per pound of working fluid is %.2f Btu/LBm \"%(W1);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "In problem 3.13, The work output of the turbine per pound of working fluid is 96.00 Btu/LBm \n",
+ "In problem 3.14%(heat loss equal to 1.1 Btu/LBm\n",
+ "The work output of the turbine per pound of working fluid is 94.90 Btu/LBm \n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.15 Page No : 115"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "p1 = 100.; \t\t\t#Unit:psia \t\t\t#Initial pressure\n",
+ "t1 = 950.; \t\t\t#Unit:Fahrenheit \t\t\t#Temperature at pressure p1\n",
+ "p2 = 76.; \t\t\t#Unit:psia \t\t\t#Final pressure\n",
+ "t2 = 580.; \t\t\t#Unit:Fahrenheit \t\t\t#Temperature at pressure p2\n",
+ "v1 = 4.; \t\t\t#Unit:ft**3/LBm \t\t\t#Specific volume at inlet conditions\n",
+ "v2 = 3.86; \t\t\t#Unit:ft**3/LBm \t\t\t#Specific volume at outlet conditions\n",
+ "Cv = 0.32; \t\t\t#Unit:Btu/(LBm*R) \t\t\t#Specific heat for constant volume process\n",
+ "\n",
+ "T1 = t1+460; \t\t\t#Unit:R \t\t\t#Temperature at pressure p1\n",
+ "T2 = t2+460; \t\t\t#Unit:R \t\t\t#Temperature at pressure p2\n",
+ "J = 778.; \t\t\t#J = Conversion factor\n",
+ "\n",
+ "#Z1 = Inlet position \t\t\t#Unit:m \n",
+ "#V1 = Inlet velocity \t\t\t#Unit:m/s\n",
+ "#Z2 = Outlet position \t\t\t#Unit:m \n",
+ "#V2 = Outlet velocity Unit:m/s \n",
+ "#u1 = internal energy \t\t\t#energy in\n",
+ "#u2 = internal energy \t\t\t#energy out\n",
+ "\n",
+ "#Energy equation is given by\n",
+ "#((Z1/J)*(g/gc)) + (V1**2/(2*gc*J)) + u1 + ((p1*v1)/J) + q = ((Z2/J)*(g/gc)) + (V2**2/(2*gc*J)) + u2 + ((p2*v2)/J) + w/J; \t\t\t#Unit:Btu/LBm\n",
+ "#Because pipe is horizontal and velocity terms are to be neglected, \n",
+ "# Also no work crosses the boundaries of the system, the energy equation is reduced to\n",
+ "#u1 + ((p1*v1)/J) + q = u2 + ((p2*v2)/J)\n",
+ "#u2-u1 = Cv*(T2-T1) \t\t\t#For a constant volume process \t\t\t#u2-u1 = Chnage in internal energy\n",
+ "#So,\n",
+ "q = Cv*(T2-T1) + (p2*v2*144)/J - (p1*v1*144)/J; \t\t\t#q = heat transfer \t\t\t#1 ft**2 = 144 in**2 \t\t\t#Unit:Btu/LBm\n",
+ "\n",
+ "# Results\n",
+ "print \"%.2f Btu/LBm heat is transferred from the gas \"%(q);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-138.14 Btu/LBm heat is transferred from the gas \n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.16 Page No : 116"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#In problem 3.15,\n",
+ "p1 = 100; \t\t\t#Unit:psia \t\t\t#Initial pressure\n",
+ "t1 = 950; \t\t\t#Unit:Fahrenheit \t\t\t#Temperature at pressure p1\n",
+ "p2 = 76; \t\t\t#Unit:psia \t\t\t#Final pressure\n",
+ "t2 = 580; \t\t\t#Unit:Fahrenheit \t\t\t#Temperature at pressure p2\n",
+ "v1 = 4; \t\t\t#Unit:ft**3/LBm \t\t\t#Specific volume at inlet conditions\n",
+ "v2 = 3.86; \t\t\t#Unit:ft**3/LBm \t\t\t#Specific volume at outlet conditions\n",
+ "Cv = 0.32; \t\t\t#Unit:Btu/(LBm*R) \t\t\t#Specific heat for constant volume process\n",
+ "\n",
+ "T1 = t1+460; \t\t\t#Unit:R \t\t\t#Temperature at pressure p1\n",
+ "T2 = t2+460; \t\t\t#Unit:R \t\t\t#Temperature at pressure p2\n",
+ "J = 778.; \t\t\t#J = Conversion factor\n",
+ "gc = 32.174; \t\t\t#Unit: (LBm*ft)/(LBf*s**2) \t\t\t#gc is constant of proportionality\n",
+ "g = gc; \t\t\t#Unit:ft/s**2 \t\t\t#g = The local gravity\n",
+ "\n",
+ "#Z1 = Inlet position \t\t\t#Unit:m \n",
+ "#V1 = Inlet velocity \t\t\t#Unit:m/s\n",
+ "#Z2 = Outlet position \t\t\t#Unit:m \n",
+ "#V2 = Outlet velocity Unit:m/s \n",
+ "#u1 = internal energy \t\t\t#energy in\n",
+ "#u2 = internal energy \t\t\t#energy out\n",
+ "\n",
+ "#Energy equation is given by\n",
+ "#((Z1/J)*(g/gc)) + (V1**2/(2*gc*J)) + u1 + ((p1*v1)/J) + q = ((Z2/J)*(g/gc)) + (V2**2/(2*gc*J)) + u2 + ((p2*v2)/J) + w/J; \t\t\t#Unit:Btu/LBm\n",
+ "#In 3.15, the elevation of the pipe at section 1 makes Z1 = 0\n",
+ "# Also no work crosses the boundaries of the system, the energy equation is reduced to\n",
+ "#u1 + ((p1*v1)/J) + q = u2 + ((p2*v2)/J) + ((Z2/J)*(g/gc))\n",
+ "#In problrm 3.16,\n",
+ "Z2 = 100; \t\t\t#Given \t\t\t#Unit:ft \t\t\t#Outlet position\n",
+ "#u2-u1 = Cv*(T2-T1) \t\t\t#For a constant volume process \t\t\t#u2-u1 = Chnage in internal energy\n",
+ "#So,\n",
+ "q = Cv*(T2-T1) + (p2*v2*144)/J - (p1*v1*144)/J + ((Z2/J)*(g/gc)) ; \t\t\t#q = heat transfer \t\t\t#1 ft**2 = 144 in**2 \t\t\t#Unit:Btu/LBm\n",
+ "\n",
+ "# Results\n",
+ "print \"%.2f Btu/LBm heat is transferred from the gas \"%(q);\n",
+ "#For this problem , neglecting the elevation term leads to an insignificant error\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "-138.01 Btu/LBm heat is transferred from the gas \n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.17 Page No : 117"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "p1 = 1000; \t\t\t#Unit:psia \t\t\t#Initial pressure\n",
+ "t1 = 100; \t\t\t#Unit:Fahrenheit \t\t\t#Temperature at pressure p1\n",
+ "p2 = 1000; \t\t\t#Unit:psia \t\t\t#Final pressure\n",
+ "t2 = 1000; \t\t\t#Unit:Fahrenheit \t\t\t#Temperature at pressure p2\n",
+ "# feed in 10,000 LBm/hr \n",
+ "h1 = 70.68 \t\t\t#Unit:Btu/LBm \t\t\t#Inlet enthalpy\n",
+ "h2 = 1505.9 \t\t\t#Unit:Btu/LBm \t\t\t#Outlet enthalpy\n",
+ "\n",
+ "T1 = t1+460; \t\t\t#Unit:R \t\t\t#Temperature at pressure p1\n",
+ "T2 = t2+460; \t\t\t#Unit:R \t\t\t#Temperature at pressure p2\n",
+ "#Energy equation is given by\n",
+ "J = 778; \t\t\t#J = Conversion factor\n",
+ "\n",
+ "#Z1 = Inlet position \t\t\t#Unit:m \n",
+ "#V1 = Inlet velocity \t\t\t#Unit:m/s\n",
+ "#Z2 = Outlet position \t\t\t#Unit:m \n",
+ "#V2 = Outlet velocity Unit:m/s \n",
+ "#u1 = internal energy \t\t\t#energy in\n",
+ "#u2 = internal energy \t\t\t#energy out\n",
+ "#h = enthalpy\n",
+ "\n",
+ "#Energy equation is given by\n",
+ "#((Z1/J)*(g/gc)) + (V1**2/(2*gc*J)) + u1 + ((p1*v1)/J) + q = ((Z2/J)*(g/gc)) + (V2**2/(2*gc*J)) + u2 + ((p2*v2)/J) + w/J; \t\t\t#Unit:Btu/LBm\n",
+ "\n",
+ "#we can consider this system as a math.single unit with feed water entering ans steam leaving. \n",
+ "#It well designed,this unit will be thoroughly insulated,and heat losse will be reduced to a negligible amount\n",
+ "#Alos,no work will be added to the fluid during the time it is pasmath.sing through the unit, and kinetic energy differences will be assumed to be negligibly small\n",
+ "#Differennces in elevation also be considered negligible\n",
+ "#So,the energy equation is reduced to \n",
+ "#u1 + ((p1*v1)/J) + q = u2 + ((p2*v2)/J)\n",
+ "#Because h = u+(p*v/J)\n",
+ "q = h2-h1; \t\t\t#q = net heat losses \t\t\t#Unit:Btu/LBm\n",
+ "\n",
+ "# Results\n",
+ "print \"Net heat losses is %.2f Btu/LBm \"%(q);\n",
+ "print \"For 10000 LBm/hr\"\n",
+ "print \"%.2f Btu/hr energy has been added to the water to convert it to steam\"%(q*10000)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Net heat losses is 1435.22 Btu/LBm \n",
+ "For 10000 LBm/hr\n",
+ "14352200.00 Btu/hr energy has been added to the water to convert it to steam\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.18 Page No : 119"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "h1 = 1220 \t\t\t#Unit:Btu/LBm \t\t\t#Inlet enthalpy\n",
+ "h2 = 1100 \t\t\t#Unit:Btu/LBm \t\t\t#Outlet enthalpy\n",
+ "\n",
+ "#Z1 = Inlet position \t\t\t#Unit:m \n",
+ "#V1 = Inlet velocity \t\t\t#Unit:m/s\n",
+ "#Z2 = Outlet position \t\t\t#Unit:m \n",
+ "#V2 = Outlet velocity Unit:m/s \n",
+ "#u1 = internal energy \t\t\t#energy in\n",
+ "#u2 = internal energy \t\t\t#energy out\n",
+ "J = 778; \t\t\t#J = Conversion factor\n",
+ "gc = 32.174; \t\t\t#Unit: (LBm*ft)/(LBf*s**2) \t\t\t#gc is constant of proportionality\n",
+ "\n",
+ "#Energy equation is given by\n",
+ "#((Z1/J)*(g/gc)) + (V1**2/(2*gc*J)) + u1 + ((p1*v1)/J) + q = ((Z2/J)*(g/gc)) + (V2**2/(2*gc*J)) + u2 + ((p2*v2)/J) + w/J; \t\t\t#Unit:Btu/LBm\n",
+ "\n",
+ "#For this device,differences in elevation are negligible.No work is done on or by the fluid,friction is negligible\n",
+ "#And due to the speed of the fluid flowing and the short length of the nozzle,heat transfer to or from the surroundings is also negligible.\n",
+ "#So,the energy equation is reduced to \n",
+ "#u1 + ((p1*v1)/J) +(V1**2/(2*gc*J) = u2 + ((p2*v2)/J) + (V2**2/(2*gc*J)\n",
+ "# h1-h2 = ((V2**2-V1**2)/(2*gc*J))\n",
+ "\n",
+ "print \"Solution for a\";\n",
+ "#For neglegible entering velocity, V1 = 0\n",
+ "#So,\n",
+ "V2 = math.sqrt((2*gc*J)*(h1-h2)); \t\t\t#the final velocity \t\t\t#ft/s\n",
+ "print \"It the initial velocity of the system is negligible, the final velocity is %.2f ft/s \"%(V2);\n",
+ "\n",
+ "print \"Solution for b\";\n",
+ "#If the initial velocity is appreciable,\n",
+ "V1 = 1000; \t\t\t#Unit:ft/s \t\t\t#the initial velocity \n",
+ "V2 = math.sqrt(((h1-h2)*(2*gc*J)) + V1**2 ) ;\n",
+ "print \"It the initial velocity of the system is appreciable, the final velocity is %.2f ft/s \"%(V2);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Solution for a\n",
+ "It the initial velocity of the system is negligible, the final velocity is 2451.03 ft/s \n",
+ "Solution for b\n",
+ "It the initial velocity of the system is appreciable, the final velocity is 2647.17 ft/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.19 Page No : 120"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given value\n",
+ "h1 = 3450*1000 \t\t\t#Unit:J/kg \t\t\t#Enthalpy of steam when it enters a nozzle\n",
+ "h2 = 2800*1000 \t\t\t#Unit:J/kg \t\t\t#Enthalpy of steam when it leaves a nozzle\n",
+ "\n",
+ "# Calculations\n",
+ "#V2**2/2 = h1-h2;\n",
+ "V2 = math.sqrt(2*(h1-h2)); \t\t\t#V2 = Final velocity \t\t\t#Unit:m/s\n",
+ "\n",
+ "# Results\n",
+ "print \"Final velocity = %.2f m/s\"%(V2);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Final velocity = 1140.18 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.21 Page No : 125"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given value\n",
+ "m = 400; \t\t\t#Unit:LBm/min \t\t\t#mass of lubricating oil\n",
+ "Cp = 0.85; \t\t\t#Unit:Btu/LBm*R \t\t\t#Specific heat of the oil\n",
+ "T1 = 215; \t\t\t#Temperature when hot oil is entering \t\t\t#Unit:Fahrenheit\n",
+ "T2 = 125; \t\t\t#Temperature when hot oil is leaving \t\t\t#Unit:Fahrenheit\n",
+ "\n",
+ "# Calculations and Results\n",
+ "DeltaT = T2-T1; \t\t\t#Unit:Fahrenheit \t\t\t#change in temperature\n",
+ "Qoil = m*Cp*DeltaT; \t\t\t#Heat out of oil \t\t\t#Btu/min\n",
+ "print \"Heat out of oil is %.2f Btu/min Out of oil\"%(Qoil);\n",
+ "#Heat out of oil is the heat into the water\n",
+ "#Mw = Water flow rate\n",
+ "#M*Cpw*DeltaTw = Qoil\n",
+ "Cpw = 1.0; \t\t\t#Unit:Btu/LBm*R \t\t\t#Specific heat of the water\n",
+ "T3 = 60.; \t\t\t#Temperature when water is entering \t\t\t#Unit:Fahrenheit\n",
+ "T4 = 90; \t\t\t#Temperature when water is leaving \t\t\t#Unit:Fahrenheit\n",
+ "DeltaTw = T4-T3; \t\t\t#Unit:Fahrenheit \t\t\t#change in temperature\n",
+ "Mw = Qoil/(Cpw*DeltaTw); \t\t\t#The Required water flow rate \t\t\t#Unit;lbm/Min\n",
+ "print \"The Required water flow rate is %.2f lbm/Min\"%(abs(Mw));\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat out of oil is -30600.00 Btu/min Out of oil\n",
+ "The Required water flow rate is 1020.00 lbm/Min\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch4_1.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch4_1.ipynb
new file mode 100644
index 00000000..d0e5bbf4
--- /dev/null
+++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch4_1.ipynb
@@ -0,0 +1,656 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:81c0b2f6374783dbad513f5ebbb51829b49d5e29c2d28b8cf1616c5d410d60b5"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4 : The Second Law of Thermodynamics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.1 Page No : 148"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "t1 = 1000.; \t\t\t#(unit:fahrenheit) \t\t\t#Source temperature\n",
+ "t2 = 80.; \t\t\t#(unit:fahrenheit) \t\t\t#Sink temperature\n",
+ "#solution\n",
+ "#converting temperatures to absolute temperatures;\n",
+ "T1 = t1+460; \t\t\t#Source temperature \t\t\t#Unit:R\n",
+ "T2 = t2+460; \t\t\t#Sink temperature \t\t\t#Unit:R\n",
+ "\n",
+ "print \"Solution for a\";\n",
+ "ans = ((T1-T2)/T1)*100;\t\t\t#(ans in %) \t\t\t#Efficiency of the engine\n",
+ "print \"Efficiency of the engine is %.2f percentage\"%(ans);\n",
+ "\n",
+ "print \"Solution for b\";\n",
+ "T1 = 2000+460; \t\t\t#Source temperature \t\t\t#Unit:R\n",
+ "T2 = t2+460; \t\t\t#Sink temperature \t\t\t#Unit:R\n",
+ "ans = ((T1-T2)/T1)*100;\t\t\t#(ans in %) \t\t\t#Efficiency of the engine\n",
+ "print \"When the upper tempretrature is increased upto certain ,Efficiency of the engine is %.2f percentage \"%(ans);\n",
+ "\n",
+ "print \"Solution for c\";\n",
+ "T1 = t1+460; \t\t\t#Source temperature \t\t\t#Unit:R\n",
+ "T2 = 160+460; \t\t\t#Sink temperature \t\t\t#Unit:R\n",
+ "ans = ((T1-T2)/T1)*100;\t\t\t#(ans in %) \t\t\t#Efficiency of the engine\n",
+ "print \"When the lower tempretrature is increased upto certain ,Efficiency of the engine is %.2f percentage \"%(ans);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Solution for a\n",
+ "Efficiency of the engine is 63.01 percentage\n",
+ "Solution for b\n",
+ "When the upper tempretrature is increased upto certain ,Efficiency of the engine is 78.05 percentage \n",
+ "Solution for c\n",
+ "When the lower tempretrature is increased upto certain ,Efficiency of the engine is 57.53 percentage \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.2 Page No : 149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "Qin = 100.; \t\t\t#heat added to the cycle \n",
+ "\n",
+ "print \"In problem 4.1\"\n",
+ "#given data\n",
+ "t1 = 1000.; \t\t\t#(unit:fahrenheit) \t\t\t#Source temperature\n",
+ "t2 = 80.; \t\t\t#(unit:fahrenheit) \t\t\t#Sink temperature\n",
+ "#solution\n",
+ "#converting temperatures to absolute temperatures;\n",
+ "T1 = t1+460; \t\t\t#Source temperature \t\t\t#Unit:R\n",
+ "T2 = t2+460; \t\t\t#Sink temperature \t\t\t#Unit:R\n",
+ "print \"Solution for a\";\n",
+ "print \"Efficiency of the engine is %.2f percentage\"%(((T1-T2)/T1)*100);\n",
+ "\n",
+ "print \"Now in problem 4.2\"\n",
+ "W = 0.63*Qin; \t\t\t#W = W/J; \t\t\t#Efficiency in problem 4.1 \n",
+ "W = Qin*(W/Qin); \t\t\t#amount of work\n",
+ "Qr = Qin-W; \t\t\t#Qin-Qr = W/J \t\t\t#Qr = heat rejected by the cycle\n",
+ "print \"The heat removed from the reservoir %.2f units\"%(Qr);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "In problem 4.1\n",
+ "Solution for a\n",
+ "Efficiency of the engine is 63.01 percentage\n",
+ "Now in problem 4.2\n",
+ "The heat removed from the reservoir 37.00 units\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.3 Page No : 149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "t1 = 70.; \t\t\t#(unit:fahrenheit) \t\t\t#Source temperature\n",
+ "t2 = 15.; \t\t\t#(unit:fahrenheit) \t\t\t#Sink temperature\n",
+ "Qin = 125000.; \t\t\t#(unit = Btu/hr) \t\t\t#Qin = heat added to the cycle\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#converting temperatures to absolute temperatures;\n",
+ "T1 = t1+460; \t\t\t#Source temperature \t\t\t#Unit:R\n",
+ "T2 = t2+460; \t\t\t#Sink temperature \t\t\t#Unit:R\n",
+ "Qr = Qin*(T2/T1); \t\t\t#Qr = heat rejected by the cycle\n",
+ "print \"Qr is %.2f in Btu/hr\"%(Qr);\n",
+ "work = Qin-Qr; \t\t\t#reversed cycle requires atleast input \t\t\t#work \t\t\t#btu/hr\n",
+ "print \"Work is %.2f in Btu/hr\"%(work);\n",
+ "# 1 hp = 33000 ft*LBf/min \n",
+ "# 1 Btu = 778 ft*LBf \t\t\t#1 hr = 60 min\n",
+ "print \"Minimum horsepower input required is %.2f hp\"%((work*778/60*33000));\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Qr is 112028.30 in Btu/hr\n",
+ "Work is 12971.70 in Btu/hr\n",
+ "Minimum horsepower input required is 5550589622.64 hp\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.4 Page No : 150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "W = (50.*33000)/778;\t\t\t#output \t\t\t#W = W/J\n",
+ "# 1 hp = 33000 ft*LBf/min \n",
+ "# 1 Btu = 778 ft*LBf\n",
+ "print \"Output is %.2f in Btu/min\"%(W);\n",
+ "t1 = 1000.; \t\t\t#Source temperature \t\t\t#(unit:fahrenheit)\n",
+ "t2 = 100.; \t\t\t#Sink temperature \t\t\t#(unit:fahrenheit)\n",
+ "#converting temperatures to absolute temperatures;\n",
+ "T1 = t1+460; \t\t\t#Source temperature \t\t\t#Unit:R\n",
+ "T2 = t2+460; \t\t\t#Sink temperature \t\t\t#Unit:R\n",
+ "n = (1-(T2/T1))*100; \t\t\t#efficiency\n",
+ "print \"Efficiency is %.2f percentage\"%(n);\t\t\t#in %)\n",
+ "#n = (W/J)/Qin\n",
+ "Qin = W/(n/100);\t\t\t#(unit Btu/hr) \t\t\t#Qin = heat added to the cycle\n",
+ "print \"Heat added to the cycle is %.2f in Btu/min\"%(Qin);\n",
+ "Qr = Qin*(1-(n/100));\t\t\t#(unit Btu/hr) \t\t\t#Qr = heat rejected by the cycle\n",
+ "print \"Heat rejected by the cycle is %.2f in Btu/min \"%(Qr);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output is 2120.82 in Btu/min\n",
+ "Efficiency is 61.64 percentage\n",
+ "Heat added to the cycle is 3440.45 in Btu/min\n",
+ "Heat rejected by the cycle is 1319.62 in Btu/min \n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.5 Page No : 151"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "t1 = 700.; \t\t\t#Source temperature \t\t\t#Unit:Celcius\n",
+ "t2 = 20.; \t\t\t#Sink temperature \t\t\t#Unit:Celcius\n",
+ "#converting in F\n",
+ "T1 = t1+273; \t\t\t#Source temperature \t\t\t#Unit:R\n",
+ "T2 = t2+273; \t\t\t#Sink temperature \t\t\t#Unit:R\n",
+ "n = (T1-T2)/T1*100; \t\t\t#Efficiency\n",
+ "print \"Efficiency is %.2f percentage\"%(n);\t\t\t#in %)\n",
+ "output = 65;\t\t\t#in hp \t\t\t#Given\n",
+ "work = output*0.746;\t\t\t#(unit kJ/s) \t\t\t# 1 hp = 746 W\n",
+ "print \"Work is %.2f kJ/s\"%(work);\n",
+ "Qin = work/(n/100);\t\t\t#(unit kJ/s) \t\t\t#Qin = heat added to the cycle\n",
+ "print \"Heat added to the cycle is %.2f kJ/s \"%(Qin);\n",
+ "Qr = Qin*(1-(n/100));\t\t\t#(unit kJ/s) \t\t\t#Qr = heat rejected by the cycle\n",
+ "print \"Heat rejected by the cycle is %.2f kJ/s \"%(Qr);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Efficiency is 69.89 percentage\n",
+ "Work is 48.49 kJ/s\n",
+ "Heat added to the cycle is 69.38 kJ/s \n",
+ "Heat rejected by the cycle is 20.89 kJ/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.7 Page No : 152"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# given data\n",
+ "t1 = 700.; \t\t\t#(unit:fahrenheit) \t\t\t#Source temperature\n",
+ "t2 = 200.; \t\t\t#(unit:fahrenheit) \t\t\t#Sink temperature\n",
+ "#converting temperatures to absolute temperatures;\n",
+ "T1 = t1+460; \t\t\t#Source temperature \t\t\t#Unit:R\n",
+ "T2 = t2+460; \t\t\t#Sink temperature \t\t\t#Unit:R\n",
+ "#n1 = (T1-Ti)/T1 and n2 = (Ti-T2)/Ti \t\t\t#n1 & n2 are efficiency\n",
+ "#(T1-Ti)/T1 = (Ti-T2)/Ti;\n",
+ "Ti = math.sqrt(T1*T2); \t\t\t#Exhaust temperature \t\t\t#Unit:R\n",
+ "print \"Exhaust temperature of first engine is %.2f in R\"%(Ti);\n",
+ "#converting absolute temperature to normal F temperature\n",
+ "#Ti(fahrenheit) = Ti(R)-460;\n",
+ "print \"Exhaust temperature of first engine is %.2f fahrenheit\"%(Ti-460);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Exhaust temperature of first engine is 874.99 in R\n",
+ "Exhaust temperature of first engine is 414.99 fahrenheit\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.8 Page No : 157"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#For reversible isothermal process,\n",
+ "q = 843.7; \t\t\t#Heat \t\t\t#Unit:Btu \t\t\t#at 200 psia\n",
+ "t = 381.86; \t\t\t#(unit:fahrenheit) \t\t\t#temperature\n",
+ "#\t\t\t#converting temperatures to absolute temperatures;\n",
+ "T = t+460; \t\t\t#temperature \t\t\t#unit:R\n",
+ "deltaS = (q/T); \t\t\t#Change in entropy \t\t\t#Unit:Btu/lbm*R\n",
+ "\n",
+ "# Results\n",
+ "print \"Change in entropy is %.2f Btu/lbm*R\"%(deltaS); \t\t\t#1 LBm of saturated water\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in entropy is 1.00 Btu/lbm*R\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.9 Page No : 158"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#For reversible isothermal process,\n",
+ "#In problem 4.8,\n",
+ "q = 843.7; \t\t\t#Heat \t\t\t#Unit:Btu \t\t\t#at 200 psia\n",
+ "t = 381.86; \t\t\t#(unit:fahrenheit) \n",
+ "#converting temperatures to absolute temperatures;\n",
+ "T = t+460; \t\t\t#Unit:R\"\n",
+ "deltaS = (q/T); \t\t\t#Change in entropy \t\t\t#Btu/lbm\n",
+ "print \"Change in entropy is %.2f Btu/lbm*R\"%(deltaS); \t\t\t#1 LBm of saturated water\n",
+ "\n",
+ "#In problem 4.9\n",
+ "t1 = 381.86; \t\t\t#(unit:fahrenheit) \t\t\t#Source temperature\n",
+ "t2 = 50.; \t\t\t#(unit:fahrenheit) \t\t\t#Sink temperature\n",
+ "#converting temperatures to absolute temperatures;\n",
+ "T1 = t1+460; \t\t\t#Source temperature \t\t\t#Unit:R\n",
+ "T2 = t2+460; \t\t\t#Sink temperature \t\t\t#Unit:R\n",
+ "qin = q;\t\t\t#heat added to the cycle \n",
+ "n = (1-(T2/T1))*100; \t\t\t#Efficiency\n",
+ "print \"Efficiency is %.2f percentage\"%(n);\n",
+ "wbyJ = qin*n*0.01;\t\t\t#work output\n",
+ "print \"Work output is %.2f Btu/lbm\"%(wbyJ);\n",
+ "Qr = qin-wbyJ; \t\t\t#heat rejected\n",
+ "print \"Heat rejected is %.2f Btu/lbm\"%(Qr);\n",
+ "print \"As an alternative solution and refering to figure 4.12\"\n",
+ "qin = T1*deltaS; \t\t\t#heat added \t\t\t#btu/lbm\n",
+ "Qr = T2*deltaS; \t\t\t#Heat rejected \t\t\t#btu/lbm\n",
+ "print \"Heat rejected is %.2f Btu/lbm\"%(Qr);\n",
+ "wbyJ = qin-Qr; \t\t\t#Work output \t\t\t#Btu/lbm\n",
+ "print \"Work output is %.2f Btu/lbm\"%(wbyJ);\n",
+ "n = (wbyJ/qin)*100; \t\t\t#Efficiency\n",
+ "print \"Efficiency is %.2f percentage\"%(n);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in entropy is 1.00 Btu/lbm*R\n",
+ "Efficiency is 39.42 percentage\n",
+ "Work output is 332.59 Btu/lbm\n",
+ "Heat rejected is 511.11 Btu/lbm\n",
+ "As an alternative solution and refering to figure 4.12\n",
+ "Heat rejected is 511.11 Btu/lbm\n",
+ "Work output is 332.59 Btu/lbm\n",
+ "Efficiency is 39.42 percentage\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.10 Page No : 159"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given value\n",
+ "hfg = 1959.7; \t\t\t#Unit:kJ/kg \t\t\t#Evaporative enthalpy\n",
+ "T = 195.07+273; \t\t\t#Converted into Kelvin \t\t\t#Temperature\n",
+ "\n",
+ "# Calculations\n",
+ "deltaS = hfg/T; \t\t\t#Change in entropy \t\t\t#kJ/kg*K\n",
+ "\n",
+ "# Results\n",
+ "print \"Change in entropy at 1.4MPa for the vaporization of 1 kg is %.2f kJ/kg*K\"%(deltaS); \t\t\t#Values compares very closely to the Steam Tables value\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in entropy at 1.4MPa for the vaporization of 1 kg is 4.19 kJ/kg*K\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.11 Page No : 159"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Let is assume that a Carnot engine cycle operates between two temperatures in each case.\n",
+ "t = 1000.; \t\t\t#(unit:fahrenheit) \n",
+ "#converting temperatures to absolute temperatures;\n",
+ "T1 = t+460;\n",
+ "#T1*deltaS = Qin;\n",
+ "Qin = 100.; \t\t\t#Unit:Btu \t\t\t#heat added to the cycle \n",
+ "deltaS = Qin/T1; \t\t\t#Change in entropy \t\t\t#Btu/R\n",
+ "T2 = 50.+460; \t\t\t#converting 50 F temperature to absolute temperature;\n",
+ "Qr = T2*deltaS; \t\t\t#Heat rejected \t\t\t#Unit:Btu\n",
+ "print \"%.2f Btu energy is unavailable with respect to a receiver at 50 fahrenheit \"%(Qr);\n",
+ "T2 = 0+460; \t\t\t#converting 0 F temperature to absolute temperature;\n",
+ "Qr = T2*deltaS; \t\t\t#Heat rejected \t\t\t#unit:Btu\n",
+ "print \"%.2f Btu energy is unavailable with respect to a receiver at 0 fahrenheit \"%(Qr);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "34.93 Btu energy is unavailable with respect to a receiver at 50 fahrenheit \n",
+ "31.51 Btu energy is unavailable with respect to a receiver at 0 fahrenheit \n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.12 Page No : 160"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "Qin = 1000; \t\t\t#Unit:Joule \t\t\t#heat entered to the system\n",
+ "t = 500; \t\t\t#(unit:Celcius) \t\t\t#temperature\n",
+ "\t\t\t#converting temperature\n",
+ "T1 = t+273; \t\t\t#Unit:Kelvin\n",
+ "deltaS = Qin/T1; \t\t\t#Change in entropy \t\t\t#Unit:J/K\n",
+ "print \"Solution for a\"\n",
+ "T2 = 20+273; \t\t\t#converted 20 Celcius temperature to Kelvin;\n",
+ "Qr = T2*deltaS; \t\t\t#Heat rejected at 20 celcius \t\t\t#Joule\n",
+ "print \"%.2f Joule energy is unavailable with respect to a receiver at 20 Celcius\"%(Qr);\n",
+ "\n",
+ "print \"Solution for b\"\n",
+ "T2 = 0+273; \t\t\t#converted 0 Celcius temperature to Kelvin\n",
+ "Qr = T2*deltaS; \t\t\t#heat rejected at 0 celcius \t\t\t#Joule\n",
+ "print \"%.2f Joule energy is unavailable with respect to a receiver at 0 Celcius\"%(Qr);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Solution for a\n",
+ "293.00 Joule energy is unavailable with respect to a receiver at 20 Celcius\n",
+ "Solution for b\n",
+ "273.00 Joule energy is unavailable with respect to a receiver at 0 Celcius\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.13 Page No : 161"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#deltas = Cp*ln(T2/T1)\n",
+ "#Multiplying both the sides of equation by the mass m,\n",
+ "#DeltaS = m*Cp*ln(T2/T1)\n",
+ "m = 6.; \t\t\t#mass \t\t\t#Unit:lbm\n",
+ "Cp = 0.361; \t\t\t#Btu/lbm*R \t\t\t#Specific heat constant\n",
+ "DeltaS = -0.7062; \t\t\t#Unit:Btu/R \t\t\t#change in entropy\n",
+ "t = 1440.; \t\t\t#(unit:fahrenheit) \n",
+ "#converting temperatures to absolute temperatures;\n",
+ "T1 = t+460; \t\t\t#Unit:R\n",
+ "#Rearranging the equation,\n",
+ "T2 = T1*math.exp(DeltaS/(m*Cp)); \t\t\t#final temperature \t\t\t#Unit:R\n",
+ "\n",
+ "# Results\n",
+ "print \"Final temperature is %.2f R\"%(T2);\n",
+ "print \"or %.2f fahrenheit\"%(T2-460);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Final temperature is 1371.38 R\n",
+ "or 911.38 fahrenheit\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.14 Page No : 162"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#1 lbm of water at 500F is mixed with 1 lbm of water at 100F\n",
+ "m1 = 1.; \t\t\t#Unit:lbm \t\t\t#mass\n",
+ "m2 = 1.; \t\t\t#Unit:lbm \t\t\t#mass\n",
+ "c1 = 1.; \t\t\t#Specific heat constant\n",
+ "c2 = 1.; \t\t\t#Specific heat constant\n",
+ "t1 = 500.; \t\t\t#(unit:fahrenheit) \n",
+ "t2 = 100.; \t\t\t#(unit:fahrenheit)\n",
+ "cmix = 1.; \t\t\t#Specific heat constant of mixture\n",
+ "#now, m1*c1*t1 +m2*c2*t2 = (m1+m2)*cmix*t\n",
+ "#So,\n",
+ "t = ((m1*c1*t1)+(m2*c2*t2))/((m1+m2)*cmix) \t\t\t#resulting temperature of the mixture\n",
+ "print \"The resulting temperature of the mixture is %.2f fahrenheit\"%(t);\n",
+ "#For this problem,the hot steam is cooled\n",
+ "deltas = cmix*math.log((t+460)/(t1+460)); \t\t\t#temperatures converted to absolute temperatures; \t\t\t#deltas = change in entropy \t\t\t#Unit:Btu/(lbm*R)\n",
+ "#The cold steam is heated\n",
+ "deltaS = cmix*math.log((t+460)/(t2+460)); \t\t\t#temperatures converted to absolute temperatures; \t\t\t#deltaS = change in entropy \t\t\t#Unit:Btu/(lbm*R)\n",
+ "print \"The net change in entropy is %.2f Btu/lbm*R)\"%(deltaS+deltas);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resulting temperature of the mixture is 300.00 fahrenheit\n",
+ "The net change in entropy is 0.07 Btu/lbm*R)\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.15 Page No : 163"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#In problem 4.15,\n",
+ "#1 lbm of water at 500F is mixed with 1 lbm of water at 100F\n",
+ "m1 = 1; \t\t\t#Unit:lbm \t\t\t#mass\n",
+ "m2 = 1; \t\t\t#Unit:lbm \t\t\t#mass\n",
+ "c1 = 1; \t\t\t#Specific heat constant\n",
+ "c2 = 1; \t\t\t#Specific heat constant\n",
+ "t1 = 500; \t\t\t#(unit:fahrenheit)\n",
+ "t2 = 100; \t\t\t#(unit:fahrenheit)\n",
+ "cmix = 1; \t\t\t#Specific heat constant of mixture\n",
+ "#now, m1*c1*t1 +m2*c2*t2 = (m1+m2)*cmix*t \t\t\t#So,\n",
+ "t = ((m1*c1*t1)+(m2*c2*t2))/((m1+m2)*cmix) \t\t\t#resulting temperature of the mixture\n",
+ "print \"In problem 4.14, The resulting temperature of the mixture is %.2f fahrenheit\"%(t);\n",
+ "\n",
+ "#Now,in problem 4.15,taking 0F as a reference temperature,\n",
+ "#For hot fluid,\n",
+ "deltas = cmix*math.log((t1+460)/(0+460)); \t\t\t#temperatures converted to absolute temperatures; \t\t\t#deltas = change in entropy \t\t\t#Unit:Btu/(lbm*R)\n",
+ "#For cold fluid,\n",
+ "s = cmix*math.log((t2+460)/(0+460)); \t\t\t#temperatures converted to absolute temperatures; \t\t\t#s = change in entropy \t\t\t#Unit:Btu/(lbm*R)\n",
+ "#At final mixture temperature of t F,the entropy of each system above 0F is,for the hot fluid \n",
+ "s1 = cmix*math.log((t+460)/(0+460)); \t\t\t#temperatures converted to absolute temperatures; \t\t\t#s1 = change in entropy \t\t\t#Unit:Btu/(lbm*R)\n",
+ "#and for the cold fluid,\n",
+ "s2 = cmix*math.log((t+460)/(0+460)); \t\t\t#temperatures converted to absolute temperatures; \t\t\t#s2 = change in entropy \t\t\t#Unit:Btu/(lbm*R)\n",
+ "print \"The change in the entropy for hot fluid is %.2f Btu/lbm*R)\"%(s1-deltas);\n",
+ "print \"The change in the entropy for cold fluid is %.2f Btu/lbm*R)\"%(s2-s);\n",
+ "print \"The total change in entropy if %.2f Btu/lbm*R\"%(s1-deltas+s2-s);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "In problem 4.14, The resulting temperature of the mixture is 300.00 fahrenheit\n",
+ "The change in the entropy for hot fluid is -0.69 Btu/lbm*R)\n",
+ "The change in the entropy for cold fluid is 0.00 Btu/lbm*R)\n",
+ "The total change in entropy if -0.69 Btu/lbm*R\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch5_1.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch5_1.ipynb
new file mode 100644
index 00000000..ef34cc8f
--- /dev/null
+++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch5_1.ipynb
@@ -0,0 +1,1536 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:5f6a0af8f766f00e3dc6895c71340c9032268be4509d3ee5581830a21a93add3"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5 : Properties of Liquids and Gases"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.1 Page No : 182"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data\n",
+ "p = 0.6988; \t\t\t#Unit:psia \t\t\t#absolute pressure\n",
+ "vg = 467.7; \t\t\t#Unit:ft**3/lbm \t\t\t#Saturated vapour specific volume\n",
+ "ug = 1040.2; \t\t\t#Unit:Btu/lbm \t\t\t#Saturated vapour internal energy\n",
+ "J = 778; \t\t\t#J = Conversion factor\n",
+ "# 1 Btu = 778 ft*LBf\n",
+ "#h = u+(p*v)/J \n",
+ "hg = ug+((p*vg*144)/J); \t\t\t#The enthalpy of saturated steam \t\t\t#1 ft**2 = 144 in**2 \t\t\t#Btu/lbm\n",
+ "\n",
+ "# Results\n",
+ "print \"The enthalpy of saturated steam at 90 F is %.2f Btu/lbm\"%(hg); \t\t\t#The value is matched with the value in table 1\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The enthalpy of saturated steam at 90 F is 1100.69 Btu/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.2 Page No : 187"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data\n",
+ "p = 4.246; \t\t\t#Unit:kPa \t\t\t#absolute pressure\n",
+ "vg = 32.894; \t\t\t#Unit:m**3/kg \t\t\t#specific volume\n",
+ "ug = 2416.6; \t\t\t#Unit:kJ/kg \t\t\t#internal energy\n",
+ "J = 778; \t\t\t#J = Conversion factor\n",
+ "# 1 Btu = 778 ft*LBf\n",
+ "#h = u+(p*v)\n",
+ "hg = ug+(p*vg); \t\t\t#The enthalpy of saturated steam \t\t\t#1 ft**2 = 144 in**2 \t\t\t#unit:kJ/kg\n",
+ "\n",
+ "# Results\n",
+ "print \"The enthalpy of saturated steam at 30 C is %.2f kJ/kg\"%(hg); \t\t\t#The value is matched with the value in table 1\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The enthalpy of saturated steam at 30 C is 2556.27 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3 Page No : 188"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#The necessary interpolations are best done in tabular forms as shown:\n",
+ "# p hg\n",
+ "# 115 1190.4 table 2\n",
+ "# 118 1190.8 (hg)118 = 1190.8\n",
+ "# 120 1191.1\n",
+ "hg = 1190.4+(3./5)*(1191.1-1190.4); \t\t\t#Btu/lbm \t\t\t#enthaply\n",
+ "print \"The enthalpy of saturated steam at 118 psia is %.2f Btu/lbm\"%(hg);\n",
+ "\n",
+ "# p vg\n",
+ "# 115 3.884 table 2\n",
+ "# 118 3.792 (vg)118 = 3.790\n",
+ "# 120 3.730\n",
+ "vg = 3.884-(3./5)*(3.884-3.730); \t\t\t#ft**3/lbm \t\t\t#specific volume\n",
+ "print \"The specific volume of saturated steam at 118 psia is %.2f ft**3/lbm\"%(vg);\n",
+ "\n",
+ "# p sg\n",
+ "# 115 1.5921 table 2\n",
+ "# 118 1.5900 (sg)118 = 1.5900\n",
+ "# 120 1.5886\n",
+ "sg = 1.5921-(3./5)*(1.5921-1.5886); \t\t\t#entropy\n",
+ "print \"The entropy of saturated steam at 118 psia is %.2f\"%(sg);\n",
+ "\n",
+ "# p ug\n",
+ "# 115 1107.7 table 2\n",
+ "# 118 1108.06 (ug)118 = 1180.1\n",
+ "# 120 1108.3\n",
+ "ug = 1107.7-(3./5)*(1108.3-1107.7); \t\t\t#internal energy\n",
+ "print \"The internal energy of saturated steam at 118 psia is %.2f\"%(ug);\n",
+ "#The interpolation process that was done in tabular form for this problem can also be demonstated by refering to figure 5.8 for the specific volume.It will be \n",
+ "#seen that the results of this problem and the tabulated values are essentially in exact agreement and that linear interpolation is satisfactory in these tables.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The enthalpy of saturated steam at 118 psia is 1190.82 Btu/lbm\n",
+ "The specific volume of saturated steam at 118 psia is 3.79 ft**3/lbm\n",
+ "The entropy of saturated steam at 118 psia is 1.59\n",
+ "The internal energy of saturated steam at 118 psia is 1107.34\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.4 Page No : 189"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#By defination,\n",
+ "#hg = ug+(p*vg)/J\n",
+ "#hf = uf+(p*vf)/J\n",
+ "#hfg = hg-hf = (ug-uf) + p*(vg-vf)/J = ufg + p*(vg-vf)/J\n",
+ "#From table 2 at 115 psia,\n",
+ "p = 115; \t\t\t#Unit:psia \t\t\t#absolute pressure\n",
+ "ufg = 798.8; \t\t\t#Unit:Btu/lbm \t\t\t#Evap. internal energy\n",
+ "ug = 3.884; \t\t\t#Unit:ft**3/lbm \t\t\t#Saturated vapour internal energy\n",
+ "vf = 0.017850; \t\t\t#Unit:ft**3/lbm \t\t\t#Saturated liquid specific volume\n",
+ "J = 778; \t\t\t#J = Conversion factor \t\t\t#Unit:ft*lbf/Btu\n",
+ "#1 ft**2 = 144 in**2\n",
+ "hfg = ufg+(p*144*(ug-vf))/J; \t\t\t#Evap. Enthalpy \t\t\t#Unit:Btu/lbm\n",
+ "\n",
+ "# Results\n",
+ "print \"hfg for saturated steam at 115 psia is %.2f Btu/lbm\"%(hfg); \t\t\t#The tabulated values are matched\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "hfg for saturated steam at 115 psia is 881.09 Btu/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5 Page No : 190"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#From table 2 at 1.0 MPa,\n",
+ "p = 1000; \t\t\t#Unit:kN/m**2 \t\t\t#absolute pressure\n",
+ "ufg = 1822.0; \t\t\t#Unit:kJ/kg \t\t\t#Evap. internal energy\n",
+ "vf = 0.0011273; \t\t\t#Unit:m**3/kg \t\t\t#Saturated liquid specific volume\n",
+ "vg = 0.19444; \t\t\t#Unit:m**3/kg \t\t\t#Saturated vapour specific volume\n",
+ "\n",
+ "# Calculations\n",
+ "vfg = vg-vf; \t\t\t#Evap. specific volume \t\t\t#m**3/kg\n",
+ "hfg = ufg+(p*vfg); \t\t\t#Evap. Enthalpy \t\t\t#Unit:kJ/kg\n",
+ "\n",
+ "# Results\n",
+ "print \"hfg for saturated steam at 1.0 MPa is %.2f kJ/kg\"%(hfg); \t\t\t#The tabulated values are matched\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "hfg for saturated steam at 1.0 MPa is 2015.31 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.6 Page No : 190"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#For constant-temperature,reversible vaporization, hfg = deltah = T*deltas = T*sfg\n",
+ "hfg = (388.12+460)*(1.1042); \t\t\t#Evap. Enthalpy \t\t\t#Unit:Btu/lbm\n",
+ "\n",
+ "# Results\n",
+ "print \"By considering the process to be a reversible, \\\n",
+ "\\nconstant-temperature, hfg for saturated steam at 115 psia is %.2f Btu/lbm\"%(hfg); \t\t\t#ans is wrong in the book\n",
+ "#Values are matched with tabulated values.Use of -459.67 F for absolute zero,which is the value used in table,gives almost exact agreement.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "By considering the process to be a reversible, \n",
+ "constant-temperature, hfg for saturated steam at 115 psia is 936.49 Btu/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.7 Page No : 192"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Umath.sing Table 2 ans a quality of 80%(x = 0.8),we have\n",
+ "#at 120 psia\n",
+ "x = 0.8;\n",
+ "sf = 0.49201; \t\t\t#saturated liquid entropy \t\t\t#Unit:Btu/lbm*R\n",
+ "sfg = 1.0966; \t\t\t#Evap. Entropy \t\t\t#Unit:Btu/lbm*R \n",
+ "hf = 312.67; \t\t\t#saturated liquid enthalpy \t\t\t#Unit:Btu/lbm \n",
+ "hfg = 878.5; \t\t\t#Evap. Enthalpy \t\t\t#Unit:Btu/lbm\n",
+ "uf = 312.27; \t\t\t#saturated liquid internal energy \t\t\t#Unit:Btu/lbm \n",
+ "ufg = 796.0; \t\t\t#Unit:Btu/lbm \t\t\t#Evap. internal energy\n",
+ "vf = 0.017886; \t\t\t#Saturated liquid specific volume \t\t\t#Unit:ft**3/lbm \n",
+ "vfg = (3.730-0.017886); \t\t\t#evap. specific volume \t\t\t#Unit:ft**3/lbm \n",
+ "sx = sf+(x*sfg); \t\t\t#entropy \t\t\t#Btu/lbm*R\n",
+ "print \"Entropy of a wet steam mixture at 120 psia is %.2f Btu/lbm*R\"%(sx);\n",
+ "hx = hf+(x*hfg); \t\t\t#enthalpy \t\t\t#Btu/lbm*R\n",
+ "print \"Enthalpy of a wet steam mixture at 120 psia is %.2f Btu/lbm\"%(hx);\n",
+ "ux = uf+(x*ufg); \t\t\t#internal energy \t\t\t#Btu/lbm*R\n",
+ "print \"Internal energy of a wet steam mixture at 120 psia is %.2f Btu/lbm\"%(ux);\n",
+ "vx = vf+(x*vfg); \t\t\t#/specific volume \t\t\t#ft**3/lbm\n",
+ "print \"Specific Volume of a wet steam mixture at 120 psia is %.2f ft**3/lbm\"%(vx);\n",
+ "#As a check,\n",
+ "J = 778; \t\t\t#ft*lbf/Btu \t\t\t#Conversion factor\n",
+ "px = 120; \t\t\t#psia \t\t\t#pressure\n",
+ "ux = hx-((px*vx*144)/J); \t\t\t#1 ft**2 = 144 in**2 \t\t\t#internal energy\n",
+ "print \"As a check\"\n",
+ "print \"Internal energy of a wet steam mixture at 120 psia is %.2f Btu/lbm\"%(ux);\n",
+ "print \"Which agrees with the values obtained above\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Entropy of a wet steam mixture at 120 psia is 1.37 Btu/lbm*R\n",
+ "Enthalpy of a wet steam mixture at 120 psia is 1015.47 Btu/lbm\n",
+ "Internal energy of a wet steam mixture at 120 psia is 949.07 Btu/lbm\n",
+ "Specific Volume of a wet steam mixture at 120 psia is 2.99 ft**3/lbm\n",
+ "As a check\n",
+ "Internal energy of a wet steam mixture at 120 psia is 949.11 Btu/lbm\n",
+ "Which agrees with the values obtained above\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.8 Page No : 193"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Using Table 2 ans a quality of 85%(x = 0.85),we have\n",
+ "#at 1.0 MPa\n",
+ "x = 0.85;\n",
+ "sf = 2.1387; \t\t\t#saturated liquid entropy \t\t\t#Unit:kJ/kg*K\n",
+ "sfg = 4.4487; \t\t\t#Evap. Entropy \t\t\t#Unit:kJ/kg*K \n",
+ "hf = 762.81; \t\t\t#saturated liquid enthalpy \t\t\t#Unit:kJ/kg\n",
+ "hfg = 2015.3; \t\t\t#Evap. Enthalpy \t\t\t#Unit:kJ/kg\n",
+ "uf = 761.68; \t\t\t#saturated liquid internal energy \t\t\t#Unit:kJ/kg\n",
+ "ufg = 1822.0; \t\t\t#Unit:kJ/kg \t\t\t#Evap. internal energy\n",
+ "vf = 1.1273; \t\t\t#Saturated liquid specific volume \t\t\t#Unit:m**3/kg \n",
+ "vfg = (194.44-1.1273); \t\t\t#evap. specific volume \t\t\t#Unit:m**3/kg \n",
+ "sx = sf+(x*sfg); \t\t\t#entropy \t\t\t#kJ/kg*K\n",
+ "print \"Entropy of a wet steam mixture at 1.0 MPa is %.2f kJ/kg*K\"%(sx);\n",
+ "hx = hf+(x*hfg); \t\t\t#enthalpy \t\t\t#kJ/kg*K\n",
+ "print \"Enthalpy of a wet steam mixture at 1.0 MPa is %.2f kJ/kg\"%(hx);\n",
+ "ux = uf+(x*ufg); \t\t\t#internal energy \t\t\t#kJ/kg*K\n",
+ "print \"Internal energy of a wet steam mixture at 1.0 MPa is %.2f kJ/kg\"%(ux);\n",
+ "vx = (vf+(x*vfg))*(0.001); \t\t\t#specific volume \t\t\t#m**3/kg\n",
+ "print \"Specific Volume of a wet steam mixture at 1.0 MPa is %.2f m**3/kg\"%(vx);\n",
+ "#As a check,\n",
+ "px = 10**6; \t\t\t#psia \t\t\t#pressure\n",
+ "ux = hx-((px*vx)/10**3); \t\t\t#1 ft**2 = 144 in**2 \t\t\t#internal energy\n",
+ "print \"As a check%\"\n",
+ "print \"Internal energy of a wet steam mixture at 120 psia is %.2f kJ/kg\"%(ux);\n",
+ "print \"Which agrees with the values obtained above\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Entropy of a wet steam mixture at 1.0 MPa is 5.92 kJ/kg*K\n",
+ "Enthalpy of a wet steam mixture at 1.0 MPa is 2475.81 kJ/kg\n",
+ "Internal energy of a wet steam mixture at 1.0 MPa is 2310.38 kJ/kg\n",
+ "Specific Volume of a wet steam mixture at 1.0 MPa is 0.17 m**3/kg\n",
+ "As a check%\n",
+ "Internal energy of a wet steam mixture at 120 psia is 2310.37 kJ/kg\n",
+ "Which agrees with the values obtained above\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.9 Page No : 193"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#For the wet mixture,hx = hf+(x*hfg),solving for x gives us\n",
+ "#Using table 1,we have,\n",
+ "hx = 900; \t\t\t#Btu/lbm \t\t\t#Enthalpy of wet mixture at 90F\n",
+ "hf = 58.07; \t\t\t#Btu/lbm \t\t\t#saturated liquid enthalpy\n",
+ "hfg = 1042.7; \t\t\t#Btu/lbm \t\t\t#Evap. Enthalpy\n",
+ "\n",
+ "# Calculations\n",
+ "x = (hx-hf)/hfg; \t\t\t#quality\n",
+ "\n",
+ "# Results\n",
+ "print \"The quality is %.2f percentage of a wet steam at 90F\"%(x*100);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The quality is 80.75 percentage of a wet steam at 90F\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.10 Page No : 194"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#For the wet mixture,hx = hf+(x*hfg),solving for x gives us\n",
+ "#Using table 1,we have,\n",
+ "hx = 2000; \t\t\t#kJ/kg \t\t\t#Enthalpy of wet mixture at 30 C\n",
+ "hf = 125.79; \t\t\t#kJ/kg \t\t\t#saturated liquid enthalpy\n",
+ "hfg = 2430.5; \t\t\t# \t\t\t#Evap. Enthalpy \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations\n",
+ "x = (hx-hf)/hfg; \t\t\t#quality\n",
+ "\n",
+ "# Results\n",
+ "print \"The quality is %.2f percentage of a wet steam at 30 C\"%(x*100);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The quality is 77.11 percentage of a wet steam at 30 C\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.11 Page No : 197"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#The values of temperature and pressure are listed in Table 3(Figure 5.10) and can be read directly.\n",
+ "print \"Specific volume of superheated steam at 330 psia and 450F is v = 1.4691 ft**3/lbm\";\n",
+ "print \"Internal Energy of superheated steam at 330 psia and 450F is u = 1131.8 Btu/lbm\";\n",
+ "print \"Enthalpy of superheated steam at 330 psia and 450F is h = 1221.5 Btu/lbm\";\n",
+ "print \"Entropy of superheated steam at 330 psia and 450F is s = 1.5219 Btu/lbm*R\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific volume of superheated steam at 330 psia and 450F is v = 1.4691 ft**3/lbm\n",
+ "Internal Energy of superheated steam at 330 psia and 450F is u = 1131.8 Btu/lbm\n",
+ "Enthalpy of superheated steam at 330 psia and 450F is h = 1221.5 Btu/lbm\n",
+ "Entropy of superheated steam at 330 psia and 450F is s = 1.5219 Btu/lbm*R\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.12 Page No : 197"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#The values of temperature and pressure are listed in Table 3(Figure 5.10) and can be read directly.\n",
+ "print \"Specific volume of superheated steam at 2.0 MPa and 240 C is v = 0.10845 m**3/lbm\";\n",
+ "print \"Internal Energy of superheated steam at 2.0 MPa and 240 C is u = 2659.6 kJ/kg\";\n",
+ "print \"Enthalpy of superheated steam at 2.0 MPa and 240 C is h = 2876.5 kJ/kg\";\n",
+ "print \"Entropy of superheated steam at 2.0 MPa and 240 C is s = 6.4952 kJ/kg*K\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific volume of superheated steam at 2.0 MPa and 240 C is v = 0.10845 m**3/lbm\n",
+ "Internal Energy of superheated steam at 2.0 MPa and 240 C is u = 2659.6 kJ/kg\n",
+ "Enthalpy of superheated steam at 2.0 MPa and 240 C is h = 2876.5 kJ/kg\n",
+ "Entropy of superheated steam at 2.0 MPa and 240 C is s = 6.4952 kJ/kg*K\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.13 Page No : 197"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#The necessary interpolations(between 450F and 460F at 330 psia) are best done in tabular forms as shown:\n",
+ "# t v\n",
+ "# 460 1.4945 \n",
+ "# 455 1.4818 \n",
+ "# 450 1.4691\n",
+ "v = 1.4691+(1./2)*(1.4945-1.4691); \t\t\t#ft**3/lbm \t\t\t#specific volume\n",
+ "print \"The specific volume of saturated steam at 330 psia & 455F is %.2f ft**3/lbm\"%(v);\n",
+ "\n",
+ "# t u\n",
+ "# 460 1137.0 \n",
+ "# 455 1134.4 \n",
+ "# 450 1131.8 \n",
+ "u = 1131.8+(1./2)*(1137.0-1131.8); \t\t\t#Btu/lbm \t\t\t#internal energy\n",
+ "print \"The internal energy of saturated steam at 330 psia & 455F is %.2f Btu/lbm\"%(u);\n",
+ "\n",
+ "# t h\n",
+ "# 460 1228.2 \n",
+ "# 455 1224.9 \n",
+ "# 450 1221.5\n",
+ "h = 1221.5+(1./2)*(1228.2-1221.5); \t\t\t#enthaply \t\t\t#Btu/lbm\n",
+ "print \"The enthalpy of saturated steam at 330 psia & 455F is %.2f Btu/lbm\"%(h);\n",
+ "\n",
+ "# t s\n",
+ "# 460 1.5293 \n",
+ "# 455 1.5256 \n",
+ "# 450 1.5219\n",
+ "s = 1.5219+(1./2)*(1.5293-1.5219); \t\t\t#entropy \t\t\t#Btu/lbm*R\n",
+ "print \"The entropy of saturated steam at 330 psia & 455F is %.2f Btu/lbm*R\"%(s);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The specific volume of saturated steam at 330 psia & 455F is 1.48 ft**3/lbm\n",
+ "The internal energy of saturated steam at 330 psia & 455F is 1134.40 Btu/lbm\n",
+ "The enthalpy of saturated steam at 330 psia & 455F is 1224.85 Btu/lbm\n",
+ "The entropy of saturated steam at 330 psia & 455F is 1.53 Btu/lbm*R\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.14 Page No : 198"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#From Table3, we first obtain the properties at 337 psia and 460 F and then 337 psia and 470 F.\n",
+ "#The necessary interpolations are best done in tabular forms as shown:\n",
+ "#Proceeding with the calculation,at 460 F,\n",
+ "# p v \t\t\t# p h\n",
+ "# 340 1.4448 \t\t\t# 340 1226.7\n",
+ "# 337 1.4595 \t\t\t# 337 1227.2\n",
+ "# 335 1.4693 \t\t\t# 335 1227.5\n",
+ "v = 1.4696-(2./5)*(1.4693-1.4448); \n",
+ "h = 1227.5-(2./5)*(1227.5-1226.7);\n",
+ "#ft**3/lbm \t\t\t#specific volume \t\t\t#Btu/lbm \t\t\t#enthaply\n",
+ "\n",
+ "#And at 470 F,\n",
+ "# p v \t\t\t# p h\n",
+ "# 340 1.4693 \t\t\t# 340 1233.4\n",
+ "# 337 1.4841 \t\t\t# 337 1233.9\n",
+ "# 335 1.4940 \t\t\t# 335 1234.2\n",
+ "v = 1.4640-(2./5)*(1.4640-1.4693); \n",
+ "h = 1234.2-(2./5)*(1234.2-1233.4);\n",
+ "#ft**3/lbm \t\t\t#specific volume \t\t\t#Btu/lbm \t\t\t#enthaply\n",
+ "\n",
+ "#Therefore,at 337 psia and 465 F\n",
+ "# t v \t\t\t# t h\n",
+ "# 470 1.4841 \t\t\t# 470 1233.9\n",
+ "# 465 1.4718 \t\t\t# 465 1230.7\n",
+ "# 460 1.4595 \t\t\t# 460 1227.5\n",
+ "v = 1.4595+(1./2)*(1.4841-1.4595); \n",
+ "h = 1227.5+(1./2)*(1233.9-1227.5);\n",
+ "#ft**3/lbm \t\t\t#specific volume \t\t\t#Btu/lbm \t\t\t#enthaply\n",
+ "print \"At 465 F and 337 psia, specific volume = %.2f ft**3/lbm and enthalpy = %.2f Btu/lbm\"%(v,h);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "At 465 F and 337 psia, specific volume = 1.47 ft**3/lbm and enthalpy = 1230.70 Btu/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.15 Page No : 202"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#The values of temperature and pressure are listed in Table 4(Figure 5.10) and can be read directly.\n",
+ "print \"Specific volume of subcooled water at 1000 psia and 300F is v = 0.017379 ft**3/lbm\";\n",
+ "print \"Internal Energy of subcooled water at 1000 psia and 300F is u = 268.24 Btu/lbm\";\n",
+ "print \"Enthalpy of subcooled water at 1000 psia and 300F is h = 271.46 Btu/lbm\";\n",
+ "print \"Entropy of subcooled water at 1000 psia and 300F is s = 0.43552 Btu/lbm*R\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific volume of subcooled water at 1000 psia and 300F is v = 0.017379 ft**3/lbm\n",
+ "Internal Energy of subcooled water at 1000 psia and 300F is u = 268.24 Btu/lbm\n",
+ "Enthalpy of subcooled water at 1000 psia and 300F is h = 271.46 Btu/lbm\n",
+ "Entropy of subcooled water at 1000 psia and 300F is s = 0.43552 Btu/lbm*R\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.16 Page No : 202"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#It is necessary to ontain the saturation values corresponding to 300 F.This is done by reading Table A.1 in Appendix 3,which gives\n",
+ "pf = 66.98; \t\t\t#psia \t\t\t#pressure\n",
+ "vf = 0.017448; \t\t\t#ft**3/lbm \t\t\t#specific volume\n",
+ "hf = 269.73; \t\t\t#Btu/lbm \t\t\t#enthaply\n",
+ "#Now,\n",
+ "p = 1000; \t\t\t#psia \t\t\t#pressure\n",
+ "J = 778; \t\t\t#Conversion factor \t\t\t#ft*lbf/Btu\n",
+ "#From eq.5.5,\n",
+ "h = hf+((p-pf)*vf*144)/J; \t\t\t#1ft**2 = 144 in**2 \t\t\t#The enthalpy of subcooled water \t\t\t#Btu/lbm\n",
+ "print \"The enthalpy of subcooled water is %.2f Btu/lbm\"%(h);\n",
+ "#The difference between this value and the value found in problem 5.15,expressed as a percentage is\n",
+ "percentoferror = (h-271.46)/271.46;\n",
+ "print \"Percent of error is %.2f\"%(percentoferror*100);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The enthalpy of subcooled water is 272.74 Btu/lbm\n",
+ "Percent of error is 0.47\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.25 Page No : 211"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#On a chart in Appendix 3,it is necessary to estimate the 90 F point on the saturation line.From the chart or the table in the upper left of the chart,we note that 90 F is between 1.4 and 1.5 in. of mercury.Estimating the intersection of this value with the saturation curve yields\n",
+ "print \"Enthalpy of saturated steam hg = 1100 Btu/lbm\";\n",
+ "#This is a good agreement with results of problem 5.1\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enthalpy of saturated steam hg = 1100 Btu/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.26 Page No : 212"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#The Mollier chart has lines of constant moisture in the wet region which correspond to (1-x).Therefore,we read at 20% moisture(80% Quality) and 120 psia,\n",
+ "print \"The enthalpy of a wet steam mixture at 120 psia having quality 80 percent is 1015 Btu/lbm\";\n",
+ "#Which also agrees well with the calculated value in problem 5.7\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The enthalpy of a wet steam mixture at 120 psia having quality 80 percent is 1015 Btu/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.27 Page No : 213"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Entering the Mollier chart at 900 Btu/lbm and estimating 90 F(near the 1.5-in. Hg dashed line) yields a constant moisture percent of 19.2%.\n",
+ "print \"The quality is %.2f percent\"%((1-0.192)*100);\n",
+ "#We show good agreement with the calculated value.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The quality is 80.80 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.28 Page No : 214"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#From the chart,\n",
+ "print \"The enthalpy of steam at 330 psia is h = 1220 Btu/lbm\";\n",
+ "#Compared to 1221.5 Btu/lbm found in problem 5.11\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The enthalpy of steam at 330 psia is h = 1220 Btu/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.29 Page No : 214"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#We note that the steam is superheated.From the Mollier chart in SI units,\n",
+ "print \"The enthalpy h = 2876.5 kJ/kg and entropy s = 6.4952 kJ/kg*K\";\n",
+ "#Values are matched with problem 5.12\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The enthalpy h = 2876.5 kJ/kg and entropy s = 6.4952 kJ/kg*K\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.30 Page No : 215"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Because neither pressure nor temperature is shown directly,it is necessary to estimate to obtain the desired value.\n",
+ "print \"The enthalpy of steam is h = 1231 Btu/lbm\";\n",
+ "#In problem 5.14,h = 1230.7 Btu/lbm,Which is matched here.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The enthalpy of steam is h = 1231 Btu/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.31 Page No : 215"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Reading the chart at 30 C and saturation gives us,\n",
+ "print \"The enthalpy of saturated steam is hg = 2556 kJ/kg\";\n",
+ "#Which matches with value of problem 5.2\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The enthalpy of saturated steam is hg = 2556 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.32 Page No : 215"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Reading the chart in wet region at 1.0 MPa and x = 0.85(moisture of 15%) gives us\n",
+ "print \"hx = 2476 kJ/kg and sx = 5.92 kJ/kg*K\";\n",
+ "#The chart does not give ux or vx directly"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "hx = 2476 kJ/kg and sx = 5.92 kJ/kg*K\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.33 Page No : 215"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Locate 30 C on the saturation line.Now follow a line of constant pressure,which is also a line of constant temperature in wet region,until an enthalpy of 2000kJ/kg is reached.\n",
+ "print \"The moisture content is 23 percent or x = 77 percent\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The moisture content is 23 percent or x = 77 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.34 Page No : 216"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#We enter the chart in the superheat region at 2.0MPa and 240 C to read the enthalpy and entropy.This procedure gives \n",
+ "print \"Enthalpy h = 2877 kJ/kg and entropy s = 6.495 kJ/kg*K\";\n",
+ "#The other properties cant be obtained directly from the chart\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enthalpy h = 2877 kJ/kg and entropy s = 6.495 kJ/kg*K\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.35 Page No : 218"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#As already noted,h1 = h2 for this process.On the Mollier chart,h2 is found to be 1170 Btu/lbm at 14.7 psia and 250 F.Proceeding to the left on the chart,the constant-enthalpy value of 1170 Btu/lbm to 150 psia yields a moisture of 3% or a quality of 97%.\n",
+ "#If we use the tables to obtain the solution to this problem,we would first obtain h2 from the superheated vapor tables as 1168.8 Btu/lbm.Because hx = hf+(x*hfg),we obtain x as\n",
+ "hx = 1168.8; \t\t\t#Btu/lbm \n",
+ "hf = 330.75; \t\t\t#Btu/lbm \t\t\t#values of 150 psia\n",
+ "hfg = 864.2; \t\t\t#Btulbm \t\t\t#values of 150 psia\n",
+ "x = (hx-hf)/hfg; \t\t\t#Quality\n",
+ "print \"Moisture in the steam flowing in the pipe is %.2f percent\"%((1-x)*100);\n",
+ "print \"or quality of the steam is %.2f percent\"%(x*100);\n",
+ "#very often,it is necessary to perform multiple interpolations if the tables are used,and the Mollier chart yields results within the rquired accuracy for most engineering problems and saves considerable time.\n",
+ "#We can also use the computerised programs to solve this program.We first enter the 250F and 14.7 psia to obtain h of 1168.7 Btu/lbm.We then continue by entering h of 1168.7 Btu/lbm and p of 150 psia.The printout gives us x of 0.9699 or 97%.While the computer solution is quick and easy to use,you should still sketch out the problem on an h-s or T-s diagram to show the path of the process.\n",
+ "\n",
+ "# Saturation Properties\n",
+ "#--------------------------\n",
+ "# T = 250.00 degF\n",
+ "# P = 29.814 psia\n",
+ "# z z1 zg\n",
+ "# v(ft**3/lbm) 0.01700 13.830\n",
+ "# h(Btu/lbm) 218.62 1164.1\n",
+ "# s(Btu/lbm*F) 0.3678 1.7001\n",
+ "# u(Btu/lbm) 218.52 1087.8\n",
+ "\n",
+ "#Thermo Properties\n",
+ "#------------------------\n",
+ "# T = 250.00 degF\n",
+ "# P = 14.700 psia\n",
+ "# v = 28.417 ft**3/lbm\n",
+ "# h = 1168.7 Btu/lbm\n",
+ "# s = 1.7831 Btu/lbm*F\n",
+ "# u = 1091.4 Btu/lbm\n",
+ "\n",
+ "# Saturation Properties\n",
+ "#--------------------------\n",
+ "# T = 340.06 degF\n",
+ "# P = 118.00 psia\n",
+ "# z z1 zg\n",
+ "# v(ft**3/lbm) 0.01787 3.7891\n",
+ "# h(Btu/lbm) 311.39 1190.7\n",
+ "# s(Btu/lbm*F) 0.4904 1.5899\n",
+ "# u(Btu/lbm) 311.00 1108.0\n",
+ "\n",
+ "#Thermo Properties\n",
+ "#------------------------\n",
+ "# T = 358.49 degF\n",
+ "# P = 150.00 psia\n",
+ "# v = 2.9248 ft**3/lbm\n",
+ "# h = 1168.7 Btu/lbm\n",
+ "# s = 1.5384 Btu/lbm*F\n",
+ "# u = 1087.5 Btu/lbm\n",
+ "# x = 0.9699\n",
+ "\n",
+ "#Region:Saturated\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Moisture in the steam flowing in the pipe is 3.03 percent\n",
+ "or quality of the steam is 96.97 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.36 Page No : 219"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Because the math.tank volume is 10 ft**3,the final specific volume of the steam is 10 ft**3/lbm.Interpolations in Table A.2 yield a final pressure of 42 psia.The heat added is simply difference in internal energy between the two states.\n",
+ "u2 = 1093.0; \t\t\t#internal energy \t\t\t#Btu/lbm\n",
+ "u1 = 117.95; \t\t\t#internal energy \t\t\t#Btu/lbm\n",
+ "\n",
+ "# Calculations\n",
+ "q = u2-u1; \t\t\t#heat added \t\t\t#Btu/lbm\n",
+ "\n",
+ "# Results\n",
+ "print \"The final pressure is 42 psia and the heat added is %.2f Btu/lbm\"%(q);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The final pressure is 42 psia and the heat added is 975.05 Btu/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.37 Page No : 220"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#The mass in the math.tank is constant,and the heat added will be the change in internal energy of the contents of the math.tank between the two states.The initial mass in the math.tank is found as follows:\n",
+ "Vf = 45; \t\t\t#volume of water \t\t\t#ft**2\n",
+ "vf = 0.016715;\n",
+ "Vg = 15; \t\t\t#Volume of steam \t\t\t#ft**2\n",
+ "vg = 26.80;\n",
+ "mf = Vf/vf; \t\t\t#lbm\n",
+ "mg = Vg/vg; \t\t\t#lbm\n",
+ "total = mf+mg; \t\t\t#total mass\n",
+ "#The internal energy is the sum of the internal energy of the liquid plus vapor:\n",
+ "ug = 1077.6;\n",
+ "uf = 180.1;\n",
+ "Ug = mg*ug; \t\t\t#Btu\n",
+ "Uf = mf*uf; \t\t\t#Btu\n",
+ "Total = Ug+Uf; \t\t\t#total internal energy\n",
+ "print \"The total internal energy is %.2f Btu\"%(Total);\n",
+ "#Because the mass in the math.tank is constant,the final specific volume must equal the initial specific volume,or\n",
+ "vx = (Vf+Vg)/(mf+mg); \t\t\t#ft**3/lbm\n",
+ "#But vx = vf+(x*vfg).Therefore Using table A.2 at 800 psia,\n",
+ "vx = 0.022282;\n",
+ "vf = 0.02087;\n",
+ "vfg = 0.5691-0.02087;\n",
+ "x = (vx-vf)/vfg;\n",
+ "print \"The final amount of vapor is %.2f lbm\"%(x*total); \t\t\t#x*total mass \n",
+ "mg = x*total;\n",
+ "print \"The final amount of liquid is %.2f lbm\"%(total-x*total); \t\t\t#total mass minus final amount of vapor \n",
+ "mf = total-(x*total);\n",
+ "#The final internal energy is found as before:\n",
+ "ug = 1115.0;\n",
+ "uf = 506.6;\n",
+ "Ug = mg*ug; \t\t\t#Btu\n",
+ "Uf = mf*uf; \t\t\t#Btu\n",
+ "Total1 = Ug+Uf;\n",
+ "difference = Total1-Total; \t\t\t#final internal energy-initial internal energy\n",
+ "#per unit mass heat added is,\n",
+ "print \"The heat added per unit is %.2f Btu/lbm\"%(difference/total); \t\t\t#the difference of internal energy/total mass\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total internal energy is 485467.03 Btu\n",
+ "The final amount of vapor is 6.94 lbm\n",
+ "The final amount of liquid is 2685.82 lbm\n",
+ "The heat added per unit is 327.88 Btu/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.38 Page No : 222"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#As shown in Fig. 5.21b,the process dscribed in this problem is a vertical line on the Mollier Chart.For 800 psia and 600F,the Mollier chart yeilds h1 = 1270 Btu/lbm and s1 = 1.485.Proceeding vertically down the chart at constant s to 200 psia yields a final enthalpy h2 = 1148 Btu/lbm.The change in enthaly Using the process is 1270-1148 = 122 Btu/lbm.\n",
+ "#We may also solve this problem Using the steam tables in Appendix 3.Thus,the enthalpy at 800 psia and 600 F is 1270.4 Btu/lbm,and its entropy is 1.4861 Btu/lbm*R.\n",
+ "#Because the process is isentropic,the final entropy at 200psia must be 1.4861.From the saaturation table,the entropy of saturated steam at 200 psia is 1.5464,which indicates the final steam condition must be wet because the entropy of the final steam is less than the entropy of saturation.Using the wet steam relation yields,\n",
+ "#sx = sf+(x*sfg)\n",
+ "h1 = 1270.4; \n",
+ "sx = 1.4861; \n",
+ "sf = 0.5440; \n",
+ "sfg = 1.0025 ;\n",
+ "hf = 355.6; \n",
+ "hfg = 843.7;\n",
+ "\n",
+ "# Calculations\n",
+ "x = (sx-sf)/sfg; \t\t\t#Quality\n",
+ "#Therefore,the final enthalpy is\n",
+ "hx = hf+(x*hfg); \t\t\t#Btu/lbm\n",
+ "\n",
+ "# Results\n",
+ "print \"The final enthalpy is %.2f Btu/lbm\"%(hx);\n",
+ "print \"The change in enthalpy is %.2f Btu/lbm\"%(h1-hx); \t\t\t#Note the agreement with the Mollier chart solution\n",
+ "#we can also use the computer program to solve this problem.For 600F and 800 psia, h = 1270. Btu/lbm and s = 1.4857 Btu/lbm*R.Now Using p = 200 psia and s = 1.4857,we obtain\n",
+ "#h = 1148.1 Btu/lbm.The change in enthalpy is 1270.0-1148.1 = 121.9 Btu/lbm.Note the effort saved Using either the Mollier chart or the computer program. \n",
+ "\n",
+ "# Saturation Properties\n",
+ "#--------------------------\n",
+ "# T = 600.00 degF\n",
+ "# P = 1541.7 psia\n",
+ "# z z1 zg\n",
+ "# v(ft**3/lbm) 0.02362 0.2675\n",
+ "# h(Btu/lbm) 616.59 1166.2\n",
+ "# s(Btu/lbm*F) 0.8129 1.3316\n",
+ "# u(Btu/lbm) 609.85 1089.9\n",
+ "\n",
+ "#Thermo Properties\n",
+ "#------------------------\n",
+ "# T = 600.00 degF\n",
+ "# P = 800.00 psia\n",
+ "# v = 0. ft**3/lbm\n",
+ "# h = 1168.7 Btu/lbm\n",
+ "# s = 1.5384 Btu/lbm*F\n",
+ "# u = 1087.5 Btu/lbm\n",
+ "#Region:Superheated\n",
+ "\n",
+ "# Saturation Properties\n",
+ "#--------------------------\n",
+ "# T = 381.87 degF\n",
+ "# P = 200.00 psia\n",
+ "# z z1 zg\n",
+ "# v(ft**3/lbm) 0.01839 2.2883\n",
+ "# h(Btu/lbm) 355.60 1199.0\n",
+ "# s(Btu/lbm*F) 0.5440 1.5462\n",
+ "# u(Btu/lbm) 354.92 1114.3\n",
+ "\n",
+ "#Thermo Properties\n",
+ "#------------------------\n",
+ "# T = 381.87 degF\n",
+ "# P = 200.00 psia\n",
+ "# v = 2.1512 ft**3/lbm\n",
+ "# h = 1148.1 Btu/lbm\n",
+ "# s = 1.4857 Btu/lbm*F\n",
+ "# u = 1068.5 Btu/lbm\n",
+ "# x = 0.9396\n",
+ "\n",
+ "#Region:Saturated\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The final enthalpy is 1148.47 Btu/lbm\n",
+ "The change in enthalpy is 121.93 Btu/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.39 Page No : 226"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#As refering to figure 5.21,it will be seen that the final temperature and enthalpy will both be higher than for the isentropic case.\n",
+ "#80% of the isentropic enthalpy difference\n",
+ "deltah = 0.8*122; \t\t\t#change in enthalpy \t\t\t#Btu/lbm\n",
+ "h1 = 1270; \t\t\t#Btu/lbm \t\t\t#initial enthalpy\n",
+ "h2 = h1-deltah; \t\t\t#the final enthalpy \t\t\t#Btu/lbm\n",
+ "print \"The final enthalpy is %.2f Btu/lbm\"%(h2);\n",
+ "print \"and the final pressure is 200 psia\";\n",
+ "print \"The Mollier chart indicates the final state to be in the wet region\"\n",
+ "print \"with 3.1percent moisture content and an entropy of 1.514 Btu/lbm*R\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The final enthalpy is 1172.40 Btu/lbm\n",
+ "and the final pressure is 200 psia\n",
+ "The Mollier chart indicates the final state to be in the wet region\n",
+ "with 3.1percent moisture content and an entropy of 1.514 Btu/lbm*R\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.40 Page No : 226"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Using the Mollier chart,\n",
+ "h1 = 2942; \t\t\t#kJ/kg \t\t\t#initial enthalpy\n",
+ "#Proceeding as shown in figure 5.21b,that is,vertically at constant entropy to a pressure of 0.1 MPa,gives us\n",
+ "h2 = 2512; \t\t\t#kJ/kg \t\t\t#final enthalpy\n",
+ "\n",
+ "# Results\n",
+ "print \"Neglecting kinetic & potential energy, The change in enthalpy of the steam is %.2f kJ/kg\"%(h1-h2);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Neglecting kinetic & potential energy, The change in enthalpy of the steam is 430.00 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.41 Page No : 226"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#From the conditions given in problem 5.38,the isentropic change in enthalpy is 122 Btu/lbm\n",
+ "#So,\n",
+ "h1minush2 = 122; \t\t\t#Btu/lbm \t\t\t#change in enthalpy\n",
+ "J = 778; \t\t\t#Conversion factor\n",
+ "gc = 32.17; \t\t\t#lbm*ft/lbf*s**2 \t\t\t#constant of proportionality\n",
+ "\n",
+ "# Calculations\n",
+ "V2 = math.sqrt(2*gc*J*(h1minush2)); \t\t\t#final velocity \t\t\t#ft/s\n",
+ "\n",
+ "# Results\n",
+ "print \"As the steam leaves the nozzle, The final velocity is %.2f ft/s\"%(V2);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "As the steam leaves the nozzle, The final velocity is 2471.21 ft/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.42 Page No : 227"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Because the process is irreversible,we cannot show it on the Mollier diagram.However,the analysis of problem 3.22 for the nozzle is still valid,and all that is needed is the enthalpy at the beginning and the end of the expansion.From the problem 5.38,\n",
+ "h1 = 1270; \t\t\t#Btu/lbm \t\t\t#initial enthalpy\n",
+ "#For h2 we locate the state point on the Mollier diagram as being saturated vapor at 200 psia.This gives us\n",
+ "h2 = 1199; \t\t\t#Btu/lbm \t\t\t#final enthalpy\n",
+ "J = 778; \t\t\t#Conversion factor\n",
+ "gc = 32.17; \t\t\t#lbm*ft/lbf*s**2 \t\t\t#constant of proportionality\n",
+ "V2 = math.sqrt(2*gc*J*(h1-h2)); \t\t\t#final velocity \t\t\t#Ft/s\n",
+ "print \"As the steam leaves the nozzle, The final velocity is %.2f ft/s\"%(V2);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "As the steam leaves the nozzle, The final velocity is 1885.21 ft/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.43 Page No : 229"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#From the saturation table,500 psia corresponds to a temperature of 467.13F,and the saturated vapor has an enthalpy of 1205.3 Btu/lbm.At 500 psia and 800 F,the saturated vapor has an enthalpy of 1412.1 Btu/lbm.Because this process is a steady-flow process at constant pressure,the energy equation becomes q = h2-h1,assuming that differences in the kinetic energy and potential energy terms are negligible.Therefore,\n",
+ "h2 = 1412.1; \t\t\t#Btu/lbm \t\t\t#final enthalpy\n",
+ "h1 = 1205.3; \t\t\t#Btu/lbm \t\t\t#initial enthalpy\n",
+ "\n",
+ "# Calculations\n",
+ "q = h2-h1; \t\t\t#heat added \t\t\t#Btu/lbm\n",
+ "\n",
+ "# Results\n",
+ "print \"%.2f Btu/lbm heat per pound of steam was added\"%(q);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "206.80 Btu/lbm heat per pound of steam was added\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.44 Page No : 229"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#From the saturation table at 1 psia,\n",
+ "hf = 69.74; \t\t\t#Btu/lbm \t\t\t#saturated liquid enthalpy\n",
+ "hfg = 1036.0; \t\t\t#Btu/lbm \t\t\t#Evap. Enthalpy\n",
+ "hg = 1105.8; \t\t\t#Btu/lbm \t\t\t#The enthalpy of saturated steam\n",
+ "x = 0.97; \t\t\t#Quality\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#Because the condensation process is carried out at constant pressure,the energy equation is q = deltah.\n",
+ "hx = hf+(x*hfg); \t\t\t#the initial enthalpy \t\t\t#Btu/lbm\n",
+ "print \"The initial enthalpy is %.2f Btu/lbm\"%(hx);\n",
+ "#The final enthalpy is hf = 69.74.So,\n",
+ "deltah = hx-hf; \t\t\t#The enthalpy difference \t\t\t#Btu/lbm\n",
+ "print \"At 1 psia, The enthalpy difference is %.2f Btu/lbm\"%(deltah);\n",
+ "print \"By the computer solution,the enthalpy difference is 1004.6 Btu/lbm\";\n",
+ "# Saturation Properties\n",
+ "#--------------------------\n",
+ "# T = 101.71 degF\n",
+ "# P = 1.0000 psia\n",
+ "# z z1 zg\n",
+ "# v(ft**3/lbm) 0.01614 333.55\n",
+ "# h(Btu/lbm) 69.725 1105.4\n",
+ "# s(Btu/lbm*F) 0.1326 1.9774\n",
+ "# u(Btu/lbm) 69.722 1043.6\n",
+ "\n",
+ "#Thermo Properties\n",
+ "#------------------------\n",
+ "# T = 101.71 degF\n",
+ "# P = 1.0000 psia\n",
+ "# v = 323.55 ft**3/lbm\n",
+ "# h = 1074.3 Btu/lbm\n",
+ "# s = 1.9221 Btu/lbm*F\n",
+ "# u = 1014.4 Btu/lbm\n",
+ "# x = 0.9700\n",
+ "\n",
+ "#Region:Saturated\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The initial enthalpy is 1074.66 Btu/lbm\n",
+ "At 1 psia, The enthalpy difference is 1004.92 Btu/lbm\n",
+ "By the computer solution,the enthalpy difference is 1004.6 Btu/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch6_1.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch6_1.ipynb
new file mode 100644
index 00000000..ea95c467
--- /dev/null
+++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch6_1.ipynb
@@ -0,0 +1,1796 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:e0fac09bbeb2cd0ce192e8aaee02b91055f447d7bbfe0689b860ffad5cfd7b06"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 6 : The Ideal Gas"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.1 Page No : 241"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "P1 = 100.; \t\t\t#Pressure at volume V1 = 100 ft**3 \t\t\t#Unit:psia\n",
+ "V1 = 100.; \t\t\t#Unit:ft**3 \t\t\t#V1 = Volume at 100 psia\n",
+ "P2 = 30. \t\t\t# Reduced Pressure \t\t\t#Unit:psia\n",
+ "\n",
+ "# Calculations\n",
+ "#Boyle's law,P1*V1 = P2*V2\n",
+ "V2 = (P1*V1)/P2; \t\t\t#Volume occupied by the gas \t\t\t#ft**3\n",
+ "\n",
+ "# Results\n",
+ "print \"Volume occupied by the gas = %.2f ft**3\"%(V2);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volume occupied by the gas = 333.33 ft**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.2 Page No : 241"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data\n",
+ "P1 = 10.**6; \t\t\t#Pressure at volume V1 = 2 m**3 \t\t\t#Unit:Pa\n",
+ "V1 = 2.; \t\t\t#Unit:m**3 \t\t\t#V1 = Volume at 10**6 Pa\n",
+ "P2 = 8.*10**6 \t\t\t# Increased Pressure \t\t\t#Unit:Pa\n",
+ "\n",
+ "# Calculations\n",
+ "#Boyle's law,P1*V1 = P2*V2\n",
+ "V2 = (P1*V1)/P2; \t\t\t#Volume occupied by gas \t\t\t#unit:m**3\n",
+ "\n",
+ "# Results\n",
+ "print \"Volume occupied by gas = %.2f m**3\"%(V2);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volume occupied by gas = 0.25 m**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.3 Page No : 242"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given value\n",
+ "T1 = 32.+460; \t\t\t#Temperature at volume V1 = 150 ft**3 \t\t\t#Unit:R\n",
+ "V1 = 150.; \t\t\t#Unit:ft**3 \t\t\t#V1 = Volume at 32 F\n",
+ "T2 = 100.+460 \t\t\t# Increased Temperature \t\t\t#Unit:R\n",
+ "\n",
+ "# Calculations\n",
+ "#Charles's law,V1/V2 = T1/T2\n",
+ "V2 = (T2*V1)/T1; \t\t\t#Volume occupied by gas \t\t\t#unit:m**3\n",
+ "\n",
+ "# Results\n",
+ "print \"Volume occupied by gas = %.2f m**3\"%(V2);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volume occupied by gas = 170.73 m**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.4 Page No : 242"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#If for this process T2 = 1.25*T1,\n",
+ "# T2/T1 = 1.25\n",
+ "#Therefore,\n",
+ "# p2/p1 = T2/T1 \t\t\t#Charles's law(volume constant)\n",
+ "#Thus,\n",
+ "print \"The absolute gas pressure increases by 25 percent\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The absolute gas pressure increases by 25 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.5 Page No : 242"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "V1 = 4.; \t\t\t#m**3 \t\t\t#initial volume\n",
+ "T2 = 0.+273; \t\t\t#celsius converted to kelvin \t\t\t#gas is cooled to 0 C \t\t\t#final temperature\n",
+ "T1 = 100+273; \t\t\t#celsius converted to kelvin \t\t\t#initial temperature\n",
+ "\n",
+ "# Calculations\n",
+ "V2 = V1*(T2/T1); \t\t\t#final volume \t\t\t#Charles's law(pressure constant) \t\t\t#unit:m**3\n",
+ "\n",
+ "# Results\n",
+ "print \"The final volume is %.2f m**3\"%(V2);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The final volume is 2.93 m**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6 Page No : 245"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Let us first put each of the given variables into a consistent set of units:\n",
+ "p = (200+14.7)*(144); \t\t\t#Unit:psfa*(lbf/ft**2) \t\t\t#1 ft**2 = 144 in**2 \t\t\t#pressure\n",
+ "T = (460.+73); \t\t\t#Fahrenheit temperature converted to absolute temperature \t\t\t#unit:R\n",
+ "V = 120./1728; \t\t\t#1 ft**3 = 1728 in**3 \t\t\t#total volume \t\t\t#unit:ft**3\n",
+ "R = 1545./28; \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#because the molecular weight of nitrogen is 28 \t\t\t#constant of proportionality\n",
+ "#Applying, p*v = R*T, \t\t\t#ideal gas law\n",
+ "v = (R*T)/p; \t\t\t#Unit:ft**3/lbm \t\t\t#specific volume\n",
+ "print \"The specific volume is %.2f ft**3/lbm\"%(v);\n",
+ "#The mass of gas is the total volume divided by the specific volume\n",
+ "print \"The gas in the container is %.2f lbm\"%(V/v);\n",
+ "#The same result is obtained by direct use of eq. p*V = m*R*T\n",
+ "m = (p*V)/(R*T); \t\t\t#The gas in the container \t\t\t#unit:lbm \t\t\t#ideal gas law\n",
+ "print \"The gas in the container is %.2f lbm\"%(m); \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The specific volume is 0.95 ft**3/lbm\n",
+ "The gas in the container is 0.07 lbm\n",
+ "The gas in the container is 0.07 lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.7 Page No : 245"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Applying , (p1*V1)/T1 = (p2*V2)/T2\n",
+ "#and p2 = p1*(T2/T1) because V1 = V2\n",
+ "p1 = 200+14.7; \t\t\t#Unit:psia \t\t\t#initial pressure\n",
+ "T2 = 460.+200; \t\t\t#final temperature is 200 F \t\t\t#Fahrenheit temperature converted to absolute temperature \t\t\t#unit:R\n",
+ "T1 = 460+73; \t\t\t#Fahrenheit temperature converted to absolute temperature \t\t\t#unit:R\n",
+ "\n",
+ "# Calculations\n",
+ "p2 = p1*(T2/T1); \t\t\t#final pressure \t\t\t#Unit:psia \t\t\t#Charles's law(volume constant)\n",
+ "\n",
+ "# Results\n",
+ "print \"The final pressure is %.2f psia\"%(p2);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The final pressure is 265.86 psia\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.8 Page No : 246"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#For CO2,\n",
+ "R = 8.314/44; \t\t\t#Unit:kJ/kg*K \t\t\t#constant of proportionality \t\t\t#Molecular weight of CO2 = 44\n",
+ "p = 500; \t\t\t#Unit:kPa \t\t\t#pressure\n",
+ "V = 0.5; \t\t\t#Unit:m**3 \t\t\t#volume\n",
+ "T = (100.+273); \t\t\t#Unit:K \t\t\t#Celsius converted to kelvin\n",
+ "\n",
+ "# Calculations\n",
+ "#Applying p*V = m*R*T ,\n",
+ "m = (p*V)/(R*T); \t\t\t#mass \t\t\t#kg \t\t\t#ideal gas law\n",
+ "\n",
+ "# Results\n",
+ "print \"The mass of gas in the math.tank is %.2f kg\"%(m);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass of gas in the math.tank is 3.55 kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.9 Page No : 252"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data\n",
+ "T2 = 500+460; \t\t\t#absolute final temperature \t\t\t#unit:R\n",
+ "T1 = 80+460; \t\t\t#absolute initial temperature \t\t\t#unit:R\n",
+ "#The equation cpbar = 0.338-(1.24*10**2/T)+(4.15*10**4)/T**2 has a form , cbar = Adash+(Bdash/T)+(Ddash/T**2)\n",
+ "#So,\n",
+ "Adash = 0.338; \t\t\t#constant\n",
+ "Bdash = -1.24*10**2; \t\t\t#constant\n",
+ "Ddash = 4.15*10**4; \t\t\t#constant\n",
+ "\n",
+ "# Calculations\n",
+ "#Therefore,from equation,cbar = Adash+((Bdash*math.log(T2/T1))/(T2-T1))+(Ddash/(T2*T1))\n",
+ "cpbar = Adash+((Bdash*math.log(T2/T1))/(T2-T1))+(Ddash/(T2*T1)); \t\t\t#The mean specific heat \t\t\t#Btu/lbm*R\n",
+ "\n",
+ "# Results\n",
+ "print \"The mean specific heat at constant pressure between 80F and 500F is %.2f Btu/lbm*R\"%(cpbar);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mean specific heat at constant pressure between 80F and 500F is 0.42 Btu/lbm*R\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.10 Page No : 252"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#The table in Appendix 3 does not give us the enthalpy data at 960R and 540R that we need.Interpolating yields\n",
+ "# T hbar T hbar\n",
+ "# 537 3729.5 900 6268.1\n",
+ "# 540 3750.4 960 6694.0\n",
+ "# 600 4167.9 1000 6977.9\n",
+ "#So,\n",
+ "hbar540 = 3729.5+(3./63)*(4167.9-3729.5); \t\t\t#enthalpy \t\t\t#unit:Btu/lbm\n",
+ "hbar960 = 6268.1+(60./100)*(6977.9-6268.1); \t\t\t#enthalpy \t\t\t#unit:Btu/lbm\n",
+ "#Note that hbar is given for a mass of 1 lb mole.To obtain the enthalpy per pound,it is necessary to divide the values og h by the molecular weight,28.\n",
+ "h2 = 6694.0; \t\t\t#enthalpy \t\t\t#unit:Btu/lbm\n",
+ "h1 = 3750.4; \t\t\t#enthalpy \t\t\t#unit:Btu/lbm\n",
+ "T2 = 500.+460; \t\t\t#absolute final temperature \t\t\t#unit:R\n",
+ "T1 = 80.+460; \t\t\t#absolute initial temperature \t\t\t#unit:R\n",
+ "\n",
+ "# Calculations\n",
+ "cbar = (h2-h1)/(28*(T2-T1)); \t\t\t#The mean specific heat at constant pressure \t\t\t#unit:Btu/lbm*R\n",
+ "\n",
+ "# Results\n",
+ "print \"The mean specific heat at constant pressure is %.2f Btu/lbm*R\"%(cbar);\n",
+ "#With the more extesive Gas tables,these interpolations are avoided.The Gas Tables provide a relatively easy and accurate method of obtaining average specific heats.Also,these tables have been computerized for ease of application.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mean specific heat at constant pressure is 0.25 Btu/lbm*R\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.11 Page No : 253"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data\n",
+ "T2 = 500+460; \t\t\t#absolute final temperature \t\t\t#unit:R\n",
+ "T1 = 80+460; \t\t\t#absolute initial temperature \t\t\t#unit:R\n",
+ "#cp = 0.219 + (3.42*10**-5*T) - (2.93*10**-9*T**2); \t\t\t#Unit:Btu/lbm*R\n",
+ "#Comparing with c = A+(B*T)+(D*T**2) \n",
+ "A = 0.219; \t\t\t#constant\n",
+ "B = 3.42*10**-5; \t\t\t#constant\n",
+ "D = 2.93*10**-9; \t\t\t#constant\n",
+ "\n",
+ "# Calculations\n",
+ "#Using these values and equation cbar = A+((B/2)(T2+T1))+((D/3)*(T2**2+(T2*T1)+T1**2))\n",
+ "cpbar = A+((B/2)*(T2+T1))+((D/3)*(T2**2+(T2*T1)+T1**2)); \t\t\t#The mean specific heat \t\t\t#Btu/lbm*R\n",
+ "\n",
+ "# Results\n",
+ "print \"The mean specific heat at constant pressure for air between 80F and 500F is %.2f Btu/lbm*R\"%(cpbar);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mean specific heat at constant pressure for air between 80F and 500F is 0.25 Btu/lbm*R\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.12 Page No : 255"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#The molecular weight of oxygen is 32.Therefore,\n",
+ "R = 1545./32; \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n",
+ "J = 778.; \t\t\t#conversion factor\n",
+ "cp = 0.24; \t\t\t#Unit:Btu/lbm*R \t\t\t#specific heat at constant pressure\n",
+ "\n",
+ "# Calculations\n",
+ "#cp-cv = R/J\n",
+ "cv = cp-(R/J); \t\t\t#specific heat at constant volume \t\t\t#unit:Btu/lbm*R\n",
+ "\n",
+ "# Results\n",
+ "print \"Specific heat at constant volume is %.2f Btu/lbm*R\"%(cv);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific heat at constant volume is 0.18 Btu/lbm*R\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.13 Page No : 255"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#From equation,cv = R/(k-1) ,\n",
+ "R = 8.314/32; \t\t\t#constant of proportionality \t\t\t#kJ/kg*K \t\t\t#The molecular weight of oxygen is 32\n",
+ "k = 1.4 \t\t\t#for oxygen \t\t\t#given \t\t\t#k = cp/cv\n",
+ "cv = R/(k-1); \t\t\t#Specific heat at constant volume \t\t\t#unit:kJ/kg*K\n",
+ "print \"Specific heat at constant volume is %.2f kJ/kg*K\"%(cv);\n",
+ "cp = k*cv; \t\t\t#specific heat at constant pressure \t\t\t#Unit:kJ/kg*K\n",
+ "print \"Specific heat at constant pressure is %.2f kJ/kg*K\"%(cp);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific heat at constant volume is 0.65 kJ/kg*K\n",
+ "Specific heat at constant pressure is 0.91 kJ/kg*K\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.14 Page No : 255"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data\n",
+ "R = 60.; \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n",
+ "deltah = 500.; \t\t\t#Btu/lbm \t\t\t#change in enthalpy\n",
+ "deltau = 350.; \t\t\t#Btu/lbm \t\t\t#change in internal energy\n",
+ "J = 778.; \t\t\t#conversion factor\n",
+ "#Because deltah-(cp*deltaT) and deltau = cv*deltaT\n",
+ "# deltah/deltau = (cp*deltaT)/(cv*deltaT) = cp/cv = k\n",
+ "k = deltah/deltau; \t\t\t#Ratio of specific heats\n",
+ "print \"Ratio of specific heats k is %.2f\"%(k);\n",
+ "#From equation cv = R/(J*(k-1))\n",
+ "cv = R/(J*(k-1)); \t\t\t#specific heat at constant volume \t\t\t#Btu/lbm*R\n",
+ "print \"Specific heat at constant volume is %.2f Btu/lbm*R\"%(cv);\n",
+ "cp = k*cv; \t\t\t#Specific heat at constant pressure \t\t\t#Btu/lbm*R\n",
+ "print \"Specific heat at constant pressure is %.2f Btu/lbm*R\"%(cp);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ratio of specific heats k is 1.43\n",
+ "Specific heat at constant volume is 0.18 Btu/lbm*R\n",
+ "Specific heat at constant pressure is 0.26 Btu/lbm*R\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.15 Page No : 256"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#When solving this type of problem,it is necessary to note carefully the information given and to write the correct energy equation for this process.Because the process is carried out at constant volume,the heat added equals the change in inernal energy.Because the change in internal energy per pound for the ideal gas is cv*(T2-T1),the total change in internal energy for m pounds must equals the heat added.Thus,\n",
+ "#data given\n",
+ "Q = 0.33; \t\t\t#heat\n",
+ "#Initial conditions\n",
+ "V = 60; \t\t\t#in**3 \t\t\t#volume\n",
+ "m = 0.0116; \t\t\t#lbs \t\t\t#mass\n",
+ "p1 = 90; \t\t\t#psia \t\t\t#pressure\n",
+ "T1 = 460+40; \t\t\t#Fahrenheit temperature converted to absolute temperature\n",
+ "#Final condition = Initial condition + heat\n",
+ "V = 60; \t\t\t#in**3 \t\t\t#volume\n",
+ "m = 0.0116; \t\t\t#lbs \t\t\t#mass\n",
+ "p2 = 108; \t\t\t#psia \t\t\t#pressure \n",
+ "T2 = 460+140; \t\t\t#Fahrenheit temperature converted to absolute temperature \t\t\t#unit:R\n",
+ "#Q = m*(u2-u1) = m*cv*(T2-T1)\n",
+ "\n",
+ "# Calculations and Results\n",
+ "cv = Q/(m*(T2-T1)); \t\t\t#specific heat at constant volume \t\t\t#Btu/lbm*R\n",
+ "print \"Specific heat at constant volume is %.2f Btu/lbm*R\"%(cv);\n",
+ "#To obtain cp,it is first necessary to obtain R.Enough information was given in the initial conditions of the problem to apply eqn. p*V = m*R*T\n",
+ "R = (144*p1*(V/1728.))/(m*T1); \t\t\t#1 ft**2 = 144 in**2 \t\t\t#1 ft**3 = 1728 in**3 \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n",
+ "print \"Consmath.tant of proportionality R is %.2f ft*lbf/lbm*R\"%(R);\n",
+ "#cp-cv = (R/J)\n",
+ "J = 778.; \t\t\t#conversion factor\n",
+ "cp = cv+(R/J); \t\t\t#Specific heat at constant pressure \t\t\t#Btu/lbm*R\n",
+ "print \"Specific heat at constant pressure is %.2f Btu/lbm*R\"%(cp);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific heat at constant volume is 0.28 Btu/lbm*R\n",
+ "Consmath.tant of proportionality R is 77.59 ft*lbf/lbm*R\n",
+ "Specific heat at constant pressure is 0.38 Btu/lbm*R\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.16 Page No : 260"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#data\n",
+ "cp = 0.24; \t\t\t#Specific heat at constant pressure \t\t\t#Btu/lbm*R\n",
+ "p2 = 15.; \t\t\t#psia \t\t\t#final pressure\n",
+ "p1 = 100.; \t\t\t#psia \t\t\t#initial pressure\n",
+ "T2 = 460.+0; \t\t\t#absolute final temperature \t\t\t#unit:R\n",
+ "T1 = 460.+100; \t\t\t#absolute initial temperature \t\t\t#unit:R\n",
+ "J = 778.; \t\t\t#conversion factor\n",
+ "R = 1545./29; \t\t\t#moleculer weight = 29 \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n",
+ "\n",
+ "# Calculations\n",
+ "#On the basis of the data given,\n",
+ "deltas = (cp*(math.log(T2/T1)))-((R/J)*(math.log(p2/p1))); \t\t\t#change in entropy \t\t\t#Btu/lbm*R\n",
+ "\n",
+ "# Results\n",
+ "print \"The change in enthalpy is %.2f Btu/lbm*R\"%(deltas);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The change in enthalpy is 0.08 Btu/lbm*R\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.17 Page No : 261"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#data of problem6.16\n",
+ "cp = 0.24; \t\t\t#Specific heat at constant pressure \t\t\t#Btu/lbm*R\n",
+ "p2 = 15.; \t\t\t#psia \t\t\t#final pressure\n",
+ "p1 = 100.; \t\t\t#psia \t\t\t#initial pressure\n",
+ "T2 = 460.+0; \t\t\t#absolute final temperature \t\t\t#unit:R\n",
+ "T1 = 460.+100; \t\t\t#absolute initial temperature \t\t\t#unit:R\n",
+ "J = 778.; \t\t\t#conversion factor\n",
+ "R = 1545./29; \t\t\t#moleculer weight = 29 \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n",
+ "#Because cp and R are given,let us first solve for cv,\n",
+ "#cp = (R*k)/(J*(k-1))\n",
+ "k = (cp*J)/((cp*J)-R); \t\t\t#k = cp/cv \t\t\t#ratio of specific heats\n",
+ "print \"Ratio of specific heats k is %.2f\"%(k);\n",
+ "#k = cp/cv\n",
+ "cv = cp/k; \t\t\t#Specific heat at constant volume \t\t\t#Btu/lbm*R\n",
+ "print \"Specific heat at constant volume is %.2f Btu/lbm*R\"%(cv);\n",
+ "#Now, deltas = (cv*math.log(p2/p1))+(cp*math.log(v2/v1));\n",
+ "#But, v2/v1 = (T2*p1)/(T1*p2)\n",
+ "v2byv1 = (T2*p1)/(T1*p2); \t\t\t# v2/v1 \t\t\t#unitless\n",
+ "deltas = (cv*math.log(p2/p1))+(cp*math.log(v2byv1)); \t\t\t#The change in enthalpy \t\t\t#unit:Btu/lbm*R\n",
+ "print \"The change in enthalpy is %.2f Btu/lbm*R\"%(deltas);\n",
+ "#The agreement is very good.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ratio of specific heats k is 1.40\n",
+ "Specific heat at constant volume is 0.17 Btu/lbm*R\n",
+ "The change in enthalpy is 0.08 Btu/lbm*R\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.18 Page No : 261"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#data,\n",
+ "cp = 0.9093; \t\t\t#Specific heat at constant pressure \t\t\t#kJ/kg*R\n",
+ "p2 = 150.; \t\t\t#kPa \t\t\t#final pressure\n",
+ "p1 = 500.; \t\t\t#kPa \t\t\t#initial pressure\n",
+ "T2 = 273.+0; \t\t\t#final temperature \t\t\t#Celsius converted to kelvin\n",
+ "T1 = 273.+100; \t\t\t#initial temperature \t\t\t#Celsius converted to kelvin\n",
+ "#J = 778; \t\t\t#conversion factor\n",
+ "R = 8.314/32; \t\t\t#moleculer weight of oxygen = 32 \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n",
+ "\n",
+ "# Calculations\n",
+ "#Using equation, and dropping J gives,\n",
+ "deltas = (cp*(math.log(T2/T1)))-((R)*(math.log(p2/p1))); \t\t\t#change in entropy \t\t\t#kJ/kg*K\n",
+ "#For 2 kg,\n",
+ "deltaS = 2*deltas; \t\t\t#The change in enthalpy in kJ/K\n",
+ "\n",
+ "# Results\n",
+ "print \"For 2 kg oxygen, The change in enthalpy is %.2f kJ/K\"%(deltaS);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For 2 kg oxygen, The change in enthalpy is 0.06 kJ/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.19 Page No : 262"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#from the equation, deltas/cv = (k*math.log(v2/v1))+ math.log(p2/p1) \t\t\t#change in entropy\n",
+ "k = 1.4; \t\t\t#k = cp/cv \t\t\t#ratio of specific heats\n",
+ "#deltas = (1/4)*cv \t\t\t#so, \n",
+ "# 1/4 = (k*math.log(v2/v1))+ math.log(p2/p1)\n",
+ "v2 = 1./2; \t\t\t#Because,v2 = (1/2)*v1 \t\t\t#initial specific volume \n",
+ "v1 = 1.; \t\t\t#final specific volume\n",
+ "\n",
+ "# Calculations\n",
+ "p2byp1 = math.exp((1./4)-(k*math.log(v2/v1))); \t\t\t#increase in pressure\n",
+ "\n",
+ "# Results\n",
+ "print \"p2/p1 = %.2f\"%(p2byp1);\n",
+ "print \"So, increase in pressure is %.2f \"%(p2byp1);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "p2/p1 = 3.39\n",
+ "So, increase in pressure is 3.39 \n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.20 Page No : 264"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#data\n",
+ "T2 = 460+270; \t\t\t#Fahrenheit temperature converted to absolute final temperature \t\t\t#unit:R\n",
+ "T1 = 460+70; \t\t\t#Fahrenheit temperature converted to absolute initial temperature \t\t\t#unit:R\n",
+ "cv = 0.17; \t\t\t#specific heat at constant volume \t\t\t#Btu/lbm*R\n",
+ "\n",
+ "# Calculations\n",
+ "#Now,\n",
+ "deltas = cv*math.log(T2/T1); \t\t\t#change in entropy \t\t\t#Unit:Btu/lbm*R\n",
+ "#For 1/2 lb,\n",
+ "deltaS = (1./2)*deltas; \t\t\t#The change in enthalpy in Btu/R\n",
+ "\n",
+ "# Results\n",
+ "print \"For 1/2 lb of gas, The change in enthalpy is %.2f Btu/R\"%(deltaS);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For 1/2 lb of gas, The change in enthalpy is 0.00 Btu/R\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.21 Page No : 264"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#data\n",
+ "T2 = 100.+273; \t\t\t#Celsius temperature converted to Kelvin \t\t\t#final temperature\n",
+ "T1 = 20+273; \t\t\t#Celsius temperature converted to Kelvin \t\t\t#initial temperature\n",
+ "cv = 0.7186; \t\t\t#specific heat at constant volume \t\t\t#kJ/kg*K\n",
+ "#Now,\n",
+ "deltas = cv*math.log(T2/T1); \t\t\t#change in entropy \t\t\t#Unit:kJ/kg*K\n",
+ "#For 0.2 kg,\n",
+ "deltaS = (0.2)*deltas; \t\t\t#The change in enthalpy in kJ/K\n",
+ "print \"For 0.2 kg of air, The change in enthalpy is %.2f kJ/K\"%(deltaS);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For 0.2 kg of air, The change in enthalpy is 0.03 kJ/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.22 Page No : 264"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#data\n",
+ "deltas = 0.0743; \t\t\t#change in entropy \t\t\t#Unit:Btu/lbm*R\n",
+ "T1 = 460+100; \t\t\t#Fahrenheit temperature converted to absolute initial temperature\n",
+ "cv = 0.219; \t\t\t#specific heat at constant volume \t\t\t#Btu/lbm*R\n",
+ "#Now,\n",
+ "\n",
+ "# Calculations\n",
+ "#deltas = cv*math.log(T2/T1); \n",
+ "T2 = T1*math.exp(deltas/cv); \t\t\t#higher temperature \t\t\t#absolute temperature \t\t\t#unit:R\n",
+ "\n",
+ "# Results\n",
+ "print \"The higher temperature is %.2f R\"%(T2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The higher temperature is 786.20 R\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.23 Page No : 265"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#data\n",
+ "deltaS = 0.4386; \t\t\t#change in entropy \t\t\t#Unit:kJ/K\n",
+ "T2 = 273+425; \t\t\t#Celsius temperature converted to kelvin \t\t\t#initial temperature\n",
+ "cv = 0.8216; \t\t\t#specific heat at constant volume \t\t\t#kJ/kg*K\n",
+ "m = 1.5; \t\t\t#mass \t\t\t#kg\n",
+ "#Now,\n",
+ "\n",
+ "# Calculations\n",
+ "#deltas = m*cv*math.log(T2/T1); \n",
+ "T1 = T2/(math.exp(deltaS/(m*cv))) \t\t\t#initial temperature \t\t\t#unit:K\n",
+ "\n",
+ "# Results\n",
+ "print \"The initial temperature of the process is %.2f K or %.2f C\"%(T1,T1-273)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The initial temperature of the process is 488.98 K or 215.98 C\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.24 Page No : 267"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#data given\n",
+ "T2 = 460.+400; \t\t\t#Fahrenheit temperature converted to absolute final temperature \t\t\t#unit:R\n",
+ "T1 = 460.+70; \t\t\t#Fahrenheit temperature converted to absolute initial temperature \t\t\t#unit:R\n",
+ "cp = 0.24; \t\t\t#specific heat at constant pressure \t\t\t#Btu/lbm*R\n",
+ "J = 778.; \t\t\t#conversion factor\n",
+ "R = 1545./29; \t\t\t#moleculer weight = 29 \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n",
+ "#From the energy equation for the constant-pressure process,the heat transferred is deltah.Therefore,\n",
+ "#q = deltah = cp*(T2-T1)\n",
+ "deltah = cp*(T2-T1); \t\t\t#heat transferred \t\t\t#Btu/lb \t\t\t#into system\n",
+ "print \"The heat transferred is %.2f Btu/lbinto system)\"%(deltah);\n",
+ "deltas = cp*math.log(T2/T1); \t\t\t#increase in entropy \t\t\t#Btu/lbm*R\n",
+ "print \"The increase in entropy is %.2f Btu/lbm*R\"%(deltas);\n",
+ "#The flow work change is (p2*v2)/J - (p1*v1)/J = (R/J)*(T2-T1)\n",
+ "flowworkchange = (R/J)*(T2-T1); \t\t\t#Btu/lbm \t\t\t#The flow work change per pound of air\n",
+ "print \"The flow work change per pound of air is %.2f Btu/lbm\"%(flowworkchange);\n",
+ "#In addition to each of the assumptions made in all the process being considered,it has further been tacitly assumed that these processes are carried out quasi- statically and without friction.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat transferred is 79.20 Btu/lbinto system)\n",
+ "The increase in entropy is 0.12 Btu/lbm*R\n",
+ "The flow work change per pound of air is 22.60 Btu/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.25 Page No : 268"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#data given\n",
+ "T2 = 500.+273; \t\t\t#Celsius temperature converted to Kelvin \t\t\t#final temperature\n",
+ "T1 = 20+273; \t\t\t#Celsius temperature converted to Kelvin \t\t\t#initial temperature\n",
+ "cp = 1.0062; \t\t\t#specific heat at constant pressure \t\t\t#kJ/kg*K\n",
+ "#From the energy equation for the constant-pressure process,the heat transferred is deltah.Therefore,\n",
+ "#q = deltah = cp*(T2-T1)\n",
+ "deltah = cp*(T2-T1); \t\t\t#heat transferred \t\t\t#kJ/kg \t\t\t#into system\n",
+ "print \"The heat transferred is per kimath.logram of air %.2f kJ/kg\"%(deltah);\n",
+ "deltas = cp*math.log(T2/T1); \t\t\t#increase in entropy \t\t\t#kJ/kg*K\n",
+ "print \"The increase in entropy per kimath.logram of air is %.2f kJ/kg*K\"%(deltas);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat transferred is per kimath.logram of air 482.98 kJ/kg\n",
+ "The increase in entropy per kimath.logram of air is 0.98 kJ/kg*K\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.26 Page No : 270"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#data given\n",
+ "v2 = 2.; \t\t\t#Because,v2 = (2)*v1 \t\t\t#volume increases to its twice its final volume\n",
+ "v1 = 1.; \t\t\t#initial volume\n",
+ "T = 460.+200; \t\t\t#Fahrenheit temperature converted to absolute temperature\n",
+ "J = 778.; \t\t\t#conversion factor\n",
+ "R = 1545./28; \t\t\t#moleculer weight of nitrogen = 28 \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n",
+ "#From the equation, w/J = q = T*deltas = ((R*T)/J)*math.log(v2/v1)\n",
+ "q = ((R*T)/J)*math.log(v2/v1); \t\t\t#Btu/lbm \t\t\t#the heat added to system\n",
+ "#For 0.1 lb,\n",
+ "Q = 0.1*q; \t\t\t#Btu \t\t\t#the heat added to system\n",
+ "print \"The heat added to system is %.2f Btu\"%(Q);\n",
+ "#The work out of the system is equal to the heat added;thus,\n",
+ "WbyJ = Q; \t\t\t#The work out of the system(out of the system) \t\t\t#unit:Btu\n",
+ "print \"The work out of the system is %.2f Btuout of the system)\"%(WbyJ);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat added to system is 3.24 Btu\n",
+ "The work out of the system is 3.24 Btuout of the system)\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.27 Page No : 270"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#data given\n",
+ "T = 50+273; \t\t\t#Celsius temperature converted to Kelvin \t\t\t#final temperature \t\t\t#unit:K\n",
+ "v2 = 1./2; \t\t\t#Because,v2 = (1/2)*v1 \t\t\t#volume increases to its half its final volume\n",
+ "v1 = 1.;\n",
+ "R = 8.314/32; \t\t\t#moleculer weight of oxygen = 32 \t\t\t#Unit:kJ/kg*K \t\t\t#constant of proportionality\n",
+ "#From the equation, q = ((R*T))*math.log(v2/v1)\n",
+ "q = R*T*math.log(v2/v1); \t\t\t#heat added \t\t\t#kJ/kg\n",
+ "print \"The heat added to system is %.2f kJ/kgheat out of system)\"%(q);\n",
+ "#The work out of the system is equal to the heat added;thus,\n",
+ "W = q; \t\t\t#The work out of the system \t\t\t#unit:kJ/kg\n",
+ "print \"The work out of the system is %.2f kJ/kginto system)\"%(W);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat added to system is -58.17 kJ/kgheat out of system)\n",
+ "The work out of the system is -58.17 kJ/kginto system)\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.28 Page No : 271"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#data given in problem 6.27\n",
+ "T = 50+273; \t\t\t#Celsius temperature converted to Kelvin \t\t\t#final temperature\n",
+ "v2 = 1./2; \t\t\t#Because,v2 = (1/2)*v1 \t\t\t#volume increases to its half its final volume\n",
+ "v1 = 1;\n",
+ "R = 8.314/32; \t\t\t#moleculer weight of oxygen = 32 \t\t\t#Unit:kJ/kg*K \t\t\t#constant of proportionality\n",
+ "#From the equation, q = ((R*T))*math.log(v2/v1)\n",
+ "q = R*T*math.log(v2/v1); \t\t\t#heat added \t\t\t#kJ/kg\n",
+ "print \"The heat added to system is %.2f kJ/kgheat out of system)\"%(q);\n",
+ "#For a constant temperature,\n",
+ "deltas = q/T; \t\t\t#Change in entropy \t\t\t#unit:kJ/kg*K\n",
+ "print \"The change in entropy is %.2f kJ/kg*K\"%(deltas);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat added to system is -58.17 kJ/kgheat out of system)\n",
+ "The change in entropy is -0.18 kJ/kg*K\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.29 Page No : 274"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#data given\n",
+ "T1 = 1000; \t\t\t#absolute initial temperature \t\t\t#unit:R\n",
+ "p2 = 1.; \t\t\t#unit:atm \t\t\t#absolute final pressure\n",
+ "p1 = 5.; \t\t\t#unit:atm \t\t\t#absolute initial pressure\n",
+ "J = 778.; \t\t\t#conversion factor\n",
+ "R = 1545./29; \t\t\t#moleculer weight = 29 \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n",
+ "k = 1.4; \t\t\t#k = cp/cv \t\t\t#ratio of specific heats\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#From the equation, \n",
+ "T2 = T1*((p2/p1)**((k-1)/k)); \t\t\t#Unit:R \t\t\t#The absolute final temperature\n",
+ "print \"The absolute final temperature is %.2f R\"%(T2);\n",
+ "work = (R*(T2-T1))/(J*(1-k)); \t\t\t#Btu/lbm \t\t\t#The work done by air(out)\n",
+ "print \"The work done by air is %.2f Btu/lbmout)\"%(work)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The absolute final temperature is 631.39 R\n",
+ "The work done by air is 63.11 Btu/lbmout)\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.30 Page No : 274"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#data given\n",
+ "#mass of 1 kg\n",
+ "T1 = 500+273; \t\t\t#Celsius temperature converted to Kelvin \t\t\t#final temperature\n",
+ "p2 = 1.; \t\t\t#atm \t\t\t#absolute final pressure\n",
+ "p1 = 5.; \t\t\t#atm \t\t\t#absolute initial pressure\n",
+ "J = 778.; \t\t\t#conversion factor\n",
+ "R = 8.314/29; \t\t\t#moleculer weight = 29 \t\t\t#Unit:kJ/kg*K \t\t\t#constant of proportionality\n",
+ "k = 1.4; \t\t\t#k = cp/cv \t\t\t#ratio of specific heat\n",
+ "#From the equation, \n",
+ "T2 = T1*((p2/p1)**((k-1)/k)); \t\t\t#Unit:Kelvin \t\t\t#The absolute final temperature\n",
+ "print \"The absolute final temperature is %.2f K or %.2f C\"%(T2,T2-273);\n",
+ "work = (R*(T2-T1))/((1-k)); \t\t\t#kJ/kg \t\t\t#The work done by air(out)\n",
+ "print \"The work done by air is %.2f kJ/kgout)\"%(work)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The absolute final temperature is 488.06 K or 215.06 C\n",
+ "The work done by air is 204.22 kJ/kgout)\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.31 Page No : 275"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy.linalg import inv\n",
+ "import math\n",
+ "\n",
+ "#data given\n",
+ "T1 = 800.+273; \t\t\t#Celsius temperature converted to Kelvin \t\t\t#initial temperature\n",
+ "T2 = 500.+273; \t\t\t#Celsius temperature converted to Kelvin \t\t\t#final temperature\n",
+ "p2 = 1.; \t\t\t#atm \t\t\t#absolute final pressure\n",
+ "p1 = 5.; \t\t\t#atm \t\t\t#absolute initial pressure\n",
+ "\n",
+ "# Calculations\n",
+ "#A gas expands isentropically\n",
+ "#From the equation,\n",
+ "#T2/T1 = ((p2/p1)**((k-1)/k));\n",
+ "#rearranging,\n",
+ "k = inv([[1-((math.log(T2/T1)/math.log(p2/p1)))]]); \t\t\t#k = cp/cv \t\t\t#Ratio of specific heats\n",
+ "\n",
+ "# Results\n",
+ "print \"Ratio of specific heats k) is %.2f\"%(k);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ratio of specific heats k) is 1.26\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.32 Page No : 279"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#data given\n",
+ "n = 1.3; \t\t\t#p*v**1.3 = constant\n",
+ "k = 1.4; \t\t\t#k = cp/cv Ratio of specific heats \n",
+ "cp = 0.24; \t\t\t#specific heat at constant pressure \t\t\t#Btu/lbm*R\n",
+ "T2 = 600.; \t\t\t#absolute final temperature \t\t\t#unit:R\n",
+ "T1 = 1500.; \t\t\t#absolute initial temperature \t\t\t#unit:R\n",
+ "R = 53.3; \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n",
+ "J = 778.; \t\t\t#conversion factor\n",
+ "cv = cp/k; \t\t\t#specific heat at constant volume \t\t\t#Btu/lbm*R\n",
+ "#Therefore,\n",
+ "cn = cv*((k-n)/(1-n)); \t\t\t#Polytropic specific heat \t\t\t#Btu/lbm*R\n",
+ "print \"Polytropic specific heatcn, is %.2f Btu/lbm*R\"%(cn);\n",
+ "#The negative sign of cn indicates that either the heat transfer for the process comes from the system or there is a negative temperature change while heat is transferred to the system.\n",
+ "#The heat transferred is cn*(T2-T1).Therefore,\n",
+ "q = cn*(T2-T1); \t\t\t#heat transferred \t\t\t#Btu/lbm(to the system)\n",
+ "print \"The heat transferred is %.2f Btu/lbmto the system\"%(q);\n",
+ "#The work done can be found Using equation,\n",
+ "w = (R*(T2-T1))/(J*(1-n)); \t\t\t#Btu/lbm \t\t\t#the workdone(from the system)\n",
+ "print \"The work done is %.2f Btu/lbmfrom the system\"%(w);\n",
+ "deltas = cn*math.log(T2/T1) \t\t\t#change in entropy \t\t\t#Btu/lbm*R\n",
+ "print \"The change in enthalpy is %.2f Btu/lbm*R\"%(deltas);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Polytropic specific heatcn, is -0.06 Btu/lbm*R\n",
+ "The heat transferred is 51.43 Btu/lbmto the system\n",
+ "The work done is 205.53 Btu/lbmfrom the system\n",
+ "The change in enthalpy is 0.05 Btu/lbm*R\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.33 Page No : 279"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#data given in problem 6.32,\n",
+ "n = 1.3; \t\t\t#p*v**1.3 = constant\n",
+ "k = 1.4; \t\t\t#k = cp/cv \t\t\t#ratio of specific heats\n",
+ "cp = 0.24; \t\t\t#specific heat at constant pressure \t\t\t#Btu/lbm*R\n",
+ "T2 = 600.; \t\t\t#absolute final temperature \t\t\t#unit:R\n",
+ "T1 = 1500.; \t\t\t#absolute initial temperature \t\t\t#unir:R\n",
+ "R = 53.3; \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n",
+ "J = 778.; \t\t\t#conversion factor\n",
+ "#Equation,\n",
+ "# T1/T2 = ((p1/p2)**((n-1)/n));\n",
+ "#rearranging,\n",
+ "p1byp2 = math.exp(math.log(T1/T2)/((n-1)/n)); \t\t\t#The ratio of inlet to outlet pressure\n",
+ "print \"The ratio of inlet to outlet pressure is %.2f\"%(p1byp2);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The ratio of inlet to outlet pressure is 53.02\n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.34 Page No : 284"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#From the table at 1000 R: \t\t\t#From the table at 500 R:\n",
+ "h2 = 240.98; \n",
+ "h1 = 119.48; \n",
+ "#Btu/lbm \t\t\t#enthalpy \t\t\t#Btu/lbm \t\t\t#enthalpy\n",
+ "u2 = 172.43; \n",
+ "u1 = 85.20; \n",
+ "#Btu/lbm \t\t\t#internal energy \t\t\t#Btu/lbm \t\t\t#internal energy \n",
+ "fy2 = 0.75042; \n",
+ "fy1 = 0.58233; \n",
+ "#Btu/lbm*R \t\t\t#Btu/lbm*R\n",
+ "\n",
+ "#The change in enthalpy is\n",
+ "deltah = h2-h1; \t\t\t#Btu/lbm\n",
+ "#The change in internal energy is\n",
+ "deltau = u2-u1; \t\t\t#Btu/lbm\n",
+ "print \"The change in enthalpy is %.2f Btu/lbm & the change in internal energy is %.2f Btu/lbm\"%(deltah,deltau);\n",
+ "#Because in the constant-pressure process -R*math.log(p2/p1) is zero,\n",
+ "deltas = fy2-fy1; \t\t\t#Btu/lbm*R \t\t\t#The entropy when air is heated at constant pressure\n",
+ "print \"The entropy when air is heated at constant pressure is %.2f Btu/lbm/R\"%(deltas);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The change in enthalpy is 121.50 Btu/lbm & the change in internal energy is 87.23 Btu/lbm\n",
+ "The entropy when air is heated at constant pressure is 0.17 Btu/lbm/R\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.35 Page No : 285"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#In this problem,the air expands from 5 atm absolute to 1 atm absolute from an initial temperature of 1000R,\n",
+ "pr = 12.298; \t\t\t#relative pressure \t\t\t#unit:atm \n",
+ "h = 240.98; \t\t\t#Btu/lbm \t\t\t#enthalpy \n",
+ "pr = 12.298/5; \t\t\t#The value of the final relative pressure \t\t\t#unit:atm\n",
+ "#Interpolation in the air table yields the following:\n",
+ "# T pr\n",
+ "# 620 2.249\n",
+ "# 2.4596\n",
+ "# 640 2.514\n",
+ "T = 620+(((2.4596-2.249)/(2.514-2.249))*20); \t\t\t#the final temperature \t\t\t#unit:R\n",
+ "print \"The absolute final temperature is %.2f R\"%(T);\n",
+ "u1 = 172.43; \t\t\t#initial internal energy \t\t\t#Btu/lbm\n",
+ "u2 = 108.51; \t\t\t#final internal energy \t\t\t#Btu/lbm\n",
+ "work = u1-u2; \t\t\t#Btu/lbm The work done by air in an isentropic nonflow expansion \t\t\t#where the value of u2 is obtained by interpolation at T temperature and the value of u1 is read from the air table at 1000 R. \n",
+ "print \"The work done by air in an isentropic nonflow expansion is %.2f Btu/lbmout)\"%(work)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The absolute final temperature is 635.89 R\n",
+ "The work done by air in an isentropic nonflow expansion is 63.92 Btu/lbmout)\n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.36 Page No : 288"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# given data\n",
+ "T = 1000+460; \t\t\t#Fahrenheit temperature converted to absolute temperature\n",
+ "#The velocity of sound in air at 1000 F is\n",
+ "Va = 49.0*math.sqrt(T); \t\t\t#velocity \t\t\t#ft/s\n",
+ "print \"The velocity of sound air at 1000 F is %.2f ft/s\"%(Va);\n",
+ "#Hydrogen has a specific heat ratio of 1.41 and R = 766.53.Therefore,\n",
+ "khydrogen = 1.41; \t\t\t#specific heats ratio for air\n",
+ "kair = 1.40; \t\t\t#specific heats ratio for air\n",
+ "Rhydrogen = 766.53; \t\t\t#gas constant \t\t\t#ft*lbf/lbm*R\n",
+ "Rair = 53.36; \t\t\t#gas constant \t\t\t#ft*lbf/lbm*R\n",
+ "# Vahydrogen/Vaair = math.sqrt((Rhydrogen*khydrogen)/(Rair*kair))\n",
+ "#rearranging,\n",
+ "Vahydrogen = Va*math.sqrt((Rhydrogen*khydrogen)/(Rair*kair)); \t\t\t#The velocity of sound in hydrogen at 1000 F \t\t\t#unit:ft/s\n",
+ "print \"The velocity of sound in hydrogen at 1000 F is %.2f ft/s\"%(Vahydrogen);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity of sound air at 1000 F is 1872.29 ft/s\n",
+ "The velocity of sound in hydrogen at 1000 F is 7121.55 ft/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 46
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.37 Page No : 288"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# given data\n",
+ "T = 200+460.; \t\t\t#Fahrenheit temperature converted to absolute temperature \t\t\t#unit:R\n",
+ "V = 1500; \t\t\t#ft/s \t\t\t#the local velocity\n",
+ "Va = 49.0*math.sqrt(T); \t\t\t#velocity of sound air at 200 F \t\t\t#unit:ft/s\n",
+ "print \"The velocity of sound air at 200 F is %.2f ft/s\"%(Va);\n",
+ "M = V/Va; \t\t\t#The Mach number = the local velocity/velocity of sound \t\t\t#unitless\n",
+ "print \"The Mach number is %.2f\"%(M);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity of sound air at 200 F is 1258.83 ft/s\n",
+ "The Mach number is 1.19\n"
+ ]
+ }
+ ],
+ "prompt_number": 47
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.38 Page No : 290"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#data given\n",
+ "V = 1000; \t\t\t#ft/s \t\t\t#the fluid velocity\n",
+ "gc = 32.17; \t\t\t#Unit:(LBm*ft)/(LBf*s**2) \t\t\t#gc is constant of proportionality\n",
+ "J = 778; \t\t\t#conversion factor\n",
+ "h = 1204.4; \t\t\t#Btu/lbm \t\t\t#enthalpy of saturated steam\n",
+ "#h0-h = V**2/(2*gc*J) \n",
+ "h0 = h+((V**2)/(2*gc*J)); \t\t\t#Btu/lbm \t\t\t#h0 = stagnation enthalpy\n",
+ "print \"The total enthalpy is %.2f Btu/lbm\"%(h0);\n",
+ "#It will be noted for this problem that if the initial velocity had been 100ft/s,deltah would have been 0.2 Btu/lbm,and for most practical purpposes,the total properties and those of the flowing fluid would have been essentially the same.Thus,for low-velocity fluids,the difference in total and steam properties can be neglected.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total enthalpy is 1224.38 Btu/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.39 Page No : 297"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "from numpy.linalg import inv\n",
+ "\n",
+ "# given data\n",
+ "k = 1.4; \t\t\t#the specific heats ratio \t\t\t#k = cp/cv\n",
+ "M = 1; \t\t\t#(table 6.5) \t\t\t#The Mach number = the local velocity/velocity of sound\n",
+ "T0 = 800; \t\t\t#absolute temperature \t\t\t#unit:R\n",
+ "gc = 32.17; \t\t\t#Unit:(LBm*ft)/(LBf*s**2) \t\t\t#gc is constant of proportionality\n",
+ "R = 53.35; \t\t\t#gas constant \t\t\t#ft*lbf/lbm*R\n",
+ "p0 = 300; \t\t\t#psia \t\t\t#pressure\n",
+ "\n",
+ "# * or \"star\" subscripts to conditions in which M = 1;\n",
+ "# \"0\" subscript refers to isentropic stagnation\n",
+ "#Refer to figure 6.26,\n",
+ "#Tstar/T0 = 0.8333\n",
+ "Tstar = T0*0.8333; \t\t\t#temperature when M = 1 \t\t\t#unit:R\n",
+ "print \"If the mach number at the outlet is unity, temperature is %.2f R\"%(Tstar);\n",
+ "Vat = math.sqrt(gc*R*Tstar*k); \t\t\t#ft/s \t\t\t#Vat = V2 \t\t\t#local velocity of sound\n",
+ "print \"If the mach number at the outlet is unity, velocity is %.2f ft/s\"%(Vat)\n",
+ "\n",
+ "#For A/Astar = 2.035\n",
+ "#The table yields\n",
+ "M1 = 0.3; \t\t\t#mach number at inlet\n",
+ "print \"At inlet, The mach number is %.2f\"%(M1)\n",
+ "#pstar/p0 = 0.52828\n",
+ "pstar = p0*0.52828; \t\t\t#pressure when M = 1 \t\t\t#psia\n",
+ "#also,\n",
+ "#T1/T0 = 0.98232 and p1/p0 = 0.93947\n",
+ "#Therefore,\n",
+ "T1 = T0*0.982332; \t\t\t#unit:R \t\t\t#T1 = temperature at inlet\n",
+ "print \"At inlet, The temperature is %.2f R\"%(T1);\n",
+ "p1 = p0*0.93947; \t\t\t#psia \t\t\t#p1 = pressure at inlet\n",
+ "print \"At inlet, The pressure is %.2f psia\"%(p1);\n",
+ "#From the inlet conditions derived,\n",
+ "Va1 = math.sqrt(gc*k*R*T1); \t\t\t#ft/s \t\t\t#V1 = velocity at inlet\n",
+ "V1 = M1*Va1; \t\t\t#ft/s \t\t\t#velocity\n",
+ "print \"At inlet, The velocity is %.2f ft/s\"%(V1);\n",
+ "#The specific volume at inlet is found from the equation of state for an ideal gas:\n",
+ "v = (R*T1)/(p1*144); \t\t\t#ft**3/lbm \t\t\t#1 ft**2 = 144 in**2(for conversion of unit) \t\t\t#specific volume\n",
+ "rho = inv([[v]]); \t\t\t#inverse of specific volume \t\t\t#density\n",
+ "A = 2.035; \t\t\t#area \t\t\t#ft**2\n",
+ "m = rho*A*V1; \t\t\t#mass flow \t\t\t#unit:lbm/s\n",
+ "print \"At inlet, The mass flow is %.2f lbm/s\"%(m);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "If the mach number at the outlet is unity, temperature is 666.64 R\n",
+ "If the mach number at the outlet is unity, velocity is 1265.62 ft/s\n",
+ "At inlet, The mach number is 0.30\n",
+ "At inlet, The temperature is 785.87 R\n",
+ "At inlet, The pressure is 281.84 psia\n",
+ "At inlet, The velocity is 412.24 ft/s\n",
+ "At inlet, The mass flow is 812.08 lbm/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.40 Page No : 299"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# * or \"star\" subscripts to conditions in which M = 1;\n",
+ "# \"0\" subscript refers to isentropic stagnation\n",
+ "#This problem will be solved by two methods(A and B)\n",
+ "print \"Method A\"; \t\t\t#By equations:\n",
+ "k = 1.4; \t\t\t#the specific heat ratio \t\t\t#k = cp/cv\n",
+ "R = 53.3; \t\t\t#gas constant \t\t\t#ft*lbf/lbm*R\n",
+ "M = 2.5; \t\t\t#mach number = the local velocity/velocity of sound\n",
+ "print \"Solution for a\";\n",
+ "# T/Tstar = (k+1)/(2*(1+((1/2)*(k-1)*M**2)))\n",
+ "# Tstar/T0 = 2/(k+1)\n",
+ "#Therefore,\n",
+ "# (Tstar/T0)*(T/Tstar) = (T/T0) = 1/(1+((1/2)*(k-1)*M**2))\n",
+ "T0 = 560; \t\t\t#absolute temperature or stagnation temperature \t\t\t#unit:R\n",
+ "T = T0/(1+((1/2)*(k-1)*M**2)); \t\t\t#temperature at M = 2.5\n",
+ "print \"The temperature is %.2f R\"%(T);\n",
+ "print \"Solution for b\";\n",
+ "p = 0.5; \t\t\t#static pressure \t\t\t#unit:psia\n",
+ "# p0/p = (T0/T)**(k/(k-1))\n",
+ "p0 = p*14.7*((T0/T)**(k/(k-1))); \t\t\t#pressure at M = 2.5 \t\t\t#unit:psia\n",
+ "print \"The pressure is %.2f psia\"%(p0);\n",
+ "print \"Solution for c\";\n",
+ "gc = 32.17; \t\t\t#Unit:(LBm*ft)/(LBf*s**2) \t\t\t#gc is constant of proportionality\n",
+ "Va = math.sqrt(gc*k*R*T); \t\t\t#ft/s \t\t\t#local velocity of sound\n",
+ "V = M*Va; \t\t\t#valocity at M = 2.5 \t\t\t#unit:ft/s\n",
+ "print \"The velocity is %.2f ft/s\"%(V);\n",
+ "print \"Solution for d\";\n",
+ "v = (R*T)/(p*14.7*144); \t\t\t#ft**3/lbm \t\t\t#1 ft**2 = 144 in**2 \t\t\t#specific volume at M = 2.5\n",
+ "print \"The specific volume is %.2f ft**3/lbm\"%(v);\n",
+ "print \"Solution for e\";\n",
+ "#Mass velocity is definrd as the mass flow per unit area\n",
+ "# m/A = (A*V)/(v*A) = V/v\n",
+ "print \"The mass velocity is %.2f lbm/s*ft**2)\"%(V/v); \t\t\t#mass velocity at M = 2.5\n",
+ "\n",
+ "\n",
+ "print \"Method B\"; \t\t\t#By the gas tables: \t\t\t#table 6.5 gives\n",
+ "M = 2.5; \t\t\t#mach number = the local velocity/velocity of sound\n",
+ "print \"Solution for a\";\n",
+ "T0 = 560; \t\t\t#absolute temperature or stagnation temperature\n",
+ "#T/T0 = 0.44444\n",
+ "T = T0*0.44444; \t\t\t#temperature at M = 2.5\n",
+ "print \"The temperature is %.2f R\"%(T)\n",
+ "print \"Solution for b\";\n",
+ "p = 0.5; \t\t\t#static pressure\n",
+ "#p/p0 = 0.05853\n",
+ "p0 = (p*14.7)/0.05853; \t\t\t#pressure at M = 2.5\n",
+ "print \"The pressure is %.2f psia\"%(p0);\n",
+ "print \"Solution for c\";\n",
+ "print \"As before %.2f ft/s\"%(V)\n",
+ "print \"Solution for d\";\n",
+ "print \"As before %.2f ft**3/lbm\"%(v)\n",
+ "print \"Solution for e\";\n",
+ "print \"As before %.2f lbm/s*ft**1)\"%(V/v)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Method A\n",
+ "Solution for a\n",
+ "The temperature is 560.00 R\n",
+ "Solution for b\n",
+ "The pressure is 7.35 psia\n",
+ "Solution for c\n",
+ "The velocity is 2898.59 ft/s\n",
+ "Solution for d\n",
+ "The specific volume is 28.20 ft**3/lbm\n",
+ "Solution for e\n",
+ "The mass velocity is 102.78 lbm/s*ft**2)\n",
+ "Method B\n",
+ "Solution for a\n",
+ "The temperature is 248.89 R\n",
+ "Solution for b\n",
+ "The pressure is 125.58 psia\n",
+ "Solution for c\n",
+ "As before 2898.59 ft/s\n",
+ "Solution for d\n",
+ "As before 28.20 ft**3/lbm\n",
+ "Solution for e\n",
+ "As before 102.78 lbm/s*ft**1)\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.41 Page No : 304"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#For Methane(CH4,MW = 16)\n",
+ "p = 500; \t\t\t#evaluate specific volume at p pressure \t\t\t#Unit:psia\n",
+ "pc = 674; \t\t\t#critical temperature \t\t\t#Unit:psia\n",
+ "T = 50+460; \t\t\t#evaluate specific volume at T temperature \t\t\t#Unit:R\n",
+ "Tc = 343; \t\t\t#critical temperature \t\t\t#Unit:R\n",
+ "R = 1545./16; \t\t\t#gas constant R = 1545/Molecular Weight \t\t\t#ft*lbf/lbm*R\n",
+ "pr = p/pc; \t\t\t#reduced pressure \t\t\t#unit:psia\n",
+ "Tr = T/Tc; \t\t\t#reduced temperature \t\t\t#unit:R\n",
+ "#Reading figure 6.28 at these values gives\n",
+ "Z = 0.93; \t\t\t#compressibility factor\n",
+ "#Z = (p*v)/(R*T)\n",
+ "v = Z*((R*T)/(p*144)); \t\t\t#ft**3/lbm \t\t\t#1 ft**2 = 144 in**2(for conversion of unit) \t\t\t#specific volume\n",
+ "print \"Using the value of Z = 0.93, the specific volume is %.2f ft**3/lbm\"%(v);\n",
+ "#For ideal gas,\n",
+ "v = (R*T)/(p*144); \t\t\t#ft**3/lbm \t\t\t#1 ft**2 = 144 in**2(for conversion of unit) \t\t\t#specific volume\n",
+ "print \"For the ideal gas, the specific volume is %.2f ft**3/lbm\"%(v);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Using the value of Z = 0.93, the specific volume is 0.64 ft**3/lbm\n",
+ "For the ideal gas, the specific volume is 0.68 ft**3/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 51
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch7_1.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch7_1.ipynb
new file mode 100644
index 00000000..5b56ae9e
--- /dev/null
+++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch7_1.ipynb
@@ -0,0 +1,1099 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:66356009206cf2a059db6adf4246ee44a4d1b30e2da1d2c932b5c468912f3519"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7 : Mixtures of Ideal Gases"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.1 Page No : 322"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#As the basis of the calculation,assume that we have 1 lbm of mixture.Also,take the molecular weight of oxygen to be 32.00 and nitrogen to be 28.02.(from table7.1)\n",
+ "print \"Solution for a\";\n",
+ "nO2 = 0.2315/32; \t\t\t#no of moles of oxygen = ratio of mass and molecular weight \t\t\t#0.2315 lb of oxygen per pound\n",
+ "print \"The moles of oxygen is %.2f mole/lbm of mixture\"%(nO2);\n",
+ "nN2 = 0.7685/28.02; \t\t\t#no of moles of nitrogen = ratio of mass and molecular weight \t\t\t#0.7685 lb of nitrogen per pound\n",
+ "print \"The moles of nitrogen is %.2f mole/lbm of mixture\"%(nN2);\n",
+ "nm = nO2+nN2; \t\t\t#Unit:Mole/lbm \t\t\t#number of moles of gas mixture is sum of the moles of its constituent gases\n",
+ "print \"The total number of moles is %.2f mole/lbm\"%(nm); \n",
+ "xO2 = nO2/nm; \t\t\t#mole fraction of oxygen = ratio of no of moles of oxygen and total moles in mixture\n",
+ "xN2 = nN2/nm; \t\t\t#mole fraction of nitrogen = ratio of no of moles of oxygen and total moles in mixture\n",
+ "print \"The mole fraction of oxygen is %.2f and the mole fraction of nitrogen is %.2f\"%(xO2,xN2);\n",
+ "#(Check:xO2+xN2 = 1)\n",
+ "print \"xO2+xN2 = %.2f\"%(xO2+xN2);\n",
+ "\n",
+ "print \"Solution for b\";\n",
+ "# the air is at 14.7 psia\n",
+ "pO2 = xO2*14.7; \t\t\t#the partial pressure of oxygen = pressure of air * the mole fraction of oxygen \t\t\t#psia\n",
+ "print \"The partial pressure of oxygen is %.2f psia\"%(pO2);\n",
+ "pN2 = xN2*14.7; \t\t\t#the partial pressure of nitrogen = pressure of air * the mole fraction of nitrogen \t\t\t#psia\n",
+ "print \"The partial pressure of nitrogen is %.2f psia\"%(pN2);\n",
+ "\n",
+ "print \"Solution for c\";\n",
+ "MWm = (xO2*32) + (xN2*28.02); \t\t\t#the molecular weight of air = sum of products of mole fraction of each gas component\n",
+ "print \"The molecular weight of air is %.2f\"%(MWm);\n",
+ "\n",
+ "print \"Solution for d\";\n",
+ "Rm = 1545/MWm; \t\t\t#the gas constant of air\n",
+ "print \"The gas constant of air is %.2f\"%(Rm);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Solution for a\n",
+ "The moles of oxygen is 0.01 mole/lbm of mixture\n",
+ "The moles of nitrogen is 0.03 mole/lbm of mixture\n",
+ "The total number of moles is 0.03 mole/lbm\n",
+ "The mole fraction of oxygen is 0.21 and the mole fraction of nitrogen is 0.79\n",
+ "xO2+xN2 = 1.00\n",
+ "Solution for b\n",
+ "The partial pressure of oxygen is 3.07 psia\n",
+ "The partial pressure of nitrogen is 11.63 psia\n",
+ "Solution for c\n",
+ "The molecular weight of air is 28.85\n",
+ "Solution for d\n",
+ "The gas constant of air is 53.55\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.2 Page No : 323"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#For Gaseous Freon-12 (CCl2F2)\n",
+ "#MW of air = 29 & MW of freon-12 = 120.9\n",
+ "#initial pressure in math.tank is atmospheric pressure that is 14.7 psia\n",
+ "#final pressure of math.tank is 1000 psia\n",
+ "#The partial pressure of the Freon-12 is 1000-14.7\n",
+ "print \"The partial pressure of the Freon-12 is %.2f\"%(1000-14.7)\n",
+ "#the mole fraction of air = the initial pressure / final pressure\n",
+ "print \"The mole fraction of air is %.2f\"%(14.7/1000)\n",
+ "#the mole fraction of freon = the partial pressure of freon / the final pressure\n",
+ "print \"The mole fraction of Freon-12 is %.2f\"%((1000-14.7)/1000)\n",
+ "MWm = ((14.7/1000)*29) + (((1000-14.7)/1000)*120.9);\t\t\t#the molecular weight of mixture = sum of products of mole fraction of each gas component \n",
+ "print \"The molecular weight of the mixture is %.2f\"%(MWm);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The partial pressure of the Freon-12 is 985.30\n",
+ "The mole fraction of air is 0.01\n",
+ "The mole fraction of Freon-12 is 0.99\n",
+ "The molecular weight of the mixture is 119.55\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.3 Page No : 323"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Ten pounds of air,1 lb of carbon dioxide,and 5 lb of nitrogen are mixed at constant temperature until the mixture pressure is constant\n",
+ "nair = 10./29; \t\t\t#no of moles of air = ratio of mass and molecular weight \t\t\t#10 lb of nitrogen per pound \t\t\t#molecular weight of air = 29\n",
+ "print \"The moles of air is %.2f mole/lbm of mixture\"%(nair);\n",
+ "nCO2 = 1./44; \t\t\t#no of moles of carbon dioxide = ratio of mass and molecular weight \t\t\t#1 lb of per pound \t\t\t#molecular weight of CO2 = 44\n",
+ "print \"The moles of carbon dioxide is %.2f mole/lbm of mixture\"%(nCO2);\n",
+ "nN2 = 5./28; \t\t\t#no of moles of nitrogen = ratio of mass and molecular weight \t\t\t#5 lb of nitrogen per pound \t\t\t#molecular weight of N2 = 28\n",
+ "print \"The moles of nitrogen is %.2f mole/lbm of mixture\"%(nN2);\n",
+ "nm = nair+nCO2+nN2; \t\t\t#Unit:Mole/lbm \t\t\t#number of moles of gas mixture is sum of the moles of its constituent gases\n",
+ "print \"The total number of moles is %.2f mole/lbm\"%(nm); \n",
+ "\n",
+ "xair = nair/nm \t\t\t#mole fraction of air = ratio of no of moles of air and total moles in mixture\n",
+ "xCO2 = nCO2/nm; \t\t\t#mole fraction of carbon dioxide = ratio of no of moles of carbon dioxide and total moles in mixture\n",
+ "xN2 = nN2/nm; \t\t\t#mole fraction of nitrogen = ratio of no of moles of oxygen and total moles in mixture\n",
+ "print \"The mole fraction of air is %.2f \"%(xair);\n",
+ "print \"The mole fraction of carbon dioxide is %.2f\"%(xCO2)\n",
+ "print \"The mole fraction of nitrogen is %.2f\"%(xN2);\n",
+ "\n",
+ "#final pressure of is 100 psia\n",
+ "pair = xair*100; \t\t\t#the partial pressure of air = final pressure * the mole fraction of air \t\t\t#psia\n",
+ "print \"The partial pressure of air is %.2f psia\"%(pair);\n",
+ "pCO2 = xCO2*100; \t\t\t#the partial pressure of carbon dioxide = final pressure * the mole fraction of CO2 \t\t\t#psia\n",
+ "print \"The partial pressure of carbon dioxide is %.2f psia\"%(pCO2);\n",
+ "pN2 = xN2*100; \t\t\t#the partial pressure of nitrogen = final pressure * the mole fraction of nitrogen \t\t\t#psia\n",
+ "print \"The partial pressure of nitrogen is %.2f psia\"%(pN2);\n",
+ "\n",
+ "#the molecular weight of mixture = sum of products of mole fraction of each gas component\n",
+ "MWm = (xair*29) + (xCO2*44) + (xN2*28); \t\t\t#The molecular weight of air \n",
+ "print \"The molecular weight of air is %.2f\"%(MWm);\n",
+ "\n",
+ "Rm = 1545/MWm; \t\t\t#the gas constant of air\n",
+ "print \"The gas constant of air is %.2f\"%(Rm);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The moles of air is 0.34 mole/lbm of mixture\n",
+ "The moles of carbon dioxide is 0.02 mole/lbm of mixture\n",
+ "The moles of nitrogen is 0.18 mole/lbm of mixture\n",
+ "The total number of moles is 0.55 mole/lbm\n",
+ "The mole fraction of air is 0.63 \n",
+ "The mole fraction of carbon dioxide is 0.04\n",
+ "The mole fraction of nitrogen is 0.33\n",
+ "The partial pressure of air is 63.14 psia\n",
+ "The partial pressure of carbon dioxide is 4.16 psia\n",
+ "The partial pressure of nitrogen is 32.70 psia\n",
+ "The molecular weight of air is 29.30\n",
+ "The gas constant of air is 52.74\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.4 Page No : 325"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#five moles of oxygen and 10 moles of hydrogen are mixed\n",
+ "#The total number of moles is 10+5 = 15.Therefore,mole fraction of each constituent is\n",
+ "xO2 = 5./15; \t\t\t#The mole fraction of oxygen \n",
+ "xH2 = 10./15; \t\t\t#The mole fraction of hydrogen\n",
+ "print \"The mole fraction of oxygen is %.2f and of hydrogen is %.2f\"%(xO2,xH2);\n",
+ "#the molecular weight of mixture = sum of products of mole fraction of each gas component(MW of O2 = 32 and MW of H2 = 2.016)\n",
+ "print \"The molecular weight of the final mixture is %.2f\"%((((5./15)*32)+10./15)*2.016)\n",
+ "R = 1545./32; \t\t\t#the gas constant of oxygen\n",
+ "T = 460.+70; \t\t\t#absolute temperature \t\t\t#Unit:R\n",
+ "p = 14.7; \t\t\t#pressure \t\t\t#psia\n",
+ "#The partial volume of the oxygen can be found as follows:per pound of oxygen,\n",
+ "#p*vO2 = R*T;\n",
+ "vO2 = (R*T)/(p*144); \t\t\t#ft**3/lbm \t\t\t#1 in**2 = 144 ft**2 \n",
+ "#Because there are 5 moles of oxygen,each containing 32 lbm,\n",
+ "VO2 = vO2*5*32; \t\t\t#ft**3 \t\t\t#partial volume of oxygen\n",
+ "print \"The partial volume of oxygen is %.2f ft**3\"%(VO2);\n",
+ "#For the hydrogen,we can simplify the procedure by noting that the fraction of the total volume occupied by the oxygen is the same as its mole fraction.Therefore,\n",
+ "Vm = 3*VO2; \t\t\t#total volume occupied \t\t\t#ft**3\n",
+ "print \"The mixture volume is %.2f ft**3\"%(Vm);\n",
+ "#and the hydrogen volume\n",
+ "VH2 = Vm-VO2; \t\t\t#Ft**2 \t\t\t#partial volume of hydrogen\n",
+ "print \"From simplified procedure, The partial volume of hydrogen is %.2f ft**3\"%(VH2);\n",
+ "\n",
+ "#We could obtain the partial volume of hydrogen by proceeding as we did for the oxygen.Thus,\n",
+ "#p*vH2 = R*T;\n",
+ "R = 1545/2.016; \t\t\t#the gas constant of hydrogen\n",
+ "vH2 = (R*T)/(p*144); \t\t\t#ft**3/lbm \t\t\t#1 in**2 = 144 ft**2 \n",
+ "#Because there are 10 moles of hydrogen,each containing 2.016 lbm,\n",
+ "VH2 = vH2*10*2.016; \t\t\t#ft**3 \t\t\t#partial volume of hydrogen\n",
+ "print \"The partial volume of hydrogen is %.2f ft**3\"%(VH2);\n",
+ "#Which checks our previous values.\n",
+ "\n",
+ "\n",
+ "print \"From another method\"\n",
+ "#As an alternative to the foregoing,we could also use the fact that at 14.7 psia and 32F a mole of any gas occupies a volume of 358 ft**3.\n",
+ "print \"At 70F and 14.7 psia, a mole occupies %.2f ft**3\"%((((358*460+70.)/460+32))); \n",
+ "#Therefore, 5 moles of oxygen occupies \n",
+ "VO2 = 5*358*((460+70.)/(460+32)); \t\t\t#The partial volume of oxygen \t\t\t#ft**3\n",
+ "print \"The partial volume of oxygen is %.2f ft**3\"%(VO2);\n",
+ "#and 10 moles of hydrogen occupies\n",
+ "VH2 = 10*358*((460+70.)/(460+32)); \t\t\t#The partial volume of hydrogen \t\t\t#ft**3\n",
+ "print \"The partial volume of hydrogen is %.2f ft**3\"%(VH2);\n",
+ "#Both values are in good agreement with the previous calculations.\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mole fraction of oxygen is 0.33 and of hydrogen is 0.67\n",
+ "The molecular weight of the final mixture is 22.85\n",
+ "The partial volume of oxygen is 1934.17 ft**3\n",
+ "The mixture volume is 5802.51 ft**3\n",
+ "From simplified procedure, The partial volume of hydrogen is 3868.34 ft**3\n",
+ "The partial volume of hydrogen is 3868.34 ft**3\n",
+ "From another method\n",
+ "At 70F and 14.7 psia, a mole occupies 390.15 ft**3\n",
+ "The partial volume of oxygen is 1928.25 ft**3\n",
+ "The partial volume of hydrogen is 3856.50 ft**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.5 Page No : 326"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Referring to figure 7.3,we have for CO2,\n",
+ "nCO2 = 10./44; \t\t\t#mole \t\t\t#no of moles of carbon dioxide = ratio of mass and molecular weight \t\t\t#10 lb of per pound \t\t\t#molecular weight of CO2 = 44\n",
+ "#and for N2,\n",
+ "nN2 = 5/28.02; \t\t\t#mole \t\t\t#no of moles of nitrogen = ratio of mass and molecular weight \t\t\t#5 lb of nitrogen per pound\n",
+ "print \"The total number of moles in the mixture is %.2f mole\"%(nCO2+nN2);\n",
+ "#Therefore,\n",
+ "xCO2 = nCO2/(nCO2+nN2); \t\t\t#mole fraction of carbon dioxide = ratio of no of moles of carbon dioxide and total moles in mixture\n",
+ "xN2 = nN2/(nCO2+nN2); \t\t\t#mole fraction of nitrogen = ratio of no of moles of oxygen and total moles in mixture\n",
+ "print \"The mole fraction of carbon dioxide is %.2f and the mole fraction of nitrogen is %.2f\"%(xCO2,xN2);\n",
+ "#the molecular weight of mixture = sum of products of mole fraction of each gas component\n",
+ "MWm = (xCO2*44) + (xN2*28.02); \t\t\t#the molecular weight of mixture\n",
+ "print \"The molecular weight of air is %.2f\"%(MWm);\n",
+ "#Because the mixture is 15 lbm (10CO2 + 5N2),the volume of the mixture is found from pm*Vm = mm*Rm*Tm\n",
+ "pm = 100.; \t\t\t#mixture pressure \t\t\t#psia \n",
+ "Tm = 460.+70; \t\t\t#mixture temperature \t\t\t#R(absolute temperature)\n",
+ "Rm = 1545/37.0; \t\t\t#gas constant of mixture \n",
+ "mm = 15.; \t\t\t#mass of mixture \t\t\t#Unit:lb\n",
+ "#So,rearranging the equation,gives\n",
+ "Vm = (mm*Rm*Tm)/(pm*144); \t\t\t#mixture volume \t\t\t#ft**3 \t\t\t#1 in**2 = 144 ft**2\n",
+ "print \"The mixture volume is %.2f ft**3\"%(Vm);\n",
+ "#the partial volume of carbon dioxide is the total volume multiplied by the mole fraction.Thus,\n",
+ "VCO2 = Vm*xCO2; \t\t\t#the partial volume of CO2 \t\t\t#ft**3\n",
+ "print \"The partial volume of carbon dioxide is %.2f ft**3\"%(VCO2);\n",
+ "VN2 = Vm*xN2; \t\t\t#the partial volume of N2 \t\t\t#ft**3\n",
+ "print \"The partial volume of nitrogen is %.2f ft**3\"%(VN2);\n",
+ "#The partial pressure of each constituent is proportional to its mole fraction,for these conditions,\n",
+ "pCO2 = pm*xCO2; \t\t\t#the partial pressure of carbon dioxide = final pressure * the mole fraction of CO2 \t\t\t#psia\n",
+ "print \"The partial pressure of carbon dioxide is %.2f psia\"%(pCO2);\n",
+ "pN2 = pm*xN2; \t\t\t#the partial pressure of nitrogen = final pressure * the mole fraction of nitrogen \t\t\t#psia\n",
+ "print \"The partial pressure of nitrogen is %.2f psia\"%(pN2);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total number of moles in the mixture is 0.41 mole\n",
+ "The mole fraction of carbon dioxide is 0.56 and the mole fraction of nitrogen is 0.44\n",
+ "The molecular weight of air is 36.97\n",
+ "The mixture volume is 23.05 ft**3\n",
+ "The partial volume of carbon dioxide is 12.91 ft**3\n",
+ "The partial volume of nitrogen is 10.14 ft**3\n",
+ "The partial pressure of carbon dioxide is 56.02 psia\n",
+ "The partial pressure of nitrogen is 43.98 psia\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.6 Page No : 327"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#we will assume that we have 100 volumes of gas mixture and set up table 7.2.In first coloumn,we tabulate the gas,and in the second coloumn,we tabulate the given volume fractions.Because the mole fraction equals to volume fraction,the values in coloumn 3 are the same as those in coloumn 2.\n",
+ "#The molecular weight is obtained from table 7.1.Because the MW of the mixture is the sum of the individual mole fraction multiplied by the respective molecular weights,the next coloumn tabulates the product of the mole fraction multiplied by molecular weight(3*4).The sum of these entries is the molecular weight of the mixture,which for this case is 33.4.\n",
+ "print \"Basis:100 volumes of gas mixture\"\n",
+ "print \"gas Volume Mole Molecular mass \"\n",
+ "print \" fraction fraction x weight MW xMW fraction\"\n",
+ "print \"CO2 0.40 0.40 44.0 %.2f %.2f\"%(0.40*44.0,(0.40*44.0)/33.4)\n",
+ "print \"N2 0.10 0.10 28.02 %.2f %.2f \"%(28.02*0.10,(28.02*0.10)/33.4)\n",
+ "print \"H2 0.10 0.10 2.016 %.2f %.2f \"%(0.10*2.016,(0.10*2.016)/33.4)\n",
+ "print \"O2 0.40 0.40 32.0 %.2f %.2f \"%(0.40*32.0,(0.40*32.0)/33.4)\n",
+ "print \" 1.00 1.00 33.4 = MWm = 1.000 \"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Basis:100 volumes of gas mixture\n",
+ "gas Volume Mole Molecular mass \n",
+ " fraction fraction x weight MW xMW fraction\n",
+ "CO2 0.40 0.40 44.0 17.60 0.53\n",
+ "N2 0.10 0.10 28.02 2.80 0.08 \n",
+ "H2 0.10 0.10 2.016 0.20 0.01 \n",
+ "O2 0.40 0.40 32.0 12.80 0.38 \n",
+ " 1.00 1.00 33.4 = MWm = 1.000 \n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.7 Page No : 328"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#We will take as a basis 100 lbm of mixture.\n",
+ "#Dividing colomn 2 by 3 gives us mass/molecular weight or moles of each constituents.The total number of moles in the mixture is the sum of coloumn 4,and the molecular weight of the mixture is the mass of the mixture(100 lbm) divided by the number of moles\n",
+ "#In coloumn 5,mole fraction is given by moles/total mole\n",
+ "\n",
+ "print \"Basis:100 pounds of gas mixture\"\n",
+ "print \"gas Mass Molecular Moles Mole Percent \"\n",
+ "print \" lbm weight MW fraction Volume \"\n",
+ "print \"CO2 52.7 44.0 1.2 %.2f %.2f \"%(1.2/3,1.2/3*100)\n",
+ "print \"N2 8.4 28.02 0.3 %.2f %.2f \"%(0.3/3,0.3/3*100)\n",
+ "print \"H2 0.6 2.016 0.3 %.2f %.2f \"%(0.3/3,0.3/3*100)\n",
+ "print \"O2 38.3 32.0 1.2 %.2f %.2f \"%(1.2/3,1.2/3*100)\n",
+ "print \" = 100.0 = 3.0 = 1.00 = 100 \"\n",
+ "print \" MWm = 100/3 = 33.3 \"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Basis:100 pounds of gas mixture\n",
+ "gas Mass Molecular Moles Mole Percent \n",
+ " lbm weight MW fraction Volume \n",
+ "CO2 52.7 44.0 1.2 0.40 40.00 \n",
+ "N2 8.4 28.02 0.3 0.10 10.00 \n",
+ "H2 0.6 2.016 0.3 0.10 10.00 \n",
+ "O2 38.3 32.0 1.2 0.40 40.00 \n",
+ " = 100.0 = 3.0 = 1.00 = 100 \n",
+ " MWm = 100/3 = 33.3 \n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.8 Page No : 329"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#We will take as a basis 100 lbm of mixture.\n",
+ "#Dividing colomn 2 by 3 gives us mass/molecular weight or moles of each constituents.The total number of moles in the mixture is the sum of coloumn 4,and the molecular weight of the mixture is the mass of the mixture(100 lbm) divided by the number of moles\n",
+ "#In coloumn 5,mole fraction is given by moles/total mole\n",
+ "\n",
+ "print \"Basis:100 pounds of gas mixture\"\n",
+ "print \"gas Mass Molecular Moles Mole Percent \"\n",
+ "print \" lbm weight MW fraction Volume \"\n",
+ "print \"O2 23.18 32.00 0.724 %.2f %.2f \"%(0.724/3.45,0.724/3.45*100)\n",
+ "print \"N2 75.47 28.02 2.693 %.2f %.2f \"%(2.692/3.45,2.692/3.45*100)\n",
+ "print \"A 1.30 39.90 0.033 %.2f %.2f \"%(0.033/3.45,0.033/3.45*100)\n",
+ "print \"CO2 0.05 44.00 - - - \"\n",
+ "print \" = 100.00 = 3.45 = 1.00 = 100 \"\n",
+ "print \" MWm = 100/3.45 = 28.99 \"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Basis:100 pounds of gas mixture\n",
+ "gas Mass Molecular Moles Mole Percent \n",
+ " lbm weight MW fraction Volume \n",
+ "O2 23.18 32.00 0.724 0.21 20.99 \n",
+ "N2 75.47 28.02 2.693 0.78 78.03 \n",
+ "A 1.30 39.90 0.033 0.01 0.96 \n",
+ "CO2 0.05 44.00 - - - \n",
+ " = 100.00 = 3.45 = 1.00 = 100 \n",
+ " MWm = 100/3.45 = 28.99 \n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.9 Page No : 331"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Given: cp of oxygen is 0.23 Btu/lbm*R.cp of nitrogen is 0.25 Btu/lbm*R. 160 lbm/hr of oxygen and 196 lbm/hr of nitrogen are mixed.oxygen is at 500 F and nitrogen is at 200 F.\n",
+ "\n",
+ "#The energy equation for the steady-flow,adiaatic mixing process gives us the requirement that the enthalpy of the mixture must equal to the enthalpies of the components,because deltah = q = 0.An alternative statement of this requirement is that the gain in enthalpy of the nitrogen must equal the decrease in enthalpy of the oxygen.Using the latter statement,that the change in enthalpy of nitrogen,yields\n",
+ "# (160*0.23*(500-tm)) = (196*0.25*(tm-200)) where tm = mixture temperature\n",
+ "#where m*cp*deltat has been used for deltah. \t\t\t#cp = specific heat at constant pressure \t\t\t#Unit for cp is Btu/lbm*R\n",
+ "#rearranging the above equation,\n",
+ "tm = ((500.*160*0.23)+(196*0.25*200))/((196*0.25)+(160*0.23)); \t\t\t#tm = mixture temperature \t\t\t#Unit:fahrenheit\n",
+ "print \"The final temperature of the mixture is %.2f F\"%(tm);\n",
+ "#Using the requirement that the enthalpy of the mixture must equal to the sum of the enthalpies of the components yields an alternative solution to this problem.Let us assume that at 0 F,the enthalpy of each gas and of the mixture is zero.The enthalpy of the entering oxygen is (160*0.23*(500-0)),and the enthalpy of the entering nitrogen is (196*0.25*(200-0)).The enthalpy of the mixture is ((160+196)*cpm*(tm-0))\n",
+ "#Therefore, (160*0.23*500)+(196*0.25*200) = ((160+196)*cpm*tm)\n",
+ "cpm = ((160./(160+196))*0.23)+((196/(160+196))*0.25); \t\t\t#specific heat at constant pressure for gas mixture \t\t\t#Btu/lbm*R\n",
+ "print \"For mixture, Specific heat at constant pressure is %.2f Btu/lbm*R\"%(cpm);\n",
+ "#therefore,\n",
+ "tm = ((160*0.23*500)+(196*0.25*200))/(cpm*(160.+196)); \t\t\t#tm = mixture temperature \t\t\t#Unit:fahrenheit\n",
+ "print \"By Using value of cpm, The final temperature of the mixture is %.2f F\"%(tm);\n",
+ "#The use of 0 F as a base was arbitrary but convenient.Any base would yield the same results.\n",
+ "#The answer of cpm is wrong in the book.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The final temperature of the mixture is 328.67 F\n",
+ "For mixture, Specific heat at constant pressure is 0.10 Btu/lbm*R\n",
+ "By Using value of cpm, The final temperature of the mixture is 766.30 F\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.10 Page No : 332"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Problem 7.9 is carried out as a nonflow mixing process.\n",
+ "#Given in problem 7.9,: cp of oxygen is 0.23 Btu/lbm*R.cp of nitrogen is 0.25 Btu/lbm*R. 160 lbm/hr of oxygen and 196 lbm/hr of nitrogen are mixed.oxygen is at 500F and nitrogen is at 200 F. \t\t\t#cp = specific heat at constant pressure \n",
+ "#Given in problem 7.10,: cv of oxygen is 0.164 Btu/lbm*R.cv of nitrogen is 0.178 Btu/lbm*R. \t\t\t#cv = specific heat at constant volume\n",
+ "\n",
+ "#Because this is a nonflow process,the energy equation for this process requires the internal energy of the mixture to equal to the sum of the internal energy of its components.\n",
+ "#Alternatively,the decrease in internal energy of the oxygen must equal the increase in internal energy of the nitrogen.Using latter statement gives us,\n",
+ "# (160*0.164*(500-tm)) = (196*0.178*(tm-200))\n",
+ "#where m*cv*deltat has been used for deltau. \t\t\t#Unit for cp & cv is Btu/lbm*R\n",
+ "#rearranging the above equation,\n",
+ "tm = ((500*160*0.164)+(196*0.178*200))/((196*0.178)+(160*0.164)); \t\t\t#tm = mixture temperature \t\t\t#Unit:fahrenheit\n",
+ "\n",
+ "# Results\n",
+ "print \"The final temperature of the mixture is %.2f F\"%(tm);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The final temperature of the mixture is 328.78 F\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.12 Page No : 334"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#The change in entropy of the mixture is the sum of the changes in entropy of each component.\n",
+ "#Given in problem 7.9,: cp of oxygen is 0.23 Btu/lbm*R.cp of nitrogen is 0.25 Btu/lbm*R. 160 lbm/hr of oxygen and 196 lbm/hr of nitrogen are mixed.oxygen is at 500F and nitrogen is at 200 F. \t\t\t#cp = specific heat at constant pressure \n",
+ "#In 7.9,for the oxygen,the temperature starts at 500F(960 R) and decreases to 328.7 F.For the nitrogen,the temperature starts at 200F(660 R) and increase to 328.7 F.\n",
+ "#deltas = (cp*math.log(T2/T1)); \t\t\t#Unit:Btu/lbm*R \t\t\t#change in entropy\n",
+ "\n",
+ "#For the oxygen,\n",
+ "cp = 0.23; \t\t\t#specific heat at constant pressure \t\t\t#Unit:Btu/lbm*R\n",
+ "T2 = 328.7+460; \t\t\t#Unit:R \t\t\t#final temperature\n",
+ "T1 = 500+460; \t\t\t#Unit:R \t\t\t#starting temperature\n",
+ "deltas = (cp*math.log(T2/T1)); \t\t\t#Unit:Btu/lbm*R \t\t\t#change in entropy for oxygen\n",
+ "DeltaS = 160*deltas; \t\t\t#Btu/R \t\t\t#The total change in entropy of the oxygen\n",
+ "print \"The total change in entropy of the oxygen is %.2f Btu/R\"%(DeltaS);\n",
+ "\n",
+ "#For the nitrogen,\n",
+ "cp = 0.25; \t\t\t#specific heat at constant pressure \t\t\t#Unit:Btu/lbm*R\n",
+ "T2 = 328.7+460; \t\t\t#Unit:R \t\t\t#final temperature\n",
+ "T1 = 200+460; \t\t\t#Unit:R \t\t\t#starting temperature\n",
+ "deltas = (cp*math.log(T2/T1)); \t\t\t#Unit:Btu/lbm*R \t\t\t#change in entropy for nitrogen\n",
+ "deltaS = 196*deltas; \t\t\t#Btu/R \t\t\t#The total change in entropy of the nitrogen\n",
+ "print \"The total change in entropy of the nitrogen is %.2f Btu/R\"%(deltaS);\n",
+ "deltaS = deltaS+DeltaS; \t\t\t#the total change in entropy for the mixture \t\t\t#Btu/lbm*R\n",
+ "print \"The total change in entropy for the mixture is %.2f Btu/R\"%(deltaS);\n",
+ "\n",
+ "#Per pound of mixture,\n",
+ "deltasm = deltaS/(196+160); \t\t\t#increase in entropy per pound mass of mixture\n",
+ "print \"Increase in entropy per pound mass of mixture is %.2f Btu/lbm*R\"%(deltasm);\n",
+ "\n",
+ "\n",
+ "print \"An alternative solution:\";\n",
+ "#As an alternative solution,assume an arbitrary datum of 0 F(460 R).\n",
+ "cp = 0.23; \t\t\t#specific heat at constant pressure \t\t\t#Unit:Btu/lbm*R\n",
+ "#For initial entropy of oxygen,\n",
+ "T2 = 500+460; \t\t\t#Unit:R \t\t\t#final temperature\n",
+ "T1 = 0+460; \t\t\t#Unit:R \t\t\t#starting temperature\n",
+ "deltas = cp*math.log(T2/T1); \t\t\t#the initial change in entropy for oxygen \t\t\t# Btu/lbm*R\n",
+ "print \"The initial change in entropy for oxygen is %.2f Btu/lbm*R\"%(deltas);\n",
+ "#For final entropy of oxygen,\n",
+ "T2 = 328.7+460; \t\t\t#Unit:R \t\t\t#final temperature\n",
+ "T1 = 0+460; \t\t\t#Unit:R \t\t\t#starting temperature\n",
+ "Deltas = cp*math.log(T2/T1); \t\t\t#the final change in entropy for oxygen \t\t\t# Btu/lbm*R\n",
+ "print \"The final change in entropy for oxygen is %.2f Btu/lbm*R\"%(Deltas);\n",
+ "deltaS = Deltas-deltas; \t\t\t#The entropy change of the oxygen \t\t\t#Btu/lbm*R\n",
+ "print \"The entropy change of the oxygen is %.2f Btu/lbm*R\"%(deltaS);\n",
+ "\n",
+ "#For nitrogen,\n",
+ "cp = 0.25; \t\t\t#specific heat at constant pressure \t\t\t#Unit:Btu/lbm*R\n",
+ "#For initial entropy of nitrogen,\n",
+ "T2 = 200.+460; \t\t\t#Unit:R \t\t\t#final temperature\n",
+ "T1 = 0+460; \t\t\t#Unit:R \t\t\t#starting temperature\n",
+ "deltas = cp*math.log(T2/T1); \t\t\t#the initial change in entropy for nitrogen \t\t\t# Btu/lbm*R\n",
+ "print \"The initial change in entropy for nitrogen is %.2f Btu/lbm*R\"%(deltas);\n",
+ "#For final entropy of nitrogen,\n",
+ "T2 = 328.7+460; \t\t\t#Unit:R \t\t\t#final temperature\n",
+ "T1 = 0+460; \t\t\t#Unit:R \t\t\t#starting temperature\n",
+ "Deltas = cp*math.log(T2/T1); \t\t\t#the final change in entropy for nitrogen \t\t\t# Btu/lbm*R\n",
+ "print \"The final change in entropy for nitrogen is %.2f Btu/lbm*R\"%(Deltas);\n",
+ "deltaS = Deltas-deltas; \t\t\t#The entropy change of the nitrogen \t\t\t#Btu/lbm*R\n",
+ "print \"The entropy change of the nitrogen is %.2f Btu/lbm*R\"%(deltaS);\n",
+ "\n",
+ "#The remainder of the problem is as before.The advantage of Using this alternative method is the negative math.logarithms are avoided by choomath.sing a reference temperature lower than any other temperature in the system\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total change in entropy of the oxygen is -7.23 Btu/R\n",
+ "The total change in entropy of the nitrogen is 8.73 Btu/R\n",
+ "The total change in entropy for the mixture is 1.50 Btu/R\n",
+ "Increase in entropy per pound mass of mixture is 0.00 Btu/lbm*R\n",
+ "An alternative solution:\n",
+ "The initial change in entropy for oxygen is 0.16 Btu/lbm*R\n",
+ "The final change in entropy for oxygen is 0.12 Btu/lbm*R\n",
+ "The entropy change of the oxygen is -0.04 Btu/lbm*R\n",
+ "The initial change in entropy for nitrogen is 0.09 Btu/lbm*R\n",
+ "The final change in entropy for nitrogen is 0.13 Btu/lbm*R\n",
+ "The entropy change of the nitrogen is 0.04 Btu/lbm*R\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.13 Page No : 338"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Referring to figure 7.6,it will be seen that the cooling of an air-water vapor mixture from B to A proceeds at constant pressure until the saturation curve is reached.\n",
+ "#At 80 F(the mixture temperature),the Steam Tables give us a saturation pressure of a 0.5073 psia,and because the relative humidity is 50%,the vapor pressure of the water is 0.5*0.5073 = 0.2537 psia.\n",
+ "#Using the steam tables,the saturation temperature corresponding to 0.2537 psia is 60 F.\n",
+ "#So,\n",
+ "print \"The dew point temperature of the air is 60 F\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The dew point temperature of the air is 60 F\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.14 Page No : 338"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#To solve this probelm,it is necessary to determine the properties of the saturated mixture 90 F.If the air is saturated at 90 F,the partial pressure of the water vapor is found directly from the Steam Tables as 0.6988 psia,and the specific volume of the water vapor is 467.7 ft**3/lbm of vapor.\n",
+ "print \"The partial pressure of the dry air is %.2f psia\"%(14.7-0.6988); \t\t\t#the mixture is at 14.7 psia\n",
+ "R = 1545/28.966; \t\t\t#gas constant of dry air = 1545/Molecular weight\n",
+ "T = 90+460; \t\t\t#temperature of dry air \t\t\t#Unit:R\n",
+ "pdryair = 14.0; \t\t\t#psia \t\t\t#pressure of dry air\n",
+ "#Applying the ideal gas equation to the air,\n",
+ "vdryair = (R*T)/(pdryair*144); \t\t\t#volume of dry air \t\t\t#ft**3/lbm \t\t\t#1 in**2 = 144 Ft**2\n",
+ "#the mass of dry air in the 467.7 ft**3 container \n",
+ "print \"The mass of dry air in the 467.7 ft**3 container is %.2f lbm\"%(467.7/vdryair);\n",
+ "#To obtain relative humidity(phy),it is necessary to determine the mole fraction of water vapor for both the saturated mixture and the mixture in question.\n",
+ "#The saturated mixture contains 1 lbm of water vapor or 1/18.016 moles = 0.055 mole of water vapor and (467.7/vdryair)/28.966 = 1.109 moles of dry air.\n",
+ "#For the saturated mixture, the ratio of moles of water vapor to moles of mixture is 0.055/(0.055+1.109) = 0.0477\n",
+ "#For the actual mixture,the moles of water vapor per pound of dry air is 0.005/18.016 = 0.000278 and 1 lbm of dry air is 1/28.966 = 0.0345 mole.So,the mole of water vapor per mole of mixture at the conditions of the mixture is 0.000278/(0.0345+0.000278) = 0.00799\n",
+ "#From the defination of relative humidity,\n",
+ "print \"The relative humidity of the mixture is %.2f \"%((0.00799/0.0477)*100);\n",
+ "\n",
+ "#Because the mole ratio is also the ratio of the partial pressures for the ideal gas,phy can be expressed as the ratio of the partial pressure of the water vapor in the mixture to the partial pressure of the water vapor at saturation.Therefore,\n",
+ "print \"The partial pressure of the vapor at saturation is %.2f psia\"%((0.00799/0.0477)*0.6988);\n",
+ "print \"And the partial pressure of the dry air in the mixture is %.2f psia\"%((14.7-0.00799/0.0477)*0.6988); \t\t\t#14.7-The partial pressure of the vapor at saturation\n",
+ "#The dew point temperature is the saturation temperature corresponding to the partial pressure of the water vapor in the mixture.So,\n",
+ "print \"The dew point temperature corresponding to %.2f psia is 39F\"%((0.00799/0.0477)*0.6988);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The partial pressure of the dry air is 14.00 psia\n",
+ "The mass of dry air in the 467.7 ft**3 container is 32.14 lbm\n",
+ "The relative humidity of the mixture is 16.75 \n",
+ "The partial pressure of the vapor at saturation is 0.12 psia\n",
+ "And the partial pressure of the dry air in the mixture is 10.16 psia\n",
+ "The dew point temperature corresponding to 0.12 psia is 39F\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.15 Page No : 343"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Problem 7.14 Using equations, Rm = ((ma/(ma+mv))*Ra)+((mv/(ma+mv))*Rv) and phy*pvs = pv\n",
+ "W = 0.005; \t\t\t#Humidity ratio\n",
+ "pm = 14.7; \t\t\t#mixture is at 14.7 psia\n",
+ "#W = 0.622*(pv/(pm-pv))\n",
+ "#Rearranging,\n",
+ "pv = (W*pm)/(0.622+W); \t\t\t#the partial pressure of the water vapor \n",
+ "print \"The partial pressure of the water vapor is %.2f psia\"%(pv);\n",
+ "pa = pm-pv; \t\t\t#pa = the partial pressure of the dry air in the mixture\n",
+ "print \"The partial pressure of dry air is %.2f psia\"%(pa);\n",
+ "#It is necessary to obtain pvs from the Steam Tables at 90 F.This is 0.6988 psia.\n",
+ "pvs = 0.6988; \t\t\t#saturation pressure of water vapor at the temperature of mixture\n",
+ "print \"The partial pressure of the water vapor at saturation is %.2f psia\"%(pvs);\n",
+ "#Therefore,\n",
+ "phy = pv/pvs; \t\t\t#relative humidity\n",
+ "print \"The relative humidity is %.2f percent\"%(phy*100);\n",
+ "#The dew point temperature is the saturation temperature corresponding to 0.117 psia,which is found from the Steam Tables to be 39 F.\n",
+ "print \"The dew point temperature of the mixture is 39 F\";\n",
+ "#The results of this problem and problem 7.14 are in good agreement\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The partial pressure of the water vapor is 0.12 psia\n",
+ "The partial pressure of dry air is 14.58 psia\n",
+ "The partial pressure of the water vapor at saturation is 0.70 psia\n",
+ "The relative humidity is 16.78 percent\n",
+ "The dew point temperature of the mixture is 39 F\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.16 Page No : 343"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "pm = 14.7; \t\t\t#the barometer is at 14.7 psia \t\t\t#mixture is at 14.7 psia\n",
+ "#The amount of water vapor removed (per pound of dry air) is the difference between the humidity ratio (specific humidity) at inlet and outlet of the conditioning unit.We shall therefore evalute W for both specified conditions.Because phy = pv/pvs,\n",
+ "#At 90F:\n",
+ "phy = 0.7; \t\t\t#relative humidity\n",
+ "pvs = 0.6988; \t\t\t#psia \t\t\t#saturation pressure of water vapor at the temperature of mixture\n",
+ "pv = phy*pvs; \t\t\t#psia \t\t\t#the partial pressure of the water vapor \n",
+ "pa = pm-pv; \t\t\t#psia \t\t\t#pa = the partial pressure of the dry air in the mixture\n",
+ "W = 0.622*(pv/pa); \t\t\t#Humidity ratio\n",
+ "\n",
+ "#At 80F:\n",
+ "phy = 0.4; \t\t\t#relative humidity\n",
+ "pvs = 0.5073; \t\t\t#psia \t\t\t#saturation pressure of water vapor at the temperature of mixture\n",
+ "pv = phy*pvs; \t\t\t#psia \t\t\t#the partial pressure of the water vapor \n",
+ "pa = pm-pv; \t\t\t#psia \t\t\t#pa = the partial pressure of the dry air in the mixture\n",
+ "w = 0.622*(pv/pa); \t\t\t#Humidity ratio\n",
+ "\n",
+ "print \"The amount of water removed per pound of dry air is %.2f\"%(W-w);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The amount of water removed per pound of dry air is 0.01\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.17 Page No : 347"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Problem 7.13 Using the psychrometric chart\n",
+ "#Entering figure 7.11 at a dry-bulb temperature of 80 F,we proceed vertically until we reach 50% humidity curve.At this intersection,we proceed horizontally and read the dew-point temperature as approximately 60 F.\n",
+ "print \"The dew point temperature of air is 60 F\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The dew point temperature of air is 60 F\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.18 Page No : 347"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Problem 7.14 Using the psychrometric chart\n",
+ "#In this problem,we are given the moisture content of the air to be 0.005 lb per pound of dry air.\n",
+ "#This corresponds to 0.005*7000 = 35 grains per pound of dry air.\n",
+ "#Entering the chart at 90F and proceeding verticaly to 35 grains per pound of dry air,we find the dew point to be 39F by proceeding horizontally to the intersection with the saturation curve. \n",
+ "print \"The dew-point temperature of the mixture is 39 F\";\n",
+ "print \"The relative humidity is approximately 17 percent\";\n",
+ "#From the leftmost scale,we read the pressure of water vapor to be 0.12 psia.\n",
+ "print \"The partial pressure of the air is %.2f psia\"%(14.7-0.12);\n",
+ "#Comparing these results to problem 7.14,indicated good agreement between the results obtained by chart and by calculation\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The dew-point temperature of the mixture is 39 F\n",
+ "The relative humidity is approximately 17 percent\n",
+ "The partial pressure of the air is 14.58 psia\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.19 Page No : 348"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Problem 7.16 Using the psychrometric chart\n",
+ "#The initial conditions are 90 F and 70% relative humidity\n",
+ "#Entering the chart at 90 F dry bulb temperature and proceeding vertically to 70% relative humidity,we find the air to have 150 grains water vapor per pound of dry air.At the final condition of 80F and 40% relative humidity,we read 61 grains of water/lb of dry air.\n",
+ "#So,\n",
+ "print \"The water removed is %.2f grains per pound of dry air\"%(150-61);\n",
+ "print \"Or %.2f lb of water per pound of dry air is removed\"%((150.-61)/7000);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The water removed is 89.00 grains per pound of dry air\n",
+ "Or 0.01 lb of water per pound of dry air is removed\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.20 Page No : 349"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#dry bulb temperature is 50 F\n",
+ "#relative humidity is 50 percent\n",
+ "#We first locate 50 F and 50 percent relative humidity on figure 7.11.At this state,we read 26 grains of water per pound of dry air and a total heat of 16.1 Btu per pound of a dry air.\n",
+ "#We now proceed horizontally to 80 F at a constant value of 26 grains of water per pound of dry air and read a total heat of 23.4 Btu per pound of dry air.\n",
+ "print \"The heat required is %.2f Btu per pound of dry air\"%(23.4-16.1)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat required is 7.30 Btu per pound of dry air\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.21 Page No : 352"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#An evaporative cooling process\n",
+ "#Because the exit air is saturated,we find the exit condition on the curve corresponding to a wet-bulb temperature of 50 F.The process is carried out at constant total enthalpy,which is along a line of constant wet-bulb temperature.\n",
+ "#Proceeding along the 50 F wet-bulb temperature line of figure 7.11 diagonally to the right until it intersects with the vertical 80 F dry-bulb temperature line yields a relative humidity of approximately 4 %\n",
+ "print \"For An evaporative cooling process, The relative humidity of the entering air is 4 percent\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For An evaporative cooling process, The relative humidity of the entering air is 4 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.22 Page No : 356"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#As noted from figure 7.27, 1 lb of mixture,4/5 lb of indoor air,and 1/5 lb of outdoor air are mixed per pound of mixture. \n",
+ "#We now locate the two end states on the psychrometric chart and connect them with a straight line.The line connecting the end states is divided into 5 equal parts. Using the results of equation, (ha-ha2)/(ha-ha1) = (W2-W)/(W-W1) = ma1/ma2 = l1/l2 ,we now proceed from the 75 F indoor air state 1 part toward the 90F outdoor air state.This Locates \n",
+ "print \"The final mixture, which is found to be a dry-bulb temperature of approximately 78 F, \\\n",
+ "a wet-bulb temperature of 66 F and relative humidity of 54 percent\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The final mixture, which is found to be a dry-bulb temperature of approximately 78 F, a wet-bulb temperature of 66 F and relative humidity of 54 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.23 Page No : 358"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#The cooling tower\n",
+ "#From the Steam tables,\n",
+ "#For water:\n",
+ "h100F = 68.05; \t\t\t#Btu/lbm \t\t\t#enthalpy at 100 F\n",
+ "h70F = 38.09; \t\t\t#Btu/lbm \t\t\t#enthalpy at 70 F\n",
+ "#For air:\n",
+ "h = 20.4; \t\t\t#Unit:Btu/lb \t\t\t#at inlet,total heat/lb dry air\n",
+ "w = 38.2; \t\t\t#Unit:grains/lb \t\t\t#at inlet,moisture pickup/lb dry air (at 60F D.B. and 50% R.H.)\n",
+ "H = 52.1; \t\t\t#Unit:Btu/lb \t\t\t#at outlet,total heat/lb dry air\n",
+ "W = 194.0; \t\t\t#Unit:grains/lb \t\t\t#at outlet,moisture pickup/lb dry air (at 90F D.B. and 90% R.H.)\n",
+ "\n",
+ "#Per pound of dry air,the heat interchange is H-h Btu per pound of dry air.\n",
+ "#Per pound of dry air,the moisture increase is (W-w)/7000 lb per pound of dry air.\n",
+ "#From the equation, ma*(H-h) = 200000*h100F - mwout*h70F \t\t\t#ma = mass of air mwout = mass of cooled water \n",
+ "#and ma*((W-w)/7000) = 200000 - mwout\n",
+ "#Solving the latter equation for mwout,we have mwout = 200000-(ma*((W-w)/7000))\n",
+ "#Substituting this into the heat balance yields,\n",
+ "# ma*(H-h) = 200000*h100F - 200000*h70F + ma*h70F*((W-w)/7000)\n",
+ "#Solving gives us,\n",
+ "ma = (200000*(h100F-h70F))/((H-h)-(h70F*((W-w)/7000))); \t\t\t#The amount of air required per hour \t\t\t#Unit:lbm/hr of dry air\n",
+ "print \"The amount of air required per hour is %.2f lbm/hr of dry air\"%(ma);\n",
+ "print \"The amount of water lost per hour due to evaporation is %.2f lbm/hr\"%((ma*W-w)/7000)\n",
+ "#note that the water evaporated is slightly over 2% of the incoming water,and this is the makeup that has to be furnished to the tower.\n",
+ "#answer are slightly differ because of value of (W-w)/7000 is given 0.0233 instead of 0.0225\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The amount of air required per hour is 194216.14 lbm/hr of dry air\n",
+ "The amount of water lost per hour due to evaporation is 5382.56 lbm/hr\n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch8_1.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch8_1.ipynb
new file mode 100644
index 00000000..5c6dac8c
--- /dev/null
+++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch8_1.ipynb
@@ -0,0 +1,697 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:772f93702cda26918438fd90c36e1594260fd40351e3deed6d4e9bb6febe0344"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 8 : Vapor Power Cycles"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.1 Page No : 380"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#From the Steam Tables or Mollier chart in Appendix 3,we find that\n",
+ "hf = 340.49; \t\t\t#Unit:kJ/kg \t\t\t#at 50kPa \t\t\t#enthalpy\n",
+ "h1 = hf; \t\t\t#at 50kPa \t\t\t#hf = enthalpy of saturated liquid \t\t\t#Unit:kJ/kg\n",
+ "h4 = 3230.9; \t\t\t#Unit:kJ/kg \t\t\t#enthalpy\n",
+ "h5 = 2407.4; \t\t\t#Unit:kJ/kg \t\t\t#\t\t\t#enthalpy\n",
+ "#Here,point 5 is in the wet steam region.\n",
+ "print \"Solution for a\";\n",
+ "#Neglecting pump work (h2 = h1) gives\n",
+ "nR = (h4-h5)/(h4-h1); \t\t\t#Thermal efficiency of the cycle\n",
+ "print \"The thermal efficiency of the cycle is %.2f percentage\"%(nR*100);\n",
+ "\n",
+ "print \"Solution for b\";\n",
+ "p2 = 3000; \t\t\t#Unit:kPa \t\t\t#Upper pressure\n",
+ "p1 = 50; \t\t\t#Unit:kPa \t\t\t#Lower pressure\n",
+ "vf = 0.001030; \t\t\t#Specific volume of saturated liquid \t\t\t#m**3/kg\n",
+ "Pumpwork = (p2-p1)*vf; \t\t\t#Unit:kJ/kg \t\t\t#pump work\n",
+ "#The efficiency of the cycle including pump work is\n",
+ "nR = ((h4-h5)-Pumpwork)/((h4-h1)-Pumpwork); \t\t\t#Thermal efficiency of the cycle\n",
+ "print \"The thermal efficiency of the cycle including pump work is %.2f percentage\"%(nR*100);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Solution for a\n",
+ "The thermal efficiency of the cycle is 28.49 percentage\n",
+ "Solution for b\n",
+ "The thermal efficiency of the cycle including pump work is 28.42 percentage\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.2 Page No : 381"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Using the computer disk to obtain the neccesary properties\n",
+ "print \"Solution for a\";\n",
+ "#For the conditions given in problem8.1,the properties are found to be\n",
+ "hf = 340.49; \t\t\t#Unit:kJ/kg \t\t\t#at 50kPa \t\t\t#enthalpy\n",
+ "h1 = hf; \t\t\t#at 50kPa \t\t\t#hf = enthalpy of saturated liquid\n",
+ "h2 = h1; \t\t\t#Enthalpy \t\t\t#Unit:kJ/kg\n",
+ "h4 = 3230.9; \t\t\t#Unit:kJ/kg \t\t\t#enthalpy\n",
+ "h5 = 2407.4; \t\t\t#Unit:kJ/kg \t\t\t#enthalpy\n",
+ "#Neglecting pump work \n",
+ "nR = (h4-h5)/(h4-h2); \t\t\t#Thermal efficiency of the cycle\n",
+ "print \"The thermal efficiency of the cycle is %.2f percentage\"%(nR*100);\n",
+ "\n",
+ "print \"Solution for b\";\n",
+ "#For the pump work,we do not need the approximation,because the computerized tables give us the necessary values directly.\n",
+ "#Assuming that the condensate leaving the condenser is saturated liquid gives us an enthalpy of 340.54 kJ/kg and an entropy of 1.0912 kJ/kg*K for an isentropic compression, the final cond-ition is the boiler pressure of 3Mpa and an entropy of 1.0912 kJ/kg*K. For these values,the program yields an enthalpy of 343.59 kJ/kg*K.The isentropic pump work is equal to \n",
+ "Pumpwork = 343.59-340.54; \t\t\t#Unit:kJ/kg \t\t\t#pumpwork\n",
+ "#The efficiency of the cycle including pump work is\n",
+ "nR = ((h4-h5)-Pumpwork)/((h4-h1)-Pumpwork); \t\t\t#Thermal efficiency of the cycle\n",
+ "print \"The thermal efficiency of the cycle including pump work is %.2f percentage\"%(nR*100);\n",
+ "#Final results in this problem agree with the result in problem8.1\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Solution for a\n",
+ "The thermal efficiency of the cycle is 28.49 percentage\n",
+ "Solution for b\n",
+ "The thermal efficiency of the cycle including pump work is 28.42 percentage\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.3 Page No : 382"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Solution for (a)\n",
+ "#Figurre 8.3 with the cycle extending into the superheat region and expanding along 4->5 is the appropriate diagram for this process.\n",
+ "\n",
+ "print \"Solution for b\";\n",
+ "#This problem can be solved either by use of the Mollier chart or the Steam Tables.If the chart is used,14.696 psia is first located on the saturated vapor line.Because the expansion,4->5,is isentropic,a vertical line on the chart is the path of the process.The point corresponding to 4 in figure 8.3 is found where this vertical line intersects 400 psia.At this point,the ent-halpy is 1515 Btu/lbm,and the corresponding temperature is approximatelty 980F.Saturated vapor at 14.696 psia has an enthalpy of 1150.5 Btu/lbm(from the Mollier chart).The Steam Tables sh-ow that saturated liquid at 14.696 psia has an enthalpy of 180.15 Btu/lbm.In terms of figure 8.3,and neglecting pump work,we have \n",
+ "h1 = 180.15; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n",
+ "h2 = h1; \t\t\t#Enthalpy \t\t\t#Unit:Btu/lbm\n",
+ "h4 = 1515; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n",
+ "h5 = 1150.5; \t\t\t#Unit:kJ/kg \t\t\t#enthalpy\n",
+ "#Neglecting pump work yields\n",
+ "nR = (h4-h5)/(h4-h2); \t\t\t#Thermal efficiency of the cycle\n",
+ "print \"Neglecting the pump work, The thermal efficiency of the cycle is %.2f percentage\"%(nR*100);\n",
+ "p2 = 400; \t\t\t#Unit:Psia \t\t\t#Upper pressure\n",
+ "p1 = 14.696; \t\t\t#Unit:Psia \t\t\t#Lower pressure\n",
+ "vf = 0.01167; \t\t\t#Specific volume of saturated liquid \t\t\t#ft**3/lbm\n",
+ "J = 778; \t\t\t#Conversion factor\n",
+ "Pumpwork = ((p2-p1)*vf*144)/J; \t\t\t#Unit:Btu/lbm \t\t\t#1ft**2 = 144 in**2 \t\t\t#pumpwork\n",
+ "#The efficiency of the cycle including pump work is\n",
+ "nR = ((h4-h5)-Pumpwork)/((h4-h1)-Pumpwork); \t\t\t#Thermal efficiency of the cycle\n",
+ "print \"The thermal efficiency of the cycle including pump work is %.2f percentage\"%(nR*100);\n",
+ "#where the denominator is h4-h2 = h4-h1-(h2-h1).Neglecting pump work is obviously justified in this case.An alternative solution is obtained by Using the Steam Tables:at 14.696 psia ans sat-uration,sg = 1.7567 ; at 400 psia,s = 1.7567.From Table 3(at 400 psia)\n",
+ "# s h t\n",
+ "#1.7632 1523.6 1000 \n",
+ "#1.7567 1514.2 982.4\n",
+ "#1.7558 1512.9 980"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Solution for b\n",
+ "Neglecting the pump work, The thermal efficiency of the cycle is 27.31 percentage\n",
+ "The thermal efficiency of the cycle including pump work is 27.26 percentage\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.4 Page No : 383"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Refer to figure8.3.The desired quantities are obtained as follows:\n",
+ "#at 14.696 psia,saturated vapor (x = 1),s = 1.7566 Btu/lbm*R\n",
+ "h5 = 1150.4; \t\t\t#Unit:Btu/lbm \t\t\t#enthaply\n",
+ "#at 14.696 psia,saturated liquid (x = 0),s = 0.3122 Btu/lbm*R\n",
+ "h2 = 180.17; \t\t\t#Unit:Btu/lbm \t\t\t#enthaply \n",
+ "h1 = h2;\n",
+ "#at 400 psia,s = 1.7566 Btu/lbm*R,\n",
+ "h4 = 1514.0; \t\t\t#Unit:Btu/lbm \t\t\t#Enthalpy\n",
+ "t = 982.07; \t\t\t#Unit:F \t\t\t#tempearature\n",
+ "#at 400 psia,s = 0.3122 Btu/lbm*R, \t\t\t#s = entropy\n",
+ "h = 181.39; \t\t\t#Unit:Btu/lbm \t\t\t#Enthalpy\n",
+ "#Note the agreement of these values with the ones obtained for problem8.4.Alos,note the temperature of 982.07F compared to 982.4F.Continuing,\n",
+ "#Neglecting pump work \n",
+ "nR = (h4-h5)/(h4-h2); \t\t\t#Thermal efficiency of the cycle\n",
+ "print \"Neglecting the pump work, The thermal efficiency of the cycle is %.2f percentage\"%(nR*100);\n",
+ "Pumpwork = h-h2; \t\t\t#Unit:kJ/kg \t\t\t#/pumpwork\n",
+ "#The efficiency of the cycle including pump work is\n",
+ "nR = ((h4-h5)-Pumpwork)/((h4-h2)-Pumpwork); \t\t\t#Thermal efficiency of the cycle\n",
+ "print \"The thermal efficiency of the cycle including pump work is %.2f percentage\"%(nR*100);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Neglecting the pump work, The thermal efficiency of the cycle is 27.26 percentage\n",
+ "The thermal efficiency of the cycle including pump work is 27.19 percentage\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.5 Page No : 385"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#The Carnot cycle would operate between 982.4F and 212F.\n",
+ "T1 = 982.4+460; \t\t\t#temperature converted to absolute temperature \t\t\t#Unit:R\n",
+ "T2 = 212+460; \t\t\t#temperature converted to absolute temperature \t\t\t#Unit:R\n",
+ "nc = ((T1-T2)/T1)*100; \t\t\t#Efficiency of carnot cycle\n",
+ "print \"The efficiency is %.2f percentage\"%(nc);\n",
+ "#In problem 8.3,\n",
+ "nR = 27.3; \t\t\t#Thermal efficiency of the cycle neglecting the pump work\n",
+ "typen = (nR/nc)*100; \t\t\t#Type efficiency = ideal thermal efficiency/efficiency of carnot cycle operating between min and max temperature limits\n",
+ "print \"The type efficiency of the ideal Rankine cycle is %.2f percentage\"%(typen);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The efficiency is 53.41 percentage\n",
+ "The type efficiency of the ideal Rankine cycle is 51.11 percentage\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.6 Page No : 385"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#For the upper temperature of the cycle,we have 400C,and for 50kPa,the steam tables give us a saturation temperature of 81.33C.The efficiency of a Carnot cycle operating between the limits would be\n",
+ "T1 = 400+273; \t\t\t#Celcius temperature converted to fahrenheit temperature\n",
+ "T2 = 81.33+273; \t\t\t#temperature converted to fahrenheit temperature\n",
+ "nc = ((T1-T2)/T1)*100; \t\t\t#Efficiency of carnot cycle\n",
+ "print \"The efficiency is %.2f percentage\"%(nc);\n",
+ "#In problem 8.1,\n",
+ "nR = 28.5; \t\t\t#Thermal efficiency of the cycle neglecting the pump work\n",
+ "typen = (nR/nc)*100; \t\t\t#Type efficiency = ideal thermal efficiency/efficiency of carnot cycle operating between min and max temperature limits\n",
+ "print \"The type efficiency of the ideal Rankine cycle is %.2f percentage\"%(typen);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The efficiency is 47.35 percentage\n",
+ "The type efficiency of the ideal Rankine cycle is 60.19 percentage\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.7 Page No : 386"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#From problem 8.3,\n",
+ "work = 1515-1150.5; \t\t\t#Unit:Btu/lbm of steam \t\t\t#pump work is neglected \t\t\t#Useful ideal work\n",
+ "#Because of the heat losses, 50 Btu/lbm of the 364.5 Btu/lbm becomes unavailable.\n",
+ "available = 364.5-50; \t\t\t#Unit:Btu/lbm \n",
+ "n = available/(1515-180.15); \t\t\t#Thermal efficiency of the cycle neglecting pump work h4 = 1515; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy & h1 = 180.15; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n",
+ "print \"The thermal efficiency of the cycle neglecting pump work is %.2f percentage\"%(n*100);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The thermal efficiency of the cycle neglecting pump work is 23.56 percentage\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.8 Page No : 387"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Neglecting the pump work,we have\n",
+ "heatrate = 3413/0.273; \t\t\t#Unit:Btu/kWh \t\t\t#0.273 = efficiency \t\t\t#1 kWh = 3413 \t\t\t#heat rate\n",
+ "print \"The heat rate is %.2f Btu/kWh\"%(heatrate);\n",
+ "#Per pound of steam,1515-1150.5 = 364.5 Btu is delivered.\n",
+ "#Because 1 kWh = 3413\n",
+ "print \"The steam rate is %.2f lbm of steam per kilowatt-hour\"%(3413./1515-1150.5)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat rate is 12501.83 Btu/kWh\n",
+ "The steam rate is -1148.25 lbm of steam per kilowatt-hour\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.9 Page No : 388"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#The Mollier chart provides a convenient way of solving this problem.Expanding from 980F,400 psia,s = 1.7567 to 200 psia yields a final enthalpy of 1413 Btu/lbm.Expanding from 200 psia ans an enthalpy of 1515 Btu/lbm to 14.696 psia yields a final enthaply of 1205 Btu/lbm. \n",
+ "h4 = 1515; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n",
+ "h5 = 1205; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n",
+ "h7 = 1413; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n",
+ "h1 = 180.15; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n",
+ "nreheat = ((h4-h5)+(h4-h7))/((h4-h1)+(h4-h7)); \t\t\t#The efficiency of the reheat cycle\n",
+ "print \"The efficiency of the reheat cycle is %.2f percentage\"%(nreheat*100);\n",
+ "#It is apparent that for the conditions of this problem,the increase in efficiency is not very large.The final condition of the fluid after the second expansion is superheated steam at \n",
+ "#14.696 psia.By condenmath.sing at this relatively high pressure condition,a large amount of heat is rejected to the condenser cooling water.7\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The efficiency of the reheat cycle is 28.67 percentage\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.10 Page No : 389"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Some of the property data required was found in problem8.4.In addition we have,\n",
+ "#at 200 psia,s = 1.7566 Btu/lbm*R,\n",
+ "h7 = 1413.6; \t\t\t#Unit:Btu/lbm \t\t\t#Enthalpy\n",
+ "#at 200 psia,s = 1.8320 Btu/lbm*R,\n",
+ "h4 = 1514.0; \t\t\t#Unit:Btu/lbm \t\t\t#Enthalpy\n",
+ "#at 14.696 psia,s = 1.8320 Btu/lbm*R,\n",
+ "h5 = 1205.2; \t\t\t#Unit:Btu/lbm \t\t\t#Enthalpy\n",
+ "h1 = 180.17; \t\t\t#Unit:Btu/lbm \t\t\t#enthalpy\n",
+ "\n",
+ "# Calculations\n",
+ "#Using these data,\n",
+ "nreheat = ((h4-h5)+(h4-h7))/((h4-h1)+(h4-h7)); \t\t\t#The efficiency of the reheat cycle \n",
+ "\n",
+ "# Results\n",
+ "print \"The efficiency of the reheat cycle is %.2f percentage\"%(nreheat*100);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The efficiency of the reheat cycle is 28.53 percentage\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.11 Page No : 394"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "print \"Solution for a\";\n",
+ "#For the rankine cycle,the Mollier chart gives\n",
+ "h4 = 1505; \t\t\t#Enthalpy \t\t\t#Unit:Btu/lbm\n",
+ "h5 = 922; \t\t\t#Enthalpy \t\t\t#Unit:Btu/lbm\n",
+ "h6 = h5; \t\t\t#Enthalpy \t\t\t#Unit:Btu/lbm\n",
+ "#and at the condenser,\n",
+ "h1 = 69.74; \t\t\t#enthalpy \t\t\t#Unit:Btu/lbm\n",
+ "nR = (h4-h5)/(h4-h1); \t\t\t#efficiency of rankine cycle\n",
+ "print \"The efficiency of rankine cycle is %.2f percentage\"%(nR*100);\n",
+ "\n",
+ "print \"Solution for b\";\n",
+ "#Figure 8.16 shows the regenerative cycle.After doing work(isentropically),W lbs of steam are bled from the turbine at 50 psia for each lbm of steam leaving the steam generator,and (1-W) pound goes through the turbine and is condensed in the condenser to saturated liquid at 1 psia.This condensate is pumped to the heater,where it mixes with the extraced steam and leaves as saturated liquid at 50 psia.The required enthalpies are:\n",
+ "#Leaving turbine:\n",
+ "h5 = 1168; \t\t\t#Btu/lbm at 50 psia \n",
+ "#Leaving condenser:\n",
+ "h7 = 69.74; \t\t\t#Btu/lbm at 1 psia \t\t\t# is equal to h8 if pump work is neglected\n",
+ "#Leaving heater:\n",
+ "h1 = 250.24; \t\t\t#Btu/lbm at 50 psia \t\t\t#is equal to h2 if pump work is neglected(saturated liquid)\n",
+ "#A Heat balance around the heater gives\n",
+ "#W*h5 + (1-W)*h7 = 1*h1 \n",
+ "W = ((1*h1)-h7)/(h5-h7); \t\t\t#Unit:lbm \t\t\t#W lb of steam \n",
+ "print \"W = %.2f lbm\"%(W);\n",
+ "work = (1-W)*(h4-922) + W*(h4-h5); \t\t\t#h5 = 922 from the mollier chart \t\t\t#Unit:Btu/lbm \t\t\t#The work output\n",
+ "print \"The work output is %.2f Btu/lbm\"%(work);\n",
+ "#Heat into steam generator equals the enthalpy leaving minus the enthalpy of the saturated liquid entering at 50 psia:\n",
+ "qin = h4-h1; \t\t\t#Unit:Btu/lbm \t\t\t#Heat in\n",
+ "n = work/qin; \t\t\t#Efficiency of regenerative cycle\n",
+ "print \"The efficiency of regenerative cycle is %.2f percentage\"%(n*100);\n",
+ "#The efficiency of a regenerative cycle with one open heater is given by \n",
+ "n = 1-(((h5-h1)*(h6-h7))/((h4-h1)*(h5-h7))); \t\t\t#efficiency of a regenerative cycle\n",
+ "W = (h1-h7)/(h5-h7); \t\t\t#Unit:lbm \t\t\t#W lb of steam\n",
+ "print \"When the rankine cycle is compared with regenerative cycle\"\n",
+ "print \"W = %.2f lbm and the efficiency of a regenerative cycle with one open heater is given by %.2f percentage\"%(W,n*100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Solution for a\n",
+ "The efficiency of rankine cycle is 40.62 percentage\n",
+ "Solution for b\n",
+ "W = 0.16 lbm\n",
+ "The work output is 542.57 Btu/lbm\n",
+ "The efficiency of regenerative cycle is 43.24 percentage\n",
+ "When the rankine cycle is compared with regenerative cycle\n",
+ "W = 0.16 lbm and the efficiency of a regenerative cycle with one open heater is given by 43.24 percentage\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.12 Page No : 396"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Figure 8.16(a) shows the cycle.For this cycle,W2 pounds are extracted at 100 psia,and W1 pounds are extracted at 50 psia for each pound produced by the steam generator.The enthalpies that are required are:\n",
+ "#Leaving turbine: 922 \t\t\t#Btu/lbm at 1 psia\n",
+ "#Leaving condenser: 69.74 \t\t\t#Btu/lbm at 1 psia (saturated liquid)\n",
+ "#Leaving low pressure heater: 250.24 \t\t\t#Btu/lbm at 50 psia (saturated liquid)\n",
+ "#Leaving high pressure heater: 298.61 \t\t\t#Btu/lbm at 100 psia\n",
+ "#At low pressure extraction: 1168 \t\t\t#Btu/lbm at 50 psia\n",
+ "#At high pressure extraction: 1228.6 \t\t\t#Btulbm at 100 psia\n",
+ "#Entering turbine: 1505 \t\t\t#Btu/lbm\n",
+ "#The heat balance around the high pressure heater gives us\n",
+ "#W2*1228.6 + (1-W2)*250.24 = 1*298.61\n",
+ "W2 = ((1*298.61)-250.24)/(1228.6-250.24); \t\t\t#lbm \t\t\t#W2 pounds are extracted at 100 psia\n",
+ "print \"W2 = %.2f lbm\"%(W2);\n",
+ "#A heat balance around the low pressure heater yields\n",
+ "#W1*1168 + (1-W1-W2)*69.74 = (1-W2)*250.24\n",
+ "W1 = (((1-W2)*250.24)-69.74+(W2*69.74))/(1168-69.74); \t\t\t#lbm \t\t\t#W1 pounds are extracted at 50 psia\n",
+ "print \"W1 = %.2f lbm\"%(W1);\n",
+ "work = ((1505-1228.6)*1)+((1-W2)*(1228.6-1168))+((1-W1-W2)*(1168-922)); \t\t\t#The work output \t\t\t#Btu/lbm\n",
+ "print \"The work output is %.2f Btu/lbm\"%(work);\n",
+ "#Heat into the steam generator equals the enthalpy leaving minus the enthalpy of saturated liquid at 100 psia:\n",
+ "qin = 1505-298.61; \t\t\t#Btu/lbm \t\t\t#Heat in \n",
+ "print \"Heat in = %.2f Btu/lbm\"%(qin);\n",
+ "n = work/qin; \t\t\t#The efficiency\n",
+ "print \"The efficiency is %.2f percentage\"%(n*100);\n",
+ "#In terms of figure 8.16a,\n",
+ "#W2 = (h1-h11)/(h5-h11)\n",
+ "#W1 = (h5-h1/h6-h9)*(h10-h9/h5-h10) neglecting the pump work\n",
+ "#n = 1-(h7-h8/h4-h1)*(h5-h1/h5-h10)*(h6-h10/h6-h8)\n",
+ "#For this problem , h8 = h9 , h10 = h11 and h1 = h2.Thus\n",
+ "W2 = (298.61-250.24)/(1228.6-250.24); \t\t\t#lbm \t\t\t#W2 pounds are extracted at 100 psia\n",
+ "print \"Comparing the results\"\n",
+ "print \"W2 = %.2f lbm\"%(W2);\n",
+ "W1 = ((1228.6-298.61)*(250.24-69.74))/((1168-69.74)*(1228.6-250.24)); \t\t\t#lbm \t\t\t#W1 pounds are extracted at 50 psia\n",
+ "print \"W1 = %.2f lbm\"%(W1); \n",
+ "n = 1-(((922-69.74)*(1228.6-298.61)*(1168-250.24))/((1505-298.61)*(1228.6-250.24)*(1168-69.74))); \t\t\t#Efficiency\n",
+ "print \"The efficiency is %.2f percentage\"%(n*100);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "W2 = 0.05 lbm\n",
+ "W1 = 0.16 lbm\n",
+ "The work output is 529.41 Btu/lbm\n",
+ "Heat in = 1206.39 Btu/lbm\n",
+ "The efficiency is 43.88 percentage\n",
+ "Comparing the results\n",
+ "W2 = 0.05 lbm\n",
+ "W1 = 0.16 lbm\n",
+ "The efficiency is 43.88 percentage\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.13 Page No : 398"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Regenerative cycle\n",
+ "#Assume that 1 lbm of steam leaves the steam generator and that W1 lbm is bled off to the closed heater at 100psia and that W2 lbm is bled off to the open heater at 50 psia.Alos,assume that the feedwater leaving the closed heater at 310F,18F less than the saturation temperature corresponding to 100 psia.For calculation purposes,we will use hf at 310 F for this enthalpy.Using the Mollier diagram and the steam tables,we find the following values of enthalpy:\n",
+ "\n",
+ "#h to turbine = 1505 Btu/lbm(at 1000 psia and 1000F)\n",
+ "#h at first extraction = 1228 Btu/lbm(isentropically to 100 psia)\n",
+ "#h at second extraction = 1168 Btu/lbm(isentropically to 100 psia)\n",
+ "#h at turbine exit = 922 Btu/lbm (isentropically to 1 psia)\n",
+ "#hf = 298.61 Btu/lbm(at 100 psia)\n",
+ "#hf = 250.24 Btu/lbm(at 50 psia)\n",
+ "#hf = 280.06 Btu/lbm(at 310 F)\n",
+ "#hf = 69.74 Btu/lbm (at 1 psia)\n",
+ "#A heat balance around the high pressure heater gives us\n",
+ "#W1*(1228-298.61) = 1*(280.06-250.24)\n",
+ "W1 = ((1*(280.06-250.24)))/(1228-298.61); \t\t\t#lbm \t\t\t#W1 lbm is extracted at 100 psia\n",
+ "print \"W1 = %.2f lbm\"%(W1);\n",
+ "#A heat balance around the open heater gives us\n",
+ "#W2*1168 +(1-W1-W2)*69.74 + W1*268.61 = 1*250.24\n",
+ "W2 = ((1*250.24)-(W1*268.61)-69.74+(W1*69.74))/(1168-69.74); \t\t\t#lbm \t\t\t#W2 lbm is extracted at 50 psia\n",
+ "print \"W2 = %.2f lbm\"%(W2);\n",
+ "#The work output of the cycle consists of the work that 1 lbm does in expanding isentropically to 100 psia,plus the work done by (1-W1)lbm expanding isentropicaly from 100 to 50 psia,plus the work done by (1-W1-W2)lbm expanding isentropically from 50 to 1 psia.\n",
+ "#Numerically,the work is\n",
+ "workoutput = (1*(1505-1228))+((1-W1)*(1228-1168))+((1-W1-W2)*(1168-922)); \t\t\t#Btu/lbm \t\t\t#the work output\n",
+ "print \"The work output is %.2f Btu/lbm\"%(workoutput);\n",
+ "heatinput = 1505-280.06; \t\t\t#Btu/lbm \t\t\t#the heat input\n",
+ "print \"The heat input is %.2f Btu/lbm\"%(heatinput);\n",
+ "n = workoutput/heatinput; \t\t\t#Efficiency\n",
+ "print \"The efficiency is %.2f percentage\"%(n*100);\n",
+ "#When compared to 8.11,we conclude that the addition of additional closed heater raises the efficiency. \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "W1 = 0.03 lbm\n",
+ "W2 = 0.16 lbm\n",
+ "The work output is 534.18 Btu/lbm\n",
+ "The heat input is 1224.94 Btu/lbm\n",
+ "The efficiency is 43.61 percentage\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.14 Page No : 426"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#From problem 8.11,\n",
+ "#Leaving turbine:\n",
+ "h5 = 1168.; \t\t\t#Btu/lbm at 50 psia \n",
+ "#For the rankine cycle,the Mollier chart gives\n",
+ "h4 = 1505.; \t\t\t#Enthalpy \t\t\t#Unit:Btu/lbm\n",
+ "h6 = 922.; \t\t\t#Enthalpy \t\t\t#Unit:Btu/lbm \t\t\t#h6 = h5;\n",
+ "#and at the condenser,\n",
+ "h1 = 69.74; \t\t\t#enthalpy \t\t\t#Unit:Btu/lbm\n",
+ "#Leaving condenser:\n",
+ "h7 = 69.74; \t\t\t#Btu/lbm at 1 psia \t\t\t# is equal to h8 if pump work is neglected\n",
+ "#Leaving heater:\n",
+ "h2 = 250.24; \t\t\t#Btu/lbm at 50 psia \t\t\t#is equal to h1 if pump work is neglected(saturated liquid)\n",
+ "#A Heat balance around the heater gives\n",
+ "#W*h5 + (1-W)*h7 = 1*h1 \n",
+ "W = ((1*h2)-h7)/(h5-h7); \t\t\t#Unit:lbm\n",
+ "liquidleaving = (W*h2)+(1-W)*h1; \t\t\t#Btu/lbm \t\t\t#liquid leaving the heatexchange\n",
+ "\n",
+ "#Using these data,,\n",
+ "heatin = h4-liquidleaving; \t\t\t#Btu/lbm \t\t\t#heat in the boiler\n",
+ "print \"Heat in at boiler is %.2f Btu/lbm\"%(heatin);\n",
+ "workout = ((1-W)*(h4-h6))+(W*(h4-h5)); \t\t\t#Btu/lbm \t\t\t#The work out of turbine\n",
+ "print \"The work out of turbine is %.2f Btu/lbm\"%(workout);\n",
+ "n = workout/heatin; \t\t\t#efficiency \t\t\t#The conventional thermal efficiency\n",
+ "print \"The conventional thermal efficiency is %.2f percentage\"%(n*100);\n",
+ "#If at this time we have define the efficiency of energy utilization to be the ratio of the work out plus the useful heat out divided by the heat input to the cycle, nenergyutilization = ((w+qoutuseful)/qin)*100\n",
+ "qout = W*(h5-h2); \t\t\t#heat out \t\t\t#Btu/lbm\n",
+ "n = (workout+qout)/heatin; \t\t\t#efficiency of energy utilization\n",
+ "print \"Efficiency of energy utilization is %.2f percentage\"%(n*100);\n",
+ "#Comparing with 8.11, we see that conventional thermal efficiency is decreased and efficiency of energy utilization is increased\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat in at boiler is 1405.59 Btu/lbm\n",
+ "The work out of turbine is 542.57 Btu/lbm\n",
+ "The conventional thermal efficiency is 38.60 percentage\n",
+ "Efficiency of energy utilization is 49.33 percentage\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch9_1.ipynb b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch9_1.ipynb
new file mode 100644
index 00000000..6d86fb8c
--- /dev/null
+++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/ch9_1.ipynb
@@ -0,0 +1,529 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:da488825bdba86828f52563d3ff88b1e799fc75e8d8cda0bf3ace1210243fc02"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 9 : Gas Power Cycles"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.1 Page No : 462"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Rc = 7.; \t\t\t#Compression Ratio Rc = v2/v3\n",
+ "k = 1.4; \t\t\t#It is apparent incerease in compression ratio yields an increased cycle efficiency\n",
+ "notto = (1-(1/Rc)**(k-1))*100; \t\t\t#Efficiency of an otto engine\n",
+ "print \"The efficiency of the otto cycle is %.2f percentage\"%(notto);\n",
+ "#For the carnot cycle,\n",
+ "#Nc = 1-(T2/T4) \t\t\t#efficiency for the carnot cycle \t\t\t#T2 = lowest temperature \t\t\t#T4 = Highest temperature\n",
+ "\n",
+ "T2 = 70.+460; \t\t\t#for converting to R \t\t\t#Conversion of unit\n",
+ "#At 700 F\n",
+ "T4 = 700.+460; \t\t\t#temperatures converted to absolute temperatures;\n",
+ "nc = (1-(T2/T4))*100; \t\t\t#efficiency of the carnot cycle\n",
+ "print \"When peak temperature is 700 fahrenheit, efficiency of the carnot cycle is %.2f percentage\"%(nc); \n",
+ "\n",
+ "#At 1000 F\n",
+ "T4 = 1000.+460; \t\t\t#temperatures converted to absolute temperatures;\n",
+ "nc = (1-(T2/T4))*100; \t\t\t#efficiency of the carnot cycle\n",
+ "print \"When peak temperature is 1000 fahrenheit, efficiency of the carnot cycle is %.2f percentage\"%(nc);\n",
+ "\n",
+ "#At 3000 F\n",
+ "T4 = 3000.+460; \t\t\t#temperatures converted to absolute temperatures;\n",
+ "nc = (1-(T2/T4))*100; \t\t\t#efficiency of the carnot cycle\n",
+ "print \"When peak temperature is 3000 fahrenheit, efficiency of the carnot cycle is %.2f percentage\"%(nc);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The efficiency of the otto cycle is 54.08 percentage\n",
+ "When peak temperature is 700 fahrenheit, efficiency of the carnot cycle is 54.31 percentage\n",
+ "When peak temperature is 1000 fahrenheit, efficiency of the carnot cycle is 63.70 percentage\n",
+ "When peak temperature is 3000 fahrenheit, efficiency of the carnot cycle is 84.68 percentage\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.2 Page No : 463"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy.linalg import inv\n",
+ "\n",
+ "cv = 0.172; \t\t\t#Unit:Btu/(lbm*R) \t\t\t#Specific heat constant\n",
+ "Rc = 7; \t\t\t#Compression Ratio Rc = v2/v3\n",
+ "k = 1.4; \t\t\t#It is apparent incerease in compression ratio yields an increased cycle efficiency\n",
+ "T2 = 70+460; \t\t\t#for converting to R \t\t\t#Conversion of unit\n",
+ "#For 1000 F\n",
+ "T4 = 1000+460; \t\t\t#temperatures converted to absolute temperatures;\n",
+ "T3byT2 = Rc**(k-1); \t\t\t#Unit less\n",
+ "T3 = T3byT2*T2;\n",
+ "qin = cv*(T4-T3); \t\t\t#Unit:Btu/lbm \t\t\t#Heat added\n",
+ "#Qr = cv*(T5-T2)*(T5/T4) = (v2/v3)**(k-1)\n",
+ "Qr = (inv([[Rc]]))**(k-1); \t\t\t#Unit:Btu/lbm \t\t\t#Heat rejected\n",
+ "T5 = T4*Qr;\n",
+ "Qr = cv*(T5-T2); \t\t\t#Unit:Btu/lbm \t\t\t#Heat rejected\n",
+ "print \"The net work out is %.2f Btu/lbm\"%(qin-Qr);\n",
+ "notto = ((qin-Qr)/qin)*100; \t\t\t#The efficiency of otto cycle \n",
+ "print \"The efficiency of otto cycle is %.2f percentage\"%(notto);\n",
+ "#The value agrees with the results of problem 9.1\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The net work out is 28.44 Btu/lbm\n",
+ "The efficiency of otto cycle is 54.08 percentage\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.3 Page No : 464"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "cv = 0.7186; \t\t\t#Unit:kJ/(kg*K) \t\t\t#Specific heat constant for constant volume process\n",
+ "Rc = 8.; \t\t\t#Compression Ratio Rc = v2/v3\n",
+ "k = 1.4; \t\t\t#It is apparent incerease in compression ratio yields an increased cycle efficiency\n",
+ "T2 = 20.+273; \t\t\t#20 C converted to its kelvin value\n",
+ "qin = 50.; \t\t\t#Heat added \t\t\t#Unit:kJ\n",
+ "T3byT2 = Rc**(k-1);\n",
+ "T3 = T3byT2*T2; \t\t\t#Unit:K\n",
+ "#qin = cv*(T4-T3) \t\t\t#heat added \t\t\t#Unit:kJ\n",
+ "T4 = (qin/cv)+T3; \t\t\t#The peak temperature of the cycle \t\t\t#Unit:K\n",
+ "print \"The peak temperature of the cycle is %.2f Kelvin i.e. %.2f Celcius\"%(T4,T4-273);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The peak temperature of the cycle is 742.72 Kelvin i.e. 469.72 Celcius\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.4 Page No : 465"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#For an Otto cycle,\n",
+ "rc = 7.; \t\t\t#Compression Ratio Rc = v2/v3\n",
+ "q = 50.; \t\t\t#Unit:Btu/lbm \t\t\t#Heat added\n",
+ "p2 = 14.7; \t\t\t#Unit:psia \t\t\t#pressure at point 2\n",
+ "T2 = 60.+460; \t\t\t#temperatures converted to absolute temperatures; \t\t\t#Unit:R\n",
+ "cp = 0.24; \t\t\t#Unit:Btu/(lbm*R) \t\t\t#Specific heat constant for constant pressure process\n",
+ "cv = 0.171; \t\t\t#Unit:Btu/(lbm*R) \t\t\t#Specific heat constant for constant volume process\n",
+ "R = 53.3; \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n",
+ "k = 1.4; \t\t\t#It is apparent incerease in compression ratio yields an increased cycle efficiency\n",
+ "#Refering to figure 9.9,\n",
+ "#At (2),we need v2.\n",
+ "#p2*v2 = R*T2\n",
+ "v2 = (R*T2)/(p2*144); \t\t\t#Unit:ft**3/lbm \t\t\t#1ft**2 = 144 in**2 \t\t\t#specific volume at point 2\n",
+ "print \"At point 2, specific volume v2 = %.2f ft**3/lbm\"%(v2);\n",
+ "#For The isentropic path (2)&(3),p3*v3**k = p2*v2**k,so\n",
+ "#So,p3 = p2*(v2/v3)**k;\n",
+ "p3 = p2*rc**k; \t\t\t#Unit:psia \t\t\t#pressure at point 3\n",
+ "print \"At path2&3\";\n",
+ "print \"pressure p3 = %.2f psia\"%(p3);\n",
+ "v3 = v2/rc; \t\t\t#Unit:ft**3/lbm \t\t\t#specific volume at point 3\n",
+ "print \"specific volume v3 = %.2f ft**3/lbm\"%(v3);\n",
+ "T3 = (p3*v3*144)/R; \t\t\t#Unit:R \t\t\t#1ft**2 = 144 in**2 \t\t\t#temperature at point 3\n",
+ "print \"temperature T3 = %.2f R\"%(T3);\n",
+ "print \"At point4\"\n",
+ "#To obtain the values at (4),we note\n",
+ "v4 = v3; \t\t\t#Unit:ft**3/lbm \t\t\t#specific volume at point 4\n",
+ "print \"specific volume v4 = %.2f ft**3/lbm\"%(v4);\n",
+ "#qin = cv*(T4-T3)\n",
+ "T4 = T3+(q/cv); \t\t\t#Unit:R \t\t\t#temperature at point 4 \n",
+ "print \"temperature T4 = %.2f R\"%(T4);\n",
+ "#For p4,\n",
+ "p4 = (R*T4)/(144*v4); \t\t\t#Unit:psia \t\t\t#1ft**2 = 144 in**2 \t\t\t#pressure at point 4\n",
+ "print \"pressure p4 = %.2f psia\"%(p4);\n",
+ "#The last point has the same specific volume as (2),giving\n",
+ "print \"At last point\"\n",
+ "v5 = v2; \t\t\t#Unit:ft**3/lbm \t\t\t#specific volume at point 5\n",
+ "print \"specific volume v5 = %.2f ft**3/lbm\"%(v5);\n",
+ "#The isentropic path equation,p5*v5**k = p4*v4**k,so\n",
+ "p5 = p4*(v4/v5)**k; \t\t\t#Unit:psia \t\t\t#pressure at point 5\n",
+ "print \"pressure p5 = %.2f psia\"%(p5);\n",
+ "T5 = (p5*v5*144)/(R); \t\t\t#Unit:R \t\t\t#1ft**2 = 144 in**2 temperature at point 5\n",
+ "print \"temperature T5 = %.2f R\"%(T5);\n",
+ "n = (((T4-T3)-(T5-T2))/(T4-T3))*100; \t\t\t#The efficiency of the cycle\n",
+ "print \"The efficiency of the cycle is %.2f percentage\"%(n);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "At point 2, specific volume v2 = 13.09 ft**3/lbm\n",
+ "At path2&3\n",
+ "pressure p3 = 224.11 psia\n",
+ "specific volume v3 = 1.87 ft**3/lbm\n",
+ "temperature T3 = 1132.51 R\n",
+ "At point4\n",
+ "specific volume v4 = 1.87 ft**3/lbm\n",
+ "temperature T4 = 1424.91 R\n",
+ "pressure p4 = 281.97 psia\n",
+ "At last point\n",
+ "specific volume v5 = 13.09 ft**3/lbm\n",
+ "pressure p5 = 18.50 psia\n",
+ "temperature T5 = 654.26 R\n",
+ "The efficiency of the cycle is 54.08 percentage\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.7 Page No : 468"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#For four cycle engine,\n",
+ "#Using the results of problem 9.6,\n",
+ "pm = 1000.; \t\t\t#Unit:kPa \t\t\t#mean effective pressure \t\t\t#Unit:psia\n",
+ "N = 4000./2; \t\t\t#Power strokes per minute \t\t\t#2L engine \t\t\t#Unit:rpm\n",
+ "LA = 2. \t\t\t#Mean \t\t\t#Unit:liters\n",
+ "hp = (pm*LA*N)/44760; \t\t\t#The horsepower \t\t\t#Unit:hp\n",
+ "print \"The horsepower is %.2f hp\"%(hp);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The horsepower is 89.37 hp\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.9 Page No : 469"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#An otto engine\n",
+ "#Using results of problem 9.8, \n",
+ "rc = (1+c)/c; \t\t\t#The compression ratio\n",
+ "print \"The compression ratio is %.2f\"%(rc);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "ename": "NameError",
+ "evalue": "name 'c' is not defined",
+ "output_type": "pyerr",
+ "traceback": [
+ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
+ "\u001b[0;32m<ipython-input-8-ce54cad7c89c>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0;31m#An otto engine\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0;31m#Using results of problem 9.8,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 4\u001b[0;31m \u001b[0mrc\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m+\u001b[0m\u001b[0mc\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0mc\u001b[0m\u001b[0;34m;\u001b[0m \u001b[0;31m#The compression ratio\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 5\u001b[0m \u001b[0;32mprint\u001b[0m \u001b[0;34m\"The compression ratio is %.2f\"\u001b[0m\u001b[0;34m%\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mrc\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m;\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
+ "\u001b[0;31mNameError\u001b[0m: name 'c' is not defined"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.10 Page No : 470"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#For four cycle,six cylinder engine,\n",
+ "#Using the results of problem 9.5,\n",
+ "hp = 100; \t\t\t#Horsepower \t\t\t#Unit:hp\n",
+ "L = 4./12; \t\t\t#Unit:ft \t\t\t#stroke is 4 in.\n",
+ "A = (math.pi/4)*(3)**2*6; \t\t\t#Cylinder bore is 3 in.\n",
+ "N = 4000/2; \t\t\t#Power strokes per minute \t\t\t#2L engine \t\t\t#Unit:rpm\n",
+ "#hp = (pm*LA*N)/33000;\n",
+ "pm = (hp*33000)/(L*A*N); \t\t\t#The mean effective pressure \t\t\t#psia\n",
+ "\n",
+ "# Results\n",
+ "print \"The mean effective pressure is %.2f psia\"%(pm);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mean effective pressure is 116.71 psia\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.11 Page No : 470"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#six cylinder engine,with print lacement 3.3L\n",
+ "#Using the results of problem 9.5,\n",
+ "hp = 230; \t\t\t#Horsepower \t\t\t#Unit:hp\n",
+ "#3.3L*1000 cm**3/L*(in/2.54 cm)**3\n",
+ "LA = 3.3*1000*(1/2.54)**3; \t\t\t#mean \t\t\t#in**3\n",
+ "N = 5500/2; \t\t\t#Power strokes per minute \t\t\t#2L engine \t\t\t#Unit:rpm\n",
+ "#hp = (pm*LA*N)/33000;\n",
+ "pm = (hp*33000*12)/(LA*N); \t\t\t#1ft = 12inch \t\t\t#The mean effective pressure \t\t\t#psia\n",
+ "print \"The mean effective pressure is %.2f psia\"%(pm);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mean effective pressure is 164.47 psia\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.12 Page No : 478"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy.linalg import inv\n",
+ "\n",
+ "#An air-smath.radians(numpy.arcmath.tan(ard Diesel engine\n",
+ "rc = 16; \t\t\t#Compression Ratio Rc = v2/v3\n",
+ "v4byv3 = 2; \t\t\t#Cutoff ratio = v4/v3\n",
+ "k = 1.4; \t\t\t#with the cycle starting at 14 psia and 100 F \t\t\t#It is apparent incerease in compression ratio yields an increased cycle efficiency\n",
+ "T2 = 100+460; \t\t\t#temperatures converted to absolute temperatures;\n",
+ "ndiesel = 1-((inv([[rc]]))**(k-1)*(((v4byv3)**k-1)/(k*(v4byv3-1)))); \t\t\t#The efficiency of the diesel engine\n",
+ "print \"The efficiency of the diesel engine is %.2f percentage\"%(ndiesel*100);\n",
+ "# T3/T2 = rc**k-1 and T5/T4 = (1/re**k-1) \t\t\t#re = expansion ratio = v5/v4\n",
+ "#But T4/T3 = v4/v3 = rc/re\n",
+ "#So,\n",
+ "T5 = T2*(v4byv3)**k; \t\t\t#The temperature of the exhaust of the cycle \t\t\t#Unit:R\n",
+ "print \"The temperature of the exhaust of the cycle is %.2f R i.e. %.2f F\"%(T5,T5-460);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The efficiency of the diesel engine is 61.38 percentage\n",
+ "The temperature of the exhaust of the cycle is 1477.85 R i.e. 1017.85 F\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.13 Page No : 479"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Now,in problem 9.12,\n",
+ "#An air-smath.radians(numpy.arcmath.tan(ard Diesel engine\n",
+ "rc = 16; \t\t\t#Compression Ratio Rc = v2/v3\n",
+ "v4byv3 = 2; \t\t\t#Cutoff ratio = v4/v3\n",
+ "k = 1.4; \t\t\t#with the cycle starting at 14 psia and 100 F \t\t\t#It is apparent incerease in compression ratio yields an increased cycle efficiency\n",
+ "T2 = 100; \t\t\t#Unit:F \t\t\t#temperature \n",
+ "T5 = 1018; \t\t\t#Unit:F \t\t\t#Found in 9.12 \t\t\t#The temperature of the exhaust of the cycle \t\t\t#Unit:R\n",
+ "ndiesel = 0.614 \t\t\t#Efficiency of the diesel engine \t\t\t#Found in 9.12\n",
+ "#Now,in problem 9.13,\n",
+ "cp = 0.24; \t\t\t#Unit:Btu/(lbm*R) \t\t\t#Specific heat constant for constant pressure process\n",
+ "cv = 0.172; \t\t\t#Unit:Btu/(lbm*R) \t\t\t#Specific heat constant for constant volume process\n",
+ "\n",
+ "Qr = cv*(T5-T2); \t\t\t#Heat rejected \t\t\t#Unit:Btu/lbm\n",
+ "#ndeisel = 1-(Qr/qin); \t\t\t#Efficiency = ndeisel \t\t\t#qin = heat added\n",
+ "qin = Qr/(1-ndiesel); \t\t\t#Unit:Btu/lbm\n",
+ "J = 778; \t\t\t#J = Conversion factor\n",
+ "networkout = J*(qin-Qr); \t\t\t#(ft*lbf)/lbm \t\t\t#Net work out per pound of gas\n",
+ "print \"Net work out per pound of gas is %.2f ft*lbf)/lbm\"%(networkout);\n",
+ "#The mean effective pressure is net work divided by (v2-v3):\n",
+ "mep = networkout/((16-1)*144); \t\t\t#1ft**2 = 144 in**2 \t\t\t#Unit:psia \t\t\t#The mean effective pressure\n",
+ "print \"The mean effective pressure is %.2f psia\"%(mep); \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Net work out per pound of gas is 195403.25 ft*lbf)/lbm\n",
+ "The mean effective pressure is 90.46 psia\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.14 Page No : 489"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy.linalg import inv\n",
+ "\n",
+ "#A Brayton cycle\n",
+ "rc = 7; \t\t\t#Compression Ratio Rc = v2/v3\n",
+ "k = 1.4; \t\t\t#It is apparent incerease in compression ratio yields an increased cycle efficiency\n",
+ "cp = 0.24; \t\t\t#Unit:Btu/(lbm*R) \t\t\t#Specific heat constant for constant pressure process\n",
+ "T3 = 1500; \t\t\t#(unit:fahrenheit) \t\t\t#peak tempeature\n",
+ "p1 = 14.7; \t\t\t#Unit:psia \t\t\t#Initial condition\n",
+ "T1 = 70+460; \t\t\t#temperatures converted to absolute temperatures; \t\t\t#Initial condition\n",
+ "R = 53.3; \t\t\t#Unit:ft*lbf/lbm*R \t\t\t#constant of proportionality\n",
+ "nBrayton = 1-(0.1428571**(k-1)); \t\t\t#A Brayton cycle efficiency \n",
+ "print \"A Brayton cycle efficiency is %.2f percentage\"%(nBrayton*100);\n",
+ "#If we base our calculation on 1 lbm of gas and use subscripts that corresponds to points (1),(2),(3) and (4) of fig.9.22,we have\n",
+ "v1 = (R*T1)/p1; \t\t\t#Unit:ft**3/lbm \t\t\t#specific volume at point 1\n",
+ "#Because rc = 7 then,\n",
+ "v2 = v1/rc; \t\t\t#Unit:ft**3/lbm \t\t\t#specific volume at point 2\n",
+ "#After the isentropic compression, T2*v2**k-1 = T1*v1**k-1\n",
+ "T2 = T1*(v1/v2)**(k-1); \t\t\t#Unit:R \t\t\t#temperature at point 2\n",
+ "T2 = T2-460; \t\t\t#Unit:fahrenheit \t\t\t#temperature at point 2\n",
+ "qin = cp*(T3-T2); \t\t\t#Heat in \t\t\t#Unit:Btu/lbm\n",
+ "print \"The heat in is %.2f Btu/lbm\"%(qin);\n",
+ "#Because efficiency can be stated to be work out divided by heat in,\n",
+ "wbyJ = nBrayton*qin; \t\t\t#The work out \t\t\t#Unit:Btu/lbm\n",
+ "print \"The work out is %.2f Btu/lbm\"%(wbyJ); \t\t\t#Answer is wrong in the book.cause they have taken efficiency value wrong\n",
+ "print \"The heat rejected is %.2f Btu/lbm\"%(qin-wbyJ); \t\t\t#Anser is affected because of value of wbyJ\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A Brayton cycle efficiency is 54.08 percentage\n",
+ "The heat in is 193.37 Btu/lbm\n",
+ "The work out is 104.58 Btu/lbm\n",
+ "The heat rejected is 88.79 Btu/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch1.png b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch1.png
new file mode 100644
index 00000000..af1e377a
--- /dev/null
+++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch1.png
Binary files differ
diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch11.png b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch11.png
new file mode 100644
index 00000000..c0062cd1
--- /dev/null
+++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch11.png
Binary files differ
diff --git a/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch3.png b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch3.png
new file mode 100644
index 00000000..57a5dc36
--- /dev/null
+++ b/Thermodynamics_and_Heat_Power_by_I._Granet_and_M._Bluestein/screenshots/ch3.png
Binary files differ
diff --git a/_Engineering_Thermodynamics_by__O._Singh/README.txt b/_Engineering_Thermodynamics_by__O._Singh/README.txt
new file mode 100644
index 00000000..302a203f
--- /dev/null
+++ b/_Engineering_Thermodynamics_by__O._Singh/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Sai Rakesh
+Course: btech
+College/Institute/Organization: vellore institute of technology(vit)
+Department/Designation: ece
+Book Title: Engineering Thermodynamics
+Author: O. Singh
+Publisher: New Age International, New Delhi
+Year of publication: 2006
+Isbn: 978-81-224-1750-0
+Edition: 1 \ No newline at end of file
diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter10_3.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter10_3.ipynb
new file mode 100644
index 00000000..2d9241c2
--- /dev/null
+++ b/_Engineering_Thermodynamics_by__O._Singh/chapter10_3.ipynb
@@ -0,0 +1,1080 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 10:Intoduction to Internal Combustion engines"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 10.1;pg no: 387"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 10.1, Page:387 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 1\n",
+ "from stroke to bore ratio i.e L/D=1.2 and cylinder diameter=bore,i.e D=12 cm\n",
+ "stroke(L)=1.2*D in m\n",
+ "Area of indicator diagram(A)=30*10^-4 m^2\n",
+ "length of indicator diagram(l)=(1/2)*L in m\n",
+ "mean effective pressure(mep)=A*k/l in N/m^2\n",
+ "cross-section area of piston(Ap)=%pi*D^2/4 in m^2\n",
+ "for one cylinder indicated power(IP)=mep*Ap*L*N/(2*60) in W\n",
+ "for four cylinder total indicated power(IP)=4*IP in W 90477.87\n",
+ "frictional power loss(FP)=0.10*IP in W\n",
+ "brake power available(BP)=indicated power-frictional power=IP-FP in W 81430.08\n",
+ "therefore,mechanical efficiency of engine(n)=brake power/indicated power=BP/IP= 0.9\n",
+ "in percentage 90.0\n",
+ "so indicated power=90477.8 W\n",
+ "and mechanical efficiency=90%\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of indicated power,,mechanical efficiency\n",
+ "#intiation of all variables\n",
+ "# Chapter 9\n",
+ "import math\n",
+ "print\"Example 10.1, Page:387 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 1\")\n",
+ "k=20.*10**6;#spring constant in N/m^2\n",
+ "N=2000.;#engine rpm\n",
+ "print(\"from stroke to bore ratio i.e L/D=1.2 and cylinder diameter=bore,i.e D=12 cm\")\n",
+ "D=12.*10**-2;#cylinder diameter in m\n",
+ "print(\"stroke(L)=1.2*D in m\")\n",
+ "L=1.2*D\n",
+ "print(\"Area of indicator diagram(A)=30*10^-4 m^2\")\n",
+ "A=30.*10**-4;\n",
+ "print(\"length of indicator diagram(l)=(1/2)*L in m\")\n",
+ "l=(1./2.)*L\n",
+ "print(\"mean effective pressure(mep)=A*k/l in N/m^2\")\n",
+ "mep=A*k/l\n",
+ "print(\"cross-section area of piston(Ap)=%pi*D^2/4 in m^2\")\n",
+ "Ap=math.pi*D**2./4.\n",
+ "print(\"for one cylinder indicated power(IP)=mep*Ap*L*N/(2*60) in W\")\n",
+ "IP=mep*Ap*L*N/(2.*60.)\n",
+ "IP=4.*IP\n",
+ "print(\"for four cylinder total indicated power(IP)=4*IP in W\"),round(IP,2)\n",
+ "print(\"frictional power loss(FP)=0.10*IP in W\")\n",
+ "FP=0.10*IP\n",
+ "BP=IP-FP\n",
+ "print(\"brake power available(BP)=indicated power-frictional power=IP-FP in W\"),round(BP,2)\n",
+ "n=BP/IP\n",
+ "print(\"therefore,mechanical efficiency of engine(n)=brake power/indicated power=BP/IP=\"),round(BP/IP,2)\n",
+ "print(\"in percentage\"),round(n*100,2)\n",
+ "print(\"so indicated power=90477.8 W\")\n",
+ "print(\"and mechanical efficiency=90%\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 10.2;pg no: 388"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 10.2, Page:388 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 2\n",
+ "reciprocating pump is work absorbing machine having its mechanism similar to the piston-cylinder arrangement in IC engine.\n",
+ "mean effective pressure(mep)=A*k/l in pa\n",
+ "indicator power(IP)=Ap*L*mep*N*1*2/60 in W\n",
+ "(it is double acting so let us assume total power to be double of that in single acting) 88357.29\n",
+ "so power required to drive=88.36 KW\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of power required to drive\n",
+ "#intiation of all variables\n",
+ "# Chapter 10\n",
+ "import math\n",
+ "print\"Example 10.2, Page:388 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 2\")\n",
+ "A=40*10**-4;#area of indicator diagram in m^2\n",
+ "l=8*10**-2;#length of indicator diagram in m\n",
+ "D=15*10**-2;#bore of cylinder in m\n",
+ "L=20*10**-2;#stroke in m\n",
+ "k=1.5*10**8;#spring constant in pa/m\n",
+ "N=100;#pump motor rpm\n",
+ "print(\"reciprocating pump is work absorbing machine having its mechanism similar to the piston-cylinder arrangement in IC engine.\")\n",
+ "print(\"mean effective pressure(mep)=A*k/l in pa\")\n",
+ "mep=A*k/l \n",
+ "print(\"indicator power(IP)=Ap*L*mep*N*1*2/60 in W\")\n",
+ "Ap=math.pi*D**2/4\n",
+ "IP=Ap*L*mep*N*2/60\n",
+ "print(\"(it is double acting so let us assume total power to be double of that in single acting)\"),round(IP,2)\n",
+ "print(\"so power required to drive=88.36 KW\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 10.3;pg no: 388"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 10.3, Page:388 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 3\n",
+ "indicated power(IP)=brake power/mechanical efficiency in KW= 42.22\n",
+ "frictional power loss(FP)=IP-BP in KW 4.22\n",
+ "brake power at quater load(BPq)=0.25*BP in KW\n",
+ "mechanical efficiency(n1)=BPq/IP 0.69\n",
+ "in percentage 69.23\n",
+ "so indicated power=42.22 KW\n",
+ "frictional power loss=4.22 KW\n",
+ "mechanical efficiency=69.24%\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of indicated power,frictional power loss,mechanical efficiency\n",
+ "#intiation of all variables\n",
+ "# Chapter 10\n",
+ "print\"Example 10.3, Page:388 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 3\")\n",
+ "n=0.9;#mechanical efficiency of engine\n",
+ "BP=38;#brake power in KW\n",
+ "IP=BP/n\n",
+ "print(\"indicated power(IP)=brake power/mechanical efficiency in KW=\"),round(IP,2)\n",
+ "FP=IP-BP\n",
+ "print(\"frictional power loss(FP)=IP-BP in KW\"),round(FP,2)\n",
+ "print(\"brake power at quater load(BPq)=0.25*BP in KW\")\n",
+ "BPq=0.25*BP\n",
+ "IP=BPq+FP;\n",
+ "n1=BPq/IP\n",
+ "print(\"mechanical efficiency(n1)=BPq/IP\"),round(n1,2)\n",
+ "print(\"in percentage\"),round(n1*100,2)\n",
+ "print(\"so indicated power=42.22 KW\")\n",
+ "print(\"frictional power loss=4.22 KW\")\n",
+ "print(\"mechanical efficiency=69.24%\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 10.4;pg no: 389"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 10.4, Page:389 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 4\n",
+ "brake power of engine(BP) in MW= 3120.98\n",
+ "so brake power is 3.121 MW\n",
+ "The fuel consumption in kg/hr(m)=m*BP in kg/hr\n",
+ "In order to find out brake thermal efficiency the heat input from fuel per second is required.\n",
+ "heat from fuel(Q)in KJ/s\n",
+ "Q=m*C/3600\n",
+ "energy to brake power=3120.97 KW\n",
+ "brake thermal efficiency(n)= 0.33\n",
+ "in percentage 33.49\n",
+ "so fuel consumption=780.24 kg/hr,brake thermal efficiency=33.49%\n",
+ "NOTE=>In book,it is given that brake power in MW is 31.21 but in actual it is 3120.97 KW or 3.121 MW which is corrected above.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of brake power,fuel consumption\n",
+ "#intiation of all variables\n",
+ "# Chapter 10\n",
+ "import math\n",
+ "print\"Example 10.4, Page:389 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 4\")\n",
+ "m=0.25;#specific fuel consumption in kg/KWh\n",
+ "Pb_mep=1.5*1000;#brake mean effective pressure of each cylinder in Kpa\n",
+ "N=100;#engine rpm\n",
+ "D=85*10**-2;#bore of cylinder in m\n",
+ "L=220*10**-2;#stroke in m\n",
+ "C=43*10**3;#calorific value of diesel in KJ/kg\n",
+ "A=math.pi*D**2/4;\n",
+ "BP=Pb_mep*L*A*N/60\n",
+ "print(\"brake power of engine(BP) in MW=\"),round(BP,2)\n",
+ "print(\"so brake power is 3.121 MW\")\n",
+ "print(\"The fuel consumption in kg/hr(m)=m*BP in kg/hr\")\n",
+ "m=m*BP\n",
+ "print(\"In order to find out brake thermal efficiency the heat input from fuel per second is required.\")\n",
+ "print(\"heat from fuel(Q)in KJ/s\")\n",
+ "print(\"Q=m*C/3600\")\n",
+ "Q=m*C/3600\n",
+ "print(\"energy to brake power=3120.97 KW\")\n",
+ "n=BP/Q\n",
+ "print(\"brake thermal efficiency(n)=\"),round(n,2)\n",
+ "print(\"in percentage\"),round(n*100,2)\n",
+ "print(\"so fuel consumption=780.24 kg/hr,brake thermal efficiency=33.49%\")\n",
+ "print(\"NOTE=>In book,it is given that brake power in MW is 31.21 but in actual it is 3120.97 KW or 3.121 MW which is corrected above.\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 10.5;pg no: 389"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 10.5, Page:389 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 5\n",
+ "brake thermal efficiency(n)=3600/(m*C) 0.33\n",
+ "in percentage 33.49\n",
+ "brake power(BP)in KW\n",
+ "BP= 226.19\n",
+ "brake specific fuel consumption,m=mf/BP\n",
+ "so mf=m*BP in kg/hr\n",
+ "air consumption(ma)from given air fuel ratio=k*mf in kg/hr\n",
+ "ma in kg/min\n",
+ "using perfect gas equation,\n",
+ "P*Va=ma*R*T\n",
+ "sa Va=ma*R*T/P in m^3/min\n",
+ "swept volume(Vs)=%pi*D^2*L/4 in m^3\n",
+ "volumetric efficiency,n_vol=Va/(Vs*(N/2)*no. of cylinder) 1.87\n",
+ "in percentage 186.55\n",
+ "NOTE=>In this question,while calculating swept volume in book,values of D=0.30 m and L=0.4 m is taken which is wrong.Hence above solution is solve taking right values given in book which is D=0.20 m and L=0.3 m,so the volumetric efficiency vary accordingly.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of brake thermal efficiency,brake power,volumetric efficiency\n",
+ "#intiation of all variables\n",
+ "# Chapter 10\n",
+ "import math\n",
+ "print\"Example 10.5, Page:389 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 5\")\n",
+ "Pb_mep=6*10**5;#brake mean effective pressure in pa\n",
+ "N=600;#engine rpm\n",
+ "m=0.25;#specific fuel consumption in kg/KWh\n",
+ "D=20*10**-2;#bore of cylinder in m\n",
+ "L=30*10**-2;#stroke in m\n",
+ "k=26;#air to fuel ratio\n",
+ "C=43*10**3;#calorific value in KJ/kg\n",
+ "R=0.287;#gas constant in KJ/kg K\n",
+ "T=(27+273);#ambient temperature in K\n",
+ "P=1*10**2;#ambient pressure in Kpa\n",
+ "n=3600/(m*C)\n",
+ "print(\"brake thermal efficiency(n)=3600/(m*C)\"),round(n,2)\n",
+ "print(\"in percentage\"),round(n*100,2)\n",
+ "print(\"brake power(BP)in KW\")\n",
+ "A=math.pi*D**2/4;\n",
+ "BP=4*Pb_mep*L*A*N/60000\n",
+ "print(\"BP=\"),round(BP,2)\n",
+ "print(\"brake specific fuel consumption,m=mf/BP\")\n",
+ "print(\"so mf=m*BP in kg/hr\")\n",
+ "mf=m*BP\n",
+ "print(\"air consumption(ma)from given air fuel ratio=k*mf in kg/hr\")\n",
+ "ma=k*mf\n",
+ "print(\"ma in kg/min\")\n",
+ "ma=ma/60\n",
+ "print(\"using perfect gas equation,\")\n",
+ "print(\"P*Va=ma*R*T\")\n",
+ "print(\"sa Va=ma*R*T/P in m^3/min\")\n",
+ "Va=ma*R*T/P\n",
+ "print(\"swept volume(Vs)=%pi*D^2*L/4 in m^3\")\n",
+ "Vs=math.pi*D**2*L/4\n",
+ "n_vol=Va/(Vs*(N/2)*4)\n",
+ "print(\"volumetric efficiency,n_vol=Va/(Vs*(N/2)*no. of cylinder)\"),round(n_vol,2)\n",
+ "print(\"in percentage\"),round(n_vol*100,2)\n",
+ "print(\"NOTE=>In this question,while calculating swept volume in book,values of D=0.30 m and L=0.4 m is taken which is wrong.Hence above solution is solve taking right values given in book which is D=0.20 m and L=0.3 m,so the volumetric efficiency vary accordingly.\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 10.6;pg no: 390"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 10.6, Page:390 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 6\n",
+ "let the bore diameter be (D) m\n",
+ "piston speed(V)=2*L*N\n",
+ "so L=V/(2*N) in m\n",
+ "volumetric efficiency,n_vol=air sucked/(swept volume * no. of cylinder)\n",
+ "so air sucked/D^2=n_vol*(%pi*L/4)*N*2 in m^3/min\n",
+ "so air sucked =274.78*D^2 m^3/min\n",
+ "air requirement(ma),kg/min=A/F ratio*fuel consumption per min\n",
+ "so ma=r*m in kg/min\n",
+ "using perfect gas equation,P*Va=ma*R*T\n",
+ "so Va=ma*R*T/P in m^3/min\n",
+ "ideally,air sucked=Va\n",
+ "so 274.78*D^2=0.906\n",
+ "D=sqrt(0.906/274.78) in m\n",
+ "indicated power(IP)=P_imep*L*A*N*no.of cylinders in KW\n",
+ "brake power=indicated power*mechanical efficiency\n",
+ "BP=IP*n_mech in KW 10.35\n",
+ "so brake power=10.34 KW\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of brake power\n",
+ "#intiation of all variables\n",
+ "# Chapter 9\n",
+ "import math\n",
+ "print\"Example 10.6, Page:390 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 6\")\n",
+ "N=3000;#engine rpm\n",
+ "m=5;#fuel consumption in litre/hr\n",
+ "r=19;#air-fuel ratio\n",
+ "sg=0.7;#specific gravity of fuel\n",
+ "V=500;#piston speed in m/min\n",
+ "P_imep=6*10**5;#indicated mean effective pressure in pa\n",
+ "P=1.013*10**5;#ambient pressure in pa\n",
+ "T=(15+273);#ambient temperature in K\n",
+ "n_vol=0.7;#volumetric efficiency \n",
+ "n_mech=0.8;#mechanical efficiency\n",
+ "R=0.287;#gas constant for gas in KJ/kg K\n",
+ "print(\"let the bore diameter be (D) m\")\n",
+ "print(\"piston speed(V)=2*L*N\")\n",
+ "print(\"so L=V/(2*N) in m\")\n",
+ "L=V/(2*N)\n",
+ "L=0.0833;#approx.\n",
+ "print(\"volumetric efficiency,n_vol=air sucked/(swept volume * no. of cylinder)\")\n",
+ "print(\"so air sucked/D^2=n_vol*(%pi*L/4)*N*2 in m^3/min\")\n",
+ "n_vol*(math.pi*L/4)*N*2\n",
+ "print(\"so air sucked =274.78*D^2 m^3/min\")\n",
+ "print(\"air requirement(ma),kg/min=A/F ratio*fuel consumption per min\")\n",
+ "print(\"so ma=r*m in kg/min\")\n",
+ "ma=r*m*sg/60\n",
+ "print(\"using perfect gas equation,P*Va=ma*R*T\")\n",
+ "print(\"so Va=ma*R*T/P in m^3/min\")\n",
+ "Va=ma*R*T*1000/P \n",
+ "print(\"ideally,air sucked=Va\")\n",
+ "print(\"so 274.78*D^2=0.906\")\n",
+ "print(\"D=sqrt(0.906/274.78) in m\")\n",
+ "D=math.sqrt(0.906/274.78) \n",
+ "print(\"indicated power(IP)=P_imep*L*A*N*no.of cylinders in KW\")\n",
+ "IP=P_imep*L*(math.pi*D**2/4)*(N/60)*2/1000\n",
+ "print(\"brake power=indicated power*mechanical efficiency\")\n",
+ "BP=IP*n_mech \n",
+ "print(\"BP=IP*n_mech in KW\"),round(BP,2)\n",
+ "print(\"so brake power=10.34 KW\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 10.7;pg no: 391"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 10.7, Page:391 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 7\n",
+ "After switching off fuel supply the capacity of motor required to run engine will be the friction power required at this speed of engine.\n",
+ "friction power(FP)=5 KW\n",
+ "brake power(BP) in KW= 30.82\n",
+ "indicated power(IP) in KW= 35.82\n",
+ "mechanical efficiency(n_mech)= 0.86\n",
+ "in percentage 86.04\n",
+ "brake specific fuel consumption(bsfc)=specific fuel consumption/brake power in kg/KW hr= 0.29\n",
+ "brake thermal efficiency(n_bte)= 0.29\n",
+ "in percentage 28.67\n",
+ "also,mechanical efficiency(n_mech)=brake thermal efficiency/indicated thermal efficiency\n",
+ "indicated thermal efficiency(n_ite)= 0.33\n",
+ "in percentage 33.32\n",
+ "indicated power(IP)=P_imep*L*A*N\n",
+ "so P_imep in Kpa= 76.01\n",
+ "Also,mechanical efficiency=P_bmep/P_imep\n",
+ "so P_bmep in Kpa= 65.4\n",
+ "brake power=30.82 KW\n",
+ "indicated power=35.82 KW\n",
+ "mechanical efficiency=86.04%\n",
+ "brake thermal efficiency=28.67%\n",
+ "indicated thermal efficiency=33.32%\n",
+ "brake mean effective pressure=65.39 Kpa\n",
+ "indicated mean effective pressure=76.01 Kpa\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of power and efficiency\n",
+ "#intiation of all variables\n",
+ "# Chapter 10\n",
+ "import math\n",
+ "print\"Example 10.7, Page:391 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 7\")\n",
+ "M=20;#load on dynamometer in kg\n",
+ "r=50*10**-2;#radius in m\n",
+ "N=3000;#speed of rotation in rpm\n",
+ "D=20*10**-2;#bore in m\n",
+ "L=30*10**-2;#stroke in m\n",
+ "m=0.15;#fuel supplying rate in kg/min\n",
+ "C=43;#calorific value of fuel in MJ/kg\n",
+ "FP=5;#friction power in KW\n",
+ "g=9.81;#acceleration due to gravity in m/s^2\n",
+ "print(\"After switching off fuel supply the capacity of motor required to run engine will be the friction power required at this speed of engine.\")\n",
+ "print(\"friction power(FP)=5 KW\")\n",
+ "BP=2*math.pi*N*(M*g*r)*10**-3/60\n",
+ "print(\"brake power(BP) in KW=\"),round(BP,2)\n",
+ "IP=BP+FP\n",
+ "print(\"indicated power(IP) in KW=\"),round(IP,2)\n",
+ "n_mech=BP/IP\n",
+ "print(\"mechanical efficiency(n_mech)=\"),round(n_mech,2)\n",
+ "print(\"in percentage\"),round(n_mech*100,2)\n",
+ "bsfc=m*60/BP\n",
+ "print(\"brake specific fuel consumption(bsfc)=specific fuel consumption/brake power in kg/KW hr=\"),round(bsfc,2)\n",
+ "n_bte=3600/(bsfc*C*1000)\n",
+ "print(\"brake thermal efficiency(n_bte)=\"),round(n_bte,2)\n",
+ "print(\"in percentage\"),round(n_bte*100,2)\n",
+ "print(\"also,mechanical efficiency(n_mech)=brake thermal efficiency/indicated thermal efficiency\")\n",
+ "n_ite=n_bte/n_mech\n",
+ "print(\"indicated thermal efficiency(n_ite)=\"),round(n_ite,2)\n",
+ "print(\"in percentage\"),round(n_ite*100,2)\n",
+ "print(\"indicated power(IP)=P_imep*L*A*N\")\n",
+ "P_imep=IP/(L*(math.pi*D**2/4)*N/60)\n",
+ "print(\"so P_imep in Kpa=\"),round(P_imep,2)\n",
+ "print(\"Also,mechanical efficiency=P_bmep/P_imep\")\n",
+ "n_mech=0.8604;#mechanical efficiency\n",
+ "P_bmep=P_imep*n_mech\n",
+ "print(\"so P_bmep in Kpa=\"),round(P_bmep,2)\n",
+ "print(\"brake power=30.82 KW\")\n",
+ "print(\"indicated power=35.82 KW\")\n",
+ "print(\"mechanical efficiency=86.04%\")\n",
+ "print(\"brake thermal efficiency=28.67%\")\n",
+ "print(\"indicated thermal efficiency=33.32%\")\n",
+ "print(\"brake mean effective pressure=65.39 Kpa\")\n",
+ "print(\"indicated mean effective pressure=76.01 Kpa\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 10.8;pg no: 392"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 10.8, Page:392 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 8\n",
+ "indicated power(IP) in KW= 282.74\n",
+ "mechanical efficiency(n_mech)=brake power/indicated power\n",
+ "so n_mech= 0.88\n",
+ "in percentage 88.42\n",
+ "brake specific fuel consumption(bsfc)=m*60/BP in kg/KW hr\n",
+ "brake thermal efficiency(n_bte)= 0.35\n",
+ "in percentage 34.88\n",
+ "swept volume(Vs)=%pi*D^2*L/4 in m^3\n",
+ "mass of air corresponding to above swept volume,using perfect gas equation\n",
+ "P*Vs=ma*R*T\n",
+ "so ma=(P*Vs)/(R*T) in kg\n",
+ "volumetric effeciency(n_vol)=mass of air taken per minute/mass corresponding to swept volume per minute\n",
+ "so mass of air taken per minute in kg/min \n",
+ "mass corresponding to swept volume per minute in kg/min\n",
+ "so volumetric efficiency 0.8333\n",
+ "in percentage 83.3333\n",
+ "so indicated power =282.74 KW,mechanical efficiency=88.42%\n",
+ "brake thermal efficiency=34.88%,volumetric efficiency=83.33%\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of brake thermal efficiency,volumetric effeciency\n",
+ "#intiation of all variables\n",
+ "# Chapter 10\n",
+ "import math\n",
+ "print\"Example 10.8, Page:392 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 8\")\n",
+ "N=300.;#engine rpm\n",
+ "BP=250.;#brake power in KW\n",
+ "D=30.*10**-2;#bore in m\n",
+ "L=25.*10**-2;#stroke in m\n",
+ "m=1.;#fuel consumption in kg/min\n",
+ "r=10.;#airfuel ratio \n",
+ "P_imep=0.8;#indicated mean effective pressure in pa\n",
+ "C=43.*10**3;#calorific value of fuel in KJ/kg\n",
+ "P=1.013*10**5;#ambient pressure in K\n",
+ "R=0.287;#gas constant in KJ/kg K\n",
+ "T=(27.+273.);#ambient temperature in K\n",
+ "IP=P_imep*L*(math.pi*D**2/4)*N*4*10**3/60\n",
+ "print(\"indicated power(IP) in KW=\"),round(IP,2)\n",
+ "print(\"mechanical efficiency(n_mech)=brake power/indicated power\")\n",
+ "n_mech=BP/IP\n",
+ "print(\"so n_mech=\"),round(n_mech,2)\n",
+ "print(\"in percentage \"),round(n_mech*100,2)\n",
+ "print(\"brake specific fuel consumption(bsfc)=m*60/BP in kg/KW hr\")\n",
+ "bsfc=m*60./BP\n",
+ "n_bte=3600./(bsfc*C)\n",
+ "print(\"brake thermal efficiency(n_bte)=\"),round(n_bte,2)\n",
+ "print(\"in percentage\"),round(n_bte*100,2)\n",
+ "print(\"swept volume(Vs)=%pi*D^2*L/4 in m^3\")\n",
+ "Vs=math.pi*D**2*L/4\n",
+ "print(\"mass of air corresponding to above swept volume,using perfect gas equation\")\n",
+ "print(\"P*Vs=ma*R*T\")\n",
+ "print(\"so ma=(P*Vs)/(R*T) in kg\")\n",
+ "ma=(P*Vs)/(R*T*1000) \n",
+ "ma=0.02;#approx.\n",
+ "print(\"volumetric effeciency(n_vol)=mass of air taken per minute/mass corresponding to swept volume per minute\")\n",
+ "print(\"so mass of air taken per minute in kg/min \")\n",
+ "1*10\n",
+ "print(\"mass corresponding to swept volume per minute in kg/min\")\n",
+ "ma*4*N/2\n",
+ "print(\"so volumetric efficiency \"),round(10./12.,4)\n",
+ "print(\"in percentage\"),round((10./12.)*100.,4)\n",
+ "print(\"so indicated power =282.74 KW,mechanical efficiency=88.42%\")\n",
+ "print(\"brake thermal efficiency=34.88%,volumetric efficiency=83.33%\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 10.9;pg no: 393"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 10.9, Page:393 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 9\n",
+ "indicated mean effective pressure(P_imeb)=h*k in Kpa\n",
+ "indicated power(IP)=P_imeb*L*A*N/2 in KW 9.375\n",
+ "brake power(BP)=2*%pi*N*T in KW 4.62\n",
+ "mechanical efficiency(n_mech)= 0.49\n",
+ "in percentage 49.31\n",
+ "so indicated power=9.375 KW\n",
+ "brake power=4.62 KW\n",
+ "mechanical efficiency=49.28%\n",
+ "energy liberated from fuel(Ef)=C*m/60 in KJ/s\n",
+ "energy available as brake power(BP)=4.62 KW\n",
+ "energy to coolant(Ec)=(mw/M)*Cw*(T2-T1) in KW\n",
+ "energy carried by exhaust gases(Eg)=30 KJ/s\n",
+ "unaccounted energy loss in KW= 34.75\n",
+ "NOTE=>overall energy balance sheet is attached as jpg file with this code.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of indicated power,brake power,mechanical efficiency\n",
+ "#intiation of all variables\n",
+ "# Chapter 10\n",
+ "import math\n",
+ "print\"Example 10.9, Page:393 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 9\")\n",
+ "h=10.;#height of indicator diagram in mm\n",
+ "k=25.;#indicator constant in KN/m^2 per mm\n",
+ "N=300.;#engine rpm\n",
+ "Vs=1.5*10**-2;#swept volume in m^3\n",
+ "M=60.;#effective brake load upon dynamometer in kg\n",
+ "r=50.*10**-2;#effective brake drum radius in m\n",
+ "m=0.12;#fuel consumption in kg/min\n",
+ "C=42.*10**3;#calorific value in KJ/kg\n",
+ "mw=6.;#circulating water rate in kg/min\n",
+ "T1=35.;#cooling water entering temperature in degree celcius\n",
+ "T2=70.;#cooling water leaving temperature in degree celcius\n",
+ "Eg=30.;#exhaust gases leaving energy in KJ/s\n",
+ "Cw=4.18;#specific heat of water in KJ/kg K\n",
+ "g=9.81;#accelaration due to gravity in m/s^2\n",
+ "print(\"indicated mean effective pressure(P_imeb)=h*k in Kpa\")\n",
+ "P_imeb=h*k\n",
+ "IP=P_imeb*Vs*N/(2*60)\n",
+ "print(\"indicated power(IP)=P_imeb*L*A*N/2 in KW\") ,round(IP,3)\n",
+ "BP=2*math.pi*N*(M*g*r*10**-3)/(2*60)\n",
+ "print(\"brake power(BP)=2*%pi*N*T in KW\"),round(BP,2)\n",
+ "n_mech=BP/IP\n",
+ "print(\"mechanical efficiency(n_mech)=\"),round(n_mech,2)\n",
+ "print(\"in percentage\"),round(n_mech*100,2)\n",
+ "print(\"so indicated power=9.375 KW\")\n",
+ "print(\"brake power=4.62 KW\")\n",
+ "print(\"mechanical efficiency=49.28%\")\n",
+ "print(\"energy liberated from fuel(Ef)=C*m/60 in KJ/s\")\n",
+ "Ef=C*m/60\n",
+ "print(\"energy available as brake power(BP)=4.62 KW\")\n",
+ "print(\"energy to coolant(Ec)=(mw/M)*Cw*(T2-T1) in KW\")\n",
+ "Ec=(mw/M)*Cw*(T2-T1)\n",
+ "print(\"energy carried by exhaust gases(Eg)=30 KJ/s\")\n",
+ "Ef-BP-Ec-Eg\n",
+ "print(\"unaccounted energy loss in KW=\"),round(Ef-BP-Ec-Eg,2)\n",
+ "print(\"NOTE=>overall energy balance sheet is attached as jpg file with this code.\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 10.10;pg no: 394"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 10.10, Page:394 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 10\n",
+ "brake power(BP)=2*%pi*N*T in KW 47.12\n",
+ "so brake power=47.124 KW\n",
+ "brake specific fuel consumption(bsfc) in kg/KW hr= 0.34\n",
+ "indicated power(IP) in Kw= 52.36\n",
+ "indicated thermal efficiency(n_ite)= 0.28\n",
+ "in percentage 28.05\n",
+ "so indicated thermal efficiency=28.05%\n",
+ "heat available from fuel(Qf)=(m/mw)*C in KJ/min 11200.0\n",
+ "energy consumed as brake power(BP) in KJ/min= 2827.43\n",
+ "energy carried by cooling water(Qw) in KJ/min= 1442.1\n",
+ "energy carried by exhaust gases(Qg) in KJ/min= 4786.83\n",
+ "unaccounted energy loss in KJ/min 2143.63\n",
+ "NOTE=>Heat balance sheet on per minute basis is attached as jpg file with this code.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of brake power,brake specific fuel consumption,indicated thermal efficiency\n",
+ "#intiation of all variables\n",
+ "# Chapter 10\n",
+ "import math\n",
+ "print\"Example 10.10, Page:394 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 10\")\n",
+ "m=4.;#mass of fuel consumed in kg\n",
+ "N=1500.;#engine rpm\n",
+ "mw=15.;#water circulation rate in kg/min\n",
+ "T1=27.;#cooling water inlet temperature in degree celcius\n",
+ "T2=50.;#cooling water outlet temperature in degree celcius\n",
+ "ma=150.;#mass of air consumed in kg\n",
+ "T_exhaust=400.;#exhaust temperature in degree celcius\n",
+ "T_atm=27.;#atmospheric temperature in degree celcius\n",
+ "Cg=1.25;#mean specific heat of exhaust gases in KJ/kg K\n",
+ "n_mech=0.9;#mechanical efficiency\n",
+ "T=300.*10**-3;#brake torque in N\n",
+ "C=42.*10**3;#calorific value in KJ/kg\n",
+ "Cw=4.18;#specific heat of water in KJ/kg K\n",
+ "BP=2.*math.pi*N*T/60\n",
+ "print(\"brake power(BP)=2*%pi*N*T in KW\"),round(BP,2)\n",
+ "print(\"so brake power=47.124 KW\")\n",
+ "bsfc=m*60/(mw*BP)\n",
+ "print(\"brake specific fuel consumption(bsfc) in kg/KW hr=\"),round(bsfc,2)\n",
+ "IP=BP/n_mech\n",
+ "print(\"indicated power(IP) in Kw=\"),round(IP,2)\n",
+ "n_ite=IP*mw*60/(m*C)\n",
+ "print(\"indicated thermal efficiency(n_ite)=\"),round(n_ite,2)\n",
+ "print(\"in percentage\"),round(n_ite*100,2)\n",
+ "print(\"so indicated thermal efficiency=28.05%\")\n",
+ "Qf=(m/mw)*C\n",
+ "print(\"heat available from fuel(Qf)=(m/mw)*C in KJ/min\"),round(Qf,2)\n",
+ "BP=BP*60 \n",
+ "print(\"energy consumed as brake power(BP) in KJ/min=\"),round(BP,2)\n",
+ "Qw=mw*Cw*(T2-T1)\n",
+ "print(\"energy carried by cooling water(Qw) in KJ/min=\"),round(Qw,2)\n",
+ "Qg=(ma+m)*Cg*(T_exhaust-T_atm)/mw\n",
+ "print(\"energy carried by exhaust gases(Qg) in KJ/min=\"),round(Qg,2)\n",
+ "Qf-(BP+Qw+Qg)\n",
+ "print(\"unaccounted energy loss in KJ/min\"),round(Qf-(BP+Qw+Qg),2)\n",
+ "print(\"NOTE=>Heat balance sheet on per minute basis is attached as jpg file with this code.\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 10.11;pg no: 395"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 10.11, Page:395 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 11\n",
+ "indicated power of 1st cylinder=BP-BP1 in KW\n",
+ "indicated power of 2nd cylinder=BP-BP2 in KW\n",
+ "indicated power of 3rd cylinder=BP-BP3 in KW\n",
+ "indicated power of 4th cylinder=BP-BP4 in KW\n",
+ "indicated power of 5th cylinder=BP-BP5 in KW\n",
+ "indicated power of 6th cylinder=BP-BP6 in KW\n",
+ " total indicated power(IP)in KW= 61.9\n",
+ "mechanical efficiency(n_mech)= 0.81\n",
+ "in percentage 80.78\n",
+ "so indicated power=61.9 KW\n",
+ "mechanical efficiency=80.77%\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of indicated power and mechanical efficiency\n",
+ "#intiation of all variables\n",
+ "# Chapter 10\n",
+ "import math\n",
+ "print\"Example 10.11, Page:395 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 11\")\n",
+ "BP=50.;#brake power output at full load in KW\n",
+ "BP1=40.1;#brake power output of 1st cylinder in KW\n",
+ "BP2=39.5;#brake power output of 2nd cylinder in KW\n",
+ "BP3=39.1;#brake power output of 3rd cylinder in KW\n",
+ "BP4=39.6;#brake power output of 4th cylinder in KW\n",
+ "BP5=39.8;#brake power output of 5th cylinder in KW\n",
+ "BP6=40.;#brake power output of 6th cylinder in KW\n",
+ "print(\"indicated power of 1st cylinder=BP-BP1 in KW\")\n",
+ "BP-BP1\n",
+ "print(\"indicated power of 2nd cylinder=BP-BP2 in KW\")\n",
+ "BP-BP2\n",
+ "print(\"indicated power of 3rd cylinder=BP-BP3 in KW\")\n",
+ "BP-BP3\n",
+ "print(\"indicated power of 4th cylinder=BP-BP4 in KW\")\n",
+ "BP-BP4\n",
+ "print(\"indicated power of 5th cylinder=BP-BP5 in KW\")\n",
+ "BP-BP5\n",
+ "print(\"indicated power of 6th cylinder=BP-BP6 in KW\")\n",
+ "BP-BP6\n",
+ "IP=9.9+10.5+10.9+10.4+10.2+10\n",
+ "print(\" total indicated power(IP)in KW=\"),round(IP,2)\n",
+ "n_mech=BP/IP\n",
+ "print(\"mechanical efficiency(n_mech)=\"),round(n_mech,2)\n",
+ "print(\"in percentage\"),round(n_mech*100,2)\n",
+ "print(\"so indicated power=61.9 KW\")\n",
+ "print(\"mechanical efficiency=80.77%\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 10.12;pg no: 396"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 10.12, Page:396 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 12\n",
+ "brake power output of engine(BP) in KW= 19.63\n",
+ "brake power when cylinder 1 is cut(BP1) in KW= 13.74\n",
+ "so indicated power of first cylinder(IP1) in KW= 5.89\n",
+ "brake power when cylinder 2 is cut(BP2) in KW= 14.14\n",
+ "so indicated power of second cylinder(IP2) in KW= 5.5\n",
+ "brake power when cylinder 3 is cut(BP3) in KW= 14.29\n",
+ "so indicated power of third cylinder(IP3) in KW= 5.34\n",
+ "brake power when cylinder 4 is cut(BP4) in KW= 13.35\n",
+ "so indicated power of fourth cylinder(IP4) in KW= 6.28\n",
+ "now total indicated power(IP) in KW 23.01\n",
+ "engine mechanical efficiency(n_mech)= 0.85\n",
+ "in percentage 85.32\n",
+ "so BP=19.63 KW,IP=23 KW,n_mech=83.35%\n",
+ "heat liberated by fuel(Qf)=m*C in KJ/min 8127.0\n",
+ "heat carried by exhaust gases(Qg) in KJ/min= 1436.02\n",
+ "heat carried by cooling water(Qw) in KJ/min= 1730.52\n",
+ "energy to brake power(BP) in KJ/min= 1177.8\n",
+ "unaccounted losses in KJ/min 3782.66\n",
+ "NOTE=>Heat balance sheet on per minute basis is attached as jpg file with this code. \n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of brake power,indicated power,heat balance sheet\n",
+ "#intiation of all variables\n",
+ "# Chapter 9\n",
+ "import math\n",
+ "print\"Example 10.12, Page:396 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 12\")\n",
+ "N=1500.;#engine rpm at full load\n",
+ "F=250.;#brake load at full load in N\n",
+ "F1=175.;#brake reading 1 in N\n",
+ "F2=180.;#brake reading 2 in N\n",
+ "F3=182.;#brake reading 3 in N\n",
+ "F4=170.;#brake reading 4 in N\n",
+ "r=50.*10**-2;#brake drum radius in m\n",
+ "m=0.189;#fuel consumption rate in kg/min\n",
+ "C=43.*10**3;#fuel calorific value in KJ/kg\n",
+ "k=12.;#air to fuel ratio\n",
+ "T_exhaust=600.;#exhaust gas temperature in degree celcius\n",
+ "mw=18.;#cooling water flow rate in kg/min\n",
+ "T1=27.;#cooling water entering temperature in degree celcius\n",
+ "T2=50.;#cooling water leaving temperature in degree celcius\n",
+ "T_atm=27.;#atmospheric air temperature\n",
+ "Cg=1.02;#specific heat of exhaust gas in KJ/kg K\n",
+ "Cw=4.18;#specific heat of water in KJ/kg K\n",
+ "BP=2.*math.pi*N*F*r*10**-3/60.\n",
+ "print(\"brake power output of engine(BP) in KW=\"),round(BP,2)\n",
+ "BP1=2.*math.pi*N*F1*r*10**-3/60.\n",
+ "print(\"brake power when cylinder 1 is cut(BP1) in KW=\"),round(BP1,2)\n",
+ "IP1=BP-BP1\n",
+ "print(\"so indicated power of first cylinder(IP1) in KW=\"),round(IP1,2)\n",
+ "BP2=2.*math.pi*N*F2*r*10**-3/60.\n",
+ "print(\"brake power when cylinder 2 is cut(BP2) in KW=\"),round(BP2,2)\n",
+ "IP2=BP-BP2\n",
+ "print(\"so indicated power of second cylinder(IP2) in KW=\"),round(IP2,2)\n",
+ "BP3=2.*math.pi*N*F3*r*10**-3/60.\n",
+ "print(\"brake power when cylinder 3 is cut(BP3) in KW=\"),round(BP3,2)\n",
+ "IP3=BP-BP3\n",
+ "print(\"so indicated power of third cylinder(IP3) in KW=\"),round(IP3,2)\n",
+ "BP4=2.*math.pi*N*F4*r*10**-3/60.\n",
+ "print(\"brake power when cylinder 4 is cut(BP4) in KW=\"),round(BP4,2)\n",
+ "IP4=BP-BP4\n",
+ "print(\"so indicated power of fourth cylinder(IP4) in KW=\"),round(IP4,2)\n",
+ "IP=IP1+IP2+IP3+IP4\n",
+ "print(\"now total indicated power(IP) in KW\"),round(IP,2)\n",
+ "n_mech=BP/IP\n",
+ "print(\"engine mechanical efficiency(n_mech)=\"),round(n_mech,2)\n",
+ "print(\"in percentage\"),round(n_mech*100,2)\n",
+ "print(\"so BP=19.63 KW,IP=23 KW,n_mech=83.35%\")\n",
+ "Qf=m*C\n",
+ "print(\"heat liberated by fuel(Qf)=m*C in KJ/min\"),round(Qf,2)\n",
+ "Qg=(k+1)*m*Cg*(T_exhaust-T_atm)\n",
+ "print(\"heat carried by exhaust gases(Qg) in KJ/min=\"),round(Qg,2)\n",
+ "Qw=mw*Cw*(T2-T1)\n",
+ "print(\"heat carried by cooling water(Qw) in KJ/min=\"),round(Qw,2)\n",
+ "BP=19.63*60\n",
+ "print(\"energy to brake power(BP) in KJ/min=\"),round(19.63*60,2)\n",
+ "Qf-(Qg+Qw+BP)\n",
+ "print(\"unaccounted losses in KJ/min\"),round(Qf-(Qg+Qw+BP),2)\n",
+ "print(\"NOTE=>Heat balance sheet on per minute basis is attached as jpg file with this code. \")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 10.13;pg no: 397"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 10.13, Page:397 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 10 Example 13\n",
+ "brake power(BP)=2*%pi*N*T in KW\n",
+ "indicated power(IP)=(mep*L*A*N)/60000 in KW\n",
+ "A> heat added(Q)=m*C/3600 in KJ/s 52.36\n",
+ "or Q in KJ/min\n",
+ "thermal efficiency(n_th)= 0.27\n",
+ "in percentage 26.85\n",
+ "B> heat equivalent of brake power(BP) in KJ/min= 659.76\n",
+ "C> heat loss to cooling water(Qw)=mw*Cpw*(T2-T1) in KJ/min\n",
+ "heat carried by exhaust gases=heat carried by steam in exhaust gases+heat carried by fuel gases(dry gases) in exhaust gases\n",
+ "mass of exhaust gases(mg)=mass of air+mass of fuel in kg/min\n",
+ "mg=(ma+m)/60\n",
+ "mass of steam in exhaust gases in kg/min\n",
+ "mass of dry exhaust gases in kg/min\n",
+ "D> heat carried by steam in exhaust in KJ/min 299.86\n",
+ "E> heat carried by fuel gases(dry gases) in exhaust gases(Qg) in KJ/min 782.64\n",
+ "F> unaccounted loss=A-B-C-D-E in KJ/min 537.4\n",
+ "NOTE># on per minute basis is attached as jpg file with this code.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of thermal efficiency and heat balance sheet\n",
+ "#intiation of all variables\n",
+ "# Chapter 10\n",
+ "import math\n",
+ "print\"Example 10.13, Page:397 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 10 Example 13\")\n",
+ "D=20.*10**-2;#cylinder diameter in m\n",
+ "L=28.*10**-2;#stroke in m\n",
+ "m=4.22;#mass of fuel used in kg\n",
+ "C=44670.;#calorific value of fuel in KJ/kg\n",
+ "N=21000./60.;#engine rpm\n",
+ "mep=2.74*10**5;#mean effective pressure in pa\n",
+ "F=600.;#net brake load applied to a drum of 100 cm diameter in N\n",
+ "r=50.*10**-2;#brake drum radius in m\n",
+ "mw=495.;#total mass of cooling water in kg\n",
+ "T1=13.;#cooling water inlet temperature in degree celcius\n",
+ "T2=38.;#cooling water outlet temperature in degree celcius\n",
+ "ma=135.;#mass of air used in kg\n",
+ "T_air=20.;#temperature of air in test room in degree celcius\n",
+ "T_exhaust=370.;#temperature of exhaust gases in degree celcius\n",
+ "Cp_gases=1.005;#specific heat of gases in KJ/kg K\n",
+ "Cp_steam=2.093;#specific heat of steam at atmospheric pressure in KJ/kg K\n",
+ "Cpw=4.18;#specific heat of water in KJ/kg K\n",
+ "print(\"brake power(BP)=2*%pi*N*T in KW\")\n",
+ "BP=2*math.pi*N*F*r/60000\n",
+ "print(\"indicated power(IP)=(mep*L*A*N)/60000 in KW\")\n",
+ "IP=(mep*L*(math.pi*D**2/4)*N)/60000\n",
+ "Q=m*C/3600\n",
+ "print(\"A> heat added(Q)=m*C/3600 in KJ/s\"),round(Q,2)\n",
+ "print(\"or Q in KJ/min\")\n",
+ "Q=Q*60\n",
+ "Q=52.36;#heat added in KJ/s\n",
+ "n_th=IP/Q\n",
+ "print(\"thermal efficiency(n_th)= \"),round(n_th,2)\n",
+ "print(\"in percentage\"),round(n_th*100,2)\n",
+ "BP=BP*60\n",
+ "print(\"B> heat equivalent of brake power(BP) in KJ/min= \"),round(10.996*60,2)\n",
+ "print(\"C> heat loss to cooling water(Qw)=mw*Cpw*(T2-T1) in KJ/min\")\n",
+ "Qw=mw*Cpw*(T2-T1)/60\n",
+ "print(\"heat carried by exhaust gases=heat carried by steam in exhaust gases+heat carried by fuel gases(dry gases) in exhaust gases\")\n",
+ "print(\"mass of exhaust gases(mg)=mass of air+mass of fuel in kg/min\")\n",
+ "print(\"mg=(ma+m)/60\")\n",
+ "mg=(ma+m)/60\n",
+ "print(\"mass of steam in exhaust gases in kg/min\")\n",
+ "9*(0.15*m/60)\n",
+ "print(\"mass of dry exhaust gases in kg/min\")\n",
+ "mg-0.095\n",
+ "0.095*(Cpw*(100-T_air)+2256.9+Cp_steam*(T_exhaust-100))\n",
+ "print(\"D> heat carried by steam in exhaust in KJ/min\"),round(0.095*(Cpw*(100-T_air)+2256.9+Cp_steam*(T_exhaust-100)),2)\n",
+ "Qg=2.225*Cp_gases*(T_exhaust-T_air)\n",
+ "print(\"E> heat carried by fuel gases(dry gases) in exhaust gases(Qg) in KJ/min\"),round(Qg,2)\n",
+ "print(\"F> unaccounted loss=A-B-C-D-E in KJ/min\"),round(3141.79-659.76-862.13-299.86-782.64,2)\n",
+ "print(\"NOTE># on per minute basis is attached as jpg file with this code.\")\n"
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter11_3.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter11_3.ipynb
new file mode 100644
index 00000000..31f593f0
--- /dev/null
+++ b/_Engineering_Thermodynamics_by__O._Singh/chapter11_3.ipynb
@@ -0,0 +1,1309 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 11:Introduction to refrigeration and Air Conditioning"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.1;pg no: 435"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.1, Page:435 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 1\n",
+ "for refrigerator working on reversed carnot cycle.\n",
+ "Q1/T1=Q2/T2\n",
+ "so Q2=Q1*T2/T1 in KJ/min\n",
+ "and work input required,W in KJ/min\n",
+ "W=Q2-Q1 83.66\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of work input\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.1, Page:435 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 1\")\n",
+ "T1=(-16.+273.);#temperature of refrigerated space in K\n",
+ "T2=(27.+273.);#temperature of atmosphere in K\n",
+ "Q1=500.;#heat extracted from refrigerated space in KJ/min\n",
+ "print(\"for refrigerator working on reversed carnot cycle.\")\n",
+ "print(\"Q1/T1=Q2/T2\")\n",
+ "print(\"so Q2=Q1*T2/T1 in KJ/min\")\n",
+ "Q2=Q1*T2/T1\n",
+ "print(\"and work input required,W in KJ/min\")\n",
+ "W=Q2-Q1\n",
+ "print(\"W=Q2-Q1\"),round(W,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.2;pg no: 435"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.2, Page:435 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 2\n",
+ "refrigeration capacity or heat extraction rate(Q)in KJ/s\n",
+ "let the ice formation rate be m kg/s\n",
+ "heat to be removed from per kg of water for its transformation into ice(Q1)in KJ/kg.\n",
+ "ice formation rate(m)in kg=refrigeration capacity/heat removed for getting per kg of ice= 6.25\n",
+ "COP of refrigerator,=T1/(T2-T1)=refrigeration capacity/work done\n",
+ "also COP=Q/W\n",
+ "so W=Q/COP in KJ/s\n",
+ "HP required 643.62\n",
+ "NOTE=>In book,this question is solved by taking T1=-5 degree celcius,but according to question T1=-7 degree celcius so this question is correctly solved above by considering T1=-7 degree celcius.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of HP required\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.2, Page:435 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 2\")\n",
+ "Q=800.;#refrigeration capacity in tons\n",
+ "Q_latent=335.;#latent heat for ice formation from water in KJ/kg\n",
+ "T1=(-7.+273.);#temperature of reservoir 1 in K\n",
+ "T2=(27.+273.);#temperature of reservoir 2 in K\n",
+ "print(\"refrigeration capacity or heat extraction rate(Q)in KJ/s\")\n",
+ "Q=Q*3.5\n",
+ "print(\"let the ice formation rate be m kg/s\")\n",
+ "print(\"heat to be removed from per kg of water for its transformation into ice(Q1)in KJ/kg.\")\n",
+ "Q1=4.18*(27-0)+Q_latent\n",
+ "m=Q/Q1\n",
+ "print(\"ice formation rate(m)in kg=refrigeration capacity/heat removed for getting per kg of ice=\"),round(Q/Q1,2)\n",
+ "print(\"COP of refrigerator,=T1/(T2-T1)=refrigeration capacity/work done\")\n",
+ "COP=T1/(T2-T1)\n",
+ "print(\"also COP=Q/W\")\n",
+ "print(\"so W=Q/COP in KJ/s\")\n",
+ "W=Q/COP\n",
+ "W=W/0.7457\n",
+ "print(\"HP required\"),round(W/0.7457,2)\n",
+ "print(\"NOTE=>In book,this question is solved by taking T1=-5 degree celcius,but according to question T1=-7 degree celcius so this question is correctly solved above by considering T1=-7 degree celcius.\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.3;pg no: 436"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.3, Page:436 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 3\n",
+ "COP=T1/(T2-T1)=Q/W 1.56\n",
+ "equating,COP=T1/(T2-T1)\n",
+ "so temperature of surrounding(T2)in K\n",
+ "T2= 403.69\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of COP and temperature of surrounding\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.3, Page:436 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 3\")\n",
+ "T1=(-27+273);#temperature of refrigerator in K\n",
+ "W=3*.7457;#work input in KJ/s\n",
+ "Q=1*3.5;#refrigeration effect in KJ/s\n",
+ "COP=Q/W\n",
+ "print(\"COP=T1/(T2-T1)=Q/W\"),round(COP,2)\n",
+ "COP=1.56;#approx.\n",
+ "print(\"equating,COP=T1/(T2-T1)\")\n",
+ "print(\"so temperature of surrounding(T2)in K\")\n",
+ "T2=T1+(T1/COP)\n",
+ "print(\"T2=\"),round(T2,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.4;pg no: 436"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.4, Page:436 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 4\n",
+ "during process 1-2_a\n",
+ "p2/p1=(T2_a/T1)^(y/(y-1))\n",
+ "so T2_a=T1*(p2/p1)^((y-1)/y)in K\n",
+ "theoretical temperature after compression,T2_a=440.18 K\n",
+ "for compression process,\n",
+ "n1=(T2_a-T1)/(T2-T1)\n",
+ "so T2=T1+(T2_a-T1)/n1 in K\n",
+ "for expansion process,3-4_a\n",
+ "T4_a/T3=(p1/p2)^((y-1)/y)\n",
+ "so T4_a=T3*(p1/p2)^((y-1)/y) in K\n",
+ "n2=0.9=(T3-T4)/(T3-T4_a)\n",
+ "so T4=T3-(n2*(T3-T4_a))in K\n",
+ "so work during compression,W_C in KJ/s\n",
+ "W_C=m*Cp*(T2-T1)\n",
+ "work during expansion,W_T in KJ/s\n",
+ "W_T=m*Cp*(T3-T4)\n",
+ "refrigeration effect is realized during process,4-1.so refrigeration shall be,\n",
+ "Q_ref=m*Cp*(T1-T4) in KJ/s\n",
+ "Q_ref in ton 18.36\n",
+ "net work required(W)=W_C-W_T in KJ/s 111.59\n",
+ "COP= 0.58\n",
+ "so refrigeration capacity=18.36 ton or 64.26 KJ/s\n",
+ "and COP=0.57\n",
+ "NOTE=>In book this question is solve by taking T1=240 K which is incorrect,hence correction is made above according to question by taking T1=-30 degree celcius or 243 K,so answer may vary slightly.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of refrigeration capacity and COP\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.4, Page:436 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 4\")\n",
+ "T1=(-30.+273.);#temperature of air at beginning of compression in K\n",
+ "T3=(27.+273.);#temperature of air after cooling in K\n",
+ "r=8.;#pressure ratio\n",
+ "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n",
+ "y=1.4;#expansion constant \n",
+ "m=1.;#air flow rate in kg/s\n",
+ "n1=0.85;#isentropic efficiency for compression process\n",
+ "n2=.9;#isentropic efficiency for expansion process\n",
+ "print(\"during process 1-2_a\")\n",
+ "print(\"p2/p1=(T2_a/T1)^(y/(y-1))\")\n",
+ "print(\"so T2_a=T1*(p2/p1)^((y-1)/y)in K\")\n",
+ "T2_a=T1*(r)**((y-1)/y)\n",
+ "print(\"theoretical temperature after compression,T2_a=440.18 K\")\n",
+ "print(\"for compression process,\")\n",
+ "print(\"n1=(T2_a-T1)/(T2-T1)\")\n",
+ "print(\"so T2=T1+(T2_a-T1)/n1 in K\")\n",
+ "T2=T1+(T2_a-T1)/n1\n",
+ "print(\"for expansion process,3-4_a\")\n",
+ "print(\"T4_a/T3=(p1/p2)^((y-1)/y)\")\n",
+ "print(\"so T4_a=T3*(p1/p2)^((y-1)/y) in K\")\n",
+ "T4_a=T3*(1/r)**((y-1)/y)\n",
+ "print(\"n2=0.9=(T3-T4)/(T3-T4_a)\")\n",
+ "print(\"so T4=T3-(n2*(T3-T4_a))in K\")\n",
+ "T4=T3-(n2*(T3-T4_a))\n",
+ "print(\"so work during compression,W_C in KJ/s\")\n",
+ "print(\"W_C=m*Cp*(T2-T1)\")\n",
+ "W_C=m*Cp*(T2-T1)\n",
+ "print(\"work during expansion,W_T in KJ/s\")\n",
+ "print(\"W_T=m*Cp*(T3-T4)\")\n",
+ "W_T=m*Cp*(T3-T4)\n",
+ "print(\"refrigeration effect is realized during process,4-1.so refrigeration shall be,\")\n",
+ "print(\"Q_ref=m*Cp*(T1-T4) in KJ/s\")\n",
+ "Q_ref=m*Cp*(T1-T4)\n",
+ "Q_ref=Q_ref/3.5\n",
+ "print(\"Q_ref in ton\"),round(Q_ref,2)\n",
+ "W=W_C-W_T\n",
+ "print(\"net work required(W)=W_C-W_T in KJ/s\"),round(W,2)\n",
+ "Q_ref=64.26;\n",
+ "COP=Q_ref/(W_C-W_T)\n",
+ "print(\"COP=\"),round(COP,2)\n",
+ "print(\"so refrigeration capacity=18.36 ton or 64.26 KJ/s\")\n",
+ "print(\"and COP=0.57\")\n",
+ "print(\"NOTE=>In book this question is solve by taking T1=240 K which is incorrect,hence correction is made above according to question by taking T1=-30 degree celcius or 243 K,so answer may vary slightly.\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.5;pg no: 437"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.5, Page:437 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 5\n",
+ "for isentropic compression process:\n",
+ "(p2/p1)^((y-1)/y)=T2/T1\n",
+ "so T2=T1*(p2/p1)^((y-1)/y) in K\n",
+ "for isenropic expansion process:\n",
+ "(p3/p4)^((y-1)/y)=(T3/T4)=(p2/p1)^((y-1)/y)\n",
+ "so T4=T3/(p2/p1)^((y-1)/y) in K\n",
+ "heat rejected during process 2-3,Q23=Cp*(T2-T3)in KJ/kg\n",
+ "refrigeration process,heat picked during process 4-1,Q41=Cp*(T1-T4) in KJ/kg\n",
+ "so net work(W)=Q23-Q41 in KJ/kg\n",
+ "so COP=refrigeration effect/net work= 1.71\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of COP\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.5, Page:437 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 5\")\n",
+ "T1=(7+273);#temperature of refrigerated space in K\n",
+ "T3=(27+273);#temperature after compression in K\n",
+ "p1=1*10**5;#pressure of refrigerated space in pa\n",
+ "p2=5*10**5;#pressure after compression in pa\n",
+ "y=1.4;#expansion constant\n",
+ "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n",
+ "print(\"for isentropic compression process:\")\n",
+ "print(\"(p2/p1)^((y-1)/y)=T2/T1\")\n",
+ "print(\"so T2=T1*(p2/p1)^((y-1)/y) in K\")\n",
+ "T2=T1*(p2/p1)**((y-1)/y)\n",
+ "print(\"for isenropic expansion process:\")\n",
+ "print(\"(p3/p4)^((y-1)/y)=(T3/T4)=(p2/p1)^((y-1)/y)\")\n",
+ "print(\"so T4=T3/(p2/p1)^((y-1)/y) in K\")\n",
+ "T4=T3/(p2/p1)**((y-1)/y)\n",
+ "print(\"heat rejected during process 2-3,Q23=Cp*(T2-T3)in KJ/kg\")\n",
+ "Q23=Cp*(T2-T3)\n",
+ "print(\"refrigeration process,heat picked during process 4-1,Q41=Cp*(T1-T4) in KJ/kg\")\n",
+ "Q41=Cp*(T1-T4)\n",
+ "print(\"so net work(W)=Q23-Q41 in KJ/kg\")\n",
+ "W=Q23-Q41\n",
+ "COP=Q41/W\n",
+ "print(\"so COP=refrigeration effect/net work=\"),round(COP,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.6;pg no: 438"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.6, Page:438 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 6\n",
+ "for process 1-2\n",
+ "(p2/p1)^((y-1)/y)=T2/T1\n",
+ "so T2=T1*(p2/p1)^((y-1)/y) in K\n",
+ "for process 3-4\n",
+ "(p3/p4)^((y-1)/y)=T3/T4\n",
+ "so T4=T3/(p3/p4)^((y-1)/y)=T3/(p2/p1)^((y-1)/y)in K\n",
+ "refrigeration capacity(Q) in KJ/s= 63.25\n",
+ "Q in ton\n",
+ "work required to run compressor(w)=(m*n)*(p2*v2-p1*v1)/(n-1)\n",
+ "w=(m*n)*R*(T2-T1)/(n-1) in KJ/s\n",
+ "HP required to run compressor 177.86\n",
+ "so HP required to run compressor=177.86 hp\n",
+ "net work input(W)=m*Cp*{(T2-T3)-(T1-T4)}in KJ/s\n",
+ "COP=refrigeration capacity/work=Q/W 1.59\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of refrigeration capacity,HP required to run compressor,COP\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.6, Page:438 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 6\")\n",
+ "T1=(-10.+273.);#air entering temperature in K\n",
+ "p1=1.*10**5;#air entering pressure in pa\n",
+ "T3=(27.+273.);#compressed air temperature after cooling in K\n",
+ "p2=5.5*10**5;#pressure after compression in pa\n",
+ "m=0.8;#air flow rate in kg/s\n",
+ "Cp=1.005;#specific heat capacity at constant pressure in KJ/kg K\n",
+ "y=1.4;#expansion constant\n",
+ "R=0.287;#gas constant in KJ/kg K\n",
+ "print(\"for process 1-2\")\n",
+ "print(\"(p2/p1)^((y-1)/y)=T2/T1\")\n",
+ "print(\"so T2=T1*(p2/p1)^((y-1)/y) in K\")\n",
+ "T2=T1*(p2/p1)**((y-1)/y)\n",
+ "print(\"for process 3-4\")\n",
+ "print(\"(p3/p4)^((y-1)/y)=T3/T4\")\n",
+ "print(\"so T4=T3/(p3/p4)^((y-1)/y)=T3/(p2/p1)^((y-1)/y)in K\")\n",
+ "T4=T3/(p2/p1)**((y-1)/y)\n",
+ "Q=m*Cp*(T1-T4)\n",
+ "print(\"refrigeration capacity(Q) in KJ/s=\"),round(Q,2)\n",
+ "print(\"Q in ton\")\n",
+ "Q=Q/3.5\n",
+ "print(\"work required to run compressor(w)=(m*n)*(p2*v2-p1*v1)/(n-1)\")\n",
+ "print(\"w=(m*n)*R*(T2-T1)/(n-1) in KJ/s\")\n",
+ "n=y;\n",
+ "w=(m*n)*R*(T2-T1)/(n-1)\n",
+ "print(\"HP required to run compressor\"),round(w/0.7457,2)\n",
+ "print(\"so HP required to run compressor=177.86 hp\")\n",
+ "print(\"net work input(W)=m*Cp*{(T2-T3)-(T1-T4)}in KJ/s\")\n",
+ "W=m*Cp*((T2-T3)-(T1-T4))\n",
+ "Q=63.25;#refrigeration capacity in KJ/s\n",
+ "COP=Q/W\n",
+ "print(\"COP=refrigeration capacity/work=Q/W\"),round(COP,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.7;pg no: 440"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.7, Page:440 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 7\n",
+ "for process 1-2,n=1.45\n",
+ "T2/T1=(p2/p1)^((n-1)/n)\n",
+ "so T2=T1*(p2/p1)^((n-1)/n) in K\n",
+ "for process 3-4,n=1.3\n",
+ "T4/T3=(p4/p3)^((n-1)/n)\n",
+ "so T4=T3*(p4/p3)^((n-1)/n)in K\n",
+ "refrigeration effect in passenger cabin with m kg/s mass flow rate of air.\n",
+ "Q=m*Cp*(T5-T4)\n",
+ "m in kg/s= 0.55\n",
+ "so air mass flow rate in cabin=0.55 kg/s\n",
+ "let the mass flow rate through intercooler be m1 kg/s then the energy balance upon intercooler yields,\n",
+ "m1*Cp*(T8-T7)=m*Cp*(T2-T3)\n",
+ "during process 6-7,T7/T6=(p7/p6)^((n-1)/n)\n",
+ "so T7=T6*(p7/p6)^((n-1)/n) in K\n",
+ "substituting T2,T3,T7,T8 and m in energy balance on intercooler,\n",
+ "m1=m*(T2-T3)/(T8-T7)in kg/s\n",
+ "total ram air mass flow rate=m+m1 in kg/s 2.11\n",
+ "ram air mass flow rate=2.12 kg/s\n",
+ "work input to compressor(W)=m*Cp*(T2-T1)in KJ/s\n",
+ "COP=refrigeration effect/work input=Q/W 0.485\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of air mass flow rate in cabin,ram air mass flow rate,COP\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.7, Page:440 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 7\")\n",
+ "p1=1.2*10**5;#pressure of ram air in pa\n",
+ "p6=p1;\n",
+ "T1=(15.+273.);#temperature of ram air in K\n",
+ "T6=T1;\n",
+ "p7=0.9*10**5;#pressure of ram air after expansion in pa\n",
+ "p3=4.*10**5;#pressure of ram air after compression in pa\n",
+ "p2=p3;\n",
+ "p4=1.*10**5;#pressure of ram air after expansion in second turbine in pa\n",
+ "T5=(25.+273.);#temperature of air when exhausted from cabin in K\n",
+ "T3=(50.+273.);#temperature of compressed air in K\n",
+ "T8=(30.+273.);#limited temperaure of ram air in K\n",
+ "Q=10.*3.5;#refrigeration capacity in KJ/s\n",
+ "Cp=1.005;#specific heat capacity at constant pressure in KJ/kg K\n",
+ "print(\"for process 1-2,n=1.45\")\n",
+ "n=1.45;\n",
+ "print(\"T2/T1=(p2/p1)^((n-1)/n)\")\n",
+ "print(\"so T2=T1*(p2/p1)^((n-1)/n) in K\")\n",
+ "T2=T1*(p2/p1)**((n-1)/n)\n",
+ "print(\"for process 3-4,n=1.3\")\n",
+ "n=1.3;\n",
+ "print(\"T4/T3=(p4/p3)^((n-1)/n)\")\n",
+ "print(\"so T4=T3*(p4/p3)^((n-1)/n)in K\")\n",
+ "T4=T3*(p4/p3)**((n-1)/n)\n",
+ "print(\"refrigeration effect in passenger cabin with m kg/s mass flow rate of air.\")\n",
+ "print(\"Q=m*Cp*(T5-T4)\")\n",
+ "m=Q/(Cp*(T5-T4))\n",
+ "print(\"m in kg/s=\"),round(m,2)\n",
+ "print(\"so air mass flow rate in cabin=0.55 kg/s\")\n",
+ "print(\"let the mass flow rate through intercooler be m1 kg/s then the energy balance upon intercooler yields,\")\n",
+ "print(\"m1*Cp*(T8-T7)=m*Cp*(T2-T3)\")\n",
+ "print(\"during process 6-7,T7/T6=(p7/p6)^((n-1)/n)\")\n",
+ "print(\"so T7=T6*(p7/p6)^((n-1)/n) in K\")\n",
+ "T7=T6*(p7/p6)**((n-1)/n)\n",
+ "print(\"substituting T2,T3,T7,T8 and m in energy balance on intercooler,\")\n",
+ "print(\"m1=m*(T2-T3)/(T8-T7)in kg/s\")\n",
+ "m1=m*(T2-T3)/(T8-T7)\n",
+ "print(\"total ram air mass flow rate=m+m1 in kg/s\"),round(m+m1,2)\n",
+ "print(\"ram air mass flow rate=2.12 kg/s\")\n",
+ "print(\"work input to compressor(W)=m*Cp*(T2-T1)in KJ/s\")\n",
+ "m=0.55;#approx.\n",
+ "W=m*Cp*(T2-T1)\n",
+ "COP=Q/W\n",
+ "print(\"COP=refrigeration effect/work input=Q/W\"),round(Q/W,3)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.8;pg no: 441"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.8, Page:441 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 8\n",
+ "considering index of compression and expansion as 1.4\n",
+ "during ramming action,process 0-1,\n",
+ "T1/To=(p1/po)^((y-1)/y)\n",
+ "T1=To*(p1/po)^((y-1)/y)in K\n",
+ "during compression process 1-2_a\n",
+ "T2_a/T1=(p2/p1)^((y-1)/y)\n",
+ "T2_a=T1*(p2/p1)^((y-1)/y)in K\n",
+ "n1=(T2_a-T1)/(T2-T1)\n",
+ "so T2=T1+(T2_a-T1)/n1 in K\n",
+ "In heat exchanger 66% of heat loss shall result in temperature at exit from heat exchanger to be,T3=0.34*T2 in K\n",
+ "subsequently for 10 degree celcius temperature drop in evaporator,\n",
+ "T4=T3-10 in K\n",
+ "expansion in cooling turbine during process 4-5;\n",
+ "T5_a/T4=(p5/p4)^((y-1)/y)\n",
+ "T5_a=T4*(p5/p4)^((y-1)/y)in K\n",
+ "n2=(T4-T5)/(T4-T5_a)\n",
+ "T5=T4-(T4-T5_a)*n2 in K\n",
+ "let the mass flow rate of air through cabin be m kg/s.using refrigeration capacity heat balance yields.\n",
+ "Q=m*Cp*(T6-T5)\n",
+ "so m=Q/(Cp*(T6-T5))in kg/s\n",
+ "work input to compressor(W)=m*Cp*(T2-T1)in KJ/s 41.4\n",
+ "W in Hp\n",
+ "COP=refrigeration effect/work input=Q/W= 1.27\n",
+ "so COP=1.27\n",
+ "and HP required=55.48 hp\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of COP and HP required\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.8, Page:441 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 8\")\n",
+ "po=0.9*10**5;#atmospheric air pressure in pa\n",
+ "To=(3.+273.);#temperature of atmospheric air in K\n",
+ "p1=1.*10**5;#pressure due to ramming air in pa\n",
+ "p2=4.*10**5;#pressure when air leaves compressor in pa\n",
+ "p3=p2;\n",
+ "p4=p3;\n",
+ "p5=1.03*10**5;#pressure maintained in passenger cabin in pa\n",
+ "T6=(25.+273.);#temperature of air leaves cabin in K\n",
+ "Q=15.*3.5;#refrigeration capacity of aeroplane in KJ/s\n",
+ "n1=0.9;#isentropic efficiency of compressor\n",
+ "n2=0.8;#isentropic efficiency of turbine\n",
+ "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n",
+ "print(\"considering index of compression and expansion as 1.4\")\n",
+ "y=1.4;\n",
+ "print(\"during ramming action,process 0-1,\")\n",
+ "print(\"T1/To=(p1/po)^((y-1)/y)\")\n",
+ "print(\"T1=To*(p1/po)^((y-1)/y)in K\")\n",
+ "T1=To*(p1/po)**((y-1)/y)\n",
+ "print(\"during compression process 1-2_a\")\n",
+ "print(\"T2_a/T1=(p2/p1)^((y-1)/y)\")\n",
+ "print(\"T2_a=T1*(p2/p1)^((y-1)/y)in K\")\n",
+ "T2_a=T1*(p2/p1)**((y-1)/y)\n",
+ "print(\"n1=(T2_a-T1)/(T2-T1)\")\n",
+ "print(\"so T2=T1+(T2_a-T1)/n1 in K\")\n",
+ "T2=T1+(T2_a-T1)/n1\n",
+ "print(\"In heat exchanger 66% of heat loss shall result in temperature at exit from heat exchanger to be,T3=0.34*T2 in K\")\n",
+ "T3=0.34*T2\n",
+ "print(\"subsequently for 10 degree celcius temperature drop in evaporator,\")\n",
+ "print(\"T4=T3-10 in K\")\n",
+ "T4=T3-10\n",
+ "print(\"expansion in cooling turbine during process 4-5;\")\n",
+ "print(\"T5_a/T4=(p5/p4)^((y-1)/y)\")\n",
+ "print(\"T5_a=T4*(p5/p4)^((y-1)/y)in K\")\n",
+ "T5_a=T4*(p5/p4)**((y-1)/y)\n",
+ "print(\"n2=(T4-T5)/(T4-T5_a)\")\n",
+ "print(\"T5=T4-(T4-T5_a)*n2 in K\")\n",
+ "T5=T4-(T4-T5_a)*n2\n",
+ "print(\"let the mass flow rate of air through cabin be m kg/s.using refrigeration capacity heat balance yields.\")\n",
+ "print(\"Q=m*Cp*(T6-T5)\")\n",
+ "print(\"so m=Q/(Cp*(T6-T5))in kg/s\")\n",
+ "m=Q/(Cp*(T6-T5))\n",
+ "W=m*Cp*(T2-T1)\n",
+ "print(\"work input to compressor(W)=m*Cp*(T2-T1)in KJ/s\"),round(W,2)\n",
+ "print(\"W in Hp\")\n",
+ "W=W/.7457\n",
+ "W=41.37;#work input to compressor in KJ/s\n",
+ "COP=Q/W\n",
+ "print(\"COP=refrigeration effect/work input=Q/W=\"),round(COP,2)\n",
+ "print(\"so COP=1.27\")\n",
+ "print(\"and HP required=55.48 hp\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.9;pg no: 443"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.9, Page:443 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 9\n",
+ "properties of NH3,\n",
+ "at 15 degree celcius,h9=-54.51 KJ/kg,hg=1303.74 KJ/kg,s9=-0.2132 KJ/kg K,sg=5.0536 KJ/kg K\n",
+ "and at 25 degree celcius,h3=99.94 KJ/kg,h2=1317.95 KJ/kg,s3=0.3386 KJ/kg K,s2=4.4809 KJ/kg K\n",
+ "here work done,W=Area 1-2-3-9-1\n",
+ "refrigeration effect=Area 1-5-6-4-1\n",
+ "Area 3-8-9 =(Area 3-11-7)-(Area 9-11-10)-(Area 9-8-7-10)\n",
+ "so Area 3-8-9=h3-h9-T1*(s3-s9)in KJ/kg\n",
+ "during throttling process between 3 and 4,h3=h4\n",
+ "(Area=3-11-7-3)=(Area 4-9-11-6-4)\n",
+ "(Area 3-8-9)+(Area 8-9-11-7-8)=(Area 4-6-7-8-4)+(Area 8-9-11-7-8)\n",
+ "(Area 3-8-9)=(Area 4-6-7-8-4)\n",
+ "so (Area 4-6-7-8-4)=12.09 KJ/kg\n",
+ "also,(Area 4-6-7-8-4)=T1*(s4-s8)\n",
+ "so (s4-s8)in KJ/kg K=\n",
+ "also s3=s8=0.3386 KJ/kg K\n",
+ "so s4 in KJ/kg K=\n",
+ "also s1=s2=4.4809 KJ/kg K\n",
+ "refrigeration effect(Q)=Area (1-5-6-4-1)=T1*(s1-s4)in KJ/kg\n",
+ "work done(W)=Area (1-2-3-9-1)=(Area 3-8-9)+((T2-T1)*(s1-s8))in KJ/kg\n",
+ "so COP=refrigeration effect/work done= 5.94\n",
+ "so COP=5.94\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of COP\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.9, Page:443 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 9\")\n",
+ "print(\"properties of NH3,\")\n",
+ "print(\"at 15 degree celcius,h9=-54.51 KJ/kg,hg=1303.74 KJ/kg,s9=-0.2132 KJ/kg K,sg=5.0536 KJ/kg K\")\n",
+ "T1=(-15+273);\n",
+ "h9=-54.51;\n",
+ "hg=1303.74;\n",
+ "s9=-0.2132;\n",
+ "sg=5.0536;\n",
+ "print(\"and at 25 degree celcius,h3=99.94 KJ/kg,h2=1317.95 KJ/kg,s3=0.3386 KJ/kg K,s2=4.4809 KJ/kg K\")\n",
+ "T2=(25+273);\n",
+ "h3=99.94;\n",
+ "h2=1317.95;\n",
+ "s3=0.3386;\n",
+ "s2=4.4809;\n",
+ "print(\"here work done,W=Area 1-2-3-9-1\")\n",
+ "print(\"refrigeration effect=Area 1-5-6-4-1\")\n",
+ "print(\"Area 3-8-9 =(Area 3-11-7)-(Area 9-11-10)-(Area 9-8-7-10)\")\n",
+ "print(\"so Area 3-8-9=h3-h9-T1*(s3-s9)in KJ/kg\")\n",
+ "h3-h9-T1*(s3-s9)\n",
+ "print(\"during throttling process between 3 and 4,h3=h4\")\n",
+ "print(\"(Area=3-11-7-3)=(Area 4-9-11-6-4)\")\n",
+ "print(\"(Area 3-8-9)+(Area 8-9-11-7-8)=(Area 4-6-7-8-4)+(Area 8-9-11-7-8)\")\n",
+ "print(\"(Area 3-8-9)=(Area 4-6-7-8-4)\")\n",
+ "print(\"so (Area 4-6-7-8-4)=12.09 KJ/kg\")\n",
+ "print(\"also,(Area 4-6-7-8-4)=T1*(s4-s8)\")\n",
+ "print(\"so (s4-s8)in KJ/kg K=\")\n",
+ "12.09/T1\n",
+ "print(\"also s3=s8=0.3386 KJ/kg K\")\n",
+ "s8=s3;\n",
+ "print(\"so s4 in KJ/kg K=\")\n",
+ "s4=s8+12.09/T1\n",
+ "print(\"also s1=s2=4.4809 KJ/kg K\")\n",
+ "s1=s2;\n",
+ "print(\"refrigeration effect(Q)=Area (1-5-6-4-1)=T1*(s1-s4)in KJ/kg\")\n",
+ "Q=T1*(s1-s4)\n",
+ "print(\"work done(W)=Area (1-2-3-9-1)=(Area 3-8-9)+((T2-T1)*(s1-s8))in KJ/kg\")\n",
+ "W=12.09+((T2-T1)*(s1-s8))\n",
+ "COP=Q/W\n",
+ "print(\"so COP=refrigeration effect/work done=\"),round(COP,2)\n",
+ "print(\"so COP=5.94\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.10;pg no: 445"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.10, Page:445 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 10\n",
+ "properties of Freon-12,\n",
+ "at -20 degree celcius,P1=1.51 bar,vg=0.1088 m^3/kg,hf=17.8 KJ/kg,h1=178.61 KJ/kg,sf=0.0730 KJ/kg K,s1=0.7082 KJ/kg K,Cpg=0.605 KJ/kg K\n",
+ "at 40 degree celcius,P2=9.61 bar,h3=74.53 KJ/kg,hg=203.05 KJ/kg,sf=0.2716 KJ/kg K,sg=0.682 KJ/kg K,Cpf=0.976 KJ/kg K,Cpg=0.747 KJ/kg K\n",
+ "during expansion(throttling)between 3 and 4\n",
+ "h3=h4=hf_40oc=74.53 KJ/kg=h4\n",
+ "process 1-2 is adiabatic compression so,\n",
+ "s1=s2,s1=sg_-20oc=0.7082 KJ/kg K\n",
+ "at 40 degree celcius or 313 K,s1=sg+Cpg*log(T2/313)\n",
+ "T2=313*exp((s1-sg)/Cpg)in K\n",
+ "so temperature after compression,T2=324.17 K\n",
+ "enthalpy after compression,h2=hg+Cpg*(T2-313)in KJ/kg\n",
+ "compression work required,per kg(Wc)=h2-h1 in KJ/kg\n",
+ "refrigeration effect during cycle,per kg(q)=h1-h4 in KJ/kg\n",
+ "mass flow rate of refrigerant,m=Q/q in kg/s\n",
+ "COP=q/Wc 3.17452\n",
+ "volumetric efficiency of reciprocating compressor,given C=0.02\n",
+ "n_vol=1+C-C*(P2/P1)^(1/n)\n",
+ "let piston printlacement by V,m^3\n",
+ "mass flow rate,m=(V*n_vol*N)/(60*vg_-20oc)\n",
+ "so V in cm^3= 569.43\n",
+ "so COP=3.175\n",
+ "and piston printlacement=569.45 cm^3\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of COP and piston printlacement\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.10, Page:445 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 10\")\n",
+ "Q=2.86*3.5;#refrigeration effect in KJ/s\n",
+ "N=1200;#compressor rpm\n",
+ "n=1.13;#compression index\n",
+ "print(\"properties of Freon-12,\")\n",
+ "print(\"at -20 degree celcius,P1=1.51 bar,vg=0.1088 m^3/kg,hf=17.8 KJ/kg,h1=178.61 KJ/kg,sf=0.0730 KJ/kg K,s1=0.7082 KJ/kg K,Cpg=0.605 KJ/kg K\")\n",
+ "P1=1.51;\n",
+ "T1=(-20+273);\n",
+ "vg=0.1088;\n",
+ "h1=178.61;\n",
+ "s1=0.7082;\n",
+ "s2=s1;\n",
+ "print(\"at 40 degree celcius,P2=9.61 bar,h3=74.53 KJ/kg,hg=203.05 KJ/kg,sf=0.2716 KJ/kg K,sg=0.682 KJ/kg K,Cpf=0.976 KJ/kg K,Cpg=0.747 KJ/kg K\")\n",
+ "P2=9.61;\n",
+ "h3=74.53;\n",
+ "h4=h3;\n",
+ "hg=203.05;\n",
+ "sf=0.2716;\n",
+ "sg=0.682;\n",
+ "Cpf=0.976;\n",
+ "Cpg=0.747;\n",
+ "print(\"during expansion(throttling)between 3 and 4\")\n",
+ "print(\"h3=h4=hf_40oc=74.53 KJ/kg=h4\")\n",
+ "print(\"process 1-2 is adiabatic compression so,\")\n",
+ "print(\"s1=s2,s1=sg_-20oc=0.7082 KJ/kg K\")\n",
+ "print(\"at 40 degree celcius or 313 K,s1=sg+Cpg*log(T2/313)\")\n",
+ "print(\"T2=313*exp((s1-sg)/Cpg)in K\")\n",
+ "T2=313*math.exp((s1-sg)/Cpg)\n",
+ "print(\"so temperature after compression,T2=324.17 K\")\n",
+ "print(\"enthalpy after compression,h2=hg+Cpg*(T2-313)in KJ/kg\")\n",
+ "h2=hg+Cpg*(T2-313)\n",
+ "print(\"compression work required,per kg(Wc)=h2-h1 in KJ/kg\")\n",
+ "Wc=h2-h1\n",
+ "print(\"refrigeration effect during cycle,per kg(q)=h1-h4 in KJ/kg\")\n",
+ "q=h1-h4\n",
+ "print(\"mass flow rate of refrigerant,m=Q/q in kg/s\")\n",
+ "m=Q/q\n",
+ "m=0.096;#approx.\n",
+ "COP=q/Wc\n",
+ "print(\"COP=q/Wc\"),round(COP,5)\n",
+ "print(\"volumetric efficiency of reciprocating compressor,given C=0.02\")\n",
+ "C=0.02;\n",
+ "print(\"n_vol=1+C-C*(P2/P1)^(1/n)\")\n",
+ "n_vol=1+C-C*(P2/P1)**(1/n)\n",
+ "print(\"let piston printlacement by V,m^3\")\n",
+ "print(\"mass flow rate,m=(V*n_vol*N)/(60*vg_-20oc)\")\n",
+ "V=(m*60*vg)*10**6/(N*n_vol)\n",
+ "print(\"so V in cm^3=\"),round(V,2)\n",
+ "print(\"so COP=3.175\")\n",
+ "print(\"and piston printlacement=569.45 cm^3\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.11;pg no: 447"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.11, Page:447 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 11\n",
+ "properties of CO2,\n",
+ "at 20 degree celcius,P1=57.27 bar,hf=144.11 KJ/kg,hg=299.62 KJ/kg,sf=0.523 KJ/kg K,sg_20oc=1.0527 KJ/kg K,Cpf=2.889 KJ/kg K,Cpg=2.135 KJ/kg K\n",
+ "at -10 degree celcius,P2=26.49 bar,vg=0.014 m^3/kg,hf=60.78 KJ/kg,hg=322.28 KJ/kg,sf=0.2381 KJ/kg K,sg=1.2324 KJ/kg K\n",
+ "processes of vapour compression cycle are shown on T-s diagram\n",
+ "1-2:isentropic compression process\n",
+ "2-3-4:condensation process\n",
+ "4-5:isenthalpic expansion process\n",
+ "5-1:refrigeration process in evaporator\n",
+ "h1=hg at -10oc=322.28 KJ/kg\n",
+ "at 20 degree celcius,h2=hg+Cpg*(40-20)in KJ/kg\n",
+ "entropy at state 2,at 20 degree celcius,s2=sg_20oc+Cpg*log((273+40)/(273+20))in KJ/kg K\n",
+ "entropy during isentropic process,s1=s2\n",
+ "at -10 degree celcius,s2=sf+x1*sfg\n",
+ "so x1=(s2-sf)/(sg-sf)\n",
+ "enthalpy at state 1,at -10 degree celcius,h1=hf+x1*hfg in KJ/kg\n",
+ "h3=hf at 20oc=144.11 KJ/kg\n",
+ "since undercooling occurs upto 10oc,so,h4=h3-Cpf*deltaT in KJ/kg\n",
+ "also,h4=h5=115.22 KJ/kg\n",
+ "refrigeration effect per kg of refrigerant(q)=(h1-h5)in KJ/kg\n",
+ "let refrigerant flow rate be m kg/s\n",
+ "refrigerant effect(Q)=m*q\n",
+ "m=Q/q in kg/s 0.01016\n",
+ "compressor work,Wc=h2-h1 in KJ/kg\n",
+ "COP=refrigeration effect per kg/compressor work per kg= 6.51\n",
+ "so COP=6.51,mass flow rate=0.01016 kg/s\n",
+ "NOTE=>In book,mass flow rate(m) which is 0.1016 kg/s is calculated wrong and it is correctly solve above and comes out to be m=0.01016 kg/s. \n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of COP and mass flow rate\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.11, Page:447 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 11\")\n",
+ "Q=2;#refrigeration effect in KW\n",
+ "print(\"properties of CO2,\")\n",
+ "print(\"at 20 degree celcius,P1=57.27 bar,hf=144.11 KJ/kg,hg=299.62 KJ/kg,sf=0.523 KJ/kg K,sg_20oc=1.0527 KJ/kg K,Cpf=2.889 KJ/kg K,Cpg=2.135 KJ/kg K\")\n",
+ "T1=(20.+273.);#condensation temperature in K\n",
+ "P1=57.27;\n",
+ "h3=144.11;\n",
+ "hg=299.62;\n",
+ "sf=0.523;\n",
+ "sg_20oc=1.0527;\n",
+ "Cpf=2.889;\n",
+ "Cpg=2.135;\n",
+ "print(\"at -10 degree celcius,P2=26.49 bar,vg=0.014 m^3/kg,hf=60.78 KJ/kg,hg=322.28 KJ/kg,sf=0.2381 KJ/kg K,sg=1.2324 KJ/kg K\")\n",
+ "T2=(-10+273);#evaporator temperature in K\n",
+ "P2=26.49;\n",
+ "vg=0.014;\n",
+ "hf=60.78;\n",
+ "h1=322.28;\n",
+ "sf=0.2381;\n",
+ "sg=1.2324;\n",
+ "print(\"processes of vapour compression cycle are shown on T-s diagram\")\n",
+ "print(\"1-2:isentropic compression process\")\n",
+ "print(\"2-3-4:condensation process\")\n",
+ "print(\"4-5:isenthalpic expansion process\")\n",
+ "print(\"5-1:refrigeration process in evaporator\")\n",
+ "print(\"h1=hg at -10oc=322.28 KJ/kg\")\n",
+ "print(\"at 20 degree celcius,h2=hg+Cpg*(40-20)in KJ/kg\")\n",
+ "h2=hg+Cpg*(40.-20.)\n",
+ "print(\"entropy at state 2,at 20 degree celcius,s2=sg_20oc+Cpg*log((273+40)/(273+20))in KJ/kg K\")\n",
+ "s2=sg_20oc+Cpg*math.log((273.+40.)/(273.+20.))\n",
+ "print(\"entropy during isentropic process,s1=s2\")\n",
+ "print(\"at -10 degree celcius,s2=sf+x1*sfg\")\n",
+ "print(\"so x1=(s2-sf)/(sg-sf)\")\n",
+ "x1=(s2-sf)/(sg-sf)\n",
+ "print(\"enthalpy at state 1,at -10 degree celcius,h1=hf+x1*hfg in KJ/kg\")\n",
+ "h1=hf+x1*(h1-hf)\n",
+ "print(\"h3=hf at 20oc=144.11 KJ/kg\")\n",
+ "print(\"since undercooling occurs upto 10oc,so,h4=h3-Cpf*deltaT in KJ/kg\")\n",
+ "h4=h3-Cpf*(20.-10.)\n",
+ "print(\"also,h4=h5=115.22 KJ/kg\")\n",
+ "h5=h4;\n",
+ "print(\"refrigeration effect per kg of refrigerant(q)=(h1-h5)in KJ/kg\")\n",
+ "q=(h1-h5)\n",
+ "print(\"let refrigerant flow rate be m kg/s\")\n",
+ "print(\"refrigerant effect(Q)=m*q\")\n",
+ "m=Q/q\n",
+ "print(\"m=Q/q in kg/s\"),round(m,5)\n",
+ "print(\"compressor work,Wc=h2-h1 in KJ/kg\")\n",
+ "Wc=h2-h1\n",
+ "COP=q/Wc\n",
+ "print(\"COP=refrigeration effect per kg/compressor work per kg=\"),round(COP,2)\n",
+ "print(\"so COP=6.51,mass flow rate=0.01016 kg/s\")\n",
+ "print(\"NOTE=>In book,mass flow rate(m) which is 0.1016 kg/s is calculated wrong and it is correctly solve above and comes out to be m=0.01016 kg/s. \")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.12;pg no: 448"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.12, Page:448 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 12\n",
+ "here pressure of atmospheric air(P)may be taken as 1.013 bar\n",
+ "specific humidity,omega=0.622*(Pv/(P-Pv))\n",
+ "so partial pressure of vapour(Pv)in bar\n",
+ "Pv in bar= 0.0254\n",
+ "relative humidity(phi)=(Pv/Pv_sat)\n",
+ "from pychrometric properties of air Pv_sat at 25 degree celcius=0.03098 bar\n",
+ "so phi=Pv/Pv_sat 0.82\n",
+ "in percentage 81.99\n",
+ "so partial pressure of vapour=0.0254 bar\n",
+ "relative humidity=81.98 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of partial pressure of vapour and relative humidity\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.12, Page:448 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 12\")\n",
+ "omega=0.016;#specific humidity in gm/gm of air\n",
+ "print(\"here pressure of atmospheric air(P)may be taken as 1.013 bar\")\n",
+ "P=1.013;#pressure of atmospheric air in bar\n",
+ "print(\"specific humidity,omega=0.622*(Pv/(P-Pv))\")\n",
+ "print(\"so partial pressure of vapour(Pv)in bar\")\n",
+ "Pv=P/(1+(0.622/omega))\n",
+ "print(\"Pv in bar=\"),round(Pv,4)\n",
+ "Pv=0.0254;#approx.\n",
+ "print(\"relative humidity(phi)=(Pv/Pv_sat)\")\n",
+ "print(\"from pychrometric properties of air Pv_sat at 25 degree celcius=0.03098 bar\")\n",
+ "Pv_sat=0.03098;\n",
+ "phi=Pv/Pv_sat\n",
+ "print(\"so phi=Pv/Pv_sat\"),round(phi,2)\n",
+ "print(\"in percentage\"),round(phi*100,2)\n",
+ "print(\"so partial pressure of vapour=0.0254 bar\")\n",
+ "print(\"relative humidity=81.98 %\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.13;pg no: 449"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.13, Page:449 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 13\n",
+ "at 30 degree celcius from steam table,saturation pressure,Pv_sat=0.0425 bar\n",
+ "partial pressure of vapour(Pv)=relative humidity*Pv_sat in bar 0.03\n",
+ "partial pressure of air(Pa)=total pressure of mixture-partial pressure of vapour 0.99\n",
+ "so partial pressure of air=0.9875 bar\n",
+ "humidity ratio,omega in kg/kg of dry air= 0.01606\n",
+ "so humidity ratio=0.01606 kg/kg of air\n",
+ "Dew point temperature may be seen from the steam table.The saturation temperature corresponding to the partial pressure of vapour is 0.0255 bar.Dew point temperature can be approximated as 21.4oc by interpolation\n",
+ "so Dew point temperature=21.4 degree celcius\n",
+ "density of mixture(rho_m)=density of air(rho_a)+density of vapour(rho_v)\n",
+ "rho_m=(rho_a)+(rho_v)=rho_a*(1+omega)\n",
+ "rho_m in kg/m^3= 1.1836\n",
+ "so density = 1.1835 kg/m^3\n",
+ "enthalpy of mixture,h in KJ/kg of dry air= 71.21\n",
+ "enthalpy of mixture =71.2 KJ/kg of dry air\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of partial pressure,humidity ratio,Dew point temperature,density and enthalpy of mixture\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.13, Page:449 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 13\")\n",
+ "r=0.6;#relative humidity\n",
+ "P=1.013;#total pressure of mixture in bar\n",
+ "R=0.287;#gas constant in KJ/kg K\n",
+ "Ta=(30+273);#room temperature in K\n",
+ "Cp=1.005;#specific heat at constant pressure in KJ/kg degree celcius\n",
+ "print(\"at 30 degree celcius from steam table,saturation pressure,Pv_sat=0.0425 bar\")\n",
+ "Pv_sat=0.0425;\n",
+ "Pv=r*Pv_sat\n",
+ "print(\"partial pressure of vapour(Pv)=relative humidity*Pv_sat in bar\"),round(Pv,2)\n",
+ "Pa=P-Pv\n",
+ "print(\"partial pressure of air(Pa)=total pressure of mixture-partial pressure of vapour\"),round(Pa,2)\n",
+ "print(\"so partial pressure of air=0.9875 bar\")\n",
+ "omega=0.622*Pv/(P-Pv)\n",
+ "print(\"humidity ratio,omega in kg/kg of dry air=\"),round(omega,5)\n",
+ "print(\"so humidity ratio=0.01606 kg/kg of air\")\n",
+ "print(\"Dew point temperature may be seen from the steam table.The saturation temperature corresponding to the partial pressure of vapour is 0.0255 bar.Dew point temperature can be approximated as 21.4oc by interpolation\")\n",
+ "print(\"so Dew point temperature=21.4 degree celcius\")\n",
+ "print(\"density of mixture(rho_m)=density of air(rho_a)+density of vapour(rho_v)\")\n",
+ "print(\"rho_m=(rho_a)+(rho_v)=rho_a*(1+omega)\")\n",
+ "rho_m=P*100*(1+omega)/(R*Ta)\n",
+ "print(\"rho_m in kg/m^3=\"),round(rho_m,4)\n",
+ "print(\"so density = 1.1835 kg/m^3\")\n",
+ "T=30;#room temperature in degree celcius\n",
+ "hg=2540.1;#enthalpy at 30 degree celcius in KJ/kg\n",
+ "h=Cp*T+omega*(hg+1.860*(30-21.4))\n",
+ "print(\"enthalpy of mixture,h in KJ/kg of dry air=\"),round(h,2)\n",
+ "print(\"enthalpy of mixture =71.2 KJ/kg of dry air\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.14;pg no: 449"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.14, Page:449 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 14\n",
+ "initial state at 15 degree celcius and 80% relative humidity is shown by point 1 and final state at 25 degree celcius and 50% relative humidity is shown by point 2 on psychrometric chart.\n",
+ "omega1=0.0086 kg/kg of air,h1=37 KJ/kg,omega2=0.01 kg/kg of air,h2=50 KJ/kg,v2=0.854 m^3/kg\n",
+ "mass of water added between states 1 and 2 omega2-omega1 in kg/kg of air\n",
+ "mass flow rate of air(ma)=0.8/v2 in kg/s\n",
+ "total mass of water added=ma*(omega2-omega1)in kg/s 0.001311\n",
+ "heat transferred in KJ/s= 12.18\n",
+ "so mass of water added=0.001312 kg/s,heat transferred=12.18 KW\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of mass of water added and heat transferred\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.14, Page:449 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 14\")\n",
+ "print(\"initial state at 15 degree celcius and 80% relative humidity is shown by point 1 and final state at 25 degree celcius and 50% relative humidity is shown by point 2 on psychrometric chart.\")\n",
+ "print(\"omega1=0.0086 kg/kg of air,h1=37 KJ/kg,omega2=0.01 kg/kg of air,h2=50 KJ/kg,v2=0.854 m^3/kg\")\n",
+ "omega1=0.0086;\n",
+ "h1=37.;\n",
+ "omega2=0.01;\n",
+ "h2=50.;\n",
+ "v2=0.854;\n",
+ "print(\"mass of water added between states 1 and 2 omega2-omega1 in kg/kg of air\")\n",
+ "omega2-omega1\n",
+ "print(\"mass flow rate of air(ma)=0.8/v2 in kg/s\")\n",
+ "ma=0.8/v2\n",
+ "print(\"total mass of water added=ma*(omega2-omega1)in kg/s\"),round(ma*(omega2-omega1),6)\n",
+ "print(\"heat transferred in KJ/s=\"),round(ma*(h2-h1),2)\n",
+ "print(\"so mass of water added=0.001312 kg/s,heat transferred=12.18 KW\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.15;pg no: 451"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.15, Page:451 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 15\n",
+ "Let temperature after mixing be Toc.For getting final enthalpy after adiabatic mixing the enthalpy of two streams are required.\n",
+ "For moist air stream at 30 degree celcius and 30% relative humidity.\n",
+ "phi1=Pv1/Pv_sat_30oc\n",
+ "here Pv_sat_30oc=0.04246 bar\n",
+ "so Pv1=phi1*Pv_sat_30oc in bar\n",
+ "corresponding to vapour pressure of 0.01274 bar the dew point temperature shall be 10.5 degree celcius\n",
+ "specific humidity,omega1 in kg/kg of air= 0.00792\n",
+ "at dew point temperature of 10.5 degree celcius,enthalpy,hg at 10.5oc=2520.7 KJ/kg\n",
+ "h1=Cp_air*T1+omega1*{hg-Cp_stream*(T1-Tdp1)}in KJ/kg of dry air\n",
+ "for second moist air stream at 35oc and 85% relative humidity\n",
+ "phi2=Pv2/Pv_sat_35oc\n",
+ "here Pv_sat_35oc=0.005628 bar\n",
+ "so Pv2=phi2*Pv_sat_35oc in bar\n",
+ "specific humidity,omega2 in kg/kg of air= 0.00295\n",
+ "corresponding to vapour pressure of 0.004784 bar the dew point temperature is 32 degree celcius\n",
+ "so,enthalpy of second stream,\n",
+ "h2=Cp_air*T2+omega2*{hg+Cp_stream*(T2-Tdp2)}in KJ/kg of dry air\n",
+ "enthalpy of mixture after adiabatic mixing,\n",
+ "=(1/(m1+m2))*((h1*m1/(1+omega1))+(h2*m2/(1+omega2))) in KJ/kg of moist air\n",
+ "mass of vapour per kg of moist air=(1/5)*((omega1*m1/(1+omega1))+(omega2*m2/(1+omega2)))in kg/kg of moist air\n",
+ "specific humidity of mixture(omega)in kg/kg of dry air= 0.00592\n",
+ "omega=0.622*Pv/(P-Pv)\n",
+ "Pv in bar= 0.00956\n",
+ "partial pressure of water vapour=0.00957 bar\n",
+ "so specific humidity of mixture=0.00593 kg/kg dry air\n",
+ "and partial pressure of water vapour in mixture=0.00957 bar\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of specific humidity and partial pressure of water vapour in mixture\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.15, Page:451 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 15\")\n",
+ "P=1.013;#atmospheric pressure in bar\n",
+ "Cp_air=1.005;#specific heat of air at constant pressure in KJ/kg K\n",
+ "Cp_stream=1.86;#specific heat of stream at constant pressure in KJ/kg K\n",
+ "T1=30.;#temperature of first stream of moist air in K\n",
+ "m1=3.;#mass flow rate of first stream in kg/s \n",
+ "T2=35.;#temperature of second stream of moist air in K\n",
+ "m2=2.;#mass flow rate of second stream in kg/s \n",
+ "print(\"Let temperature after mixing be Toc.For getting final enthalpy after adiabatic mixing the enthalpy of two streams are required.\")\n",
+ "print(\"For moist air stream at 30 degree celcius and 30% relative humidity.\")\n",
+ "phi1=0.3;\n",
+ "print(\"phi1=Pv1/Pv_sat_30oc\")\n",
+ "print(\"here Pv_sat_30oc=0.04246 bar\")\n",
+ "Pv_sat_30oc=0.04246;\n",
+ "print(\"so Pv1=phi1*Pv_sat_30oc in bar\")\n",
+ "Pv1=phi1*Pv_sat_30oc\n",
+ "print(\"corresponding to vapour pressure of 0.01274 bar the dew point temperature shall be 10.5 degree celcius\")\n",
+ "Tdp1=10.5;\n",
+ "omega1=0.622*Pv1/(P-Pv1)\n",
+ "print(\"specific humidity,omega1 in kg/kg of air=\"),round(omega1,5)\n",
+ "print(\"at dew point temperature of 10.5 degree celcius,enthalpy,hg at 10.5oc=2520.7 KJ/kg\")\n",
+ "hg=2520.7;#enthalpy at 10.5 degree celcius in KJ/kg\n",
+ "print(\"h1=Cp_air*T1+omega1*{hg-Cp_stream*(T1-Tdp1)}in KJ/kg of dry air\")\n",
+ "h1=Cp_air*T1+omega1*(hg-Cp_stream*(T1-Tdp1))\n",
+ "print(\"for second moist air stream at 35oc and 85% relative humidity\")\n",
+ "phi2=0.85;\n",
+ "print(\"phi2=Pv2/Pv_sat_35oc\")\n",
+ "print(\"here Pv_sat_35oc=0.005628 bar\")\n",
+ "Pv_sat_35oc=0.005628;\n",
+ "print(\"so Pv2=phi2*Pv_sat_35oc in bar\")\n",
+ "Pv2=phi2*Pv_sat_35oc\n",
+ "omega2=0.622*Pv2/(P-Pv2)\n",
+ "print(\"specific humidity,omega2 in kg/kg of air=\"),round(omega2,5)\n",
+ "print(\"corresponding to vapour pressure of 0.004784 bar the dew point temperature is 32 degree celcius\")\n",
+ "Tdp2=32.;\n",
+ "print(\"so,enthalpy of second stream,\")\n",
+ "print(\"h2=Cp_air*T2+omega2*{hg+Cp_stream*(T2-Tdp2)}in KJ/kg of dry air\")\n",
+ "hg=2559.9;#enthalpy at 32 degree celcius in KJ/kg\n",
+ "h2=Cp_air*T2+omega2*(hg+Cp_stream*(T2-Tdp2))\n",
+ "print(\"enthalpy of mixture after adiabatic mixing,\")\n",
+ "print(\"=(1/(m1+m2))*((h1*m1/(1+omega1))+(h2*m2/(1+omega2))) in KJ/kg of moist air\")\n",
+ "(1./(m1+m2))*((h1*m1/(1+omega1))+(h2*m2/(1+omega2)))\n",
+ "print(\"mass of vapour per kg of moist air=(1/5)*((omega1*m1/(1+omega1))+(omega2*m2/(1+omega2)))in kg/kg of moist air\")\n",
+ "(1./5.)*((omega1*m1/(1+omega1))+(omega2*m2/(1+omega2)))\n",
+ "omega=0.00589/(1-0.005893)\n",
+ "print(\"specific humidity of mixture(omega)in kg/kg of dry air=\"),round(omega,5)\n",
+ "print(\"omega=0.622*Pv/(P-Pv)\")\n",
+ "Pv=omega*P/(omega+0.622)\n",
+ "print(\"Pv in bar=\"),round(Pv,5)\n",
+ "print(\"partial pressure of water vapour=0.00957 bar\")\n",
+ "print(\"so specific humidity of mixture=0.00593 kg/kg dry air\")\n",
+ "print(\"and partial pressure of water vapour in mixture=0.00957 bar\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 11.16;pg no: 452"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 11.16, Page:452 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 11 Example 16\n",
+ "The type of heating involved is sensible heating.Locating satte 1 on psychrometric chart corresponding to 15 degree celcius dbt and 80% relative humidity the other property values shall be,\n",
+ "h1=36.4 KJ/kg,omega1=0.0086 kg/kg of air,v1=0.825 m^3/kg\n",
+ "final state 2 has,h2=52 KJ/kg\n",
+ "mass of air(m)=m1/v1 in kg/s\n",
+ "amount of heat added(Q)in KJ/s\n",
+ "Q=m*(h2-h1) 56.78\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of amount of heat added\n",
+ "#intiation of all variables\n",
+ "# Chapter 11\n",
+ "import math\n",
+ "print\"Example 11.16, Page:452 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 11 Example 16\")\n",
+ "m1=3;#rate at which moist air enter in heating coil in m^3/s\n",
+ "print(\"The type of heating involved is sensible heating.Locating satte 1 on psychrometric chart corresponding to 15 degree celcius dbt and 80% relative humidity the other property values shall be,\")\n",
+ "print(\"h1=36.4 KJ/kg,omega1=0.0086 kg/kg of air,v1=0.825 m^3/kg\")\n",
+ "h1=36.4;\n",
+ "omega1=0.0086;\n",
+ "v1=0.825;\n",
+ "print(\"final state 2 has,h2=52 KJ/kg\")\n",
+ "h2=52;\n",
+ "print(\"mass of air(m)=m1/v1 in kg/s\")\n",
+ "m=m1/v1\n",
+ "m=3.64;#approx.\n",
+ "print(\"amount of heat added(Q)in KJ/s\")\n",
+ "Q=m*(h2-h1)\n",
+ "print(\"Q=m*(h2-h1)\"),round(Q,2)"
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter12_3.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter12_3.ipynb
new file mode 100644
index 00000000..f89e1b1a
--- /dev/null
+++ b/_Engineering_Thermodynamics_by__O._Singh/chapter12_3.ipynb
@@ -0,0 +1,818 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 12:Introduction to Heat Transfer"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 12.1;pg no: 483"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 12.1, Page:483 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 1\n",
+ "here for one dimentional heat transfer across the wall the heat transfer circuit shall comprises of thermal resistance due to convection between air & brick(R1),conduction in brick wall(R2),conduction in wood(R3),and convection between wood and air(R4).Let temperature at outer brick wall be T2 K,brick-wood interface be T3 K,outer wood wall be T4 K\n",
+ "overall heat transfer coefficient for steady state heat transfer(U)in W/m^2 K\n",
+ "(1/U)=(1/h1)+(deltax_brick/k_brick)+(deltax_wood/k_wood)+(1/h5)\n",
+ "so U=1/((1/h1)+(deltax_brick/k_brick)+(deltax_wood/k_wood)+(1/h5))\n",
+ "rate of heat transfer,Q in W= 10590.0\n",
+ "so rate of heat transfer=10590 W\n",
+ "heat transfer across states 1 and 3(at interface).\n",
+ "overall heat transfer coefficient between 1 and 3\n",
+ "(1/U1)=(1/h1)+(deltax_brick/k_brick)\n",
+ "so U1=1/((1/h1)+(deltax_brick/k_brick))in W/m^2 K\n",
+ "Q=U1*A*(T1-T3)\n",
+ "so T3=T1-(Q/(U1*A))in degree celcius 44.7\n",
+ "so temperature at interface of brick and wood =44.71 degree celcius\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of rate of heat transfer and temperature at interface of brick and wood\n",
+ "#intiation of all variables\n",
+ "# Chapter 12\n",
+ "import math\n",
+ "print\"Example 12.1, Page:483 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 1\")\n",
+ "h1=30.;#heat transfer coefficient on side of 50 oc in W/m^2 K\n",
+ "h5=10.;#heat transfer coefficient on side of 20 oc in W/m^2 K\n",
+ "k_brick=0.9;#conductivity of brick in W/m K\n",
+ "k_wood=0.15;#conductivity of wood in W/m K\n",
+ "T1=50.;#temperature of air on one side of wall in degree celcius\n",
+ "T5=20.;#temperature of air on other side of wall in degree celcius\n",
+ "A=100.;#surface area in m^2\n",
+ "deltax_brick=1.5*10**-2;#length of brick in m\n",
+ "deltax_wood=2*10**-2;#length of wood in m\n",
+ "print(\"here for one dimentional heat transfer across the wall the heat transfer circuit shall comprises of thermal resistance due to convection between air & brick(R1),conduction in brick wall(R2),conduction in wood(R3),and convection between wood and air(R4).Let temperature at outer brick wall be T2 K,brick-wood interface be T3 K,outer wood wall be T4 K\")\n",
+ "print(\"overall heat transfer coefficient for steady state heat transfer(U)in W/m^2 K\")\n",
+ "print(\"(1/U)=(1/h1)+(deltax_brick/k_brick)+(deltax_wood/k_wood)+(1/h5)\")\n",
+ "print(\"so U=1/((1/h1)+(deltax_brick/k_brick)+(deltax_wood/k_wood)+(1/h5))\")\n",
+ "U=1/((1/h1)+(deltax_brick/k_brick)+(deltax_wood/k_wood)+(1/h5))\n",
+ "U=3.53;#approx.\n",
+ "Q=U*A*(T1-T5)\n",
+ "print(\"rate of heat transfer,Q in W=\"),round(Q,2)\n",
+ "print(\"so rate of heat transfer=10590 W\")\n",
+ "print(\"heat transfer across states 1 and 3(at interface).\")\n",
+ "print(\"overall heat transfer coefficient between 1 and 3\")\n",
+ "print(\"(1/U1)=(1/h1)+(deltax_brick/k_brick)\")\n",
+ "print(\"so U1=1/((1/h1)+(deltax_brick/k_brick))in W/m^2 K\")\n",
+ "U1=1/((1/h1)+(deltax_brick/k_brick))\n",
+ "print(\"Q=U1*A*(T1-T3)\")\n",
+ "T3=T1-(Q/(U1*A))\n",
+ "print(\"so T3=T1-(Q/(U1*A))in degree celcius\"),round(T3,2)\n",
+ "print(\"so temperature at interface of brick and wood =44.71 degree celcius\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 12.2;pg no: 484"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 12.2, Page:484 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 2\n",
+ "here thermal resistances are\n",
+ "R1=thermal resistance due to convection between kitchen air and outer surface of refrigerator wall(T1 & T2)\n",
+ "R2=thermal resistance due to conduction across mild steel wall between 2 & 3(T2 & T3)\n",
+ "R3=thermal resistance due to conduction across glass wool between 3 & 4(T3 & T4)\n",
+ "R4=thermal resistance due to conduction across mild steel wall between 4 & 5(T4 & T5)\n",
+ "R5=thermal resistance due to convection between inside refrigerator wall and inside of refrigerator between 5 & 6(T5 & T6)\n",
+ "overall heat transfer coefficient for one dimentional steady state heat transfer\n",
+ "(1/U)=(1/h1)+(deltax_steel/k_steel)+(deltax_wool/k_wool)+(deltax_steel/k_steel)+(1/h6)\n",
+ "so U=1/((1/h1)+(deltax_steel/k_steel)+(deltax_wool/k_wool)+(deltax_steel/k_steel)+(1/h6))in KJ/m^2hr oc\n",
+ "rate of heat transfer(Q) in KJ/m^2 hr= 112.0\n",
+ "wall surface area(A) in m^2\n",
+ "so rate of heat transfer=112 KJ/m^2 hr \n",
+ "Q=A*h1*(T1-T2)=k_steel*A*(T2-T3)/deltax_steel=k_wool*A*(T3-T4)/deltax_wool\n",
+ "Q=k_steel*A*(T4-T5)/deltax_steel=A*h6*(T5-T6)\n",
+ "substituting,T2 in degree celcius= 23.6\n",
+ "so temperature of outer wall,T2=23.6 oc\n",
+ "T3 in degree= 23.6\n",
+ "so temperature at interface of outer steel wall and wool,T3=23.59 oc\n",
+ "T4 in degree celcius= 6.1\n",
+ "so temperature at interface of wool and inside steel wall,T4=6.09 oc\n",
+ "T5 in degree celcius= 6.1\n",
+ "so temperature at inside of inner steel wall,T5=6.08 oc\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of rate of heat transfer,temperatures\n",
+ "#intiation of all variables\n",
+ "# Chapter 12\n",
+ "import math\n",
+ "print\"Example 12.2, Page:484 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 2\")\n",
+ "h1=40;#average heat transfer coefficient at inner surface in KJ/m^2 hr oc\n",
+ "h6=50;#average heat transfer coefficient at outer surface in KJ/m^2 hr oc\n",
+ "deltax_steel=2*10**-3;#mild steel sheets thickness in m\n",
+ "deltax_wool=5*10**-2;#thickness of glass wool insulation in m\n",
+ "k_wool=0.16;#thermal conductivity of wool in KJ/m hr\n",
+ "k_steel=160;#thermal conductivity of steel in KJ/m hr\n",
+ "T1=25;#kitchen temperature in degree celcius\n",
+ "T6=5;#refrigerator temperature in degree celcius\n",
+ "print(\"here thermal resistances are\")\n",
+ "print(\"R1=thermal resistance due to convection between kitchen air and outer surface of refrigerator wall(T1 & T2)\")\n",
+ "print(\"R2=thermal resistance due to conduction across mild steel wall between 2 & 3(T2 & T3)\")\n",
+ "print(\"R3=thermal resistance due to conduction across glass wool between 3 & 4(T3 & T4)\")\n",
+ "print(\"R4=thermal resistance due to conduction across mild steel wall between 4 & 5(T4 & T5)\")\n",
+ "print(\"R5=thermal resistance due to convection between inside refrigerator wall and inside of refrigerator between 5 & 6(T5 & T6)\")\n",
+ "print(\"overall heat transfer coefficient for one dimentional steady state heat transfer\")\n",
+ "print(\"(1/U)=(1/h1)+(deltax_steel/k_steel)+(deltax_wool/k_wool)+(deltax_steel/k_steel)+(1/h6)\")\n",
+ "print(\"so U=1/((1/h1)+(deltax_steel/k_steel)+(deltax_wool/k_wool)+(deltax_steel/k_steel)+(1/h6))in KJ/m^2hr oc\")\n",
+ "U=1/((1/h1)+(deltax_steel/k_steel)+(deltax_wool/k_wool)+(deltax_steel/k_steel)+(1/h6))\n",
+ "U=2.8;#approx.\n",
+ "A=4*(1*0.5)\n",
+ "Q=U*A*(T1-T6)\n",
+ "print(\"rate of heat transfer(Q) in KJ/m^2 hr=\"),round(Q,2)\n",
+ "print(\"wall surface area(A) in m^2\")\n",
+ "print(\"so rate of heat transfer=112 KJ/m^2 hr \")\n",
+ "print(\"Q=A*h1*(T1-T2)=k_steel*A*(T2-T3)/deltax_steel=k_wool*A*(T3-T4)/deltax_wool\")\n",
+ "print(\"Q=k_steel*A*(T4-T5)/deltax_steel=A*h6*(T5-T6)\")\n",
+ "T2=T1-(Q/(A*h1))\n",
+ "print(\"substituting,T2 in degree celcius=\"),round(T2,1)\n",
+ "print(\"so temperature of outer wall,T2=23.6 oc\")\n",
+ "T3=T2-(Q*deltax_steel/(k_steel*A))\n",
+ "print(\"T3 in degree= \"),round(T3,2)\n",
+ "print(\"so temperature at interface of outer steel wall and wool,T3=23.59 oc\")\n",
+ "T4=T3-(Q*deltax_wool/(k_wool*A))\n",
+ "print(\"T4 in degree celcius=\"),round(T4,2)\n",
+ "print(\"so temperature at interface of wool and inside steel wall,T4=6.09 oc\")\n",
+ "T5=T4-(Q*deltax_steel/(k_steel*A))\n",
+ "print(\"T5 in degree celcius=\"),round(T5,2)\n",
+ "print(\"so temperature at inside of inner steel wall,T5=6.08 oc\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 12.3;pg no: 486"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 12.3, Page:486 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 3\n",
+ "here,heat conduction is considered in pipe wall from 1 to 2 and conduction through insulation between 2 and 3 of one dimentional steady state type.\n",
+ "Q=(T1-T3)*2*%pi*L/((1/k_pipe)*log(r2/r1)+(1/k_insulation*log(r3/r2)))in KJ/hr\n",
+ "so heat loss per meter from pipe in KJ/hr= 1479.77\n",
+ "heat loss from 5 m length(Q) in KJ/hr 7396.7\n",
+ "enthalpy of saturated steam at 300 oc,h_sat=2749 KJ/kg=hg from steam table\n",
+ "mass flow of steam(m)in kg/hr\n",
+ "final enthalpy of steam per kg at exit of 5 m pipe(h)in KJ/kg\n",
+ "let quality of steam at exit be x,\n",
+ "also at 300oc,hf=1344 KJ/kg,hfg=1404.9 KJ/kg from steam table\n",
+ "h=hf+x*hfg\n",
+ "so x=(h-hf)/hfg 0.8245\n",
+ "so quality of steam at exit=0.8245\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of heat loss per meter from pipe and quality of steam\n",
+ "#intiation of all variables\n",
+ "# Chapter 12\n",
+ "import math\n",
+ "print\"Example 12.3, Page:486 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 3\")\n",
+ "k_insulation=0.3;#thermal conductivity of insulation in KJ/m hr oc\n",
+ "k_pipe=209;#thermal conductivity of pipe in KJ/m hr oc\n",
+ "T1=300;#temperature of inner surface of steam pipe in degree celcius\n",
+ "T3=50;#temperature of outer surface of insulation layer in degree celcius\n",
+ "r1=15*10**-2/2;#steam pipe inner radius without insulation in m\n",
+ "r2=16*10**-2/2;#steam pipe outer radius without insulation in m\n",
+ "r3=22*10**-2/2;#radius with insulation in m\n",
+ "m=0.5;#steam entering rate in kg/min\n",
+ "print(\"here,heat conduction is considered in pipe wall from 1 to 2 and conduction through insulation between 2 and 3 of one dimentional steady state type.\")\n",
+ "print(\"Q=(T1-T3)*2*%pi*L/((1/k_pipe)*log(r2/r1)+(1/k_insulation*log(r3/r2)))in KJ/hr\")\n",
+ "L=1;\n",
+ "Q=(T1-T3)*2*math.pi*L/((1/k_pipe)*math.log(r2/r1)+(1/k_insulation*math.log(r3/r2)))\n",
+ "print(\"so heat loss per meter from pipe in KJ/hr=\"),round(Q,2)\n",
+ "Q=5*Q\n",
+ "print(\"heat loss from 5 m length(Q) in KJ/hr\"),round(5*1479.34,2)\n",
+ "print(\"enthalpy of saturated steam at 300 oc,h_sat=2749 KJ/kg=hg from steam table\")\n",
+ "hg=2749;\n",
+ "print(\"mass flow of steam(m)in kg/hr\")\n",
+ "m=m*60\n",
+ "print(\"final enthalpy of steam per kg at exit of 5 m pipe(h)in KJ/kg\")\n",
+ "h=hg-(Q/m)\n",
+ "print(\"let quality of steam at exit be x,\")\n",
+ "print(\"also at 300oc,hf=1344 KJ/kg,hfg=1404.9 KJ/kg from steam table\")\n",
+ "hf=1344;\n",
+ "hfg=1404.9;\n",
+ "print(\"h=hf+x*hfg\")\n",
+ "x=(h-hf)/hfg\n",
+ "print(\"so x=(h-hf)/hfg\"),round(x,4)\n",
+ "print(\"so quality of steam at exit=0.8245\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 12.4;pg no: 487"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 12.4, Page:487 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 4\n",
+ "considering one dimensional heat transfer of steady state type\n",
+ "for sphere(Q)=(T1-T2)*4*%pi*k*r1*r2/(r2-r1) in KJ/hr 168892.02\n",
+ "so heat transfer rate=168892.02 KJ/hr\n",
+ "heat flux in KJ/m^2 hr= 23893.33\n",
+ "so heat flux=23893.33 KJ/m^2 hr\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of amount of heat transfer and heat flux\n",
+ "#intiation of all variables\n",
+ "# Chapter 12\n",
+ "import math\n",
+ "print\"Example 12.4, Page:487 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 4\")\n",
+ "r1=150.*10**-2/2;#inner radius in m\n",
+ "r2=200.*10**-2/2;#outer radius in m\n",
+ "k=28.;#thermal conductivity in KJ m hr oc\n",
+ "T1=200.;#inside surface temperature in degree celcius\n",
+ "T2=40.;#outer surface temperature in degree celcius\n",
+ "print(\"considering one dimensional heat transfer of steady state type\")\n",
+ "Q=(T1-T2)*4*math.pi*k*r1*r2/(r2-r1)\n",
+ "print(\"for sphere(Q)=(T1-T2)*4*%pi*k*r1*r2/(r2-r1) in KJ/hr\"),round(Q,2)\n",
+ "print(\"so heat transfer rate=168892.02 KJ/hr\")\n",
+ "Q/(4*math.pi*r1**2)\n",
+ "print(\"heat flux in KJ/m^2 hr=\"),round(Q/(4*math.pi*r1**2),2)\n",
+ "print(\"so heat flux=23893.33 KJ/m^2 hr\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 12.5;pg no: 487"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 12.5, Page:487 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 5\n",
+ "R1=thermal resistance for convection heat transfer between inside room (1)and inside surface of glass window(2)=1/(h1*A)\n",
+ "R2=thermal resistance for conduction through glass between inside of glass window(2)to outside surface of glass window(3)=deltax/(k*A)\n",
+ "R3=thermal resistance for convection heat transfer between outside surface of glass window(3)to outside atmosphere(4)=1/(h4*A)\n",
+ "total thermal resistance,R_total=R1+R2+R3 in oc/W\n",
+ "so rate of heat transfer,Q=(T1-T4)/R_total in W 118.03\n",
+ "heat transfer rate from inside of room to inside surface of glass window.\n",
+ "Q=(T1-T2)/R1\n",
+ "so T2=T1-Q*R1 in degree celcius 9.26\n",
+ "Thus,inside surface of glass window will be at temperature of 9.26 oc where as room inside temperature is 25 oc\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of heat transfer rate\n",
+ "#intiation of all variables\n",
+ "# Chapter 12\n",
+ "import math\n",
+ "print\"Example 12.5, Page:487 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 5\")\n",
+ "T1=25.;#room temperature in degree celcius\n",
+ "T4=2.;#winter outside temperature in degree celcius\n",
+ "h1=10.;#heat transfer coefficient on inner window surfaces in W/m^2 oc\n",
+ "h4=30.;#heat transfer coefficient on outer window surfaces in W/m^2 oc\n",
+ "k=0.78;#thermal conductivity of glass in W/m^2 oc\n",
+ "A=75.*10**-2*100.*10**-2;#area in m^2\n",
+ "deltax=10.*10**-3;#glass thickness in m\n",
+ "print(\"R1=thermal resistance for convection heat transfer between inside room (1)and inside surface of glass window(2)=1/(h1*A)\")\n",
+ "print(\"R2=thermal resistance for conduction through glass between inside of glass window(2)to outside surface of glass window(3)=deltax/(k*A)\")\n",
+ "print(\"R3=thermal resistance for convection heat transfer between outside surface of glass window(3)to outside atmosphere(4)=1/(h4*A)\")\n",
+ "print(\"total thermal resistance,R_total=R1+R2+R3 in oc/W\")\n",
+ "R_total=1/(h1*A)+deltax/(k*A)+1/(h4*A)\n",
+ "Q=(T1-T4)/R_total\n",
+ "print(\"so rate of heat transfer,Q=(T1-T4)/R_total in W\"),round(Q,2)\n",
+ "print(\"heat transfer rate from inside of room to inside surface of glass window.\")\n",
+ "R1=(1/7.5);\n",
+ "T2=T1-Q*R1\n",
+ "print(\"Q=(T1-T2)/R1\")\n",
+ "print(\"so T2=T1-Q*R1 in degree celcius\"),round(T2,2)\n",
+ "print(\"Thus,inside surface of glass window will be at temperature of 9.26 oc where as room inside temperature is 25 oc\") \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 12.6;pg no: 488"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 12.6, Page:488 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 6\n",
+ "reynolds number,Re=V*D/v\n",
+ "subsituting in Nu=0.023*(Re)^0.8*(Pr)^0.4\n",
+ "or (h*D/k)=0.023*(Re)^0.8*(Pr)^0.4\n",
+ "so h=(k/D)*0.023*(Re)^0.8*(Pr)^0.4 in W/m^2 K\n",
+ "rate of heat transfer due to convection,Q in W \n",
+ "Q=h*A*(T2-T1)= 61259.36\n",
+ "so heat transfer rate=61259.38 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of heat transfer rate\n",
+ "#intiation of all variables\n",
+ "# Chapter 12\n",
+ "import math\n",
+ "print\"Example 12.6, Page:488 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 6\")\n",
+ "D=4*10**-2;#inner diameter in m\n",
+ "L=3;#length in m\n",
+ "V=1;#velocity of water in m/s\n",
+ "T1=40;#mean temperature in degree celcius\n",
+ "T2=75;#pipe wall temperature in degree celcius \n",
+ "k=0.6;#conductivity of water in W/m\n",
+ "Pr=3;#prandtl no.\n",
+ "v=0.478*10**-6;#viscocity in m^2/s\n",
+ "print(\"reynolds number,Re=V*D/v\")\n",
+ "Re=V*D/v\n",
+ "print(\"subsituting in Nu=0.023*(Re)^0.8*(Pr)^0.4\")\n",
+ "print(\"or (h*D/k)=0.023*(Re)^0.8*(Pr)^0.4\")\n",
+ "print(\"so h=(k/D)*0.023*(Re)^0.8*(Pr)^0.4 in W/m^2 K\")\n",
+ "h=(k/D)*0.023*(Re)**0.8*(Pr)**0.4 \n",
+ "print(\"rate of heat transfer due to convection,Q in W \") \n",
+ "Q=h*(math.pi*D*L)*(T2-T1)\n",
+ "print(\"Q=h*A*(T2-T1)=\"),round(Q,2)\n",
+ "print(\"so heat transfer rate=61259.38 W\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 12.7;pg no: 489"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 12.7, Page:489 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 7\n",
+ "Let the temperature of water at exit be T\n",
+ "Heat exchanger,Q=heat rejected by glasses=heat gained by water\n",
+ "Q=m*Cg*(T1-T2)=mw*Cw*(T-T3)\n",
+ "so T=T3+(m*Cg*(T1-T2)/(mw*Cw))in degree celcius\n",
+ "and Q in KJ\n",
+ "deltaT_in=T1-T3 in degree celcius\n",
+ "deltaT_out=T2-T in degree celcius\n",
+ "for parallel flow heat exchanger,\n",
+ "LMTD=(deltaT_in-deltaT_out)/log(deltaT_in/deltaT_out)in degree celcius\n",
+ "also,Q=U*A*LMTD\n",
+ "so A=Q/(U*LMTD) in m^2 5.937\n",
+ "surface area,A=5.936 m^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of surface area\n",
+ "#intiation of all variables\n",
+ "# Chapter 12\n",
+ "import math\n",
+ "print\"Example 12.7, Page:489 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 7\")\n",
+ "m=0.5;#hot gases flowing rate in kg/s\n",
+ "T1=500;#initial temperature of gas in degree celcius\n",
+ "T2=150;#final temperature of gas in degree celcius\n",
+ "Cg=1.2;#specific heat of gas in KJ/kg K\n",
+ "Cw=4.18;#specific heat of water in KJ/kg K\n",
+ "U=150;#overall heat transfer coefficient in W/m^2 K\n",
+ "mw=1;#mass of water in kg/s\n",
+ "T3=10;#water entering temperature in degree celcius\n",
+ "print(\"Let the temperature of water at exit be T\")\n",
+ "print(\"Heat exchanger,Q=heat rejected by glasses=heat gained by water\")\n",
+ "print(\"Q=m*Cg*(T1-T2)=mw*Cw*(T-T3)\")\n",
+ "print(\"so T=T3+(m*Cg*(T1-T2)/(mw*Cw))in degree celcius\")\n",
+ "T=T3+(m*Cg*(T1-T2)/(mw*Cw))\n",
+ "print(\"and Q in KJ\")\n",
+ "Q=m*Cg*(T1-T2)\n",
+ "print(\"deltaT_in=T1-T3 in degree celcius\")\n",
+ "deltaT_in=T1-T3\n",
+ "print(\"deltaT_out=T2-T in degree celcius\")\n",
+ "deltaT_out=T2-T\n",
+ "print(\"for parallel flow heat exchanger,\")\n",
+ "print(\"LMTD=(deltaT_in-deltaT_out)/log(deltaT_in/deltaT_out)in degree celcius\")\n",
+ "LMTD=(deltaT_in-deltaT_out)/math.log(deltaT_in/deltaT_out)\n",
+ "print(\"also,Q=U*A*LMTD\")\n",
+ "A=Q*10**3/(U*LMTD)\n",
+ "print(\"so A=Q/(U*LMTD) in m^2\"),round(A,3)\n",
+ "print(\"surface area,A=5.936 m^2\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 12.8;pg no: 490"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 12.8, Page:490 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 8\n",
+ "This oil cooler has arrangement similar to a counter flow heat exchanger.\n",
+ "by heat exchanger,Q=U*A*LMTD=mc*Cpc*(Tc_out-Th_in)=mh*Cph*(Tc_in-Th_out)\n",
+ "so Q in KJ/min\n",
+ "and T=Th_out+(Q/(mh*Cph))in degree celcius\n",
+ "LMTD=(deltaT_in-deltaT_out)/log(deltaT_in/deltaT_out)in degree \n",
+ "here deltaT_in=Tc_out-T in degree celcius\n",
+ "deltaT_out=Th_in-Th_out in degree celcius\n",
+ "so LMTD in degree celcius\n",
+ "substituting in,Q=U*A*LMTD\n",
+ "A=(Q*10^3/60)/(U*LMTD)in m^2 132.81\n",
+ "so surface area=132.85 m^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of surface area\n",
+ "#intiation of all variables\n",
+ "# Chapter 12\n",
+ "import math\n",
+ "print\"Example 12.8, Page:490 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 8\")\n",
+ "mc=20;#mass of oil in kg/min \n",
+ "Tc_out=100;#initial temperature of oil in degree celcius\n",
+ "Th_in=30;#final temperature of oil in degree celcius\n",
+ "Th_out=25;#temperature of water in degree celcius\n",
+ "Cpc=2;#specific heat of oil in KJ/kg K\n",
+ "Cph=4.18;#specific heat of water in KJ/kg K\n",
+ "mh=15;#water flow rate in kg/min\n",
+ "U=25;#overall heat transfer coefficient in W/m^2 K\n",
+ "print(\"This oil cooler has arrangement similar to a counter flow heat exchanger.\")\n",
+ "print(\"by heat exchanger,Q=U*A*LMTD=mc*Cpc*(Tc_out-Th_in)=mh*Cph*(Tc_in-Th_out)\")\n",
+ "print(\"so Q in KJ/min\")\n",
+ "Q=mc*Cpc*(Tc_out-Th_in)\n",
+ "print(\"and T=Th_out+(Q/(mh*Cph))in degree celcius\")\n",
+ "T=Th_out+(Q/(mh*Cph))\n",
+ "print(\"LMTD=(deltaT_in-deltaT_out)/log(deltaT_in/deltaT_out)in degree \")\n",
+ "print(\"here deltaT_in=Tc_out-T in degree celcius\")\n",
+ "deltaT_in=Tc_out-T\n",
+ "print(\"deltaT_out=Th_in-Th_out in degree celcius\")\n",
+ "deltaT_out=Th_in-Th_out\n",
+ "print(\"so LMTD in degree celcius\")\n",
+ "LMTD=(deltaT_in-deltaT_out)/math.log(deltaT_in/deltaT_out)\n",
+ "print(\"substituting in,Q=U*A*LMTD\")\n",
+ "A=(Q*10**3/60)/(U*LMTD)\n",
+ "print(\"A=(Q*10^3/60)/(U*LMTD)in m^2\"),round(A,2)\n",
+ "print(\"so surface area=132.85 m^2\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 12.9;pg no: 490"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 12.9, Page:490 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 9\n",
+ "rate of heat loss by radiation(Q)=wpsilon*sigma*A*(T1^4-T2^4)\n",
+ "heat loss per unit area by radiation(Q)in W\n",
+ "Q= 93597.71\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of heat loss per unit area by radiation\n",
+ "#intiation of all variables\n",
+ "# Chapter 12\n",
+ "import math\n",
+ "print\"Example 12.9, Page:490 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 9\")\n",
+ "T1=(1200+273);#temperature of body in K\n",
+ "T2=(600+273);#temperature of black surrounding in K\n",
+ "epsilon=0.4;#emissivity of body at 1200 degree celcius\n",
+ "sigma=5.67*10**-8;#stephen boltzman constant in W/m^2 K^4\n",
+ "print(\"rate of heat loss by radiation(Q)=wpsilon*sigma*A*(T1^4-T2^4)\")\n",
+ "print(\"heat loss per unit area by radiation(Q)in W\")\n",
+ "Q=epsilon*sigma*(T1**4-T2**4)\n",
+ "print(\"Q=\"),round(Q,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 12.10;pg no: 491"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 12.10, Page:491 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 10\n",
+ "Let us carry out one dimentional analysis for steady state.Due to flow of electricity the heat generated can be given as:\n",
+ "Q=V*I in W\n",
+ "For steady state which means there should be no change in temperature of cable due to electricity flow,the heat generated should be transferred out to surroundings.Therefore,heat transfer across table should be 80 W\n",
+ "surface area for heat transfer,A2=2*%pi*r*L in m^2\n",
+ "R1=thermal resistance due to convection between surroundings and cable outer surface,(1-2)=1/(h1*A2)\n",
+ "R2=thermal resistance due to conduction across plastic insulation(2-3)=log(r2/r3)/(2*%pi*k*L)\n",
+ "Total resistance,R_total=R1+R2 in oc/W\n",
+ "Q=(T3-T1)/R_total\n",
+ "so T3 in degree celcius= 98.28\n",
+ "so temperature at interface=125.12 degree celcius\n",
+ "critical radius of insulation,rc in m= 0.01\n",
+ "rc in mm 10.67\n",
+ "This rc is more than outer radius of cable so the increase in thickness of insulation upon rc=110.66 mmwould increase rate of heat transfer.Doubling insulation thickness means new outer radius would be r1=1.5+5=6.5 mm.Hence doubling(increase) of insulation thickness would increase heat transfer and thus temperature at interface would decrease if other parameters reamins constant.\n",
+ "NOTE=>In this question value of R_total is calculated wrong in book,hence it is correctly solve above,so the values of R_total and T3 may vary.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of temperature at interface\n",
+ "#intiation of all variables\n",
+ "# Chapter 12\n",
+ "import math\n",
+ "print\"Example 12.10, Page:491 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 10\")\n",
+ "V=16.;#voltage drop in V\n",
+ "I=5.;#current in cable in A\n",
+ "r2=8.*10.**-3/2.;#outer cable radius in m\n",
+ "r3=3.*10.**-3/2.;#copper wire radius in m\n",
+ "k=0.16;#thermal conductivity of copper wire in W/m oc\n",
+ "L=5.;#length of cable in m\n",
+ "h1=15.;#heat transfer coefficient of cable in W/m^2 oc\n",
+ "T1=40.;#temperature of surrounding in degree celcius\n",
+ "print(\"Let us carry out one dimentional analysis for steady state.Due to flow of electricity the heat generated can be given as:\")\n",
+ "print(\"Q=V*I in W\")\n",
+ "Q=V*I\n",
+ "print(\"For steady state which means there should be no change in temperature of cable due to electricity flow,the heat generated should be transferred out to surroundings.Therefore,heat transfer across table should be 80 W\")\n",
+ "print(\"surface area for heat transfer,A2=2*%pi*r*L in m^2\")\n",
+ "A2=2.*math.pi*r2*L\n",
+ "A2=0.125;#approx.\n",
+ "print(\"R1=thermal resistance due to convection between surroundings and cable outer surface,(1-2)=1/(h1*A2)\")\n",
+ "print(\"R2=thermal resistance due to conduction across plastic insulation(2-3)=log(r2/r3)/(2*%pi*k*L)\")\n",
+ "print(\"Total resistance,R_total=R1+R2 in oc/W\")\n",
+ "R_total=(1/(h1*A2))+(math.log(r2/r3)/(2.*math.pi*k*L))\n",
+ "print(\"Q=(T3-T1)/R_total\")\n",
+ "T3=T1+Q*R_total\n",
+ "print(\"so T3 in degree celcius=\"),round(T3,2)\n",
+ "print(\"so temperature at interface=125.12 degree celcius\")\n",
+ "rc=k/h1\n",
+ "print(\"critical radius of insulation,rc in m=\"),round(rc,2)\n",
+ "print(\"rc in mm\"),round(rc*1000,2)\n",
+ "print(\"This rc is more than outer radius of cable so the increase in thickness of insulation upon rc=110.66 mmwould increase rate of heat transfer.Doubling insulation thickness means new outer radius would be r1=1.5+5=6.5 mm.Hence doubling(increase) of insulation thickness would increase heat transfer and thus temperature at interface would decrease if other parameters reamins constant.\")\n",
+ "print(\"NOTE=>In this question value of R_total is calculated wrong in book,hence it is correctly solve above,so the values of R_total and T3 may vary.\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 12.11;pg no: 492"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 12.11, Page:492 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 11\n",
+ "for maximum heat transfer the critical radius of insulation should be used.\n",
+ "critical radius of insulation(rc)=k/h in mm\n",
+ "economical thickness of insulation(t)=rc-r_wire in mm\n",
+ "so economical thickness of insulation=7 mm\n",
+ "heat convected from cable surface to environment,Q in W\n",
+ "Q= 35.2\n",
+ "so heat transferred per unit length=35.2 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of heat transferred per unit length\n",
+ "#intiation of all variables\n",
+ "# Chapter 12\n",
+ "import math\n",
+ "print\"Example 12.11, Page:492 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 11\")\n",
+ "r_wire=3;#radius of electric wire in mm\n",
+ "k=0.16;#thermal conductivity in W/m oc\n",
+ "T_surrounding=45;#temperature of surrounding in degree celcius\n",
+ "T_surface=80;#temperature of surface in degree celcius\n",
+ "h=16;#heat transfer cooefficient in W/m^2 oc\n",
+ "print(\"for maximum heat transfer the critical radius of insulation should be used.\")\n",
+ "print(\"critical radius of insulation(rc)=k/h in mm\")\n",
+ "rc=k*1000/h\n",
+ "print(\"economical thickness of insulation(t)=rc-r_wire in mm\")\n",
+ "t=rc-r_wire\n",
+ "print(\"so economical thickness of insulation=7 mm\")\n",
+ "print(\"heat convected from cable surface to environment,Q in W\")\n",
+ "L=1;#length in mm\n",
+ "Q=2*math.pi*rc*L*h*(T_surface-T_surrounding)*10**-3\n",
+ "print(\"Q=\"),round(Q,1)\n",
+ "print(\"so heat transferred per unit length=35.2 W\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 12.12;pg no: 492"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 12.12, Page:492 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 12 Example 12\n",
+ "heat transfer through concentric sphere,Q in KJ/hr \n",
+ "Q= -6297.1\n",
+ "so heat exchange=6297.1 KJ/hr\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of heat exchange\n",
+ "#intiation of all variables\n",
+ "# Chapter 12\n",
+ "import math\n",
+ "print\"Example 12.12, Page:492 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 12 Example 12\")\n",
+ "T1=(-150+273);#temperature of air inside in K\n",
+ "T2=(35+273);#temperature of outer surface in K\n",
+ "epsilon1=0.03;#emissivity\n",
+ "epsilon2=epsilon1;\n",
+ "D1=25*10**-2;#diameter of inner sphere in m\n",
+ "D2=30*10**-2;#diameter of outer sphere in m\n",
+ "sigma=2.04*10**-4;#stephen boltzmann constant in KJ/m^2 hr K^4\n",
+ "print(\"heat transfer through concentric sphere,Q in KJ/hr \")\n",
+ "A1=4*math.pi*D1**2/4;\n",
+ "A2=4*math.pi*D2**2/4;\n",
+ "Q=(A1*sigma*(T1**4-T2**4))/((1/epsilon1)+((A1/A2)*((1/epsilon2)-1)))\n",
+ "print(\"Q=\"),round(Q,2)\n",
+ "print(\"so heat exchange=6297.1 KJ/hr\")"
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter13_3.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter13_3.ipynb
new file mode 100644
index 00000000..836097b9
--- /dev/null
+++ b/_Engineering_Thermodynamics_by__O._Singh/chapter13_3.ipynb
@@ -0,0 +1,375 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 13:One Dimensional Compressible Fluid Flow"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 13.1;pg no: 525"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 13.1, Page:525 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 13 Example 1\n",
+ "mass flow rate(m)=rho*A*C\n",
+ "so rho*C=4*m/(%pi*d^2)\n",
+ "so rho=165.79/C\n",
+ "now using perfect gas equation,p=rho*R*T\n",
+ "T=P/(rho*R)=P/((165.79/C)*R)\n",
+ "C/T=165.79*R/P\n",
+ "so C=1.19*T\n",
+ "we know,C^2=((2*y*R)/(y-1))*(To-T)\n",
+ "C^2=(2*1.4*287)*(300-T)/(1.4-1)\n",
+ "C^2=602.7*10^3-2009*T\n",
+ "C^2+1688.23*C-602.7*10^3=0\n",
+ "solving we get,C=302.72 m/s and T=254.39 K\n",
+ "using stagnation property relation,\n",
+ "To/T=1+(y-1)*M^2/2\n",
+ "so M= 0.947\n",
+ "stagnation pressure,Po in bar= 0.472\n",
+ "so mach number=0.947,stagnation pressure=0.472 bar,velocity=302.72 m/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of mach number,stagnation pressure,velocity\n",
+ "#intiation of all variables\n",
+ "# Chapter 13\n",
+ "import math\n",
+ "print\"Example 13.1, Page:525 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 13 Example 1\")\n",
+ "To=(27+273);#stagnation temperature in K\n",
+ "P=0.4*10**5;#static pressure in pa\n",
+ "m=3000/3600;#air flowing rate in kg/s\n",
+ "d=80*10**-3;#diameter of duct in m\n",
+ "R=287;#gas constant in J/kg K\n",
+ "y=1.4;#expansion constant\n",
+ "print(\"mass flow rate(m)=rho*A*C\")\n",
+ "print(\"so rho*C=4*m/(%pi*d^2)\")\n",
+ "4*m/(math.pi*d**2)\n",
+ "print(\"so rho=165.79/C\")\n",
+ "print(\"now using perfect gas equation,p=rho*R*T\")\n",
+ "print(\"T=P/(rho*R)=P/((165.79/C)*R)\")\n",
+ "print(\"C/T=165.79*R/P\")\n",
+ "165.79*R/P\n",
+ "print(\"so C=1.19*T\")\n",
+ "print(\"we know,C^2=((2*y*R)/(y-1))*(To-T)\")\n",
+ "print(\"C^2=(2*1.4*287)*(300-T)/(1.4-1)\")\n",
+ "print(\"C^2=602.7*10^3-2009*T\")\n",
+ "print(\"C^2+1688.23*C-602.7*10^3=0\")\n",
+ "print(\"solving we get,C=302.72 m/s and T=254.39 K\")\n",
+ "C=302.72;\n",
+ "T=254.39;\n",
+ "print(\"using stagnation property relation,\")\n",
+ "print(\"To/T=1+(y-1)*M^2/2\")\n",
+ "M=math.sqrt(((To/T)-1)/((y-1)/2))\n",
+ "print(\"so M=\"),round(M,3)\n",
+ "M=0.947;#approx.\n",
+ "Po=P*(1+(y-1)*M**2/2)/10**5\n",
+ "print(\"stagnation pressure,Po in bar=\"),round(Po,3)\n",
+ "print(\"so mach number=0.947,stagnation pressure=0.472 bar,velocity=302.72 m/s\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 13.2;pg no: 525"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 13.2, Page:525 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 13 Example 2\n",
+ "mach number,M_a=(1/sin(a))=sqrt(2)\n",
+ "here,P/Po=0.25/1.01=0.2475.Corresponding to this P/Po ratio the mach number and T/To can be seen from air table as M=1.564 and T/To=0.6717\n",
+ "T=To*0.6717 in K\n",
+ "and C_max=M*sqrt(y*R*T) in m/s\n",
+ "corresponding to mach number(M_a=1.414)as obtained from experimental observation,the T/To can be seen from air table and it comes out as (T/To)=0.7145\n",
+ "so T=0.7145*To in K\n",
+ "and C_av=M_a*sqrt(y*R*T) in m/s\n",
+ "ratio of kinetic energy= 0.869\n",
+ "so ratio of kinetic energy=0.869\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of ratio of kinetic energy\n",
+ "#intiation of all variables\n",
+ "# Chapter 13\n",
+ "import math\n",
+ "print\"Example 13.2, Page:525 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 13 Example 2\")\n",
+ "To=(273.+1100.);#stagnation temperature in K\n",
+ "a=45.;#mach angle over exit cross-section in degree\n",
+ "Po=1.01;#pressure at upstream side of nozzle in bar\n",
+ "P=0.25;#ststic pressure in bar\n",
+ "y=1.4;#expansion constant \n",
+ "R=287.;#gas constant in J/kg K\n",
+ "print(\"mach number,M_a=(1/sin(a))=sqrt(2)\")\n",
+ "M_a=math.sqrt(2)\n",
+ "M_a=1.414;#approx.\n",
+ "print(\"here,P/Po=0.25/1.01=0.2475.Corresponding to this P/Po ratio the mach number and T/To can be seen from air table as M=1.564 and T/To=0.6717\")\n",
+ "M=1.564;\n",
+ "print(\"T=To*0.6717 in K\")\n",
+ "T=To*0.6717\n",
+ "print(\"and C_max=M*sqrt(y*R*T) in m/s\")\n",
+ "C_max=M*math.sqrt(y*R*T)\n",
+ "print(\"corresponding to mach number(M_a=1.414)as obtained from experimental observation,the T/To can be seen from air table and it comes out as (T/To)=0.7145\")\n",
+ "print(\"so T=0.7145*To in K\")\n",
+ "T=0.7145*To\n",
+ "print(\"and C_av=M_a*sqrt(y*R*T) in m/s\")\n",
+ "C_av=M_a*math.sqrt(y*R*T)\n",
+ "print(\"ratio of kinetic energy=\"),round(((1./2.)*C_av**2)/((1./2.)*C_max**2),3)\n",
+ "print(\"so ratio of kinetic energy=0.869\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 13.3;pg no: 526"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 13.3, Page:526 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 13 Example 3\n",
+ "From bernoulli equation,Po-P=(1/2)*rho*C^2\n",
+ "so Po=P+(1/2)*rho*C^2 in N/m^2\n",
+ "speed indicator reading shall be given by mach no.s\n",
+ "mach no.,M=C/a=C/sqrt(y*R*T)\n",
+ "using perfect gas equation,P=rho*R*T\n",
+ "so T=P/(rho*R)in K\n",
+ "so mach no.,M 0.95\n",
+ "considering compressibility effect,Po/P=(1+(y-1)*M^2/2)^(y/(y-1))\n",
+ "so stagnation pressure,Po=P*((1+(y-1)*M^2/2)^(y/(y-1)))in N/m^2\n",
+ "also Po-P=(1+k)*(1/2)*rho*C^2\n",
+ "substitution yields,k= 0.2437\n",
+ "so compressibility correction factor,k=0.2437\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of mach no,compressibility correction factor\n",
+ "#intiation of all variables\n",
+ "# Chapter 13\n",
+ "import math\n",
+ "print\"Example 13.3, Page:526 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 13 Example 3\")\n",
+ "C=300.;#aircraft flying speed in m/s\n",
+ "P=0.472*10**5;#altitude pressure in Pa\n",
+ "rho=0.659;#density in kg/m^3\n",
+ "y=1.4;#expansion constant\n",
+ "R=287.;#gas constant in J/kg K\n",
+ "print(\"From bernoulli equation,Po-P=(1/2)*rho*C^2\")\n",
+ "print(\"so Po=P+(1/2)*rho*C^2 in N/m^2\")\n",
+ "Po=P+(1/2)*rho*C**2\n",
+ "print(\"speed indicator reading shall be given by mach no.s\")\n",
+ "print(\"mach no.,M=C/a=C/sqrt(y*R*T)\")\n",
+ "print(\"using perfect gas equation,P=rho*R*T\")\n",
+ "print(\"so T=P/(rho*R)in K\")\n",
+ "T=P/(rho*R)\n",
+ "M=C/math.sqrt(y*R*T)\n",
+ "print(\"so mach no.,M\"),round(M,2)\n",
+ "M=0.947;#approx.\n",
+ "print(\"considering compressibility effect,Po/P=(1+(y-1)*M^2/2)^(y/(y-1))\")\n",
+ "print(\"so stagnation pressure,Po=P*((1+(y-1)*M^2/2)^(y/(y-1)))in N/m^2\")\n",
+ "Po=P*((1+(y-1)*M**2/2)**(y/(y-1)))\n",
+ "print(\"also Po-P=(1+k)*(1/2)*rho*C^2\")\n",
+ "k=((Po-P)/((1./2.)*rho*C**2))-1.\n",
+ "print(\"substitution yields,k=\"),round(k,4)\n",
+ "print(\"so compressibility correction factor,k=0.2437\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 13.4;pg no: 527"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 13.4, Page:527 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 13 Example 4\n",
+ "we know that,Po/P=(1+(y-1)*M^2/2)^((y)/(y-1))\n",
+ "so M= 1.897\n",
+ "so mach number,M=1.89\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of mach number\n",
+ "#intiation of all variables\n",
+ "# Chapter 13\n",
+ "import math\n",
+ "print\"Example 13.4, Page:527 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 13 Example 4\")\n",
+ "Po=2;#total pressure in bar\n",
+ "P=0.3;#static pressure in bar\n",
+ "y=1.4;#expansion constant\n",
+ "print(\"we know that,Po/P=(1+(y-1)*M^2/2)^((y)/(y-1))\")\n",
+ "M=math.sqrt((math.exp(math.log(Po/P)/(y/(y-1)))-1)/((y-1)/2))\n",
+ "print(\"so M=\"),round(M,3)\n",
+ "print(\"so mach number,M=1.89\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 13.5;pg no: 527"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 13.5, Page:527 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 13 Example 5\n",
+ "actual static pressure(P)=1+0.3 in bar\n",
+ "It is also given that,Po-P=0.6,\n",
+ "so Po=P+0.6 in bar\n",
+ "air velocity,ao=sqrt(y*R*To)in m/s\n",
+ "density of air,rho_o=Po/(R*To)in \n",
+ "considering air to be in-compressible,\n",
+ "Po=P+rho_o*C^2/2\n",
+ "so C in m/s= 235.13\n",
+ "for compressible fluid,Po/P=(1+(y-1)*M^2/2)^(y/(y-1))\n",
+ "so M=sqrt((exp(log(Po/P)/(y/(y-1)))-1)/((y-1)/2))\n",
+ "compressibility correction factor,k\n",
+ "k=(M^2/4)+((2-y)/24)*M^4\n",
+ "stagnation temperature,To/T=1+((y-1)/2)*M^2\n",
+ "so T=To/(1+((y-1)/2)*M^2) in K\n",
+ "density,rho=P/(R*T) in kg/m^3\n",
+ "substituting Po-P=(1/2)*rho*C^2(1+k)\n",
+ "C in m/s= 250.94\n",
+ "so C=250.95 m/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of air stream velocity\n",
+ "#intiation of all variables\n",
+ "# Chapter 13\n",
+ "import math\n",
+ "print\"Example 13.5, Page:527 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 13 Example 5\")\n",
+ "To=305.;#stagnation temperature of air stream in K\n",
+ "y=1.4;#expansion constant\n",
+ "R=287.;#gas constant in J/kg K\n",
+ "print(\"actual static pressure(P)=1+0.3 in bar\")\n",
+ "P=1.+0.3\n",
+ "print(\"It is also given that,Po-P=0.6,\")\n",
+ "print(\"so Po=P+0.6 in bar\")\n",
+ "Po=P+0.6\n",
+ "print(\"air velocity,ao=sqrt(y*R*To)in m/s\")\n",
+ "ao=math.sqrt(y*R*To)\n",
+ "print(\"density of air,rho_o=Po/(R*To)in \")\n",
+ "rho_o=Po*10.**5/(R*To)\n",
+ "print(\"considering air to be in-compressible,\")\n",
+ "print(\"Po=P+rho_o*C^2/2\")\n",
+ "C=math.sqrt((Po-P)*10.**5*2./rho_o)\n",
+ "print(\"so C in m/s=\"),round(C,2)\n",
+ "print(\"for compressible fluid,Po/P=(1+(y-1)*M^2/2)^(y/(y-1))\")\n",
+ "print(\"so M=sqrt((exp(log(Po/P)/(y/(y-1)))-1)/((y-1)/2))\")\n",
+ "M=math.sqrt((math.exp(math.log(Po/P)/(y/(y-1)))-1)/((y-1)/2))\n",
+ "M=0.7567;#approx.\n",
+ "print(\"compressibility correction factor,k\")\n",
+ "print(\"k=(M^2/4)+((2-y)/24)*M^4\")\n",
+ "k=(M**2/4.)+((2.-y)/24.)*M**4\n",
+ "print(\"stagnation temperature,To/T=1+((y-1)/2)*M^2\")\n",
+ "print(\"so T=To/(1+((y-1)/2)*M^2) in K\")\n",
+ "T=To/(1+((y-1)/2)*M**2)\n",
+ "print(\"density,rho=P/(R*T) in kg/m^3\")\n",
+ "rho=P*10**5/(R*T)\n",
+ "print(\"substituting Po-P=(1/2)*rho*C^2(1+k)\")\n",
+ "C=math.sqrt((Po-P)*10.**5/((1./2.)*rho*(1.+k)))\n",
+ "print(\"C in m/s=\"),round(C,2)\n",
+ "print(\"so C=250.95 m/s\")"
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter2_3.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter2_3.ipynb
new file mode 100644
index 00000000..6d7e9bc4
--- /dev/null
+++ b/_Engineering_Thermodynamics_by__O._Singh/chapter2_3.ipynb
@@ -0,0 +1,314 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# chapter 2:Zeroth Law of Thermodynamics"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 2.1;pg no:46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 2.1, Page:46 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 1\n",
+ "degree celcius and farenheit are related as follows\n",
+ "Tc=(Tf-32)/1.8\n",
+ "so temperature of body in degree celcius 37.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of temperature of body of human\n",
+ "#intiation of all variables\n",
+ "# Chapter 2\n",
+ "print\"Example 2.1, Page:46 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 1\")\n",
+ "Tf=98.6;#temperature of body in farenheit\n",
+ "Tc=(Tf-32)/1.8\n",
+ "print(\"degree celcius and farenheit are related as follows\")\n",
+ "print(\"Tc=(Tf-32)/1.8\")\n",
+ "print(\"so temperature of body in degree celcius\"),round(Tc,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 2.2;pg no:47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 2.2, Page:47 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 2\n",
+ "using thermometric relation\n",
+ "t=a*log(p)+(b/2)\n",
+ "for ice point,b/a=\n",
+ "so b=2.1972*a\n",
+ "for steam point\n",
+ "a= 101.95\n",
+ "and b= 224.01\n",
+ "thus, t=in degree celcius\n",
+ "so for thermodynamic property of 6.5,t=302.83 degree celcius= 302.84\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of celcius temperature\n",
+ "#intiation of all variables\n",
+ "# Chapter 2\n",
+ "import math\n",
+ "print\"Example 2.2, Page:47 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 2\")\n",
+ "t1=0;#ice point temperature in degree celcius\n",
+ "p1=3;#thermometric property for ice point\n",
+ "t2=100;#steam point temperature in degree celcius\n",
+ "p2=8;#thermometric property for steam point\n",
+ "p3=6.5;#thermometric property for any temperature\n",
+ "print(\"using thermometric relation\")\n",
+ "print(\"t=a*log(p)+(b/2)\")\n",
+ "print(\"for ice point,b/a=\")\n",
+ "b=2*math.log(p1)\n",
+ "print(\"so b=2.1972*a\")\n",
+ "print(\"for steam point\")\n",
+ "a=t2/(math.log(p2)-(2.1972/2))\n",
+ "print(\"a=\"),round(a,2)\n",
+ "b=2.1972*a\n",
+ "print(\"and b=\"),round(b,2)\n",
+ "t=a*math.log(p3)+(b/2)\n",
+ "print(\"thus, t=in degree celcius\")\n",
+ "print(\"so for thermodynamic property of 6.5,t=302.83 degree celcius=\"),round(t,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 2.3;page no:47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 2.3, Page:47 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 3\n",
+ "emf equation\n",
+ "E=(0.003*t)-((5*10^-7)*t^2))+(0.5*10^-3)\n",
+ "using emf equation at ice point,E_0 in volts\n",
+ "E_0= 0.0\n",
+ "using emf equation at steam point,E_100 in volts\n",
+ "E_100= 0.3\n",
+ "now emf at 30 degree celcius using emf equation(E_30)in volts\n",
+ "now the temperature(T) shown by this thermometer\n",
+ "T=in degree celcius 30.36\n",
+ "NOTE=>In this question,values of emf at 100 and 30 degree celcius is calculated wrong in book so it is corrected above so the answers may vary.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of temperature shown by this thermometer\n",
+ "#intiation of all variables\n",
+ "# Chapter 2\n",
+ "print\"Example 2.3, Page:47 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 3\")\n",
+ "print(\"emf equation\")\n",
+ "print(\"E=(0.003*t)-((5*10^-7)*t^2))+(0.5*10^-3)\")\n",
+ "print(\"using emf equation at ice point,E_0 in volts\")\n",
+ "t=0.;#ice point temperature in degree celcius\n",
+ "E_0=(0.003*t)-((5.*10**-7)*t**2)+(0.5*10**-3)\n",
+ "print(\"E_0=\"),round(E_0,2)\n",
+ "print(\"using emf equation at steam point,E_100 in volts\")\n",
+ "t=100.;#steam point temperature in degree celcius\n",
+ "E_100=(0.003*t)-((5.*10**-7)*t**2)+(0.5*10**-3)\n",
+ "print(\"E_100=\"),round(E_100,2)\n",
+ "print(\"now emf at 30 degree celcius using emf equation(E_30)in volts\")\n",
+ "t=30.;#temperature of substance in degree celcius\n",
+ "E_30=(0.003*t)-((5.*10**-7)*t**2)+(0.5*10**-3)\n",
+ "T_100=100.;#steam point temperature in degree celcius\n",
+ "T_0=0.;#ice point temperature in degree celcius\n",
+ "T=((E_30-E_0)/(E_100-E_0))*(T_100-T_0)\n",
+ "print(\"now the temperature(T) shown by this thermometer\")\n",
+ "print(\"T=in degree celcius\"),round(T,2)\n",
+ "print(\"NOTE=>In this question,values of emf at 100 and 30 degree celcius is calculated wrong in book so it is corrected above so the answers may vary.\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 2.4;pg no:48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 2.4, Page:48 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 4\n",
+ "emf equation,e=0.18*t-5.2*10^-4*t^2 in millivolts\n",
+ "as ice point and steam points are two reference points,so\n",
+ "at ice point,emf(e1)in mV\n",
+ "at steam point,emf(e2)in mV\n",
+ "at gas temperature,emf(e3)in mV\n",
+ "since emf variation is linear so,temperature(t)in degree celcius at emf of 7.7 mV 60.16\n",
+ "temperature of gas using thermocouple=60.16 degree celcius\n",
+ "percentage variation=((t-t3)/t3)*100variation in temperature reading with respect to gas thermometer reading of 50 degree celcius 20.31\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of percentage variation in temperature\n",
+ "#intiation of all variables\n",
+ "# Chapter 2\n",
+ "import math\n",
+ "print\"Example 2.4, Page:48 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 4\")\n",
+ "t1=0;#temperature at ice point\n",
+ "t2=100;#temperature at steam point\n",
+ "t3=50;#temperature of gas\n",
+ "print(\"emf equation,e=0.18*t-5.2*10^-4*t^2 in millivolts\")\n",
+ "print(\"as ice point and steam points are two reference points,so\")\n",
+ "print(\"at ice point,emf(e1)in mV\")\n",
+ "e1=0.18*t1-5.2*10**-4*t1**2\n",
+ "print(\"at steam point,emf(e2)in mV\")\n",
+ "e2=0.18*t2-5.2*10**-4*t2**2\n",
+ "print(\"at gas temperature,emf(e3)in mV\")\n",
+ "e3=0.18*t3-5.2*10**-4*t3**2\n",
+ "t=((t2-t1)/(e2-e1))*e3\n",
+ "variation=((t-t3)/t3)*100\n",
+ "print(\"since emf variation is linear so,temperature(t)in degree celcius at emf of 7.7 mV\"),round(t,2)\n",
+ "print(\"temperature of gas using thermocouple=60.16 degree celcius\")\n",
+ "print(\"percentage variation=((t-t3)/t3)*100variation in temperature reading with respect to gas thermometer reading of 50 degree celcius\"),round(variation,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 2.5;pg no:48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 2.5, Page:48 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 5\n",
+ "let the conversion relation be X=aC+b\n",
+ "where C is temperature in degree celcius,a&b are constants and X is temperature in X degree \n",
+ "at freezing point,temperature=0 degree celcius,0 degree X\n",
+ "so by equation X=aC+b\n",
+ "we get b=0\n",
+ "at boiling point,temperature=100 degree celcius,1000 degree X\n",
+ "conversion relation\n",
+ "X=10*C\n",
+ "absolute zero temperature in degree celcius=-273.15\n",
+ "absolute zero temperature in degree X= -2731.5\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of absolute zero temperature\n",
+ "#intiation of all variables\n",
+ "# Chapter 2\n",
+ "print\"Example 2.5, Page:48 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 2,Example 5\")\n",
+ "print(\"let the conversion relation be X=aC+b\")\n",
+ "print(\"where C is temperature in degree celcius,a&b are constants and X is temperature in X degree \")\n",
+ "print(\"at freezing point,temperature=0 degree celcius,0 degree X\")\n",
+ "print(\"so by equation X=aC+b\")\n",
+ "X=0;#temperature in degree X\n",
+ "C=0;#temperature in degree celcius\n",
+ "print(\"we get b=0\")\n",
+ "b=0;\n",
+ "print(\"at boiling point,temperature=100 degree celcius,1000 degree X\")\n",
+ "X=1000;#temperature in degree X\n",
+ "C=100;#temperature in degree celcius\n",
+ "a=(X-b)/C\n",
+ "print(\"conversion relation\")\n",
+ "print(\"X=10*C\")\n",
+ "print(\"absolute zero temperature in degree celcius=-273.15\")\n",
+ "X=10*-273.15\n",
+ "print(\"absolute zero temperature in degree X=\"),round(X,2)\n"
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter3_3.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter3_3.ipynb
new file mode 100644
index 00000000..22ed40c9
--- /dev/null
+++ b/_Engineering_Thermodynamics_by__O._Singh/chapter3_3.ipynb
@@ -0,0 +1,1506 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 3:First Law of Thermo Dynamics"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 3.1;pg no:76"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 3.1, Page:46 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 1\n",
+ "a> work done on piston(W_piston)in KJ can be obtained as\n",
+ "W_piston=pdv\n",
+ "b> paddle work done on the system(W_paddle)=-4.88 KJ\n",
+ "net work done of system(W_net)in KJ\n",
+ "W_net=W_piston+W_paddle\n",
+ "so work done on system(W_net)=1.435 KJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of work done on system\n",
+ "#intiation of all variables\n",
+ "# Chapter 3\n",
+ "print\"Example 3.1, Page:46 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 1\")\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "\n",
+ "def fun1(x):\n",
+ "\ty=x*x\n",
+ "\treturn y\n",
+ "\n",
+ "p=689.;#pressure of gas in cylinder in kpa\n",
+ "v1=0.04;#initial volume of fluid in m^3\n",
+ "v2=0.045;#final volume of fluid in m^3\n",
+ "W_paddle=-4.88;#paddle work done on the system in KJ\n",
+ "print(\"a> work done on piston(W_piston)in KJ can be obtained as\")\n",
+ "print(\"W_piston=pdv\")\n",
+ "#function y = f(v), y=p, endfunction\n",
+ "def fun1(x):\n",
+ "\ty=p\n",
+ "\treturn y\n",
+ "\n",
+ "W_piston=scipy.integrate.quad(fun1,v1,v2) \n",
+ "print(\"b> paddle work done on the system(W_paddle)=-4.88 KJ\")\n",
+ "print(\"net work done of system(W_net)in KJ\")\n",
+ "print(\"W_net=W_piston+W_paddle\")\n",
+ "print(\"so work done on system(W_net)=1.435 KJ\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 3.2;pg no:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 3.2, Page:76 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 2\n",
+ "as the vessel is rigid therefore work done shall be zero\n",
+ "W=0\n",
+ "from first law of thermodynamics,heat required(Q)in KJ\n",
+ "Q=U2-U1+W=Q=m(u2-u1)+W\n",
+ "so heat required = 5.6\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of heat required\n",
+ "#intiation of all variables\n",
+ "# Chapter 3\n",
+ "print\"Example 3.2, Page:76 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 2\")\n",
+ "m=0.5;#mass of gas in kg\n",
+ "u1=26.6;#internal energy of gas at 200 degree celcius\n",
+ "u2=37.8;#internal energy of gas at 400 degree celcius\n",
+ "W=0;#work done by vessel in KJ\n",
+ "print(\"as the vessel is rigid therefore work done shall be zero\")\n",
+ "print(\"W=0\")\n",
+ "print(\"from first law of thermodynamics,heat required(Q)in KJ\")\n",
+ "print(\"Q=U2-U1+W=Q=m(u2-u1)+W\")\n",
+ "Q=m*(u2-u1)+W\n",
+ "print(\"so heat required =\"),round(Q,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 3.3;pg no:77"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 3.3, Page:77 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 3\n",
+ "by steady flow energy equation\n",
+ "q+h1+C1^2/2+g*z1=h2+C2^2/2+g*z2+w\n",
+ "let us assume changes in kinetic and potential energy is negligible,during flow the work interaction shall be zero\n",
+ "q=h2-h1\n",
+ "rate of heat removal(Q)in KJ/hr\n",
+ "Q=m(h2-h1)=m*Cp*(T2-T1)\n",
+ "heat should be removed at the rate=KJ/hr 40500.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of \"heat should be removed\n",
+ "#intiation of all variables\n",
+ "# Chapter 3\n",
+ "print\"Example 3.3, Page:77 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 3\")\n",
+ "m=50;#rate at which carbon dioxide passing through heat exchanger in kg/hr\n",
+ "T2=800;#initial temperature of carbon dioxide in degree celcius\n",
+ "T1=50;#final temperature of carbon dioxide in degree celcius\n",
+ "Cp=1.08;#specific heat at constant pressure in KJ/kg K\n",
+ "print(\"by steady flow energy equation\")\n",
+ "print(\"q+h1+C1^2/2+g*z1=h2+C2^2/2+g*z2+w\")\n",
+ "print(\"let us assume changes in kinetic and potential energy is negligible,during flow the work interaction shall be zero\")\n",
+ "print(\"q=h2-h1\")\n",
+ "print(\"rate of heat removal(Q)in KJ/hr\")\n",
+ "print(\"Q=m(h2-h1)=m*Cp*(T2-T1)\")\n",
+ "Q=m*Cp*(T2-T1)\n",
+ "print(\"heat should be removed at the rate=KJ/hr\"),round(Q)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 3.4;pg no:77"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": [
+ "#cal of work done by surrounding on system\n",
+ "#intiation of all variables\n",
+ "# Chapter 3\n",
+ "print\"Example 3.4, Page:77 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 4\")\n",
+ "v=0.78;#volume of cylinder in m^3\n",
+ "p=101.325;#atmospheric pressure in kPa\n",
+ "print(\"total work done by the air at atmospheric pressure of 101.325 kPa\")\n",
+ "print(\"W=(pdv)cylinder+(pdv)air\")\n",
+ "print(\"0+p*(delta v)\")\n",
+ "print(\"work done by air(W)=-p*v in KJ\")\n",
+ "W=-p*v\n",
+ "print(\"so work done by surrounding on system=KJ\"),round(-W,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 3.5:pg no:77"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 3.5, Page:77 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 5\n",
+ "given p*v^1.3=constant\n",
+ "assuming expansion to be quasi-static,the work may be given as\n",
+ "W=m(p*dv)=(p2*V2-p1*V1)/(1-n)\n",
+ "from internal energy relation,change in specific internal energy\n",
+ "deltau=u2-u1=1.8*(p2*v2-p1*v1)in KJ/kg\n",
+ "total change,deltaU=1.8*m*(p2*v2-p1*v1)=1.8*(p2*V2-p1*V1)in KJ\n",
+ "using p1*V1^1.3=p2*V2^1.3\n",
+ "V2=in m^3 0.85\n",
+ "take V2=.852 m^3\n",
+ "so deltaU in KJ\n",
+ "and W in KJ 246.67\n",
+ "from first law\n",
+ "deltaQ=KJ 113.47\n",
+ "heat interaction=113.5 KJ\n",
+ "work interaction=246.7 KJ\n",
+ "change in internal energy=-113.2 KJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of heat,work interaction and change in internal energy\n",
+ "#intiation of all variables\n",
+ "# Chapter 3\n",
+ "print\"Example 3.5, Page:77 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 5\")\n",
+ "m=5;#mass of gas in kg\n",
+ "p1=1*10**3;#initial pressure of gas in KPa\n",
+ "V1=0.5;#initial volume of gas in m^3\n",
+ "p2=0.5*10**3;#final pressure of gas in KPa\n",
+ "n=1.3;#expansion constant\n",
+ "print(\"given p*v^1.3=constant\")\n",
+ "print(\"assuming expansion to be quasi-static,the work may be given as\")\n",
+ "print(\"W=m(p*dv)=(p2*V2-p1*V1)/(1-n)\")\n",
+ "print(\"from internal energy relation,change in specific internal energy\")\n",
+ "print(\"deltau=u2-u1=1.8*(p2*v2-p1*v1)in KJ/kg\")\n",
+ "print(\"total change,deltaU=1.8*m*(p2*v2-p1*v1)=1.8*(p2*V2-p1*V1)in KJ\")\n",
+ "print(\"using p1*V1^1.3=p2*V2^1.3\")\n",
+ "V2=V1*(p1/p2)**(1/1.3)\n",
+ "print(\"V2=in m^3\"),round(V2,2)\n",
+ "print(\"take V2=.852 m^3\")\n",
+ "V2=0.852;#final volume of gas in m^3\n",
+ "print(\"so deltaU in KJ\")\n",
+ "deltaU=1.8*(p2*V2-p1*V1)\n",
+ "W=(p2*V2-p1*V1)/(1-n)\n",
+ "print(\"and W in KJ\"),round(W,2)\n",
+ "print(\"from first law\")\n",
+ "deltaQ=deltaU+W\n",
+ "print(\"deltaQ=KJ\"),round(deltaQ,2)\n",
+ "print(\"heat interaction=113.5 KJ\")\n",
+ "print(\"work interaction=246.7 KJ\")\n",
+ "print(\"change in internal energy=-113.2 KJ\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 3.6;pg no:78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 3.6, Page:78 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 6\n",
+ "final state volume(v2)in m^3\n",
+ "v2= 0.0\n",
+ "take v2=0.03 m^3\n",
+ "now internal energy of gas is given by U=7.5*p*v-425\n",
+ "change in internal energy(deltaU)in KJ\n",
+ "deltaU=U2-U1=7.5*p2*v2-7.5*p1*v1\n",
+ "deltaU=7.5*10^3*(p2*v2-p1*v1) 75.0\n",
+ "for quasi-static process\n",
+ "work(W) in KJ,W=p*dv\n",
+ "W=(p2*v2-p1*v1)/(1-n)\n",
+ "from first law of thermodynamics,\n",
+ "heat interaction(deltaQ)=deltaU+W\n",
+ "heat=50 KJ\n",
+ "work=25 KJ(-ve)\n",
+ "internal energy change=75 KJ\n",
+ "if 180 KJ heat transfer takes place,then from 1st law,\n",
+ "deltaQ= 50.0\n",
+ "since end states remain same,therefore deltaU i.e change in internal energy remains unaltered.\n",
+ "W=KJ 105.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of heat,workinternal energy change\n",
+ "#intiation of all variables\n",
+ "# Chapter 3\n",
+ "print\"Example 3.6, Page:78 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 6\")\n",
+ "p1=1;#initial pressure of gas in MPa\n",
+ "v1=0.05;#initial volume of gas in m^3\n",
+ "p2=2;#final pressure of gas in MPa\n",
+ "n=1.4;#expansion constant\n",
+ "print(\"final state volume(v2)in m^3\")\n",
+ "v2=((p1/p2)**(1/1.4))*v1\n",
+ "print(\"v2=\"),round(v2,2)\n",
+ "print(\"take v2=0.03 m^3\")\n",
+ "v2=0.03;#final volume of gas in m^3\n",
+ "print(\"now internal energy of gas is given by U=7.5*p*v-425\")\n",
+ "print(\"change in internal energy(deltaU)in KJ\")\n",
+ "print(\"deltaU=U2-U1=7.5*p2*v2-7.5*p1*v1\")\n",
+ "deltaU=7.5*10**3*(p2*v2-p1*v1)\n",
+ "print(\"deltaU=7.5*10^3*(p2*v2-p1*v1)\"),round(deltaU,2)\n",
+ "print(\"for quasi-static process\")\n",
+ "print(\"work(W) in KJ,W=p*dv\")\n",
+ "W=((p2*v2-p1*v1)/(1-n))*10**3\n",
+ "print(\"W=(p2*v2-p1*v1)/(1-n)\")\n",
+ "print(\"from first law of thermodynamics,\")\n",
+ "print(\"heat interaction(deltaQ)=deltaU+W\")\n",
+ "deltaQ=deltaU+W\n",
+ "print(\"heat=50 KJ\")\n",
+ "print(\"work=25 KJ(-ve)\")\n",
+ "print(\"internal energy change=75 KJ\")\n",
+ "print(\"if 180 KJ heat transfer takes place,then from 1st law,\")\n",
+ "print(\"deltaQ=\"),round(deltaQ,2)\n",
+ "print(\"since end states remain same,therefore deltaU i.e change in internal energy remains unaltered.\")\n",
+ "W=180-75\n",
+ "print(\"W=KJ\"),round(W,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 3.7;pg no:79"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 3.7, Page:79 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 7\n",
+ "characteristics gas constant(R)in J/kg K\n",
+ "R= 519.64\n",
+ "take R=0.520,KJ/kg K\n",
+ "Cv=inKJ/kg K 1.18\n",
+ "y= 1.44\n",
+ "for polytropic process,v2=((p1/p2)^(1/n))*v1 in m^3\n",
+ "now,T2=in K\n",
+ "work(W)in KJ/kg\n",
+ "W= -257.78\n",
+ "for polytropic process,heat(Q)in KJ/K\n",
+ "Q= 82.02\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of work and heat\n",
+ "#intiation of all variables\n",
+ "# Chapter 3\n",
+ "print\"Example 3.7, Page:79 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 7\")\n",
+ "M=16;#molecular weight of gas\n",
+ "p1=101.3;#initial pressure of gas in KPa\n",
+ "p2=600;#final pressure of gas in KPa\n",
+ "T1=(273+20);#initial temperature of gas in K\n",
+ "R1=8.3143*10**3;#universal gas constant in J/kg K\n",
+ "Cp=1.7;#specific heat at constant pressure in KJ/kg K\n",
+ "n=1.3;#expansion constant\n",
+ "T2=((p2/p1)**(n-1/n))\n",
+ "print(\"characteristics gas constant(R)in J/kg K\")\n",
+ "R=R1/M\n",
+ "print(\"R=\"),round(R,2)\n",
+ "print(\"take R=0.520,KJ/kg K\")\n",
+ "R=0.520;#characteristics gas constant in KJ/kg K\n",
+ "Cv=Cp-R\n",
+ "print(\"Cv=inKJ/kg K\"),round(Cv,2)\n",
+ "y=Cp/Cv\n",
+ "print(\"y=\"),round(y,2)\n",
+ "y=1.44;#ratio of specific heat at constant pressure to constant volume\n",
+ "print(\"for polytropic process,v2=((p1/p2)^(1/n))*v1 in m^3\")\n",
+ "T2=T1*((p2/p1)**((n-1)/n))\n",
+ "print(\"now,T2=in K\")\n",
+ "print(\"work(W)in KJ/kg\")\n",
+ "W=R*((T1-T2)/(n-1))\n",
+ "print(\"W=\"),round(W,2)\n",
+ "W=257.78034;#work done in KJ/kg\n",
+ "print(\"for polytropic process,heat(Q)in KJ/K\")\n",
+ "Q=((y-n)/(y-1))*W\n",
+ "print(\"Q=\"),round(Q,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 3.8;pg no:80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 3.8, Page:80 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 8\n",
+ "applying steady flow energy equation with inlet and exit states as 1,2 with no heat and work interaction and no change in potential energy\n",
+ "h1+C1^2/2=h2+C2^2/2\n",
+ "given that C1=0,negligible inlet velocity\n",
+ "so C2=sqrt(2(h1-h2))=sqrt(2*Cp*(T1-T2))\n",
+ "exit velocity(C2)in m/s 1098.2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of exit velocity\n",
+ "#intiation of all variables\n",
+ "# Chapter 3\n",
+ "import math\n",
+ "print\"Example 3.8, Page:80 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 8\")\n",
+ "T1=(627+273);#initial temperature of air in nozzle in K\n",
+ "T2=(27+273);#temperature at which air leaves nozzle in K\n",
+ "Cp=1.005*10**3;#specific heat at constant pressure in J/kg K\n",
+ "C2=math.sqrt(2*Cp*(T1-T2))\n",
+ "print(\"applying steady flow energy equation with inlet and exit states as 1,2 with no heat and work interaction and no change in potential energy\")\n",
+ "print(\"h1+C1^2/2=h2+C2^2/2\")\n",
+ "print(\"given that C1=0,negligible inlet velocity\")\n",
+ "print(\"so C2=sqrt(2(h1-h2))=sqrt(2*Cp*(T1-T2))\")\n",
+ "print(\"exit velocity(C2)in m/s\"),round(C2,1)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 3.9;pg no:80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 3.9, Page:80 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 9\n",
+ "work interaction,W=-200 KJ/kg of air\n",
+ "increase in enthalpy of air=100 KJ/kg of air\n",
+ "total heat interaction,Q=heat transferred to water + heat transferred to atmosphere\n",
+ "writing steady flow energy equation on compressor,for unit mass of air entering at 1 and leaving at 2\n",
+ "h1+C1^2/2+g*z1+Q=h2+C2^2/2+g*z2+W\n",
+ "assuming no change in potential energy and kinetic energy\n",
+ "deltaK.E=deltaP.=0\n",
+ "total heat interaction(Q)in KJ/kg of air\n",
+ "Q= -100.0\n",
+ "Q=heat transferred to water + heat transferred to atmosphere=Q1+Q2\n",
+ "so heat transferred to atmosphere(Q2)in KJ/kg of air -10.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of heat transferred to atmosphere\n",
+ "#intiation of all variables\n",
+ "# Chapter 3\n",
+ "print\"Example 3.9, Page:80 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 9\")\n",
+ "W=-200;#shaft work in KJ/kg of air\n",
+ "deltah=100;#increase in enthalpy in KJ/kg of air\n",
+ "Q1=-90;#heat transferred to water in KJ/kg of air\n",
+ "print(\"work interaction,W=-200 KJ/kg of air\")\n",
+ "print(\"increase in enthalpy of air=100 KJ/kg of air\")\n",
+ "print(\"total heat interaction,Q=heat transferred to water + heat transferred to atmosphere\")\n",
+ "print(\"writing steady flow energy equation on compressor,for unit mass of air entering at 1 and leaving at 2\")\n",
+ "print(\"h1+C1^2/2+g*z1+Q=h2+C2^2/2+g*z2+W\")\n",
+ "print(\"assuming no change in potential energy and kinetic energy\")\n",
+ "print(\"deltaK.E=deltaP.=0\")\n",
+ "print(\"total heat interaction(Q)in KJ/kg of air\")\n",
+ "Q=deltah+W\n",
+ "print(\"Q=\"),round(Q,2)\n",
+ "Q2=Q-Q1\n",
+ "print(\"Q=heat transferred to water + heat transferred to atmosphere=Q1+Q2\")\n",
+ "print(\"so heat transferred to atmosphere(Q2)in KJ/kg of air\"),round(Q2,2)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 3.10;pg no:81"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 3.10, Page:81 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 10\n",
+ "above problem can be solved using steady flow energy equations upon hot water flow\n",
+ "Q+m1*(h1+C1^2/2+g*z1)=W+m2*(h2+C2^2/2+g*z2)\n",
+ "here total heat to be supplied(Q)in kcal/hr\n",
+ "so heat lost by water(-ve),Q=-25000 kcal/hr\n",
+ "there shall be no work interaction and change in kinetic energy,so,steady flow energy equation shall be,\n",
+ "Q+m*(h1+g*z1)=m*(h2+g*z2)\n",
+ "so water circulation rate(m)in kg/hr\n",
+ "so m=Q*10^3*4.18/(g*deltaz-(h1-h2)*10^3*4.18\n",
+ "water circulation rate=(m)in kg/min 11.91\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of water circulation rate\n",
+ "#intiation of all variables\n",
+ "# Chapter 3\n",
+ "print\"Example 3.10, Page:81 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 10\")\n",
+ "n=500;#total number of persons\n",
+ "q=50;#heat requirement per person in kcal/hr\n",
+ "h1=80;#enthalpy of hot water enter in pipe in kcal/kg\n",
+ "h2=45;#enthalpy of hot water leaves the pipe in kcal/kg\n",
+ "g=9.81;#acceleartion due to gravity in m/s^2\n",
+ "deltaz=10;#difference in elevation of inlet and exit pipe in m\n",
+ "print(\"above problem can be solved using steady flow energy equations upon hot water flow\")\n",
+ "print(\"Q+m1*(h1+C1^2/2+g*z1)=W+m2*(h2+C2^2/2+g*z2)\")\n",
+ "print(\"here total heat to be supplied(Q)in kcal/hr\")\n",
+ "Q=n*q\n",
+ "print(\"so heat lost by water(-ve),Q=-25000 kcal/hr\")\n",
+ "Q=-25000#heat loss by water in kcal/hr\n",
+ "print(\"there shall be no work interaction and change in kinetic energy,so,steady flow energy equation shall be,\")\n",
+ "print(\"Q+m*(h1+g*z1)=m*(h2+g*z2)\")\n",
+ "print(\"so water circulation rate(m)in kg/hr\")\n",
+ "print(\"so m=Q*10^3*4.18/(g*deltaz-(h1-h2)*10^3*4.18\")\n",
+ "m=Q*10**3*4.18/(g*deltaz-(h1-h2)*10**3*4.18)\n",
+ "m=m/60\n",
+ "print(\"water circulation rate=(m)in kg/min\"),round(m,2)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 3.11;pg no:81"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 3.11, Page:81 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 11\n",
+ "let mass of steam to be supplied per kg of water lifted be(m) kg.applying law of energy conservation upon steam injector,for unit mass of water lifted\n",
+ "energy with steam entering + energy with water entering = energy with mixture leaving + heat loss to surrounding\n",
+ "m*(v1^2/2+h1*10^3*4.18)+h2*10^3*4.18+g*deltaz=(1+m)*(h3*10^3*4.18+v2^2/2)+m*q*10^3*4.18\n",
+ "so steam suppling rate(m)in kg/s per kg of water\n",
+ "m= 0.124\n",
+ "NOTE=>here enthalpy of steam entering injector(h1)should be taken 720 kcal/kg instead of 72 kcal/kg otherwise the steam supplying rate comes wrong.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of steam suppling rate\n",
+ "#intiation of all variables\n",
+ "# Chapter 3\n",
+ "print\"Example 3.11, Page:81 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 11\")\n",
+ "v1=50;#velocity of steam entering injector in m/s\n",
+ "v2=25;#velocity of mixture leave injector in m/s\n",
+ "h1=720;#enthalpy of steam entering injector in kcal/kg\n",
+ "h2=24.6;#enthalpy of water entering injector in kcal/kg\n",
+ "h3=100;#enthalpy of steam leaving injector in kcal/kg\n",
+ "h4=100;#enthalpy of water leaving injector in kcal/kg\n",
+ "deltaz=2;#depth from axis of injector in m\n",
+ "q=12;#heat loss from injector to surrounding through injector\n",
+ "g=9.81;#acceleration due to gravity in m/s^2\n",
+ "print(\"let mass of steam to be supplied per kg of water lifted be(m) kg.applying law of energy conservation upon steam injector,for unit mass of water lifted\")\n",
+ "print(\"energy with steam entering + energy with water entering = energy with mixture leaving + heat loss to surrounding\")\n",
+ "print(\"m*(v1^2/2+h1*10^3*4.18)+h2*10^3*4.18+g*deltaz=(1+m)*(h3*10^3*4.18+v2^2/2)+m*q*10^3*4.18\")\n",
+ "print(\"so steam suppling rate(m)in kg/s per kg of water\")\n",
+ "m=((h3*10**3*4.18+v2**2/2)-(h2*10**3*4.18+g*deltaz))/((v1**2/2+h1*10**3*4.18)-(h3*10**3*4.18+v2**2/2)-(q*10**3*4.18))\n",
+ "print(\"m=\"),round(m,3)\n",
+ "print(\"NOTE=>here enthalpy of steam entering injector(h1)should be taken 720 kcal/kg instead of 72 kcal/kg otherwise the steam supplying rate comes wrong.\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 3.12;pg no:82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 3.12, Page:82 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 12\n",
+ "here let us assume that the pressure is always equal to atmospheric presure as ballon is flexible,inelastic and unstressed and no work is done for stretching ballon during its filling figure shows the boundary of system before and after filling ballon by firm line and dotted line respectively.\n",
+ "displacement work, W=(p.dv)cylinder+(p.dv)ballon\n",
+ "(p.dv)cylinder=0,as cylinder is rigid\n",
+ "so work done by system upon atmosphere(W)in KJ, W=(p*deltav)/1000\n",
+ "and work done by atmosphere=KJ 40.52\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of work done by atmosphere\n",
+ "#intiation of all variables\n",
+ "# Chapter 3\n",
+ "print\"Example 3.12, Page:82 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 12\")\n",
+ "p=1.013*10**5;#atmospheric pressure in pa\n",
+ "deltav=0.4;#change in volume in m^3\n",
+ "print(\"here let us assume that the pressure is always equal to atmospheric presure as ballon is flexible,inelastic and unstressed and no work is done for stretching ballon during its filling figure shows the boundary of system before and after filling ballon by firm line and dotted line respectively.\")\n",
+ "print(\"displacement work, W=(p.dv)cylinder+(p.dv)ballon\")\n",
+ "print(\"(p.dv)cylinder=0,as cylinder is rigid\")\n",
+ "print(\"so work done by system upon atmosphere(W)in KJ, W=(p*deltav)/1000\")\n",
+ "W=(p*deltav)/1000\n",
+ "print(\"and work done by atmosphere=KJ\"),round(W,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 3.13;pg no:82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 3.13, Page:82 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 13\n",
+ "work done by turbine(Wt)in J#s is 25% of heat added i.e Wt= 1250.0\n",
+ "heat rejected by condensor(Qrejected)in J#s is 75% of head added i.e\n",
+ "Qrejected= 3750.0\n",
+ "and feed water pump work(Wp)in J#s is 0.2% of heat added i.e\n",
+ "Wp=(-) 10.0\n",
+ "capacity of generator(W)=in Kw 1.24\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of capacity of generator\n",
+ "#intiation of all variables\n",
+ "# Chapter 3\n",
+ "print\"Example 3.13, Page:82 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 13\")\n",
+ "Qadd=5000;#heat supplied in boiler in J#s\n",
+ "Wt=.25*Qadd\n",
+ "print(\"work done by turbine(Wt)in J#s is 25% of heat added i.e\"),\n",
+ "print(\"Wt=\"),round(Wt,2)\n",
+ "print(\"heat rejected by condensor(Qrejected)in J#s is 75% of head added i.e\")\n",
+ "Qrejected=.75*Qadd\n",
+ "print(\"Qrejected=\"),round(Qrejected,2)\n",
+ "print(\"and feed water pump work(Wp)in J#s is 0.2% of heat added i.e\")\n",
+ "Wp=0.002*Qadd\n",
+ "print(\"Wp=(-)\"),round(Wp,2)\n",
+ "W=(Wt-Wp)/1000\n",
+ "print(\"capacity of generator(W)=in Kw\"),round(W,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 3.14;pg no:83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 3.14, Page:83 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 14\n",
+ "in heat exchanger upon applying S.F.E.E with assumption of no change in kinetic energy,no work interaction,no change in potential energy,for unit mass flow rate of air,\n",
+ "h1+Q1_2=h2\n",
+ "Q1_2=h2-h1\n",
+ "so heat transfer to air in heat exchanger(Q1_2)in KJ\n",
+ "Q1_2= 726.61\n",
+ "in gas turbine let us use S.F.E.E,assuming no change in potential energy,for unit mass flow rate of air\n",
+ "h2+C2^2#2=h3+C3^2/2+Wt\n",
+ "Wt=(h2-h3)+(C2^2-C3^2)/2\n",
+ "so power output from turbine(Wt)in KJ#s\n",
+ "Wt= 1.0\n",
+ "applying S.F.E.E upon nozzle assuming no change in potential energy,no work and heat interactions,for unit mass flow rate,\n",
+ "h3+C=h4+C4^2/2\n",
+ "C4^2#2=(h3-h4)+C3^2/2\n",
+ "velocity at exit of nozzle(C4)in m#s\n",
+ "C4= 14.3\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of velocity at exit of nozzle\n",
+ "#intiation of all variables\n",
+ "# Chapter 3\n",
+ "import math\n",
+ "print\"Example 3.14, Page:83 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 14\")\n",
+ "T1=(27+273);##ambient temperature in K\n",
+ "T2=(750+273);##temperature of heated air inside heat exchanger in K\n",
+ "T3=(600+273);##temperature of hot air leaves turbine in K\n",
+ "T4=(500+273);##temperature at which air leaves nozzle in K\n",
+ "Cp=1.005;##specific heat at constant pressure in KJ#kg K\n",
+ "C2=50;##velocity of hot air enter into gas turbine in m#s\n",
+ "C3=60;##velocity of air leaving turbine enters a nozzle in m#s\n",
+ "print(\"in heat exchanger upon applying S.F.E.E with assumption of no change in kinetic energy,no work interaction,no change in potential energy,for unit mass flow rate of air,\")\n",
+ "print(\"h1+Q1_2=h2\")\n",
+ "print(\"Q1_2=h2-h1\")\n",
+ "print(\"so heat transfer to air in heat exchanger(Q1_2)in KJ\")\n",
+ "Q1_2=Cp*(T2-T1)\n",
+ "print(\"Q1_2=\"),round(Q1_2,2)\n",
+ "print(\"in gas turbine let us use S.F.E.E,assuming no change in potential energy,for unit mass flow rate of air\")\n",
+ "print(\"h2+C2^2#2=h3+C3^2/2+Wt\")\n",
+ "print(\"Wt=(h2-h3)+(C2^2-C3^2)/2\")\n",
+ "print(\"so power output from turbine(Wt)in KJ#s\")\n",
+ "Wt=Cp*(T2-T3)+(C2**2-C3**2)*10**-3/2\n",
+ "print(\"Wt=\"),round(Cp,2)\n",
+ "print(\"applying S.F.E.E upon nozzle assuming no change in potential energy,no work and heat interactions,for unit mass flow rate,\")\n",
+ "print(\"h3+C=h4+C4^2/2\")\n",
+ "print(\"C4^2#2=(h3-h4)+C3^2/2\")\n",
+ "print(\"velocity at exit of nozzle(C4)in m#s\")\n",
+ "C4=math.sqrt(2*(Cp*(T3-T4)+C3**2*10**-3/2))\n",
+ "print(\"C4=\"),round(C4,2)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 3.15;pg no:85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 3.15, Page:85 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 15\n",
+ "for constant pressure heating,say state changes from 1 to 2\n",
+ "Wa=p1*dv\n",
+ "Wa=p1*(v2-v1)\n",
+ "it is given that v2=2v1\n",
+ "so Wa=p1*v1=R*T1\n",
+ "for subsequent expansion at constant temperature say state from 2 to 3\n",
+ "also given that v3/v1=6,v3/v2=3\n",
+ "so work=Wb=p*dv\n",
+ "on solving above we get Wb=R*T2*ln(v3#v2)=R*T2*log3\n",
+ "temperature at 2 can be given by perfect gas consideration as,\n",
+ "T2/T1=v2/v1\n",
+ "or T2=2*T1\n",
+ "now total work done by air W=Wa+Wb=R*T1+R*T2*log3=R*T1+2*R*T1*log3 in KJ\n",
+ "so W in KJ= 10632.69\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of total work done by ai\n",
+ "#intiation of all variables\n",
+ "# Chapter 3\n",
+ "import math\n",
+ "print\"Example 3.15, Page:85 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 15\")\n",
+ "T1=400;##initial temperature of gas in K\n",
+ "R=8.314;##gas constant in \n",
+ "print(\"for constant pressure heating,say state changes from 1 to 2\")\n",
+ "print(\"Wa=p1*dv\")\n",
+ "print(\"Wa=p1*(v2-v1)\")\n",
+ "print(\"it is given that v2=2v1\")\n",
+ "print(\"so Wa=p1*v1=R*T1\")\n",
+ "print(\"for subsequent expansion at constant temperature say state from 2 to 3\")\n",
+ "print(\"also given that v3/v1=6,v3/v2=3\")\n",
+ "print(\"so work=Wb=p*dv\")\n",
+ "print(\"on solving above we get Wb=R*T2*ln(v3#v2)=R*T2*log3\")\n",
+ "print(\"temperature at 2 can be given by perfect gas consideration as,\")\n",
+ "print(\"T2/T1=v2/v1\")\n",
+ "print(\"or T2=2*T1\")\n",
+ "print(\"now total work done by air W=Wa+Wb=R*T1+R*T2*log3=R*T1+2*R*T1*log3 in KJ\")\n",
+ "W=R*T1+2*R*T1*math.log(3)\n",
+ "print(\"so W in KJ=\"),round(W,2)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 3.16;pg no:85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 3.16, Page:85 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 16\n",
+ "NOTE=>this question contain derivation which cannot be solve using scilab so we use the result of derivation to proceed further \n",
+ "we get W=(Vf-Vi)*((Pi+Pf)/2)\n",
+ "also final volume of gas in m^3 is Vf=3*Vi\n",
+ "now work done by gas(W)in J 750000.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of work done by gas\n",
+ "#intiation of all variables\n",
+ "# Chapter 3\n",
+ "print\"Example 3.16, Page:85 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 16\")\n",
+ "Pi=0.5*10**6;##initial pressure of gas in pa\n",
+ "Vi=0.5;##initial volume of gas in m^3\n",
+ "Pf=1*10**6;##final pressure of gas in pa\n",
+ "print(\"NOTE=>this question contain derivation which cannot be solve using scilab so we use the result of derivation to proceed further \")\n",
+ "print(\"we get W=(Vf-Vi)*((Pi+Pf)/2)\")\n",
+ "print(\"also final volume of gas in m^3 is Vf=3*Vi\") \n",
+ "Vf=3*Vi\n",
+ "W=(Vf-Vi)*((Pi+Pf)/2)\n",
+ "print(\"now work done by gas(W)in J\"),round(W,2)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 3.17;pg no:87"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 3.17, Page:87 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 17\n",
+ "with the heating of N2 it will get expanded while H2 gets compressed simultaneously.compression of H2 in insulated chamber may be considered of adiabatic type.\n",
+ "adiabatic index of compression of H2 can be obtained as,\n",
+ "Cp_H2=\n",
+ "y_H2=Cp_H2/(Cp_H2-R_H2) 1.4\n",
+ "adiabatic index of expansion for N2,Cp_N2=R_N2*(y_N2#(y_N2-1))\n",
+ "y_N2= 1.4\n",
+ "i>for hydrogen,p1*v1^y=p2*v2^y\n",
+ "so final pressure of H2(p2)in pa\n",
+ "p2= 1324078.55\n",
+ "ii>since partition remains in equlibrium throughout hence no work is done by partition.it is a case similar to free expansion \n",
+ "partition work=0\n",
+ "iii>work done upon H2(W_H2)in J,\n",
+ "W_H2= -200054.06\n",
+ "work done upon H2(W_H2)=-2*10^5 J\n",
+ "so work done by N2(W_N2)=2*10^5 J \n",
+ "iv>heat added to N2 can be obtained using first law of thermodynamics as\n",
+ "Q_N2=deltaU_N2+W_N2=>Q_N2=m*Cv_N2*(T2-T1)+W_N2\n",
+ "final temperature of N2 can be obtained considering it as perfect gas\n",
+ "therefore, T2=(p2*v2*T1)#(p1*v1)\n",
+ "here p2=final pressure of N2 which will be equal to that of H2 as the partition is free and frictionless\n",
+ "p2=1.324*10^6 pa,v2=0.75 m^3\n",
+ "so now final temperature of N2(T2)in K= 1191.67\n",
+ "mass of N2(m)in kg= 2.81\n",
+ "specific heat at constant volume(Cv_N2)in KJ/kg K,Cv_N2= 1.0\n",
+ "heat added to N2,(Q_N2)in KJ\n",
+ "Q_N2= 2052.89\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of \n",
+ "#intiation of all variables\n",
+ "# Chapter 3\n",
+ "print\"Example 3.17, Page:87 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 17\")\n",
+ "Cp_H2=14.307;##specific heat of H2 at constant pressure in KJ#kg K\n",
+ "R_H2=4.1240;##gas constant for H2 in KJ#kg K\n",
+ "Cp_N2=1.039;##specific heat of N2 at constant pressure in KJ#kg K\n",
+ "R_N2=0.2968;##gas constant for N2 in KJ#kg K\n",
+ "T1=(27+273);##ambient temperature in K\n",
+ "v1=0.5;##initial volume of H2 in m^3\n",
+ "p1=0.5*10**6;##initial pressure of H2 in pa \n",
+ "v2=0.25;##final volume of H2 in m^3 \n",
+ "p2=1.324*10**6;##final pressure of H2 in pa\n",
+ "print(\"with the heating of N2 it will get expanded while H2 gets compressed simultaneously.compression of H2 in insulated chamber may be considered of adiabatic type.\")\n",
+ "print(\"adiabatic index of compression of H2 can be obtained as,\")\n",
+ "print(\"Cp_H2=\")\n",
+ "y_H2=Cp_H2/(Cp_H2-R_H2)\n",
+ "print(\"y_H2=Cp_H2/(Cp_H2-R_H2)\"),round(y_H2,2)\n",
+ "print(\"adiabatic index of expansion for N2,Cp_N2=R_N2*(y_N2#(y_N2-1))\")\n",
+ "y_N2=Cp_N2/(Cp_N2-R_N2)\n",
+ "print(\"y_N2=\"),round(y_N2,2)\n",
+ "print(\"i>for hydrogen,p1*v1^y=p2*v2^y\")\n",
+ "print(\"so final pressure of H2(p2)in pa\")\n",
+ "p2=p1*(v1/v2)**y_H2\n",
+ "print(\"p2=\"),round(p2,2)\n",
+ "print(\"ii>since partition remains in equlibrium throughout hence no work is done by partition.it is a case similar to free expansion \")\n",
+ "print(\"partition work=0\")\n",
+ "print(\"iii>work done upon H2(W_H2)in J,\")\n",
+ "W_H2=(p1*v1-p2*v2)/(y_H2-1)\n",
+ "print(\"W_H2=\"),round(W_H2,2)\n",
+ "print(\"work done upon H2(W_H2)=-2*10^5 J\")\n",
+ "W_N2=2*10**5;##work done by N2 in J\n",
+ "print(\"so work done by N2(W_N2)=2*10^5 J \")\n",
+ "print(\"iv>heat added to N2 can be obtained using first law of thermodynamics as\")\n",
+ "print(\"Q_N2=deltaU_N2+W_N2=>Q_N2=m*Cv_N2*(T2-T1)+W_N2\")\n",
+ "print(\"final temperature of N2 can be obtained considering it as perfect gas\")\n",
+ "print(\"therefore, T2=(p2*v2*T1)#(p1*v1)\")\n",
+ "print(\"here p2=final pressure of N2 which will be equal to that of H2 as the partition is free and frictionless\")\n",
+ "print(\"p2=1.324*10^6 pa,v2=0.75 m^3\")\n",
+ "v2=0.75;##final volume of N2 in m^3\n",
+ "T2=(p2*v2*T1)/(p1*v1)\n",
+ "print(\"so now final temperature of N2(T2)in K=\"),round(T2,2)\n",
+ "T2=1191.6;##T2 approx. equal to 1191.6 K\n",
+ "m=(p1*v1)/(R_N2*1000*T1)\n",
+ "print(\"mass of N2(m)in kg=\"),round(m,2)\n",
+ "m=2.8;##m approx equal to 2.8 kg\n",
+ "Cv_N2=Cp_N2-R_N2\n",
+ "print(\"specific heat at constant volume(Cv_N2)in KJ/kg K,Cv_N2=\"),round(Cv_N2)\n",
+ "print(\"heat added to N2,(Q_N2)in KJ\")\n",
+ "Q_N2=((m*Cv_N2*1000*(T2-T1))+W_N2)/1000\n",
+ "print(\"Q_N2=\"),round(Q_N2,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 3.18;pg no:88"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 3.18, Page:88 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 18\n",
+ "let initial states and final states of air inside cylinder be given by m1,p1,v1,,T1 and m2,p2,v2,T2 respectively.it is case of emptying of cylinder\n",
+ "initial mass of air(m1)in kg\n",
+ "m1= 9.29\n",
+ "for adiabatic expansion during release of air through valve from 0.5 Mpa to atmospheric pressure\n",
+ "T2=in K 237.64\n",
+ "final mass of air left in tank(m2)in kg\n",
+ "m2= 2.97\n",
+ "writing down energy equation for unsteady flow system\n",
+ "(m1-m2)*(h2+C^2/2)=(m1*u1-m2*u2)\n",
+ "or (m1-m2)*C^2/2=(m1*u1-m2*u2)-(m1-m2)*h2\n",
+ "kinetic energy available for running turbine(W)in KJ\n",
+ "W=(m1*u1-m2*u2)-(m1-m2)*h2=(m1*Cv_air*1000*T1-m2*Cv_air*1000*T2)-(m1-m2)*Cp_air*1000*T2\n",
+ "W=(m1*Cv_air*1000*T1-m2*Cv_air*1000*T2)-(m1-m2)*Cp_air*1000*T2\n",
+ "amount of work available=KJ 482.67\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of amount of work available\n",
+ "#intiation of all variables\n",
+ "# Chapter 3\n",
+ "print\"Example 3.18, Page:88 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 18\")\n",
+ "p1=0.5*10**6;#initial pressure of air in pa\n",
+ "p2=1.013*10**5;#atmospheric pressure in pa\n",
+ "v1=2;#initial volume of air in m^3\n",
+ "v2=v1;#final volume of air in m^3\n",
+ "T1=375;#initial temperature of air in K\n",
+ "Cp_air=1.003;#specific heat at consatnt pressure in KJ/kg K\n",
+ "Cv_air=0.716;#specific heat at consatnt volume in KJ/kg K\n",
+ "R_air=0.287;#gas constant in KJ/kg K\n",
+ "y=1.4;#expansion constant for air\n",
+ "print(\"let initial states and final states of air inside cylinder be given by m1,p1,v1,,T1 and m2,p2,v2,T2 respectively.it is case of emptying of cylinder\")\n",
+ "print(\"initial mass of air(m1)in kg\")\n",
+ "m1=(p1*v1)/(R_air*1000*T1)\n",
+ "print(\"m1=\"),round(m1,2)\n",
+ "print(\"for adiabatic expansion during release of air through valve from 0.5 Mpa to atmospheric pressure\")\n",
+ "T2=T1*(p2/p1)**((y-1)/y)\n",
+ "print(\"T2=in K\"),round(T2,2)\n",
+ "print(\"final mass of air left in tank(m2)in kg\")\n",
+ "m2=(p2*v2)/(R_air*1000*T2)\n",
+ "print(\"m2=\"),round(m2,2)\n",
+ "print(\"writing down energy equation for unsteady flow system\")\n",
+ "print(\"(m1-m2)*(h2+C^2/2)=(m1*u1-m2*u2)\")\n",
+ "print(\"or (m1-m2)*C^2/2=(m1*u1-m2*u2)-(m1-m2)*h2\")\n",
+ "print(\"kinetic energy available for running turbine(W)in KJ\")\n",
+ "print(\"W=(m1*u1-m2*u2)-(m1-m2)*h2=(m1*Cv_air*1000*T1-m2*Cv_air*1000*T2)-(m1-m2)*Cp_air*1000*T2\")\n",
+ "print(\"W=(m1*Cv_air*1000*T1-m2*Cv_air*1000*T2)-(m1-m2)*Cp_air*1000*T2\")\n",
+ "W=((m1*Cv_air*1000*T1-m2*Cv_air*1000*T2)-(m1-m2)*Cp_air*1000*T2)/1000\n",
+ "print(\"amount of work available=KJ\"),round(W,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 3.19;pg no:89"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 3.19, Page:89 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 19\n",
+ "using perfect gas equation for the two chambers having initial states as 1 and 2 and final states as 3\n",
+ "n1= 0.1\n",
+ "now n2= 0.12\n",
+ "for tank being insulated and rigid we can assume,deltaU=0,W=0,Q=0,so writing deltaU,\n",
+ "deltaU=n1*Cv*(T3-T1)+n2*Cv*(T3-T2)\n",
+ "final temperature of gas(T3)in K\n",
+ "T3= 409.09\n",
+ "using perfect gas equation for final mixture,\n",
+ "final pressure of gas(p3)in Mpa\n",
+ "p3= 750000.0\n",
+ "so final pressure and temperature =0.75 Mpa and 409.11 K\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of final pressure and temperature\n",
+ "#intiation of all variables\n",
+ "# Chapter 3\n",
+ "print\"Example 3.19, Page:89 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 19\")\n",
+ "p1=0.5*10**6;#initial pressure of air in pa\n",
+ "v1=0.5;#initial volume of air in m^3\n",
+ "T1=(27+273);#initial temperature of air in K\n",
+ "p2=1*10**6;#final pressure of air in pa\n",
+ "v2=0.5;#final volume of air in m^3\n",
+ "T2=500;#final temperature of air in K\n",
+ "R=8314;#gas constant in J/kg K\n",
+ "Cv=0.716;#specific heat at constant volume in KJ/kg K\n",
+ "print(\"using perfect gas equation for the two chambers having initial states as 1 and 2 and final states as 3\")\n",
+ "n1=(p1*v1)/(R*T1)\n",
+ "print(\"n1=\"),round(n1,2)\n",
+ "n2=(p2*v2)/(R*T2)\n",
+ "print(\"now n2=\"),round(n2,2)\n",
+ "print(\"for tank being insulated and rigid we can assume,deltaU=0,W=0,Q=0,so writing deltaU,\")\n",
+ "deltaU=0;#change in internal energy\n",
+ "print(\"deltaU=n1*Cv*(T3-T1)+n2*Cv*(T3-T2)\")\n",
+ "print(\"final temperature of gas(T3)in K\")\n",
+ "T3=(deltaU+Cv*(n1*T1+n2*T2))/(Cv*(n1+n2))\n",
+ "print(\"T3=\"),round(T3,2)\n",
+ "print(\"using perfect gas equation for final mixture,\")\n",
+ "print(\"final pressure of gas(p3)in Mpa\")\n",
+ "p3=((n1+n2)*R*T3)/(v1+v2)\n",
+ "print(\"p3=\"),round(p3,3)\n",
+ "print(\"so final pressure and temperature =0.75 Mpa and 409.11 K\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 3.20;pg no:90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 3.20, Page:90 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 20\n",
+ "printlacement work,W=p*(v1-v2)in N.m -50675.0\n",
+ "so heat transfer(Q)in N.m\n",
+ "Q=-W 50675.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of heat transfer\n",
+ "#intiation of all variables\n",
+ "# Chapter 3\n",
+ "print\"Example 3.20, Page:90 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 20\")\n",
+ "v1=0;#initial volume of air inside bottle in m^3\n",
+ "v2=0.5;#final volume of air inside bottle in m^3\n",
+ "p=1.0135*10**5;#atmospheric pressure in pa\n",
+ "W=p*(v1-v2)\n",
+ "print(\"printlacement work,W=p*(v1-v2)in N.m\"),round(W,2)\n",
+ "print(\"so heat transfer(Q)in N.m\")\n",
+ "Q=-W\n",
+ "print(\"Q=-W\"),round(Q,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 3.21;pg no:90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 3.21, Page:90 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 21\n",
+ "here turbogenerator is fed with compressed air from a compressed air bottle.pressure inside bottle gradually decreases from 35 bar to 1 bar.expansion from 35 bar to 1 bar occurs isentropically.thus,for the initial and final states of pressure,volume,temperatureand mass inside bottle being given as p1,v1,T1 & m1 and p2,v2,T2 & m2 respectively.it is transient flow process similar to emptying of the bottle.\n",
+ "(p2/p1)^((y-1)/y)=(T2/T1)\n",
+ "final temperature of air(T2)in K\n",
+ "T2= 113.34\n",
+ "by perfect gas law,initial mass in bottle(m1)in kg\n",
+ "m1= 11.69\n",
+ "final mass in bottle(m2)in kg\n",
+ "m2= 0.92\n",
+ "energy available for running turbo generator or work(W)in KJ\n",
+ "W+(m1-m2)*h2=m1*u1-m2*u2\n",
+ "W= 1325.42\n",
+ "this is maximum work that can be had from the emptying of compresssed air bottle between given pressure limits\n",
+ "turbogenerator actual output(P1)=5 KJ/s\n",
+ "input to turbogenerator(P2)in KJ/s\n",
+ "time duration for which turbogenerator can be run(deltat)in seconds\n",
+ "deltat= 159.05\n",
+ "duration=160 seconds approx.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of time duration for which turbogenerator can be run\n",
+ "#intiation of all variables\n",
+ "# Chapter 3\n",
+ "print\"Example 3.21, Page:90 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 21\")\n",
+ "p1=35.*10**5;#initial pressure of air in pa\n",
+ "v1=0.3;#initial volume of air in m^3\n",
+ "T1=(313.);#initial temperature of air in K\n",
+ "p2=1.*10**5;#final pressure of air in pa\n",
+ "v2=0.3;#final volume of air in m^3\n",
+ "y=1.4;#expansion constant\n",
+ "R=0.287;#gas constant in KJ/kg K\n",
+ "Cv=0.718;#specific heat at constant volume in KJ/kg K\n",
+ "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n",
+ "print(\"here turbogenerator is fed with compressed air from a compressed air bottle.pressure inside bottle gradually decreases from 35 bar to 1 bar.expansion from 35 bar to 1 bar occurs isentropically.thus,for the initial and final states of pressure,volume,temperatureand mass inside bottle being given as p1,v1,T1 & m1 and p2,v2,T2 & m2 respectively.it is transient flow process similar to emptying of the bottle.\")\n",
+ "print(\"(p2/p1)^((y-1)/y)=(T2/T1)\")\n",
+ "print(\"final temperature of air(T2)in K\")\n",
+ "T2=T1*(p2/p1)**((y-1)/y)\n",
+ "print(\"T2=\"),round(T2,2)\n",
+ "print(\"by perfect gas law,initial mass in bottle(m1)in kg\")\n",
+ "m1=(p1*v1)/(R*1000.*T1)\n",
+ "print(\"m1=\"),round(m1,2)\n",
+ "print(\"final mass in bottle(m2)in kg\")\n",
+ "m2=(p2*v2)/(R*1000.*T2)\n",
+ "print(\"m2=\"),round(m2,2)\n",
+ "print(\"energy available for running turbo generator or work(W)in KJ\")\n",
+ "print(\"W+(m1-m2)*h2=m1*u1-m2*u2\")\n",
+ "W=(m1*Cv*T1-m2*Cv*T2)-(m1-m2)*Cp*T2\n",
+ "print(\"W=\"),round(W,2)\n",
+ "print(\"this is maximum work that can be had from the emptying of compresssed air bottle between given pressure limits\")\n",
+ "print(\"turbogenerator actual output(P1)=5 KJ/s\")\n",
+ "P1=5;#turbogenerator actual output in KJ/s\n",
+ "print(\"input to turbogenerator(P2)in KJ/s\")\n",
+ "P2=P1/0.6\n",
+ "print(\"time duration for which turbogenerator can be run(deltat)in seconds\")\n",
+ "deltat=W/P2\n",
+ "print(\"deltat=\"),round(deltat,2)\n",
+ "print(\"duration=160 seconds approx.\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 3.22;pg no:91"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 3.22, Page:91 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 22\n",
+ "different states as described in the problem are denoted as 1,2and 3 and shown on p-V diagram\n",
+ "process 1-2 is polytropic process with index 1.2\n",
+ "(T2/T1)=(p2/p1)^((n-1)/n)\n",
+ "final temperature of air(T2)in K\n",
+ "T2= 457.68\n",
+ "at state 1,p1*v1=m*R*T1\n",
+ "initial volume of air(v1)in m^3\n",
+ "v1= 2.01\n",
+ "final volume of air(v2)in m^3\n",
+ "for process 1-2,v2= 0.53\n",
+ "for process 2-3 is constant pressure process so p2*v2/T2=p3*v3/T3\n",
+ "v3=v2*T3/T2 in m^3\n",
+ "here process 3-1 is isothermal process so T1=T3\n",
+ "during process 1-2 the compression work(W1_2)in KJ\n",
+ "W1_2=(m*R*(T2-T1)/(1-n))\n",
+ "work during process 2-3(W2_3)in KJ,\n",
+ "W2_3=p2*(v3-v2)/1000\n",
+ "work during process 3-1(W3_1)in KJ\n",
+ "W3_1= 485.0\n",
+ "net work done(W_net)in KJ\n",
+ "W_net=W1_2+W2_3+W3_1 -71.28\n",
+ "net work=-71.27 KJ\n",
+ "here -ve workshows work done upon the system.since it is cycle,so\n",
+ "W_net=Q_net\n",
+ "phi dW=phi dQ=-71.27 KJ\n",
+ "heat transferred from system=71.27 KJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of network,heat transferred from system\n",
+ "#intiation of all variables\n",
+ "# Chapter 3\n",
+ "import math\n",
+ "print\"Example 3.22, Page:91 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 22\")\n",
+ "p1=1.5*10**5;#initial pressure of air in pa\n",
+ "T1=(77+273);#initial temperature of air in K\n",
+ "p2=7.5*10**5;#final pressure of air in pa\n",
+ "n=1.2;#expansion constant for process 1-2\n",
+ "R=0.287;#gas constant in KJ/kg K\n",
+ "m=3.;#mass of air in kg\n",
+ "print(\"different states as described in the problem are denoted as 1,2and 3 and shown on p-V diagram\")\n",
+ "print(\"process 1-2 is polytropic process with index 1.2\")\n",
+ "print(\"(T2/T1)=(p2/p1)^((n-1)/n)\")\n",
+ "print(\"final temperature of air(T2)in K\")\n",
+ "T2=T1*((p2/p1)**((n-1)/n))\n",
+ "print(\"T2=\"),round(T2,2)\n",
+ "print(\"at state 1,p1*v1=m*R*T1\")\n",
+ "print(\"initial volume of air(v1)in m^3\")\n",
+ "v1=(m*R*1000*T1)/p1\n",
+ "print(\"v1=\"),round(v1,2)\n",
+ "print(\"final volume of air(v2)in m^3\")\n",
+ "v2=((p1*v1**n)/p2)**(1/n)\n",
+ "print(\"for process 1-2,v2=\"),round(v2,2)\n",
+ "print(\"for process 2-3 is constant pressure process so p2*v2/T2=p3*v3/T3\")\n",
+ "print(\"v3=v2*T3/T2 in m^3\")\n",
+ "print(\"here process 3-1 is isothermal process so T1=T3\")\n",
+ "T3=T1;#process 3-1 is isothermal\n",
+ "v3=v2*T3/T2\n",
+ "print(\"during process 1-2 the compression work(W1_2)in KJ\")\n",
+ "print(\"W1_2=(m*R*(T2-T1)/(1-n))\")\n",
+ "W1_2=(m*R*(T2-T1)/(1-n))\n",
+ "print(\"work during process 2-3(W2_3)in KJ,\")\n",
+ "print(\"W2_3=p2*(v3-v2)/1000\")\n",
+ "W2_3=p2*(v3-v2)/1000\n",
+ "print(\"work during process 3-1(W3_1)in KJ\")\n",
+ "p3=p2;#pressure is constant for process 2-3\n",
+ "W3_1=p3*v3*math.log(v1/v3)/1000\n",
+ "print(\"W3_1=\"),round(W3_1,2)\n",
+ "print(\"net work done(W_net)in KJ\")\n",
+ "W_net=W1_2+W2_3+W3_1\n",
+ "print(\"W_net=W1_2+W2_3+W3_1\"),round(W_net,2)\n",
+ "print(\"net work=-71.27 KJ\")\n",
+ "print(\"here -ve workshows work done upon the system.since it is cycle,so\")\n",
+ "print(\"W_net=Q_net\")\n",
+ "print(\"phi dW=phi dQ=-71.27 KJ\")\n",
+ "print(\"heat transferred from system=71.27 KJ\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 3.23;pg no:93"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 3.23, Page:93 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 3 Example 23\n",
+ "initial mass of air in bottle(m1)in kg \n",
+ "m1= 6.97\n",
+ "now final temperature(T2)in K\n",
+ "T2= 0.0\n",
+ "final mass of air in bottle(m2)in kg\n",
+ "m2= 0.82\n",
+ "energy available for running of turbine due to emptying of bottle(W)in KJ\n",
+ "W= 639.09\n",
+ "work available from turbine=639.27KJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of work available from turbine\n",
+ "#intiation of all variables\n",
+ "# Chapter 3\n",
+ "print\"Example 3.23, Page:93 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 3 Example 23\")\n",
+ "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n",
+ "Cv=0.718;#specific heat at constant volume in KJ/kg K\n",
+ "y=1.4;#expansion constant \n",
+ "p1=40*10**5;#initial temperature of air in pa\n",
+ "v1=0.15;#initial volume of air in m^3\n",
+ "T1=(27+273);#initial temperature of air in K\n",
+ "p2=2*10**5;#final temperature of air in pa\n",
+ "v2=0.15;#final volume of air in m^3\n",
+ "R=0.287;#gas constant in KJ/kg K\n",
+ "print(\"initial mass of air in bottle(m1)in kg \")\n",
+ "m1=(p1*v1)/(R*1000*T1)\n",
+ "print(\"m1=\"),round(m1,2)\n",
+ "print(\"now final temperature(T2)in K\")\n",
+ "T2=T1*(p2/p1)**((y-1)/y)\n",
+ "print(\"T2=\"),round(T2,2)\n",
+ "T2=127.36;#take T2=127.36 approx.\n",
+ "print(\"final mass of air in bottle(m2)in kg\")\n",
+ "m2=(p2*v2)/(R*1000*T2)\n",
+ "print(\"m2=\"),round(m2,2)\n",
+ "m2=0.821;#take m2=0.821 approx.\n",
+ "print(\"energy available for running of turbine due to emptying of bottle(W)in KJ\")\n",
+ "W=(m1*Cv*T1-m2*Cv*T2)-(m1-m2)*Cp*T2\n",
+ "print(\"W=\"),round(W,2)\n",
+ "print(\"work available from turbine=639.27KJ\")\n"
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter4_3.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter4_3.ipynb
new file mode 100644
index 00000000..bb4a3703
--- /dev/null
+++ b/_Engineering_Thermodynamics_by__O._Singh/chapter4_3.ipynb
@@ -0,0 +1,1070 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 4:Second Law of Thermo Dynamics"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 4.1;pg no: 113"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 4.1, Page:113 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 1\n",
+ "NOTE=>This question is fully theoritical hence cannot be solve using scilab.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#intiation of all variables\n",
+ "# Chapter 4\n",
+ "print\"Example 4.1, Page:113 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 1\")\n",
+ "print(\"NOTE=>This question is fully theoritical hence cannot be solve using scilab.\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 4.2;pg no: 114"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 4.2, Page:114 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 2\n",
+ "in carnot engine from thermodynamics temperature scale\n",
+ "Q1/Q2=T1/T2\n",
+ "W=Q1-Q2=200 KJ\n",
+ "from above equations Q1 in KJ is given by\n",
+ "Q1= 349.61\n",
+ "and Q2 in KJ\n",
+ "Q2=Q1-200 149.61\n",
+ "so heat supplied(Q1) in KJ 349.6\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of heat supplied\n",
+ "#intiation of all variables\n",
+ "# Chapter 4\n",
+ "print\"Example 4.2, Page:114 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 2\")\n",
+ "T1=(400.+273.);#temperature of source in K\n",
+ "T2=(15.+273.);#temperature of sink in K\n",
+ "W=200.;#work done in KJ\n",
+ "print(\"in carnot engine from thermodynamics temperature scale\")\n",
+ "print(\"Q1/Q2=T1/T2\")\n",
+ "print(\"W=Q1-Q2=200 KJ\")\n",
+ "print(\"from above equations Q1 in KJ is given by\")\n",
+ "Q1=(200*T1)/(T1-T2)\n",
+ "print(\"Q1=\"),round(Q1,2)\n",
+ "print(\"and Q2 in KJ\")\n",
+ "Q2=Q1-200\n",
+ "print(\"Q2=Q1-200\"),round(Q2,2)\n",
+ "print(\"so heat supplied(Q1) in KJ\"),round(Q1,1)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 4.3;pg no: 115"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 4.3, Page:115 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 3\n",
+ "from thermodynamic temperature scale\n",
+ "Q1/Q2=T1/T2\n",
+ "so Q1=Q2*(T1/T2)in KJ/s 2.27\n",
+ "power/work input required(W)=Q1-Q2 in KJ/s \n",
+ "power required for driving refrigerator=W in KW 0.274\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of power required for driving refrigerator\n",
+ "#intiation of all variables\n",
+ "# Chapter 4\n",
+ "print\"Example 4.3, Page:115 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 3\")\n",
+ "T1=315.;#temperature of reservoir 1 in K\n",
+ "T2=277.;#temperature of reservoir 2 in K\n",
+ "Q2=2.;#heat extracted in KJ/s\n",
+ "print(\"from thermodynamic temperature scale\")\n",
+ "print(\"Q1/Q2=T1/T2\")\n",
+ "Q1=Q2*(T1/T2)\n",
+ "print(\"so Q1=Q2*(T1/T2)in KJ/s\"),round(Q1,2)\n",
+ "print(\"power/work input required(W)=Q1-Q2 in KJ/s \")\n",
+ "W=Q1-Q2\n",
+ "print(\"power required for driving refrigerator=W in KW\"),round(W,3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 4.4;pg no: 115"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 4.4, Page:115 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 4\n",
+ "we can writefor heat engine,Q1/Q2=T1/T2\n",
+ "so Q2=Q1*(T2/T1) in KJ 545.45\n",
+ "so We=in KJ 1454.55\n",
+ "for refrigerator,Q3/Q4=T3/T4 eq 1\n",
+ "now We-Wr=300\n",
+ "so Wr=We-300 in KJ 1154.55\n",
+ "and Wr=Q4-Q3=1154.55 KJ eq 2 \n",
+ "solving eq1 and eq 2 we get\n",
+ "Q4=in KJ 8659.13\n",
+ "and Q3=in KJ 7504.58\n",
+ "total heat transferred to low teperature reservoir(Q)=in KJ 9204.58\n",
+ "hence heat transferred to refrigerant=Q3 in KJ 7504.58\n",
+ "and heat transferred to low temperature reservoir=Q in KJ 9204.58\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of heat transferred to refrigerant and low temperature reservoir\n",
+ "#intiation of all variables\n",
+ "# Chapter 4\n",
+ "print\"Example 4.4, Page:115 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 4\")\n",
+ "T1=(827.+273.);#temperature of high temperature reservoir in K\n",
+ "T2=(27.+273.);#temperature of low temperature reservoir in K\n",
+ "T3=(-13.+273.);#temperature of reservoir 3 in K\n",
+ "Q1=2000.;#heat ejected by reservoir 1 in KJ\n",
+ "print(\"we can writefor heat engine,Q1/Q2=T1/T2\")\n",
+ "Q2=Q1*(T2/T1)\n",
+ "print(\"so Q2=Q1*(T2/T1) in KJ\"),round(Q2,2)\n",
+ "We=Q1-Q2\n",
+ "print(\"so We=in KJ\"),round(We,2)\n",
+ "print(\"for refrigerator,Q3/Q4=T3/T4 eq 1\")\n",
+ "T4=T2;#temperature of low temperature reservoir in K\n",
+ "print(\"now We-Wr=300\")\n",
+ "Wr=We-300.\n",
+ "print(\"so Wr=We-300 in KJ\"),round(Wr,2)\n",
+ "print(\"and Wr=Q4-Q3=1154.55 KJ eq 2 \")\n",
+ "print(\"solving eq1 and eq 2 we get\")\n",
+ "Q4=(1154.55*T4)/(T4-T3)\n",
+ "print(\"Q4=in KJ\"),round(Q4,2)\n",
+ "Q3=Q4-Wr\n",
+ "print(\"and Q3=in KJ\"),round(Q3,2)\n",
+ "Q=Q2+Q4\n",
+ "print(\"total heat transferred to low teperature reservoir(Q)=in KJ\"),round(Q,2)\n",
+ "print(\"hence heat transferred to refrigerant=Q3 in KJ\"),round(Q3,2)\n",
+ "print(\"and heat transferred to low temperature reservoir=Q in KJ\"),round(Q,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 4.5;pg no: 116"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 33,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 4.5, Page:116 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 5\n",
+ "COP_HP=Q1/W=Q1/(Q1-Q2)=1/(1-(Q2/Q1))\n",
+ "also we know K=Q1/Q2=T1/T2\n",
+ "so K=T1/T2 1.1\n",
+ "so COP_HP=1/(1-(Q2/Q1)=1/(1-(1/K)) 11.0\n",
+ "also COP_HP=Q1/W\n",
+ "W=Q1/COin MJ/Hr 3.03\n",
+ "or W=1000*W/3600 in KW 3.03\n",
+ "so minimum power required(W)in KW 3.03\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of minimum power required\n",
+ "#intiation of all variables\n",
+ "# Chapter 4\n",
+ "print\"Example 4.5, Page:116 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 5\")\n",
+ "T1=(25+273.15);#temperature of inside of house in K\n",
+ "T2=(-1+273.15);#outside temperature in K\n",
+ "Q1=125;#heating load in MJ/Hr\n",
+ "print(\"COP_HP=Q1/W=Q1/(Q1-Q2)=1/(1-(Q2/Q1))\")\n",
+ "print(\"also we know K=Q1/Q2=T1/T2\")\n",
+ "K=T1/T2\n",
+ "print(\"so K=T1/T2\"),round(K,2)\n",
+ "COP_HP=1/(1-(1/K))\n",
+ "print(\"so COP_HP=1/(1-(Q2/Q1)=1/(1-(1/K))\"),round(COP_HP)\n",
+ "print(\"also COP_HP=Q1/W\")\n",
+ "W=Q1/COP_HP\n",
+ "W=1000*W/3600\n",
+ "print(\"W=Q1/COin MJ/Hr\"),round(W,2)\n",
+ "print(\"or W=1000*W/3600 in KW\"),round(W,2)\n",
+ "print(\"so minimum power required(W)in KW \"),round(W,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 4.6;pg no: 117"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 34,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 4.6, Page:117 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 6\n",
+ "cold storage plant can be considered as refrigerator operating between given temperatures limits\n",
+ "capacity of plant=heat to be extracted=Q2 in KW\n",
+ "we know that,one ton of refrigeration as 3.52 KW \n",
+ "so Q2=Q2*3.52 in KW 140.8\n",
+ "carnot COP of plant(COP_carnot)= 5.18\n",
+ "performance is 1/4 of its carnot COP\n",
+ "COP=COP_carnot/4\n",
+ "also actual COP=Q2/W\n",
+ "W=Q2/COP in KW\n",
+ "hence power required(W)in KW 108.76\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of power required\n",
+ "#intiation of all variables\n",
+ "# Chapter 4\n",
+ "print\"Example 4.6, Page:117 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 6\")\n",
+ "T1=(-15.+273.15);#inside temperature in K\n",
+ "T2=(35.+273.);#atmospheric temperature in K\n",
+ "Q2=40.;#refrigeration capacity of storage plant in tonnes\n",
+ "print(\"cold storage plant can be considered as refrigerator operating between given temperatures limits\")\n",
+ "print(\"capacity of plant=heat to be extracted=Q2 in KW\")\n",
+ "print(\"we know that,one ton of refrigeration as 3.52 KW \")\n",
+ "Q2=Q2*3.52\n",
+ "print(\"so Q2=Q2*3.52 in KW\"),round(Q2,2)\n",
+ "COP_carnot=1/((T2/T1)-1)\n",
+ "print(\"carnot COP of plant(COP_carnot)=\"),round(COP_carnot,2)\n",
+ "print(\"performance is 1/4 of its carnot COP\")\n",
+ "COP=COP_carnot/4\n",
+ "print(\"COP=COP_carnot/4\")\n",
+ "print(\"also actual COP=Q2/W\")\n",
+ "print(\"W=Q2/COP in KW\")\n",
+ "W=Q2/COP\n",
+ "print(\"hence power required(W)in KW\"),round(W,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 4.7;pg no: 117"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 35,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 4.7, Page:117 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 7\n",
+ "highest efficiency is that of carnot engine,so let us find the carnot cycle efficiency for given temperature limits\n",
+ "n= 0.79\n",
+ "or n=n*100 % 78.92\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of carnot cycle efficiency for given temperature limits\n",
+ "#intiation of all variables\n",
+ "# Chapter 4\n",
+ "print\"Example 4.7, Page:117 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 7\")\n",
+ "T1=(1150.+273.);#temperature of source in K\n",
+ "T2=(27.+273.);#temperature of sink in K\n",
+ "print(\"highest efficiency is that of carnot engine,so let us find the carnot cycle efficiency for given temperature limits\")\n",
+ "n=1-(T2/T1)\n",
+ "print(\"n=\"),round(n,2)\n",
+ "n=n*100\n",
+ "print(\"or n=n*100 %\"),round(n,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 4.8;pg no: 117"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 36,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 4.8, Page:117 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 8\n",
+ "here heat to be removed continuously from refrigerated space(Q)in KJ/s 0.13\n",
+ "for refrigerated,COP shall be Q/W=1/((T1/T2)-1)\n",
+ "W=in KW 0.02\n",
+ "so power required(W)in KW 0.02\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of power required\n",
+ "#intiation of all variables\n",
+ "# Chapter 4\n",
+ "print\"Example 4.8, Page:117 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 8\")\n",
+ "T1=(27.+273.);#temperature of source in K\n",
+ "T2=(-8.+273.);#temperature of sink in K\n",
+ "Q=7.5;#heat leakage in KJ/min\n",
+ "Q=Q/60.\n",
+ "print(\"here heat to be removed continuously from refrigerated space(Q)in KJ/s\"),round(Q,2)\n",
+ "print(\"for refrigerated,COP shall be Q/W=1/((T1/T2)-1)\")\n",
+ "W=Q*((T1/T2)-1)\n",
+ "print(\"W=in KW\"),round(W,2)\n",
+ "print(\"so power required(W)in KW\"),round(W,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 4.9;pg no: 118"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 37,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 4.9, Page:118 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 9\n",
+ "here W1:W2:W3=3:2:1\n",
+ "efficiency of engine,HE1,\n",
+ "W1/Q1=(1-(T2/1100))\n",
+ "so Q1=(1100*W1)/(1100-T2)\n",
+ "for HE2 engine,W2/Q2=(1-(T3/T2))\n",
+ "for HE3 engine,W3/Q3=(1-(300/T3))\n",
+ "from energy balance on engine,HE1\n",
+ "Q1=W1+Q2=>Q2=Q1-W1\n",
+ "above gives,Q1=(((1100*W1)/(1100-T2))-W1)=W1*(T2/(1100-T2))\n",
+ "substituting Q2 in efficiency of HE2\n",
+ "W2/(W1*(T2/(1100-T2)))=1-(T3/T2)\n",
+ "W2/W1=(T2/(1100-T2))*(T2-T3)/T2=((T2-T3)/(1100-T2))\n",
+ "2/3=(T2-T3)/(1100-T2)\n",
+ "2200-2*T2=3*T2-3*T3\n",
+ "5*T2-3*T3=2200\n",
+ "now energy balance on engine HE2 gives,Q2=W2+Q3\n",
+ "substituting in efficiency of HE2,\n",
+ "W2/(W2+Q3)=(T2-T3)/T2\n",
+ "W2*T2=(W2+Q3)*(T2-T3)\n",
+ "Q3=(W2*T3)/(T2-T3)\n",
+ "substituting Q3 in efficiency of HE3,\n",
+ "W3/((W2*T3)/(T2-T3))=(T3-300)/T3\n",
+ "W3/W2=(T3/(T2-T3))*(T3-300)/T3\n",
+ "1/2=(T3-300)/(T2-T3)\n",
+ "3*T3-T2=600\n",
+ "solving equations of T2 and T3,\n",
+ "we get,T3=in K 433.33\n",
+ "and by eq 5,T2 in K 700.0\n",
+ "so intermediate temperature are 700 K and 433.33 K\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of intermediate temperatures\n",
+ "#intiation of all variables\n",
+ "# Chapter 4\n",
+ "print\"Example 4.9, Page:118 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 9\")\n",
+ "T1=1100;#temperature of high temperature reservoir in K\n",
+ "T4=300;#temperature of low temperature reservoir in K\n",
+ "print(\"here W1:W2:W3=3:2:1\")\n",
+ "print(\"efficiency of engine,HE1,\")\n",
+ "print(\"W1/Q1=(1-(T2/1100))\")\n",
+ "print(\"so Q1=(1100*W1)/(1100-T2)\")\n",
+ "print(\"for HE2 engine,W2/Q2=(1-(T3/T2))\")\n",
+ "print(\"for HE3 engine,W3/Q3=(1-(300/T3))\")\n",
+ "print(\"from energy balance on engine,HE1\")\n",
+ "print(\"Q1=W1+Q2=>Q2=Q1-W1\")\n",
+ "print(\"above gives,Q1=(((1100*W1)/(1100-T2))-W1)=W1*(T2/(1100-T2))\")\n",
+ "print(\"substituting Q2 in efficiency of HE2\")\n",
+ "print(\"W2/(W1*(T2/(1100-T2)))=1-(T3/T2)\")\n",
+ "print(\"W2/W1=(T2/(1100-T2))*(T2-T3)/T2=((T2-T3)/(1100-T2))\")\n",
+ "print(\"2/3=(T2-T3)/(1100-T2)\")\n",
+ "print(\"2200-2*T2=3*T2-3*T3\")\n",
+ "print(\"5*T2-3*T3=2200\")\n",
+ "print(\"now energy balance on engine HE2 gives,Q2=W2+Q3\")\n",
+ "print(\"substituting in efficiency of HE2,\")\n",
+ "print(\"W2/(W2+Q3)=(T2-T3)/T2\")\n",
+ "print(\"W2*T2=(W2+Q3)*(T2-T3)\")\n",
+ "print(\"Q3=(W2*T3)/(T2-T3)\")\n",
+ "print(\"substituting Q3 in efficiency of HE3,\")\n",
+ "print(\"W3/((W2*T3)/(T2-T3))=(T3-300)/T3\")\n",
+ "print(\"W3/W2=(T3/(T2-T3))*(T3-300)/T3\")\n",
+ "print(\"1/2=(T3-300)/(T2-T3)\")\n",
+ "print(\"3*T3-T2=600\")\n",
+ "print(\"solving equations of T2 and T3,\")\n",
+ "T3=(600.+(2200./5.))/(3.-(3./5.))\n",
+ "print(\"we get,T3=in K\"),round(T3,2)\n",
+ "T2=(2200.+3.*T3)/5.\n",
+ "print(\"and by eq 5,T2 in K\"),round(T2,2)\n",
+ "print(\"so intermediate temperature are 700 K and 433.33 K\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 4.10;pg no: 119"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 38,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 4.10, Page:119 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 10\n",
+ "efficiency of engine,W/Q1=(800-T)/800\n",
+ "for refrigerator,COP=Q3/W=280/(T-280)\n",
+ "it is given that Q1=Q3=Q\n",
+ "so,from engine,W/Q=(800-T)/800\n",
+ "from refrigerator,Q/W=280/(T-280)\n",
+ "from above two(Q/W)may be equated,\n",
+ "(T-280)/280=(800-T)/800\n",
+ "so temperature(T)in K 414.81\n",
+ "efficiency of engine(n)is given as\n",
+ "n= 0.48\n",
+ "COP of refrigerator is given as\n",
+ "COP= 2.08\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of COP\n",
+ "#intiation of all variables\n",
+ "# Chapter 4\n",
+ "print\"Example 4.10, Page:119 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 10\")\n",
+ "T1=800.;#temperature of source in K\n",
+ "T2=280.;#temperature of sink in K\n",
+ "print(\"efficiency of engine,W/Q1=(800-T)/800\")\n",
+ "print(\"for refrigerator,COP=Q3/W=280/(T-280)\")\n",
+ "print(\"it is given that Q1=Q3=Q\")\n",
+ "print(\"so,from engine,W/Q=(800-T)/800\")\n",
+ "print(\"from refrigerator,Q/W=280/(T-280)\")\n",
+ "print(\"from above two(Q/W)may be equated,\")\n",
+ "print(\"(T-280)/280=(800-T)/800\")\n",
+ "T=2.*280.*800./(800.+280.)\n",
+ "print(\"so temperature(T)in K\"),round(T,2)\n",
+ "print(\"efficiency of engine(n)is given as\")\n",
+ "n=(800.-T)/800.\n",
+ "print(\"n=\"),round(n,2)\n",
+ "print(\"COP of refrigerator is given as\")\n",
+ "COP=280./(T-280.)\n",
+ "print(\"COP=\"),round(COP,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 4.11;pg no: 120"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 39,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 4.11, Page:120 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 11\n",
+ "let thermodynamic properties be denoted with respect to salient states;\n",
+ "n_carnot=1-T1/T2\n",
+ "so T1/T2=1-0.5\n",
+ "so T1/T2=0.5\n",
+ "or T2=2*T1\n",
+ "corresponding to state 2,p2*v2=m*R*T2\n",
+ "so temperature(T2) in K= 585.37\n",
+ "heat transferred during process 2-3(isothermal expansion),Q_23=40 KJ\n",
+ "Q_23=W_23=p2*v2*log(v3/v2)\n",
+ "so volume(v3) in m^3= 0.1932\n",
+ "temperature at state 1,T1 in K= 292.68\n",
+ "during process 1-2,T2/T1=(p2/p1)^((y-1)/y)\n",
+ "here expansion constant(y)=Cp/Cv\n",
+ "so pressure(p1)=p2/(T2/T1)^(y/(y-1)) in pa\n",
+ "p1 in bar\n",
+ "thus p1*v1=m*R*T1\n",
+ "so volume(v1) in m^3= 0.68\n",
+ "heat transferred during process 4-1(isothermal compression)shall be equal to the heat transferred during process2-3(isothermal expansion).\n",
+ "for isentropic process,dQ=0,dW=dU\n",
+ "during process 1-2,isentropic process,W_12=-m*Cv*(T2-T1)in KJ\n",
+ "Q_12=0,\n",
+ "W_12=-105.51 KJ(-ve work)\n",
+ "during process 3-4,isentropic process,W_34=-m*Cv*(T4-T3)in KJ\n",
+ "Q_31=0,\n",
+ "ANS:\n",
+ "W_34=+105.51 KJ(+ve work)\n",
+ "so for process 1-2,heat transfer=0,work interaction=-105.51 KJ\n",
+ "for process 2-3,heat transfer=40 KJ,work intercation=40 KJ\n",
+ "for process 3-4,heat transfer=0,work interaction=+105.51 KJ\n",
+ "for process 4-1,heat transfer=-40 KJ,work interaction=-40 KJ\n",
+ "maximum temperature of cycle=585.36 KJ\n",
+ "minimum temperature of cycle=292.68 KJ\n",
+ "volume at the end of isothermal expansion=0.1932 m^3\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of max and min temp of cycle,volume\n",
+ "#intiation of all variables\n",
+ "# Chapter 4\n",
+ "import math\n",
+ "print\"Example 4.11, Page:120 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 11\")\n",
+ "n_carnot=0.5;#efficiency of carnot power cycle\n",
+ "m=0.5;#mass of air in kg\n",
+ "p2=7.*10**5;#final pressure in pa\n",
+ "v2=0.12;#volume in m^3\n",
+ "R=287.;#gas constant in J/kg K\n",
+ "Q_23=40.*1000.;#heat transfer to the air during isothermal expansion in J\n",
+ "Cp=1.008;#specific heat at constant pressure in KJ/kg K\n",
+ "Cv=0.721;#specific heat at constant volume in KJ/kg K\n",
+ "print(\"let thermodynamic properties be denoted with respect to salient states;\")\n",
+ "print(\"n_carnot=1-T1/T2\")\n",
+ "print(\"so T1/T2=1-0.5\")\n",
+ "1-0.5\n",
+ "print(\"so T1/T2=0.5\")\n",
+ "print(\"or T2=2*T1\")\n",
+ "print(\"corresponding to state 2,p2*v2=m*R*T2\")\n",
+ "T2=p2*v2/(m*R)\n",
+ "print(\"so temperature(T2) in K=\"),round(T2,2)\n",
+ "print(\"heat transferred during process 2-3(isothermal expansion),Q_23=40 KJ\")\n",
+ "print(\"Q_23=W_23=p2*v2*log(v3/v2)\")\n",
+ "v3=v2*math.exp(Q_23/(p2*v2))\n",
+ "print(\"so volume(v3) in m^3=\"),round(v3,4)\n",
+ "T1=T2/2\n",
+ "print(\"temperature at state 1,T1 in K=\"),round(T1,2)\n",
+ "print(\"during process 1-2,T2/T1=(p2/p1)^((y-1)/y)\")\n",
+ "print(\"here expansion constant(y)=Cp/Cv\")\n",
+ "y=Cp/Cv\n",
+ "print(\"so pressure(p1)=p2/(T2/T1)^(y/(y-1)) in pa\")\n",
+ "p1=p2/(T2/T1)**(y/(y-1))\n",
+ "print(\"p1 in bar\")\n",
+ "p1=p1/10**5\n",
+ "print(\"thus p1*v1=m*R*T1\")\n",
+ "v1=m*R*T1/(p1*10**5)\n",
+ "print(\"so volume(v1) in m^3=\"),round(v1,2) \n",
+ "print(\"heat transferred during process 4-1(isothermal compression)shall be equal to the heat transferred during process2-3(isothermal expansion).\")\n",
+ "print(\"for isentropic process,dQ=0,dW=dU\")\n",
+ "print(\"during process 1-2,isentropic process,W_12=-m*Cv*(T2-T1)in KJ\")\n",
+ "print(\"Q_12=0,\")\n",
+ "W_12=-m*Cv*(T2-T1)\n",
+ "print(\"W_12=-105.51 KJ(-ve work)\")\n",
+ "print(\"during process 3-4,isentropic process,W_34=-m*Cv*(T4-T3)in KJ\")\n",
+ "print(\"Q_31=0,\")\n",
+ "T4=T1;\n",
+ "T3=T2;\n",
+ "W_34=-m*Cv*(T4-T3)\n",
+ "print(\"ANS:\")\n",
+ "print(\"W_34=+105.51 KJ(+ve work)\")\n",
+ "print(\"so for process 1-2,heat transfer=0,work interaction=-105.51 KJ\")\n",
+ "print(\"for process 2-3,heat transfer=40 KJ,work intercation=40 KJ\")\n",
+ "print(\"for process 3-4,heat transfer=0,work interaction=+105.51 KJ\")\n",
+ "print(\"for process 4-1,heat transfer=-40 KJ,work interaction=-40 KJ\")\n",
+ "print(\"maximum temperature of cycle=585.36 KJ\")\n",
+ "print(\"minimum temperature of cycle=292.68 KJ\")\n",
+ "print(\"volume at the end of isothermal expansion=0.1932 m^3\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 4.12;pg no: 122"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 40,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 4.12, Page:122 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 12\n",
+ "let us assume that heat engine rejects Q2 and Q3 heat to reservior at 300 K and 200 K respectively.let us assume that there are two heat engines operating between 400 K and 300 K temperature reservoirs and between 400 K and 200 K temperature reservoirs.let each heat engine receive Q1_a and Q1_b from reservoir at 400 K as shown below\n",
+ "thus,Q1_a+Q1_b=Q1=5*10^3 KJ...............eq1\n",
+ "Also,Q1_a/Q2=400/300,or Q1_a=4*Q2/3...............eq2\n",
+ "Q1_b/Q3=400/200 or Q1_b=2*Q3...............eq3\n",
+ "substituting Q1_a and Q1_b in eq 1\n",
+ "4*Q2/3+2*Q3=5000...............eq4\n",
+ "also from total work output,Q1_a+Q1_b-Q2-Q3=W\n",
+ "5000-Q2-Q3=840\n",
+ "so Q2+Q3=5000-840=4160\n",
+ "Q3=4160-Q2\n",
+ "sunstituting Q3 in eq 4\n",
+ "4*Q2/3+2*(4160-Q2)=5000\n",
+ "so Q2=in KJ 4980.0\n",
+ "and Q3= in KJ 820.0\n",
+ "here negative sign with Q3 shows that the assumed direction of heat is not correct and actually Q3 heat will flow from reservoir to engine.actual sign of heat transfers and magnitudes are as under:\n",
+ "Q2=4980 KJ,from heat engine\n",
+ "Q3=820 KJ,to heat engine\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of heat from from heat engine and to heat engine\n",
+ "#intiation of all variables\n",
+ "# Chapter 4\n",
+ "print\"Example 4.12, Page:122 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 12\")\n",
+ "W=840.;#work done by reservoir in KJ\n",
+ "print(\"let us assume that heat engine rejects Q2 and Q3 heat to reservior at 300 K and 200 K respectively.let us assume that there are two heat engines operating between 400 K and 300 K temperature reservoirs and between 400 K and 200 K temperature reservoirs.let each heat engine receive Q1_a and Q1_b from reservoir at 400 K as shown below\")\n",
+ "print(\"thus,Q1_a+Q1_b=Q1=5*10^3 KJ...............eq1\")\n",
+ "print(\"Also,Q1_a/Q2=400/300,or Q1_a=4*Q2/3...............eq2\")\n",
+ "print(\"Q1_b/Q3=400/200 or Q1_b=2*Q3...............eq3\")\n",
+ "print(\"substituting Q1_a and Q1_b in eq 1\")\n",
+ "print(\"4*Q2/3+2*Q3=5000...............eq4\")\n",
+ "print(\"also from total work output,Q1_a+Q1_b-Q2-Q3=W\")\n",
+ "print(\"5000-Q2-Q3=840\")\n",
+ "print(\"so Q2+Q3=5000-840=4160\")\n",
+ "print(\"Q3=4160-Q2\")\n",
+ "print(\"sunstituting Q3 in eq 4\")\n",
+ "print(\"4*Q2/3+2*(4160-Q2)=5000\")\n",
+ "Q2=(5000.-2.*4160.)/((4./3.)-2.)\n",
+ "print(\"so Q2=in KJ\"),round(Q2,2)\n",
+ "Q3=4160.-Q2\n",
+ "print(\"and Q3= in KJ\"),round(-Q3,2)\n",
+ "print(\"here negative sign with Q3 shows that the assumed direction of heat is not correct and actually Q3 heat will flow from reservoir to engine.actual sign of heat transfers and magnitudes are as under:\")\n",
+ "print(\"Q2=4980 KJ,from heat engine\")\n",
+ "print(\"Q3=820 KJ,to heat engine\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 4.13;pg no: 123"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 41,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 4.13, Page:123 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 13\n",
+ "arrangement for heat pump and heat engine operating togrther is shown here.engine and pump both reject heat to reservoir at 77 degree celcius(350 K)\n",
+ "for heat engine\n",
+ "ne=W/Q1=1-T2/T1\n",
+ "so (Q1-Q2)/Q1=\n",
+ "and Q2/Q1=\n",
+ "Q2=0.2593*Q1\n",
+ "for heat pump,\n",
+ "COP_HP=Q4/(Q4-Q3)=T4/(T4-T3)\n",
+ "Q4/Q3=\n",
+ "Q4=1.27*Q3\n",
+ "work output from engine =work input to pump\n",
+ "Q1-Q2=Q4-Q3=>Q1-0.2593*Q1=Q4-Q4/1.27\n",
+ "so Q4/Q1=\n",
+ "so Q4=3.484*Q1\n",
+ "also it is given that Q2+Q4=100\n",
+ "subtituting Q2 and Q4 as function of Q1 in following expression,\n",
+ "Q2+Q4=100\n",
+ "so 0.2539*Q1+3.484*Q1=100\n",
+ "so energy taken by engine from reservoir at 1077 degree celcius(Q1)in KJ\n",
+ "Q1=100/(0.2539+3.484)in KJ 26.75\n",
+ "NOTE=>In this question expression for calculating Q1 is written wrong in book which is corrected above.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of energy taken by engine from reservoir\n",
+ "#intiation of all variables\n",
+ "# Chapter 4\n",
+ "print\"Example 4.13, Page:123 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 13\")\n",
+ "T2=(77+273);#temperature of reservoir 2\n",
+ "T1=(1077+273);#temperature of reservoir 1\n",
+ "T3=(3+273);#temperature of reservoir 3\n",
+ "print(\"arrangement for heat pump and heat engine operating togrther is shown here.engine and pump both reject heat to reservoir at 77 degree celcius(350 K)\")\n",
+ "print(\"for heat engine\")\n",
+ "print(\"ne=W/Q1=1-T2/T1\")\n",
+ "print(\"so (Q1-Q2)/Q1=\")\n",
+ "1-T2/T1\n",
+ "print(\"and Q2/Q1=\")\n",
+ "1-0.7407\n",
+ "print(\"Q2=0.2593*Q1\")\n",
+ "print(\"for heat pump,\")\n",
+ "print(\"COP_HP=Q4/(Q4-Q3)=T4/(T4-T3)\")\n",
+ "T4=T2;\n",
+ "T4/(T4-T3)\n",
+ "print(\"Q4/Q3=\")\n",
+ "4.73/3.73\n",
+ "print(\"Q4=1.27*Q3\")\n",
+ "print(\"work output from engine =work input to pump\")\n",
+ "print(\"Q1-Q2=Q4-Q3=>Q1-0.2593*Q1=Q4-Q4/1.27\")\n",
+ "print(\"so Q4/Q1=\")\n",
+ "(1-0.2593)/(1-(1/1.27))\n",
+ "print(\"so Q4=3.484*Q1\")\n",
+ "print(\"also it is given that Q2+Q4=100\")\n",
+ "print(\"subtituting Q2 and Q4 as function of Q1 in following expression,\")\n",
+ "print(\"Q2+Q4=100\")\n",
+ "print(\"so 0.2539*Q1+3.484*Q1=100\")\n",
+ "print(\"so energy taken by engine from reservoir at 1077 degree celcius(Q1)in KJ\")\n",
+ "Q1=100/(0.2539+3.484)\n",
+ "print(\"Q1=100/(0.2539+3.484)in KJ\"),round(Q1,2)\n",
+ "print(\"NOTE=>In this question expression for calculating Q1 is written wrong in book which is corrected above.\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 4.14;pg no: 124"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 42,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 4.14, Page:124 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 14\n",
+ "let temperature of sink be T_sink K\n",
+ "Q_sink_HE+Q_sink_R=3000 ........eq 1\n",
+ "since complete work output from engine is used to run refrigerator so,\n",
+ "2000-Q_sink_HE=Q_sink_R-Q_R .........eq 2\n",
+ "by eq 1 and eq 2,we get Q_R in KJ/s 1000.0\n",
+ "also for heat engine,2000/1500=Q_sink_HE/T_sink\n",
+ "=>Q_sink_HE=4*T_sink/3\n",
+ "for refrigerator,Q_R/288=Q_sink_R/T_sink=>Q_sink_R=1000*T_sink/288\n",
+ "substituting Q_sink_HE and Q_sink_R values\n",
+ "4*T_sink/3+1000*T_sink/288=3000\n",
+ "so temperature of sink(T_sink)in K\n",
+ "so T_sink= 750.0\n",
+ "T_sink in degree celcius 477.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of T_sink in degree celcius\n",
+ "#intiation of all variables\n",
+ "# Chapter 4\n",
+ "print\"Example 4.14, Page:124 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 14\")\n",
+ "Q_source=2000;#heat supplied by heat engine in KJ/s\n",
+ "T_source=1500;#temperature of source in K\n",
+ "T_R=(15+273);#temperature of reservoir in K\n",
+ "Q_sink=3000;#heat received by sink in KJ/s\n",
+ "print(\"let temperature of sink be T_sink K\")\n",
+ "print(\"Q_sink_HE+Q_sink_R=3000 ........eq 1\")\n",
+ "print(\"since complete work output from engine is used to run refrigerator so,\")\n",
+ "print(\"2000-Q_sink_HE=Q_sink_R-Q_R .........eq 2\")\n",
+ "Q_R=3000-2000\n",
+ "print(\"by eq 1 and eq 2,we get Q_R in KJ/s\"),round(Q_R)\n",
+ "print(\"also for heat engine,2000/1500=Q_sink_HE/T_sink\")\n",
+ "print(\"=>Q_sink_HE=4*T_sink/3\")\n",
+ "print(\"for refrigerator,Q_R/288=Q_sink_R/T_sink=>Q_sink_R=1000*T_sink/288\")\n",
+ "print(\"substituting Q_sink_HE and Q_sink_R values\")\n",
+ "print(\"4*T_sink/3+1000*T_sink/288=3000\")\n",
+ "print(\"so temperature of sink(T_sink)in K\")\n",
+ "T_sink=3000/((4/3)+(1000/288))\n",
+ "print(\"so T_sink=\"),round(T_sink,2)\n",
+ "T_sink=T_sink-273\n",
+ "print(\"T_sink in degree celcius\"),round(T_sink,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 4.15;pg no: 124"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 45,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 4.15, Page:124 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 15\n",
+ "let the output of heat engine be W.so W/3 is consumed for driving auxiliary and remaining 2*W/3 is consumed for driving heat pump for heat engine,\n",
+ "n=W/Q1= 0.39\n",
+ "so n=W/Q1=0.3881\n",
+ "COP of heat pump=T3/(T3-T2)=Q3/(2*W/3) 2.89\n",
+ "so 2.892=3*Q3/2*W\n",
+ "Q3/Q1= 0.7483\n",
+ "so ratio of heat rejected to body at 450 degree celcius to the heat supplied by the reservoir=0.7482\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of heat transferred to refrigerant and low temperature reservoir\n",
+ "#intiation of all variables\n",
+ "# Chapter 4\n",
+ "print\"Example 4.15, Page:124 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 15\")\n",
+ "T1=(500.+273.);#temperature of source in K\n",
+ "T2=(200.+273.);#temperature of sink in K\n",
+ "T3=(450.+273.);#temperature of body in K\n",
+ "print(\"let the output of heat engine be W.so W/3 is consumed for driving auxiliary and remaining 2*W/3 is consumed for driving heat pump for heat engine,\")\n",
+ "n=1-(T2/T1)\n",
+ "print(\"n=W/Q1=\"),round(n,2)\n",
+ "print(\"so n=W/Q1=0.3881\")\n",
+ "COP=T3/(T3-T2)\n",
+ "print(\"COP of heat pump=T3/(T3-T2)=Q3/(2*W/3)\"),round(COP,2)\n",
+ "print(\"so 2.892=3*Q3/2*W\")\n",
+ "print(\"Q3/Q1=\"),round(2*COP*n/3,4)\n",
+ "print(\"so ratio of heat rejected to body at 450 degree celcius to the heat supplied by the reservoir=0.7482\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 4.16;pg no: 125"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 48,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 4.16, Page:125 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 16\n",
+ "NOTE=>In question no. 16,condition for minimum surface area for a given work output is determine which cannot be solve using python software.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#intiation of all variables\n",
+ "# Chapter 4\n",
+ "print\"Example 4.16, Page:125 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 16\")\n",
+ "print(\"NOTE=>In question no. 16,condition for minimum surface area for a given work output is determine which cannot be solve using python software.\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 4.17;pg no: 126"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 47,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 4.17, Page:126 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 4 Example 17\n",
+ "NOTE=>In question no. 17 expression for (minimum theoretical ratio of heat supplied from source to heat absorbed from cold body) is derived which cannot be solve using python software.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#intiation of all variables\n",
+ "# Chapter 4\n",
+ "print\"Example 4.17, Page:126 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 4 Example 17\")\n",
+ "print(\"NOTE=>In question no. 17 expression for (minimum theoretical ratio of heat supplied from source to heat absorbed from cold body) is derived which cannot be solve using python software.\")\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter5_3.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter5_3.ipynb
new file mode 100644
index 00000000..cc42cd6f
--- /dev/null
+++ b/_Engineering_Thermodynamics_by__O._Singh/chapter5_3.ipynb
@@ -0,0 +1,1124 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 5:Entropy"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 5.1;pg no: 144"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 5.1, Page:144 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 1\n",
+ "entropy change may be given as,\n",
+ "s2-s1=((Cp_air*log(T2/T1)-(R*log(p2/p1))\n",
+ "here for throttling process h1=h2=>Cp_air*T1=Cp_air*T2=>T1=T2\n",
+ "so change in entropy(deltaS)in KJ/kg K\n",
+ "deltaS= 0.263\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of deltaS\n",
+ "#intiation of all variables\n",
+ "# Chapter 5\n",
+ "import math\n",
+ "print\"Example 5.1, Page:144 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 1\")\n",
+ "p1=5.;#initial pressure of air\n",
+ "T1=(27.+273.);#temperature of air in K\n",
+ "p2=2.;#final pressure of air in K\n",
+ "R=0.287;#gas constant in KJ/kg K\n",
+ "Cp_air=1.004;#specific heat of air at constant pressure in KJ/kg K\n",
+ "print(\"entropy change may be given as,\")\n",
+ "print(\"s2-s1=((Cp_air*log(T2/T1)-(R*log(p2/p1))\")\n",
+ "print(\"here for throttling process h1=h2=>Cp_air*T1=Cp_air*T2=>T1=T2\")\n",
+ "print(\"so change in entropy(deltaS)in KJ/kg K\")\n",
+ "deltaS=(Cp_air*0)-(R*math.log(p2/p1))\n",
+ "print(\"deltaS=\"),round(deltaS,3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 5.2;pg no: 144"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 5.2, Page:144 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 2\n",
+ "total entropy change=entropy change during water temperature rise(deltaS1)+entropy change during water to steam change(deltaS2)+entropy change during steam temperature rise(deltaS3)\n",
+ "deltaS1=Q1/T1,where Q1=m*Cp*deltaT\n",
+ "heat added for increasing water temperature from 27 to 100 degree celcius(Q1)in KJ\n",
+ "Q1= 1533.0\n",
+ "deltaS1=Q1/T1 in KJ/K 5.11\n",
+ "now heat of vaporisation(Q2)=in KJ 11300.0\n",
+ "entropy change during phase transformation(deltaS2)in KJ/K\n",
+ "deltaS2= 30.29\n",
+ "entropy change during steam temperature rise(deltaS3)in KJ/K\n",
+ "deltaS3=m*Cp_steam*dT/T\n",
+ "here Cp_steam=R*(3.5+1.2*T+0.14*T^2)*10^-3 in KJ/kg K\n",
+ "R=in KJ/kg K 0.46\n",
+ "now deltaS3=(m*R*(3.5+1.2*T+0.14*T^2)*10^-3)*dT/T in KJ/K\n",
+ "total entropy change(deltaS) in KJ/K= 87.24\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of COP\n",
+ "#intiation of all variables\n",
+ "# Chapter 5\n",
+ "print\"Example 5.2, Page:144 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 2\")\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "##just an example function\n",
+ "def fun1(x):\n",
+ "\ty=x*x\n",
+ "\treturn y\n",
+ "\n",
+ "T1=(27.+273.);#temperature of water in K\n",
+ "T2=(100.+273.);#steam temperature of water in K\n",
+ "m=5.;#mass of water in kg\n",
+ "q=2260.;#heat of vaporisation at 100 degree celcius in KJ/kg\n",
+ "Cp=4.2;#specific heat of water at constant pressure in KJ/kg K\n",
+ "M=18.;#molar mass for water/steam \n",
+ "R1=8.314;#gas constant in KJ/kg K\n",
+ "print(\"total entropy change=entropy change during water temperature rise(deltaS1)+entropy change during water to steam change(deltaS2)+entropy change during steam temperature rise(deltaS3)\")\n",
+ "Q1=m*Cp*(T2-T1)\n",
+ "print(\"deltaS1=Q1/T1,where Q1=m*Cp*deltaT\")\n",
+ "print(\"heat added for increasing water temperature from 27 to 100 degree celcius(Q1)in KJ\")\n",
+ "print(\"Q1=\"),round(Q1,2)\n",
+ "deltaS1=Q1/T1\n",
+ "print(\"deltaS1=Q1/T1 in KJ/K\"),round(deltaS1,2)\n",
+ "Q2=m*q\n",
+ "print(\"now heat of vaporisation(Q2)=in KJ\"),round(Q2,2)\n",
+ "print(\"entropy change during phase transformation(deltaS2)in KJ/K\")\n",
+ "deltaS2=Q2/T2\n",
+ "print(\"deltaS2=\"),round(deltaS2,2)\n",
+ "print(\"entropy change during steam temperature rise(deltaS3)in KJ/K\")\n",
+ "print(\"deltaS3=m*Cp_steam*dT/T\")\n",
+ "print(\"here Cp_steam=R*(3.5+1.2*T+0.14*T^2)*10^-3 in KJ/kg K\")\n",
+ "R=R1/M\n",
+ "print(\"R=in KJ/kg K\"),round(R,2)\n",
+ "T2=(100+273.15);#steam temperature of water in K\n",
+ "T3=(400+273.15);#temperature of steam in K\n",
+ "print(\"now deltaS3=(m*R*(3.5+1.2*T+0.14*T^2)*10^-3)*dT/T in KJ/K\")\n",
+ "#function y = f(T), y =(m*R*(3.5+1.2*T+0.14*T**2)*10**-3)/T , endfunction\n",
+ "def fun1(x):\n",
+ "\ty=(m*R*(3.5+1.2*T+0.14*T**2)*10**-3)/T\n",
+ "\treturn y\n",
+ "\n",
+ "#deltaS3 =scipy.integrate.quad(f,T2, T3) \n",
+ "deltaS3=51.84;#approximately\n",
+ "deltaS=deltaS1+deltaS2+deltaS3\n",
+ "print(\"total entropy change(deltaS) in KJ/K=\"),round(deltaS,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 5.3;pg no: 145"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 51,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 5.3, Page:145 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 3\n",
+ "gas constant for oxygen(R)in KJ/kg K\n",
+ "R= 0.26\n",
+ "for reversible process the change in entropy may be given as\n",
+ "deltaS=(Cp*log(T2/T1))-(R*log(p2/p1))in KJ/kg K\n",
+ "so entropy change=deltaS= in (KJ/kg K) -0.29\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of entropy change\n",
+ "#intiation of all variables\n",
+ "# Chapter 5\n",
+ "import math\n",
+ "print\"Example 5.3, Page:145 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 3\")\n",
+ "R1=8.314;#gas constant in KJ/kg K\n",
+ "M=32;#molar mass for O2 \n",
+ "T1=(27+273);#initial temperature of O2 in K\n",
+ "p1=125;#initial pressure of O2 in Kpa\n",
+ "p2=375;#final pressure of O2 in Kpa\n",
+ "Cp=1.004;#specific heat of air at constant pressure in KJ/kg K\n",
+ "print(\"gas constant for oxygen(R)in KJ/kg K\")\n",
+ "R=R1/M\n",
+ "print(\"R=\"),round(R,2)\n",
+ "print(\"for reversible process the change in entropy may be given as\")\n",
+ "print(\"deltaS=(Cp*log(T2/T1))-(R*log(p2/p1))in KJ/kg K\")\n",
+ "T2=T1;#isothermal process\n",
+ "deltaS=(Cp*math.log(T2/T1))-(R*math.log(p2/p1))\n",
+ "print(\"so entropy change=deltaS= in (KJ/kg K)\"),round(deltaS,2)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 5.4;pg no: 145"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 52,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 5.4, Page:145 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 4\n",
+ "entropy change in universe(deltaS_universe)=deltaS_block+deltaS_water\n",
+ "where deltaS_block=m*C*log(T2/T1)\n",
+ "here hot block is put into sea water,so block shall cool down upto sea water at 25 degree celcius as sea may be treated as sink\n",
+ "therefore deltaS_block=in KJ/K -0.14\n",
+ "heat loss by block =heat gained by water(Q)in KJ\n",
+ "Q=-m*C*(T1-T2) -49.13\n",
+ "therefore deltaS_water=-Q/T2 in KJ/K 0.16\n",
+ "thus deltaS_universe=in J/K 27.16\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of deltaS_universe\n",
+ "#intiation of all variables\n",
+ "# Chapter 5\n",
+ "import math\n",
+ "print\"Example 5.4, Page:145 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 4\")\n",
+ "T1=(150+273.15);#temperature of copper block in K\n",
+ "T2=(25+273.15);#temperature of sea water in K\n",
+ "m=1;#mass of copper block in kg\n",
+ "C=0.393;#heat capacity of copper in KJ/kg K\n",
+ "print(\"entropy change in universe(deltaS_universe)=deltaS_block+deltaS_water\")\n",
+ "print(\"where deltaS_block=m*C*log(T2/T1)\")\n",
+ "print(\"here hot block is put into sea water,so block shall cool down upto sea water at 25 degree celcius as sea may be treated as sink\")\n",
+ "deltaS_block=m*C*math.log(T2/T1)\n",
+ "print(\"therefore deltaS_block=in KJ/K\"),round(deltaS_block,2)\n",
+ "print(\"heat loss by block =heat gained by water(Q)in KJ\")\n",
+ "Q=-m*C*(T1-T2)\n",
+ "print(\"Q=-m*C*(T1-T2)\"),round(Q,2)\n",
+ "deltaS_water=-Q/T2\n",
+ "print(\"therefore deltaS_water=-Q/T2 in KJ/K\"),round(deltaS_water,2)\n",
+ "deltaS_universe=(deltaS_block+deltaS_water)*1000\n",
+ "print(\"thus deltaS_universe=in J/K\"),round(deltaS_universe,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 5.5;pg no: 146"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 53,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 5.5, Page:146 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 5\n",
+ "deltaS_universe=(deltaS_block+deltaS_seawater)\n",
+ "since block and sea water both are at same temperature so,\n",
+ "deltaS_universe=deltaS_seawater\n",
+ "conservation of energy equation yields,\n",
+ "Q-W=deltaU+deltaP.E+deltaK.E\n",
+ "since in this case,W=0,deltaK.E=0,deltaU=0\n",
+ "Q=deltaP.E\n",
+ "change in potential energy=deltaP.E=m*g*h in J\n",
+ "deltaS_universe=deltaS_seawater=Q/T in J/kg K\n",
+ "entropy change of universe(deltaS_universe)in J/kg K 6.54\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of entropy change of universe\n",
+ "#intiation of all variables\n",
+ "# Chapter 5\n",
+ "print\"Example 5.5, Page:146 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 5\")\n",
+ "m=1;#mass of copper block in kg\n",
+ "T=(27+273);#temperature of copper block in K\n",
+ "h=200;#height from which copper block dropped in sea water in m\n",
+ "C=0.393;#heat capacity for copper in KJ/kg K\n",
+ "g=9.81;#acceleration due to gravity in m/s^2\n",
+ "print(\"deltaS_universe=(deltaS_block+deltaS_seawater)\")\n",
+ "print(\"since block and sea water both are at same temperature so,\")\n",
+ "print(\"deltaS_universe=deltaS_seawater\")\n",
+ "print(\"conservation of energy equation yields,\")\n",
+ "print(\"Q-W=deltaU+deltaP.E+deltaK.E\")\n",
+ "print(\"since in this case,W=0,deltaK.E=0,deltaU=0\")\n",
+ "deltaPE=m*g*h\n",
+ "Q=deltaPE\n",
+ "print(\"Q=deltaP.E\")\n",
+ "print(\"change in potential energy=deltaP.E=m*g*h in J\")\n",
+ "print(\"deltaS_universe=deltaS_seawater=Q/T in J/kg K\")\n",
+ "deltaS_universe=Q/T\n",
+ "print(\"entropy change of universe(deltaS_universe)in J/kg K\"),round(deltaS_universe,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 5.6;pg no: 146"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 54,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 5.6, Page:146 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 6\n",
+ "here deltaS_universe=deltaS_block1+deltaS_block2\n",
+ "two blocks at different temperatures shall first attain equilibrium temperature.let equilibrium temperature be Tf\n",
+ "then from energy conservation\n",
+ "m1*Cp_1*(T1-Tf)=m2*Cp_2*(Tf-T2)\n",
+ "Tf=in K 374.18\n",
+ "hence,entropy change in block 1(deltaS1),due to temperature changing from Tf to T1\n",
+ "deltaS1=in KJ/K -0.05\n",
+ "entropy change in block 2(deltaS2)in KJ/K\n",
+ "deltaS2= 0.06\n",
+ "entropy change of universe(deltaS)=in KJ/K 0.01\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of entropy change of universe\n",
+ "#intiation of all variables\n",
+ "# Chapter 5\n",
+ "import math\n",
+ "print\"Example 5.6, Page:146 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 6\")\n",
+ "m1=1;#mass of first copper block in kg\n",
+ "m2=0.5;#mass of second copper block in kg\n",
+ "T1=(150+273.15);#temperature of first copper block in K\n",
+ "T2=(0+273.15);#temperature of second copper block in K\n",
+ "Cp_1=0.393;#heat capacity for copper block 1 in KJ/kg K\n",
+ "Cp_2=0.381;#heat capacity for copper block 2 in KJ/kg K\n",
+ "print(\"here deltaS_universe=deltaS_block1+deltaS_block2\")\n",
+ "print(\"two blocks at different temperatures shall first attain equilibrium temperature.let equilibrium temperature be Tf\")\n",
+ "print(\"then from energy conservation\")\n",
+ "print(\"m1*Cp_1*(T1-Tf)=m2*Cp_2*(Tf-T2)\")\n",
+ "Tf=((m1*Cp_1*T1)+(m2*Cp_2*T2))/(m1*Cp_1+m2*Cp_2)\n",
+ "print(\"Tf=in K\"),round(Tf,2)\n",
+ "print(\"hence,entropy change in block 1(deltaS1),due to temperature changing from Tf to T1\")\n",
+ "deltaS1=m1*Cp_1*math.log(Tf/T1)\n",
+ "print(\"deltaS1=in KJ/K\"),round(deltaS1,2)\n",
+ "print(\"entropy change in block 2(deltaS2)in KJ/K\")\n",
+ "deltaS2=m2*Cp_2*math.log(Tf/T2)\n",
+ "print(\"deltaS2=\"),round(deltaS2,2)\n",
+ "deltaS=deltaS1+deltaS2\n",
+ "print(\"entropy change of universe(deltaS)=in KJ/K\"),round(deltaS,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 5.7;pg no: 147"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 55,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 5.7, Page:147 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 7\n",
+ "NOTE=>in this question formula is derived which cannot be solve using python software\n"
+ ]
+ }
+ ],
+ "source": [
+ "#intiation of all variables\n",
+ "# Chapter 5\n",
+ "print\"Example 5.7, Page:147 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 7\")\n",
+ "print(\"NOTE=>in this question formula is derived which cannot be solve using python software\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 5.8;pg no: 148"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 56,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 5.8, Page:148 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 8\n",
+ "for irreversible operation of engine,\n",
+ "rate of entropy generation=Q1/T1+Q2/T2\n",
+ "W=Q1-Q2=>Q2=Q1-W in MW 3.0\n",
+ "entropy generated(deltaS_gen)in MW\n",
+ "deltaS_gen= 0.01\n",
+ "work lost(W_lost)in MW\n",
+ "W_lost=T2*deltaS_gen 4.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of work lost\n",
+ "#intiation of all variables\n",
+ "# Chapter 5\n",
+ "print\"Example 5.8, Page:148 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 8\")\n",
+ "T1=1800.;#temperature of high temperature reservoir in K\n",
+ "T2=300.;#temperature of low temperature reservoir in K\n",
+ "Q1=5.;#heat addition in MW\n",
+ "W=2.;#work done in MW\n",
+ "print(\"for irreversible operation of engine,\")\n",
+ "print(\"rate of entropy generation=Q1/T1+Q2/T2\")\n",
+ "Q2=Q1-W\n",
+ "print(\"W=Q1-Q2=>Q2=Q1-W in MW\"),round(Q2,2)\n",
+ "print(\"entropy generated(deltaS_gen)in MW\")\n",
+ "deltaS_gen=Q1/T1+Q2/T2\n",
+ "print(\"deltaS_gen=\"),round(deltaS_gen,2)\n",
+ "Q1=-5;#heat addition in MW\n",
+ "print(\"work lost(W_lost)in MW\")\n",
+ "W_lost=T2*deltaS_gen\n",
+ "print(\"W_lost=T2*deltaS_gen\"),round(W_lost)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 5.9;pg no: 148"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 5.9, Page:148 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 9\n",
+ "system and reservoir can be treated as source and sink.device thought of can be a carnot engine operating between these two limits.maximum heat available from system shall be the heat rejected till its temperature drops from 500 K to 300 K\n",
+ "therefore,maximum heat(Q1)=(C*dT)in J\n",
+ "here C=0.05*T^2+0.10*T+0.085 in J/K\n",
+ "so Q1=(0.05*T^2+0.10*T+0.085)*dT\n",
+ "entropy change of system,deltaS_system=C*dT/T in J/K\n",
+ "so deltaS_system=(0.05*T^2+0.10*T+0.085)*dT/T\n",
+ "deltaS_reservoir=Q2/T2=(Q1-W)/T2 also,we know from entropy principle,deltaS_universe is greater than equal to 0\n",
+ "deltaS_universe=deltaS_system+deltaS_reservoir\n",
+ "thus,upon substituting,deltaS_system+deltaS_reservoir is greater than equal to 0\n",
+ "W is less than or equal to(Q1+deltaS_system*T2)/1000 in KJ\n",
+ "hence maximum work in KJ= 435.34\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of COP\n",
+ "#intiation of all variables\n",
+ "# Chapter 5\n",
+ "import math\n",
+ "print\"Example 5.9, Page:148 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 9\")\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "\n",
+ "def fun1(x):\n",
+ "\ty=x*x\n",
+ "\treturn y\n",
+ "\n",
+ "T1=500;#temperature of system in K\n",
+ "T2=300;#temperature of reservoir in K\n",
+ "print(\"system and reservoir can be treated as source and sink.device thought of can be a carnot engine operating between these two limits.maximum heat available from system shall be the heat rejected till its temperature drops from 500 K to 300 K\")\n",
+ "print(\"therefore,maximum heat(Q1)=(C*dT)in J\")\n",
+ "print(\"here C=0.05*T^2+0.10*T+0.085 in J/K\")\n",
+ "print(\"so Q1=(0.05*T^2+0.10*T+0.085)*dT\")\n",
+ "T=T1-T2\n",
+ "#Q1=(0.05*T**2+0.10*T+0.085)*dT\n",
+ "#function y = f(T), y = (0.05*T**2+0.10*T+0.085),endfunction\n",
+ "#Q1 = scipy.integrate.quad(fun1,T1, T2)\n",
+ "#Q1=-Q1\n",
+ "Q1=1641.35*10**3\n",
+ "print(\"entropy change of system,deltaS_system=C*dT/T in J/K\")\n",
+ "print(\"so deltaS_system=(0.05*T^2+0.10*T+0.085)*dT/T\")\n",
+ "#function y = k(T), y = (0.05*T**2+0.10*T+0.085)/T,endfunction\n",
+ "def fun1(x):\n",
+ "\ty = (0.05*T**2+0.10*T+0.085)/T\n",
+ "\treturn y\n",
+ "\n",
+ "#deltaS_system = scipy.integrate.quad(k,T1, T2)\n",
+ "deltaS_system=-4020.043\n",
+ "print(\"deltaS_reservoir=Q2/T2=(Q1-W)/T2\"),\n",
+ "print(\"also,we know from entropy principle,deltaS_universe is greater than equal to 0\")\n",
+ "print(\"deltaS_universe=deltaS_system+deltaS_reservoir\")\n",
+ "print(\"thus,upon substituting,deltaS_system+deltaS_reservoir is greater than equal to 0\")\n",
+ "print(\"W is less than or equal to(Q1+deltaS_system*T2)/1000 in KJ\")\n",
+ "W=(Q1+deltaS_system*T2)/1000\n",
+ "print(\"hence maximum work in KJ=\"),round(W,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 5.10;pg no: 149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 5.10, Page:46 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 10\n",
+ "for reversible adiabatic process governing equation for expansion,\n",
+ "P*V**1.4=constant\n",
+ "also,for such process entropy change=0\n",
+ "using p2/p1=(v1/v2)**1.4 or v=(p1*(v1**1.4)/p)**(1/1.4)\n",
+ "final pressure(p2)in Mpa\n",
+ "p2= 0.24\n",
+ "from first law,second law and definition of enthalpy;\n",
+ "dH=T*dS+v*dP\n",
+ "for adiabatic process of reversible type,dS=0\n",
+ "so dH=v*dP\n",
+ "integrating both side H2-H1=deltaH=v*dP in KJ\n",
+ "so enthalpy change(deltaH)in KJ=268.8\n",
+ "and entropy change=0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of deltaS\n",
+ "#intiation of all variables\n",
+ "# Chapter 5\n",
+ "\n",
+ "print\"Example 5.10, Page:46 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 10\")\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "\n",
+ "def fun1(x):\n",
+ "\ty=x*x\n",
+ "\treturn y\n",
+ "\n",
+ "p1=3.;#initial pressure in Mpa\n",
+ "v1=0.05;#initial volume in m**3\n",
+ "v2=0.3;#final volume in m**3\n",
+ "print(\"for reversible adiabatic process governing equation for expansion,\")\n",
+ "print(\"P*V**1.4=constant\")\n",
+ "print(\"also,for such process entropy change=0\")\n",
+ "print(\"using p2/p1=(v1/v2)**1.4 or v=(p1*(v1**1.4)/p)**(1/1.4)\")\n",
+ "print(\"final pressure(p2)in Mpa\")\n",
+ "p2=p1*(v1/v2)**1.4\n",
+ "print(\"p2=\"),round(p2,2)\n",
+ "print(\"from first law,second law and definition of enthalpy;\")\n",
+ "print(\"dH=T*dS+v*dP\")\n",
+ "print(\"for adiabatic process of reversible type,dS=0\")\n",
+ "dS=0;#for adiabatic process of reversible type\n",
+ "print(\"so dH=v*dP\")\n",
+ "print(\"integrating both side H2-H1=deltaH=v*dP in KJ\")\n",
+ "p1=3.*1000.;#initial pressure in Kpa\n",
+ "p2=244.;#final pressure in Kpa\n",
+ "#function y = f(p), y =(p1*(v1**1.4)/p)**(1/1.4)\n",
+ "def fun1(x):\n",
+ "\ty=(p1*(v1**1.4)/p2)**(1/1.4)\n",
+ "\treturn y\n",
+ "\n",
+ "deltaH = scipy.integrate.quad(fun1,p2,p1)\n",
+ "print (\"so enthalpy change(deltaH)in KJ=268.8\")\n",
+ "print(\"and entropy change=0\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 5.11;pg no: 150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 59,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 5.11, Page:150 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 11\n",
+ "during free expansion temperature remains same and it is an irreversible process.for getting change in entropy let us approximate this expansion process as a reversible isothermal expansion\n",
+ "a> change in entropy of air(deltaS_air)in J/K\n",
+ "deltaS_air= 1321.68\n",
+ "b> during free expansion on heat is gained or lost to surrounding so,\n",
+ "deltaS_surrounding=0\n",
+ "entropy change of surroundings=0\n",
+ "c> entropy change of universe(deltaS_universe)in J/K\n",
+ "deltaS_universe= 1321.68\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of deltaS_universe\n",
+ "#intiation of all variables\n",
+ "# Chapter 5\n",
+ "import math\n",
+ "print\"Example 5.11, Page:150 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 11\")\n",
+ "m=2;#mass of air in kg\n",
+ "v1=1;#initial volume of air in m^3\n",
+ "v2=10;#final volume of air in m^3\n",
+ "R=287;#gas constant in J/kg K\n",
+ "print(\"during free expansion temperature remains same and it is an irreversible process.for getting change in entropy let us approximate this expansion process as a reversible isothermal expansion\")\n",
+ "print(\"a> change in entropy of air(deltaS_air)in J/K\")\n",
+ "deltaS_air=m*R*math.log(v2/v1)\n",
+ "print(\"deltaS_air=\"),round(deltaS_air,2)\n",
+ "print(\"b> during free expansion on heat is gained or lost to surrounding so,\")\n",
+ "print(\"deltaS_surrounding=0\")\n",
+ "print(\"entropy change of surroundings=0\")\n",
+ "deltaS_surrounding=0;#entropy change of surroundings\n",
+ "print(\"c> entropy change of universe(deltaS_universe)in J/K\")\n",
+ "deltaS_universe=deltaS_air+deltaS_surrounding\n",
+ "print(\"deltaS_universe=\"),round(deltaS_universe,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "##example 5.12;pg no: 150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 60,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 5.12, Page:150 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 12\n",
+ "let initial and final states be denoted by 1 and 2\n",
+ "for poly tropic process pressure and temperature can be related as\n",
+ "(p2/p1)^((n-1)/n)=T2/T1\n",
+ "so temperature after compression(T2)=in K 1128.94\n",
+ "substituting in entropy change expression for polytropic process,\n",
+ "entropy change(deltaS)inKJ/kg K\n",
+ "deltaS= -0.24454\n",
+ "NOTE=>answer given in book i.e -244.54 KJ/kg K is incorrect,correct answer is -.24454 KJ/kg K\n",
+ "total entropy change(deltaS)=in J/K -122.27\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of total entropy change\n",
+ "#intiation of all variables\n",
+ "# Chapter 5\n",
+ "import math\n",
+ "print\"Example 5.12, Page:150 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 12\")\n",
+ "m=0.5;#mass of air in kg\n",
+ "p1=1.013*10**5;#initial pressure of air in pa\n",
+ "p2=0.8*10**6;#final pressure of air in pa\n",
+ "T1=800;#initial temperature of air in K\n",
+ "n=1.2;#polytropic expansion constant\n",
+ "y=1.4;#expansion constant for air\n",
+ "Cv=0.71;#specific heat at constant volume in KJ/kg K\n",
+ "print(\"let initial and final states be denoted by 1 and 2\")\n",
+ "print(\"for poly tropic process pressure and temperature can be related as\")\n",
+ "print(\"(p2/p1)^((n-1)/n)=T2/T1\")\n",
+ "T2=T1*(p2/p1)**((n-1)/n)\n",
+ "print(\"so temperature after compression(T2)=in K\"),round(T2,2)\n",
+ "print(\"substituting in entropy change expression for polytropic process,\") \n",
+ "print(\"entropy change(deltaS)inKJ/kg K\")\n",
+ "deltaS=Cv*((n-y)/(n-1))*math.log(T2/T1)\n",
+ "print(\"deltaS=\"),round(deltaS,5)\n",
+ "print(\"NOTE=>answer given in book i.e -244.54 KJ/kg K is incorrect,correct answer is -.24454 KJ/kg K\")\n",
+ "deltaS=m*deltaS*1000\n",
+ "print(\"total entropy change(deltaS)=in J/K\"),round(deltaS,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 5.13;pg no: 151"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 61,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 5.13, Page:151 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 13\n",
+ "NOTE=>In question no. 13,formula for maximum work is derived which cannot be solve using python software\n"
+ ]
+ }
+ ],
+ "source": [
+ "#intiation of all variables\n",
+ "# Chapter 5\n",
+ "print\"Example 5.13, Page:151 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 13\")\n",
+ "print(\"NOTE=>In question no. 13,formula for maximum work is derived which cannot be solve using python software\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 5.14;pg no: 152"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 62,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 5.14, Page:152 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 14\n",
+ "clausius inequality can be used for cyclic process as given below;consider 1 for source and 2 for sink\n",
+ "K=dQ/T=Q1/T1-Q2/T2\n",
+ "i> for Q2=200 kcal/s\n",
+ "K=in kcal/s K 0.0\n",
+ "as K is not greater than 0,therefore under these conditions engine is not possible\n",
+ "ii> for Q2=400 kcal/s\n",
+ "K=in kcal/s K -1.0\n",
+ "as K is less than 0,so engine is feasible and cycle is reversible\n",
+ "iii> for Q2=250 kcal/s\n",
+ "K=in kcal/s K 0.0\n",
+ "as K=0,so engine is feasible and cycle is reversible\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of deltaS\n",
+ "#intiation of all variables\n",
+ "# Chapter 5\n",
+ "print\"Example 5.14, Page:152 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 14\")\n",
+ "Q1=500;#heat supplied by source in kcal/s\n",
+ "T1=600;#temperature of source in K\n",
+ "T2=300;#temperature of sink in K\n",
+ "print(\"clausius inequality can be used for cyclic process as given below;consider 1 for source and 2 for sink\")\n",
+ "print(\"K=dQ/T=Q1/T1-Q2/T2\")\n",
+ "print(\"i> for Q2=200 kcal/s\")\n",
+ "Q2=200;#heat rejected by sink in kcal/s\n",
+ "K=Q1/T1-Q2/T2\n",
+ "print(\"K=in kcal/s K\"),round(K,2)\n",
+ "print(\"as K is not greater than 0,therefore under these conditions engine is not possible\")\n",
+ "print(\"ii> for Q2=400 kcal/s\")\n",
+ "Q2=400;#heat rejected by sink in kcal/s\n",
+ "K=Q1/T1-Q2/T2\n",
+ "print(\"K=in kcal/s K\"),round(K,2)\n",
+ "print(\"as K is less than 0,so engine is feasible and cycle is reversible\")\n",
+ "print(\"iii> for Q2=250 kcal/s\")\n",
+ "Q2=250;#heat rejected by sink in kcal/s\n",
+ "K=Q1/T1-Q2/T2\n",
+ "print(\"K=in kcal/s K\"),round(K,2)\n",
+ "print(\"as K=0,so engine is feasible and cycle is reversible\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 5.15;pg no: 152"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 63,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 5.15, Page:152 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 15\n",
+ "let the two points be given as states 1 and 2,\n",
+ "let us assume flow to be from 1 to 2\n",
+ "so entropy change(deltaS1_2)=s1-s2=in KJ/kg K -0.0\n",
+ "deltaS1_2=s1-s2=0.01254 KJ/kg K\n",
+ "it means s2 > s1 hence the assumption that flow is from 1 to 2 is correct as from second law of thermodynamics the entropy increases in a process i.e s2 is greater than or equal to s1\n",
+ "hence flow occurs from 1 to 2 i.e from 0.5 MPa,400K to 0.3 Mpa & 350 K\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of deltaS\n",
+ "#intiation of all variables\n",
+ "# Chapter 5\n",
+ "import math\n",
+ "print\"Example 5.15, Page:152 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 15\")\n",
+ "p1=0.5;#initial pressure of air in Mpa\n",
+ "T1=400;#initial temperature of air in K\n",
+ "p2=0.3;#final pressure of air in Mpa\n",
+ "T2=350;#initial temperature of air in K\n",
+ "R=0.287;#gas constant in KJ/kg K\n",
+ "Cp=1.004;#specific heat at constant pressure in KJ/kg K\n",
+ "print(\"let the two points be given as states 1 and 2,\")\n",
+ "print(\"let us assume flow to be from 1 to 2\")\n",
+ "deltaS1_2=Cp*math.log(T1/T2)-R*math.log(p1/p2)\n",
+ "print(\"so entropy change(deltaS1_2)=s1-s2=in KJ/kg K\"),round(deltaS1_2)\n",
+ "print(\"deltaS1_2=s1-s2=0.01254 KJ/kg K\")\n",
+ "print(\"it means s2 > s1 hence the assumption that flow is from 1 to 2 is correct as from second law of thermodynamics the entropy increases in a process i.e s2 is greater than or equal to s1\")\n",
+ "print(\"hence flow occurs from 1 to 2 i.e from 0.5 MPa,400K to 0.3 Mpa & 350 K\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 5.16;pg no: 153"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 64,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 5.16, Page:46 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 16\n",
+ "NOTE=>In question no. 16,value of n is derived which cannot be solve using python software.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of deltaS\n",
+ "#intiation of all variables\n",
+ "# Chapter 5\n",
+ "print\"Example 5.16, Page:46 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 16\")\n",
+ "print(\"NOTE=>In question no. 16,value of n is derived which cannot be solve using python software.\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 5.17;pg no: 153"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 66,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 5.17, Page:153 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 17\n",
+ "total heat added(Q)in KJ\n",
+ "Q= 1800.0\n",
+ "for heat addition process 1-2\n",
+ "Q12=T1*(s2-s1)\n",
+ "deltaS=s2-s1=in KJ/K 2.0\n",
+ "or heat addition process 3-4\n",
+ "Q34=T3*(s4-s3)\n",
+ "deltaS=s4-s3=in KJ/K 2.0\n",
+ "or heat rejected in process 5-6(Q56)in KJ\n",
+ "Q56=T5*(s5-s6)=T5*((s2-s1)+(s4-s3))=T5*(deltaS+deltaS)= 1200.0\n",
+ "net work done=net heat(W_net)in KJ\n",
+ "W_net=(Q12+Q34)-Q56 600.0\n",
+ "thermal efficiency of cycle(n)= 0.33\n",
+ "or n=n*100 % 33.33\n",
+ "so work done=600 KJ and thermal efficiency=33.33 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of work done and thermal efficiency\n",
+ "#intiation of all variables\n",
+ "# Chapter 5\n",
+ "print\"Example 5.17, Page:153 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 17\")\n",
+ "Q12=1000.;#heat added during process 1-2 in KJ\n",
+ "Q34=800.;#heat added during process 3-4 in KJ\n",
+ "T1=500.;#operating temperature for process 1-2\n",
+ "T3=400.;#operating temperature for process 3-4\n",
+ "T5=300.;#operating temperature for process 5-6\n",
+ "T2=T1;#isothermal process\n",
+ "T4=T3;#isothermal process\n",
+ "T6=T5;#isothermal process\n",
+ "print(\"total heat added(Q)in KJ\")\n",
+ "Q=Q12+Q34\n",
+ "print(\"Q=\"),round(Q,2)\n",
+ "print(\"for heat addition process 1-2\")\n",
+ "print(\"Q12=T1*(s2-s1)\")\n",
+ "deltaS=Q12/T1\n",
+ "print(\"deltaS=s2-s1=in KJ/K\"),round(deltaS,2)\n",
+ "print(\"or heat addition process 3-4\")\n",
+ "print(\"Q34=T3*(s4-s3)\")\n",
+ "deltaS=Q34/T3\n",
+ "print(\"deltaS=s4-s3=in KJ/K\"),round(deltaS,2)\n",
+ "print(\"or heat rejected in process 5-6(Q56)in KJ\")\n",
+ "Q56=T5*(deltaS+deltaS)\n",
+ "print(\"Q56=T5*(s5-s6)=T5*((s2-s1)+(s4-s3))=T5*(deltaS+deltaS)=\"),round(Q56,2)\n",
+ "print(\"net work done=net heat(W_net)in KJ\")\n",
+ "W_net=(Q12+Q34)-Q56\n",
+ "print(\"W_net=(Q12+Q34)-Q56\"),round(W_net,2)\n",
+ "n=W_net/Q\n",
+ "print(\"thermal efficiency of cycle(n)=\"),round(n,2)\n",
+ "n=n*100\n",
+ "print(\"or n=n*100 %\"),round(n,2) \n",
+ "print(\"so work done=600 KJ and thermal efficiency=33.33 %\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 5.18;pg no: 154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 67,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 5.18, Page:154 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 5 Example 18\n",
+ "let heat supplied by reservoir at 800 K,700 K,600 K be Q1_a , Q1_b , Q1_c\n",
+ "here Q1-Q2=W\n",
+ "so heat supplied by source(Q1)in KW= 30.0\n",
+ "also given that,Q1_a=0.7*Q1_b.......eq 1\n",
+ "Q1_c=Q1-(0.7*Q1_b+Q1_b)\n",
+ "Q1_c=Q1-1.7*Q1_b........eq 2\n",
+ "for reversible engine\n",
+ "Q1_a/T1_a+Q1_b/T1_b+Q1_c/T1_c-Q2/T2=0......eq 3\n",
+ "substitute eq 1 and eq 2 in eq 3 we get, \n",
+ "heat supplied by reservoir of 700 K(Q1_b)in KJ/s\n",
+ "Q1_b= 35.39\n",
+ "so heat supplied by reservoir of 800 K(Q1_a)in KJ/s\n",
+ "Q1_a= 24.78\n",
+ "and heat supplied by reservoir of 600 K(Q1_c)in KJ/s\n",
+ "Q1_c=Q1-1.7*Q1_b -30.17\n",
+ "so heat supplied by reservoir at 800 K(Q1_a)= 24.78\n",
+ "so heat supplied by reservoir at 700 K(Q1_b)= 35.39\n",
+ "so heat supplied by reservoir at 600 K(Q1_c)= -30.17\n",
+ "NOTE=>answer given in book for heat supplied by reservoir at 800 K,700 K,600 K i.e Q1_a=61.94 KJ/s,Q1_b=88.48 KJ/s,Q1_c=120.42 KJ/s is wrong hence correct answer is calculated above.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of heat supplied by reservoir at 800,700,600\n",
+ "#intiation of all variables\n",
+ "# Chapter 5\n",
+ "print\"Example 5.18, Page:154 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 5 Example 18\")\n",
+ "T1_a=800.;#temperature of reservoir a in K\n",
+ "T1_b=700.;#temperature of reservoir b in K\n",
+ "T1_c=600.;#temperature of reservoir c in K\n",
+ "T2=320.;#temperature of sink in K\n",
+ "W=20.;#work done in KW\n",
+ "Q2=10.;#heat rejected to sink in KW\n",
+ "print(\"let heat supplied by reservoir at 800 K,700 K,600 K be Q1_a , Q1_b , Q1_c\")\n",
+ "print(\"here Q1-Q2=W\")\n",
+ "Q1=W+Q2\n",
+ "print(\"so heat supplied by source(Q1)in KW=\"),round(Q1,2)\n",
+ "print(\"also given that,Q1_a=0.7*Q1_b.......eq 1\")\n",
+ "print(\"Q1_c=Q1-(0.7*Q1_b+Q1_b)\")\n",
+ "print(\"Q1_c=Q1-1.7*Q1_b........eq 2\")\n",
+ "print(\"for reversible engine\")\n",
+ "print(\"Q1_a/T1_a+Q1_b/T1_b+Q1_c/T1_c-Q2/T2=0......eq 3\")\n",
+ "print(\"substitute eq 1 and eq 2 in eq 3 we get, \")\n",
+ "print(\"heat supplied by reservoir of 700 K(Q1_b)in KJ/s\")\n",
+ "Q1_b=((Q2/T2)-(Q1/T1_c))/((0.7/T1_a)+(1/T1_b)-(1.7/T1_c))\n",
+ "print(\"Q1_b=\"),round(Q1_b,2)\n",
+ "print(\"so heat supplied by reservoir of 800 K(Q1_a)in KJ/s\")\n",
+ "Q1_a=0.7*Q1_b\n",
+ "print(\"Q1_a=\"),round(Q1_a,2)\n",
+ "print(\"and heat supplied by reservoir of 600 K(Q1_c)in KJ/s\")\n",
+ "Q1_c=Q1-1.7*Q1_b\n",
+ "print(\"Q1_c=Q1-1.7*Q1_b\"),round(Q1_c,2)\n",
+ "print(\"so heat supplied by reservoir at 800 K(Q1_a)=\"),round(Q1_a,2)\n",
+ "print(\"so heat supplied by reservoir at 700 K(Q1_b)=\"),round(Q1_b,2)\n",
+ "print(\"so heat supplied by reservoir at 600 K(Q1_c)=\"),round(Q1_c,2)\n",
+ "print(\"NOTE=>answer given in book for heat supplied by reservoir at 800 K,700 K,600 K i.e Q1_a=61.94 KJ/s,Q1_b=88.48 KJ/s,Q1_c=120.42 KJ/s is wrong hence correct answer is calculated above.\")\n"
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter6_3.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter6_3.ipynb
new file mode 100644
index 00000000..92ef2871
--- /dev/null
+++ b/_Engineering_Thermodynamics_by__O._Singh/chapter6_3.ipynb
@@ -0,0 +1,1390 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 6:Thermo dynamic Properties of pure substance"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 6.1;pg no: 174"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 68,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 6.1, Page:174 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 1\n",
+ "NOTE=>In question no. 1 expression for various quantities is derived which cannot be solve using python software.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#intiation of all variables\n",
+ "# Chapter 6\n",
+ "print\"Example 6.1, Page:174 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 1\")\n",
+ "print(\"NOTE=>In question no. 1 expression for various quantities is derived which cannot be solve using python software.\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 6.2;pg no: 175"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 69,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 6.2, Page:175 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 2\n",
+ "during throttling,h1=h2\n",
+ "at state 2,enthalpy can be seen for superheated steam using Table 4 at 0.05 Mpa and 100 degree celcius\n",
+ "thus h2=2682.5 KJ/kg\n",
+ "at state 1,before throttling\n",
+ "hf_10Mpa=1407.56 KJ/kg\n",
+ "hfg_10Mpa=1317.1 KJ/kg\n",
+ "h1=hf_10Mpa+x1*hfg_10Mpa\n",
+ "dryness fraction(x1)may be given as\n",
+ "x1= 0.97\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of dryness fraction\n",
+ "#intiation of all variables\n",
+ "# Chapter 6\n",
+ "print\"Example 6.2, Page:175 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 2\")\n",
+ "print(\"during throttling,h1=h2\")\n",
+ "print(\"at state 2,enthalpy can be seen for superheated steam using Table 4 at 0.05 Mpa and 100 degree celcius\")\n",
+ "print(\"thus h2=2682.5 KJ/kg\")\n",
+ "h2=2682.5;\n",
+ "print(\"at state 1,before throttling\")\n",
+ "print(\"hf_10Mpa=1407.56 KJ/kg\")\n",
+ "hf_10Mpa=1407.56;\n",
+ "print(\"hfg_10Mpa=1317.1 KJ/kg\")\n",
+ "hfg_10Mpa=1317.1;\n",
+ "print(\"h1=hf_10Mpa+x1*hfg_10Mpa\")\n",
+ "h1=h2;#during throttling\n",
+ "print(\"dryness fraction(x1)may be given as\")\n",
+ "x1=(h1-hf_10Mpa)/hfg_10Mpa\n",
+ "print(\"x1=\"),round(x1,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 6.3;pg no: 176"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 70,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 6.3, Page:176 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 3\n",
+ "internal energy(u)=in KJ/kg 2644.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of internal energy\n",
+ "#intiation of all variables\n",
+ "# Chapter 6\n",
+ "print\"Example 6.3, Page:176 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 3\")\n",
+ "h=2848;#enthalpy in KJ/kg\n",
+ "p=12*1000;#pressure in Kpa\n",
+ "v=0.017;#specific volume in m^3/kg\n",
+ "u=h-p*v\n",
+ "print(\"internal energy(u)=in KJ/kg\"),round(u,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 6.4;pg no: 176"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 71,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 6.4, Page:176 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 4\n",
+ "steam state 2 Mpa and 300 degree celcius lies in superheated region as saturation temperature at 2 Mpa is 212.42 degree celcius and hfg=1890.7 KJ/kg\n",
+ "entropy of unit mass of superheated steam with reference to absolute zero(S)in KJ/kg K\n",
+ "S= 6.65\n",
+ "entropy of 5 kg of steam(S)in KJ/K\n",
+ "S=m*S 33.23\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of entropy of 5 kg of steam\n",
+ "#intiation of all variables\n",
+ "# Chapter 6\n",
+ "import math\n",
+ "print\"Example 6.4, Page:176 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 4\")\n",
+ "m=5;#mass of steam in kg\n",
+ "p=2;#pressure of steam in Mpa\n",
+ "T_superheat=(300+273.15);#temperature of superheat steam in K\n",
+ "Cp_water=4.18;#specific heat of water at constant pressure in KJ/kg K\n",
+ "Cp_superheat=2.1;#specific heat of superheat steam at constant pressure in KJ/kg K\n",
+ "print(\"steam state 2 Mpa and 300 degree celcius lies in superheated region as saturation temperature at 2 Mpa is 212.42 degree celcius and hfg=1890.7 KJ/kg\")\n",
+ "T_sat=(212.42+273.15);#saturation temperature at 2 Mpa in K\n",
+ "hfg_2Mpa=1890.7;\n",
+ "print(\"entropy of unit mass of superheated steam with reference to absolute zero(S)in KJ/kg K\")\n",
+ "S=Cp_water*math.log(T_sat/273.15)+(hfg_2Mpa/T_sat)+(Cp_superheat*math.log(T_superheat/T_sat))\n",
+ "print(\"S=\"),round(S,2)\n",
+ "print(\"entropy of 5 kg of steam(S)in KJ/K\")\n",
+ "S=m*S\n",
+ "print(\"S=m*S\"),round(S,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 6.5;pg no: 176"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 72,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 6.5, Page:176 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 5\n",
+ "boiling point =110 degree celcius,pressure at which it boils=143.27 Kpa(from steam table,sat. pressure for 110 degree celcius)\n",
+ "at further depth of 50 cm the pressure(p)in Kpa\n",
+ "p= 138.37\n",
+ "boiling point at this depth=Tsat_138.365\n",
+ "from steam table this temperature=108.866=108.87 degree celcius\n",
+ "so boiling point = 108.87 degree celcius\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of boiling point\n",
+ "#intiation of all variables\n",
+ "# Chapter 6\n",
+ "print\"Example 6.5, Page:176 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 5\")\n",
+ "rho=1000;#density of water in kg/m^3\n",
+ "g=9.81;#acceleration due to gravity in m/s^2\n",
+ "h=0.50;#depth from above mentioned level in m\n",
+ "print(\"boiling point =110 degree celcius,pressure at which it boils=143.27 Kpa(from steam table,sat. pressure for 110 degree celcius)\")\n",
+ "p_boil=143.27;#pressure at which pond water boils in Kpa\n",
+ "print(\"at further depth of 50 cm the pressure(p)in Kpa\")\n",
+ "p=p_boil-((rho*g*h)*10**-3)\n",
+ "print(\"p=\"),round(p,2)\n",
+ "print(\"boiling point at this depth=Tsat_138.365\")\n",
+ "print(\"from steam table this temperature=108.866=108.87 degree celcius\")\n",
+ "print(\"so boiling point = 108.87 degree celcius\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 6.6;pg no: 177"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 73,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 6.6, Page:177 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 6\n",
+ "in a rigid vessel it can be treated as constant volume process.\n",
+ "so v1=v2\n",
+ "since final state is given to be critical state,then specific volume at critical point,\n",
+ "v2=0.003155 m^3/kg\n",
+ "at 100 degree celcius saturation temperature,from steam table\n",
+ "vf_100=0.001044 m^3/kg,vg_100=1.6729 m^3/kg\n",
+ "and vfg_100=in m^3/kg= 1.67\n",
+ "thus for initial quality being x1\n",
+ "v1=vf_100+x1*vfg_100\n",
+ "so x1= 0.001\n",
+ "mass of water initially=total mass*(1-x1)\n",
+ "total mass of fluid/water(m) in kg= 158.48\n",
+ "volume of water(v) in m^3= 0.1655\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of mass and volume of water\n",
+ "#intiation of all variables\n",
+ "# Chapter 6\n",
+ "print\"Example 6.6, Page:177 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 6\")\n",
+ "V=0.5;#capacity of rigid vessel in m^3\n",
+ "print(\"in a rigid vessel it can be treated as constant volume process.\")\n",
+ "print(\"so v1=v2\")\n",
+ "print(\"since final state is given to be critical state,then specific volume at critical point,\")\n",
+ "print(\"v2=0.003155 m^3/kg\")\n",
+ "v2=0.003155;#specific volume at critical point in m^3/kg\n",
+ "print(\"at 100 degree celcius saturation temperature,from steam table\")\n",
+ "print(\"vf_100=0.001044 m^3/kg,vg_100=1.6729 m^3/kg\")\n",
+ "vf_100=0.001044;\n",
+ "vg_100=1.6729;\n",
+ "vfg_100=vg_100-vf_100\n",
+ "print(\"and vfg_100=in m^3/kg=\"),round(vfg_100,2)\n",
+ "print(\"thus for initial quality being x1\")\n",
+ "v1=v2;#rigid vessel\n",
+ "x1=(v1-vf_100)/vfg_100\n",
+ "print(\"v1=vf_100+x1*vfg_100\")\n",
+ "print(\"so x1=\"),round(x1,3)\n",
+ "print(\"mass of water initially=total mass*(1-x1)\")\n",
+ "m=V/v2\n",
+ "print(\"total mass of fluid/water(m) in kg=\"),round(m,2)\n",
+ "v=m*vf_100\n",
+ "print(\"volume of water(v) in m^3=\"),round(v,4)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 6.7;pg no: 177"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 74,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 6.7, Page:177 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 7\n",
+ "on mollier diadram(h-s diagram)the slope of isobaric line may be given as\n",
+ "(dh/ds)_p=cons =slope of isobar\n",
+ "from 1st and 2nd law combined;\n",
+ "T*ds=dh-v*dp\n",
+ "(dh/ds)_p=cons = T\n",
+ "here temperature,T=773.15 K\n",
+ "here slope=(dh/ds))p=cons = 773.15\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of slope\n",
+ "#intiation of all variables\n",
+ "# Chapter 6\n",
+ "print\"Example 6.7, Page:177 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 7\")\n",
+ "print(\"on mollier diadram(h-s diagram)the slope of isobaric line may be given as\")\n",
+ "print(\"(dh/ds)_p=cons =slope of isobar\")\n",
+ "print(\"from 1st and 2nd law combined;\")\n",
+ "print(\"T*ds=dh-v*dp\")\n",
+ "print(\"(dh/ds)_p=cons = T\")\n",
+ "print(\"here temperature,T=773.15 K\")\n",
+ "print(\"here slope=(dh/ds))p=cons = 773.15\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 6.8;pg no: 178"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 75,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 6.8, Page:178 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 8\n",
+ "at 0.15Mpa,from steam table;\n",
+ "hf=467.11 KJ/kg,hg=2693.6 KJ/kg\n",
+ "and hfg in KJ/kg= 2226.49\n",
+ "vf=0.001053 m^3/kg,vg=1.1593 m^3/kg\n",
+ "and vfg in m^3/kg= 1.16\n",
+ "sf=1.4336 KJ/kg,sg=7.2233 KJ/kg\n",
+ "and sfg=in KJ/kg K= 5.79\n",
+ "enthalpy at x=.10(h)in KJ/kg\n",
+ "h= 689.76\n",
+ "specific volume,(v)in m^3/kg\n",
+ "v= 0.12\n",
+ "entropy (s)in KJ/kg K\n",
+ "s= 2.01\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of entropy\n",
+ "#intiation of all variables\n",
+ "# Chapter 6\n",
+ "print\"Example 6.8, Page:178 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 8\")\n",
+ "x=.10;#quality is 10%\n",
+ "print(\"at 0.15Mpa,from steam table;\")\n",
+ "print(\"hf=467.11 KJ/kg,hg=2693.6 KJ/kg\")\n",
+ "hf=467.11;\n",
+ "hg=2693.6;\n",
+ "hfg=hg-hf\n",
+ "print(\"and hfg in KJ/kg=\"),round(hfg,2)\n",
+ "print(\"vf=0.001053 m^3/kg,vg=1.1593 m^3/kg\")\n",
+ "vf=0.001053;\n",
+ "vg=1.1593;\n",
+ "vfg=vg-vf\n",
+ "print(\"and vfg in m^3/kg=\"),round(vfg,2)\n",
+ "print(\"sf=1.4336 KJ/kg,sg=7.2233 KJ/kg\")\n",
+ "sf=1.4336;\n",
+ "sg=7.2233;\n",
+ "sfg=sg-sf\n",
+ "print(\"and sfg=in KJ/kg K=\"),round(sfg,2)\n",
+ "print(\"enthalpy at x=.10(h)in KJ/kg\")\n",
+ "h=hf+x*hfg\n",
+ "print(\"h=\"),round(h,2)\n",
+ "print(\"specific volume,(v)in m^3/kg\")\n",
+ "v=vf+x*vfg\n",
+ "print(\"v=\"),round(v,2)\n",
+ "print(\"entropy (s)in KJ/kg K\")\n",
+ "s=sf+x*sfg\n",
+ "print(\"s=\"),round(s,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 6.9;pg no: 178"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 76,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 6.9, Page:178 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 9\n",
+ "work done during constant pressure process(W)=p1*(V2-V1)in KJ\n",
+ "now from steam table at p1,vf=0.001127 m^3/kg,vg=0.19444 m^3/kg,uf=761.68 KJ/kg,ufg=1822 KJ/kg\n",
+ "so v1 in m^3/kg=\n",
+ "now mass of steam(m) in kg= 0.32\n",
+ "specific volume at final state(v2)in m^3/kg\n",
+ "v2= 0.62\n",
+ "corresponding to this specific volume the final state is to be located for getting the internal energy at final state at 1 Mpa\n",
+ "v2>vg_1Mpa\n",
+ "hence state lies in superheated region,from the steam table by interpolation we get temperature as;\n",
+ "state lies between temperature of 1000 degree celcius and 1100 degree celcius\n",
+ "so exact temperature at final state(T)in K= 1077.61\n",
+ "thus internal energy at final state,1 Mpa,1077.61 degree celcius;\n",
+ "u2=4209.6 KJ/kg\n",
+ "internal energy at initial state(u1)in KJ/kg\n",
+ "u1= 2219.28\n",
+ "from first law of thermodynamics,Q-W=deltaU\n",
+ "so heat added(Q)=(U2-U1)+W=m*(u2-u1)+W in KJ= 788.83\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of heat added\n",
+ "#intiation of all variables\n",
+ "# Chapter 6\n",
+ "print\"Example 6.9, Page:178 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 9\")\n",
+ "p1=1*1000;#initial pressure of steam in Kpa\n",
+ "V1=0.05;#initial volume of steam in m^3\n",
+ "x1=.8;#dryness fraction is 80%\n",
+ "V2=0.2;#final volume of steam in m^3\n",
+ "p2=p1;#constant pressure process\n",
+ "print(\"work done during constant pressure process(W)=p1*(V2-V1)in KJ\")\n",
+ "W=p1*(V2-V1)\n",
+ "print(\"now from steam table at p1,vf=0.001127 m^3/kg,vg=0.19444 m^3/kg,uf=761.68 KJ/kg,ufg=1822 KJ/kg\")\n",
+ "vf=0.001127;\n",
+ "vg=0.19444;\n",
+ "uf=761.68;\n",
+ "ufg=1822;\n",
+ "v1=vf+x1*vg\n",
+ "print(\"so v1 in m^3/kg=\")\n",
+ "m=V1/v1\n",
+ "print(\"now mass of steam(m) in kg=\"),round(m,2)\n",
+ "m=0.32097;#take m=0.32097 approx.\n",
+ "print(\"specific volume at final state(v2)in m^3/kg\")\n",
+ "v2=V2/m\n",
+ "print(\"v2=\"),round(v2,2)\n",
+ "print(\"corresponding to this specific volume the final state is to be located for getting the internal energy at final state at 1 Mpa\")\n",
+ "print(\"v2>vg_1Mpa\")\n",
+ "print(\"hence state lies in superheated region,from the steam table by interpolation we get temperature as;\")\n",
+ "print(\"state lies between temperature of 1000 degree celcius and 1100 degree celcius\")\n",
+ "T=1000+((100*(.62311-.5871))/(.6335-.5871))\n",
+ "print(\"so exact temperature at final state(T)in K=\"),round(T,2)\n",
+ "print(\"thus internal energy at final state,1 Mpa,1077.61 degree celcius;\")\n",
+ "print(\"u2=4209.6 KJ/kg\")\n",
+ "u2=4209.6;\n",
+ "print(\"internal energy at initial state(u1)in KJ/kg\")\n",
+ "u1=uf+x1*ufg\n",
+ "print(\"u1=\"),round(u1,2)\n",
+ "print(\"from first law of thermodynamics,Q-W=deltaU\")\n",
+ "Q=m*(u2-u1)+W\n",
+ "print(\"so heat added(Q)=(U2-U1)+W=m*(u2-u1)+W in KJ=\"),round(Q,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 6.10;pg no: 179"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 77,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 6.10, Page:179 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 10\n",
+ "here steam is kept in rigid vessel,therefore its specific volume shall remain constant\n",
+ "it is superheated steam as Tsat=170.43 degree celcius at 800 Kpa\n",
+ "from superheated steam table;v1=0.2404 m^3/kg\n",
+ "at begining of condensation specific volume = 0.2404 m^3/kg\n",
+ "v2=0.2404 m^3/kg\n",
+ "this v2 shall be specific volume corresponding to saturated vapour state for condensation.\n",
+ "thus v2=vg=0.2404 m^3/kg\n",
+ "looking into steam table vg=0.2404 m^3/kg shall lie between temperature 175 degree celcius(vg=0.2168 m^3/kg)and 170 degree celcius(vg=0.2428 m^3/kg)and pressure 892 Kpa(175 degree celcius)and 791.7 Kpa(170 degree celcius).\n",
+ "by interpolation,temperature at begining of condensation(T2)in K\n",
+ "similarily,pressure(p2)in Kpa= 800.96\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of pressure\n",
+ "#intiation of all variables\n",
+ "# Chapter 6\n",
+ "print\"Example 6.10, Page:179 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 10\")\n",
+ "p1=800;#initial pressure of steam in Kpa\n",
+ "T1=200;#initial temperature of steam in degree celcius\n",
+ "print(\"here steam is kept in rigid vessel,therefore its specific volume shall remain constant\")\n",
+ "print(\"it is superheated steam as Tsat=170.43 degree celcius at 800 Kpa\")\n",
+ "print(\"from superheated steam table;v1=0.2404 m^3/kg\")\n",
+ "print(\"at begining of condensation specific volume = 0.2404 m^3/kg\")\n",
+ "print(\"v2=0.2404 m^3/kg\")\n",
+ "v2=0.2404;\n",
+ "print(\"this v2 shall be specific volume corresponding to saturated vapour state for condensation.\")\n",
+ "print(\"thus v2=vg=0.2404 m^3/kg\")\n",
+ "vg=v2;\n",
+ "print(\"looking into steam table vg=0.2404 m^3/kg shall lie between temperature 175 degree celcius(vg=0.2168 m^3/kg)and 170 degree celcius(vg=0.2428 m^3/kg)and pressure 892 Kpa(175 degree celcius)and 791.7 Kpa(170 degree celcius).\")\n",
+ "print(\"by interpolation,temperature at begining of condensation(T2)in K\")\n",
+ "T2=175-((175-170)*(0.2404-0.2167))/(0.2428-.2168)\n",
+ "p=892-(((892-791.7)*(0.2404-0.2168))/(0.2428-0.2168))\n",
+ "print(\"similarily,pressure(p2)in Kpa=\"),round(p,2)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 6.11;pg no: 180"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 78,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 6.11, Page:180 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 11\n",
+ "from 1st and 2nd law;\n",
+ "T*ds=dh-v*dp\n",
+ "for isentropic process,ds=0\n",
+ "hence dh=v*dp\n",
+ "i.e (h2-h1)=v1*(p2-p1)\n",
+ "corresponding to initial state of saturated liquid at 30 degree celcius;from steam table;\n",
+ "p1=4.25 Kpa,vf=v1=0.001004 m^3/kg\n",
+ "therefore enthalpy change(deltah)=(h2-h1) in KJ/kg= 0.2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of enthalpy change\n",
+ "#intiation of all variables\n",
+ "# Chapter 6\n",
+ "print\"Example 6.11, Page:180 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 11\")\n",
+ "p2=200;#feed water pump pressure in Kpa\n",
+ "print(\"from 1st and 2nd law;\")\n",
+ "print(\"T*ds=dh-v*dp\")\n",
+ "print(\"for isentropic process,ds=0\")\n",
+ "print(\"hence dh=v*dp\")\n",
+ "print(\"i.e (h2-h1)=v1*(p2-p1)\")\n",
+ "print(\"corresponding to initial state of saturated liquid at 30 degree celcius;from steam table;\")\n",
+ "print(\"p1=4.25 Kpa,vf=v1=0.001004 m^3/kg\")\n",
+ "p1=4.25;\n",
+ "v1=0.001004;\n",
+ "deltah=v1*(p2-p1)\n",
+ "print(\"therefore enthalpy change(deltah)=(h2-h1) in KJ/kg=\"),round(deltah,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 6.12;pg no: 180"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 79,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 6.12, Page:180 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 12\n",
+ "from steam table at 150 degree celcius\n",
+ "vf=0.001091 m^3/kg,vg=0.3928 m^3/kg\n",
+ "so volume occupied by water(Vw)=3*V/(3+2) in m^3 1.2\n",
+ "and volume of steam(Vs) in m^3= 0.8\n",
+ "mass of water(mf)=Vw/Vf in kg 1099.91\n",
+ "mass of steam(mg)=Vs/Vg in kg 2.04\n",
+ "total mass in tank(m) in kg= 1101.95\n",
+ "quality or dryness fraction(x)\n",
+ "x= 0.002\n",
+ "NOTE=>answer given in book for mass=1103.99 kg is incorrect and correct answer is 1101.945 which is calculated above.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of quality or dryness fraction\n",
+ "#intiation of all variables\n",
+ "# Chapter 6\n",
+ "print\"Example 6.12, Page:180 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 12\")\n",
+ "V=2.;#volume of vessel in m^3\n",
+ "print(\"from steam table at 150 degree celcius\")\n",
+ "print(\"vf=0.001091 m^3/kg,vg=0.3928 m^3/kg\")\n",
+ "Vf=0.001091;\n",
+ "Vg=0.3928;\n",
+ "Vw=3*V/(3+2)\n",
+ "print(\"so volume occupied by water(Vw)=3*V/(3+2) in m^3\"),round(Vw,2)\n",
+ "Vs=2*V/(3+2)\n",
+ "print(\"and volume of steam(Vs) in m^3=\"),round(Vs,2)\n",
+ "mf=Vw/Vf\n",
+ "print(\"mass of water(mf)=Vw/Vf in kg\"),round(mf,2)\n",
+ "mg=Vs/Vg\n",
+ "print(\"mass of steam(mg)=Vs/Vg in kg\"),round(mg,2)\n",
+ "m=mf+mg\n",
+ "print(\"total mass in tank(m) in kg=\"),round(m,2)\n",
+ "print(\"quality or dryness fraction(x)\")\n",
+ "x=mg/m\n",
+ "print(\"x=\"),round(x,3)\n",
+ "print(\"NOTE=>answer given in book for mass=1103.99 kg is incorrect and correct answer is 1101.945 which is calculated above.\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 6.13;pg no: 181"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 80,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 6.13, Page:181 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 13\n",
+ "fron S.F.S.E on steam turbine;\n",
+ "W=h1-h2\n",
+ "initially at 4Mpa,300 degree celcius the steam is super heated so enthalpy from superheated steam or mollier diagram\n",
+ "h1=2886.2 KJ/kg,s1=6.2285 KJ/kg K\n",
+ "reversible adiabatic expansion process has entropy remaining constant.on mollier diagram the state 2 can be simply located at intersection of constant temperature line for 50 degree celcius and isentropic expansion line.\n",
+ "else from steam tables at 50 degree celcius saturation temperature;\n",
+ "hf=209.33 KJ/kg,sf=0.7038 KJ/kg K\n",
+ "hfg=2382.7 KJ/kg,sfg=7.3725 KJ/kg K\n",
+ "here s1=s2,let dryness fraction at 2 be x2\n",
+ "x2= 0.75\n",
+ "hence enthalpy at state 2\n",
+ "h2 in KJ/kg= 1994.84\n",
+ "steam turbine work(W)in KJ/kg\n",
+ "W=h1-h2\n",
+ "so turbine output=W 891.36\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of turbine output\n",
+ "#intiation of all variables\n",
+ "# Chapter 6\n",
+ "print\"Example 6.13, Page:181 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 13\")\n",
+ "print(\"fron S.F.S.E on steam turbine;\")\n",
+ "print(\"W=h1-h2\")\n",
+ "print(\"initially at 4Mpa,300 degree celcius the steam is super heated so enthalpy from superheated steam or mollier diagram\")\n",
+ "print(\"h1=2886.2 KJ/kg,s1=6.2285 KJ/kg K\")\n",
+ "h1=2886.2;\n",
+ "s1=6.2285;\n",
+ "print(\"reversible adiabatic expansion process has entropy remaining constant.on mollier diagram the state 2 can be simply located at intersection of constant temperature line for 50 degree celcius and isentropic expansion line.\")\n",
+ "print(\"else from steam tables at 50 degree celcius saturation temperature;\")\n",
+ "print(\"hf=209.33 KJ/kg,sf=0.7038 KJ/kg K\")\n",
+ "hf=209.33;\n",
+ "sf=0.7038;\n",
+ "print(\"hfg=2382.7 KJ/kg,sfg=7.3725 KJ/kg K\")\n",
+ "hfg=2382.7;\n",
+ "sfg=7.3725;\n",
+ "print(\"here s1=s2,let dryness fraction at 2 be x2\")\n",
+ "x2=(s1-sf)/sfg\n",
+ "print(\"x2=\"),round(x2,2)\n",
+ "print(\"hence enthalpy at state 2\")\n",
+ "h2=hf+x2*hfg\n",
+ "print(\"h2 in KJ/kg=\"),round(h2,2)\n",
+ "print(\"steam turbine work(W)in KJ/kg\")\n",
+ "W=h1-h2\n",
+ "print(\"W=h1-h2\")\n",
+ "print(\"so turbine output=W\"),round(W,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 6.14;pg no: 181"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 81,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 6.14, Page:181 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 14\n",
+ "it is constant volume process\n",
+ "volume of vessel(V)=mass of vapour * specific volume of vapour\n",
+ "initial specific volume,v1\n",
+ "v1=vf_100Kpa+x1*vfg_100 in m^3/kg\n",
+ "at 100 Kpa from steam table;\n",
+ "hf_100Kpa=417.46 KJ/kg,uf_100Kpa=417.36 KJ/kg,vf_100Kpa=0.001043 m^3/kg,hfg_100Kpa=2258 KJ/kg,ufg_100Kpa=2088.7 KJ/kg,vg_100Kpa=1.6940 m^3/kg\n",
+ " here vfg_100Kpa= in m^3/kg= 1.69\n",
+ "so v1= in m^3/kg= 0.85\n",
+ "and volume of vessel(V) in m^3= 42.38\n",
+ "enthalpy at 1,h1=hf_100Kpa+x1*hfg_100Kpa in KJ/kg 1546.46\n",
+ "internal energy in the beginning=U1=m1*u1 in KJ 146171.0\n",
+ "let the mass of dry steam added be m,final specific volume inside vessel,v2\n",
+ "v2=vf_1000Kpa+x2*vfg_1000Kpa\n",
+ "at 2000 Kpa,from steam table,\n",
+ "vg_2000Kpa=0.09963 m^3/kg,ug_2000Kpa=2600.3 KJ/kg,hg_2000Kpa=2799.5 KJ/kg\n",
+ "total mass inside vessel=mass of steam at2000 Kpa+mass of mixture at 100 Kpa\n",
+ "V/v2=V/vg_2000Kpa+V/v1\n",
+ "so v2 in m^3/kg= 0.09\n",
+ "here v2=vf_1000Kpa+x2*vfg_1000Kpa in m^3/kg\n",
+ "at 1000 Kpa from steam table,\n",
+ "hf_1000Kpa=762.81 KJ/kg,hfg_1000Kpa=2015.3 KJ/kg,vf_1000Kpa=0.001127 m^3/kg,vg_1000Kpa=0.19444 m^3/kg\n",
+ "here vfg_1000Kpa= in m^3/kg= 0.19\n",
+ "so x2= 0.46\n",
+ "for adiabatic mixing,(100+m)*h2=100*h1+m*hg_2000Kpa\n",
+ "so mass of dry steam at 2000 Kpa to be added(m)in kg\n",
+ "m=(100*(h1-h2))/(h2-hg_2000Kpa)= 11.97\n",
+ "quality of final mixture x2= 0.46\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of quality of final mixture\n",
+ "#intiation of all variables\n",
+ "# Chapter 6\n",
+ "print\"Example 6.14, Page:181 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 14\")\n",
+ "x1=0.5;#dryness fraction \n",
+ "m1=100;#mass of steam in kg\n",
+ "v1=0.8475;#\n",
+ "print(\"it is constant volume process\")\n",
+ "print(\"volume of vessel(V)=mass of vapour * specific volume of vapour\")\n",
+ "print(\"initial specific volume,v1\")\n",
+ "print(\"v1=vf_100Kpa+x1*vfg_100 in m^3/kg\")\n",
+ "print(\"at 100 Kpa from steam table;\")\n",
+ "print(\"hf_100Kpa=417.46 KJ/kg,uf_100Kpa=417.36 KJ/kg,vf_100Kpa=0.001043 m^3/kg,hfg_100Kpa=2258 KJ/kg,ufg_100Kpa=2088.7 KJ/kg,vg_100Kpa=1.6940 m^3/kg\")\n",
+ "hf_100Kpa=417.46;\n",
+ "uf_100Kpa=417.36;\n",
+ "vf_100Kpa=0.001043;\n",
+ "hfg_100Kpa=2258;\n",
+ "ufg_100Kpa=2088.7;\n",
+ "vg_100Kpa=1.6940;\n",
+ "vfg_100Kpa=vg_100Kpa-vf_100Kpa\n",
+ "print(\" here vfg_100Kpa= in m^3/kg=\"),round(vfg_100Kpa,2)\n",
+ "v1=vf_100Kpa+x1*vfg_100Kpa\n",
+ "print(\"so v1= in m^3/kg=\"),round(v1,2)\n",
+ "V=m1*x1*v1\n",
+ "print(\"and volume of vessel(V) in m^3=\"),round(V,2)\n",
+ "h1=hf_100Kpa+x1*hfg_100Kpa\n",
+ "print(\"enthalpy at 1,h1=hf_100Kpa+x1*hfg_100Kpa in KJ/kg\"),round(h1,2)\n",
+ "U1=m1*(uf_100Kpa+x1*ufg_100Kpa)\n",
+ "print(\"internal energy in the beginning=U1=m1*u1 in KJ\"),round(U1,2)\n",
+ "print(\"let the mass of dry steam added be m,final specific volume inside vessel,v2\")\n",
+ "print(\"v2=vf_1000Kpa+x2*vfg_1000Kpa\")\n",
+ "print(\"at 2000 Kpa,from steam table,\")\n",
+ "print(\"vg_2000Kpa=0.09963 m^3/kg,ug_2000Kpa=2600.3 KJ/kg,hg_2000Kpa=2799.5 KJ/kg\")\n",
+ "vg_2000Kpa=0.09963;\n",
+ "ug_2000Kpa=2600.3;\n",
+ "hg_2000Kpa=2799.5;\n",
+ "print(\"total mass inside vessel=mass of steam at2000 Kpa+mass of mixture at 100 Kpa\")\n",
+ "print(\"V/v2=V/vg_2000Kpa+V/v1\")\n",
+ "v2=1/((1/vg_2000Kpa)+(1/v1))\n",
+ "print(\"so v2 in m^3/kg=\"),round(v2,2)\n",
+ "print(\"here v2=vf_1000Kpa+x2*vfg_1000Kpa in m^3/kg\")\n",
+ "print(\"at 1000 Kpa from steam table,\")\n",
+ "print(\"hf_1000Kpa=762.81 KJ/kg,hfg_1000Kpa=2015.3 KJ/kg,vf_1000Kpa=0.001127 m^3/kg,vg_1000Kpa=0.19444 m^3/kg\")\n",
+ "hf_1000Kpa=762.81;\n",
+ "hfg_1000Kpa=2015.3;\n",
+ "vf_1000Kpa=0.001127;\n",
+ "vg_1000Kpa=0.19444;\n",
+ "vfg_1000Kpa=vg_1000Kpa-vf_1000Kpa\n",
+ "print(\"here vfg_1000Kpa= in m^3/kg=\"),round(vfg_1000Kpa,2)\n",
+ "x2=(v2-vf_1000Kpa)/vfg_1000Kpa\n",
+ "print(\"so x2=\"),round(x2,2)\n",
+ "print(\"for adiabatic mixing,(100+m)*h2=100*h1+m*hg_2000Kpa\")\n",
+ "print(\"so mass of dry steam at 2000 Kpa to be added(m)in kg\")\n",
+ "m=(100*(h1-(hf_1000Kpa+x2*hfg_1000Kpa)))/((hf_1000Kpa+x2*hfg_1000Kpa)-hg_2000Kpa)\n",
+ "print(\"m=(100*(h1-h2))/(h2-hg_2000Kpa)=\"),round(m,2)\n",
+ "print(\"quality of final mixture x2=\"),round(x2,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 6.15;pg no: 183"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 82,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 6.15, Page:183 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 15\n",
+ "from dalton law of partial pressure the total pressure inside condenser will be sum of partial pressures of vapour and liquid inside.\n",
+ "condenser pressure(p_condenser) in Kpa= 7.3\n",
+ "partial pressure of steam corresponding to35 degree celcius from steam table;\n",
+ "p_steam=5.628 Kpa\n",
+ "enthalpy corresponding to 35 degree celcius from steam table,\n",
+ "hf=146.68 KJ/kg,hfg=2418.6 KJ/kg\n",
+ "let quality of steam entering be x\n",
+ "from energy balance;\n",
+ "mw*(To-Ti)*4.18=m_cond*(hf+x*hfg-4.18*T_hotwell)\n",
+ "so dryness fraction of steam entering(x)is given as\n",
+ "x= 0.97\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of dryness fraction of steam entering\n",
+ "#intiation of all variables\n",
+ "# Chapter 6\n",
+ "print\"Example 6.15, Page:183 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 15\")\n",
+ "p_vaccum=71.5;#recorded condenser vaccum in cm of mercury\n",
+ "p_barometer=76.8;#barometer reading in cm of mercury\n",
+ "T_cond=35;#temperature of condensation in degree celcius\n",
+ "T_hotwell=27.6;#temperature of hot well in degree celcius\n",
+ "m_cond=1930;#mass of condensate per hour\n",
+ "m_w=62000;#mass of cooling water per hour\n",
+ "Ti=8.51;#initial temperature in degree celcius\n",
+ "To=26.24;#outlet temperature in degree celcius\n",
+ "print(\"from dalton law of partial pressure the total pressure inside condenser will be sum of partial pressures of vapour and liquid inside.\")\n",
+ "p_condenser=(p_barometer-p_vaccum)*101.325/73.55\n",
+ "print(\"condenser pressure(p_condenser) in Kpa=\"),round(p_condenser,2)\n",
+ "print(\"partial pressure of steam corresponding to35 degree celcius from steam table;\")\n",
+ "print(\"p_steam=5.628 Kpa\")\n",
+ "p_steam=5.628;#partial pressure of steam\n",
+ "print(\"enthalpy corresponding to 35 degree celcius from steam table,\")\n",
+ "print(\"hf=146.68 KJ/kg,hfg=2418.6 KJ/kg\")\n",
+ "hf=146.68;\n",
+ "hfg=2418.6;\n",
+ "print(\"let quality of steam entering be x\")\n",
+ "print(\"from energy balance;\")\n",
+ "print(\"mw*(To-Ti)*4.18=m_cond*(hf+x*hfg-4.18*T_hotwell)\")\n",
+ "print(\"so dryness fraction of steam entering(x)is given as\")\n",
+ "x=(((m_w*(To-Ti)*4.18)/m_cond)-hf+4.18*T_hotwell)/hfg\n",
+ "print(\"x=\"),round(x,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 6.16;pg no: 184"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 83,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 6.16, Page:184 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 16\n",
+ "heating of water in vessel as described above is a constant pressure heating. pressure at which process occurs(p)=F/A+P_atm in Kpa\n",
+ "area(A) in m^2= 0.03\n",
+ "so p1=in Kpa= 419.61\n",
+ "now at 419.61 Kpa,hf=612.1 KJ/kg,hfg=2128.7 KJ/kg,vg=0.4435 m^3/kg\n",
+ "volume of water contained(V1) in m^3= 0.001\n",
+ "mass of water(m) in kg= 0.63\n",
+ "heat supplied shall cause sensible heating and latent heating\n",
+ "hence,enthalpy change=heat supplied\n",
+ "Q=((hf+x*hfg)-(4.18*T)*m)\n",
+ "so dryness fraction of steam produced(x)can be calculated as\n",
+ "so x= 0.46\n",
+ "internal energy of water(U1)in KJ,initially\n",
+ "U1= 393.69\n",
+ "finally,internal energy of wet steam(U2)in KJ\n",
+ "U2=m*h2-p2*V2\n",
+ "here V2 in m^3= 0.13\n",
+ "hence U2= 940.68\n",
+ "hence change in internal energy(U) in KJ= 547.21\n",
+ "work done(W) in KJ= 53.01\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of change in internal energy and work done\n",
+ "#intiation of all variables\n",
+ "# Chapter 6\n",
+ "import math\n",
+ "print\"Example 6.16, Page:184 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 16\")\n",
+ "F=10;#force applied externally upon piston in KN\n",
+ "d=.2;#diameter in m\n",
+ "h=0.02;#depth to which water filled in m \n",
+ "P_atm=101.3;#atmospheric pressure in Kpa\n",
+ "rho=1000;#density of water in kg/m^3\n",
+ "Q=600;#heat supplied to water in KJ\n",
+ "T=150;#temperature of water in degree celcius\n",
+ "print(\"heating of water in vessel as described above is a constant pressure heating. pressure at which process occurs(p)=F/A+P_atm in Kpa\")\n",
+ "A=math.pi*d**2/4\n",
+ "print(\"area(A) in m^2=\"),round(A,2)\n",
+ "p1=F/A+P_atm\n",
+ "print(\"so p1=in Kpa=\"),round(p1,2)\n",
+ "print(\"now at 419.61 Kpa,hf=612.1 KJ/kg,hfg=2128.7 KJ/kg,vg=0.4435 m^3/kg\")\n",
+ "hf=612.1;\n",
+ "hfg=2128.7;\n",
+ "vg=0.4435;\n",
+ "V1=math.pi*d**2*h/4\n",
+ "print(\"volume of water contained(V1) in m^3=\"),round(V1,3)\n",
+ "m=V1*rho\n",
+ "print(\"mass of water(m) in kg=\"),round(m,2)\n",
+ "print(\"heat supplied shall cause sensible heating and latent heating\")\n",
+ "print(\"hence,enthalpy change=heat supplied\")\n",
+ "print(\"Q=((hf+x*hfg)-(4.18*T)*m)\")\n",
+ "print(\"so dryness fraction of steam produced(x)can be calculated as\")\n",
+ "x=((Q/m)+4.18*T-hf)/hfg\n",
+ "print(\"so x=\"),round(x,2)\n",
+ "print(\"internal energy of water(U1)in KJ,initially\")\n",
+ "h1=4.18*T;#enthalpy of water in KJ/kg\n",
+ "U1=m*h1-p1*V1\n",
+ "print(\"U1=\"),round(U1,2)\n",
+ "U1=393.5;#approx.\n",
+ "print(\"finally,internal energy of wet steam(U2)in KJ\")\n",
+ "print(\"U2=m*h2-p2*V2\")\n",
+ "V2=m*x*vg\n",
+ "print(\"here V2 in m^3=\"),round(V2,2)\n",
+ "p2=p1;#constant pressure process\n",
+ "U2=(m*(hf+x*hfg))-p2*V2\n",
+ "print(\"hence U2=\"),round(U2,2)\n",
+ "U2=940.71;#approx.\n",
+ "U=U2-U1\n",
+ "print(\"hence change in internal energy(U) in KJ=\"),round(U,2)\n",
+ "p=p1;\n",
+ "W=p*(V2-V1)\n",
+ "print(\"work done(W) in KJ=\"),round(W,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 6.17;pg no: 185"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 84,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 6.17, Page:185 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 17\n",
+ "consider throttling calorimeter alone,\n",
+ "degree of superheat(T_sup)in degree celcius\n",
+ "T_sup= 18.2\n",
+ "enthalpy of superheated steam(h_sup)in KJ/kg\n",
+ "h_sup= 2711.99\n",
+ "at 120 degree celcius,h=2673.95 KJ/kg from steam table\n",
+ "now enthalpy before throttling = enthalpy after throttling\n",
+ "hf+x2*hfg=h_sup\n",
+ "here at 1.47 Mpa,hf=840.513 KJ/kg,hfg=1951.02 KJ/kg from steam table\n",
+ "so x2= 0.96\n",
+ "for seperating calorimeter alone,dryness fraction,x1=(ms-mw)/ms\n",
+ "overall dryness fraction(x)= 0.91\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of overall dryness fraction\n",
+ "#intiation of all variables\n",
+ "# Chapter 6\n",
+ "print\"Example 6.17, Page:185 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 17\")\n",
+ "ms=40;#mass of steam in kg\n",
+ "mw=2.2;#mass of water in kg\n",
+ "p1=1.47;#pressure before throttling in Mpa\n",
+ "T2=120;#temperature after throttling in degree celcius\n",
+ "p2=107.88;#pressure after throttling in Kpa\n",
+ "Cp_sup=2.09;#specific heat of superheated steam in KJ/kg K\n",
+ "print(\"consider throttling calorimeter alone,\")\n",
+ "print(\"degree of superheat(T_sup)in degree celcius\")\n",
+ "T_sup=T2-101.8\n",
+ "print(\"T_sup=\"),round(T_sup,2)\n",
+ "print(\"enthalpy of superheated steam(h_sup)in KJ/kg\")\n",
+ "h=2673.95;\n",
+ "h_sup=h+T_sup*Cp_sup\n",
+ "print(\"h_sup=\"),round(h_sup,2)\n",
+ "print(\"at 120 degree celcius,h=2673.95 KJ/kg from steam table\")\n",
+ "print(\"now enthalpy before throttling = enthalpy after throttling\")\n",
+ "print(\"hf+x2*hfg=h_sup\")\n",
+ "print(\"here at 1.47 Mpa,hf=840.513 KJ/kg,hfg=1951.02 KJ/kg from steam table\")\n",
+ "hf=840.513;\n",
+ "hfg=1951.02;\n",
+ "x2=(h_sup-hf)/hfg\n",
+ "print(\"so x2=\"),round(x2,2)\n",
+ "print(\"for seperating calorimeter alone,dryness fraction,x1=(ms-mw)/ms\")\n",
+ "x1=(ms-mw)/ms\n",
+ "x=x1*x2\n",
+ "print(\"overall dryness fraction(x)=\"),round(x,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 6.18;pg no: 185"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 85,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 6.18, Page:185 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 18\n",
+ "here heat addition to part B shall cause evaporation of water and subsequently the rise in pressure.\n",
+ "final,part B has dry steam at 15 bar.In order to have equilibrium the part A shall also have pressure of 15 bar.thus heat added\n",
+ "Q in KJ= 200.0\n",
+ "final enthalpy of dry steam at 15 bar,h2=hg_15bar\n",
+ "h2=2792.2 KJ/kg from steam table\n",
+ "let initial dryness fraction be x1,initial enthalpy,\n",
+ "h1=hf_10bar+x1*hfg_10bar.........eq1\n",
+ "here at 10 bar,hf_10bar=762.83 KJ/kg,hfg_10bar=2015.3 KJ/kg from steam table\n",
+ "also heat balance yields,\n",
+ "h1+Q=h2\n",
+ "so h1=h2-Q in KJ/kg\n",
+ "so by eq 1=>x1= 0.91\n",
+ "heat added(Q)in KJ= 200.0\n",
+ "and initial quality(x1) 0.91\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of heat added and initial quality\n",
+ "#intiation of all variables\n",
+ "# Chapter 6\n",
+ "print\"Example 6.18, Page:185 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 18\")\n",
+ "v=0.4;#volume of air in part A and part B in m^3\n",
+ "p1=10*10**5;#initial pressure of steam in pa\n",
+ "p2=15*10**5;#final pressure of steam in pa\n",
+ "print(\"here heat addition to part B shall cause evaporation of water and subsequently the rise in pressure.\")\n",
+ "print(\"final,part B has dry steam at 15 bar.In order to have equilibrium the part A shall also have pressure of 15 bar.thus heat added\")\n",
+ "Q=v*(p2-p1)/1000\n",
+ "print(\"Q in KJ=\"),round(Q,2)\n",
+ "print(\"final enthalpy of dry steam at 15 bar,h2=hg_15bar\")\n",
+ "print(\"h2=2792.2 KJ/kg from steam table\")\n",
+ "h2=2792.2;\n",
+ "print(\"let initial dryness fraction be x1,initial enthalpy,\")\n",
+ "print(\"h1=hf_10bar+x1*hfg_10bar.........eq1\")\n",
+ "print(\"here at 10 bar,hf_10bar=762.83 KJ/kg,hfg_10bar=2015.3 KJ/kg from steam table\")\n",
+ "hf_10bar=762.83;\n",
+ "hfg_10bar=2015.3;\n",
+ "print(\"also heat balance yields,\")\n",
+ "print(\"h1+Q=h2\")\n",
+ "print(\"so h1=h2-Q in KJ/kg\")\n",
+ "h1=h2-Q\n",
+ "x1=(h1-hf_10bar)/hfg_10bar\n",
+ "print(\"so by eq 1=>x1=\"),round(x1,2)\n",
+ "print(\"heat added(Q)in KJ=\"),round(Q,2)\n",
+ "print(\"and initial quality(x1)\"),round(x1,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 6.19;pg no: 186"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 86,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 6.19, Page:186 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 19\n",
+ "from steam table,vg=1.2455 m^3/kg,hf=457.99 KJ/kg,hfg=2232.3 KJ/kg\n",
+ "specific volume of wet steam in cylinder,v1 in m^3/kg= 0.75\n",
+ "dryness fraction of initial steam(x1)= 0.6\n",
+ "initial enthalpy of wet steam,h1 in KJ/kg= 1801.83\n",
+ "at 400 degree celcius specific volume of steam,v2 in m^3/kg= 1.55\n",
+ "for specific volume of 1.55 m^3/kg at 400 degree celcius the pressure can be seen from the steam table.From superheated steam tables the specific volume of 1.55 m^3/kg lies between the pressure of 0.10 Mpa (specific volume 3.103 m^3/kg at400 degree celcius)and 0.20 Mpa(specific volume 1.5493 m^3/kg at 400 degree celcius)\n",
+ "actual pressure can be obtained by interpolation\n",
+ "p2=0.20 MPa(approx.)\n",
+ "saturation temperature at 0.20 Mpa(t)=120.23 degree celcius from steam table\n",
+ "finally the degree of superheat(T_sup)in K\n",
+ "T_sup=T-t\n",
+ "final enthalpy of steam at 0.20 Mpa and 400 degree celcius,h2=3276.6 KJ/kg from steam table\n",
+ "heat added during process(deltaQ)in KJ\n",
+ "deltaQ=m*(h2-h1)\n",
+ "internal energy of initial wet steam,u1=uf+x1*ufg in KJ/kg\n",
+ "here at 1.4 bar,from steam table,uf=457.84 KJ/kg,ufg=2059.34 KJ/kg\n",
+ "internal energy of final state,u2=u at 0.2 Mpa,400 degree celcius\n",
+ "u2=2966.7 KJ/kg\n",
+ "change in internal energy(deltaU)in KJ\n",
+ "deltaU= 3807.41\n",
+ "form first law of thermodynamics,work done(deltaW)in KJ\n",
+ "deltaW=deltaQ-deltaU 616.88\n",
+ "so heat transfer(deltaQ)in KJ 4424.3\n",
+ "and work transfer(deltaW)in KJ 616.88\n",
+ "NOTE=>In book value of u1=1707.86 KJ/kg is calculated wrong taking x1=0.607,hence correct value of u1 using x1=0.602 is 1697.5627 KJ/kg\n",
+ "and corresponding values of heat transfer= 4424.2962 KJ and work transfer=616.88424 KJ.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of heat and work transfer \n",
+ "#intiation of all variables\n",
+ "# Chapter 6\n",
+ "print\"Example 6.19, Page:186 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 19\")\n",
+ "m=3;#mass of wet steam in kg\n",
+ "p=1.4;#pressure of wet steam in bar\n",
+ "V1=2.25;#initial volume in m^3\n",
+ "V2=4.65;#final volume in m^3\n",
+ "T=400;#temperature of steam in degreee celcius\n",
+ "print(\"from steam table,vg=1.2455 m^3/kg,hf=457.99 KJ/kg,hfg=2232.3 KJ/kg\")\n",
+ "vg=1.2455;\n",
+ "hf=457.99;\n",
+ "hfg=2232.3;\n",
+ "v1=V1/m\n",
+ "print(\"specific volume of wet steam in cylinder,v1 in m^3/kg=\"),round(v1,2)\n",
+ "x1=v1/vg\n",
+ "print(\"dryness fraction of initial steam(x1)=\"),round(x1,2)\n",
+ "x1=0.602;#approx.\n",
+ "h1=hf+x1*hfg\n",
+ "print(\"initial enthalpy of wet steam,h1 in KJ/kg=\"),round(h1,2)\n",
+ "v2=V2/m\n",
+ "print(\"at 400 degree celcius specific volume of steam,v2 in m^3/kg=\"),round(v2,2)\n",
+ "print(\"for specific volume of 1.55 m^3/kg at 400 degree celcius the pressure can be seen from the steam table.From superheated steam tables the specific volume of 1.55 m^3/kg lies between the pressure of 0.10 Mpa (specific volume 3.103 m^3/kg at400 degree celcius)and 0.20 Mpa(specific volume 1.5493 m^3/kg at 400 degree celcius)\")\n",
+ "print(\"actual pressure can be obtained by interpolation\")\n",
+ "p2=.1+((0.20-0.10)/(1.5493-3.103))*(1.55-3.103)\n",
+ "print(\"p2=0.20 MPa(approx.)\")\n",
+ "p2=0.20;\n",
+ "print(\"saturation temperature at 0.20 Mpa(t)=120.23 degree celcius from steam table\")\n",
+ "t=120.23;\n",
+ "print(\"finally the degree of superheat(T_sup)in K\")\n",
+ "print(\"T_sup=T-t\")\n",
+ "T_sup=T-t\n",
+ "print(\"final enthalpy of steam at 0.20 Mpa and 400 degree celcius,h2=3276.6 KJ/kg from steam table\")\n",
+ "h2=3276.6;\n",
+ "print(\"heat added during process(deltaQ)in KJ\")\n",
+ "print(\"deltaQ=m*(h2-h1)\")\n",
+ "deltaQ=m*(h2-h1)\n",
+ "print(\"internal energy of initial wet steam,u1=uf+x1*ufg in KJ/kg\")\n",
+ "print(\"here at 1.4 bar,from steam table,uf=457.84 KJ/kg,ufg=2059.34 KJ/kg\")\n",
+ "uf=457.84;\n",
+ "ufg=2059.34;\n",
+ "u1=uf+x1*ufg\n",
+ "print(\"internal energy of final state,u2=u at 0.2 Mpa,400 degree celcius\")\n",
+ "print(\"u2=2966.7 KJ/kg\")\n",
+ "u2=2966.7;\n",
+ "print(\"change in internal energy(deltaU)in KJ\")\n",
+ "deltaU=m*(u2-u1)\n",
+ "print(\"deltaU=\"),round(deltaU,2)\n",
+ "print(\"form first law of thermodynamics,work done(deltaW)in KJ\")\n",
+ "deltaW=deltaQ-deltaU\n",
+ "print(\"deltaW=deltaQ-deltaU\"),round(deltaW,2)\n",
+ "print(\"so heat transfer(deltaQ)in KJ\"),round(deltaQ,2)\n",
+ "print(\"and work transfer(deltaW)in KJ\"),round(deltaW,2)\n",
+ "print(\"NOTE=>In book value of u1=1707.86 KJ/kg is calculated wrong taking x1=0.607,hence correct value of u1 using x1=0.602 is 1697.5627 KJ/kg\")\n",
+ "print(\"and corresponding values of heat transfer= 4424.2962 KJ and work transfer=616.88424 KJ.\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 6.20;pg no: 187"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 87,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 6.20, Page:187 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 6 Example 20\n",
+ "here throttling process is occuring therefore enthalpy before and after expansion remains same.Let initial and final states be given by 1 and 2.Initial enthalpy,from steam table.\n",
+ "at 500 degree celcius,h1_10bar_500oc=3478.5 KJ/kg,s1_10bar_500oc=7.7622 KJ/kg K,v1_10bar_500oc=0.3541 m^3/kg\n",
+ "finally pressure becomes 1 bar so finally enthalpy(h2) at this pressure(of 1 bar)is also 3478.5 KJ/kg which lies between superheat temperature of 400 degree celcius and 500 degree celcius at 1 bar.Let temperature be T2,\n",
+ "h_1bar_400oc=3278.2 KJ/kg,h_1bar_500oc=3488.1 KJ/kg from steam table\n",
+ "h2=h_1bar_400oc+(h_1bar_500oc-h_1bar_400oc)*(T2-400)/(500-400)\n",
+ "so final temperature(T2)in K\n",
+ "T2= 495.43\n",
+ "entropy for final state(s2)in KJ/kg K\n",
+ "s2= 8.82\n",
+ "here from steam table,s_1bar_400oc=8.5435 KJ/kg K,s_1bar_500oc=8.8342 KJ/kg K\n",
+ "so change in entropy(deltaS)in KJ/kg K\n",
+ "deltaS= 1.06\n",
+ "final specific volume,v2=v_1bar_400oc+((v_1bar_500oc-v_1bar_400oc)*(95.43)/(500-400)) in m^3/kg\n",
+ "here from steam table,v_1bar_500oc=3.565 m^3/kg,v_1bar_400oc=3.103 m^3/kg\n",
+ "percentage of vessel volume initially occupied by steam(V)= 9.99\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of percentage of vessel volume initially occupied by steam\n",
+ "#intiation of all variables\n",
+ "# Chapter 6\n",
+ "print\"Example 6.20, Page:187 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 6 Example 20\")\n",
+ "print(\"here throttling process is occuring therefore enthalpy before and after expansion remains same.Let initial and final states be given by 1 and 2.Initial enthalpy,from steam table.\")\n",
+ "print(\"at 500 degree celcius,h1_10bar_500oc=3478.5 KJ/kg,s1_10bar_500oc=7.7622 KJ/kg K,v1_10bar_500oc=0.3541 m^3/kg\")\n",
+ "h1_10bar_500oc=3478.5;\n",
+ "s1_10bar_500oc=7.7622;\n",
+ "v1_10bar_500oc=0.3541;\n",
+ "print(\"finally pressure becomes 1 bar so finally enthalpy(h2) at this pressure(of 1 bar)is also 3478.5 KJ/kg which lies between superheat temperature of 400 degree celcius and 500 degree celcius at 1 bar.Let temperature be T2,\")\n",
+ "h2=h1_10bar_500oc;\n",
+ "print(\"h_1bar_400oc=3278.2 KJ/kg,h_1bar_500oc=3488.1 KJ/kg from steam table\")\n",
+ "h_1bar_400oc=3278.2;\n",
+ "h_1bar_500oc=3488.1;\n",
+ "print(\"h2=h_1bar_400oc+(h_1bar_500oc-h_1bar_400oc)*(T2-400)/(500-400)\")\n",
+ "print(\"so final temperature(T2)in K\")\n",
+ "T2=400+((h2-h_1bar_400oc)*(500-400)/(h_1bar_500oc-h_1bar_400oc))\n",
+ "print(\"T2=\"),round(T2,2)\n",
+ "print(\"entropy for final state(s2)in KJ/kg K\")\n",
+ "s_1bar_400oc=8.5435;\n",
+ "s_1bar_500oc=8.8342;\n",
+ "s2=s_1bar_400oc+((s_1bar_500oc-s_1bar_400oc)*(495.43-400)/(500-400))\n",
+ "print(\"s2=\"),round(s2,2)\n",
+ "print(\"here from steam table,s_1bar_400oc=8.5435 KJ/kg K,s_1bar_500oc=8.8342 KJ/kg K\")\n",
+ "print(\"so change in entropy(deltaS)in KJ/kg K\")\n",
+ "deltaS=s2-s1_10bar_500oc\n",
+ "print(\"deltaS=\"),round(deltaS,2)\n",
+ "print(\"final specific volume,v2=v_1bar_400oc+((v_1bar_500oc-v_1bar_400oc)*(95.43)/(500-400)) in m^3/kg\")\n",
+ "print(\"here from steam table,v_1bar_500oc=3.565 m^3/kg,v_1bar_400oc=3.103 m^3/kg\")\n",
+ "v_1bar_500oc=3.565;\n",
+ "v_1bar_400oc=3.103;\n",
+ "v2=v_1bar_400oc+((v_1bar_500oc-v_1bar_400oc)*(95.43)/(500-400))\n",
+ "V=v1_10bar_500oc*100/v2\n",
+ "print(\"percentage of vessel volume initially occupied by steam(V)=\"),round(V,2)\n",
+ "\n"
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter7_2.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter7_2.ipynb
new file mode 100644
index 00000000..8171c9b6
--- /dev/null
+++ b/_Engineering_Thermodynamics_by__O._Singh/chapter7_2.ipynb
@@ -0,0 +1,1466 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 7:Availability and General Thermodynamic Relation"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 7.1;page no: 218"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 7.1, Page:218 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 1\n",
+ "let us neglect the potential energy change during the flow.\n",
+ "applying S.F.E.E,neglecting inlet velocity and change in potential energy,\n",
+ "W_max=(h1-To*s1)-(h2+C2^2/2-To*s2)\n",
+ "W_max=(h1-h2)-To*(s1-s2)-C2^2/2\n",
+ "from steam tables,\n",
+ "h1=h_1.6Mpa_300=3034.8 KJ/kg,s1=s_1.6Mpa_300=6.8844 KJ/kg,h2=h_0.1Mpa_150=2776.4 KJ/kg,s2=s_150Mpa_150=7.6134 KJ/kg\n",
+ "given To=288 K\n",
+ "so W_max in KJ/kg= 457.1\n",
+ "maximum possible work(W_max) in KW= 1142.76\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of maximum possible work\n",
+ "#intiation of all variables\n",
+ "# Chapter 7\n",
+ "print\"Example 7.1, Page:218 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 1\")\n",
+ "C2=150;#leave velocity of steam in m/s\n",
+ "m=2.5;#steam mass flow rate in kg/s\n",
+ "print(\"let us neglect the potential energy change during the flow.\")\n",
+ "print(\"applying S.F.E.E,neglecting inlet velocity and change in potential energy,\")\n",
+ "print(\"W_max=(h1-To*s1)-(h2+C2^2/2-To*s2)\")\n",
+ "print(\"W_max=(h1-h2)-To*(s1-s2)-C2^2/2\")\n",
+ "print(\"from steam tables,\")\n",
+ "print(\"h1=h_1.6Mpa_300=3034.8 KJ/kg,s1=s_1.6Mpa_300=6.8844 KJ/kg,h2=h_0.1Mpa_150=2776.4 KJ/kg,s2=s_150Mpa_150=7.6134 KJ/kg\")\n",
+ "h1=3034.8;\n",
+ "s1=6.8844;\n",
+ "h2=2776.4;\n",
+ "s2=7.6134;\n",
+ "print(\"given To=288 K\")\n",
+ "To=288;\n",
+ "W_max=(h1-h2)-To*(s1-s2)-(C2**2/2*10**-3)\n",
+ "print(\"so W_max in KJ/kg=\"),round(W_max,2)\n",
+ "W_max=m*W_max\n",
+ "print(\"maximum possible work(W_max) in KW=\"),round(W_max,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 7.2;page no: 219"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 7.2, Page:219 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 2\n",
+ "In these tanks the air stored is at same temperature of 50 degree celcius.Therefore,for air behaving as perfect gas the internal energy of air in tanks shall be same as it depends upon temperature alone.But the availability shall be different.\n",
+ "BOTH THE TANKS HAVE SAME INTERNAL ENERGY\n",
+ "availability of air in tank,A\n",
+ "A=(E-Uo)+Po*(V-Vo)-To*(S-So)\n",
+ "=m*{(e-uo)+Po(v-vo)-To(s-so)}\n",
+ "m*{Cv*(T-To)+Po*(R*T/P-R*To/Po)-To(Cp*log(T/To)-R*log(P/Po))}\n",
+ "so A=m*{Cv*(T-To)+R*(Po*T/P-To)-To*Cp*log(T/To)+To*R*log(P/Po)}\n",
+ "for tank A,P in pa,so availability_A in KJ= 1.98\n",
+ "for tank B,P=3*10^5 pa,so availability_B in KJ= 30.98\n",
+ "so availability of air in tank B is more than that of tank A\n",
+ "availability of air in tank A=1.98 KJ\n",
+ "availability of air in tank B=30.98 KJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of availability of air in tank A,B\n",
+ "#intiation of all variables\n",
+ "# Chapter 7\n",
+ "import math\n",
+ "print\"Example 7.2, Page:219 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 2\")\n",
+ "m=1.;#mass of air in kg\n",
+ "Po=1.*10**5;#atmospheric pressure in pa\n",
+ "To=(15.+273.);#temperature of atmosphere in K\n",
+ "Cv=0.717;#specific heat at constant volume in KJ/kg K\n",
+ "R=0.287;#gas constant in KJ/kg K\n",
+ "Cp=1.004;#specific heat at constant pressure in KJ/kg K\n",
+ "T=(50.+273.);#temperature of tanks A and B in K\n",
+ "print(\"In these tanks the air stored is at same temperature of 50 degree celcius.Therefore,for air behaving as perfect gas the internal energy of air in tanks shall be same as it depends upon temperature alone.But the availability shall be different.\")\n",
+ "print(\"BOTH THE TANKS HAVE SAME INTERNAL ENERGY\")\n",
+ "print(\"availability of air in tank,A\")\n",
+ "print(\"A=(E-Uo)+Po*(V-Vo)-To*(S-So)\")\n",
+ "print(\"=m*{(e-uo)+Po(v-vo)-To(s-so)}\")\n",
+ "print(\"m*{Cv*(T-To)+Po*(R*T/P-R*To/Po)-To(Cp*log(T/To)-R*log(P/Po))}\")\n",
+ "print(\"so A=m*{Cv*(T-To)+R*(Po*T/P-To)-To*Cp*log(T/To)+To*R*log(P/Po)}\")\n",
+ "P=1.*10**5;#pressure in tank A in pa\n",
+ "availability_A=m*(Cv*(T-To)+R*(Po*T/P-To)-To*Cp*math.log(T/To)+To*R*math.log(P/Po))\n",
+ "print(\"for tank A,P in pa,so availability_A in KJ=\"),round(availability_A,2)\n",
+ "P=3.*10**5;#pressure in tank B in pa\n",
+ "availability_B=m*(Cv*(T-To)+R*(Po*T/P-To)-To*Cp*math.log(T/To)+To*R*math.log(P/Po))\n",
+ "print(\"for tank B,P=3*10^5 pa,so availability_B in KJ=\"),round(availability_B,2)\n",
+ "print(\"so availability of air in tank B is more than that of tank A\")\n",
+ "print(\"availability of air in tank A=1.98 KJ\")\n",
+ "print(\"availability of air in tank B=30.98 KJ\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 7.3;page no: 221"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 7.3, Page:221 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 3\n",
+ "inlet conditions,\n",
+ "from steam tables,,h1=3051.2 KJ/kg,s1=7.1229 KJ/kg K\n",
+ "outlet conditions,at 0.05 bar and 0.95 dryness fraction\n",
+ "from steam tables,sf=0.4764 KJ/kg K,s_fg=7.9187 KJ/kg K,x=0.95,hf=137.82 KJ/kg,h_fg=2423.7 KJ/kg\n",
+ "so s2= in KJ/kg K= 8.0\n",
+ "and h2= in KJ/kg= 2440.34\n",
+ "neglecting the change in potential energy and velocity at inlet to turbine,the steady flow energy equation may be written as to give work output.\n",
+ "w in KJ/kg= 598.06\n",
+ "power output in KW= 8970.97\n",
+ "maximum work for given end states,\n",
+ "w_max=(h1-To*s1)-(h2+V2^2*10^-3/2-To*s2) in KJ/kg 850.43\n",
+ "w_max in KW 12755.7\n",
+ "so maximum power output=12755.7 KW\n",
+ "maximum power that could be obtained from exhaust steam shall depend upon availability with exhaust steam and the dead state.stream availability of exhaust steam,\n",
+ "A_exhaust=(h2+V^2/2-To*s2)-(ho-To*so)\n",
+ "=(h2-ho)+V2^2/2-To(s2-so)\n",
+ "approximately the enthalpy of water at dead state of 1 bar,15 degree celcius can be approximated to saturated liquid at 15 degree celcius\n",
+ "from steam tables,at 15 degree celcius,ho=62.99 KJ/kg,so=0.2245 KJ/kg K\n",
+ "maximum work available from exhaust steam,A_exhaust in KJ/kg\n",
+ "A_exhaust=(h2-ho)+V2^2*10^-3/2-To*(s2-so) 151.1\n",
+ "maximum power that could be obtained from exhaust steam in KW= 2266.5\n",
+ "so maximum power from exhaust steam=2266.5 KW\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of maximum power output and that could be obtained from exhaust steam\n",
+ "#intiation of all variables\n",
+ "# Chapter 7\n",
+ "print\"Example 7.3, Page:221 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 3\")\n",
+ "m=15;#steam flow rate in kg/s\n",
+ "V2=160;#exit velocity of steam in m/s\n",
+ "To=(15+273);#pond water temperature in K\n",
+ "print(\"inlet conditions,\")\n",
+ "print(\"from steam tables,,h1=3051.2 KJ/kg,s1=7.1229 KJ/kg K\")\n",
+ "h1=3051.2;\n",
+ "s1=7.1229;\n",
+ "print(\"outlet conditions,at 0.05 bar and 0.95 dryness fraction\")\n",
+ "print(\"from steam tables,sf=0.4764 KJ/kg K,s_fg=7.9187 KJ/kg K,x=0.95,hf=137.82 KJ/kg,h_fg=2423.7 KJ/kg\")\n",
+ "sf=0.4764;\n",
+ "s_fg=7.9187;\n",
+ "x=0.95;\n",
+ "hf=137.82;\n",
+ "h_fg=2423.7;\n",
+ "s2=sf+x*s_fg\n",
+ "print(\"so s2= in KJ/kg K=\"),round(s2,2)\n",
+ "h2=hf+x*h_fg\n",
+ "print(\"and h2= in KJ/kg=\"),round(h2,2)\n",
+ "print(\"neglecting the change in potential energy and velocity at inlet to turbine,the steady flow energy equation may be written as to give work output.\")\n",
+ "w=(h1-h2)-V2**2*10**-3/2\n",
+ "print(\"w in KJ/kg=\"),round(w,2)\n",
+ "print(\"power output in KW=\"),round(m*w,2)\n",
+ "print(\"maximum work for given end states,\")\n",
+ "w_max=(h1-To*s1)-(h2+V2**2*10**-3/2-To*s2)\n",
+ "print(\"w_max=(h1-To*s1)-(h2+V2^2*10^-3/2-To*s2) in KJ/kg\"),round(w_max,2)\n",
+ "w_max=850.38;#approx.\n",
+ "w_max=m*w_max\n",
+ "print(\"w_max in KW\"),round(w_max,2)\n",
+ "print(\"so maximum power output=12755.7 KW\")\n",
+ "print(\"maximum power that could be obtained from exhaust steam shall depend upon availability with exhaust steam and the dead state.stream availability of exhaust steam,\")\n",
+ "print(\"A_exhaust=(h2+V^2/2-To*s2)-(ho-To*so)\")\n",
+ "print(\"=(h2-ho)+V2^2/2-To(s2-so)\")\n",
+ "print(\"approximately the enthalpy of water at dead state of 1 bar,15 degree celcius can be approximated to saturated liquid at 15 degree celcius\")\n",
+ "print(\"from steam tables,at 15 degree celcius,ho=62.99 KJ/kg,so=0.2245 KJ/kg K\")\n",
+ "ho=62.99;\n",
+ "so=0.2245;\n",
+ "print(\"maximum work available from exhaust steam,A_exhaust in KJ/kg\")\n",
+ "A_exhaust=(h2-ho)+V2**2*10**-3/2-To*(s2-so)\n",
+ "A_exhaust=151.1;#approx.\n",
+ "print(\"A_exhaust=(h2-ho)+V2^2*10^-3/2-To*(s2-so)\"),round(A_exhaust,2)\n",
+ "print(\"maximum power that could be obtained from exhaust steam in KW=\"),round(m*A_exhaust,2)\n",
+ "print(\"so maximum power from exhaust steam=2266.5 KW\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 7.4;page no: 222"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 7.4, Page:222 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 4\n",
+ "for dead state of water,\n",
+ "from steam tables,uo=104.86 KJ/kg,vo=1.0029*10^-3 m^3/kg,so=0.3673 KJ/kg K\n",
+ "for initial state of water,\n",
+ "from steam tables,u1=2550 KJ/kg,v1=0.5089 m^3/kg,s1=6.93 KJ/kg K\n",
+ "for final state of water,\n",
+ "from steam tables,u2=83.94 KJ/kg,v2=1.0018*10^-3 m^3/kg,s2=0.2966 KJ/kg K\n",
+ "availability at any state can be given by\n",
+ "A=m*((u-uo)+Po*(v-vo)-To*(s-so)+V^2/2+g*z)\n",
+ "so availability at initial state,A1 in KJ\n",
+ "A1= 2703.28\n",
+ "and availability at final state,A2 in KJ\n",
+ "A2= 1.09\n",
+ "change in availability,A2-A1 in KJ= -2702.19\n",
+ "hence availability decreases by 2702.188 KJ\n",
+ "NOTE=>In this question,due to large calculations,answers are approximately correct.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of availability at initial,final state and also change\n",
+ "#intiation of all variables\n",
+ "# Chapter 7\n",
+ "print\"Example 7.4, Page:222 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 4\")\n",
+ "m=5;#mass of steam in kg\n",
+ "z1=10;#initial elevation in m\n",
+ "V1=25;#initial velocity of steam in m/s\n",
+ "z2=2;#final elevation in m\n",
+ "V2=10;#final velocity of steam in m/s\n",
+ "Po=100;#environmental pressure in Kpa\n",
+ "To=(25+273);#environmental temperature in K\n",
+ "g=9.81;#acceleration due to gravity in m/s^2\n",
+ "print(\"for dead state of water,\")\n",
+ "print(\"from steam tables,uo=104.86 KJ/kg,vo=1.0029*10^-3 m^3/kg,so=0.3673 KJ/kg K\")\n",
+ "uo=104.86;\n",
+ "vo=1.0029*10**-3;\n",
+ "so=0.3673;\n",
+ "print(\"for initial state of water,\")\n",
+ "print(\"from steam tables,u1=2550 KJ/kg,v1=0.5089 m^3/kg,s1=6.93 KJ/kg K\")\n",
+ "u1=2550;\n",
+ "v1=0.5089;\n",
+ "s1=6.93;\n",
+ "print(\"for final state of water,\")\n",
+ "print(\"from steam tables,u2=83.94 KJ/kg,v2=1.0018*10^-3 m^3/kg,s2=0.2966 KJ/kg K\")\n",
+ "u2=83.94;\n",
+ "v2=1.0018*10**-3;\n",
+ "s2=0.2966;\n",
+ "print(\"availability at any state can be given by\")\n",
+ "print(\"A=m*((u-uo)+Po*(v-vo)-To*(s-so)+V^2/2+g*z)\")\n",
+ "A1=m*((u1-uo)+Po*(v1-vo)-To*(s1-so)+V1**2*10**-3/2+g*z1*10**-3)\n",
+ "print(\"so availability at initial state,A1 in KJ\")\n",
+ "print(\"A1=\"),round(A1,2)\n",
+ "A2=m*((u2-uo)+Po*(v2-vo)-To*(s2-so)+V2**2*10**-3/2+g*z2*10**-3)\n",
+ "print(\"and availability at final state,A2 in KJ\")\n",
+ "print(\"A2=\"),round(A2,2)\n",
+ "A2-A1\n",
+ "print(\"change in availability,A2-A1 in KJ=\"),round(A2-A1,2)\n",
+ "print(\"hence availability decreases by 2702.188 KJ\")\n",
+ "print(\"NOTE=>In this question,due to large calculations,answers are approximately correct.\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 7.5;page no: 223"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 7.5, Page:223 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 5\n",
+ "In question no. 5 expression I=To*S_gen is derived which cannot be solve using python software.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#intiation of all variables\n",
+ "# Chapter 7\n",
+ "print\"Example 7.5, Page:223 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 5\")\n",
+ "print(\"In question no. 5 expression I=To*S_gen is derived which cannot be solve using python software.\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 7.6;pg no: 223"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 7.6, Page:223 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 6\n",
+ "loss of available energy=irreversibility=To*deltaSc\n",
+ "deltaSc=deltaSs+deltaSe\n",
+ "change in enropy of system(deltaSs)=W/T in KJ/kg K 0.98\n",
+ "change in entropy of surrounding(deltaSe)=-Cp*(T-To)/To in KJ/kg K -2.8\n",
+ "loss of available energy(E) in KJ/kg= -550.49\n",
+ "loss of available energy(E)= -550.49\n",
+ "ratio of lost available exhaust gas energy to engine work=E/W= 0.524\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of available energy and ratio of lost available exhaust gas energy to engine work\n",
+ "#intiation of all variables\n",
+ "# Chapter 7\n",
+ "print\"Example 7.6, Page:223 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 6\")\n",
+ "To=(30.+273.);#temperature of surrounding in K\n",
+ "W=1050.;#work done in engine in KJ/kg\n",
+ "Cp=1.1;#specific heat at constant pressure in KJ/kg K\n",
+ "T=(800.+273.);#temperature of exhaust gas in K\n",
+ "print(\"loss of available energy=irreversibility=To*deltaSc\")\n",
+ "print(\"deltaSc=deltaSs+deltaSe\")\n",
+ "deltaSs=W/T\n",
+ "print(\"change in enropy of system(deltaSs)=W/T in KJ/kg K\"),round(deltaSs,2)\n",
+ "deltaSe=-Cp*(T-To)/To\n",
+ "print(\"change in entropy of surrounding(deltaSe)=-Cp*(T-To)/To in KJ/kg K\"),round(deltaSe,2)\n",
+ "E=To*(deltaSs+deltaSe)\n",
+ "print(\"loss of available energy(E) in KJ/kg=\"),round(E,2)\n",
+ "E=-E\n",
+ "print(\"loss of available energy(E)=\"),round(-E,2)\n",
+ "print(\"ratio of lost available exhaust gas energy to engine work=E/W=\"),round(E/W,3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 7.7;pg no: 224"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 7.7, Page:224 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 7\n",
+ "let us consider velocities and elevations to be given in reference to environment.Availability is given by\n",
+ "A=m*((u-uo)+Po*(v-vo)-To(s-so)+C^2/2+g*z)\n",
+ "dead state of water,from steam tables,uo=104.88 KJ/kg,vo=1.003*10^-3 m^3/kg,so=0.3674 KJ/kg K\n",
+ "for initial state of saturated vapour at 150 degree celcius\n",
+ "from steam tables,u1=2559.5 KJ/kg,v1=0.3928 m^3/kg,s1=6.8379 KJ/kg K\n",
+ "for final state of saturated liquid at 20 degree celcius\n",
+ "from steam tables,u2=83.95 KJ/kg,v2=0.001002 m^3/kg,s2=0.2966 KJ/kg K\n",
+ "substituting in the expression for availability\n",
+ "initial state availability,A1 in KJ\n",
+ "A1= 5650.31\n",
+ "final state availability,A2 in KJ\n",
+ "A2= 2.58\n",
+ "change in availability,deltaA in KJ= -5647.72\n",
+ "so initial availability =5650.28 KJ\n",
+ "final availability=2.58 KJ \n",
+ "change in availability=decrease by 5647.70 KJ \n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of initial,final and change in availability\n",
+ "#intiation of all variables\n",
+ "# Chapter 7\n",
+ "print\"Example 7.7, Page:224 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 7\")\n",
+ "m=10;#mass of water in kg\n",
+ "C1=25;#initial velocity in m/s\n",
+ "C2=10;#final velocity in m/s\n",
+ "Po=0.1*1000;#environmental pressure in Kpa\n",
+ "To=(25+273.15);#environmental temperature in K\n",
+ "g=9.8;#acceleration due to gravity in m/s^2\n",
+ "z1=10;#initial elevation in m\n",
+ "z2=3;#final elevation in m\n",
+ "print(\"let us consider velocities and elevations to be given in reference to environment.Availability is given by\")\n",
+ "print(\"A=m*((u-uo)+Po*(v-vo)-To(s-so)+C^2/2+g*z)\")\n",
+ "print(\"dead state of water,from steam tables,uo=104.88 KJ/kg,vo=1.003*10^-3 m^3/kg,so=0.3674 KJ/kg K\")\n",
+ "uo=104.88;\n",
+ "vo=1.003*10**-3;\n",
+ "so=0.3674;\n",
+ "print(\"for initial state of saturated vapour at 150 degree celcius\")\n",
+ "print(\"from steam tables,u1=2559.5 KJ/kg,v1=0.3928 m^3/kg,s1=6.8379 KJ/kg K\")\n",
+ "u1=2559.5;\n",
+ "v1=0.3928;\n",
+ "s1=6.8379;\n",
+ "print(\"for final state of saturated liquid at 20 degree celcius\")\n",
+ "print(\"from steam tables,u2=83.95 KJ/kg,v2=0.001002 m^3/kg,s2=0.2966 KJ/kg K\")\n",
+ "u2=83.95;\n",
+ "v2=0.001002;\n",
+ "s2=0.2966;\n",
+ "print(\"substituting in the expression for availability\")\n",
+ "A1=m*((u1-uo)+Po*(v1-vo)-To*(s1-so)+C1**2*10**-3/2+g*z1*10**-3)\n",
+ "print(\"initial state availability,A1 in KJ\")\n",
+ "print(\"A1=\"),round(A1,2)\n",
+ "A2=m*((u2-uo)+Po*(v2-vo)-To*(s2-so)+C2**2*10**-3/2+g*z2*10**-3)\n",
+ "print(\"final state availability,A2 in KJ\")\n",
+ "print(\"A2=\"),round(A2,2)\n",
+ "deltaA=A2-A1\n",
+ "print(\"change in availability,deltaA in KJ=\"),round(deltaA,2)\n",
+ "print(\"so initial availability =5650.28 KJ\")\n",
+ "print(\"final availability=2.58 KJ \")\n",
+ "print(\"change in availability=decrease by 5647.70 KJ \")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 7.8;pg no: 225"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 7.8, Page:225 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 8\n",
+ "let inlet and exit states of turbine be denoted as 1 and 2\n",
+ "at inlet to turbine,\n",
+ "from steam tables,h1=3433.8 KJ/kg,s1=6.9759 KJ/kg K\n",
+ "at exit from turbine,\n",
+ "from steam tables,h2=2748 KJ/kg,s2=7.228 KJ/kg K\n",
+ "at dead state,\n",
+ "from steam tables,ho=104.96 KJ/kg,so=0.3673 KJ/kg K\n",
+ "availability of steam at inlet,A1 in KJ= 6792.43\n",
+ "so availability of steam at inlet=6792.43 KJ\n",
+ "applying first law of thermodynamics,\n",
+ "Q+m*h1=m*h2+W\n",
+ "so W in KJ/s= 2829.0\n",
+ "so turbine output=2829 KW\n",
+ "maximum possible turbine output will be available when irreversibility is zero.\n",
+ "W_rev=W_max=A1-A2\n",
+ "W_max in KJ/s= 3804.82\n",
+ "so maximum output=3804.81 KW\n",
+ "irreversibility can be estimated by the difference between the maximum output and turbine output.\n",
+ "I= in KW= 975.82\n",
+ "so irreversibility=975.81807 KW\n",
+ "NOTE=>In book,W_max is calculated wrong,so irreversibility also comes wrong,which are corrected above.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of availability of steam at inlet,turbine output,maximum possible turbine output,irreversibility\n",
+ "#intiation of all variables\n",
+ "# Chapter 7\n",
+ "print\"Example 7.8, Page:225 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 8\")\n",
+ "m=5.;#steam flow rate in kg/s\n",
+ "p1=5.*1000.;#initial pressure of steam in Kpa\n",
+ "T1=(500.+273.15);#initial temperature of steam in K \n",
+ "p2=0.2*1000.;#final pressure of steam in Kpa\n",
+ "T1=(140.+273.15);#final temperature of steam in K\n",
+ "po=101.3;#pressure of steam at dead state in Kpa\n",
+ "To=(25.+273.15);#temperature of steam at dead state in K \n",
+ "Q=600.;#heat loss through turbine in KJ/s\n",
+ "print(\"let inlet and exit states of turbine be denoted as 1 and 2\")\n",
+ "print(\"at inlet to turbine,\")\n",
+ "print(\"from steam tables,h1=3433.8 KJ/kg,s1=6.9759 KJ/kg K\")\n",
+ "h1=3433.8;\n",
+ "s1=6.9759;\n",
+ "print(\"at exit from turbine,\")\n",
+ "print(\"from steam tables,h2=2748 KJ/kg,s2=7.228 KJ/kg K\")\n",
+ "h2=2748;\n",
+ "s2=7.228;\n",
+ "print(\"at dead state,\")\n",
+ "print(\"from steam tables,ho=104.96 KJ/kg,so=0.3673 KJ/kg K\")\n",
+ "ho=104.96;\n",
+ "so=0.3673;\n",
+ "A1=m*((h1-ho)-To*(s1-so))\n",
+ "print(\"availability of steam at inlet,A1 in KJ=\"),round(A1,2)\n",
+ "print(\"so availability of steam at inlet=6792.43 KJ\")\n",
+ "print(\"applying first law of thermodynamics,\")\n",
+ "print(\"Q+m*h1=m*h2+W\")\n",
+ "W=m*(h1-h2)-Q\n",
+ "print(\"so W in KJ/s=\"),round(W,2)\n",
+ "print(\"so turbine output=2829 KW\")\n",
+ "print(\"maximum possible turbine output will be available when irreversibility is zero.\")\n",
+ "print(\"W_rev=W_max=A1-A2\")\n",
+ "W_max=m*((h1-h2)-To*(s1-s2))\n",
+ "print(\"W_max in KJ/s=\"),round(W_max,2)\n",
+ "print(\"so maximum output=3804.81 KW\")\n",
+ "print(\"irreversibility can be estimated by the difference between the maximum output and turbine output.\")\n",
+ "I=W_max-W\n",
+ "print(\"I= in KW=\"),round(I,2)\n",
+ "print(\"so irreversibility=975.81807 KW\")\n",
+ "print(\"NOTE=>In book,W_max is calculated wrong,so irreversibility also comes wrong,which are corrected above.\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 7.9;pg no: 226"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 7.9, Page:226 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 9\n",
+ "In question no.9 comparision between sublimation and vaporisation line is made which cannot be solve using python software.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#intiation of all variables\n",
+ "# Chapter 7\n",
+ "print\"Example 7.9, Page:226 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 9\")\n",
+ "print(\"In question no.9 comparision between sublimation and vaporisation line is made which cannot be solve using python software.\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 7.10;pg no: 227"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 7.10, Page:227 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 10\n",
+ "In question no. 10 expression for change in internal energy of gas is derive which cannot be solve using python software.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#intiation of all variables\n",
+ "# Chapter 7\n",
+ "print\"Example 7.10, Page:227 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 10\")\n",
+ "print(\"In question no. 10 expression for change in internal energy of gas is derive which cannot be solve using python software.\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 7.11;pg no: 227"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 7.11, Page:227 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 11\n",
+ "availability for heat reservoir(A_HR) in KJ/kg K 167.66\n",
+ "now availability for system(A_system) in KJ/kg K 194.44\n",
+ "net loss of available energy(A) in KJ/kg K= -26.78\n",
+ "so loss of available energy=26.77 KJ/kg K\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of loss of available energy\n",
+ "#intiation of all variables\n",
+ "# Chapter 7\n",
+ "print\"Example 7.11, Page:227 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 11\")\n",
+ "To=280.;#surrounding temperature in K\n",
+ "Q=500.;#heat removed in KJ\n",
+ "T1=835.;#temperature of reservoir in K\n",
+ "T2=720.;#temperature of system in K\n",
+ "A_HR=To*Q/T1\n",
+ "print(\"availability for heat reservoir(A_HR) in KJ/kg K\"),round(A_HR,2)\n",
+ "A_system=To*Q/T2\n",
+ "print(\"now availability for system(A_system) in KJ/kg K\"),round(A_system,2)\n",
+ "A=A_HR-A_system \n",
+ "print(\"net loss of available energy(A) in KJ/kg K=\"),round(A,2)\n",
+ "print(\"so loss of available energy=26.77 KJ/kg K\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 7.12;pg no: 228"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 7.12, Page:228 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 12\n",
+ "here dead state is given as 300 K and maximum possible work for given change of state of steam can be estimated by the difference of flow availability as given under:\n",
+ "W_max=W1-W2 in KJ/kg 1647.0\n",
+ "actual work from turbine,W_actual=h1-h2 in KJ/kg 1557.0\n",
+ "so actual work=1557 KJ/kg\n",
+ "maximum possible work=1647 KJ/kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of actual,maximum possible work\n",
+ "#intiation of all variables\n",
+ "# Chapter 7\n",
+ "print\"Example 7.12, Page:228 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 12\")\n",
+ "h1=4142;#enthalpy at entrance in KJ/kg\n",
+ "h2=2585;#enthalpy at exit in KJ/kg\n",
+ "W1=1787;#availability of steam at entrance in KJ/kg\n",
+ "W2=140;#availability of steam at exit in KJ/kg\n",
+ "print(\"here dead state is given as 300 K and maximum possible work for given change of state of steam can be estimated by the difference of flow availability as given under:\")\n",
+ "W_max=W1-W2\n",
+ "print(\"W_max=W1-W2 in KJ/kg\"),round(W_max,2)\n",
+ "W_actual=h1-h2\n",
+ "print(\"actual work from turbine,W_actual=h1-h2 in KJ/kg\"),round(W_actual,2)\n",
+ "print(\"so actual work=1557 KJ/kg\")\n",
+ "print(\"maximum possible work=1647 KJ/kg\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 7.13;pg no: 228"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 7.13, Page:228 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 13\n",
+ "reversible engine efficiency,n_rev=1-(T_min/T_max) 0.621\n",
+ "second law efficiency=n/n_rev 0.4026\n",
+ "in % 40.26\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of second law efficiency\n",
+ "#intiation of all variables\n",
+ "# Chapter 7\n",
+ "print\"Example 7.13, Page:228 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 13\")\n",
+ "T_min=(20.+273.);#minimum temperature reservoir temperature in K\n",
+ "T_max=(500.+273.);#maximum temperature reservoir temperature in K\n",
+ "n=0.25;#efficiency of heat engine\n",
+ "n_rev=1-(T_min/T_max)\n",
+ "print(\"reversible engine efficiency,n_rev=1-(T_min/T_max)\"),round(n_rev,4)\n",
+ "n/n_rev\n",
+ "print(\"second law efficiency=n/n_rev\"),round(n/n_rev,4)\n",
+ "print(\"in %\"),round(n*100/n_rev,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 7.14;pg no: 228"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 7.14, Page:228 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 14\n",
+ "expansion occurs in adiabatic conditions.\n",
+ "temperature after expansion can be obtained by considering adiabatic expansion\n",
+ "T2/T1=(V1/V2)^(y-1)\n",
+ "so T2= in K= 489.12\n",
+ "mass of air,m in kg= 20.91\n",
+ "change in entropy of control system,deltaSs=(S2-S1) in KJ/K= -0.0\n",
+ "here,there is no change in entropy of environment,deltaSe=0\n",
+ "total entropy change of combined system=deltaSc in KJ/K= -0.0\n",
+ "loss of available energy(E)=irreversibility in KJ= -0.603\n",
+ "so loss of available energy,E=0.603 KJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of loss of available energy\n",
+ "#intiation of all variables\n",
+ "# Chapter 7\n",
+ "import math\n",
+ "print\"Example 7.14, Page:228 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 14\")\n",
+ "V_A=6.;#volume of compartment A in m^3\n",
+ "V_B=4.;#volume of compartment B in m^3\n",
+ "To=300.;#temperature of atmosphere in K\n",
+ "Po=1.*10**5;#atmospheric pressure in pa\n",
+ "P1=6.*10**5;#initial pressure in pa\n",
+ "T1=600.;#initial temperature in K\n",
+ "V1=V_A;#initial volume in m^3\n",
+ "V2=(V_A+V_B);#final volume in m^3\n",
+ "y=1.4;#expansion constant \n",
+ "R=287.;#gas constant in J/kg K\n",
+ "Cv=0.718;#specific heat at constant volume in KJ/kg K\n",
+ "print(\"expansion occurs in adiabatic conditions.\")\n",
+ "print(\"temperature after expansion can be obtained by considering adiabatic expansion\")\n",
+ "T2=T1*(V1/V2)**(y-1)\n",
+ "print(\"T2/T1=(V1/V2)^(y-1)\")\n",
+ "print(\"so T2= in K=\"),round(T2,2)\n",
+ "T2=489.12;#approx.\n",
+ "m=(P1*V1)/(R*T1)\n",
+ "print(\"mass of air,m in kg=\"),round(m,2)\n",
+ "m=20.91;#approx.\n",
+ "deltaSs=m*Cv*math.log(T2/T1)+m*R*10**-3*math.log(V2/V1)\n",
+ "print(\"change in entropy of control system,deltaSs=(S2-S1) in KJ/K=\"),round(deltaSs,2)\n",
+ "print(\"here,there is no change in entropy of environment,deltaSe=0\")\n",
+ "deltaSe=0;\n",
+ "deltaSc=deltaSs+deltaSe\n",
+ "print(\"total entropy change of combined system=deltaSc in KJ/K=\"),round(deltaSc,2)\n",
+ "E=To*deltaSc\n",
+ "print(\"loss of available energy(E)=irreversibility in KJ=\"),round(E,3)\n",
+ "print(\"so loss of available energy,E=0.603 KJ\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 7.15;pg no: 229"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 7.15, Page:229 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 15\n",
+ "In question no. 15 prove for ideal gas satisfies the cyclic relation is done which cannot be solve using python software.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of maximum possible work\n",
+ "#intiation of all variables\n",
+ "# Chapter 7\n",
+ "print\"Example 7.15, Page:229 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 15\")\n",
+ "print(\"In question no. 15 prove for ideal gas satisfies the cyclic relation is done which cannot be solve using python software.\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 7.16;pg no: 230"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 7.16, Page:230 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 16\n",
+ "availability or reversible work,W_rev=n_rev*Q1 in KJ/min 229.53\n",
+ "rate of irreversibility,I=W_rev-W_useful in KJ/sec 99.53\n",
+ "second law efficiency=W_useful/W_rev 0.57\n",
+ "in percentage 56.64\n",
+ "so availability=1.38*10^4 KJ/min\n",
+ "and rate of irreversibility=100 KW,second law efficiency=56.63 %\n",
+ "NOTE=>In this question,wrong values are put in expression for W_rev in book,however answer is calculated correctly.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of availability,rate of irreversibility and second law efficiency\n",
+ "#intiation of all variables\n",
+ "# Chapter 7\n",
+ "print\"Example 7.16, Page:230 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 16\")\n",
+ "To=(17.+273.);#temperature of surrounding in K\n",
+ "T1=(700.+273.);#temperature of high temperature reservoir in K\n",
+ "T2=(30.+273.);#temperature of low temperature reservoir in K\n",
+ "Q1=2.*10**4;#rate of heat receive in KJ/min\n",
+ "W_useful=0.13*10**3;#output of engine in KW\n",
+ "n_rev=(1-T2/T1);\n",
+ "W_rev=n_rev*Q1\n",
+ "W_rev=W_rev/60.;#W_rev in KJ/s\n",
+ "print(\"availability or reversible work,W_rev=n_rev*Q1 in KJ/min\"),round(W_rev,2)\n",
+ "I=W_rev-W_useful\n",
+ "print(\"rate of irreversibility,I=W_rev-W_useful in KJ/sec\"),round(I,2)\n",
+ "W_useful/W_rev\n",
+ "print(\"second law efficiency=W_useful/W_rev\"),round(W_useful/W_rev,2)\n",
+ "W_useful*100/W_rev\n",
+ "print(\"in percentage\"),round(W_useful*100/W_rev,2)\n",
+ "print(\"so availability=1.38*10^4 KJ/min\")\n",
+ "print(\"and rate of irreversibility=100 KW,second law efficiency=56.63 %\")\n",
+ "print(\"NOTE=>In this question,wrong values are put in expression for W_rev in book,however answer is calculated correctly.\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 7.17;pg no: 230"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 7.17, Page:230 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 17\n",
+ "loss of available energy=irreversibility=To*deltaSc\n",
+ "deltaSc=deltaSs+deltaSe\n",
+ "change in entropy of system=deltaSs\n",
+ "change in entropy of environment/surroundings=deltaSe\n",
+ "here heat addition process causing rise in pressure from 1.5 bar to 2.5 bar occurs isochorically.let initial and final states be given by subscript 1 and 2\n",
+ "P1/T1=P2/T2\n",
+ "so T2 in K= 555.0\n",
+ "heat addition to air in tank\n",
+ "Q in KJ/kg= 223.11\n",
+ "deltaSs in KJ/kg K= 0.67\n",
+ "deltaSe in KJ/kg K= -0.33\n",
+ "and deltaSc in KJ/kg K= 0.34\n",
+ "so loss of available energy(E)in KJ/kg= 101.55\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of loss of available energy\n",
+ "#intiation of all variables\n",
+ "# Chapter 7\n",
+ "import math\n",
+ "print\"Example 7.17, Page:230 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 17\")\n",
+ "To=(27+273);#temperature of surrounding in K\n",
+ "T1=(60+273);#initial temperature of air in K\n",
+ "P1=1.5*10**5;#initial pressure of air in pa\n",
+ "P2=2.5*10**5;#final pressure of air in pa\n",
+ "T_reservoir=(400+273);#temperature of reservoir in K\n",
+ "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n",
+ "print(\"loss of available energy=irreversibility=To*deltaSc\")\n",
+ "print(\"deltaSc=deltaSs+deltaSe\")\n",
+ "print(\"change in entropy of system=deltaSs\")\n",
+ "print(\"change in entropy of environment/surroundings=deltaSe\")\n",
+ "print(\"here heat addition process causing rise in pressure from 1.5 bar to 2.5 bar occurs isochorically.let initial and final states be given by subscript 1 and 2\")\n",
+ "print(\"P1/T1=P2/T2\")\n",
+ "T2=P2*T1/P1\n",
+ "print(\"so T2 in K=\"),round(T2,2)\n",
+ "print(\"heat addition to air in tank\")\n",
+ "deltaT=T2-T1;\n",
+ "Q=Cp*deltaT\n",
+ "print(\"Q in KJ/kg=\"),round(Q,2)\n",
+ "deltaSs=Q/T1\n",
+ "print(\"deltaSs in KJ/kg K=\"),round(deltaSs,2)\n",
+ "deltaSe=-Q/T_reservoir\n",
+ "print(\"deltaSe in KJ/kg K=\"),round(deltaSe,2)\n",
+ "deltaSc=deltaSs+deltaSe\n",
+ "print(\"and deltaSc in KJ/kg K=\"),round(deltaSc,2)\n",
+ "E=To*deltaSc\n",
+ "print(\"so loss of available energy(E)in KJ/kg=\"),round(E,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 7.18;pg no: 231"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 7.18, Page:231 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 18\n",
+ "In question no. 18,relation for T*ds using maxwell relation is derived which cannot be solve using python software.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#intiation of all variables\n",
+ "# Chapter 7\n",
+ "print\"Example 7.18, Page:231 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 18\")\n",
+ "print(\"In question no. 18,relation for T*ds using maxwell relation is derived which cannot be solve using python software.\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 7.19;pg no: 232"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 7.19, Page:232 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 19\n",
+ "clapeyron equation says,h_fg=T*v_fg*(dp/dT)_sat\n",
+ "from steam tables,vg=0.12736 m^3/kg,vf=0.001157 m^3/kg\n",
+ "v_fg in m^3/kg= 0.0\n",
+ "let us approximate,\n",
+ "(dp/dT)_sat_200oc=(deltaP/deltaT)_200oc=(P_205oc-P_195oc)/(205-195) in Mpa/oc\n",
+ "here from steam tables,P_205oc=1.7230 Mpa,P_195oc=1.3978 Mpa\n",
+ "substituting in clapeyron equation,\n",
+ "h_fg in KJ/kg 1941.25\n",
+ "so calculated enthalpy of vaporisation=1941.25 KJ/kg\n",
+ "and enthalpy of vaporisation from steam table=1940.7 KJ/kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of enthalpy of vaporisation\n",
+ "#intiation of all variables\n",
+ "# Chapter 7\n",
+ "import math\n",
+ "print\"Example 7.19, Page:232 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 19\")\n",
+ "T=(200+273);#temperature of water in K\n",
+ "print(\"clapeyron equation says,h_fg=T*v_fg*(dp/dT)_sat\")\n",
+ "print(\"from steam tables,vg=0.12736 m^3/kg,vf=0.001157 m^3/kg\")\n",
+ "vg=0.12736;\n",
+ "vf=0.001157;\n",
+ "v_fg=(vg-vf)\n",
+ "print(\"v_fg in m^3/kg=\"),round(v_fg)\n",
+ "print(\"let us approximate,\")\n",
+ "print(\"(dp/dT)_sat_200oc=(deltaP/deltaT)_200oc=(P_205oc-P_195oc)/(205-195) in Mpa/oc\")\n",
+ "print(\"here from steam tables,P_205oc=1.7230 Mpa,P_195oc=1.3978 Mpa\")\n",
+ "P_205oc=1.7230;#pressure at 205 degree celcius in Mpa\n",
+ "P_195oc=1.3978;#pressure at 195 degree celcius in Mpa\n",
+ "(P_205oc-P_195oc)/(205-195)\n",
+ "print(\"substituting in clapeyron equation,\")\n",
+ "h_fg=T*v_fg*(P_205oc-P_195oc)*1000/(205-195)\n",
+ "print(\"h_fg in KJ/kg\"),round(h_fg,2)\n",
+ "print(\"so calculated enthalpy of vaporisation=1941.25 KJ/kg\")\n",
+ "print(\"and enthalpy of vaporisation from steam table=1940.7 KJ/kg\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 7.20;pg no: 232"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 7.20, Page:232 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 20\n",
+ "by clapeyron equation\n",
+ "h_fg=T2*v_fg*(do/dT)_sat \n",
+ "h_fg=T2*(vg-vf)*(deltaP/deltaT)in KJ/kg\n",
+ "by clapeyron-clausius equation,\n",
+ "log(P2/P1)_sat=(h_fg/R)*((1/T1)-(1/T2))_sat\n",
+ "log(P2/P1)=(h_fg/R)*((1/T1)-(1/T2))\n",
+ "so h_fg=log(P2/P1)*R/((1/T1)-(1/T2))in KJ/kg\n",
+ "% deviation from clapeyron equation in % 6.44\n",
+ "h_fg by clapeyron equation=159.49 KJ/kg\n",
+ "h_fg by clapeyron-clausius equation=169.76 KJ/kg\n",
+ "% deviation in h_fg value by clapeyron-clausius equation from the value from clapeyron equation=6.44%\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of loss of available energy\n",
+ "#intiation of all variables\n",
+ "# Chapter 7\n",
+ "import math\n",
+ "print\"Example 7.20, Page:232 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 20\")\n",
+ "P2=260.96;#saturation pressure at -5 degree celcius\n",
+ "P1=182.60;#saturation pressure at -15 degree celcius\n",
+ "vg=0.07665;#specific volume of gas at -10 degree celcius in m^3/kg\n",
+ "vf=0.00070#specific volume at -10 degree celcius in m^3/kg\n",
+ "R=0.06876;#gas constant in KJ/kg K\n",
+ "h_fg=156.3;#enthalpy in KJ/kg K\n",
+ "T2=(-5.+273.);#temperature in K\n",
+ "T1=(-15.+273.);#temperature in K\n",
+ "print(\"by clapeyron equation\")\n",
+ "print(\"h_fg=T2*v_fg*(do/dT)_sat \")\n",
+ "print(\"h_fg=T2*(vg-vf)*(deltaP/deltaT)in KJ/kg\")\n",
+ "h_fg=T2*(vg-vf)*(P1-P2)/(T1-T2)\n",
+ "print(\"by clapeyron-clausius equation,\")\n",
+ "print(\"log(P2/P1)_sat=(h_fg/R)*((1/T1)-(1/T2))_sat\")\n",
+ "print(\"log(P2/P1)=(h_fg/R)*((1/T1)-(1/T2))\")\n",
+ "print(\"so h_fg=log(P2/P1)*R/((1/T1)-(1/T2))in KJ/kg\")\n",
+ "h_fg=math.log(P2/P1)*R/((1/T1)-(1/T2))\n",
+ "print(\"% deviation from clapeyron equation in %\"),round((169.76-159.49)*100/159.49,2)\n",
+ "print(\"h_fg by clapeyron equation=159.49 KJ/kg\")\n",
+ "print(\"h_fg by clapeyron-clausius equation=169.76 KJ/kg\")\n",
+ "print(\"% deviation in h_fg value by clapeyron-clausius equation from the value from clapeyron equation=6.44%\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 7.21;pg no: 233"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 7.21, Page:233 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 21\n",
+ "volume expansion=(1/v)*(dv/dT)_P\n",
+ "isothermal compressibility=-(1/v)*(dv/dp)_T\n",
+ "let us write dv/dT=deltav/deltaT and dv/dP=deltav/deltaP.The difference may be taken for small pressure and temperature changes.\n",
+ "volume expansivity in K^-1,\n",
+ "=(1/v)*(dv/dT)_300Kpa\n",
+ "=(1/v_300Kpa_300oc)*((v_350oc-v_250oc)/(350-250))_300Kpa\n",
+ "from steam tables,v_300Kpa_300oc=0.8753 in m^3/kg,v_350oc=0.9534 in m^3/kg,v_250oc=0.7964 in m^3/kg\n",
+ "volume expansivity=1.7937*10^-3 K^-1\n",
+ "isothermal compressibility=k in Kpa^-1\n",
+ "k= 0.004\n",
+ "from steam tables,v_300Kpa_300oc=0.8753 in m^3/kg,v_350Kpa=0.76505 in m^3/kg,v_250Kpa=1.09575 in m^3/kg\n",
+ "so isothermal compressibility=3.778*10^-3 Kpa^-1\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of volume expansivity and isothermal compressibility\n",
+ "#intiation of all variables\n",
+ "# Chapter 7\n",
+ "import math\n",
+ "print\"Example 7.21, Page:233 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 21\")\n",
+ "print(\"volume expansion=(1/v)*(dv/dT)_P\")\n",
+ "print(\"isothermal compressibility=-(1/v)*(dv/dp)_T\")\n",
+ "print(\"let us write dv/dT=deltav/deltaT and dv/dP=deltav/deltaP.The difference may be taken for small pressure and temperature changes.\")\n",
+ "print(\"volume expansivity in K^-1,\")\n",
+ "print(\"=(1/v)*(dv/dT)_300Kpa\")\n",
+ "print(\"=(1/v_300Kpa_300oc)*((v_350oc-v_250oc)/(350-250))_300Kpa\")\n",
+ "print(\"from steam tables,v_300Kpa_300oc=0.8753 in m^3/kg,v_350oc=0.9534 in m^3/kg,v_250oc=0.7964 in m^3/kg\")\n",
+ "v_300Kpa_300oc=0.8753;#specific volume at 300Kpa and 300 degree celcius\n",
+ "v_350oc=0.9534;#specific volume 350 degree celcius\n",
+ "v_250oc=0.7964;#specific volume 250 degree celcius\n",
+ "(1/v_300Kpa_300oc)*(v_350oc-v_250oc)/(350-250)\n",
+ "print(\"volume expansivity=1.7937*10^-3 K^-1\")\n",
+ "print(\"isothermal compressibility=k in Kpa^-1\")\n",
+ "v_350Kpa=0.76505;#specific volume 350 Kpa\n",
+ "v_250Kpa=1.09575;#specific volume 250 Kpa\n",
+ "k=(-1./v_300Kpa_300oc)*(v_350Kpa-v_250Kpa)/(350.-250.)\n",
+ "print(\"k=\"),round((-1./v_300Kpa_300oc)*(v_350Kpa-v_250Kpa)/(350.-250.),3)\n",
+ "print(\"from steam tables,v_300Kpa_300oc=0.8753 in m^3/kg,v_350Kpa=0.76505 in m^3/kg,v_250Kpa=1.09575 in m^3/kg\")\n",
+ "print(\"so isothermal compressibility=3.778*10^-3 Kpa^-1\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 7.22;pg no: 234"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 7.22, Page:234 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 22\n",
+ "filling of the tank is a transient flow(unsteady)process.for the transient filling process,considering subscripts i and f for initial and final states,\n",
+ "hi=uf\n",
+ "Cp*Ti=Cv*Tf\n",
+ "so Tf=Cp*Ti/Cv in K 417.33\n",
+ "inside final temperature,Tf=417.33 K\n",
+ "change in entropy,deltaS_gen=(Sf-Si)+deltaS_surr in KJ/kg K= 0.338\n",
+ "Cp*log(Tf/Ti)+0\n",
+ "change in entropy,deltaS_gen=0.3379 KJ/kg K\n",
+ "irreversibility,I in KJ/kg= 100.76\n",
+ "irreversibility,I=100.74 KJ/kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of inside final temperature,change in entropy and irreversibility\n",
+ "#intiation of all variables\n",
+ "# Chapter 7\n",
+ "import math\n",
+ "print\"Example 7.22, Page:234 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 22\")\n",
+ "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n",
+ "Cv=0.718;#specific heat at constant volume in KJ/kg K\n",
+ "Ti=(25+273.15);#atmospheric temperature in K\n",
+ "print(\"filling of the tank is a transient flow(unsteady)process.for the transient filling process,considering subscripts i and f for initial and final states,\")\n",
+ "print(\"hi=uf\")\n",
+ "print(\"Cp*Ti=Cv*Tf\")\n",
+ "Tf=Cp*Ti/Cv\n",
+ "print(\"so Tf=Cp*Ti/Cv in K\"),round(Tf,2)\n",
+ "print(\"inside final temperature,Tf=417.33 K\")\n",
+ "deltaS_gen=Cp*math.log(Tf/Ti)\n",
+ "print(\"change in entropy,deltaS_gen=(Sf-Si)+deltaS_surr in KJ/kg K=\"),round(deltaS_gen,4)\n",
+ "print(\"Cp*log(Tf/Ti)+0\")\n",
+ "print(\"change in entropy,deltaS_gen=0.3379 KJ/kg K\")\n",
+ "To=Ti;\n",
+ "I=To*deltaS_gen\n",
+ "print(\"irreversibility,I in KJ/kg=\"),round(I,2)\n",
+ "print(\"irreversibility,I=100.74 KJ/kg\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 7.23;pg no: 234"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 7.23, Page:234 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 23\n",
+ "here the combined closed system consists of hot water and heat engine.here there is no thermal reservoir in the system under consideration.for the maximum work output,irreversibility=0\n",
+ "therefore,d(E-To-S)/dt=W_max\n",
+ "or W_max=(E-To-S)1-(E-To-S)2\n",
+ "here E1=U1=m*Cp*T1,E2=U2=m*Cp*T2\n",
+ "therefore,W_max=m*Cp*(T1-T2)-To*m*Cp*log(T1/T2)in KJ\n",
+ "so maximum work in KJ= 40946.6\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of maximum work\n",
+ "#intiation of all variables\n",
+ "# Chapter 7\n",
+ "import math\n",
+ "print\"Example 7.23, Page:234 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 23\")\n",
+ "m=75.;#mass of hot water in kg\n",
+ "T1=(400.+273.);#temperature of hot water in K\n",
+ "T2=(27.+273.);#temperature of environment in K\n",
+ "Cp=4.18;#specific heat of water in KJ/kg K\n",
+ "print(\"here the combined closed system consists of hot water and heat engine.here there is no thermal reservoir in the system under consideration.for the maximum work output,irreversibility=0\")\n",
+ "print(\"therefore,d(E-To-S)/dt=W_max\")\n",
+ "print(\"or W_max=(E-To-S)1-(E-To-S)2\")\n",
+ "print(\"here E1=U1=m*Cp*T1,E2=U2=m*Cp*T2\")\n",
+ "print(\"therefore,W_max=m*Cp*(T1-T2)-To*m*Cp*log(T1/T2)in KJ\")\n",
+ "To=T2;\n",
+ "W_max=m*Cp*(T1-T2)-To*m*Cp*math.log(T1/T2)\n",
+ "print(\"so maximum work in KJ=\"),round(W_max,1)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 7.24;pg no: 235"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 7.24, Page:235 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 7 Example 24\n",
+ "from steam tables,h1=h_50bar_600oc=3666.5 KJ/kg,s1=s_50bar_600oc=7.2589 KJ/kg K,h2=hg=2584.7 KJ/kg,s2=sg=8.1502 KJ/kg K\n",
+ "inlet stream availability in KJ/kg= 1587.19\n",
+ "input stream availability is equal to the input absolute availability.\n",
+ "exit stream availaability in KJ/kg 238.69\n",
+ "exit stream availability is equal to the exit absolute availability.\n",
+ "W_rev in KJ/kg\n",
+ "irreversibility=W_rev-W in KJ/kg 348.49\n",
+ "this irreversibility is in fact the availability loss.\n",
+ "inlet stream availability=1587.18 KJ/kg\n",
+ "exit stream availability=238.69 KJ/kg\n",
+ "irreversibility=348.49 KJ/kg\n",
+ "NOTE=>In book this question is solve using dead state temperature 25 degree celcius which is wrong as we have to take dead state temperature 15 degree celcius,now this question is correctly solve above taking dead state temperature 15 degree celcius as mentioned in question. \n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of inlet stream availability,exit stream availability and irreversibility\n",
+ "#intiation of all variables\n",
+ "# Chapter 7\n",
+ "import math\n",
+ "print\"Example 7.24, Page:235 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 7 Example 24\")\n",
+ "C1=150;#steam entering velocity in m/s\n",
+ "C2=50;#steam leaving velocity in m/s\n",
+ "To=(15+273);#dead state temperature in K\n",
+ "W=1000;#expansion work in KJ/kg\n",
+ "print(\"from steam tables,h1=h_50bar_600oc=3666.5 KJ/kg,s1=s_50bar_600oc=7.2589 KJ/kg K,h2=hg=2584.7 KJ/kg,s2=sg=8.1502 KJ/kg K\")\n",
+ "h1=3666.5;\n",
+ "s1=7.2589;\n",
+ "h2=2584.7;\n",
+ "s2=8.1502;\n",
+ "(h1+C1**2*10**-3/2)-To*s1\n",
+ "print(\"inlet stream availability in KJ/kg=\"),round((h1+C1**2*10**-3/2)-To*s1,2)\n",
+ "(h2+C2**2*10**-3/2)-To*s2\n",
+ "print(\"input stream availability is equal to the input absolute availability.\")\n",
+ "print(\"exit stream availaability in KJ/kg\"),round((h2+C2**2*10**-3/2)-To*s2,2)\n",
+ "print(\"exit stream availability is equal to the exit absolute availability.\")\n",
+ "print(\"W_rev in KJ/kg\")\n",
+ "W_rev=1587.18-238.69\n",
+ "W_rev-W\n",
+ "print(\"irreversibility=W_rev-W in KJ/kg\"),round(W_rev-W,2)\n",
+ "print(\"this irreversibility is in fact the availability loss.\")\n",
+ "print(\"inlet stream availability=1587.18 KJ/kg\")\n",
+ "print(\"exit stream availability=238.69 KJ/kg\")\n",
+ "print(\"irreversibility=348.49 KJ/kg\")\n",
+ "print(\"NOTE=>In book this question is solve using dead state temperature 25 degree celcius which is wrong as we have to take dead state temperature 15 degree celcius,now this question is correctly solve above taking dead state temperature 15 degree celcius as mentioned in question. \")\n"
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter8_3.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter8_3.ipynb
new file mode 100644
index 00000000..5088b9af
--- /dev/null
+++ b/_Engineering_Thermodynamics_by__O._Singh/chapter8_3.ipynb
@@ -0,0 +1,2594 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#Chapter 8:Vapour Power Cycles"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 8.1;pg no: 260"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 88,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 8.1, Page:260 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 1\n",
+ "T-S representation for carnot cycle operating between pressure of 7 MPa and 7KPa is shown in fig.\n",
+ "enthalpy at state 2,h2= hg at 7 MPa\n",
+ "from steam table,h=2772.1 KJ/kg\n",
+ "entropy at state 2,s2=sg at 7MPa\n",
+ "from steam table,s2=5.8133 KJ/kg K\n",
+ "enthalpy and entropy at state 3,\n",
+ "from steam table,h3=hf at 7 MPa =1267 KJ/kg and s3=sf at 7 MPa=3.1211 KJ/kg K\n",
+ "for process 2-1,s1=s2.Let dryness fraction at state 1 be x1 \n",
+ "from steam table, sf at 7 KPa=0.5564 KJ/kg K,sfg at 7 KPa=7.7237 KJ/kg K\n",
+ "s1=s2=sf+x1*sfg\n",
+ "so x1= 0.68\n",
+ "from steam table,hf at 7 KPa=162.60 KJ/kg,hfg at 7 KPa=2409.54 KJ/kg\n",
+ "enthalpy at state 1,h1 in KJ/kg= 1802.53\n",
+ "let dryness fraction at state 4 be x4\n",
+ "for process 4-3,s4=s3=sf+x4*sfg\n",
+ "so x4= 0.33\n",
+ "enthalpy at state 4,h4 in KJ/kg= 962.81\n",
+ "thermal efficiency=net work/heat added\n",
+ "expansion work per kg=(h2-h1) in KJ/kg 969.57\n",
+ "compression work per kg=(h3-h4) in KJ/kg(+ve) 304.19\n",
+ "heat added per kg=(h2-h3) in KJ/kg(-ve) 1505.1\n",
+ "net work per kg=(h2-h1)-(h3-h4) in KJ/kg 665.38\n",
+ "thermal efficiency 0.44\n",
+ "in percentage 44.21\n",
+ "so thermal efficiency=44.21%\n",
+ "turbine work=969.57 KJ/kg(+ve)\n",
+ "compression work=304.19 KJ/kg(-ve)\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of thermal efficiency,turbine work,compression work\n",
+ "#intiation of all variables\n",
+ "# Chapter 8\n",
+ "print\"Example 8.1, Page:260 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 1\")\n",
+ "print(\"T-S representation for carnot cycle operating between pressure of 7 MPa and 7KPa is shown in fig.\")\n",
+ "print(\"enthalpy at state 2,h2= hg at 7 MPa\")\n",
+ "print(\"from steam table,h=2772.1 KJ/kg\")\n",
+ "h2=2772.1;\n",
+ "print(\"entropy at state 2,s2=sg at 7MPa\")\n",
+ "print(\"from steam table,s2=5.8133 KJ/kg K\")\n",
+ "s2=5.8133;\n",
+ "print(\"enthalpy and entropy at state 3,\")\n",
+ "print(\"from steam table,h3=hf at 7 MPa =1267 KJ/kg and s3=sf at 7 MPa=3.1211 KJ/kg K\")\n",
+ "h3=1267;\n",
+ "s3=3.1211;\n",
+ "print(\"for process 2-1,s1=s2.Let dryness fraction at state 1 be x1 \")\n",
+ "s1=s2;\n",
+ "print(\"from steam table, sf at 7 KPa=0.5564 KJ/kg K,sfg at 7 KPa=7.7237 KJ/kg K\")\n",
+ "sf=0.5564;\n",
+ "sfg=7.7237;\n",
+ "print(\"s1=s2=sf+x1*sfg\")\n",
+ "x1=(s2-sf)/sfg\n",
+ "print(\"so x1=\"),round(x1,2) \n",
+ "x1=0.6806;#approx.\n",
+ "print(\"from steam table,hf at 7 KPa=162.60 KJ/kg,hfg at 7 KPa=2409.54 KJ/kg\")\n",
+ "hf=162.60;\n",
+ "hfg=2409.54;\n",
+ "h1=hf+x1*hfg\n",
+ "print(\"enthalpy at state 1,h1 in KJ/kg=\"),round(h1,2)\n",
+ "print(\"let dryness fraction at state 4 be x4\")\n",
+ "print(\"for process 4-3,s4=s3=sf+x4*sfg\")\n",
+ "s4=s3;\n",
+ "x4=(s4-sf)/sfg\n",
+ "print(\"so x4=\"),round(x4,2)\n",
+ "x4=0.3321;#approx.\n",
+ "h4=hf+x4*hfg\n",
+ "print(\"enthalpy at state 4,h4 in KJ/kg=\"),round(h4,2)\n",
+ "print(\"thermal efficiency=net work/heat added\")\n",
+ "(h2-h1)\n",
+ "print(\"expansion work per kg=(h2-h1) in KJ/kg\"),round((h2-h1),2)\n",
+ "(h3-h4)\n",
+ "print(\"compression work per kg=(h3-h4) in KJ/kg(+ve)\"),round((h3-h4),2)\n",
+ "(h2-h3)\n",
+ "print(\"heat added per kg=(h2-h3) in KJ/kg(-ve)\"),round((h2-h3),2)\n",
+ "(h2-h1)-(h3-h4)\n",
+ "print(\"net work per kg=(h2-h1)-(h3-h4) in KJ/kg\"),round((h2-h1)-(h3-h4),2)\n",
+ "((h2-h1)-(h3-h4))/(h2-h3)\n",
+ "print(\"thermal efficiency\"),round(((h2-h1)-(h3-h4))/(h2-h3),2)\n",
+ "print(\"in percentage\"),round((((h2-h1)-(h3-h4))/(h2-h3))*100,2)\n",
+ "print(\"so thermal efficiency=44.21%\")\n",
+ "print(\"turbine work=969.57 KJ/kg(+ve)\")\n",
+ "print(\"compression work=304.19 KJ/kg(-ve)\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 8.2;pg no: 261"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 89,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 8.2, Page:261 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 2\n",
+ "from steam tables,at 5 MPa,hf_5MPa=1154.23 KJ/kg,sf_5MPa=2.92 KJ/kg K\n",
+ "hg_5MPa=2794.3 KJ/kg,sg_5MPa=5.97 KJ/kg K\n",
+ "from steam tables,at 5 Kpa,hf_5KPa=137.82 KJ/kg,sf_5KPa=0.4764 KJ/kg K\n",
+ "hg_5KPa=2561.5 KJ/kg,sg_5KPa=8.3951 KJ/kg K,vf_5KPa=0.001005 m^3/kg\n",
+ "as process 2-3 is isentropic,so s2=s3\n",
+ "and s3=sf_5KPa+x3*sfg_5KPa=s2=sg_5MPa\n",
+ "so x3= 0.69\n",
+ "hence enthalpy at 3,\n",
+ "h3 in KJ/kg= 1819.85\n",
+ "enthalpy at 2,h2=hg_5KPa=2794.3 KJ/kg\n",
+ "process 1-4 is isentropic,so s1=s4\n",
+ "s1=sf_5KPa+x4*(sg_5KPa-sf_5KPa)\n",
+ "so x4= 0.31\n",
+ "enthalpy at 4,h4 in KJ/kg= 884.31\n",
+ "enthalpy at 1,h1 in KJ/kg= 1154.23\n",
+ "carnot cycle(1-2-3-4-1) efficiency:\n",
+ "n_carnot=net work/heat added\n",
+ "n_carnot 0.43\n",
+ "in percentage 42.96\n",
+ "so n_carnot=42.95%\n",
+ "In rankine cycle,1-2-3-5-6-1,\n",
+ "pump work,h6-h5=vf_5KPa*(p6-p5)in KJ/kg 5.02\n",
+ "h5 KJ/kg= 137.82\n",
+ "hence h6 in KJ/kg 142.84\n",
+ "net work in rankine cycle=(h2-h3)-(h6-h5)in KJ/kg 969.43\n",
+ "heat added=(h2-h6)in KJ/kg 2651.46\n",
+ "rankine cycle efficiency(n_rankine)= 0.37\n",
+ "in percentage 36.56\n",
+ "so n_rankine=36.56%\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of n_carnot,n_rankine\n",
+ "#intiation of all variables\n",
+ "# Chapter 8\n",
+ "print\"Example 8.2, Page:261 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 2\")\n",
+ "print(\"from steam tables,at 5 MPa,hf_5MPa=1154.23 KJ/kg,sf_5MPa=2.92 KJ/kg K\")\n",
+ "print(\"hg_5MPa=2794.3 KJ/kg,sg_5MPa=5.97 KJ/kg K\")\n",
+ "hf_5MPa=1154.23;\n",
+ "sf_5MPa=2.92;\n",
+ "hg_5MPa=2794.3;\n",
+ "sg_5MPa=5.97;\n",
+ "print(\"from steam tables,at 5 Kpa,hf_5KPa=137.82 KJ/kg,sf_5KPa=0.4764 KJ/kg K\")\n",
+ "print(\"hg_5KPa=2561.5 KJ/kg,sg_5KPa=8.3951 KJ/kg K,vf_5KPa=0.001005 m^3/kg\")\n",
+ "hf_5KPa=137.82;\n",
+ "sf_5KPa=0.4764;\n",
+ "hg_5KPa=2561.5;\n",
+ "sg_5KPa=8.3951;\n",
+ "vf_5KPa=0.001005;\n",
+ "print(\"as process 2-3 is isentropic,so s2=s3\")\n",
+ "print(\"and s3=sf_5KPa+x3*sfg_5KPa=s2=sg_5MPa\")\n",
+ "s2=sg_5MPa;\n",
+ "s3=s2;\n",
+ "x3=(s3-sf_5KPa)/(sg_5KPa-sf_5KPa)\n",
+ "print(\"so x3=\"),round(x3,2)\n",
+ "x3=0.694;#approx.\n",
+ "print(\"hence enthalpy at 3,\")\n",
+ "h3=hf_5KPa+x3*(hg_5KPa-hf_5KPa)\n",
+ "print(\"h3 in KJ/kg=\"),round(h3,2)\n",
+ "print(\"enthalpy at 2,h2=hg_5KPa=2794.3 KJ/kg\")\n",
+ "print(\"process 1-4 is isentropic,so s1=s4\")\n",
+ "s1=sf_5MPa;\n",
+ "print(\"s1=sf_5KPa+x4*(sg_5KPa-sf_5KPa)\")\n",
+ "x4=(s1-sf_5KPa)/(sg_5KPa-sf_5KPa)\n",
+ "print(\"so x4=\"),round(x4,2)\n",
+ "x4=0.308;#approx.\n",
+ "h4=hf_5KPa+x4*(hg_5KPa-hf_5KPa)\n",
+ "print(\"enthalpy at 4,h4 in KJ/kg=\"),round(h4,2)\n",
+ "h1=hf_5MPa\n",
+ "h2=hg_5MPa;\n",
+ "n_carnot=((h2-h3)-(h1-h4))/(h2-h1)\n",
+ "print(\"enthalpy at 1,h1 in KJ/kg=\"),round(h1,2)\n",
+ "print(\"carnot cycle(1-2-3-4-1) efficiency:\")\n",
+ "print(\"n_carnot=net work/heat added\")\n",
+ "print(\"n_carnot\"),round(n_carnot,2)\n",
+ "print(\"in percentage\"),round(n_carnot*100,2)\n",
+ "print(\"so n_carnot=42.95%\")\n",
+ "print(\"In rankine cycle,1-2-3-5-6-1,\")\n",
+ "p6=5000;#boiler pressure in KPa\n",
+ "p5=5;#condenser pressure in KPa\n",
+ "vf_5KPa*(p6-p5)\n",
+ "print(\"pump work,h6-h5=vf_5KPa*(p6-p5)in KJ/kg\"),round(vf_5KPa*(p6-p5),2)\n",
+ "h5=hf_5KPa;\n",
+ "print(\"h5 KJ/kg=\"),round(hf_5KPa,2)\n",
+ "h6=h5+(vf_5KPa*(p6-p5))\n",
+ "print(\"hence h6 in KJ/kg\"),round(h6,2)\n",
+ "(h2-h3)-(h6-h5)\n",
+ "print(\"net work in rankine cycle=(h2-h3)-(h6-h5)in KJ/kg\"),round((h2-h3)-(h6-h5),2)\n",
+ "(h2-h6)\n",
+ "print(\"heat added=(h2-h6)in KJ/kg\"),round((h2-h6),2)\n",
+ "n_rankine=((h2-h3)-(h6-h5))/(h2-h6)\n",
+ "print(\"rankine cycle efficiency(n_rankine)=\"),round(n_rankine,2)\n",
+ "print(\"in percentage\"),round(n_rankine*100,2)\n",
+ "print(\"so n_rankine=36.56%\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 8.3;pg no: 263"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 90,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 8.3, Page:263 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 3\n",
+ "from steam tables,h2=hg_40bar=3092.5 KJ/kg\n",
+ "s2=sg_40bar=6.5821 KJ/kg K\n",
+ "h4=hf_0.05bar=137.82 KJ/kg,hfg=2423.7 KJ/kg \n",
+ "s4=sf_0.05bar=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\n",
+ "v4=vf_0.05bar=0.001005 m^3/kg\n",
+ "let the dryness fraction at state 3 be x3,\n",
+ "for ideal process,2-3,s2=s3\n",
+ "s2=s3=6.5821=sf_0.05bar+x3*sfg_0.05bar\n",
+ "so x3= 0.77\n",
+ "h3=hf_0.05bar+x3*hfg_0.05bar in KJ/kg\n",
+ "for pumping process,\n",
+ "h1-h4=v4*deltap=v4*(p1-p4)\n",
+ "so h1=h4+v4*(p1-p4) in KJ/kg 141.83\n",
+ "pump work per kg of steam in KJ/kg 4.01\n",
+ "net work per kg of steam =(expansion work-pump work)per kg of steam\n",
+ "=(h2-h3)-(h1-h4) in KJ/kg= 1081.75\n",
+ "cycle efficiency=net work/heat added 0.37\n",
+ "in percentage 36.66\n",
+ "so net work per kg of steam=1081.74 KJ/kg\n",
+ "cycle efficiency=36.67%\n",
+ "pump work per kg of steam=4.02 KJ/kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of net work per kg of steam,cycle efficiency,pump work per kg of steam\n",
+ "#intiation of all variables\n",
+ "# Chapter 8\n",
+ "print\"Example 8.3, Page:263 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 3\")\n",
+ "print(\"from steam tables,h2=hg_40bar=3092.5 KJ/kg\")\n",
+ "h2=3092.5;\n",
+ "print(\"s2=sg_40bar=6.5821 KJ/kg K\")\n",
+ "s2=6.5821;\n",
+ "print(\"h4=hf_0.05bar=137.82 KJ/kg,hfg=2423.7 KJ/kg \")\n",
+ "h4=137.82;\n",
+ "hfg=2423.7;\n",
+ "print(\"s4=sf_0.05bar=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\")\n",
+ "s4=0.4764;\n",
+ "sfg=7.9187;\n",
+ "print(\"v4=vf_0.05bar=0.001005 m^3/kg\")\n",
+ "v4=0.001005;\n",
+ "print(\"let the dryness fraction at state 3 be x3,\")\n",
+ "print(\"for ideal process,2-3,s2=s3\")\n",
+ "s3=s2;\n",
+ "print(\"s2=s3=6.5821=sf_0.05bar+x3*sfg_0.05bar\")\n",
+ "x3=(s2-s4)/(sfg)\n",
+ "print(\"so x3=\"),round(x3,2)\n",
+ "x3=0.7711;#approx.\n",
+ "print(\"h3=hf_0.05bar+x3*hfg_0.05bar in KJ/kg\")\n",
+ "h3=h4+x3*hfg\n",
+ "print(\"for pumping process,\")\n",
+ "print(\"h1-h4=v4*deltap=v4*(p1-p4)\")\n",
+ "p1=40*100;#pressure of steam enter in turbine in mPa\n",
+ "p4=0.05*100;#pressure of steam leave turbine in mPa\n",
+ "h1=h4+v4*(p1-p4)\n",
+ "print(\"so h1=h4+v4*(p1-p4) in KJ/kg\"),round(h1,2)\n",
+ "(h1-h4)\n",
+ "print(\"pump work per kg of steam in KJ/kg\"),round((h1-h4),2)\n",
+ "print(\"net work per kg of steam =(expansion work-pump work)per kg of steam\")\n",
+ "(h2-h3)-(h1-h4)\n",
+ "print(\"=(h2-h3)-(h1-h4) in KJ/kg=\"),round((h2-h3)-(h1-h4),2)\n",
+ "print(\"cycle efficiency=net work/heat added\"),round(((h2-h3)-(h1-h4))/(h2-h1),2)\n",
+ "print(\"in percentage\"),round(((h2-h3)-(h1-h4))*100/(h2-h1),2)\n",
+ "print(\"so net work per kg of steam=1081.74 KJ/kg\")\n",
+ "print(\"cycle efficiency=36.67%\")\n",
+ "print(\"pump work per kg of steam=4.02 KJ/kg\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 8.4;pg no: 264"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 8.4, Page:264 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 4\n",
+ "Let us assume that the condensate leaves condenser as saturated liquid and the expansion in turbine and pumping processes are isentropic.\n",
+ "from steam tables,h2=h_20MPa=3238.2 KJ/kg\n",
+ "s2=6.1401 KJ/kg K\n",
+ "h5=h_0.005MPa in KJ/kg\n",
+ "from steam tables,at 0.005 MPa,hf=137.82 KJ/kg,hfg=2423.7 KJ/kg,sf=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\n",
+ "h5=hf+0.9*hfg in KJ/kg 2319.15\n",
+ "s5 in KJ/kg K= 7.6\n",
+ "h6=hf=137.82 KJ/kg\n",
+ "it is given that temperature at state 4 is 500 degree celcius and due to isentropic processes s4=s5=7.6032 KJ/kg K.The state 4 can be conveniently located on mollier chart by the intersection of 500 degree celcius constant temperature line and entropy value of 7.6032 KJ/kg K and the pressure and enthalpy obtained.but these shall be approximate.\n",
+ "The state 4 can also be located by interpolation using steam table.The entropy value of 7.6032 KJ/kg K lies between the superheated steam states given under,p=1.20 MPa,s at 1.20 MPa=7.6027 KJ/kg K\n",
+ "p=1.40 MPa,s at 1.40 MPa=7.6027 KJ/kg K\n",
+ "by interpolation state 4 lies at pressure=\n",
+ "=1.399,approx.=1.40 MPa\n",
+ "thus,steam leaves HP turbine at 1.40 MPa\n",
+ "enthalpy at state 4,h4=3474.1 KJ/kg\n",
+ "for process 2-33,s2=s3=6.1401 KJ/kg K.The state 3 thus lies in wet region as s3<sg at 1.40 MPa.Let dryness fraction at state 3 be x3.\n",
+ "s3=sf+x3*sfg\n",
+ "from staem tables,at 1.4 MPa,sf=2.2842 KJ/kg K,sfg=4.1850 KJ/kg K\n",
+ "so x3 0.92\n",
+ "h3 in KJ/kg 2635.89\n",
+ "from steam tables,at 1.4 MPa,hf=830.3 KJ/kg,hfg=1959.7 KJ/kg\n",
+ "enthalpy at 1,h1=h6+v6*(p1-p6) in KJ/kg\n",
+ "h1=hf at 0.005MPa+vf at 0.005MPa*(p1-p6)\n",
+ "from steam tables, at 0.005 MPa,h6=137.82 KJ/kg,v6=0.001005 m^3/kg\n",
+ "net work per kg steam in KJ/kg= 1737.16\n",
+ "heat added per kg of steam in KJ/kg= 3080.29\n",
+ "thermal efficiency=net work/heat added 0.56\n",
+ "in percentage 56.4\n",
+ "pressure of steam leaving HP turbine=1.40 MPa\n",
+ "thermal efficiency=56.39%\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of maximum possible work\n",
+ "#intiation of all variables\n",
+ "# Chapter 8\n",
+ "print\"Example 8.4, Page:264 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 4\")\n",
+ "print(\"Let us assume that the condensate leaves condenser as saturated liquid and the expansion in turbine and pumping processes are isentropic.\")\n",
+ "print(\"from steam tables,h2=h_20MPa=3238.2 KJ/kg\")\n",
+ "h2=3238.2;\n",
+ "print(\"s2=6.1401 KJ/kg K\")\n",
+ "s2=6.1401;\n",
+ "print(\"h5=h_0.005MPa in KJ/kg\")\n",
+ "print(\"from steam tables,at 0.005 MPa,hf=137.82 KJ/kg,hfg=2423.7 KJ/kg,sf=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\")\n",
+ "hf=137.82;\n",
+ "hfg=2423.7;\n",
+ "sf=0.4764;\n",
+ "sfg=7.9187;\n",
+ "h5=hf+0.9*hfg\n",
+ "print(\"h5=hf+0.9*hfg in KJ/kg\"),round(h5,2)\n",
+ "s5=sf+0.9*sfg\n",
+ "print(\"s5 in KJ/kg K=\"),round(s5,2)\n",
+ "print(\"h6=hf=137.82 KJ/kg\")\n",
+ "h6=137.82;\n",
+ "print(\"it is given that temperature at state 4 is 500 degree celcius and due to isentropic processes s4=s5=7.6032 KJ/kg K.The state 4 can be conveniently located on mollier chart by the intersection of 500 degree celcius constant temperature line and entropy value of 7.6032 KJ/kg K and the pressure and enthalpy obtained.but these shall be approximate.\")\n",
+ "print(\"The state 4 can also be located by interpolation using steam table.The entropy value of 7.6032 KJ/kg K lies between the superheated steam states given under,p=1.20 MPa,s at 1.20 MPa=7.6027 KJ/kg K\")\n",
+ "print(\"p=1.40 MPa,s at 1.40 MPa=7.6027 KJ/kg K\")\n",
+ "print(\"by interpolation state 4 lies at pressure=\")\n",
+ "1.20+((1.40-1.20)/(7.6027-7.6759))*(7.6032-7.6759)\n",
+ "print(\"=1.399,approx.=1.40 MPa\")\n",
+ "print(\"thus,steam leaves HP turbine at 1.40 MPa\")\n",
+ "print(\"enthalpy at state 4,h4=3474.1 KJ/kg\")\n",
+ "h4=3474.1;\n",
+ "print(\"for process 2-33,s2=s3=6.1401 KJ/kg K.The state 3 thus lies in wet region as s3<sg at 1.40 MPa.Let dryness fraction at state 3 be x3.\")\n",
+ "s3=s2;\n",
+ "print(\"s3=sf+x3*sfg\")\n",
+ "print(\"from staem tables,at 1.4 MPa,sf=2.2842 KJ/kg K,sfg=4.1850 KJ/kg K\")\n",
+ "sf=2.2842;\n",
+ "sfg=4.1850;\n",
+ "x3=(s3-sf)/sfg\n",
+ "print(\"so x3\"),round(x3,2)\n",
+ "hf=830.3;\n",
+ "hfg=1959.7;\n",
+ "h3=hf+x3*hfg\n",
+ "print(\"h3 in KJ/kg\"),round(h3,2)\n",
+ "print(\"from steam tables,at 1.4 MPa,hf=830.3 KJ/kg,hfg=1959.7 KJ/kg\")\n",
+ "print(\"enthalpy at 1,h1=h6+v6*(p1-p6) in KJ/kg\")\n",
+ "print(\"h1=hf at 0.005MPa+vf at 0.005MPa*(p1-p6)\")\n",
+ "print(\"from steam tables, at 0.005 MPa,h6=137.82 KJ/kg,v6=0.001005 m^3/kg\")\n",
+ "h6=137.82;\n",
+ "v6=0.001005;\n",
+ "p1=20*1000;#steam entering HP turbine in KPa\n",
+ "p6=0.005*1000;#condensor pressure in KPa\n",
+ "h1=h6+v6*(p1-p6)\n",
+ "W_net=(h2-h3)+(h4-h5)-(h1-h6)\n",
+ "print(\"net work per kg steam in KJ/kg=\"),round(W_net,2)\n",
+ "Q=(h2-h1)\n",
+ "print(\"heat added per kg of steam in KJ/kg=\"),round(Q,2)\n",
+ "#thermal efficiency=W_net/Q\n",
+ "print(\"thermal efficiency=net work/heat added\"),round(W_net/Q,2)\n",
+ "print(\"in percentage\"),round(W_net/Q*100,2)\n",
+ "print(\"pressure of steam leaving HP turbine=1.40 MPa\")\n",
+ "print(\"thermal efficiency=56.39%\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 8.5;pg no: 266"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 92,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 8.5, Page:266 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 5\n",
+ "from steam table,at inlet to turbine,\n",
+ "h2=h_10MPa,700oc\n",
+ "h2=3870.5 KJ/kg,s2=7.1687 KJ/kg K\n",
+ "for process 2-3,s2=s3 and s3<sf at 0.005 MPa so state 3 lies in wet region .Let dryness fraction at state 3 be x3.\n",
+ "s3=7.1687=sf at 0.005 MPa+x3*sfg at 0.005 MPa\n",
+ "from steam tables,at 0.005 MPa,sf=0.4764 KJ/kg K,sfg=7.9187 KJ/kg\n",
+ "so x3 0.85\n",
+ "h3=hf at 0.005 MPa+x3*hfg at 0.005 MPa\n",
+ "from steam tables,at 0.005 MPa,hf=137.82 KJ/kg,hfg=2423.7 KJ/kg\n",
+ "so h3 in KJ/kg= 2185.85\n",
+ "h4=hf at 0.005 MPa\n",
+ "for pumping process,(h1-h4)=v4*(p1-p4)\n",
+ "from steam tables,v4=vf at 0.005 MPa=0.001005 m^3/kg\n",
+ "h1 in KJ/kg= 138.82\n",
+ "net output per kg of steam,w_net in KJ/kg= 1683.65\n",
+ "mass flow rate of steam,ms in kg/s 29.7\n",
+ "by heat balance on condenser,for mass flow rate of water being mw kg/s\n",
+ "(h3-h4)*ms=mw*Cpw*(Tw_out-Tw_in)\n",
+ "so mw in kg/s= 969.79\n",
+ "the heat added per kg of steam (q_add) in KJ/kg= 3731.68\n",
+ "thermal efficiency= 0.45\n",
+ "in percentage 45.12\n",
+ "ratio of heat supplied and rejected= 1.82\n",
+ "mass of flow rate of steam=29.69 kg/s\n",
+ "mass flow rate of condenser cooling water=969.79 kg/s\n",
+ "thermal efficiency=45.12%\n",
+ "ratio of heat supplied and rejected=1.822\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of mass of flow rate of steam,mass flow rate of condenser cooling water,thermal efficiency,ratio of heat supplied and rejected\n",
+ "#intiation of all variables\n",
+ "# Chapter 8\n",
+ "print\"Example 8.5, Page:266 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 5\")\n",
+ "P=50*10**3;#output of plant in KW\n",
+ "Cpw=4.18;#specific heat of water in KJ/kg K\n",
+ "Tw_in=15;#cooling water entering condenser temperature in degree celcius\n",
+ "Tw_out=30;#cooling water leaving condenser temperature in degree celcius\n",
+ "print(\"from steam table,at inlet to turbine,\")\n",
+ "print(\"h2=h_10MPa,700oc\")\n",
+ "print(\"h2=3870.5 KJ/kg,s2=7.1687 KJ/kg K\")\n",
+ "h2=3870.5;\n",
+ "s2=7.1687;\n",
+ "s3=s2;\n",
+ "print(\"for process 2-3,s2=s3 and s3<sf at 0.005 MPa so state 3 lies in wet region .Let dryness fraction at state 3 be x3.\")\n",
+ "print(\"s3=7.1687=sf at 0.005 MPa+x3*sfg at 0.005 MPa\")\n",
+ "print(\"from steam tables,at 0.005 MPa,sf=0.4764 KJ/kg K,sfg=7.9187 KJ/kg\")\n",
+ "sf=0.4764;\n",
+ "sfg=7.9187;\n",
+ "x3=(s3-sf)/sfg\n",
+ "print(\"so x3\"),round(x3,2)\n",
+ "x3=0.845;#approx.\n",
+ "print(\"h3=hf at 0.005 MPa+x3*hfg at 0.005 MPa\")\n",
+ "print(\"from steam tables,at 0.005 MPa,hf=137.82 KJ/kg,hfg=2423.7 KJ/kg\")\n",
+ "hf=137.82;\n",
+ "hfg=2423.7;\n",
+ "h3=hf+x3*hfg\n",
+ "print(\"so h3 in KJ/kg=\"),round(h3,2)\n",
+ "print(\"h4=hf at 0.005 MPa\")\n",
+ "h4=hf;\n",
+ "print(\"for pumping process,(h1-h4)=v4*(p1-p4)\")\n",
+ "print(\"from steam tables,v4=vf at 0.005 MPa=0.001005 m^3/kg\")\n",
+ "v4=0.001005;\n",
+ "p1=10;#pressure of steam leave boiler in MPa\n",
+ "p4=0.005;#pressure of steam leave turbine in MPa\n",
+ "h1=h4+v4*(p1-p4)*100\n",
+ "print(\"h1 in KJ/kg=\"),round(h1,2)\n",
+ "w_net=(h2-h3)-(h1-h4)\n",
+ "print(\"net output per kg of steam,w_net in KJ/kg=\"),round(w_net,2)\n",
+ "ms=P/w_net\n",
+ "print(\"mass flow rate of steam,ms in kg/s\"),round(ms,2)\n",
+ "ms=29.69;#approx.\n",
+ "print(\"by heat balance on condenser,for mass flow rate of water being mw kg/s\")\n",
+ "print(\"(h3-h4)*ms=mw*Cpw*(Tw_out-Tw_in)\")\n",
+ "mw=(h3-h4)*ms/(Cpw*(Tw_out-Tw_in))\n",
+ "print(\"so mw in kg/s=\"),round(mw,2)\n",
+ "q_add=(h2-h1)\n",
+ "print(\"the heat added per kg of steam (q_add) in KJ/kg=\"),round(q_add,2)\n",
+ "w_net/q_add\n",
+ "print(\"thermal efficiency=\"),round(w_net/q_add,2)\n",
+ "print(\"in percentage\"),round(w_net*100/q_add,2)\n",
+ "(h2-h1)/(h3-h4)\n",
+ "print(\"ratio of heat supplied and rejected=\"),round((h2-h1)/(h3-h4),2)\n",
+ "print(\"mass of flow rate of steam=29.69 kg/s\")\n",
+ "print(\"mass flow rate of condenser cooling water=969.79 kg/s\")\n",
+ "print(\"thermal efficiency=45.12%\")\n",
+ "print(\"ratio of heat supplied and rejected=1.822\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 8.6;pg no: 267"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 8.6, Page:267 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 6\n",
+ "case (a) When there is no feed water heater\n",
+ "Thermal efficiency of cycle=((h2-h3)-(h1-h4))/(h2-h1)\n",
+ "from steam tables,h2=h at 200 bar,650oc=3675.3 KJ/kg,s2=s at 200 bar,650oc=6.6582 KJ/kg K,h4=hf at 0.05 bar=137.82 KJ/kg,v4=vf at 0.05 bar=0.001005 m^3/kg\n",
+ "hf at 0.05 bar=137.82 KJ/kg,hfg at 0.05 bar=2423.7 KJ/kg,sf at 0.05 bar=0.4764 KJ/kg K,sfg at 0.05 bar=7.9187 KJ/kg K\n",
+ "For process 2-3,s2=s3.Let dryness fraction at 3 be x3.\n",
+ "s3=6.6582=sf at 0.05 bar+x3*sfg at 0.05 bar\n",
+ "so x3= 0.78\n",
+ "h3=hf at 0.05 bar+x3*hfg at 0.05 bar in KJ/kg\n",
+ "For pumping process 4-1,\n",
+ "h1-h4=v4*deltap\n",
+ "h1= in KJ/kg= 157.87\n",
+ "Thermal efficiency of cycle= 0.46\n",
+ "in percentage 46.18\n",
+ "case (b) When there is only one feed water heater working at 8 bar\n",
+ "here,let mass of steam bled for feed heating be m kg\n",
+ "For process 2-6,s2=s6=6.6582 KJ/kg K\n",
+ "Let dryness fraction at state 6 be x6\n",
+ "s6=sf at 8 bar+x6*sfg at 8 bar\n",
+ "from steam tables,hf at 8 bar=721.11 KJ/kg,vf at 8 bar=0.001115 m^3/kg,hfg at 8 bar=2048 KJ/kg,sf at 8 bar=2.0462 KJ/kg K,sfg at 8 bar=4.6166 KJ/kg K\n",
+ "substituting entropy values,x6= 1.0\n",
+ "h6=hf at at 8 bar+x6*hfg at 8 bar in KJ/kg\n",
+ "Assuming the state of fluid leaving open feed water heater to be saturated liquid at 8 bar.h7=hf at 8 bar=721.11 KJ/kg\n",
+ "For process 4-5,h5 in KJ/kg 138.62\n",
+ "Applying energy balance at open feed water heater,\n",
+ "m*h6+(1-m)*h5=1*h7\n",
+ "so m= in kg 0.22\n",
+ "For process 7-1,h1 in KJ/kg= 742.52\n",
+ "here h7=hf at 8 bar,v7=vf at 8 bar\n",
+ "Thermal efficiency of cycle=0.4976\n",
+ "in percentage=49.76\n",
+ "case (c) When there are two feed water heaters working at 40 bar and 4 bar\n",
+ "here, let us assume the mass of steam at 40 bar,4 bar to be m1 kg and m2 kg respectively.\n",
+ "2-10-9-3,s2=s10=s9=s3=6.6582 KJ/kg K\n",
+ "At state 10.s10>sg at 40 bar(6.0701 KJ/kg K)so state 10 lies in superheated region at 40 bar pressure.\n",
+ "From steam table by interpolation,T10=370.6oc,so h10=3141.81 KJ/kg\n",
+ "Let dryness fraction at state 9 be x9 so,\n",
+ "s9=6.6582=sf at 4 bar+x9*sfg at 4 bar\n",
+ "from steam tables,at 4 bar,sf=1.7766 KJ/kg K,sfg=5.1193 KJ/kg K\n",
+ "x9=(s9-sf)/sfg 0.95\n",
+ "h9=hf at 4 bar+x9*hfg at 4 bar in KJ/kg\n",
+ "from steam tables,at 4 bar,hf=604.74 KJ/kg,hfg=2133.8 KJ/kg\n",
+ "Assuming the state of fluid leaving open feed water heater to be saturated liquid at respective pressures i.e.\n",
+ "h11=hf at 4 bar=604.74 KJ/kg,v11=0.001084 m^3/kg=vf at 4 bar\n",
+ "h13=hf at 40 bar=1087.31 KJ/kg,v13=0.001252 m^3/kg=vf at40 bar\n",
+ "For process 4-8,i.e in CEP.\n",
+ "h8 in KJ/kg= 138.22\n",
+ "For process 11-12,i.e in FP2,\n",
+ "h12=h11+v11*(40-4)*10^2 in KJ/kg 608.64\n",
+ "For process 13-1_a i.e. in FP1,h1_a= in KJ/kg= 1107.34\n",
+ "m1*3141.81+(1-m1)*608.64=1087.31\n",
+ "so m1=(1087.31-608.64)/(3141.81-608.64)in kg\n",
+ "Applying energy balance on open feed water heater 1 (OFWH1)\n",
+ "m1*h10+(1-m1)*h12)=1*h13\n",
+ "so m1 in kg= 0.19\n",
+ "Applying energy balance on open feed water heater 2 (OFWH2)\n",
+ "m2*h9+(1-m1-m2)*h8=(1-m1)*h11\n",
+ "so m2 in kg= 0.15\n",
+ "Thermal efficiency of cycle,n= 0.51\n",
+ "W_CEP in KJ/kg steam from boiler= 0.26\n",
+ "W_FP1=(h1_a-h13)in KJ/kg of steam from boiler 20.0\n",
+ "W_FP2 in KJ/kg of steam from boiler= 3.17\n",
+ "W_CEP+W_FP1+W_FP2 in KJ/kg of steam from boiler= 23.46\n",
+ "n= 0.51\n",
+ "in percentage 51.37\n",
+ "so cycle thermal efficiency,na=46.18%\n",
+ "nb=49.76%\n",
+ "nc=51.37%\n",
+ "hence it is obvious that efficiency increases with increase in number of feed heaters.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of maximum possible work\n",
+ "#intiation of all variables\n",
+ "# Chapter 8\n",
+ "print\"Example 8.6, Page:267 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 6\")\n",
+ "print(\"case (a) When there is no feed water heater\")\n",
+ "print(\"Thermal efficiency of cycle=((h2-h3)-(h1-h4))/(h2-h1)\")\n",
+ "print(\"from steam tables,h2=h at 200 bar,650oc=3675.3 KJ/kg,s2=s at 200 bar,650oc=6.6582 KJ/kg K,h4=hf at 0.05 bar=137.82 KJ/kg,v4=vf at 0.05 bar=0.001005 m^3/kg\")\n",
+ "h2=3675.3;\n",
+ "s2=6.6582;\n",
+ "h4=137.82;\n",
+ "v4=0.001005;\n",
+ "print(\"hf at 0.05 bar=137.82 KJ/kg,hfg at 0.05 bar=2423.7 KJ/kg,sf at 0.05 bar=0.4764 KJ/kg K,sfg at 0.05 bar=7.9187 KJ/kg K\")\n",
+ "hf=137.82;\n",
+ "hfg=2423.7;\n",
+ "sf=0.4764;\n",
+ "sfg=7.9187;\n",
+ "print(\"For process 2-3,s2=s3.Let dryness fraction at 3 be x3.\")\n",
+ "s3=s2;\n",
+ "print(\"s3=6.6582=sf at 0.05 bar+x3*sfg at 0.05 bar\")\n",
+ "x3=(s3-sf)/sfg\n",
+ "print(\"so x3=\"),round(x3,2)\n",
+ "x3=0.781;#approx.\n",
+ "print(\"h3=hf at 0.05 bar+x3*hfg at 0.05 bar in KJ/kg\")\n",
+ "h3=hf+x3*hfg\n",
+ "print(\"For pumping process 4-1,\")\n",
+ "print(\"h1-h4=v4*deltap\")\n",
+ "h1=h4+v4*(200-0.5)*10**2\n",
+ "print(\"h1= in KJ/kg=\"),round(h1,2)\n",
+ "((h2-h3)-(h1-h4))/(h2-h1)\n",
+ "print(\"Thermal efficiency of cycle=\"),round(((h2-h3)-(h1-h4))/(h2-h1),2)\n",
+ "print(\"in percentage\"),round(((h2-h3)-(h1-h4))*100/(h2-h1),2)\n",
+ "print(\"case (b) When there is only one feed water heater working at 8 bar\")\n",
+ "print(\"here,let mass of steam bled for feed heating be m kg\")\n",
+ "print(\"For process 2-6,s2=s6=6.6582 KJ/kg K\")\n",
+ "s6=s2;\n",
+ "print(\"Let dryness fraction at state 6 be x6\")\n",
+ "print(\"s6=sf at 8 bar+x6*sfg at 8 bar\")\n",
+ "print(\"from steam tables,hf at 8 bar=721.11 KJ/kg,vf at 8 bar=0.001115 m^3/kg,hfg at 8 bar=2048 KJ/kg,sf at 8 bar=2.0462 KJ/kg K,sfg at 8 bar=4.6166 KJ/kg K\")\n",
+ "hf=721.11;\n",
+ "vf=0.001115;\n",
+ "hfg=2048;\n",
+ "sf=2.0462;\n",
+ "sfg=4.6166;\n",
+ "x6=(s6-sf)/sfg\n",
+ "print(\"substituting entropy values,x6=\"),round(x6,2)\n",
+ "x6=0.999;#approx.\n",
+ "print(\"h6=hf at at 8 bar+x6*hfg at 8 bar in KJ/kg\")\n",
+ "h6=hf+x6*hfg\n",
+ "print(\"Assuming the state of fluid leaving open feed water heater to be saturated liquid at 8 bar.h7=hf at 8 bar=721.11 KJ/kg\")\n",
+ "h7=721.11;\n",
+ "h5=h4+v4*(8-.05)*10**2\n",
+ "print(\"For process 4-5,h5 in KJ/kg\"),round(h5,2)\n",
+ "print(\"Applying energy balance at open feed water heater,\")\n",
+ "print(\"m*h6+(1-m)*h5=1*h7\")\n",
+ "m=(h7-h5)/(h6-h5)\n",
+ "print(\"so m= in kg\"),round(m,2)\n",
+ "h7=hf;\n",
+ "v7=vf;\n",
+ "h1=h7+v7*(200-8)*10**2\n",
+ "print(\"For process 7-1,h1 in KJ/kg=\"),round(h1,2)\n",
+ "print(\"here h7=hf at 8 bar,v7=vf at 8 bar\")\n",
+ "#TE=((h2-h6)+(1-m)*(h6-h3)-((1-m)*(h5-h4)+(h1-h7))/(h2-h1)\n",
+ "print(\"Thermal efficiency of cycle=0.4976\")\n",
+ "print(\"in percentage=49.76\")\n",
+ "print(\"case (c) When there are two feed water heaters working at 40 bar and 4 bar\")\n",
+ "print(\"here, let us assume the mass of steam at 40 bar,4 bar to be m1 kg and m2 kg respectively.\")\n",
+ "print(\"2-10-9-3,s2=s10=s9=s3=6.6582 KJ/kg K\")\n",
+ "s3=s2;\n",
+ "s9=s3;\n",
+ "s10=s9;\n",
+ "print(\"At state 10.s10>sg at 40 bar(6.0701 KJ/kg K)so state 10 lies in superheated region at 40 bar pressure.\")\n",
+ "print(\"From steam table by interpolation,T10=370.6oc,so h10=3141.81 KJ/kg\")\n",
+ "T10=370.6;\n",
+ "h10=3141.81;\n",
+ "print(\"Let dryness fraction at state 9 be x9 so,\") \n",
+ "print(\"s9=6.6582=sf at 4 bar+x9*sfg at 4 bar\")\n",
+ "print(\"from steam tables,at 4 bar,sf=1.7766 KJ/kg K,sfg=5.1193 KJ/kg K\")\n",
+ "sf=1.7766;\n",
+ "sfg=5.1193;\n",
+ "x9=(s9-sf)/sfg\n",
+ "print(\"x9=(s9-sf)/sfg\"),round(x9,2)\n",
+ "x9=0.9536;#approx.\n",
+ "print(\"h9=hf at 4 bar+x9*hfg at 4 bar in KJ/kg\")\n",
+ "print(\"from steam tables,at 4 bar,hf=604.74 KJ/kg,hfg=2133.8 KJ/kg\")\n",
+ "hf=604.74;\n",
+ "hfg=2133.8;\n",
+ "h9=hf+x9*hfg \n",
+ "print(\"Assuming the state of fluid leaving open feed water heater to be saturated liquid at respective pressures i.e.\")\n",
+ "print(\"h11=hf at 4 bar=604.74 KJ/kg,v11=0.001084 m^3/kg=vf at 4 bar\")\n",
+ "h11=604.74;\n",
+ "v11=0.001084;\n",
+ "print(\"h13=hf at 40 bar=1087.31 KJ/kg,v13=0.001252 m^3/kg=vf at40 bar\")\n",
+ "h13=1087.31;\n",
+ "v13=0.001252;\n",
+ "print(\"For process 4-8,i.e in CEP.\")\n",
+ "h8=h4+v4*(4-0.05)*10**2\n",
+ "print(\"h8 in KJ/kg=\"),round(h8,2)\n",
+ "print(\"For process 11-12,i.e in FP2,\")\n",
+ "h12=h11+v11*(40-4)*10**2\n",
+ "print(\"h12=h11+v11*(40-4)*10^2 in KJ/kg\"),round(h12,2)\n",
+ "h1_a=h13+v13*(200-40)*10**2\n",
+ "print(\"For process 13-1_a i.e. in FP1,h1_a= in KJ/kg=\"),round(h1_a,2)\n",
+ "print(\"m1*3141.81+(1-m1)*608.64=1087.31\")\n",
+ "print(\"so m1=(1087.31-608.64)/(3141.81-608.64)in kg\")\n",
+ "m1=(1087.31-608.64)/(3141.81-608.64)\n",
+ "print(\"Applying energy balance on open feed water heater 1 (OFWH1)\")\n",
+ "print(\"m1*h10+(1-m1)*h12)=1*h13\")\n",
+ "m1=(h13-h12)/(h10-h12)\n",
+ "print(\"so m1 in kg=\"),round(m1,2)\n",
+ "print(\"Applying energy balance on open feed water heater 2 (OFWH2)\")\n",
+ "print(\"m2*h9+(1-m1-m2)*h8=(1-m1)*h11\")\n",
+ "m2=(1-m1)*(h11-h8)/(h9-h8)\n",
+ "print(\"so m2 in kg=\"),round(m2,2)\n",
+ "W_CEP=(1-m1-m2)*(h8-h4)\n",
+ "W_FP1=(h1_a-h13)\n",
+ "W_FP2=(1-m1)*(h12-h11)\n",
+ "n=(((h2-h10)+(1-m1)*(h10-h9)+(1-m1-m2)*(h9-h3))-(W_CEP+W_FP1+W_FP2))/(h2-h1_a)\n",
+ "print(\"Thermal efficiency of cycle,n=\"),round(n,2)\n",
+ "print(\"W_CEP in KJ/kg steam from boiler=\"),round(W_CEP,2)\n",
+ "print(\"W_FP1=(h1_a-h13)in KJ/kg of steam from boiler\"),round(W_FP1)\n",
+ "print(\"W_FP2 in KJ/kg of steam from boiler=\"),round(W_FP2,2)\n",
+ "W_CEP+W_FP1+W_FP2\n",
+ "print(\"W_CEP+W_FP1+W_FP2 in KJ/kg of steam from boiler=\"),round(W_CEP+W_FP1+W_FP2,2)\n",
+ "n=(((h2-h10)+(1-m1)*(h10-h9)+(1-m1-m2)*(h9-h3))-(W_CEP+W_FP1+W_FP2))/(h2-h1_a)\n",
+ "print(\"n=\"),round(n,2)\n",
+ "print(\"in percentage\"),round(n*100,2)\n",
+ "print(\"so cycle thermal efficiency,na=46.18%\")\n",
+ "print(\"nb=49.76%\")\n",
+ "print(\"nc=51.37%\")\n",
+ "print(\"hence it is obvious that efficiency increases with increase in number of feed heaters.\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 8.7;pg no: 272"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 94,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 8.7, Page:272 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 7\n",
+ "from steam tables,\n",
+ "h2=h at 50 bar,500oc=3433.8 KJ/kg,s2=s at 50 bar,500oc=6.9759 KJ/kg K\n",
+ "s3=s2=6.9759 KJ/kg K\n",
+ "by interpolation from steam tables,\n",
+ "T3=183.14oc at 5 bar,h3=2818.03 KJ/kg,h4= h at 5 bar,400oc=3271.9 KJ/kg,s4= s at 5 bar,400oc=7.7938 KJ/kg K\n",
+ "for expansion process 4-5,s4=s5=7.7938 KJ/kg K\n",
+ "let dryness fraction at state 5 be x5\n",
+ "s5=sf at 0.05 bar+x5*sfg at 0.05 bar\n",
+ "from steam tables,at 0.05 bar,sf=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\n",
+ "so x5= 0.92\n",
+ "h5=hf at 0.05 bar+x5*hfg at 0.05 bar in KJ/kg\n",
+ "from steam tables,hf at 0.05 bar=137.82 KJ/kg,hfg at 0.05 bar=2423.7 KJ/kg\n",
+ "h6=hf at 0.05 bar=137.82 KJ/kg\n",
+ "v6=vf at 0.05 bar=0.001005 m^3/kg\n",
+ "for process 6-1 in feed pump,h1 in KJ/kg= 142.84\n",
+ "cycle efficiency=W_net/Q_add\n",
+ "Wt in KJ/kg= 1510.35\n",
+ "W_pump=(h1-h6)in KJ/kg 5.02\n",
+ "W_net=Wt-W_pump in KJ/kg 1505.33\n",
+ "Q_add in KJ/kg= 3290.96\n",
+ "cycle efficiency= 0.4574\n",
+ "in percentage= 45.74\n",
+ "we know ,1 hp=0.7457 KW\n",
+ "specific steam consumption in kg/hp hr= 1.78\n",
+ "work ratio=net work/positive work 0.9967\n",
+ "so cycle efficiency=45.74%,specific steam consumption =1.78 kg/hp hr,work ratio=0.9967\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of cycle efficiency,specific steam consumption,work ratio\n",
+ "#intiation of all variables\n",
+ "# Chapter 8\n",
+ "print\"Example 8.7, Page:272 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 7\")\n",
+ "print(\"from steam tables,\")\n",
+ "print(\"h2=h at 50 bar,500oc=3433.8 KJ/kg,s2=s at 50 bar,500oc=6.9759 KJ/kg K\")\n",
+ "h2=3433.8;\n",
+ "s2=6.9759;\n",
+ "print(\"s3=s2=6.9759 KJ/kg K\")\n",
+ "s3=s2;\n",
+ "print(\"by interpolation from steam tables,\")\n",
+ "print(\"T3=183.14oc at 5 bar,h3=2818.03 KJ/kg,h4= h at 5 bar,400oc=3271.9 KJ/kg,s4= s at 5 bar,400oc=7.7938 KJ/kg K\")\n",
+ "T3=183.14;\n",
+ "h3=2818.03;\n",
+ "h4=3271.9;\n",
+ "s4=7.7938;\n",
+ "print(\"for expansion process 4-5,s4=s5=7.7938 KJ/kg K\")\n",
+ "s5=s4;\n",
+ "print(\"let dryness fraction at state 5 be x5\")\n",
+ "print(\"s5=sf at 0.05 bar+x5*sfg at 0.05 bar\")\n",
+ "print(\"from steam tables,at 0.05 bar,sf=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\")\n",
+ "sf=0.4764;\n",
+ "sfg=7.9187;\n",
+ "x5=(s5-sf)/sfg\n",
+ "print(\"so x5=\"),round(x5,2)\n",
+ "x5=0.924;#approx.\n",
+ "print(\"h5=hf at 0.05 bar+x5*hfg at 0.05 bar in KJ/kg\")\n",
+ "print(\"from steam tables,hf at 0.05 bar=137.82 KJ/kg,hfg at 0.05 bar=2423.7 KJ/kg\")\n",
+ "hf=137.82;\n",
+ "hfg=2423.7;\n",
+ "h5=hf+x5*hfg \n",
+ "print(\"h6=hf at 0.05 bar=137.82 KJ/kg\")\n",
+ "h6=137.82;\n",
+ "print(\"v6=vf at 0.05 bar=0.001005 m^3/kg\")\n",
+ "v6=0.001005;\n",
+ "p1=50.;#steam generation pressure in bar\n",
+ "p6=0.05;#steam entering temperature in turbine in bar\n",
+ "h1=h6+v6*(p1-p6)*100\n",
+ "print(\"for process 6-1 in feed pump,h1 in KJ/kg=\"),round(h1,2)\n",
+ "print(\"cycle efficiency=W_net/Q_add\")\n",
+ "Wt=(h2-h3)+(h4-h5)\n",
+ "print(\"Wt in KJ/kg=\"),round(Wt,2)\n",
+ "W_pump=(h1-h6)\n",
+ "print(\"W_pump=(h1-h6)in KJ/kg\"),round(W_pump,2)\n",
+ "W_net=Wt-W_pump\n",
+ "print(\"W_net=Wt-W_pump in KJ/kg\"),round(W_net,2)\n",
+ "Q_add=(h2-h1)\n",
+ "print(\"Q_add in KJ/kg=\"),round(Q_add,2)\n",
+ "print(\"cycle efficiency=\"),round(W_net/Q_add,4)\n",
+ "W_net*100/Q_add\n",
+ "print(\"in percentage=\"),round(W_net*100/Q_add,2)\n",
+ "print(\"we know ,1 hp=0.7457 KW\")\n",
+ "print(\"specific steam consumption in kg/hp hr=\"),round(0.7457*3600/W_net,2)\n",
+ "print(\"work ratio=net work/positive work\"),round(W_net/Wt,4)\n",
+ "print(\"so cycle efficiency=45.74%,specific steam consumption =1.78 kg/hp hr,work ratio=0.9967\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 8.8;pg no: 273"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 95,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 8.8, Page:273 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 8\n",
+ "from steam tables,at state 2,h2=3301.8 KJ/kg,s2=6.7193 KJ/kg K\n",
+ "h5=hf at 0.05 bar=137.82 KJ/kg,v5= vf at 0.05 bar=0.001005 m^3/kg\n",
+ "Let mass of steam bled for feed heating be m kg/kg of steam generated in boiler.Let us also assume that condensate leaves closed feed water heater as saturated liquid i.e\n",
+ "h8=hf at 3 bar=561.47 KJ/kg\n",
+ "for process 2-3-4,s2=s3=s4=6.7193 KJ/kg K\n",
+ "Let dryness fraction at state 3 and state 4 be x3 and x4 respectively.\n",
+ "s3=6.7193=sf at 3 bar+x3* sfg at 3 bar\n",
+ "from steam tables,sf=1.6718 KJ/kg K,sfg=5.3201 KJ/kg K\n",
+ "so x3= 0.95\n",
+ "s4=6.7193=sf at 0.05 bar+x4* sfg at 0.05 bar\n",
+ "from steam tables,at 0.05 bar,sf=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\n",
+ "so x4= 0.79\n",
+ "thus,h3=hf at 3 bar+x3* hfg at 3 bar in KJ/kg\n",
+ "here from steam tables,at 3 bar,hf_3bar=561.47 KJ/kg,hfg_3bar=2163.8 KJ/kg K\n",
+ "h4=hf at 0.05 bar+x4*hfg at 0.05 bar in KJ/kg\n",
+ "from steam tables,at 0.05 bar,hf=137.82 KJ/kg,hfg=2423.7 KJ/kg\n",
+ "assuming process across trap to be of throttling type so,h8=h9=561.47 KJ/kg.Assuming v5=v6,\n",
+ "pumping work=(h7-h6)=v5*(p1-p5)in KJ/kg\n",
+ "for mixing process between condenser and feed pump,\n",
+ "(1-m)*h5+m*h9=1*h6\n",
+ "h6=m(h9-h5)+h5\n",
+ "we get,h6=137.82+m*423.65\n",
+ "therefore h7=h6+6.02=143.84+m*423.65\n",
+ "Applying energy balance at closed feed water heater;\n",
+ "m*h3+(1-m)*h7=m*h8+(Cp*T_cond)\n",
+ "so (m*2614.92)+(1-m)*(143.84+m*423.65)=m*561.47+480.7\n",
+ "so m=0.144 kg\n",
+ "steam bled for feed heating=0.144 kg/kg steam generated\n",
+ "The net power output,W_net in KJ/kg steam generated= 1167.27\n",
+ "mass of steam required to be generated in kg/s= 26.23\n",
+ "or in kg/hr\n",
+ "so capacity of boiler required=94428 kg/hr\n",
+ "overall thermal efficiency=W_net/Q_add\n",
+ "here Q_add in KJ/kg= 3134.56\n",
+ "overall thermal efficiency= 0.37\n",
+ "in percentage= 37.24\n",
+ "so overall thermal efficiency=37.24%\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of mass of steam bled for feed heating,capacity of boiler required,overall thermal efficiency\n",
+ "#intiation of all variables\n",
+ "# Chapter 8\n",
+ "print\"Example 8.8, Page:273 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 8\")\n",
+ "T_cond=115;#condensate temperature in degree celcius\n",
+ "Cp=4.18;#specific heat at constant pressure in KJ/kg K\n",
+ "P=30*10**3;#actual alternator output in KW\n",
+ "n_boiler=0.9;#boiler efficiency\n",
+ "n_alternator=0.98;#alternator efficiency\n",
+ "print(\"from steam tables,at state 2,h2=3301.8 KJ/kg,s2=6.7193 KJ/kg K\")\n",
+ "h2=3301.8;\n",
+ "s2=6.7193;\n",
+ "print(\"h5=hf at 0.05 bar=137.82 KJ/kg,v5= vf at 0.05 bar=0.001005 m^3/kg\")\n",
+ "h5=137.82;\n",
+ "v5=0.001005;\n",
+ "print(\"Let mass of steam bled for feed heating be m kg/kg of steam generated in boiler.Let us also assume that condensate leaves closed feed water heater as saturated liquid i.e\")\n",
+ "print(\"h8=hf at 3 bar=561.47 KJ/kg\")\n",
+ "h8=561.47;\n",
+ "print(\"for process 2-3-4,s2=s3=s4=6.7193 KJ/kg K\")\n",
+ "s3=s2;\n",
+ "s4=s3;\n",
+ "print(\"Let dryness fraction at state 3 and state 4 be x3 and x4 respectively.\")\n",
+ "print(\"s3=6.7193=sf at 3 bar+x3* sfg at 3 bar\")\n",
+ "print(\"from steam tables,sf=1.6718 KJ/kg K,sfg=5.3201 KJ/kg K\")\n",
+ "sf_3bar=1.6718;\n",
+ "sfg_3bar=5.3201;\n",
+ "x3=(s3-sf_3bar)/sfg_3bar\n",
+ "print(\"so x3=\"),round(x3,2)\n",
+ "x3=0.949;#approx.\n",
+ "print(\"s4=6.7193=sf at 0.05 bar+x4* sfg at 0.05 bar\")\n",
+ "print(\"from steam tables,at 0.05 bar,sf=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\")\n",
+ "sf=0.4764;\n",
+ "sfg=7.9187;\n",
+ "x4=(s4-sf)/sfg\n",
+ "print(\"so x4=\"),round(x4,2)\n",
+ "x4=0.788;#approx.\n",
+ "print(\"thus,h3=hf at 3 bar+x3* hfg at 3 bar in KJ/kg\")\n",
+ "print(\"here from steam tables,at 3 bar,hf_3bar=561.47 KJ/kg,hfg_3bar=2163.8 KJ/kg K\")\n",
+ "hf_3bar=561.47;\n",
+ "hfg_3bar=2163.8;\n",
+ "h3=hf_3bar+x3*hfg_3bar \n",
+ "print(\"h4=hf at 0.05 bar+x4*hfg at 0.05 bar in KJ/kg\")\n",
+ "print(\"from steam tables,at 0.05 bar,hf=137.82 KJ/kg,hfg=2423.7 KJ/kg\")\n",
+ "hf=137.82;\n",
+ "hfg=2423.7;\n",
+ "h4=hf+x4*hfg\n",
+ "print(\"assuming process across trap to be of throttling type so,h8=h9=561.47 KJ/kg.Assuming v5=v6,\")\n",
+ "h9=h8;\n",
+ "v6=v5;\n",
+ "print(\"pumping work=(h7-h6)=v5*(p1-p5)in KJ/kg\")\n",
+ "p1=60;#pressure of steam in high pressure turbine in bar\n",
+ "p5=0.05;#pressure of steam in low pressure turbine in bar\n",
+ "v5*(p1-p5)*100\n",
+ "print(\"for mixing process between condenser and feed pump,\")\n",
+ "print(\"(1-m)*h5+m*h9=1*h6\")\n",
+ "print(\"h6=m(h9-h5)+h5\")\n",
+ "print(\"we get,h6=137.82+m*423.65\")\n",
+ "print(\"therefore h7=h6+6.02=143.84+m*423.65\")\n",
+ "print(\"Applying energy balance at closed feed water heater;\")\n",
+ "print(\"m*h3+(1-m)*h7=m*h8+(Cp*T_cond)\")\n",
+ "print(\"so (m*2614.92)+(1-m)*(143.84+m*423.65)=m*561.47+480.7\")\n",
+ "print(\"so m=0.144 kg\")\n",
+ "m=0.144;\n",
+ "h6=137.82+m*423.65;\n",
+ "h7=143.84+m*423.65;\n",
+ "print(\"steam bled for feed heating=0.144 kg/kg steam generated\")\n",
+ "W_net=(h2-h3)+(1-m)*(h3-h4)-(1-m)*(h7-h6)\n",
+ "print(\"The net power output,W_net in KJ/kg steam generated=\"),round(W_net,2)\n",
+ "P/(n_alternator*W_net)\n",
+ "print(\"mass of steam required to be generated in kg/s=\"),round(P/(n_alternator*W_net),2)\n",
+ "print(\"or in kg/hr\")\n",
+ "26.23*3600\n",
+ "print(\"so capacity of boiler required=94428 kg/hr\")\n",
+ "print(\"overall thermal efficiency=W_net/Q_add\")\n",
+ "Q_add=(h2-Cp*T_cond)/n_boiler\n",
+ "print(\"here Q_add in KJ/kg=\"),round(Q_add,2) \n",
+ "W_net/Q_add\n",
+ "print(\"overall thermal efficiency=\"),round(W_net/Q_add,2)\n",
+ "W_net*100/Q_add\n",
+ "print(\"in percentage=\"),round(W_net*100/Q_add,2)\n",
+ "print(\"so overall thermal efficiency=37.24%\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 8.9;pg no: 275"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 96,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 8.9, Page:275 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 9\n",
+ "At inlet to first turbine stage,h2=3230.9 KJ/kg,s2=6.9212 KJ/kg K\n",
+ "For ideal expansion process,s2=s3\n",
+ "By interpolation,T3=190.97 degree celcius from superheated steam tables at 6 bar,h3=2829.63 KJ/kg\n",
+ "actual stste at exit of first stage,h3_a in KJ/kg= 2909.88\n",
+ "actual state 3_a shall be at 232.78 degree celcius,6 bar,so s3_a KJ/kg K= 7.1075\n",
+ "for second stage,s3_a=s4;By interpolation,s4=7.1075=sf at 1 bar+x4*sfg at 1 bar\n",
+ "from steam tables,at 1 bar,sf=1.3026 KJ/kg K,sfg=6.0568 KJ/kg K\n",
+ "so x4= 0.96\n",
+ "h4=hf at 1 bar+x4*hfg at 1 bar in KJ/kg\n",
+ "from steam tables,at 1 bar,hf=417.46 KJ/kg,hfg=2258.0 KJ/kg\n",
+ "actual enthalpy at exit from second stage,h4_a in KJ/kg= 2646.48\n",
+ "actual dryness fraction,x4_a=>h4_a=hf at 1 bar+x4_a*hfg at 1 bar\n",
+ "so x4_a= 0.99\n",
+ "x4_a=0.987,actual entropy,s4_a=7.2806 KJ/kg K\n",
+ "for third stage,s4_a=7.2806=sf at 0.075 bar+x5*sfg at 0.075 bar\n",
+ "from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\n",
+ "so x5= 0.87\n",
+ "h5=2270.43 KJ/kg\n",
+ "actual enthalpy at exit from third stage,h5_a in KJ/kg= 2345.64\n",
+ "Let mass of steam bled out be m1 and m2 kg at 6 bar,1 bar respectively.\n",
+ "By heat balance on first closed feed water heater,(see schematic arrangement)\n",
+ "h11=hf at 6 bar=670.56 KJ\n",
+ "m1*h3_a+h10=m1*h11+4.18*150\n",
+ "(m1*2829.63)+h10=(m1*670.56)+627\n",
+ "h10+2159.07*m1=627\n",
+ "By heat balance on second closed feed water heater,(see schematic arrangement)\n",
+ "h7=hf at 1 bar=417.46 KJ/kg\n",
+ "m2*h4+(1-m1-m2)*4.18*38=(m1+m2)*h7+4.18*95*(1-m1-m2)\n",
+ "m2*2646.4+(1-m1-m2)*158.84=((m1+m2)*417.46)+(397.1*(1-m1-m2))\n",
+ "m2*2467.27-m1*179.2-238.26=0\n",
+ "heat balance at point of mixing,\n",
+ "h10=(m1+m2)*h8+(1-m1-m2)*4.18*95\n",
+ "neglecting pump work,h7=h8\n",
+ "h10=m2*417.46+(1-m1-m2)*397.1\n",
+ "substituting h10 and solving we get,m1=0.1293 kg and m2=0.1059 kg/kg of steam generated\n",
+ "Turbine output per kg of steam generated,Wt in KJ/kg of steam generated= 780.445\n",
+ "Rate of steam generation required in kg/s= 19.22\n",
+ "in kg/hr\n",
+ "capacity of drain pump i.e. FP shown in layout in kg/hr= 16273.96\n",
+ "so capacity of drain pump=16273.96 kg/hr\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of capacity of drain pump\n",
+ "#intiation of all variables\n",
+ "# Chapter 8\n",
+ "print\"Example 8.9, Page:275 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 9\")\n",
+ "P=15*10**3;#turbine output in KW\n",
+ "print(\"At inlet to first turbine stage,h2=3230.9 KJ/kg,s2=6.9212 KJ/kg K\")\n",
+ "h2=3230.9;\n",
+ "s2=6.9212;\n",
+ "print(\"For ideal expansion process,s2=s3\")\n",
+ "s3=s2;\n",
+ "print(\"By interpolation,T3=190.97 degree celcius from superheated steam tables at 6 bar,h3=2829.63 KJ/kg\")\n",
+ "T3=190.97;\n",
+ "h3=2829.63;\n",
+ "h3_a=h2-0.8*(h2-h3)\n",
+ "print(\"actual stste at exit of first stage,h3_a in KJ/kg=\"),round(h3_a,2)\n",
+ "s3_a=7.1075;\n",
+ "print(\"actual state 3_a shall be at 232.78 degree celcius,6 bar,so s3_a KJ/kg K=\"),round(s3_a,4)\n",
+ "print(\"for second stage,s3_a=s4;By interpolation,s4=7.1075=sf at 1 bar+x4*sfg at 1 bar\")\n",
+ "s4=7.1075;\n",
+ "print(\"from steam tables,at 1 bar,sf=1.3026 KJ/kg K,sfg=6.0568 KJ/kg K\")\n",
+ "sf=1.3026;\n",
+ "sfg=6.0568;\n",
+ "x4=(s4-sf)/sfg\n",
+ "print(\"so x4=\"),round(x4,2)\n",
+ "x4=0.958;#approx.\n",
+ "print(\"h4=hf at 1 bar+x4*hfg at 1 bar in KJ/kg\")\n",
+ "print(\"from steam tables,at 1 bar,hf=417.46 KJ/kg,hfg=2258.0 KJ/kg\")\n",
+ "hf=417.46;\n",
+ "hfg=2258.0;\n",
+ "h4=hf+x4*hfg\n",
+ "h4_a=h3_a-.8*(h3_a-h4)\n",
+ "print(\"actual enthalpy at exit from second stage,h4_a in KJ/kg=\"),round(h4_a,2)\n",
+ "print(\"actual dryness fraction,x4_a=>h4_a=hf at 1 bar+x4_a*hfg at 1 bar\")\n",
+ "x4_a=(h4_a-hf)/hfg\n",
+ "print(\"so x4_a=\"),round(x4_a,2)\n",
+ "print(\"x4_a=0.987,actual entropy,s4_a=7.2806 KJ/kg K\")\n",
+ "s4_a=7.2806;\n",
+ "print(\"for third stage,s4_a=7.2806=sf at 0.075 bar+x5*sfg at 0.075 bar\")\n",
+ "print(\"from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\")\n",
+ "sf=0.5764;\n",
+ "sfg=7.6750;\n",
+ "x5=(s4_a-sf)/sfg\n",
+ "print(\"so x5=\"),round(x5,2)\n",
+ "x5=0.8735;#approx.\n",
+ "print(\"h5=2270.43 KJ/kg\")\n",
+ "h5=2270.43;\n",
+ "h5_a=h4_a-0.8*(h4_a-h5)\n",
+ "print(\"actual enthalpy at exit from third stage,h5_a in KJ/kg=\"),round(h5_a,2)\n",
+ "print(\"Let mass of steam bled out be m1 and m2 kg at 6 bar,1 bar respectively.\")\n",
+ "print(\"By heat balance on first closed feed water heater,(see schematic arrangement)\")\n",
+ "print(\"h11=hf at 6 bar=670.56 KJ\")\n",
+ "h11=670.56;\n",
+ "print(\"m1*h3_a+h10=m1*h11+4.18*150\")\n",
+ "print(\"(m1*2829.63)+h10=(m1*670.56)+627\")\n",
+ "print(\"h10+2159.07*m1=627\")\n",
+ "print(\"By heat balance on second closed feed water heater,(see schematic arrangement)\")\n",
+ "print(\"h7=hf at 1 bar=417.46 KJ/kg\")\n",
+ "h7=417.46;\n",
+ "print(\"m2*h4+(1-m1-m2)*4.18*38=(m1+m2)*h7+4.18*95*(1-m1-m2)\")\n",
+ "print(\"m2*2646.4+(1-m1-m2)*158.84=((m1+m2)*417.46)+(397.1*(1-m1-m2))\")\n",
+ "print(\"m2*2467.27-m1*179.2-238.26=0\")\n",
+ "print(\"heat balance at point of mixing,\")\n",
+ "print(\"h10=(m1+m2)*h8+(1-m1-m2)*4.18*95\")\n",
+ "print(\"neglecting pump work,h7=h8\")\n",
+ "print(\"h10=m2*417.46+(1-m1-m2)*397.1\")\n",
+ "print(\"substituting h10 and solving we get,m1=0.1293 kg and m2=0.1059 kg/kg of steam generated\")\n",
+ "m1=0.1293;\n",
+ "m2=0.1059;\n",
+ "Wt=(h2-h3_a)+(1-m1)*(h3_a-h4_a)+(1-m1-m2)*(h4_a-h5_a)\n",
+ "print(\"Turbine output per kg of steam generated,Wt in KJ/kg of steam generated=\"),round(Wt,3)\n",
+ "P/Wt\n",
+ "print(\"Rate of steam generation required in kg/s=\"),round(P/Wt,2)\n",
+ "print(\"in kg/hr\")\n",
+ "P*3600/Wt\n",
+ "(m1+m2)*69192\n",
+ "print(\"capacity of drain pump i.e. FP shown in layout in kg/hr=\"),round((m1+m2)*69192,2)\n",
+ "print(\"so capacity of drain pump=16273.96 kg/hr\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 8.10;pg no: 277"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 97,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 8.10, Page:277 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 10\n",
+ "at inlet to HP turbine,h2=3287.1 KJ/kg,s2=6.6327 KJ/kg K\n",
+ "By interpolation state 3 i.e. for isentropic expansion betweeen 2-3 lies at 328.98oc at 30 bar.h3=3049.48 KJ/kg\n",
+ "actual enthapy at 3_a,h3_a in KJ/kg= 3097.0\n",
+ "enthalpy at inlet to LP turbine,h4=3230.9 KJ/kg,s4=6.9212 KJ K\n",
+ "for ideal expansion from 4-6,s4=s6.Let dryness fraction at state 6 be x6.\n",
+ "s6=6.9212=sf at 0.075 bar+x6* sfg at 0.075 bar in KJ/kg K\n",
+ "from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\n",
+ "so x6= 0.83\n",
+ "h6=hf at 0.075 bar+x6*hfg at 0.075 bar in KJ/kg K\n",
+ "from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\n",
+ "for actual expansion process in LP turbine.\n",
+ "h6_a=h4-0.85*(h4-h6) in KJ/kg 2319.4\n",
+ "Ideally,enthalpy at bleed point can be obtained by locating state 5 using s5=s4.The pressure at bleed point shall be saturation pressure corresponding to the 140oc i.e from steam tables.Let dryness fraction at state 5 be x5.\n",
+ "s5_a=6.9212=sf at 140oc+x5*sfg at 140oc\n",
+ "from steam tables,at 140oc,sf=1.7391 KJ/kg K,sfg=5.1908 KJ/kg K\n",
+ "so x5= 1.0\n",
+ "h5=hf at 140oc+x5*hfg at 140oc in KJ/kg\n",
+ "from steam tables,at 140oc,hf=589.13 KJ/kg,hfg=2144.7 KJ/kg\n",
+ "actual enthalpy,h5_a in KJ/kg= 2790.16\n",
+ "enthalpy at exit of open feed water heater,h9=hf at 30 bar=1008.42 KJ/kg\n",
+ "specific volume at inlet of CEP,v7=0.001008 m^3/kg\n",
+ "enthalpy at inlet of CEP,h7=168.79 KJ/kg\n",
+ "for pumping process 7-8,h8 in KJ/kg= 169.15\n",
+ "Applying energy balance at open feed water heater.Let mass of bled steam be m kg per kg of steam generated.\n",
+ "m*h5+(1-m)*h8=h9\n",
+ "so m in kg /kg of steam generated= 0.33\n",
+ "For process on feed pump,9-1,v9=vf at 140oc=0.00108 m^3/kg\n",
+ "h1= in KJ/kg= 1015.59\n",
+ "Net work per kg of steam generated,W_net=in KJ/kg steam generated= 938.83\n",
+ "heat added per kg of steam generated,q_add in KJ/kg of steam generated= 2405.41\n",
+ "Thermal efficiency,n= 0.39\n",
+ "in percentage= 39.03\n",
+ "so thermal efficiency=39.03%%\n",
+ "NOTE=>In this question there is some calculation mistake while calculating W_net and q_add in book, which is corrected above and the answers may vary.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of cycle efficiency\n",
+ "#intiation of all variables\n",
+ "# Chapter 8\n",
+ "print\"Example 8.10, Page:277 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 10\")\n",
+ "print(\"at inlet to HP turbine,h2=3287.1 KJ/kg,s2=6.6327 KJ/kg K\")\n",
+ "h2=3287.1;\n",
+ "s2=6.6327;\n",
+ "print(\"By interpolation state 3 i.e. for isentropic expansion betweeen 2-3 lies at 328.98oc at 30 bar.h3=3049.48 KJ/kg\")\n",
+ "h3=3049.48;\n",
+ "h3_a=h2-0.80*(h2-h3)\n",
+ "print(\"actual enthapy at 3_a,h3_a in KJ/kg=\"),round(h3_a,2)\n",
+ "print(\"enthalpy at inlet to LP turbine,h4=3230.9 KJ/kg,s4=6.9212 KJ K\")\n",
+ "h4=3230.9;\n",
+ "s4=6.9212;\n",
+ "print(\"for ideal expansion from 4-6,s4=s6.Let dryness fraction at state 6 be x6.\")\n",
+ "s6=s4;\n",
+ "print(\"s6=6.9212=sf at 0.075 bar+x6* sfg at 0.075 bar in KJ/kg K\")\n",
+ "print(\"from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\")\n",
+ "sf=0.5764;\n",
+ "sfg=7.6750;\n",
+ "x6=(s6-sf)/sfg\n",
+ "print(\"so x6=\"),round(x6,2)\n",
+ "x6=0.827;#approx.\n",
+ "print(\"h6=hf at 0.075 bar+x6*hfg at 0.075 bar in KJ/kg K\")\n",
+ "print(\"from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\")\n",
+ "hf=168.79;\n",
+ "hfg=2406.0;\n",
+ "h6=hf+x6*hfg\n",
+ "print(\"for actual expansion process in LP turbine.\")\n",
+ "h6_a=h4-0.85*(h4-h6)\n",
+ "print(\"h6_a=h4-0.85*(h4-h6) in KJ/kg\"),round(h6_a,2)\n",
+ "print(\"Ideally,enthalpy at bleed point can be obtained by locating state 5 using s5=s4.The pressure at bleed point shall be saturation pressure corresponding to the 140oc i.e from steam tables.Let dryness fraction at state 5 be x5.\")\n",
+ "p5=3.61;\n",
+ "s5=s4;\n",
+ "print(\"s5_a=6.9212=sf at 140oc+x5*sfg at 140oc\")\n",
+ "print(\"from steam tables,at 140oc,sf=1.7391 KJ/kg K,sfg=5.1908 KJ/kg K\")\n",
+ "sf=1.7391;\n",
+ "sfg=5.1908;\n",
+ "x5=(s5-sf)/sfg\n",
+ "print(\"so x5=\"),round(x5,2)\n",
+ "x5=0.99;#approx.\n",
+ "print(\"h5=hf at 140oc+x5*hfg at 140oc in KJ/kg\")\n",
+ "print(\"from steam tables,at 140oc,hf=589.13 KJ/kg,hfg=2144.7 KJ/kg\")\n",
+ "hf=589.13;\n",
+ "hfg=2144.7;\n",
+ "h5=hf+x5*hfg\n",
+ "h5_a=h4-0.85*(h4-h5)\n",
+ "print(\"actual enthalpy,h5_a in KJ/kg=\"),round(h5_a,2)\n",
+ "print(\"enthalpy at exit of open feed water heater,h9=hf at 30 bar=1008.42 KJ/kg\")\n",
+ "h9=1008.42;\n",
+ "print(\"specific volume at inlet of CEP,v7=0.001008 m^3/kg\")\n",
+ "v7=0.001008;\n",
+ "print(\"enthalpy at inlet of CEP,h7=168.79 KJ/kg\")\n",
+ "h7=168.79;\n",
+ "h8=h7+v7*(3.61-0.075)*10**2\n",
+ "print(\"for pumping process 7-8,h8 in KJ/kg=\"),round(h8,2)\n",
+ "print(\"Applying energy balance at open feed water heater.Let mass of bled steam be m kg per kg of steam generated.\")\n",
+ "print(\"m*h5+(1-m)*h8=h9\")\n",
+ "m=(h9-h8)/(h5-h8)\n",
+ "print(\"so m in kg /kg of steam generated=\"),round(m,2)\n",
+ "print(\"For process on feed pump,9-1,v9=vf at 140oc=0.00108 m^3/kg\")\n",
+ "v9=0.00108;\n",
+ "h1=h9+v9*(70-3.61)*10**2\n",
+ "print(\"h1= in KJ/kg=\"),round(h1,2) \n",
+ "W_net=(h2-h3_a)+(h4-h5_a)+(1-m)*(h5_a-h6_a)-((1-m)*(h8-h7)+(h1-h9))\n",
+ "print(\"Net work per kg of steam generated,W_net=in KJ/kg steam generated=\"),round(W_net,2)\n",
+ "q_add=(h2-h1)+(h4-h3_a)\n",
+ "print(\"heat added per kg of steam generated,q_add in KJ/kg of steam generated=\"),round(q_add,2)\n",
+ "n=W_net/q_add\n",
+ "print(\"Thermal efficiency,n=\"),round(n,2)\n",
+ "n=n*100\n",
+ "print(\"in percentage=\"),round(n,2)\n",
+ "print(\"so thermal efficiency=39.03%%\")\n",
+ "print(\"NOTE=>In this question there is some calculation mistake while calculating W_net and q_add in book, which is corrected above and the answers may vary.\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 8.11;pg no: 279"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 98,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 8.11, Page:279 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 11\n",
+ "Enthalpy of steam entering ST1,h2=3308.6 KJ/kg,s2=6.3443 KJ/kg K\n",
+ "for isentropic expansion 2-3-4-5,s2=s3=s4=s5\n",
+ "Let dryness fraction of states 3,4 and 5 be x3,x4 and x5\n",
+ "s3=6.3443=sf at 10 bar+x3*sfg at 10 bar\n",
+ "so x3=(s3-sf)/sfg\n",
+ "from steam tables,at 10 bar,sf=2.1387 KJ/kg K,sfg=4.4478 KJ/kg K\n",
+ "h3=hf+x3*hfg in KJ/kg\n",
+ "from steam tables,hf=762.81 KJ/kg,hfg=2015.3 KJ/kg\n",
+ "s4=6.3443=sf at 1.5 bar+x4*sfg at 1.5 bar\n",
+ "so x4=(s4-sf)/sfg\n",
+ "from steam tables,at 1.5 bar,sf=1.4336 KJ/kg K,sfg=5.7897 KJ/kg K\n",
+ "so h4=hf+x4*hfg in KJ/kg\n",
+ "from steam tables,at 1.5 bar,hf=467.11 KJ/kg,hfg=2226.5 KJ/kg\n",
+ "s5=6.3443=sf at 0.05 bar+x5*sfg at 0.05 bar\n",
+ "so x5=(s5-sf)/sfg\n",
+ "from steam tables,at 0.05 bar,sf=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\n",
+ "h5=hf+x5*hfg in KJ/kg\n",
+ "from steam tables,at 0.05 bar,hf=137.82 KJ/kg,hfg=2423.7 KJ/kg\n",
+ "h6=hf at 0.05 bar=137.82 KJ/kg\n",
+ "v6=vf at 0.05 bar=0.001005 m^3/kg\n",
+ "h7=h6+v6*(1.5-0.05)*10^2 in KJ/kg\n",
+ "h8=hf at 1.5 bar=467.11 KJ/kg\n",
+ "v8=0.001053 m^3/kg=vf at 1.5 bar\n",
+ "h9=h8+v8*(150-1.5)*10^2 in KJ/kg\n",
+ "h10=hf at 150 bar=1610.5 KJ/kg\n",
+ "v10=0.001658 m^3/kg=vf at 150 bar\n",
+ "h12=h10+v10*(150-10)*10^2 in KJ/kg\n",
+ "Let mass of steam bled out at 10 bar,1.5 bar be m1 and m2 per kg of steam generated.\n",
+ "Heat balance on closed feed water heater yields,\n",
+ "m1*h3+(1-m)*h9=m1*h10+(1-m1)*4.18*150\n",
+ "so m1=(4.18*150-h9)/(h3-h9-h10+4.18*150)in kg/kg of steam generated.\n",
+ "heat balance on open feed water can be given as under,\n",
+ "m2*h4+(1-m1-m2)*h7=(1-m1)*h8\n",
+ "so m2=((1-m1)*(h8-h7))/(h4-h7)in kg/kg of steam\n",
+ "for mass flow rate of 300 kg/s=>m1=36 kg/s,m2=39 kg/s\n",
+ "For mixing after closed feed water heater,\n",
+ "h1=(4.18*150)*(1-m1)+m1*h12 in KJ/kg\n",
+ "Net work output per kg of steam generated=W_ST1+W_ST2+W_ST3-{W_CEP+W_FP+W_FP2}\n",
+ "W_net=(h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-{(1-m1-m2)*(h7-h6)+(1-m1)*(h9-h8)+(m1*(h12-h10))}in KJ/kg of steam generated.\n",
+ "heat added per kg of steam generated,q_add=(h2-h1) in KJ/kg\n",
+ "cycle thermal efficiency,n=W_net/q_add 0.48\n",
+ "in percentage 47.59\n",
+ "Net power developed in KW=1219*300 in KW 365700.0\n",
+ "cycle thermal efficiency=47.6%\n",
+ "Net power developed=365700 KW\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of cycle thermal efficiency,Net power developed\n",
+ "#intiation of all variables\n",
+ "# Chapter 8\n",
+ "print\"Example 8.11, Page:279 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 11\")\n",
+ "print(\"Enthalpy of steam entering ST1,h2=3308.6 KJ/kg,s2=6.3443 KJ/kg K\")\n",
+ "h2=3308.6;\n",
+ "s2=6.3443;\n",
+ "print(\"for isentropic expansion 2-3-4-5,s2=s3=s4=s5\")\n",
+ "s3=s2;\n",
+ "s4=s3;\n",
+ "s5=s4;\n",
+ "print(\"Let dryness fraction of states 3,4 and 5 be x3,x4 and x5\")\n",
+ "print(\"s3=6.3443=sf at 10 bar+x3*sfg at 10 bar\")\n",
+ "print(\"so x3=(s3-sf)/sfg\")\n",
+ "print(\"from steam tables,at 10 bar,sf=2.1387 KJ/kg K,sfg=4.4478 KJ/kg K\")\n",
+ "sf=2.1387;\n",
+ "sfg=4.4478;\n",
+ "x3=(s3-sf)/sfg\n",
+ "x3=0.945;#approx.\n",
+ "print(\"h3=hf+x3*hfg in KJ/kg\")\n",
+ "print(\"from steam tables,hf=762.81 KJ/kg,hfg=2015.3 KJ/kg\")\n",
+ "hf=762.81;\n",
+ "hfg=2015.3;\n",
+ "h3=hf+x3*hfg\n",
+ "print(\"s4=6.3443=sf at 1.5 bar+x4*sfg at 1.5 bar\")\n",
+ "print(\"so x4=(s4-sf)/sfg\")\n",
+ "print(\"from steam tables,at 1.5 bar,sf=1.4336 KJ/kg K,sfg=5.7897 KJ/kg K\")\n",
+ "sf=1.4336;\n",
+ "sfg=5.7897;\n",
+ "x4=(s4-sf)/sfg\n",
+ "x4=0.848;#approx.\n",
+ "print(\"so h4=hf+x4*hfg in KJ/kg\")\n",
+ "print(\"from steam tables,at 1.5 bar,hf=467.11 KJ/kg,hfg=2226.5 KJ/kg\")\n",
+ "hf=467.11;\n",
+ "hfg=2226.5;\n",
+ "h4=hf+x4*hfg\n",
+ "print(\"s5=6.3443=sf at 0.05 bar+x5*sfg at 0.05 bar\")\n",
+ "print(\"so x5=(s5-sf)/sfg\")\n",
+ "print(\"from steam tables,at 0.05 bar,sf=0.4764 KJ/kg K,sfg=7.9187 KJ/kg K\")\n",
+ "sf=0.4764;\n",
+ "sfg=7.9187;\n",
+ "x5=(s5-sf)/sfg\n",
+ "x5=0.739;#approx.\n",
+ "print(\"h5=hf+x5*hfg in KJ/kg\")\n",
+ "print(\"from steam tables,at 0.05 bar,hf=137.82 KJ/kg,hfg=2423.7 KJ/kg\")\n",
+ "hf=137.82;\n",
+ "hfg=2423.7;\n",
+ "h5=hf+x5*hfg \n",
+ "print(\"h6=hf at 0.05 bar=137.82 KJ/kg\")\n",
+ "h6=137.82;\n",
+ "print(\"v6=vf at 0.05 bar=0.001005 m^3/kg\")\n",
+ "v6=0.001005;\n",
+ "print(\"h7=h6+v6*(1.5-0.05)*10^2 in KJ/kg\")\n",
+ "h7=h6+v6*(1.5-0.05)*10**2\n",
+ "print(\"h8=hf at 1.5 bar=467.11 KJ/kg\")\n",
+ "h8=467.11; \n",
+ "print(\"v8=0.001053 m^3/kg=vf at 1.5 bar\")\n",
+ "v8=0.001053;\n",
+ "print(\"h9=h8+v8*(150-1.5)*10^2 in KJ/kg\")\n",
+ "h9=h8+v8*(150-1.5)*10**2\n",
+ "print(\"h10=hf at 150 bar=1610.5 KJ/kg\")\n",
+ "h10=1610.5; \n",
+ "print(\"v10=0.001658 m^3/kg=vf at 150 bar\")\n",
+ "v10=0.001658;\n",
+ "print(\"h12=h10+v10*(150-10)*10^2 in KJ/kg\")\n",
+ "h12=h10+v10*(150-10)*10**2\n",
+ "print(\"Let mass of steam bled out at 10 bar,1.5 bar be m1 and m2 per kg of steam generated.\")\n",
+ "print(\"Heat balance on closed feed water heater yields,\")\n",
+ "print(\"m1*h3+(1-m)*h9=m1*h10+(1-m1)*4.18*150\")\n",
+ "print(\"so m1=(4.18*150-h9)/(h3-h9-h10+4.18*150)in kg/kg of steam generated.\")\n",
+ "m1=(4.18*150-h9)/(h3-h9-h10+4.18*150)\n",
+ "print(\"heat balance on open feed water can be given as under,\")\n",
+ "print(\"m2*h4+(1-m1-m2)*h7=(1-m1)*h8\")\n",
+ "print(\"so m2=((1-m1)*(h8-h7))/(h4-h7)in kg/kg of steam\")\n",
+ "m2=((1-m1)*(h8-h7))/(h4-h7)\n",
+ "print(\"for mass flow rate of 300 kg/s=>m1=36 kg/s,m2=39 kg/s\")\n",
+ "print(\"For mixing after closed feed water heater,\")\n",
+ "print(\"h1=(4.18*150)*(1-m1)+m1*h12 in KJ/kg\")\n",
+ "h1=(4.18*150)*(1-m1)+m1*h12\n",
+ "print(\"Net work output per kg of steam generated=W_ST1+W_ST2+W_ST3-{W_CEP+W_FP+W_FP2}\")\n",
+ "print(\"W_net=(h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-{(1-m1-m2)*(h7-h6)+(1-m1)*(h9-h8)+(m1*(h12-h10))}in KJ/kg of steam generated.\")\n",
+ "W_net=(h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-((1-m1-m2)*(h7-h6)+(1-m1)*(h9-h8)+(m1*(h12-h10)))\n",
+ "print(\"heat added per kg of steam generated,q_add=(h2-h1) in KJ/kg\")\n",
+ "q_add=(h2-h1)\n",
+ "n=W_net/q_add\n",
+ "print(\"cycle thermal efficiency,n=W_net/q_add\"),round(n,2)\n",
+ "print(\"in percentage\"),round(n*100,2)\n",
+ "print(\"Net power developed in KW=1219*300 in KW\"),round(1219*300,2)\n",
+ "print(\"cycle thermal efficiency=47.6%\")\n",
+ "print(\"Net power developed=365700 KW\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 8.12;pg no: 282"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 99,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 8.12, Page:282 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 12\n",
+ "At inlet to HPT,h2=3373.7 KJ/kg,s2=6.5966 KJ/kg K\n",
+ "For isentropic expansion between 2-3-4-5,s2=s3=s4=s5\n",
+ "state 3 lies in superheated region as s3>sg at 20 bar.By interpolation from superheated steam table,T3=261.6oc.Enthalpy at 3,h3=2930.57 KJ/kg\n",
+ "since s4<sg at 4 bar so state 4 and 5 lies in wet region.\n",
+ "Let dryness fraction at state 4 ans 5 be x4 and x5.\n",
+ "s4=6.5966=sf at 4 bar+x4*sfg at 4 bar\n",
+ "from steam tables,at 4 bar,sf=1.7766 KJ/kg K,sfg=5.1193 KJ/kg K\n",
+ "x4=(s4-sf)/sfg\n",
+ "h4=hf at 4 bar+x4*hfg at 4 bar in KJ/kg\n",
+ "from steam tables,at 4 bar,hf=604.74 KJ/kg,hfg=2133.8 KJ/kg\n",
+ "for state 5,\n",
+ "s5=6.5966=sf at 0.075 bar+x5*sfg at 0.075 bar\n",
+ "from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\n",
+ "x5=(s5-sf)/sfg\n",
+ "h5=hf at 0.075 bar+x5*hfg at 0.075 bar in KJ/kg\n",
+ "from steam tables,at 0.075 bar,hf=168.76 KJ/kg,hfg=2406.0 KJ/kg\n",
+ "Let mass of steam bled at 20 bar be m1 and m2 per kg of steam generated.\n",
+ "h10=hf at 20 bar=908.76 KJ/kg,h8=hf at 4 bar=604.74 KJ/kg\n",
+ "At trap h10=h11=908.79 KJ/kg\n",
+ "At condensate extraction pump,(CEP),h7-h6=v6*(4-0.075)*10^2 in KJ/kg\n",
+ "here v6=vf at 0.075 bar=0.001008 m^3/kg,h6=hf at 0.075 bar=168.79 KJ/kg\n",
+ "so h7=h6+v6*(4-0.075)*10^2 in KJ/kg\n",
+ "At feed pump,(FP),h9-h8=v8*(20-4)*10^2 in KJ/kg\n",
+ "here v8=vf at 4 bar=0.001084 m^3/kg,h8=hf at 4 bar=604.74 KJ/kg\n",
+ "so h9=h8+v8*(20-4)*10^2 in KJ/kg\n",
+ "Let us apply heat balance at closed feed water heater,\n",
+ "m1*h3+h9=m1*h10+4.18*200\n",
+ "so m1=(4.18*200-h9)/(h3-h10) in kg\n",
+ "Applying heat balance at open feed water,\n",
+ "m1*h11+m2*h4+(1-m1-m2)*h7=h8\n",
+ "so m2=(h8-m1*h11-h7+m1*h7)/(h4-h7) in kg\n",
+ "Net work per kg steam generated,\n",
+ "w_net=(h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-{(1-m1-m2)*(h7-h6)+(h9-h8)} in KJ/kg\n",
+ "Heat added per kg steam generated,q_add=(h2-h1) in KJ/kg\n",
+ "Thermal efficiency=w_net/q_add 0.45\n",
+ "in percentage 44.78\n",
+ "steam generation rate=P/w_net in kg/s 87.99\n",
+ "so thermal efficiency=44.78%\n",
+ "steam generation rate=87.99 kg/s\n",
+ "a> For the reheating introduced at 20 bar up to 400oc.The modified cycle representation is shown on T-S diagram by 1-2-3-3_a-4_a-5_a-6-7-8-9-10-11\n",
+ "At state 2,h2=3373.7 KJ/kg,s2=6.5966 KJ/kg K\n",
+ "At state 3,h3=2930.57 KJ/kg\n",
+ "At state 3_a,h3_a=3247.6 KJ/kg,s3_a=7.1271 KJ/kg K\n",
+ "At state 4_a and 5_a,s3_a=s4_a=s5_a=7.1271 KJ/kg K\n",
+ "From steam tables by interpolation state 4_a is seen to be at 190.96oc at 4 bar,h4_a=2841.02 KJ/kg\n",
+ "Let dryness fraction at state 5_a be x5,\n",
+ "s5_a=7.1271=sf at 0.075 bar+x5_a*sfg at 0.075 bar\n",
+ "from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\n",
+ "so x5_a=(s5_a-sf)/sfg\n",
+ "h5_a=hf at 0.075 bar+x5_a*hfg at 0.075 bar in KJ/kg\n",
+ "from steam tables,at 0.075 bar,hf=168.76 KJ/kg,hfg=2406.0 KJ/kg\n",
+ "Let mass of bled steam at 20 bar and 4 bar be m1_a,m2_a per kg of steam generated.Applying heat balance at closed feed water heater.\n",
+ "m1_a*h3+h9=m1*h10+4.18*200\n",
+ "so m1_a=(4.18*200-h9)/(h3-h10) in kg\n",
+ "Applying heat balance at open feed water heater,\n",
+ "m1_a*h11+m2_a*h4_a+(1-m1_a-m2_a)*h7=h8\n",
+ "so m2_a=(h8-m1_a*h11-h7+m1_a*h7)/(h4_a-h7) in kg\n",
+ "Net work per kg steam generated\n",
+ "w_net=(h2-h3)+(1-m1_a)*(h3_a-h4_a)+(1-m1_a-m2_a)*(h4_a-h5_a)-{(1-m1_a-m2_a)*(h7-h6)+(h9-h8)}in KJ/kg\n",
+ "Heat added per kg steam generated,q_add=(h2-h1)+(1-m1_a)*(h3_a-h3)in KJ/kg\n",
+ "Thermal efficiency,n= 0.45\n",
+ "in percentage 45.04\n",
+ "% increase in thermal efficiency due to reheating= 0.56\n",
+ "so thermal efficiency of reheat cycle=45.03%\n",
+ "% increase in efficiency due to reheating=0.56%\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of thermal efficiency,steam generation rate\n",
+ "#intiation of all variables\n",
+ "# Chapter 8\n",
+ "print\"Example 8.12, Page:282 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 12\")\n",
+ "P=100*10**3;#net power output in KW\n",
+ "print(\"At inlet to HPT,h2=3373.7 KJ/kg,s2=6.5966 KJ/kg K\")\n",
+ "h2=3373.7;\n",
+ "s2=6.5966;\n",
+ "print(\"For isentropic expansion between 2-3-4-5,s2=s3=s4=s5\")\n",
+ "s3=s2;\n",
+ "s4=s3;\n",
+ "s5=s4;\n",
+ "print(\"state 3 lies in superheated region as s3>sg at 20 bar.By interpolation from superheated steam table,T3=261.6oc.Enthalpy at 3,h3=2930.57 KJ/kg\")\n",
+ "T3=261.6;\n",
+ "h3=2930.57;\n",
+ "print(\"since s4<sg at 4 bar so state 4 and 5 lies in wet region.\")\n",
+ "print(\"Let dryness fraction at state 4 ans 5 be x4 and x5.\")\n",
+ "print(\"s4=6.5966=sf at 4 bar+x4*sfg at 4 bar\")\n",
+ "print(\"from steam tables,at 4 bar,sf=1.7766 KJ/kg K,sfg=5.1193 KJ/kg K\")\n",
+ "sf=1.7766;\n",
+ "sfg=5.1193;\n",
+ "print(\"x4=(s4-sf)/sfg\")\n",
+ "x4=(s4-sf)/sfg\n",
+ "x4=0.941;#approx.\n",
+ "print(\"h4=hf at 4 bar+x4*hfg at 4 bar in KJ/kg\")\n",
+ "print(\"from steam tables,at 4 bar,hf=604.74 KJ/kg,hfg=2133.8 KJ/kg\")\n",
+ "hf=604.74;\n",
+ "hfg=2133.8;\n",
+ "h4=hf+x4*hfg\n",
+ "print(\"for state 5,\")\n",
+ "print(\"s5=6.5966=sf at 0.075 bar+x5*sfg at 0.075 bar\")\n",
+ "print(\"from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\")\n",
+ "sf=0.5764;\n",
+ "sfg=7.6750;\n",
+ "print(\"x5=(s5-sf)/sfg\")\n",
+ "x5=(s5-sf)/sfg\n",
+ "x5=0.784;#approx.\n",
+ "print(\"h5=hf at 0.075 bar+x5*hfg at 0.075 bar in KJ/kg\")\n",
+ "print(\"from steam tables,at 0.075 bar,hf=168.76 KJ/kg,hfg=2406.0 KJ/kg\")\n",
+ "hf=168.76;\n",
+ "hfg=2406.0;\n",
+ "h5=hf+x5*hfg\n",
+ "print(\"Let mass of steam bled at 20 bar be m1 and m2 per kg of steam generated.\")\n",
+ "print(\"h10=hf at 20 bar=908.76 KJ/kg,h8=hf at 4 bar=604.74 KJ/kg\")\n",
+ "h10=908.76;\n",
+ "h8=604.74;\n",
+ "print(\"At trap h10=h11=908.79 KJ/kg\")\n",
+ "h11=h10;\n",
+ "print(\"At condensate extraction pump,(CEP),h7-h6=v6*(4-0.075)*10^2 in KJ/kg\")\n",
+ "print(\"here v6=vf at 0.075 bar=0.001008 m^3/kg,h6=hf at 0.075 bar=168.79 KJ/kg\")\n",
+ "v6=0.001008;\n",
+ "h6=168.79;\n",
+ "print(\"so h7=h6+v6*(4-0.075)*10^2 in KJ/kg\")\n",
+ "h7=h6+v6*(4-0.075)*10**2\n",
+ "print(\"At feed pump,(FP),h9-h8=v8*(20-4)*10^2 in KJ/kg\")\n",
+ "print(\"here v8=vf at 4 bar=0.001084 m^3/kg,h8=hf at 4 bar=604.74 KJ/kg\")\n",
+ "v8=0.001084;\n",
+ "h8=604.74;\n",
+ "print(\"so h9=h8+v8*(20-4)*10^2 in KJ/kg\")\n",
+ "h9=h8+v8*(20-4)*10**2\n",
+ "print(\"Let us apply heat balance at closed feed water heater,\")\n",
+ "print(\"m1*h3+h9=m1*h10+4.18*200\")\n",
+ "print(\"so m1=(4.18*200-h9)/(h3-h10) in kg\")\n",
+ "m1=(4.18*200-h9)/(h3-h10)\n",
+ "m1=0.114;#approx.\n",
+ "print(\"Applying heat balance at open feed water,\")\n",
+ "print(\"m1*h11+m2*h4+(1-m1-m2)*h7=h8\")\n",
+ "print(\"so m2=(h8-m1*h11-h7+m1*h7)/(h4-h7) in kg\")\n",
+ "m2=(h8-m1*h11-h7+m1*h7)/(h4-h7)\n",
+ "m2=0.144;#approx.\n",
+ "print(\"Net work per kg steam generated,\")\n",
+ "print(\"w_net=(h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-{(1-m1-m2)*(h7-h6)+(h9-h8)} in KJ/kg\")\n",
+ "w_net=(h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-((1-m1-m2)*(h7-h6)+(h9-h8)) \n",
+ "print(\"Heat added per kg steam generated,q_add=(h2-h1) in KJ/kg\")\n",
+ "h1=4.18*200;\n",
+ "q_add=(h2-h1)\n",
+ "print(\"Thermal efficiency=w_net/q_add\"),round(w_net/q_add,2)\n",
+ "print(\"in percentage\"),round(w_net*100/q_add,2)\n",
+ "print(\"steam generation rate=P/w_net in kg/s\"),round(P/w_net,2)\n",
+ "print(\"so thermal efficiency=44.78%\")\n",
+ "print(\"steam generation rate=87.99 kg/s\")\n",
+ "print(\"a> For the reheating introduced at 20 bar up to 400oc.The modified cycle representation is shown on T-S diagram by 1-2-3-3_a-4_a-5_a-6-7-8-9-10-11\")\n",
+ "print(\"At state 2,h2=3373.7 KJ/kg,s2=6.5966 KJ/kg K\")\n",
+ "h2=3373.7;\n",
+ "s2=6.5966;\n",
+ "print(\"At state 3,h3=2930.57 KJ/kg\")\n",
+ "h3=2930.57;\n",
+ "print(\"At state 3_a,h3_a=3247.6 KJ/kg,s3_a=7.1271 KJ/kg K\")\n",
+ "h3_a=3247.6;\n",
+ "s3_a=7.1271;\n",
+ "print(\"At state 4_a and 5_a,s3_a=s4_a=s5_a=7.1271 KJ/kg K\")\n",
+ "s4_a=s3_a;\n",
+ "s5_a=s4_a;\n",
+ "print(\"From steam tables by interpolation state 4_a is seen to be at 190.96oc at 4 bar,h4_a=2841.02 KJ/kg\")\n",
+ "h4_a=2841.02;\n",
+ "print(\"Let dryness fraction at state 5_a be x5,\")\n",
+ "print(\"s5_a=7.1271=sf at 0.075 bar+x5_a*sfg at 0.075 bar\")\n",
+ "print(\"from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\")\n",
+ "print(\"so x5_a=(s5_a-sf)/sfg\")\n",
+ "x5_a=(s5_a-sf)/sfg\n",
+ "x5_a=0.853;#approx.\n",
+ "print(\"h5_a=hf at 0.075 bar+x5_a*hfg at 0.075 bar in KJ/kg\")\n",
+ "print(\"from steam tables,at 0.075 bar,hf=168.76 KJ/kg,hfg=2406.0 KJ/kg\")\n",
+ "h5_a=hf+x5_a*hfg\n",
+ "print(\"Let mass of bled steam at 20 bar and 4 bar be m1_a,m2_a per kg of steam generated.Applying heat balance at closed feed water heater.\")\n",
+ "print(\"m1_a*h3+h9=m1*h10+4.18*200\")\n",
+ "print(\"so m1_a=(4.18*200-h9)/(h3-h10) in kg\")\n",
+ "m1_a=(4.18*200-h9)/(h3-h10)\n",
+ "m1_a=0.114;#approx.\n",
+ "print(\"Applying heat balance at open feed water heater,\")\n",
+ "print(\"m1_a*h11+m2_a*h4_a+(1-m1_a-m2_a)*h7=h8\")\n",
+ "print(\"so m2_a=(h8-m1_a*h11-h7+m1_a*h7)/(h4_a-h7) in kg\")\n",
+ "m2_a=(h8-m1_a*h11-h7+m1_a*h7)/(h4_a-h7)\n",
+ "m2_a=0.131;#approx.\n",
+ "print(\"Net work per kg steam generated\")\n",
+ "print(\"w_net=(h2-h3)+(1-m1_a)*(h3_a-h4_a)+(1-m1_a-m2_a)*(h4_a-h5_a)-{(1-m1_a-m2_a)*(h7-h6)+(h9-h8)}in KJ/kg\")\n",
+ "w_net=(h2-h3)+(1-m1_a)*(h3_a-h4_a)+(1-m1_a-m2_a)*(h4_a-h5_a)-((1-m1_a-m2_a)*(h7-h6)+(h9-h8))\n",
+ "print(\"Heat added per kg steam generated,q_add=(h2-h1)+(1-m1_a)*(h3_a-h3)in KJ/kg\")\n",
+ "q_add=(h2-h1)+(1-m1_a)*(h3_a-h3)\n",
+ "n=w_net/q_add\n",
+ "print(\"Thermal efficiency,n=\"),round(n,2)\n",
+ "print(\"in percentage\"),round(n*100,2)\n",
+ "print(\"% increase in thermal efficiency due to reheating=\"),round((0.4503-0.4478)*100/0.4478,2)\n",
+ "print(\"so thermal efficiency of reheat cycle=45.03%\")\n",
+ "print(\"% increase in efficiency due to reheating=0.56%\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 8.13;pg no: 286"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 100,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 8.13, Page:286 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 13\n",
+ "For mercury cycle,\n",
+ "insentropic heat drop=349-234.5 in KJ/kg Hg\n",
+ "actual heat drop=0.85*114.5 in KJ/kg Hg\n",
+ "Heat rejected in condenser=(349-97.325-35)in KJ/kg\n",
+ "heat added in boiler=349-35 in KJ/kg\n",
+ "For steam cycle,\n",
+ "Enthalpy of steam generated=h at 40 bar,0.98 dry=2767.13 KJ/kg\n",
+ "Enthalpy of inlet to steam turbine,h2=h at 40 bar,450oc=3330.3 KJ/kg\n",
+ "Entropy of steam at inlet to steam turbine,s2=6.9363 KJ/kg K\n",
+ "Therefore,heat added in condenser of mercury cycle=h at 40 bar,0.98 dry-h_feed at 40 bar in KJ/kg\n",
+ "Therefore,mercury required per kg of steam=2140.13/heat rejected in condenser in kg per kg of steam\n",
+ "for isentropic expansion,s2=s3=s4=s5=6.9363 KJ/kg K\n",
+ "state 3 lies in superheated region,by interpolation the state can be given by,temperature 227.07oc at 8 bar,h3=2899.23 KJ/kg\n",
+ "state 4 lies in wet region,say with dryness fraction x4\n",
+ "s4=6.9363=sf at 1 bar+x4*sfg at 1 bar\n",
+ "so x4=(s4-sf)/sfg\n",
+ "from steam tables,at 1 bar,sf=1.3026 KJ/kg K,sfg=6.0568 KJ/kg K\n",
+ "h4=hf at 1 bar+x4*hfg at 1 bar in KJ/kg\n",
+ "from steam tables,at 1 bar,hf=417.46 KJ/kg,hfg=2258.0 KJ/kg\n",
+ "Let state 5 lie in wet region with dryness fraction x5,\n",
+ "s5=6.9363=sf at 0.075 bar+x5*sfg at 0.075 bar\n",
+ "so x5=(s5-sf)/sfg\n",
+ "from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\n",
+ "h5=hf+x5*hfg in KJ/kg\n",
+ "from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\n",
+ "Let mass of steam bled at 8 bar and 1 bar be m1 and m2 per kg of steam generated.\n",
+ "h7=h6+v6*(1-0.075)*10^2 in KJ/kg\n",
+ "from steam tables,at 0.075 bar,h6=hf=168.79 KJ/kg,v6=vf=0.001008 m^3/kg\n",
+ "h9=hf at 1 bar=417.46 KJ/kg,h13=hf at 8 bar=721.11 KJ/kg\n",
+ "Applying heat balance on CFWH1,T1=150oc and also T15=150oc\n",
+ "m1*h3+(1-m1)*h12=m1*h13+(4.18*150)*(1-m1)\n",
+ "(m1-2899.23)+(1-m1)*h12=(m1*721.11)+627*(1-m1)\n",
+ "Applying heat balance on CFEH2,T11=90oc\n",
+ "m2*h4+(1-m1-m2)*h7=m2*h9+(1-m1-m2)*4.18*90\n",
+ "(m2*2517.4)+(1-m1-m2)*168.88=(m2*417.46)+376.2*(1-m1-m2)\n",
+ "Heat balance at mixing between CFWH1 and CFWH2,\n",
+ "(1-m1-m2)*4.18*90+m2*h10=(1-m1)*h12\n",
+ "376.2*(1-m1-m2)+m2*h10=(1-m1)*h12\n",
+ "For pumping process,9-10,h10=h9+v9*(8-1)*10^2 in KJ/kg\n",
+ "from steam tables,h9=hf at 1 bar=417.46 KJ/kg,v9=vf at 1 bar=0.001043 m^3/kg\n",
+ "solving above equations,we get\n",
+ "m1=0.102 kg per kg steam generated\n",
+ "m2=0.073 kg per kg steam generated\n",
+ "pump work in process 13-14,h14-h13=v13*(40-8)*10^2\n",
+ "so h14-h13 in KJ/kg\n",
+ "Total heat supplied(q_add)=(9.88*314)+(3330.3-2767.13) in KJ/kg of steam\n",
+ "net work per kg of steam,w_net=w_mercury+w_steam\n",
+ "w_net=(9.88*97.325)+{(h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-(1-m1-m2)*(h4-h6)-m2*(h10-h9)-m1*(h14-h13)} in KJ/kg\n",
+ "thermal efficiency of binary vapour cycle=w_net/q_add 0.55\n",
+ "in percentage 55.36\n",
+ "so thermal efficiency=55.36%\n",
+ "NOTE=>In this question there is some mistake in formula used for w_net which is corrected above.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of thermal efficiency\n",
+ "#intiation of all variables\n",
+ "# Chapter 8\n",
+ "print\"Example 8.13, Page:286 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 13\")\n",
+ "print(\"For mercury cycle,\")\n",
+ "print(\"insentropic heat drop=349-234.5 in KJ/kg Hg\")\n",
+ "349-234.5\n",
+ "print(\"actual heat drop=0.85*114.5 in KJ/kg Hg\")\n",
+ "0.85*114.5\n",
+ "print(\"Heat rejected in condenser=(349-97.325-35)in KJ/kg\")\n",
+ "(349-97.325-35)\n",
+ "print(\"heat added in boiler=349-35 in KJ/kg\")\n",
+ "349-35\n",
+ "print(\"For steam cycle,\")\n",
+ "print(\"Enthalpy of steam generated=h at 40 bar,0.98 dry=2767.13 KJ/kg\")\n",
+ "h=2767.13;\n",
+ "print(\"Enthalpy of inlet to steam turbine,h2=h at 40 bar,450oc=3330.3 KJ/kg\")\n",
+ "h2=3330.3;\n",
+ "print(\"Entropy of steam at inlet to steam turbine,s2=6.9363 KJ/kg K\")\n",
+ "s2=6.9363;\n",
+ "print(\"Therefore,heat added in condenser of mercury cycle=h at 40 bar,0.98 dry-h_feed at 40 bar in KJ/kg\")\n",
+ "h-4.18*150\n",
+ "print(\"Therefore,mercury required per kg of steam=2140.13/heat rejected in condenser in kg per kg of steam\")\n",
+ "2140.13/216.675\n",
+ "print(\"for isentropic expansion,s2=s3=s4=s5=6.9363 KJ/kg K\")\n",
+ "s3=s2;\n",
+ "s4=s3;\n",
+ "s5=s4;\n",
+ "print(\"state 3 lies in superheated region,by interpolation the state can be given by,temperature 227.07oc at 8 bar,h3=2899.23 KJ/kg\")\n",
+ "h3=2899.23;\n",
+ "print(\"state 4 lies in wet region,say with dryness fraction x4\")\n",
+ "print(\"s4=6.9363=sf at 1 bar+x4*sfg at 1 bar\")\n",
+ "print(\"so x4=(s4-sf)/sfg\")\n",
+ "print(\"from steam tables,at 1 bar,sf=1.3026 KJ/kg K,sfg=6.0568 KJ/kg K\")\n",
+ "sf=1.3026;\n",
+ "sfg=6.0568;\n",
+ "x4=(s4-sf)/sfg\n",
+ "x4=0.93;#approx.\n",
+ "print(\"h4=hf at 1 bar+x4*hfg at 1 bar in KJ/kg\")\n",
+ "print(\"from steam tables,at 1 bar,hf=417.46 KJ/kg,hfg=2258.0 KJ/kg\")\n",
+ "hf=417.46;\n",
+ "hfg=2258.0;\n",
+ "h4=hf+x4*hfg\n",
+ "print(\"Let state 5 lie in wet region with dryness fraction x5,\")\n",
+ "print(\"s5=6.9363=sf at 0.075 bar+x5*sfg at 0.075 bar\")\n",
+ "print(\"so x5=(s5-sf)/sfg\")\n",
+ "print(\"from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\")\n",
+ "sf=0.5764;\n",
+ "sfg=7.6750;\n",
+ "x5=(s5-sf)/sfg\n",
+ "x5=0.828;#approx.\n",
+ "print(\"h5=hf+x5*hfg in KJ/kg\")\n",
+ "print(\"from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\")\n",
+ "hf=168.79;\n",
+ "hfg=2406.0;\n",
+ "h5=hf+x5*hfg\n",
+ "print(\"Let mass of steam bled at 8 bar and 1 bar be m1 and m2 per kg of steam generated.\")\n",
+ "print(\"h7=h6+v6*(1-0.075)*10^2 in KJ/kg\")\n",
+ "print(\"from steam tables,at 0.075 bar,h6=hf=168.79 KJ/kg,v6=vf=0.001008 m^3/kg\")\n",
+ "h6=168.79;\n",
+ "v6=0.001008;\n",
+ "h7=h6+v6*(1-0.075)*10**2\n",
+ "print(\"h9=hf at 1 bar=417.46 KJ/kg,h13=hf at 8 bar=721.11 KJ/kg\")\n",
+ "h9=417.46;\n",
+ "h13=721.11;\n",
+ "print(\"Applying heat balance on CFWH1,T1=150oc and also T15=150oc\")\n",
+ "T1=150;\n",
+ "T15=150;\n",
+ "print(\"m1*h3+(1-m1)*h12=m1*h13+(4.18*150)*(1-m1)\")\n",
+ "print(\"(m1-2899.23)+(1-m1)*h12=(m1*721.11)+627*(1-m1)\")\n",
+ "print(\"Applying heat balance on CFEH2,T11=90oc\")\n",
+ "T11=90;\n",
+ "print(\"m2*h4+(1-m1-m2)*h7=m2*h9+(1-m1-m2)*4.18*90\")\n",
+ "print(\"(m2*2517.4)+(1-m1-m2)*168.88=(m2*417.46)+376.2*(1-m1-m2)\")\n",
+ "print(\"Heat balance at mixing between CFWH1 and CFWH2,\")\n",
+ "print(\"(1-m1-m2)*4.18*90+m2*h10=(1-m1)*h12\")\n",
+ "print(\"376.2*(1-m1-m2)+m2*h10=(1-m1)*h12\")\n",
+ "print(\"For pumping process,9-10,h10=h9+v9*(8-1)*10^2 in KJ/kg\")\n",
+ "print(\"from steam tables,h9=hf at 1 bar=417.46 KJ/kg,v9=vf at 1 bar=0.001043 m^3/kg\")\n",
+ "h9=417.46;\n",
+ "v9=0.001043;\n",
+ "h10=h9+v9*(8-1)*10**2 \n",
+ "print(\"solving above equations,we get\")\n",
+ "print(\"m1=0.102 kg per kg steam generated\")\n",
+ "print(\"m2=0.073 kg per kg steam generated\")\n",
+ "m1=0.102;\n",
+ "m2=0.073;\n",
+ "print(\"pump work in process 13-14,h14-h13=v13*(40-8)*10^2\")\n",
+ "print(\"so h14-h13 in KJ/kg\")\n",
+ "v13=0.001252;\n",
+ "v13*(40-8)*10**2\n",
+ "print(\"Total heat supplied(q_add)=(9.88*314)+(3330.3-2767.13) in KJ/kg of steam\")\n",
+ "q_add=(9.88*314)+(3330.3-2767.13)\n",
+ "print(\"net work per kg of steam,w_net=w_mercury+w_steam\")\n",
+ "print(\"w_net=(9.88*97.325)+{(h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-(1-m1-m2)*(h4-h6)-m2*(h10-h9)-m1*(h14-h13)} in KJ/kg\")\n",
+ "w_net=(9.88*97.325)+((h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-(1-m1-m2)*(h7-h6)-m2*(h10-h9)-m1*4.006)\n",
+ "print(\"thermal efficiency of binary vapour cycle=w_net/q_add\"),round(w_net/q_add,2)\n",
+ "print(\"in percentage\"),round(w_net*100/q_add,2)\n",
+ "print(\"so thermal efficiency=55.36%\")\n",
+ "print(\"NOTE=>In this question there is some mistake in formula used for w_net which is corrected above.\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 8.14;pg no: 288"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 101,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 8.14, Page:288 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 14\n",
+ "This is a mixed pressure turbine so the output of turbine shall be sum of the contributions by HP and LP steam streams.\n",
+ "For HP:at inlet of HP steam=>h1=3023.5 KJ/kg,s1=6.7664 KJ/kg K\n",
+ "ideally, s2=s1=6.7664 KJ/kg K\n",
+ "s2=sf at 0.075 bar +x3* sfg at 0.075 bar\n",
+ "from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\n",
+ "so x3=(s2-sf)/sfg\n",
+ "h_3HP=hf at 0.075 bar+x3*hfg at 0.075 bar in KJ/kg\n",
+ "from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\n",
+ "actual enthalpy drop in HP(h_HP)=(h1-h_3HP)*n in KJ/kg\n",
+ "for LP:at inlet of LP steam\n",
+ "h2=2706.7 KJ/kg,s2=7.1271 KJ/kg K\n",
+ "Enthalpy at exit,h_3LP=2222.34 KJ/kg\n",
+ "actual enthalpy drop in LP(h_LP)=(h2-h_3LP)*n in KJ/kg\n",
+ "HP steam consumption at full load=P*0.7457/h_HP in kg/s\n",
+ "HP steam consumption at no load=0.10*(P*0.7457/h_HP)in kg/s\n",
+ "LP steam consumption at full load=P*0.7457/h_LP in kg/s\n",
+ "LP steam consumption at no load=0.10*(P*0.7457/h_LP)in kg/s\n",
+ "The problem can be solved geometrically by drawing willans line as per scale on graph paper and finding out the HP stream requirement for getting 1000 hp if LP stream is available at 1.5 kg/s.\n",
+ "or,Analytically the equation for willans line can be obtained for above full load and no load conditions for HP and LP seperately.\n",
+ "Willians line for HP:y=m*x+C,here y=steam consumption,kg/s\n",
+ "x=load,hp\n",
+ "y_HP=m_HP*x+C_HP\n",
+ "0.254=m_HP*0+C_HP\n",
+ "so C_HP=0.254\n",
+ "2.54=m_HP*2500+C_HP\n",
+ "so m_HP=(2.54-C_HP)/2500\n",
+ "so y_HP=9.144*10^-4*x_HP+0.254\n",
+ "Willans line for LP:y_LP=m_LP*x_LP+C_LP\n",
+ "0.481=m_LP*0+C_LP\n",
+ "so C_LP=0.481\n",
+ "4.81=m_LP*2500+C_LP\n",
+ "so m_LP=(4.81-C_LP)/2500\n",
+ "so y_LP=1.732*10^-3*x_LP+0.481\n",
+ "Total output(load) from mixed turbine,x=x_HP+x_LP\n",
+ "For load of 1000 hp to be met by mixed turbine,let us find out the load shared by LP for steam flow rate of 1.5 kg/s\n",
+ "from y_LP=1.732*10^-3*x_LP+0.481,\n",
+ "x_LP=(y_LP-0.481)/1.732*10^-3\n",
+ "since by 1.5 kg/s of LP steam only 588.34 hp output contribution is made so remaining(1000-588.34)=411.66 hp,411.66 hp should be contributed by HP steam.By willans line for HP turbine,\n",
+ "from y_HP=9.144*10^-4*x_HP+C_HP in kg/s 0.63\n",
+ "so HP steam requirement=0.63 kg/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of HP steam required\n",
+ "#intiation of all variables\n",
+ "# Chapter 8\n",
+ "print\"Example 8.14, Page:288 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 14\")\n",
+ "n=0.8;#efficiency of both HP and LP turbine\n",
+ "P=2500;#output in hp\n",
+ "print(\"This is a mixed pressure turbine so the output of turbine shall be sum of the contributions by HP and LP steam streams.\")\n",
+ "print(\"For HP:at inlet of HP steam=>h1=3023.5 KJ/kg,s1=6.7664 KJ/kg K\")\n",
+ "h1=3023.5;\n",
+ "s1=6.7664;\n",
+ "print(\"ideally, s2=s1=6.7664 KJ/kg K\")\n",
+ "s2=s1;\n",
+ "print(\"s2=sf at 0.075 bar +x3* sfg at 0.075 bar\")\n",
+ "print(\"from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\")\n",
+ "sf=0.5764;\n",
+ "sfg=7.6750;\n",
+ "print(\"so x3=(s2-sf)/sfg\")\n",
+ "x3=(s2-sf)/sfg\n",
+ "x3=0.806;#approx.\n",
+ "print(\"h_3HP=hf at 0.075 bar+x3*hfg at 0.075 bar in KJ/kg\")\n",
+ "print(\"from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\")\n",
+ "hf=168.79;\n",
+ "hfg=2406.0; \n",
+ "h_3HP=hf+x3*hfg\n",
+ "print(\"actual enthalpy drop in HP(h_HP)=(h1-h_3HP)*n in KJ/kg\")\n",
+ "h_HP=(h1-h_3HP)*n\n",
+ "print(\"for LP:at inlet of LP steam\")\n",
+ "print(\"h2=2706.7 KJ/kg,s2=7.1271 KJ/kg K\")\n",
+ "h2=2706.7;\n",
+ "s2=7.1271;\n",
+ "print(\"Enthalpy at exit,h_3LP=2222.34 KJ/kg\")\n",
+ "h_3LP=2222.34;\n",
+ "print(\"actual enthalpy drop in LP(h_LP)=(h2-h_3LP)*n in KJ/kg\")\n",
+ "h_LP=(h2-h_3LP)*n\n",
+ "print(\"HP steam consumption at full load=P*0.7457/h_HP in kg/s\")\n",
+ "P*0.7457/h_HP\n",
+ "print(\"HP steam consumption at no load=0.10*(P*0.7457/h_HP)in kg/s\")\n",
+ "0.10*(P*0.7457/h_HP)\n",
+ "print(\"LP steam consumption at full load=P*0.7457/h_LP in kg/s\")\n",
+ "P*0.7457/h_LP\n",
+ "print(\"LP steam consumption at no load=0.10*(P*0.7457/h_LP)in kg/s\")\n",
+ "0.10*(P*0.7457/h_LP)\n",
+ "print(\"The problem can be solved geometrically by drawing willans line as per scale on graph paper and finding out the HP stream requirement for getting 1000 hp if LP stream is available at 1.5 kg/s.\")\n",
+ "print(\"or,Analytically the equation for willans line can be obtained for above full load and no load conditions for HP and LP seperately.\")\n",
+ "print(\"Willians line for HP:y=m*x+C,here y=steam consumption,kg/s\")\n",
+ "print(\"x=load,hp\")\n",
+ "print(\"y_HP=m_HP*x+C_HP\")\n",
+ "print(\"0.254=m_HP*0+C_HP\")\n",
+ "print(\"so C_HP=0.254\")\n",
+ "C_HP=0.254;\n",
+ "print(\"2.54=m_HP*2500+C_HP\")\n",
+ "print(\"so m_HP=(2.54-C_HP)/2500\")\n",
+ "m_HP=(2.54-C_HP)/2500\n",
+ "print(\"so y_HP=9.144*10^-4*x_HP+0.254\")\n",
+ "print(\"Willans line for LP:y_LP=m_LP*x_LP+C_LP\")\n",
+ "print(\"0.481=m_LP*0+C_LP\")\n",
+ "print(\"so C_LP=0.481\")\n",
+ "C_LP=0.481;\n",
+ "print(\"4.81=m_LP*2500+C_LP\")\n",
+ "print(\"so m_LP=(4.81-C_LP)/2500\")\n",
+ "m_LP=(4.81-C_LP)/2500\n",
+ "print(\"so y_LP=1.732*10^-3*x_LP+0.481\")\n",
+ "print(\"Total output(load) from mixed turbine,x=x_HP+x_LP\")\n",
+ "print(\"For load of 1000 hp to be met by mixed turbine,let us find out the load shared by LP for steam flow rate of 1.5 kg/s\")\n",
+ "y_LP=1.5;\n",
+ "print(\"from y_LP=1.732*10^-3*x_LP+0.481,\")\n",
+ "print(\"x_LP=(y_LP-0.481)/1.732*10^-3\")\n",
+ "x_LP=(y_LP-0.481)/(1.732*10**-3)\n",
+ "print(\"since by 1.5 kg/s of LP steam only 588.34 hp output contribution is made so remaining(1000-588.34)=411.66 hp,411.66 hp should be contributed by HP steam.By willans line for HP turbine,\")\n",
+ "x_HP=411.66;\n",
+ "y_HP=9.144*10**-4*x_HP+C_HP\n",
+ "print(\"from y_HP=9.144*10^-4*x_HP+C_HP in kg/s\"),round(y_HP,2)\n",
+ "print(\"so HP steam requirement=0.63 kg/s\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 8.15;pg no: 289"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 102,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 8.15, Page:289 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 15\n",
+ "Let us carry out analysis for 1 kg of steam generated in boiler.\n",
+ "Enthalpy at inlet to HPT,h2=2960.7 KJ/kg,s2=6.3615 KJ/kg K\n",
+ "state at 3 i.e. exit from HPT can be identified by s2=s3=6.3615 KJ/kg K\n",
+ "Let dryness fraction be x3,s3=6.3615=sf at 2 bar+x3*sfg at 2 bar\n",
+ "so x3= 0.86\n",
+ "from stem tables,at 2 bar,sf=1.5301 KJ/kg K,sfg=5.5970 KJ/kg K\n",
+ "h3=2404.94 KJ/kg\n",
+ "If one kg of steam is generated in bolier then at exit of HPT,0.5 kg goes into process heater and 0.5 kg goes into separator\n",
+ "mass of moisture retained in separator(m)=(1-x3)*0.5 kg\n",
+ "Therefore,mass of steam entering LPT(m_LP)=0.5-m kg\n",
+ "Total mass of water entering hot well at 8(i.e. from process heater and drain from separator)=(0.5+0.685)=0.5685 kg\n",
+ "Let us assume the temperature of water leaving hotwell be T oc.Applying heat balance for mixing;\n",
+ "(0.5685*4.18*90)+(0.4315*4.18*40)=(1*4.18*T)\n",
+ "so T in degree celcius= 68.425\n",
+ "so temperature of water leaving hotwell=68.425 degree celcius\n",
+ "Applying heat balanced on trap\n",
+ "0.5*h7+0.0685*hf at 2 bar=(0.5685*4.18*90)\n",
+ "so h7=((0.5685*4.18*90)-(0.0685*hf))/0.5 in KJ/kg\n",
+ "from steam tables,at 2 bar,hf=504.70 KJ/kg\n",
+ "Therefore,heat transferred in process heater in KJ/kg steam generated= 1023.172\n",
+ "so heat transferred per kg steam generated=1023.175 KJ/kg steam generated\n",
+ "For state 10 at exit of LPT,s10=s3=s2=6.3615 KJ/kg K\n",
+ "Let dryness fraction be x10\n",
+ "s10=6.3615=sf at 0.075 bar+x10*sfg at 0.075 bar\n",
+ "from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\n",
+ "so x10=(s10-sf)/sfg\n",
+ "h10=hf at 0.075 bar+x10*hfg at 0.075 bar\n",
+ "from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\n",
+ "so h10=hf+x10*hfg in KJ/kg \n",
+ "net work output,neglecting pump work per kg of steam generated,\n",
+ "w_net=(h2-h3)*1+0.4315*(h3-h10) in KJ/kg steam generated\n",
+ "Heat added in boiler per kg steam generated,q_add in KJ/kg= 2674.68\n",
+ "thermal efficiency=w_net/q_add 0.28\n",
+ "in percentage 27.59\n",
+ "so Thermal efficiency=27.58%\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of thermal efficiency,heat transferred and temperature\n",
+ "#intiation of all variables\n",
+ "# Chapter 8\n",
+ "print\"Example 8.15, Page:289 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 15\")\n",
+ "print(\"Let us carry out analysis for 1 kg of steam generated in boiler.\")\n",
+ "print(\"Enthalpy at inlet to HPT,h2=2960.7 KJ/kg,s2=6.3615 KJ/kg K\")\n",
+ "h2=2960.7;\n",
+ "s2=6.3615;\n",
+ "print(\"state at 3 i.e. exit from HPT can be identified by s2=s3=6.3615 KJ/kg K\")\n",
+ "s3=s2;\n",
+ "print(\"Let dryness fraction be x3,s3=6.3615=sf at 2 bar+x3*sfg at 2 bar\")\n",
+ "sf=1.5301;\n",
+ "sfg=5.5970;\n",
+ "x3=(s3-sf)/sfg\n",
+ "print(\"so x3=\"),round(x3,2)\n",
+ "print(\"from stem tables,at 2 bar,sf=1.5301 KJ/kg K,sfg=5.5970 KJ/kg K\")\n",
+ "x3=0.863;#approx.\n",
+ "print(\"h3=2404.94 KJ/kg\")\n",
+ "h3=2404.94;\n",
+ "print(\"If one kg of steam is generated in bolier then at exit of HPT,0.5 kg goes into process heater and 0.5 kg goes into separator\")\n",
+ "print(\"mass of moisture retained in separator(m)=(1-x3)*0.5 kg\")\n",
+ "m=(1-x3)*0.5\n",
+ "print(\"Therefore,mass of steam entering LPT(m_LP)=0.5-m kg\")\n",
+ "m_LP=0.5-m\n",
+ "print(\"Total mass of water entering hot well at 8(i.e. from process heater and drain from separator)=(0.5+0.685)=0.5685 kg\")\n",
+ "print(\"Let us assume the temperature of water leaving hotwell be T oc.Applying heat balance for mixing;\")\n",
+ "print(\"(0.5685*4.18*90)+(0.4315*4.18*40)=(1*4.18*T)\")\n",
+ "T=((0.5685*4.18*90)+(0.4315*4.18*40))/4.18\n",
+ "print(\"so T in degree celcius=\"),round(T,3)\n",
+ "print(\"so temperature of water leaving hotwell=68.425 degree celcius\")\n",
+ "print(\"Applying heat balanced on trap\")\n",
+ "print(\"0.5*h7+0.0685*hf at 2 bar=(0.5685*4.18*90)\")\n",
+ "print(\"so h7=((0.5685*4.18*90)-(0.0685*hf))/0.5 in KJ/kg\")\n",
+ "print(\"from steam tables,at 2 bar,hf=504.70 KJ/kg\")\n",
+ "hf=504.70;\n",
+ "h7=((0.5685*4.18*90)-(0.0685*hf))/0.5\n",
+ "print(\"Therefore,heat transferred in process heater in KJ/kg steam generated=\"),round(0.5*(h3-h7),3)\n",
+ "print(\"so heat transferred per kg steam generated=1023.175 KJ/kg steam generated\")\n",
+ "print(\"For state 10 at exit of LPT,s10=s3=s2=6.3615 KJ/kg K\")\n",
+ "s10=s3;\n",
+ "print(\"Let dryness fraction be x10\")\n",
+ "print(\"s10=6.3615=sf at 0.075 bar+x10*sfg at 0.075 bar\")\n",
+ "print(\"from steam tables,at 0.075 bar,sf=0.5764 KJ/kg K,sfg=7.6750 KJ/kg K\")\n",
+ "sf=0.5764;\n",
+ "sfg=7.6750;\n",
+ "print(\"so x10=(s10-sf)/sfg\")\n",
+ "x10=(s10-sf)/sfg\n",
+ "x10=0.754;#approx.\n",
+ "print(\"h10=hf at 0.075 bar+x10*hfg at 0.075 bar\")\n",
+ "print(\"from steam tables,at 0.075 bar,hf=168.79 KJ/kg,hfg=2406.0 KJ/kg\")\n",
+ "hf=168.79;\n",
+ "hfg=2406.0;\n",
+ "print(\"so h10=hf+x10*hfg in KJ/kg \")\n",
+ "h10=hf+x10*hfg \n",
+ "print(\"net work output,neglecting pump work per kg of steam generated,\")\n",
+ "print(\"w_net=(h2-h3)*1+0.4315*(h3-h10) in KJ/kg steam generated\")\n",
+ "w_net=(h2-h3)*1+0.4315*(h3-h10) \n",
+ "q_add=(h2-4.18*68.425)\n",
+ "print(\"Heat added in boiler per kg steam generated,q_add in KJ/kg=\"),round(q_add,2)\n",
+ "w_net/q_add\n",
+ "print(\"thermal efficiency=w_net/q_add\"),round(w_net/q_add,2)\n",
+ "print(\"in percentage\"),round(w_net*100/q_add,2)\n",
+ "print(\"so Thermal efficiency=27.58%\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 8.16;pg no: 291"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 103,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 8.16, Page:291 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 16\n",
+ "from steam tables,h1=3530.9 KJ/kg,s1=6.9486 KJ/kg K\n",
+ "Assuming isentropic expansion in nozzle,s1=s2=6.9486\n",
+ "Letdryness fraction at state 2,x2=0.864\n",
+ "s2=sf at 0.2 bar+x2*sfg at 0.2 bar\n",
+ "from steam tables,sf=0.8320 KJ/kg K,sfg=7.0766 KJ/kg K\n",
+ "so x2= 0.86\n",
+ "hence,h2=hf at 0.2 bar+x2*hfg at 0.2 bar in KJ/kg\n",
+ "from steam tables,hf at 0.2 bar=251.4 KJ/kg,hfg at 0.2 bar=2358.3 KJ/kg\n",
+ "considering pump work to be of isentropic type,deltah_34=v3*deltap_34\n",
+ "from steam table,v3=vf at 0.2 bar=0.001017 m^3/kg\n",
+ "or deltah_34 in KJ/kg= 7.1\n",
+ "pump work,Wp in KJ/kg= 7.1\n",
+ "turbine work,Wt=deltah_12=(h1-h2)in KJ/kg\n",
+ "net work(W_net)=Wt-Wp in KJ/kg\n",
+ "power produced(P)=mass flow rate*W_net in KJ/s\n",
+ "so net power=43.22 MW\n",
+ "heat supplied in boiler(Q)=(h1-h4) in KJ/kg\n",
+ "enthalpy at state 4,h4=h3+deltah_34 in KJ/kg\n",
+ "total heat supplied to boiler(Q)=m*(h1-h4)in KJ/s 114534.05\n",
+ "thermal efficiency=net work/heat supplied=W_net/Q 0.38\n",
+ "in percentage 37.73\n",
+ "so thermal efficiency=37.73%\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of thermal efficiency,net power\n",
+ "#intiation of all variables\n",
+ "# Chapter 8\n",
+ "print\"Example 8.16, Page:291 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 16\")\n",
+ "m=35;#mass flow rate in kg/s\n",
+ "print(\"from steam tables,h1=3530.9 KJ/kg,s1=6.9486 KJ/kg K\")\n",
+ "h1=3530.9;\n",
+ "s1=6.9486;\n",
+ "print(\"Assuming isentropic expansion in nozzle,s1=s2=6.9486\")\n",
+ "s2=s1;\n",
+ "print(\"Letdryness fraction at state 2,x2=0.864\")\n",
+ "print(\"s2=sf at 0.2 bar+x2*sfg at 0.2 bar\")\n",
+ "print(\"from steam tables,sf=0.8320 KJ/kg K,sfg=7.0766 KJ/kg K\")\n",
+ "sf=0.8320;\n",
+ "sfg=7.0766;\n",
+ "x2=(s2-sf)/sfg\n",
+ "print(\"so x2=\"),round(x2,2)\n",
+ "x2=0.864;#approx.\n",
+ "print(\"hence,h2=hf at 0.2 bar+x2*hfg at 0.2 bar in KJ/kg\")\n",
+ "print(\"from steam tables,hf at 0.2 bar=251.4 KJ/kg,hfg at 0.2 bar=2358.3 KJ/kg\")\n",
+ "hf=251.4;\n",
+ "hfg=2358.3;\n",
+ "h2=hf+x2*hfg\n",
+ "print(\"considering pump work to be of isentropic type,deltah_34=v3*deltap_34\")\n",
+ "print(\"from steam table,v3=vf at 0.2 bar=0.001017 m^3/kg\")\n",
+ "v3=0.001017;\n",
+ "p3=70;#;pressure of steam entering turbine in bar\n",
+ "p4=0.20;#condenser pressure in bar\n",
+ "deltah_34=v3*(p3-p4)*100\n",
+ "print(\"or deltah_34 in KJ/kg=\"),round(deltah_34,2)\n",
+ "Wp=deltah_34\n",
+ "print(\"pump work,Wp in KJ/kg=\"),round(Wp,2)\n",
+ "print(\"turbine work,Wt=deltah_12=(h1-h2)in KJ/kg\")\n",
+ "Wt=(h1-h2)\n",
+ "print(\"net work(W_net)=Wt-Wp in KJ/kg\")\n",
+ "W_net=Wt-Wp\n",
+ "print(\"power produced(P)=mass flow rate*W_net in KJ/s\")\n",
+ "P=m*W_net\n",
+ "print(\"so net power=43.22 MW\")\n",
+ "print(\"heat supplied in boiler(Q)=(h1-h4) in KJ/kg\")\n",
+ "print(\"enthalpy at state 4,h4=h3+deltah_34 in KJ/kg\")\n",
+ "h3=hf;\n",
+ "h4=h3+deltah_34 \n",
+ "Q=m*(h1-h4)\n",
+ "print(\"total heat supplied to boiler(Q)=m*(h1-h4)in KJ/s\"),round(Q,2)\n",
+ "print(\"thermal efficiency=net work/heat supplied=W_net/Q\"),round(P/Q,2)\n",
+ "print(\"in percentage\"),round(P*100/Q,2)\n",
+ "print(\"so thermal efficiency=37.73%\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 8.17;pg no: 292"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 104,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 8.1, Page:292 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 17\n",
+ "from steam tables,h1=3625.3 KJ/s,s1=6.9029 KJ/kg K\n",
+ "due to isentropic expansion,s1=s2=s3=6.9029 KJ/kg K\n",
+ "at state 2,i.e at pressure of 2 MPa and entropy 6.9029 KJ/kg K\n",
+ "by interpolating state for s2 between 2 MPa,300 degree celcius and 2 MPa,350 degree celcius from steam tables,\n",
+ "h2=3105.08 KJ/kg \n",
+ "for state 3,i.e at pressure of 0.01 MPa entropy,s3 lies in wet region as s3<sg at 0.01 MPa.Let dryness fraction be x3 at this state\n",
+ "s3=sf at 0.01 MPa+x3*sfg at 0.01 MPa\n",
+ "from steam tables,sf at 0.01 MPa=0.6493 KJ/kg K,sfg at 0.01 MPa=7.5009 KJ/kg K\n",
+ "so x3= 0.83\n",
+ "enthalpy at state 3,h3= hf at 0.01 MPa+x3*hfg at 0.01 MPa in KJ/kg\n",
+ "from steam tables,at 0.01 MPa,hf=191.83 KJ/kg,hfg=2392.8 KJ/kg\n",
+ "let the mass of steam bled be mb per kg of steam from exit of HP for regenerative feed heating.\n",
+ "Considering state at exit from feed heater being saturated liquid the enthalpy at exit of feed heater will be,hf at 2 MPa\n",
+ "h6=hf at 2 MPa=908.79 KJ/kg\n",
+ "for adiabatic mixing in feed heater,for one kg of steam leaving boiler,the heat balance yields,\n",
+ "(1-mb)*h5+mb*h2=h6\n",
+ "while neglecting pump work,\n",
+ "h5=h4=hf at 0.01MPa=191.83 KJ/kg\n",
+ "substituting in heat balance on the feed heater,\n",
+ "(1-mb)*h5+mb*h2=h6\n",
+ "so mb in kg per kg of steam entering HP turbine= 0.25\n",
+ "steam bled per kg of steam passing through HP stage=0.246 kg\n",
+ "let mass of steam leaving boiler be m kg/s\n",
+ "output(P)=m*(h1-h2)+m*(1-mb)*(h2-h3)\n",
+ "so m in kg/s= 8.25\n",
+ "neglecting pump work,h7=h6=908.79 KJ/kg\n",
+ "heat supplied to boiler,Q_71 in KJ/s= 22411.21\n",
+ "so heat added=22411.21 KJ/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of heat added,steam bled\n",
+ "#intiation of all variables\n",
+ "# Chapter 8\n",
+ "print\"Example 8.1, Page:292 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 17\")\n",
+ "P=10*10**3;#output in KW\n",
+ "print(\"from steam tables,h1=3625.3 KJ/s,s1=6.9029 KJ/kg K\")\n",
+ "h1=3625.3;\n",
+ "s1=6.9029;\n",
+ "print(\"due to isentropic expansion,s1=s2=s3=6.9029 KJ/kg K\")\n",
+ "s2=s1;\n",
+ "s3=s2;\n",
+ "print(\"at state 2,i.e at pressure of 2 MPa and entropy 6.9029 KJ/kg K\")\n",
+ "print(\"by interpolating state for s2 between 2 MPa,300 degree celcius and 2 MPa,350 degree celcius from steam tables,\")\n",
+ "print(\"h2=3105.08 KJ/kg \")\n",
+ "h2=3105.08;\n",
+ "print(\"for state 3,i.e at pressure of 0.01 MPa entropy,s3 lies in wet region as s3<sg at 0.01 MPa.Let dryness fraction be x3 at this state\")\n",
+ "print(\"s3=sf at 0.01 MPa+x3*sfg at 0.01 MPa\")\n",
+ "print(\"from steam tables,sf at 0.01 MPa=0.6493 KJ/kg K,sfg at 0.01 MPa=7.5009 KJ/kg K\")\n",
+ "sf=0.6493;\n",
+ "sfg=7.5009;\n",
+ "x3=(s3-sf)/sfg\n",
+ "print(\"so x3=\"),round(x3,2)\n",
+ "x3=0.834;#approx.\n",
+ "print(\"enthalpy at state 3,h3= hf at 0.01 MPa+x3*hfg at 0.01 MPa in KJ/kg\")\n",
+ "print(\"from steam tables,at 0.01 MPa,hf=191.83 KJ/kg,hfg=2392.8 KJ/kg\")\n",
+ "hf=191.83;\n",
+ "hfg=2392.8;\n",
+ "h3=hf+x3*hfg\n",
+ "print(\"let the mass of steam bled be mb per kg of steam from exit of HP for regenerative feed heating.\")\n",
+ "print(\"Considering state at exit from feed heater being saturated liquid the enthalpy at exit of feed heater will be,hf at 2 MPa\")\n",
+ "print(\"h6=hf at 2 MPa=908.79 KJ/kg\")\n",
+ "h6=908.79;\n",
+ "print(\"for adiabatic mixing in feed heater,for one kg of steam leaving boiler,the heat balance yields,\")\n",
+ "print(\"(1-mb)*h5+mb*h2=h6\")\n",
+ "print(\"while neglecting pump work,\")\n",
+ "print(\"h5=h4=hf at 0.01MPa=191.83 KJ/kg\")\n",
+ "h4=191.83;\n",
+ "h5=h4;\n",
+ "print(\"substituting in heat balance on the feed heater,\")\n",
+ "print(\"(1-mb)*h5+mb*h2=h6\")\n",
+ "mb=(h6-h5)/(h2-h5)\n",
+ "print(\"so mb in kg per kg of steam entering HP turbine=\"),round((h6-h5)/(h2-h5),2)\n",
+ "mb=0.246;#approx.\n",
+ "print(\"steam bled per kg of steam passing through HP stage=0.246 kg\")\n",
+ "print(\"let mass of steam leaving boiler be m kg/s\")\n",
+ "print(\"output(P)=m*(h1-h2)+m*(1-mb)*(h2-h3)\")\n",
+ "m=P/((h1-h2)+(1-mb)*(h2-h3))\n",
+ "print(\"so m in kg/s=\"),round(m,2)\n",
+ "m=8.25;#approx.\n",
+ "print(\"neglecting pump work,h7=h6=908.79 KJ/kg\")\n",
+ "h7=h6;\n",
+ "Q_71=m*(h1-h7)\n",
+ "print(\"heat supplied to boiler,Q_71 in KJ/s=\"),round(Q_71,2)\n",
+ "print(\"so heat added=22411.21 KJ/s\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 8.18;pg no: 294"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 8.18, Page:294 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 8 Example 18\n",
+ "from steam tables,at inlet to first stage of turbine,h1=h at 100 bar,500oc=3373.7 KJ/kg,s1=s at 100 bar,500oc=6.5966 KJ/kg\n",
+ "Due to isentropic expansion,s1=s6=s2 and s3=s8=s4\n",
+ "State at 6 i.e bleed state from HP turbine,temperature by interpolation from steam table =261.6oc.\n",
+ "At inlet to second stage of turbine,h6=2930.572 KJ/kg\n",
+ "h3=h at 10 bar,500oc=3478.5 KJ/kg,s3=s at 10 bar,500oc=7.7622 KJ/kg K\n",
+ "At exit from first stage of turbine i.e. at 10 bar and entropy of 6.5966 KJ/kg K,Temperature by interpolation from steam table at 10 bar and entropy of 6.5966 KJ/kg K\n",
+ "T2=181.8oc,h2=2782.8 KJ/kg\n",
+ "state at 8,i.e bleed state from second stage of expansion,i.e at 4 bar and entropy of 7.7622 KJ/kg K,Temperature by interpolation from steam table,T8=358.98oc=359oc\n",
+ "h8=3188.7 KJ/kg\n",
+ "state at 4 i.e. at condenser pressure of 0.1 bar and entropy of 7.7622 KJ/kg K,the state lies in wet region.So let the dryness fraction be x4.\n",
+ "s4=sf at 0.1 bar+x4*sfg at 0.1 bar\n",
+ "from steam tables,at 0.1 bar,sf=0.6493 KJ/kg K,sfg=7.5009 KJ/kg K\n",
+ "so x4= 0.95\n",
+ "h4=hf at 0.1 bar+x4*hfg at 0.1 bar in KJ/kg \n",
+ "from steam tables,at 0.1 bar,hf=191.83 KJ/kg,hfg=2392.8 KJ/kg\n",
+ "given,h4=2464.99 KJ/kg,h11=856.8 KJ/kg,h9=hf at 4 bar=604.74 KJ/kg\n",
+ "considering pump work,the net output can be given as,\n",
+ "W_net=W_HPT+W_LPT-(W_CEP+W_FP)\n",
+ "where,W_HPT={(h1-h6)+(1-m6)*(h6-h2)}per kg of steam from boiler.\n",
+ "W_LPT={(1-m6)+(h3-h8)*(1-m6-m8)*(h8-h4)}per kg of steam from boiler.\n",
+ "for closed feed water heater,energy balance yields;\n",
+ "m6*h6+h10=m6*h7+h11\n",
+ "assuming condensate leaving closed feed water heater to be saturated liquid,\n",
+ "h7=hf at 20 bar=908.79 KJ/kg\n",
+ "due to throttline,h7=h7_a=908.79 KJ/kg\n",
+ "for open feed water heater,energy balance yields,\n",
+ "m6*h7_a+m8*h8+(1-m6-m8)*h5=h9\n",
+ "for condensate extraction pump,h5-h4_a=v4_a*deltap\n",
+ "h5-hf at 0.1 bar=vf at 0.1 bar*(4-0.1)*10^2 \n",
+ "from steam tables,at 0.1 bar,hf=191.83 KJ/kg,vf=0.001010 m^3/kg\n",
+ "so h5 in KJ/kg= 192.22\n",
+ "for feed pump,h10-h9=v9*deltap\n",
+ "h10=h9+vf at 4 bar*(100-4)*10^2 in KJ/kg\n",
+ "from steam tables,at 4 bar,hf=604.74 KJ/kg,vf=0.001084 m^3/kg \n",
+ "substituting in energy balance upon closed feed water heater,\n",
+ "m6 in kg per kg of steam from boiler= 0.12\n",
+ "substituting in energy balance upon feed water heater,\n",
+ "m8 in kg per kg of steam from boiler= 0.109\n",
+ "Let the mass of steam entering first stage of turbine be m kg,then\n",
+ "W_HPT=m*{(h1-h6)+(1-m6)*(h6-h2)}\n",
+ "W_HPT/m= 573.24\n",
+ "so W_HPT=m*573.24 KJ\n",
+ "also,W_LPT={(1-m6)*(h3-h8)+(1-m6-m8)*(h8-h4)}per kg of steam from boiler\n",
+ "W_LPT/m= 813.42\n",
+ "so W_LPT=m*813.42 KJ\n",
+ "pump works(negative work)\n",
+ "W_CEP=m*(1-m6-m8)*(h5-h4_a)\n",
+ "W_CEP/m=\n",
+ "so W_CEP=m* 0.304\n",
+ "W_FP=m*(h10-h9)\n",
+ "W_FP/m= 10.41\n",
+ "so W_FP=m*10.41\n",
+ "net output,\n",
+ "W_net=W_HPT+W_LPT-W_CEP-W_FP \n",
+ "so 50*10^3=(573.24*m+813.42*m-0.304*m-10.41*m)\n",
+ "so m in kg/s= 36.34\n",
+ "heat supplied in boiler,Q_add in KJ/s= 91460.71\n",
+ "Thermal efficenncy= 0.55\n",
+ "in percentage 54.67\n",
+ "so mass of steam bled at 20 bar=0.119 kg per kg of steam entering first stage\n",
+ "mass of steam bled at 4 bar=0.109 kg per kg of steam entering first stage\n",
+ "mass of steam entering first stage=36.33 kg/s\n",
+ "thermal efficiency=54.66%\n",
+ "NOTE=>In this question there is some caclulation mistake while calculating m6 in book,which is corrected above so some answers may vary.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of thermal efficiency,mass of steam\n",
+ "#intiation of all variables\n",
+ "# Chapter 8\n",
+ "print\"Example 8.18, Page:294 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 8 Example 18\")\n",
+ "W_net=50*10**3;#net output of turbine in KW\n",
+ "print(\"from steam tables,at inlet to first stage of turbine,h1=h at 100 bar,500oc=3373.7 KJ/kg,s1=s at 100 bar,500oc=6.5966 KJ/kg\")\n",
+ "h1=3373.7;\n",
+ "s1=6.5966;\n",
+ "print(\"Due to isentropic expansion,s1=s6=s2 and s3=s8=s4\")\n",
+ "s2=s1;\n",
+ "s6=s2;\n",
+ "print(\"State at 6 i.e bleed state from HP turbine,temperature by interpolation from steam table =261.6oc.\")\n",
+ "print(\"At inlet to second stage of turbine,h6=2930.572 KJ/kg\")\n",
+ "h6=2930.572;\n",
+ "print(\"h3=h at 10 bar,500oc=3478.5 KJ/kg,s3=s at 10 bar,500oc=7.7622 KJ/kg K\")\n",
+ "h3=3478.5;\n",
+ "s3=7.7622;\n",
+ "s4=s3;\n",
+ "s8=s4;\n",
+ "print(\"At exit from first stage of turbine i.e. at 10 bar and entropy of 6.5966 KJ/kg K,Temperature by interpolation from steam table at 10 bar and entropy of 6.5966 KJ/kg K\")\n",
+ "print(\"T2=181.8oc,h2=2782.8 KJ/kg\")\n",
+ "T2=181.8;\n",
+ "h2=2782.8;\n",
+ "print(\"state at 8,i.e bleed state from second stage of expansion,i.e at 4 bar and entropy of 7.7622 KJ/kg K,Temperature by interpolation from steam table,T8=358.98oc=359oc\")\n",
+ "T8=359;\n",
+ "print(\"h8=3188.7 KJ/kg\")\n",
+ "h8=3188.7;\n",
+ "print(\"state at 4 i.e. at condenser pressure of 0.1 bar and entropy of 7.7622 KJ/kg K,the state lies in wet region.So let the dryness fraction be x4.\")\n",
+ "print(\"s4=sf at 0.1 bar+x4*sfg at 0.1 bar\")\n",
+ "print(\"from steam tables,at 0.1 bar,sf=0.6493 KJ/kg K,sfg=7.5009 KJ/kg K\")\n",
+ "sf=0.6493;\n",
+ "sfg=7.5009; \n",
+ "x4=(s4-sf)/sfg\n",
+ "print(\"so x4=\"),round(x4,2)\n",
+ "x4=0.95;#approx.\n",
+ "print(\"h4=hf at 0.1 bar+x4*hfg at 0.1 bar in KJ/kg \")\n",
+ "print(\"from steam tables,at 0.1 bar,hf=191.83 KJ/kg,hfg=2392.8 KJ/kg\")\n",
+ "hf=191.83;\n",
+ "hfg=2392.8;\n",
+ "h4=hf+x4*hfg\n",
+ "print(\"given,h4=2464.99 KJ/kg,h11=856.8 KJ/kg,h9=hf at 4 bar=604.74 KJ/kg\")\n",
+ "h4=2464.99;\n",
+ "h11=856.8;\n",
+ "h9=604.74;\n",
+ "print(\"considering pump work,the net output can be given as,\")\n",
+ "print(\"W_net=W_HPT+W_LPT-(W_CEP+W_FP)\")\n",
+ "print(\"where,W_HPT={(h1-h6)+(1-m6)*(h6-h2)}per kg of steam from boiler.\")\n",
+ "print(\"W_LPT={(1-m6)+(h3-h8)*(1-m6-m8)*(h8-h4)}per kg of steam from boiler.\")\n",
+ "print(\"for closed feed water heater,energy balance yields;\")\n",
+ "print(\"m6*h6+h10=m6*h7+h11\")\n",
+ "print(\"assuming condensate leaving closed feed water heater to be saturated liquid,\")\n",
+ "print(\"h7=hf at 20 bar=908.79 KJ/kg\")\n",
+ "h7=908.79; \n",
+ "print(\"due to throttline,h7=h7_a=908.79 KJ/kg\")\n",
+ "h7_a=h7;\n",
+ "print(\"for open feed water heater,energy balance yields,\")\n",
+ "print(\"m6*h7_a+m8*h8+(1-m6-m8)*h5=h9\")\n",
+ "print(\"for condensate extraction pump,h5-h4_a=v4_a*deltap\")\n",
+ "print(\"h5-hf at 0.1 bar=vf at 0.1 bar*(4-0.1)*10^2 \")\n",
+ "print(\"from steam tables,at 0.1 bar,hf=191.83 KJ/kg,vf=0.001010 m^3/kg\")\n",
+ "hf=191.83;\n",
+ "vf=0.001010; \n",
+ "h5=hf+vf*(4-0.1)*10**2\n",
+ "print(\"so h5 in KJ/kg=\"),round(h5,2)\n",
+ "print(\"for feed pump,h10-h9=v9*deltap\")\n",
+ "print(\"h10=h9+vf at 4 bar*(100-4)*10^2 in KJ/kg\")\n",
+ "print(\"from steam tables,at 4 bar,hf=604.74 KJ/kg,vf=0.001084 m^3/kg \")\n",
+ "hf=604.74;\n",
+ "vf=0.001084;\n",
+ "h10=h9+vf*(100-4)*10**2\n",
+ "print(\"substituting in energy balance upon closed feed water heater,\")\n",
+ "m6=(h11-h10)/(h6-h7)\n",
+ "print(\"m6 in kg per kg of steam from boiler=\"),round(m6,3)\n",
+ "print(\"substituting in energy balance upon feed water heater,\")\n",
+ "m8=(h9-m6*h7_a+m6*h5-h5)/(h8-h5)\n",
+ "print(\"m8 in kg per kg of steam from boiler=\"),round(m8,3)\n",
+ "print(\"Let the mass of steam entering first stage of turbine be m kg,then\")\n",
+ "{(h1-h6)+(1-m6)*(h6-h2)}\n",
+ "print(\"W_HPT=m*{(h1-h6)+(1-m6)*(h6-h2)}\")\n",
+ "print(\"W_HPT/m=\"),round(((h1-h6)+(1-m6)*(h6-h2)),2)\n",
+ "print(\"so W_HPT=m*573.24 KJ\")\n",
+ "print(\"also,W_LPT={(1-m6)*(h3-h8)+(1-m6-m8)*(h8-h4)}per kg of steam from boiler\")\n",
+ "{(1-m6)*(h3-h8)+(1-m6-m8)*(h8-h4)}\n",
+ "print(\"W_LPT/m=\"),round(((1-m6)*(h3-h8)+(1-m6-m8)*(h8-h4)),2)\n",
+ "print(\"so W_LPT=m*813.42 KJ\")\n",
+ "print(\"pump works(negative work)\")\n",
+ "print(\"W_CEP=m*(1-m6-m8)*(h5-h4_a)\")\n",
+ "h4_a=191.83;#h4_a=hf at 0.1 bar\n",
+ "print(\"W_CEP/m=\")\n",
+ "(1-m6-m8)*(h5-h4_a)\n",
+ "print(\"so W_CEP=m* 0.304\")\n",
+ "print(\"W_FP=m*(h10-h9)\")\n",
+ "print(\"W_FP/m=\"),round((h10-h9),2)\n",
+ "print(\"so W_FP=m*10.41\")\n",
+ "print(\"net output,\")\n",
+ "print(\"W_net=W_HPT+W_LPT-W_CEP-W_FP \")\n",
+ "print(\"so 50*10^3=(573.24*m+813.42*m-0.304*m-10.41*m)\")\n",
+ "m=W_net/(573.24+813.42-0.304-10.41)\n",
+ "print(\"so m in kg/s=\"),round(m,2)\n",
+ "Q_add=m*(h1-h11)\n",
+ "print(\"heat supplied in boiler,Q_add in KJ/s=\"),round(m*(h1-h11),2)\n",
+ "print(\"Thermal efficenncy=\"),round(W_net/Q_add,2)\n",
+ "print(\"in percentage\"),round(W_net*100/Q_add,2)\n",
+ "print(\"so mass of steam bled at 20 bar=0.119 kg per kg of steam entering first stage\")\n",
+ "print(\"mass of steam bled at 4 bar=0.109 kg per kg of steam entering first stage\")\n",
+ "print(\"mass of steam entering first stage=36.33 kg/s\")\n",
+ "print(\"thermal efficiency=54.66%\")\n",
+ "print(\"NOTE=>In this question there is some caclulation mistake while calculating m6 in book,which is corrected above so some answers may vary.\")\n"
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter9_3.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter9_3.ipynb
new file mode 100644
index 00000000..606321b3
--- /dev/null
+++ b/_Engineering_Thermodynamics_by__O._Singh/chapter9_3.ipynb
@@ -0,0 +1,1655 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#Chapter 9:Gas Power Cycles"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 9.1;pg no: 334"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 9.1, Page:334 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 1\n",
+ "SI engine operate on otto cycle.consider working fluid to be perfect gas.\n",
+ "here,y=Cp/Cv\n",
+ "Cp-Cv=R in KJ/kg K\n",
+ "compression ratio,r=V1/V2=(0.15+V2)/V2\n",
+ "so V2=0.15/(r-1) in m^3\n",
+ "so V2=0.03 m^3\n",
+ "total cylinder volume=V1=r*V2 m^3\n",
+ "from perfect gas law,P*V=m*R*T\n",
+ "so m=P1*V1/(R*T1) in kg\n",
+ "from state 1 to 2 by P*V^y=P2*V2^y\n",
+ "so P2=P1*(V1/V2)^y in KPa\n",
+ "also,P1*V1/T1=P2*V2/T2\n",
+ "so T2=P2*V2*T1/(P1*V1)in K\n",
+ "from heat addition process 2-3\n",
+ "Q23=m*CV*(T3-T2)\n",
+ "T3=T2+(Q23/(m*Cv))in K\n",
+ "also from,P3*V3/T3=P2*V2/T2\n",
+ "P3=P2*V2*T3/(V3*T2) in KPa\n",
+ "for adiabatic expansion 3-4,\n",
+ "P3*V3^y=P4*V4^y\n",
+ "and V4=V1\n",
+ "hence,P4=P3*V3^y/V1^y in KPa\n",
+ "and from P3*V3/T3=P4*V4/T4\n",
+ "T4=P4*V4*T3/(P3*V3) in K\n",
+ "entropy change from 2-3 and 4-1 are same,and can be given as,\n",
+ "S3-S2=S4-S1=m*Cv*log(T4/T1)\n",
+ "so entropy change,deltaS_32=deltaS_41 in KJ/K\n",
+ "heat rejected,Q41=m*Cv*(T4-T1) in KJ\n",
+ "net work(W) in KJ= 76.75\n",
+ "efficiency(n)= 0.51\n",
+ "in percentage 51.16\n",
+ "mean effective pressure(mep)=work/volume change in KPa= 511.64\n",
+ "so mep=511.67 KPa\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of mean effective pressure\n",
+ "#intiation of all variables\n",
+ "# Chapter 9\n",
+ "import math\n",
+ "print\"Example 9.1, Page:334 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 1\")\n",
+ "Cp=1;#specific heat at constant pressure in KJ/kg K\n",
+ "Cv=0.71;#specific heat at constant volume in KJ/kg K\n",
+ "P1=98;#pressure at begining of compression in KPa\n",
+ "T1=(60+273.15);#temperature at begining of compression in K\n",
+ "Q23=150;#heat supplied in KJ/kg\n",
+ "r=6;#compression ratio\n",
+ "R=0.287;#gas constant in KJ/kg K\n",
+ "print(\"SI engine operate on otto cycle.consider working fluid to be perfect gas.\")\n",
+ "print(\"here,y=Cp/Cv\")\n",
+ "y=Cp/Cv\n",
+ "y=1.4;#approx.\n",
+ "print(\"Cp-Cv=R in KJ/kg K\")\n",
+ "R=Cp-Cv\n",
+ "print(\"compression ratio,r=V1/V2=(0.15+V2)/V2\")\n",
+ "print(\"so V2=0.15/(r-1) in m^3\")\n",
+ "V2=0.15/(r-1)\n",
+ "print(\"so V2=0.03 m^3\")\n",
+ "print(\"total cylinder volume=V1=r*V2 m^3\")\n",
+ "V1=r*V2\n",
+ "print(\"from perfect gas law,P*V=m*R*T\")\n",
+ "print(\"so m=P1*V1/(R*T1) in kg\")\n",
+ "m=P1*V1/(R*T1)\n",
+ "m=0.183;#approx.\n",
+ "print(\"from state 1 to 2 by P*V^y=P2*V2^y\")\n",
+ "print(\"so P2=P1*(V1/V2)^y in KPa\")\n",
+ "P2=P1*(V1/V2)**y\n",
+ "print(\"also,P1*V1/T1=P2*V2/T2\")\n",
+ "print(\"so T2=P2*V2*T1/(P1*V1)in K\")\n",
+ "T2=P2*V2*T1/(P1*V1)\n",
+ "print(\"from heat addition process 2-3\")\n",
+ "print(\"Q23=m*CV*(T3-T2)\")\n",
+ "print(\"T3=T2+(Q23/(m*Cv))in K\")\n",
+ "T3=T2+(Q23/(m*Cv))\n",
+ "print(\"also from,P3*V3/T3=P2*V2/T2\")\n",
+ "print(\"P3=P2*V2*T3/(V3*T2) in KPa\")\n",
+ "V3=V2;#constant volume process\n",
+ "P3=P2*V2*T3/(V3*T2) \n",
+ "print(\"for adiabatic expansion 3-4,\")\n",
+ "print(\"P3*V3^y=P4*V4^y\")\n",
+ "print(\"and V4=V1\")\n",
+ "V4=V1;\n",
+ "print(\"hence,P4=P3*V3^y/V1^y in KPa\")\n",
+ "P4=P3*V3**y/V1**y\n",
+ "print(\"and from P3*V3/T3=P4*V4/T4\")\n",
+ "print(\"T4=P4*V4*T3/(P3*V3) in K\")\n",
+ "T4=P4*V4*T3/(P3*V3)\n",
+ "print(\"entropy change from 2-3 and 4-1 are same,and can be given as,\")\n",
+ "print(\"S3-S2=S4-S1=m*Cv*log(T4/T1)\")\n",
+ "print(\"so entropy change,deltaS_32=deltaS_41 in KJ/K\")\n",
+ "deltaS_32=m*Cv*math.log(T4/T1)\n",
+ "deltaS_41=deltaS_32;\n",
+ "print(\"heat rejected,Q41=m*Cv*(T4-T1) in KJ\")\n",
+ "Q41=m*Cv*(T4-T1)\n",
+ "W=Q23-Q41\n",
+ "print(\"net work(W) in KJ=\"),round(W,2)\n",
+ "n=W/Q23\n",
+ "print(\"efficiency(n)=\"),round(W/Q23,2)\n",
+ "print(\"in percentage\"),round(n*100,2)\n",
+ "mep=W/0.15\n",
+ "print(\"mean effective pressure(mep)=work/volume change in KPa=\"),round(W/0.15,2)\n",
+ "print(\"so mep=511.67 KPa\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 9.2;pg no: 336"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 9.2, Page:336 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 2\n",
+ "as given\n",
+ "Va=V2+(7/8)*(V1-V2)\n",
+ "Vb=V2+(1/8)*(V1-V2)\n",
+ "and also\n",
+ "Pa*Va^y=Pb*Vb^y\n",
+ "so (Va/Vb)=(Pb/Pa)^(1/y)\n",
+ "also substituting for Va and Vb\n",
+ "(V2+(7/8)*(V1-V2))/(V2+(1/8)*(V1-V2))=5.18\n",
+ "so V1/V2=r=1+(4.18*8/1.82) 19.37\n",
+ "it gives r=19.37 or V1/V2=19.37,compression ratio=19.37\n",
+ "as given;cut off occurs at(V1-V2)/15 volume\n",
+ "V3=V2+(V1-V2)/15\n",
+ "cut off ratio,rho=V3/V2\n",
+ "air standard efficiency for diesel cycle(n_airstandard)= 0.63\n",
+ "in percentage 63.23\n",
+ "overall efficiency(n_overall)=n_airstandard*n_ite*n_mech 0.253\n",
+ "in percentage 25.3\n",
+ "fuel consumption,bhp/hr in kg= 0.26\n",
+ "so compression ratio=19.37\n",
+ "air standard efficiency=63.25%\n",
+ "fuel consumption,bhp/hr=0.255 kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of compression ratio,air standard efficiency,fuel consumption,bhp/hr\n",
+ "#intiation of all variables\n",
+ "# Chapter 9\n",
+ "print\"Example 9.2, Page:336 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 2\")\n",
+ "Pa=138;#pressure during compression at 1/8 of stroke in KPa\n",
+ "Pb=1.38*10**3;#pressure during compression at 7/8 of stroke in KPa\n",
+ "n_ite=0.5;#indicated thermal efficiency\n",
+ "n_mech=0.8;#mechanical efficiency\n",
+ "C=41800;#calorific value in KJ/kg\n",
+ "y=1.4;#expansion constant\n",
+ "print(\"as given\")\n",
+ "print(\"Va=V2+(7/8)*(V1-V2)\")\n",
+ "print(\"Vb=V2+(1/8)*(V1-V2)\")\n",
+ "print(\"and also\")\n",
+ "print(\"Pa*Va^y=Pb*Vb^y\")\n",
+ "print(\"so (Va/Vb)=(Pb/Pa)^(1/y)\")\n",
+ "(Pb/Pa)**(1/y)\n",
+ "print(\"also substituting for Va and Vb\")\n",
+ "print(\"(V2+(7/8)*(V1-V2))/(V2+(1/8)*(V1-V2))=5.18\")\n",
+ "r=1+(4.18*8/1.82)\n",
+ "print(\"so V1/V2=r=1+(4.18*8/1.82)\"),round(r,2)\n",
+ "print(\"it gives r=19.37 or V1/V2=19.37,compression ratio=19.37\")\n",
+ "print(\"as given;cut off occurs at(V1-V2)/15 volume\")\n",
+ "print(\"V3=V2+(V1-V2)/15\")\n",
+ "print(\"cut off ratio,rho=V3/V2\")\n",
+ "rho=1+(r-1)/15\n",
+ "n_airstandard=1-(1/(r**(y-1)*y))*((rho**y-1)/(rho-1))\n",
+ "print(\"air standard efficiency for diesel cycle(n_airstandard)=\"),round(n_airstandard,2)\n",
+ "print(\"in percentage\"),round(n_airstandard*100,2)\n",
+ "n_airstandard=0.6325;\n",
+ "n_overall=n_airstandard*n_ite*n_mech\n",
+ "print(\"overall efficiency(n_overall)=n_airstandard*n_ite*n_mech\"),round(n_overall,3)\n",
+ "print(\"in percentage\"),round(n_overall*100,2)\n",
+ "n_overall=0.253;\n",
+ "75*60*60/(n_overall*C*100)\n",
+ "print(\"fuel consumption,bhp/hr in kg=\"),round(75*60*60/(n_overall*C*100),2)\n",
+ "print(\"so compression ratio=19.37\")\n",
+ "print(\"air standard efficiency=63.25%\")\n",
+ "print(\"fuel consumption,bhp/hr=0.255 kg\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 9.3;pg no: 338"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 9.3, Page:338 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 3\n",
+ "1-2-3-4=cycle a\n",
+ "1-2_a-3_a-4_a-5=cycle b\n",
+ "here Cp/Cv=y\n",
+ "and R=0.293 KJ/kg K\n",
+ "let us consider 1 kg of air for perfect gas,\n",
+ "P*V=m*R*T\n",
+ "so V1=m*R*T1/P1 in m^3\n",
+ "at state 3,\n",
+ "P3*V3=m*R*T3\n",
+ "so T3/V2=P3/(m*R)\n",
+ "so T3=17064.8*V2............eq1\n",
+ "for cycle a and also for cycle b\n",
+ "T3_a=17064.8*V2_a.............eq2\n",
+ "a> for otto cycle,\n",
+ "Q23=Cv*(T3-T2)\n",
+ "so T3-T2=Q23/Cv\n",
+ "and T2=T3-2394.36.............eq3\n",
+ "from gas law,P2*V2/T2=P3*V3/T3\n",
+ "here V2=V3 and using eq 3,we get\n",
+ "so P2/(T3-2394.36)=5000/T3\n",
+ "substituting T3 as function of V2\n",
+ "P2/(17064.8*V2-2394.36)=5000/(17064.8*V2)\n",
+ "P2=5000*(17064.8*V2-2394.36)/(17064.8*V2)\n",
+ "also P1*V1^y=P2*V2^y\n",
+ "or 103*(1.06)^1.4=(5000*(17064.8*V2-2394.36)/(17064.8*V2))*V2^1.4\n",
+ "upon solving it yields\n",
+ "381.4*V2=17064.8*V2^2.4-2394.36*V2^1.4\n",
+ "or V2^1.4-0.140*V2^0.4-.022=0\n",
+ "by hit and trial it yields,V2=0.18 \n",
+ "thus compression ratio,r=V1/V2\n",
+ "otto cycle efficiency,n_otto=1-(1/r)^(y-1)\n",
+ "in percentage\n",
+ "b> for mixed or dual cycle\n",
+ "Cp*(T4_a-T3_a)=Cv*(T3_a-T2_a)=1700/2=850\n",
+ "or T3_a-T2_a=850/Cv\n",
+ "or T2_a=T3_a-1197.2 .............eq4 \n",
+ "also P2_a*V2_a/T2_a=P3_a*V3_a/T3_a\n",
+ "P2_a*V2_a/(T3_a-1197.2)=5000*V2_a/T3_a\n",
+ "or P2_a/(T3_a-1197.2)=5000/T3_a\n",
+ "also we had seen earlier that T3_a=17064.8*V2_a\n",
+ "so P2_a/(17064.8*V2_a-1197.2)=5000/(17064.8*V2_a)\n",
+ "so P2_a=5000*(17064.8*V2_a-1197.2)/(17064.8*V2_a).....................eq5\n",
+ "or for adiabatic process,1-2_a\n",
+ "P1*V1^y=P2*V2^y\n",
+ "so 1.3*(1.06)^1.4=V2_a^1.4*(5000-(359.78/V2_a))\n",
+ "or V2_a^1.4-0.07*V2_a^0.4-0.022=0\n",
+ "by hit and trial \n",
+ "V2_a=0.122 m^3\n",
+ "therefore upon substituting V2_a,\n",
+ "by eq 5,P2_a in KPa\n",
+ "by eq 2,T3_a in K\n",
+ "by eq 4,T2_a in K\n",
+ "from constant pressure heat addition\n",
+ "Cp*(T4_a-T3_a)=850\n",
+ "so T4_a=T3_a+(850/Cp) in K\n",
+ "also P4_a*V4_a/T4_a= P3_a*V3_a/T3_a\n",
+ "so V4_a=P3_a*V3_a*T4_a/(T3_a*P4_a) in m^3 \n",
+ "here P3_a=P4_a and V2_a=V3_a\n",
+ "using adiabatic formulations V4_a=0.172 m^3\n",
+ "(V5/V4_a)^(y-1)=(T4_a/T5),here V5=V1\n",
+ "so T5=T4_a/(V5/V4_a)^(y-1) in K\n",
+ "heat rejected in process 5-1,Q51=Cv*(T5-T1) in KJ\n",
+ "efficiency of mixed cycle(n_mixed)= 0.57\n",
+ "in percentage 56.55\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "'NOTE=>In this question temperature difference (T3-T2) for part a> in book is calculated wrong i.e 2328.77,which is corrected above and comes to be 2394.36,however it doesnt effect the efficiency of any part of this question.'"
+ ]
+ },
+ "execution_count": 3,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "#cal of comparing efficiency of two cycles\n",
+ "#intiation of all variables\n",
+ "# Chapter 9\n",
+ "print\"Example 9.3, Page:338 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 3\")\n",
+ "T1=(100+273.15);#temperature at beginning of compresssion in K\n",
+ "P1=103;#pressure at beginning of compresssion in KPa\n",
+ "Cp=1.003;#specific heat at constant pressure in KJ/kg K\n",
+ "Cv=0.71;#specific heat at constant volume in KJ/kg K\n",
+ "Q23=1700;#heat added during combustion in KJ/kg\n",
+ "P3=5000;#maximum pressure in cylinder in KPa\n",
+ "print(\"1-2-3-4=cycle a\")\n",
+ "print(\"1-2_a-3_a-4_a-5=cycle b\")\n",
+ "print(\"here Cp/Cv=y\")\n",
+ "y=Cp/Cv\n",
+ "y=1.4;#approx.\n",
+ "print(\"and R=0.293 KJ/kg K\")\n",
+ "R=0.293;\n",
+ "print(\"let us consider 1 kg of air for perfect gas,\")\n",
+ "m=1;#mass of air in kg\n",
+ "print(\"P*V=m*R*T\")\n",
+ "print(\"so V1=m*R*T1/P1 in m^3\")\n",
+ "V1=m*R*T1/P1\n",
+ "print(\"at state 3,\")\n",
+ "print(\"P3*V3=m*R*T3\")\n",
+ "print(\"so T3/V2=P3/(m*R)\")\n",
+ "P3/(m*R)\n",
+ "print(\"so T3=17064.8*V2............eq1\")\n",
+ "print(\"for cycle a and also for cycle b\")\n",
+ "print(\"T3_a=17064.8*V2_a.............eq2\")\n",
+ "print(\"a> for otto cycle,\")\n",
+ "print(\"Q23=Cv*(T3-T2)\")\n",
+ "print(\"so T3-T2=Q23/Cv\")\n",
+ "Q23/Cv\n",
+ "print(\"and T2=T3-2394.36.............eq3\")\n",
+ "print(\"from gas law,P2*V2/T2=P3*V3/T3\")\n",
+ "print(\"here V2=V3 and using eq 3,we get\")\n",
+ "print(\"so P2/(T3-2394.36)=5000/T3\")\n",
+ "print(\"substituting T3 as function of V2\")\n",
+ "print(\"P2/(17064.8*V2-2394.36)=5000/(17064.8*V2)\")\n",
+ "print(\"P2=5000*(17064.8*V2-2394.36)/(17064.8*V2)\")\n",
+ "print(\"also P1*V1^y=P2*V2^y\")\n",
+ "print(\"or 103*(1.06)^1.4=(5000*(17064.8*V2-2394.36)/(17064.8*V2))*V2^1.4\")\n",
+ "print(\"upon solving it yields\")\n",
+ "print(\"381.4*V2=17064.8*V2^2.4-2394.36*V2^1.4\")\n",
+ "print(\"or V2^1.4-0.140*V2^0.4-.022=0\")\n",
+ "print(\"by hit and trial it yields,V2=0.18 \")\n",
+ "V2=0.18;\n",
+ "print(\"thus compression ratio,r=V1/V2\")\n",
+ "r=V1/V2\n",
+ "print(\"otto cycle efficiency,n_otto=1-(1/r)^(y-1)\")\n",
+ "n_otto=1-(1/r)**(y-1)\n",
+ "print(\"in percentage\")\n",
+ "n_otto=n_otto*100\n",
+ "print(\"b> for mixed or dual cycle\")\n",
+ "print(\"Cp*(T4_a-T3_a)=Cv*(T3_a-T2_a)=1700/2=850\")\n",
+ "print(\"or T3_a-T2_a=850/Cv\")\n",
+ "850/Cv\n",
+ "print(\"or T2_a=T3_a-1197.2 .............eq4 \")\n",
+ "print(\"also P2_a*V2_a/T2_a=P3_a*V3_a/T3_a\")\n",
+ "print(\"P2_a*V2_a/(T3_a-1197.2)=5000*V2_a/T3_a\")\n",
+ "print(\"or P2_a/(T3_a-1197.2)=5000/T3_a\")\n",
+ "print(\"also we had seen earlier that T3_a=17064.8*V2_a\")\n",
+ "print(\"so P2_a/(17064.8*V2_a-1197.2)=5000/(17064.8*V2_a)\")\n",
+ "print(\"so P2_a=5000*(17064.8*V2_a-1197.2)/(17064.8*V2_a).....................eq5\")\n",
+ "print(\"or for adiabatic process,1-2_a\")\n",
+ "print(\"P1*V1^y=P2*V2^y\")\n",
+ "print(\"so 1.3*(1.06)^1.4=V2_a^1.4*(5000-(359.78/V2_a))\")\n",
+ "print(\"or V2_a^1.4-0.07*V2_a^0.4-0.022=0\")\n",
+ "print(\"by hit and trial \")\n",
+ "print(\"V2_a=0.122 m^3\")\n",
+ "V2_a=0.122;\n",
+ "print(\"therefore upon substituting V2_a,\")\n",
+ "print(\"by eq 5,P2_a in KPa\")\n",
+ "P2_a=5000*(17064.8*V2_a-1197.2)/(17064.8*V2_a)\n",
+ "print(\"by eq 2,T3_a in K\")\n",
+ "T3_a=17064.8*V2_a\n",
+ "print(\"by eq 4,T2_a in K\")\n",
+ "T2_a=T3_a-1197.2\n",
+ "print(\"from constant pressure heat addition\")\n",
+ "print(\"Cp*(T4_a-T3_a)=850\")\n",
+ "print(\"so T4_a=T3_a+(850/Cp) in K\")\n",
+ "T4_a=T3_a+(850/Cp)\n",
+ "print(\"also P4_a*V4_a/T4_a= P3_a*V3_a/T3_a\")\n",
+ "print(\"so V4_a=P3_a*V3_a*T4_a/(T3_a*P4_a) in m^3 \")\n",
+ "print(\"here P3_a=P4_a and V2_a=V3_a\")\n",
+ "V4_a=V2_a*T4_a/(T3_a)\n",
+ "print(\"using adiabatic formulations V4_a=0.172 m^3\")\n",
+ "print(\"(V5/V4_a)^(y-1)=(T4_a/T5),here V5=V1\")\n",
+ "V5=V1;\n",
+ "print(\"so T5=T4_a/(V5/V4_a)^(y-1) in K\")\n",
+ "T5=T4_a/(V5/V4_a)**(y-1)\n",
+ "print(\"heat rejected in process 5-1,Q51=Cv*(T5-T1) in KJ\")\n",
+ "Q51=Cv*(T5-T1)\n",
+ "n_mixed=(Q23-Q51)/Q23\n",
+ "print(\"efficiency of mixed cycle(n_mixed)=\"),round(n_mixed,2)\n",
+ "print(\"in percentage\"),round(n_mixed*100,2)\n",
+ "(\"NOTE=>In this question temperature difference (T3-T2) for part a> in book is calculated wrong i.e 2328.77,which is corrected above and comes to be 2394.36,however it doesnt effect the efficiency of any part of this question.\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 9.4;pg no: 341"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 9.4, Page:341 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 4\n",
+ "optimum pressure ratio for maximum work output,\n",
+ "rp=(T_max/T_min)^((y)/(2*(y-1)))\n",
+ "so p2/p1=11.3,For process 1-2, T2/T1=(p2/p1)^(y/(y-1))\n",
+ "so T2=T1*(p2/p1)^((y-1)/y)in K\n",
+ "For process 3-4,\n",
+ "T3/T4=(p3/p4)^((y-1)/y)=(p2/p1)^((y-1)/y)\n",
+ "so T4=T3/(rp)^((y-1)/y)in K\n",
+ "heat supplied,Q23=Cp*(T3-T2)in KJ/kg\n",
+ "compressor work,Wc in KJ/kg= 301.5\n",
+ "turbine work,Wt in KJ/kg= 603.0\n",
+ "thermal efficiency=net work/heat supplied= 0.5\n",
+ "so compressor work=301.5 KJ/kg,turbine work=603 KJ/kg,thermal efficiency=50%\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of thermal efficiency,turbine and compressor work\n",
+ "#intiation of all variables\n",
+ "# Chapter 9\n",
+ "print\"Example 9.4, Page:341 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 4\")\n",
+ "T3=1200;#maximum temperature in K\n",
+ "T1=300;#minimum temperature in K\n",
+ "y=1.4;#expansion constant\n",
+ "Cp=1.005;#specific heat at constant pressure in KJ/kg K\n",
+ "print(\"optimum pressure ratio for maximum work output,\")\n",
+ "print(\"rp=(T_max/T_min)^((y)/(2*(y-1)))\")\n",
+ "T_max=T3;\n",
+ "T_min=T1;\n",
+ "rp=(T_max/T_min)**((y)/(2*(y-1)))\n",
+ "print(\"so p2/p1=11.3,For process 1-2, T2/T1=(p2/p1)^(y/(y-1))\")\n",
+ "print(\"so T2=T1*(p2/p1)^((y-1)/y)in K\")\n",
+ "T2=T1*(rp)**((y-1)/y)\n",
+ "print(\"For process 3-4,\")\n",
+ "print(\"T3/T4=(p3/p4)^((y-1)/y)=(p2/p1)^((y-1)/y)\")\n",
+ "print(\"so T4=T3/(rp)^((y-1)/y)in K\")\n",
+ "T4=T3/(rp)**((y-1)/y)\n",
+ "print(\"heat supplied,Q23=Cp*(T3-T2)in KJ/kg\")\n",
+ "Q23=Cp*(T3-T2)\n",
+ "Wc=Cp*(T2-T1)\n",
+ "print(\"compressor work,Wc in KJ/kg=\"),round(Wc,2)\n",
+ "Wt=Cp*(T3-T4)\n",
+ "print(\"turbine work,Wt in KJ/kg=\"),round(Wt,2)\n",
+ "(Wt-Wc)/Q23\n",
+ "print(\"thermal efficiency=net work/heat supplied=\"),round((Wt-Wc)/Q23,2)\n",
+ "print(\"so compressor work=301.5 KJ/kg,turbine work=603 KJ/kg,thermal efficiency=50%\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 9.5;pg no: 342"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 9.5, Page:342 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 5\n",
+ "gas turbine cycle is shown by 1-2-3-4 on T-S diagram,\n",
+ "for process 1-2 being isentropic,\n",
+ "T2/T1=(P2/P1)^((y-1)/y)\n",
+ "so T2=T1*(P2/P1)^((y-1)/y) in K\n",
+ "considering compressor efficiency,n_compr=(T2-T1)/(T2_a-T1)\n",
+ "so T2_a=T1+((T2-T1)/n_compr)in K\n",
+ "during process 2-3 due to combustion of unit mass of compressed the energy balance shall be as under,\n",
+ "heat added=mf*q\n",
+ "=((ma+mf)*Cp_comb*T3)-(ma*Cp_air*T2)\n",
+ "or (mf/ma)*q=((1+(mf/ma))*Cp_comb*T3)-(Cp_air*T2_a)\n",
+ "so T3=((mf/ma)*q+(Cp_air*T2_a))/((1+(mf/ma))*Cp_comb)in K\n",
+ "for expansion 3-4 being\n",
+ "T4/T3=(P4/P3)^((n-1)/n)\n",
+ "so T4=T3*(P4/P3)^((n-1)/n) in K\n",
+ "actaul temperature at turbine inlet considering internal efficiency of turbine,\n",
+ "n_turb=(T3-T4_a)/(T3-T4)\n",
+ "so T4_a=T3-(n_turb*(T3-T4)) in K\n",
+ "compressor work,per kg of air compressed(Wc) in KJ/kg of air= 234.42\n",
+ "so compressor work=234.42 KJ/kg of air\n",
+ "turbine work,per kg of air compressed(Wt) in KJ/kg of air= 414.71\n",
+ "so turbine work=414.71 KJ/kg of air\n",
+ "net work(W_net) in KJ/kg of air= 180.29\n",
+ "heat supplied(Q) in KJ/kg of air= 751.16\n",
+ "thermal efficiency(n)= 0.24\n",
+ "in percentage 24.0\n",
+ "so thermal efficiency=24%\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of thermal efficiency,turbine and compressor work\n",
+ "#intiation of all variables\n",
+ "# Chapter 9\n",
+ "print\"Example 9.5, Page:342 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 5\")\n",
+ "P1=1*10**5;#initial pressure in Pa\n",
+ "P4=P1;#constant pressure process\n",
+ "T1=300;#initial temperature in K\n",
+ "P2=6.2*10**5;#pressure after compression in Pa\n",
+ "P3=P2;#constant pressure process\n",
+ "k=0.017;#fuel to air ratio\n",
+ "n_compr=0.88;#compressor efficiency\n",
+ "q=44186;#heating value of fuel in KJ/kg\n",
+ "n_turb=0.9;#turbine internal efficiency\n",
+ "Cp_comb=1.147;#specific heat of combustion at constant pressure in KJ/kg K\n",
+ "Cp_air=1.005;#specific heat of air at constant pressure in KJ/kg K\n",
+ "y=1.4;#expansion constant\n",
+ "n=1.33;#expansion constant for polytropic constant\n",
+ "print(\"gas turbine cycle is shown by 1-2-3-4 on T-S diagram,\")\n",
+ "print(\"for process 1-2 being isentropic,\")\n",
+ "print(\"T2/T1=(P2/P1)^((y-1)/y)\")\n",
+ "print(\"so T2=T1*(P2/P1)^((y-1)/y) in K\")\n",
+ "T2=T1*(P2/P1)**((y-1)/y)\n",
+ "print(\"considering compressor efficiency,n_compr=(T2-T1)/(T2_a-T1)\")\n",
+ "print(\"so T2_a=T1+((T2-T1)/n_compr)in K\")\n",
+ "T2_a=T1+((T2-T1)/n_compr)\n",
+ "print(\"during process 2-3 due to combustion of unit mass of compressed the energy balance shall be as under,\")\n",
+ "print(\"heat added=mf*q\")\n",
+ "print(\"=((ma+mf)*Cp_comb*T3)-(ma*Cp_air*T2)\")\n",
+ "print(\"or (mf/ma)*q=((1+(mf/ma))*Cp_comb*T3)-(Cp_air*T2_a)\")\n",
+ "print(\"so T3=((mf/ma)*q+(Cp_air*T2_a))/((1+(mf/ma))*Cp_comb)in K\")\n",
+ "T3=((k)*q+(Cp_air*T2_a))/((1+(k))*Cp_comb)\n",
+ "print(\"for expansion 3-4 being\")\n",
+ "print(\"T4/T3=(P4/P3)^((n-1)/n)\")\n",
+ "print(\"so T4=T3*(P4/P3)^((n-1)/n) in K\")\n",
+ "T4=T3*(P4/P3)**((n-1)/n)\n",
+ "print(\"actaul temperature at turbine inlet considering internal efficiency of turbine,\")\n",
+ "print(\"n_turb=(T3-T4_a)/(T3-T4)\")\n",
+ "print(\"so T4_a=T3-(n_turb*(T3-T4)) in K\")\n",
+ "T4_a=T3-(n_turb*(T3-T4))\n",
+ "Wc=Cp_air*(T2_a-T1)\n",
+ "print(\"compressor work,per kg of air compressed(Wc) in KJ/kg of air=\"),round(Wc,2)\n",
+ "print(\"so compressor work=234.42 KJ/kg of air\")\n",
+ "Wt=Cp_comb*(T3-T4_a)\n",
+ "print(\"turbine work,per kg of air compressed(Wt) in KJ/kg of air=\"),round(Wt,2)\n",
+ "print(\"so turbine work=414.71 KJ/kg of air\")\n",
+ "W_net=Wt-Wc\n",
+ "print(\"net work(W_net) in KJ/kg of air=\"),round(W_net,2)\n",
+ "Q=k*q\n",
+ "print(\"heat supplied(Q) in KJ/kg of air=\"),round(Q,2)\n",
+ "n=W_net/Q\n",
+ "print(\"thermal efficiency(n)=\"),round(n,2)\n",
+ "print(\"in percentage\"),round(n*100,2)\n",
+ "print(\"so thermal efficiency=24%\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 9.6;pg no: 343"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 9.6, Page:343 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 6\n",
+ "NOTE=>In this question formula for overall pressure ratio is derived,which cannot be done using scilab,so using this formula we proceed further.\n",
+ "overall pressure ratio(rp)= 13.59\n",
+ "so overall optimum pressure ratio=13.6\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of overall optimum pressure ratio\n",
+ "#intiation of all variables\n",
+ "# Chapter 9\n",
+ "print\"Example 9.6, Page:343 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 6\")\n",
+ "T1=300;#minimum temperature in brayton cycle in K\n",
+ "T5=1200;#maximum temperature in brayton cycle in K\n",
+ "n_isen_c=0.85;#isentropic efficiency of compressor\n",
+ "n_isen_t=0.9;#isentropic efficiency of turbine\n",
+ "y=1.4;#expansion constant\n",
+ "print(\"NOTE=>In this question formula for overall pressure ratio is derived,which cannot be done using scilab,so using this formula we proceed further.\")\n",
+ "rp=(T1/(T5*n_isen_c*n_isen_t))**((2*y)/(3*(1-y)))\n",
+ "print(\"overall pressure ratio(rp)=\"),round(rp,2)\n",
+ "print(\"so overall optimum pressure ratio=13.6\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 9.7;pg no: 346"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 9.7, Page:346 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 7\n",
+ "i> theoretically state of air at exit can be determined by the given stage pressure ratio of 1.35.Let pressure at inlet to first stage P1 and subsequent intermediate pressure be P2,P3,P4,P5,P6,P7,P8 and exit pressure being P9.\n",
+ "therefore,P2/P1=P3/P2=P4/P3=P5/P4=P6/P5=P7/P6=P8/P7=P9/P8=r=1.35\n",
+ "or P9/P1=k=(1.35)^8 11.03\n",
+ "or theoretically,the temperature at exit of compressor can be predicted considering isentropic compression of air(y=1.4)\n",
+ "T9/T1=(P9/P1)^((y-1)/y)\n",
+ "so T9 in K= 621.47\n",
+ "considering overall efficiency of compression 82% the actual temperature at compressor exit can be obtained\n",
+ "(T9-T1)/(T9_actual-T1)=0.82\n",
+ "so T9_actual=T1+((T9-T1)/0.82) in K 689.19\n",
+ "let the actual index of compression be n, then\n",
+ "(T9_actual/T1)=(P9/P1)^((n-1)/n)\n",
+ "so n=log(P9/P1)/(log(P9/P1)-log(T9-actual/T1))\n",
+ "so state of air at exit of compressor,pressure=11.03 bar and temperature=689.18 K\n",
+ "ii> let polytropic efficiency be n_polytropic for compressor then,\n",
+ "(n-1)/n=((y-1)/y)*(1/n_polytropic)\n",
+ "so n_polytropic= 0.87\n",
+ "in percentage 86.9\n",
+ "so ploytropic efficiency=86.88%\n",
+ "iii> stage efficiency can be estimated for any stage.say first stage.\n",
+ "ideal state at exit of compressor stage=T2/T1=(P2/P1)^((y-1)/y)\n",
+ "so T2=T1*(P2/P1)^((y-1)/y) in K\n",
+ "actual temperature at exit of first stage can be estimated using polytropic index 1.49.\n",
+ "T2_actual/T1=(P2/P1)^((n-1)/n)\n",
+ "so T2_actual=T1*(P2/P1)^((n-1)/n) in K\n",
+ "stage efficiency for first stage,ns_1= 0.86\n",
+ "in percentage 86.33\n",
+ "actual temperature at exit of second stage,\n",
+ "T3_actual/T2_actual=(P3/P2)^((n-1)/n)\n",
+ "so T3_actual=T2_actual*(P3/P2)^((n-1)/n) in K\n",
+ "ideal temperature at exit of second stage\n",
+ "T3/T2_actual=(P3/P2)^((n-1)/n)\n",
+ "so T3=T2_actual*(P3/P2)^((y-1)/y) in K\n",
+ "stage efficiency for second stage,ns_2= 0.86\n",
+ "in percentage 86.33\n",
+ "actual rtemperature at exit of third stage,\n",
+ "T4_actual/T3_actual=(P4/P3)^((n-1)/n)\n",
+ "so T4_actual in K= 420.83\n",
+ "ideal temperature at exit of third stage,\n",
+ "T4/T3_actual=(P4/P3)^((n-1)/n)\n",
+ "so T4 in K= 415.42\n",
+ "stage efficiency for third stage,ns_3= 0.86\n",
+ "in percentage= 8632.9\n",
+ "so stage efficiency=86.4%\n",
+ "iv> from steady flow energy equation,\n",
+ "Wc=dw=dh and dh=du+p*dv+v*dp\n",
+ "dh=dq+v*dp\n",
+ "dq=0 in adiabatic process\n",
+ "dh=v*dp\n",
+ "Wc=v*dp\n",
+ "here for polytropic compression \n",
+ "P*V^1.49=constant i.e n=1.49\n",
+ "Wc in KJ/s= 16419.87\n",
+ "due to overall efficiency being 90% the actual compressor work(Wc_actual) in KJ/s= 14777.89\n",
+ "so power required to drive compressor =14777.89 KJ/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of state of air at exit of compressor,polytropic efficiency,efficiency of each sate,power\n",
+ "#intiation of all variables\n",
+ "# Chapter 9\n",
+ "import math\n",
+ "print\"Example 9.7, Page:346 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 7\")\n",
+ "T1=313.;#air entering temperature in K\n",
+ "P1=1*10**5;#air entering pressure in Pa\n",
+ "m=50.;#flow rate through compressor in kg/s\n",
+ "R=0.287;#gas constant in KJ/kg K\n",
+ "print(\"i> theoretically state of air at exit can be determined by the given stage pressure ratio of 1.35.Let pressure at inlet to first stage P1 and subsequent intermediate pressure be P2,P3,P4,P5,P6,P7,P8 and exit pressure being P9.\")\n",
+ "print(\"therefore,P2/P1=P3/P2=P4/P3=P5/P4=P6/P5=P7/P6=P8/P7=P9/P8=r=1.35\")\n",
+ "r=1.35;#compression ratio\n",
+ "k=(1.35)**8\n",
+ "print(\"or P9/P1=k=(1.35)^8\"),round(k,2)\n",
+ "k=11.03;#approx.\n",
+ "print(\"or theoretically,the temperature at exit of compressor can be predicted considering isentropic compression of air(y=1.4)\")\n",
+ "y=1.4;#expansion constant \n",
+ "print(\"T9/T1=(P9/P1)^((y-1)/y)\")\n",
+ "T9=T1*(k)**((y-1)/y)\n",
+ "print(\"so T9 in K=\"),round(T9,2)\n",
+ "print(\"considering overall efficiency of compression 82% the actual temperature at compressor exit can be obtained\")\n",
+ "print(\"(T9-T1)/(T9_actual-T1)=0.82\")\n",
+ "T9_actual=T1+((T9-T1)/0.82)\n",
+ "print(\"so T9_actual=T1+((T9-T1)/0.82) in K\"),round(T9_actual,2)\n",
+ "print(\"let the actual index of compression be n, then\")\n",
+ "print(\"(T9_actual/T1)=(P9/P1)^((n-1)/n)\")\n",
+ "print(\"so n=log(P9/P1)/(log(P9/P1)-log(T9-actual/T1))\")\n",
+ "n=math.log(k)/(math.log(k)-math.log(T9_actual/T1))\n",
+ "print(\"so state of air at exit of compressor,pressure=11.03 bar and temperature=689.18 K\")\n",
+ "print(\"ii> let polytropic efficiency be n_polytropic for compressor then,\")\n",
+ "print(\"(n-1)/n=((y-1)/y)*(1/n_polytropic)\")\n",
+ "n_polytropic=((y-1)/y)/((n-1)/n)\n",
+ "print(\"so n_polytropic=\"),round(n_polytropic,2)\n",
+ "print(\"in percentage\"),round(n_polytropic*100,2)\n",
+ "print(\"so ploytropic efficiency=86.88%\")\n",
+ "print(\"iii> stage efficiency can be estimated for any stage.say first stage.\")\n",
+ "print(\"ideal state at exit of compressor stage=T2/T1=(P2/P1)^((y-1)/y)\")\n",
+ "print(\"so T2=T1*(P2/P1)^((y-1)/y) in K\")\n",
+ "T2=T1*(r)**((y-1)/y)\n",
+ "print(\"actual temperature at exit of first stage can be estimated using polytropic index 1.49.\")\n",
+ "print(\"T2_actual/T1=(P2/P1)^((n-1)/n)\")\n",
+ "print(\"so T2_actual=T1*(P2/P1)^((n-1)/n) in K\")\n",
+ "T2_actual=T1*(r)**((n-1)/n)\n",
+ "ns_1=(T2-T1)/(T2_actual-T1)\n",
+ "print(\"stage efficiency for first stage,ns_1=\"),round(ns_1,2)\n",
+ "print(\"in percentage\"),round(ns_1*100,2)\n",
+ "print(\"actual temperature at exit of second stage,\")\n",
+ "print(\"T3_actual/T2_actual=(P3/P2)^((n-1)/n)\")\n",
+ "print(\"so T3_actual=T2_actual*(P3/P2)^((n-1)/n) in K\")\n",
+ "T3_actual=T2_actual*(r)**((n-1)/n)\n",
+ "print(\"ideal temperature at exit of second stage\")\n",
+ "print(\"T3/T2_actual=(P3/P2)^((n-1)/n)\")\n",
+ "print(\"so T3=T2_actual*(P3/P2)^((y-1)/y) in K\")\n",
+ "T3=T2_actual*(r)**((y-1)/y)\n",
+ "ns_2=(T3-T2_actual)/(T3_actual-T2_actual)\n",
+ "print(\"stage efficiency for second stage,ns_2=\"),round(ns_2,2)\n",
+ "print(\"in percentage\"),round(ns_2*100,2)\n",
+ "print(\"actual rtemperature at exit of third stage,\")\n",
+ "print(\"T4_actual/T3_actual=(P4/P3)^((n-1)/n)\")\n",
+ "T4_actual=T3_actual*(r)**((n-1)/n)\n",
+ "print(\"so T4_actual in K=\"),round(T4_actual,2)\n",
+ "print(\"ideal temperature at exit of third stage,\")\n",
+ "print(\"T4/T3_actual=(P4/P3)^((n-1)/n)\")\n",
+ "T4=T3_actual*(r)**((y-1)/y)\n",
+ "print(\"so T4 in K=\"),round(T4,2)\n",
+ "ns_3=(T4-T3_actual)/(T4_actual-T3_actual)\n",
+ "print(\"stage efficiency for third stage,ns_3=\"),round(ns_3,2)\n",
+ "ns_3=ns_3*100\n",
+ "print(\"in percentage=\"),round(ns_3*100,2)\n",
+ "print(\"so stage efficiency=86.4%\")\n",
+ "print(\"iv> from steady flow energy equation,\")\n",
+ "print(\"Wc=dw=dh and dh=du+p*dv+v*dp\")\n",
+ "print(\"dh=dq+v*dp\")\n",
+ "print(\"dq=0 in adiabatic process\")\n",
+ "print(\"dh=v*dp\")\n",
+ "print(\"Wc=v*dp\")\n",
+ "print(\"here for polytropic compression \")\n",
+ "print(\"P*V^1.49=constant i.e n=1.49\")\n",
+ "n=1.49;\n",
+ "Wc=(n/(n-1))*m*R*T1*(((k)**((n-1)/n))-1)\n",
+ "print(\"Wc in KJ/s=\"),round(Wc,2)\n",
+ "Wc_actual=Wc*0.9\n",
+ "print(\"due to overall efficiency being 90% the actual compressor work(Wc_actual) in KJ/s=\"),round(Wc*0.9,2)\n",
+ "print(\"so power required to drive compressor =14777.89 KJ/s\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 9.8;pg no: 349"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 9.8, Page:349 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 8\n",
+ "In question no.8,expression for air standard cycle efficiency is derived which cannot be solve using python software.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#intiation of all variables\n",
+ "# Chapter 9\n",
+ "print\"Example 9.8, Page:349 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 8\")\n",
+ "print(\"In question no.8,expression for air standard cycle efficiency is derived which cannot be solve using python software.\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 9.9;pg no: 350"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 9.9, Page:350 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 9\n",
+ "using polytropic efficiency the index of compression and expansion can be obtained as under,\n",
+ "let compression index be nc,\n",
+ "(nc-1)/nc=(y-1)/(y*n_poly_c)\n",
+ "so nc=1/(1-((y-1)/(y*n_poly_c)))\n",
+ "let expansion index be nt,\n",
+ "(nt-1)/nt=(n_poly_T*(y-1))/y\n",
+ "so nt=1/(1-((n_poly_T*(y-1))/y))\n",
+ "For process 1-2\n",
+ "T2/T1=(p2/p1)^((nc-1)/nc)\n",
+ "so T2=T1*(p2/p1)^((nc-1)/nc)in K\n",
+ "also T4/T3=(p4/p3)^((nt-1)/nt)\n",
+ "so T4=T3*(p4/p3)^((nt-1)/nt)in K\n",
+ "using heat exchanger effectivenesss,\n",
+ "epsilon=(T5-T2)/(T4-T2)\n",
+ "so T5=T2+(epsilon*(T4-T2))in K\n",
+ "heat added in combustion chamber,q_add=Cp*(T3-T5)in KJ/kg\n",
+ "compressor work,Wc=Cp*(T2-T1)in \n",
+ "turbine work,Wt=Cp*(T3-T4)in KJ/kg\n",
+ "cycle efficiency= 0.33\n",
+ "in percentage 32.79\n",
+ "work ratio= 0.33\n",
+ "specific work output in KJ/kg= 152.56\n",
+ "so cycle efficiency=32.79%,work ratio=0.334,specific work output=152.56 KJ/kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of cycle efficiency,work ratio,specific work output\n",
+ "#intiation of all variables\n",
+ "# Chapter 9\n",
+ "print\"Example 9.9, Page:350 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 9\")\n",
+ "y=1.4;#expansion constant\n",
+ "n_poly_c=0.85;#ploytropic efficiency of compressor\n",
+ "n_poly_T=0.90;#ploytropic efficiency of Turbine\n",
+ "r=8.;#compression ratio\n",
+ "T1=(27.+273.);#temperature of air in compressor in K\n",
+ "T3=1100.;#temperature of air leaving combustion chamber in K\n",
+ "epsilon=0.8;#effectiveness of heat exchanger\n",
+ "Cp=1.0032;#specific heat at constant pressure in KJ/kg K\n",
+ "print(\"using polytropic efficiency the index of compression and expansion can be obtained as under,\")\n",
+ "print(\"let compression index be nc,\")\n",
+ "print(\"(nc-1)/nc=(y-1)/(y*n_poly_c)\")\n",
+ "print(\"so nc=1/(1-((y-1)/(y*n_poly_c)))\")\n",
+ "nc=1/(1-((y-1)/(y*n_poly_c)))\n",
+ "print(\"let expansion index be nt,\")\n",
+ "print(\"(nt-1)/nt=(n_poly_T*(y-1))/y\")\n",
+ "print(\"so nt=1/(1-((n_poly_T*(y-1))/y))\")\n",
+ "nt=1/(1-((n_poly_T*(y-1))/y))\n",
+ "print(\"For process 1-2\")\n",
+ "print(\"T2/T1=(p2/p1)^((nc-1)/nc)\")\n",
+ "print(\"so T2=T1*(p2/p1)^((nc-1)/nc)in K\")\n",
+ "T2=T1*(r)**((nc-1)/nc)\n",
+ "print(\"also T4/T3=(p4/p3)^((nt-1)/nt)\")\n",
+ "print(\"so T4=T3*(p4/p3)^((nt-1)/nt)in K\")\n",
+ "T4=T3*(1/r)**((nt-1)/nt)\n",
+ "print(\"using heat exchanger effectivenesss,\") \n",
+ "print(\"epsilon=(T5-T2)/(T4-T2)\")\n",
+ "print(\"so T5=T2+(epsilon*(T4-T2))in K\")\n",
+ "T5=T2+(epsilon*(T4-T2))\n",
+ "print(\"heat added in combustion chamber,q_add=Cp*(T3-T5)in KJ/kg\")\n",
+ "q_add=Cp*(T3-T5)\n",
+ "print(\"compressor work,Wc=Cp*(T2-T1)in \")\n",
+ "Wc=Cp*(T2-T1)\n",
+ "print(\"turbine work,Wt=Cp*(T3-T4)in KJ/kg\")\n",
+ "Wt=Cp*(T3-T4)\n",
+ "(Wt-Wc)/q_add\n",
+ "print(\"cycle efficiency=\"),round((Wt-Wc)/q_add,2)\n",
+ "print(\"in percentage\"),round((Wt-Wc)*100/q_add,2)\n",
+ "(Wt-Wc)/Wt\n",
+ "print(\"work ratio=\"),round((Wt-Wc)/Wt,2)\n",
+ "print(\"specific work output in KJ/kg=\"),round(Wt-Wc,2)\n",
+ "print(\"so cycle efficiency=32.79%,work ratio=0.334,specific work output=152.56 KJ/kg\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 9.10;pg no: 351"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 9.10, Page:351 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 10\n",
+ "for process 1-2_a\n",
+ "T2_a/T1=(p2_a/p1)^((y-1)/y)\n",
+ "so T2_a=T1*(p2_a/p1)^((y-1)/y) in K\n",
+ "nc=(T2_a-T1)/(T2-T1)\n",
+ "so T2=T1+((T2_a-T1)/nc) in K\n",
+ "for process 3-4_a,\n",
+ "T4_a/T3=(p4/p3)^((y-1)/y)\n",
+ "so T4_a=T3*(p4/p3)^((y-1)/y)in K\n",
+ "Compressor work per kg,Wc=Cp*(T2-T1) in KJ/kg\n",
+ "Turbine work per kg,Wt=Cp*(T3-T4)in KJ/kg\n",
+ "net output,W_net=Wt-Wc={Wc-(Cp*(T3-T4))} in KJ/kg\n",
+ "heat added,q_add=Cp*(T3-T2) in KJ/kg\n",
+ "thermal efficiency,n=W_net/q_add\n",
+ "n={Wc-(Cp*(T3-T4))}/q_add\n",
+ "so T4=T3-((Wc-(n*q_add))/Cp)in K\n",
+ "therefore,isentropic efficiency of turbine,nt=(T3-T4)/(T3-T4_a) 0.297\n",
+ "in percentage 29.7\n",
+ "so turbine isentropic efficiency=29.69%\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of isentropic efficiency of turbine\n",
+ "#intiation of all variables\n",
+ "# Chapter 9\n",
+ "print\"Example 9.10, Page:351 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 10\")\n",
+ "T1=(27+273);#temperature of air in compressor in K\n",
+ "p1=1*10**5;#pressure of air in compressor in Pa\n",
+ "p2=5*10**5;#pressure of air after compression in Pa\n",
+ "p3=p2-0.2*10**5;#pressure drop in Pa\n",
+ "p4=1*10**5;#pressure to which expansion occur in turbine in Pa\n",
+ "nc=0.85;#isentropic efficiency\n",
+ "T3=1000;#temperature of air in combustion chamber in K\n",
+ "n=0.2;#thermal efficiency of plant\n",
+ "y=1.4;#expansion constant\n",
+ "Cp=1.0032;#specific heat at constant pressure in KJ/kg K\n",
+ "print(\"for process 1-2_a\")\n",
+ "print(\"T2_a/T1=(p2_a/p1)^((y-1)/y)\")\n",
+ "print(\"so T2_a=T1*(p2_a/p1)^((y-1)/y) in K\")\n",
+ "T2_a=T1*(p2/p1)**((y-1)/y)\n",
+ "print(\"nc=(T2_a-T1)/(T2-T1)\")\n",
+ "print(\"so T2=T1+((T2_a-T1)/nc) in K\")\n",
+ "T2=T1+((T2_a-T1)/nc)\n",
+ "print(\"for process 3-4_a,\")\n",
+ "print(\"T4_a/T3=(p4/p3)^((y-1)/y)\")\n",
+ "print(\"so T4_a=T3*(p4/p3)^((y-1)/y)in K\")\n",
+ "T4_a=T3*(p4/p3)**((y-1)/y)\n",
+ "print(\"Compressor work per kg,Wc=Cp*(T2-T1) in KJ/kg\")\n",
+ "Wc=Cp*(T2-T1)\n",
+ "print(\"Turbine work per kg,Wt=Cp*(T3-T4)in KJ/kg\")\n",
+ "print(\"net output,W_net=Wt-Wc={Wc-(Cp*(T3-T4))} in KJ/kg\")\n",
+ "print(\"heat added,q_add=Cp*(T3-T2) in KJ/kg\")\n",
+ "q_add=Cp*(T3-T2)\n",
+ "print(\"thermal efficiency,n=W_net/q_add\")\n",
+ "print(\"n={Wc-(Cp*(T3-T4))}/q_add\")\n",
+ "print(\"so T4=T3-((Wc-(n*q_add))/Cp)in K\")\n",
+ "T4=T3-((Wc-(n*q_add))/Cp)\n",
+ "nt=(T3-T4)/(T3-T4_a)\n",
+ "print(\"therefore,isentropic efficiency of turbine,nt=(T3-T4)/(T3-T4_a)\"),round((T3-T4)/(T3-T4_a),3)\n",
+ "print(\"in percentage\"),round(nt*100,2)\n",
+ "print(\"so turbine isentropic efficiency=29.69%\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 9.11;pg no: 352"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 9.11, Page:352 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 11\n",
+ "for perfect intercooling the pressure ratio of each compression stage(k)\n",
+ "k=sqrt(r)\n",
+ "for process 1-2_a,T2_a/T1=(P2/P1)^((y-1)/y)\n",
+ "so T2_a=T1*(k)^((y-1)/y)in K\n",
+ "considering isentropic efficiency of compression,\n",
+ "nc=(T2_a-T1)/(T2-T1)\n",
+ "so T2=T1+((T2_a-T1)/nc)in K\n",
+ "for process 3-4,\n",
+ "T4_a/T3=(P4/P3)^((y-1)/y)\n",
+ "so T4_a=T3*(P4/P3)^((y-1)/y) in K\n",
+ "again due to compression efficiency,nc=(T4_a-T3)/(T4-T3)\n",
+ "so T4=T3+((T4_a-T3)/nc)in K\n",
+ "total compressor work,Wc=2*Cp*(T4-T3) in KJ/kg\n",
+ "for expansion process 5-6_a,\n",
+ "T6_a/T5=(P6/P5)^((y-1)/y)\n",
+ "so T6_a=T5*(P6/P5)^((y-1)/y) in K\n",
+ "considering expansion efficiency,ne=(T5-T6)/(T5-T6_a)\n",
+ "T6=T5-(ne*(T5-T6_a)) in K\n",
+ "for expansion in 7-8_a\n",
+ "T8_a/T7=(P8/P7)^((y-1)/y)\n",
+ "so T8_a=T7*(P8/P7)^((y-1)/y) in K\n",
+ "considering expansion efficiency,ne=(T7-T8)/(T7-T8_a)\n",
+ "so T8=T7-(ne*(T7-T8_a))in K\n",
+ "expansion work output per kg of air(Wt)=Cp*(T5-T6)+Cp*(T7-T8) in KJ/kg\n",
+ "heat added per kg air(q_add)=Cp*(T5-T4)+Cp*(T7-T6) in KJ/kg\n",
+ "fuel required per kg of air,mf=q_add/C 0.02\n",
+ "air-fuel ratio=1/mf 51.08\n",
+ "net output(W) in KJ/kg= 229.2\n",
+ "output for air flowing at 30 kg/s,=W*m in KW 6876.05\n",
+ "thermal efficiency= 0.28\n",
+ "in percentage 27.88\n",
+ "so thermal efficiency=27.87%,net output=6876.05 KW,A/F ratio=51.07\n",
+ "NOTE=>In this question,expansion work is calculated wrong in book,so it is corrected above and answers vary accordingly.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of thermal efficiency,net output,A/F ratio\n",
+ "#intiation of all variables\n",
+ "# Chapter 9\n",
+ "import math\n",
+ "print\"Example 9.11, Page:352 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 11\")\n",
+ "P1=1.*10**5;#initial pressure in Pa\n",
+ "T1=(27.+273.);#initial temperature in K\n",
+ "T3=T1;\n",
+ "r=10.;#pressure ratio\n",
+ "T5=1000.;#maximum temperature in cycle in K\n",
+ "P6=3.*10**5;#first stage expansion pressure in Pa\n",
+ "T7=995.;#first stage reheated temperature in K\n",
+ "C=42000.;#calorific value of fuel in KJ/kg\n",
+ "Cp=1.0032;#specific heat at constant pressure in KJ/kg K\n",
+ "m=30.;#air flow rate in kg/s\n",
+ "nc=0.85;#isentropic efficiency of compression\n",
+ "ne=0.9;#isentropic efficiency of expansion\n",
+ "y=1.4;#expansion constant\n",
+ "print(\"for perfect intercooling the pressure ratio of each compression stage(k)\")\n",
+ "print(\"k=sqrt(r)\")\n",
+ "k=math.sqrt(r)\n",
+ "k=3.16;#approx.\n",
+ "print(\"for process 1-2_a,T2_a/T1=(P2/P1)^((y-1)/y)\")\n",
+ "print(\"so T2_a=T1*(k)^((y-1)/y)in K\")\n",
+ "T2_a=T1*(k)**((y-1)/y)\n",
+ "print(\"considering isentropic efficiency of compression,\")\n",
+ "print(\"nc=(T2_a-T1)/(T2-T1)\")\n",
+ "print(\"so T2=T1+((T2_a-T1)/nc)in K\")\n",
+ "T2=T1+((T2_a-T1)/nc)\n",
+ "print(\"for process 3-4,\")\n",
+ "print(\"T4_a/T3=(P4/P3)^((y-1)/y)\")\n",
+ "print(\"so T4_a=T3*(P4/P3)^((y-1)/y) in K\")\n",
+ "T4_a=T3*(k)**((y-1)/y)\n",
+ "print(\"again due to compression efficiency,nc=(T4_a-T3)/(T4-T3)\")\n",
+ "print(\"so T4=T3+((T4_a-T3)/nc)in K\")\n",
+ "T4=T3+((T4_a-T3)/nc)\n",
+ "print(\"total compressor work,Wc=2*Cp*(T4-T3) in KJ/kg\")\n",
+ "Wc=2*Cp*(T4-T3)\n",
+ "print(\"for expansion process 5-6_a,\")\n",
+ "print(\"T6_a/T5=(P6/P5)^((y-1)/y)\")\n",
+ "print(\"so T6_a=T5*(P6/P5)^((y-1)/y) in K\")\n",
+ "P5=10.*10**5;#pressure in Pa\n",
+ "T6_a=T5*(P6/P5)**((y-1)/y)\n",
+ "print(\"considering expansion efficiency,ne=(T5-T6)/(T5-T6_a)\")\n",
+ "print(\"T6=T5-(ne*(T5-T6_a)) in K\")\n",
+ "T6=T5-(ne*(T5-T6_a))\n",
+ "print(\"for expansion in 7-8_a\")\n",
+ "print(\"T8_a/T7=(P8/P7)^((y-1)/y)\")\n",
+ "print(\"so T8_a=T7*(P8/P7)^((y-1)/y) in K\")\n",
+ "P8=P1;#constant pressure process\n",
+ "P7=P6;#constant pressure process\n",
+ "T8_a=T7*(P8/P7)**((y-1)/y)\n",
+ "print(\"considering expansion efficiency,ne=(T7-T8)/(T7-T8_a)\")\n",
+ "print(\"so T8=T7-(ne*(T7-T8_a))in K\")\n",
+ "T8=T7-(ne*(T7-T8_a))\n",
+ "print(\"expansion work output per kg of air(Wt)=Cp*(T5-T6)+Cp*(T7-T8) in KJ/kg\")\n",
+ "Wt=Cp*(T5-T6)+Cp*(T7-T8)\n",
+ "print(\"heat added per kg air(q_add)=Cp*(T5-T4)+Cp*(T7-T6) in KJ/kg\")\n",
+ "q_add=Cp*(T5-T4)+Cp*(T7-T6)\n",
+ "mf=q_add/C\n",
+ "print(\"fuel required per kg of air,mf=q_add/C\"),round(q_add/C,2)\n",
+ "print(\"air-fuel ratio=1/mf\"),round(1/mf,2)\n",
+ "W=Wt-Wc\n",
+ "print(\"net output(W) in KJ/kg=\"),round(Wt-Wc,2)\n",
+ "print(\"output for air flowing at 30 kg/s,=W*m in KW\"),round(W*m,2)\n",
+ "W/q_add\n",
+ "print(\"thermal efficiency=\"),round(W/q_add,2)\n",
+ "print(\"in percentage\"),round(W*100/q_add,2)\n",
+ "print(\"so thermal efficiency=27.87%,net output=6876.05 KW,A/F ratio=51.07\")\n",
+ "print(\"NOTE=>In this question,expansion work is calculated wrong in book,so it is corrected above and answers vary accordingly.\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 9.12;pg no: 354"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 9.12, Page:354 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 12\n",
+ "for process 1-2,\n",
+ "T2/T1=(P2/P1)^((y-1)/y)\n",
+ "so T2=T1*(P2/P1)^((y-1)/y) in K\n",
+ "for process 3-4,\n",
+ "T4/T3=(P4/P3)^((y-1)/y)\n",
+ "so T4=T3*(P4/P3)^((y-1)/y) in K\n",
+ "for process 6-7,\n",
+ "T7/T6=(P7/P6)^((y-1)/y)\n",
+ "so T7=T6*(P7/P6)^((y-1)/y) in K\n",
+ "for process 8-9,\n",
+ "T9/T8=(P9/P8)^((y-1)/y)\n",
+ "T9=T8*(P9/P8)^((y-1)/y) in K\n",
+ "in regenerator,effectiveness=(T5-T4)/(T9-T4)\n",
+ "T5=T4+(ne*(T9-T4))in K\n",
+ "compressor work per kg air,Wc=Cp*(T2-T1)+Cp*(T4-T3) in KJ/kg\n",
+ "turbine work per kg air,Wt in KJ/kg= 660.84\n",
+ "heat added per kg air,q_add in KJ/kg= 765.43\n",
+ "total fuel required per kg of air= 0.02\n",
+ "net work,W_net in KJ/kg= 450.85\n",
+ "cycle thermal efficiency,n= 0.59\n",
+ "in percentage 58.9\n",
+ "fuel required per kg air in combustion chamber 1,Cp*(T8-T7)/C= 0.0056\n",
+ "fuel required per kg air in combustion chamber2,Cp*(T6-T5)/C= 0.0126\n",
+ "so fuel-air ratio in two combustion chambers=0.0126,0.0056\n",
+ "total turbine work=660.85 KJ/kg\n",
+ "cycle thermal efficiency=58.9%\n",
+ "NOTE=>In this question,fuel required per kg air in combustion chamber 1 and 2 are calculated wrong in book,so it is corrected above and answers vary accordingly. \n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of fuel-air ratio in two combustion chambers,total turbine work,cycle thermal efficiency\n",
+ "#intiation of all variables\n",
+ "# Chapter 9\n",
+ "print\"Example 9.12, Page:354 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 12\")\n",
+ "P1=1.*10**5;#initial pressure in Pa\n",
+ "P9=P1;\n",
+ "T1=300.;#initial temperature in K\n",
+ "P2=4.*10**5;#pressure of air in intercooler in Pa\n",
+ "P3=P2;\n",
+ "T3=290.;#temperature of air in intercooler in K\n",
+ "T6=1300.;#temperature of combustion chamber in K\n",
+ "P4=8.*10**5;#pressure of air after compression in Pa\n",
+ "P6=P4;\n",
+ "T8=1300.;#temperature after reheating in K\n",
+ "P8=4.*10**5;#pressure after expansion in Pa\n",
+ "P7=P8;\n",
+ "C=42000.;#heating value of fuel in KJ/kg\n",
+ "y=1.4;#expansion constant\n",
+ "ne=0.8;#effectiveness of regenerator\n",
+ "Cp=1.0032;#specific heat at constant pressure in KJ/kg K\n",
+ "print(\"for process 1-2,\")\n",
+ "print(\"T2/T1=(P2/P1)^((y-1)/y)\")\n",
+ "print(\"so T2=T1*(P2/P1)^((y-1)/y) in K\")\n",
+ "T2=T1*(P2/P1)**((y-1)/y)\n",
+ "print(\"for process 3-4,\")\n",
+ "print(\"T4/T3=(P4/P3)^((y-1)/y)\")\n",
+ "print(\"so T4=T3*(P4/P3)^((y-1)/y) in K\")\n",
+ "T4=T3*(P4/P3)**((y-1)/y)\n",
+ "print(\"for process 6-7,\")\n",
+ "print(\"T7/T6=(P7/P6)^((y-1)/y)\")\n",
+ "print(\"so T7=T6*(P7/P6)^((y-1)/y) in K\")\n",
+ "T7=T6*(P7/P6)**((y-1)/y)\n",
+ "print(\"for process 8-9,\")\n",
+ "print(\"T9/T8=(P9/P8)^((y-1)/y)\")\n",
+ "print(\"T9=T8*(P9/P8)^((y-1)/y) in K\")\n",
+ "T9=T8*(P9/P8)**((y-1)/y)\n",
+ "print(\"in regenerator,effectiveness=(T5-T4)/(T9-T4)\")\n",
+ "print(\"T5=T4+(ne*(T9-T4))in K\")\n",
+ "T5=T4+(ne*(T9-T4))\n",
+ "print(\"compressor work per kg air,Wc=Cp*(T2-T1)+Cp*(T4-T3) in KJ/kg\")\n",
+ "Wc=Cp*(T2-T1)+Cp*(T4-T3)\n",
+ "Wt=Cp*(T6-T7)+Cp*(T8-T9)\n",
+ "print(\"turbine work per kg air,Wt in KJ/kg=\"),round(Wt,2)\n",
+ "q_add=Cp*(T6-T5)+Cp*(T8-T7)\n",
+ "print(\"heat added per kg air,q_add in KJ/kg=\"),round(q_add,2)\n",
+ "q_add/C\n",
+ "print(\"total fuel required per kg of air=\"),round(q_add/C,2)\n",
+ "W_net=Wt-Wc\n",
+ "print(\"net work,W_net in KJ/kg=\"),round(W_net,2)\n",
+ "n=W_net/q_add\n",
+ "print(\"cycle thermal efficiency,n=\"),round(n,2)\n",
+ "print(\"in percentage\"),round(n*100,2)\n",
+ "print(\"fuel required per kg air in combustion chamber 1,Cp*(T8-T7)/C=\"),round(Cp*(T8-T7)/C,4)\n",
+ "print(\"fuel required per kg air in combustion chamber2,Cp*(T6-T5)/C=\"),round(Cp*(T6-T5)/C,4)\n",
+ "print(\"so fuel-air ratio in two combustion chambers=0.0126,0.0056\")\n",
+ "print(\"total turbine work=660.85 KJ/kg\")\n",
+ "print(\"cycle thermal efficiency=58.9%\")\n",
+ "print(\"NOTE=>In this question,fuel required per kg air in combustion chamber 1 and 2 are calculated wrong in book,so it is corrected above and answers vary accordingly. \")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 9.13;pg no: 356"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 9.13, Page:356 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 13\n",
+ "work done per kg of air,W=R*(T2-T1)*log(r) in KJ/kg\n",
+ "heat added per kg of air,q=R*T2*log(r)+(1-epsilon)*Cv*(T2-T1) in KJ/kg\n",
+ "for 30 KJ/s heat supplied,the mass of air/s(m)=q_add/q in kg/s\n",
+ "mass of air per cycle=m/n in kg/cycle\n",
+ "brake output in KW= 17.12\n",
+ "stroke volume,V in m^3= 0.0117\n",
+ "brake output=17.11 KW\n",
+ "stroke volume=0.0116 m^3\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of brake output,stroke volume\n",
+ "#intiation of all variables\n",
+ "# Chapter 9\n",
+ "import math\n",
+ "print\"Example 9.13, Page:356 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 13\")\n",
+ "T2=700.;#highest temperature of stirling engine in K\n",
+ "T1=300.;#lowest temperature of stirling engine in K\n",
+ "r=3.;#compression ratio\n",
+ "q_add=30.;#heat addition in KJ/s\n",
+ "epsilon=0.9;#regenerator efficiency\n",
+ "P=1*10**5;#pressure at begining of compression in Pa\n",
+ "n=100.;#number of cycle per minute\n",
+ "Cv=0.72;#specific heat at constant volume in KJ/kg K\n",
+ "R=29.27;#gas constant in KJ/kg K\n",
+ "print(\"work done per kg of air,W=R*(T2-T1)*log(r) in KJ/kg\")\n",
+ "W=R*(T2-T1)*math.log(r)\n",
+ "print(\"heat added per kg of air,q=R*T2*log(r)+(1-epsilon)*Cv*(T2-T1) in KJ/kg\")\n",
+ "q=R*T2*math.log(r)+(1-epsilon)*Cv*(T2-T1)\n",
+ "print(\"for 30 KJ/s heat supplied,the mass of air/s(m)=q_add/q in kg/s\")\n",
+ "m=q_add/q\n",
+ "print(\"mass of air per cycle=m/n in kg/cycle\")\n",
+ "m/n\n",
+ "print(\"brake output in KW=\"),round(W*m,2)\n",
+ "m=1.33*10**-4;#mass of air per cycle in kg/cycle\n",
+ "T=T1;\n",
+ "V=m*R*T*1000/P\n",
+ "print(\"stroke volume,V in m^3=\"),round(V,4)\n",
+ "print(\"brake output=17.11 KW\")\n",
+ "print(\"stroke volume=0.0116 m^3\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 9.14;pg no: 357"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 9.14, Page:357 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 14\n",
+ "In question no.14,various expression is derived which cannot be solved using python software.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of compression ratio,air standard efficiency,fuel consumption,bhp/hr\n",
+ "#intiation of all variables\n",
+ "# Chapter 9\n",
+ "print\"Example 9.14, Page:357 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 14\")\n",
+ "print(\"In question no.14,various expression is derived which cannot be solved using python software.\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 9.15;pg no: 361"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 9.15, Page:361 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 15\n",
+ "In gas turbine cycle,T2/T1=(P2/P1)^((y-1)/y)\n",
+ "so T2=T1*(P2/P1)^((y-1)/y)in K\n",
+ "T4/T3=(P4/P3)^((y-1)/y)\n",
+ "so T4=T3*(P4/P3)^((y-1)/y) in K\n",
+ "compressor work per kg,Wc=Cp*(T2-T1) in KJ/kg\n",
+ "turbine work per kg,Wt=Cp*(T3-T4) in KJ/kg \n",
+ "heat added in combustion chamber per kg,q_add=Cp*(T3-T2) in KJ/kg \n",
+ "net gas turbine output,W_net_GT=Wt-Wc in KJ/kg air\n",
+ "heat recovered in HRSG for steam generation per kg of air\n",
+ "q_HRGC=Cp*(T4-T5)in KJ/kg\n",
+ "at inlet to steam in turbine,\n",
+ "from steam table,ha=3177.2 KJ/kg,sa=6.5408 KJ/kg K\n",
+ "for expansion in steam turbine,sa=sb\n",
+ "let dryness fraction at state b be x\n",
+ "also from steam table,at 15KPa, sf=0.7549 KJ/kg K,sfg=7.2536 KJ/kg K,hf=225.94 KJ/kg,hfg=2373.1 KJ/kg\n",
+ "sb=sf+x*sfg\n",
+ "so x=(sb-sf)/sfg \n",
+ "so hb=hf+x*hfg in KJ/kg K\n",
+ "at exit of condenser,hc=hf ,vc=0.001014 m^3/kg from steam table\n",
+ "at exit of feed pump,hd=hd-hc\n",
+ "hd=vc*(Pg-Pc)*100 in KJ/kg\n",
+ "heat added per kg of steam =ha-hd in KJ/kg\n",
+ "mass of steam generated per kg of air in kg steam per kg air= 0.119\n",
+ "net steam turbine cycle output,W_net_ST in KJ/kg= 677.4\n",
+ "steam cycle output per kg of air(W_net_ST) in KJ/kg air= 80.61\n",
+ "total combined cycle output in KJ/kg air= 486.88\n",
+ "combined cycle efficiency,n_cc=(W_net_GT+W_net_ST)/q_add 0.58\n",
+ "in percentage 57.77\n",
+ "In absence of steam cycle,gas turbine cycle efficiency,n_GT= 0.48\n",
+ "in percentage 48.21\n",
+ "thus ,efficiency is seen to increase in combined cycle upto 57.77% as compared to gas turbine offering 48.21% efficiency.\n",
+ "overall efficiency=57.77%\n",
+ "steam per kg of air=0.119 kg steam per/kg air\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of overall efficiency,steam per kg of air\n",
+ "#intiation of all variables\n",
+ "# Chapter 9\n",
+ "print\"Example 9.15, Page:361 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 15\")\n",
+ "r=10.;#pressure ratio\n",
+ "Cp=1.0032;#specific heat of air in KJ/kg K\n",
+ "y=1.4;#expansion constant\n",
+ "T3=1400.;#inlet temperature of gas turbine in K\n",
+ "T1=(17.+273.);#ambient temperature in K\n",
+ "P1=1.*10**5;#ambient pressure in Pa\n",
+ "Pc=15.;#condensor pressure in KPa\n",
+ "Pg=6.*1000;#pressure of steam in generator in KPa\n",
+ "T5=420.;#temperature of exhaust from gas turbine in K\n",
+ "print(\"In gas turbine cycle,T2/T1=(P2/P1)^((y-1)/y)\")\n",
+ "print(\"so T2=T1*(P2/P1)^((y-1)/y)in K\")\n",
+ "T2=T1*(r)**((y-1)/y)\n",
+ "print(\"T4/T3=(P4/P3)^((y-1)/y)\")\n",
+ "print(\"so T4=T3*(P4/P3)^((y-1)/y) in K\")\n",
+ "T4=T3*(1/r)**((y-1)/y)\n",
+ "print(\"compressor work per kg,Wc=Cp*(T2-T1) in KJ/kg\")\n",
+ "Wc=Cp*(T2-T1)\n",
+ "print(\"turbine work per kg,Wt=Cp*(T3-T4) in KJ/kg \")\n",
+ "Wt=Cp*(T3-T4)\n",
+ "print(\"heat added in combustion chamber per kg,q_add=Cp*(T3-T2) in KJ/kg \")\n",
+ "q_add=Cp*(T3-T2)\n",
+ "print(\"net gas turbine output,W_net_GT=Wt-Wc in KJ/kg air\")\n",
+ "W_net_GT=Wt-Wc\n",
+ "print(\"heat recovered in HRSG for steam generation per kg of air\")\n",
+ "print(\"q_HRGC=Cp*(T4-T5)in KJ/kg\")\n",
+ "q_HRGC=Cp*(T4-T5)\n",
+ "print(\"at inlet to steam in turbine,\")\n",
+ "print(\"from steam table,ha=3177.2 KJ/kg,sa=6.5408 KJ/kg K\")\n",
+ "ha=3177.2;\n",
+ "sa=6.5408;\n",
+ "print(\"for expansion in steam turbine,sa=sb\")\n",
+ "sb=sa;\n",
+ "print(\"let dryness fraction at state b be x\")\n",
+ "print(\"also from steam table,at 15KPa, sf=0.7549 KJ/kg K,sfg=7.2536 KJ/kg K,hf=225.94 KJ/kg,hfg=2373.1 KJ/kg\")\n",
+ "sf=0.7549;\n",
+ "sfg=7.2536;\n",
+ "hf=225.94;\n",
+ "hfg=2373.1;\n",
+ "print(\"sb=sf+x*sfg\")\n",
+ "print(\"so x=(sb-sf)/sfg \")\n",
+ "x=(sb-sf)/sfg\n",
+ "print(\"so hb=hf+x*hfg in KJ/kg K\")\n",
+ "hb=hf+x*hfg\n",
+ "print(\"at exit of condenser,hc=hf ,vc=0.001014 m^3/kg from steam table\")\n",
+ "hc=hf;\n",
+ "vc=0.001014;\n",
+ "print(\"at exit of feed pump,hd=hd-hc\")\n",
+ "print(\"hd=vc*(Pg-Pc)*100 in KJ/kg\")\n",
+ "hd=vc*(Pg-Pc)*100\n",
+ "print(\"heat added per kg of steam =ha-hd in KJ/kg\")\n",
+ "ha-hd\n",
+ "print(\"mass of steam generated per kg of air in kg steam per kg air=\"),round(q_HRGC/(ha-hd),3)\n",
+ "W_net_ST=(ha-hb)-(hd-hc)\n",
+ "print(\"net steam turbine cycle output,W_net_ST in KJ/kg=\"),round(W_net_ST,2)\n",
+ "W_net_ST=W_net_ST*0.119 \n",
+ "print(\"steam cycle output per kg of air(W_net_ST) in KJ/kg air=\"),round(W_net_ST,2)\n",
+ "(W_net_GT+W_net_ST)\n",
+ "print(\"total combined cycle output in KJ/kg air= \"),round((W_net_GT+W_net_ST),2)\n",
+ "n_cc=(W_net_GT+W_net_ST)/q_add\n",
+ "print(\"combined cycle efficiency,n_cc=(W_net_GT+W_net_ST)/q_add\"),round(n_cc,2)\n",
+ "print(\"in percentage\"),round(n_cc*100,2)\n",
+ "n_GT=W_net_GT/q_add\n",
+ "print(\"In absence of steam cycle,gas turbine cycle efficiency,n_GT=\"),round(n_GT,2)\n",
+ "print(\"in percentage\"),round(n_GT*100,2)\n",
+ "print(\"thus ,efficiency is seen to increase in combined cycle upto 57.77% as compared to gas turbine offering 48.21% efficiency.\")\n",
+ "print(\"overall efficiency=57.77%\")\n",
+ "print(\"steam per kg of air=0.119 kg steam per/kg air\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 9.16;pg no: 363"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 9.16, Page:363 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh Chapter 9 Example 16\n",
+ "here P4/P1=P3/P1=70............eq1\n",
+ "compression ratio,V1/V2=V1/V3=15.............eq2\n",
+ "heat added at constant volume= heat added at constant pressure\n",
+ "Q23=Q34\n",
+ "m*Cv*(T3-T2)=m*Cp*(T4-T3)\n",
+ "(T3-T2)=y*(T4-T3)\n",
+ "for process 1-2;\n",
+ "T2/T1=(P2/P1)^((y-1)/y)\n",
+ "T2/T1=(V1/V2)^(y-1)\n",
+ "so T2=T1*(V1/V2)^(y-1) in K\n",
+ "and (P2/P1)=(V1/V2)^y\n",
+ "so P2=P1*(V1/V2)^y in Pa...........eq3\n",
+ "for process 2-3,\n",
+ "P2/P3=T2/T3\n",
+ "so T3=T2*P3/P2\n",
+ "using eq 1 and 3,we get\n",
+ "T3=T2*k/r^y in K\n",
+ "using equal heat additions for processes 2-3 and 3-4,\n",
+ "(T3-T2)=y*(T4-T3)\n",
+ "so T4=T3+((T3-T2)/y) in K\n",
+ "for process 3-4,\n",
+ "V3/V4=T3/T4\n",
+ "(V3/V1)*(V1/V4)=T3/T4\n",
+ "so (V1/V4)=(T3/T4)*r\n",
+ "so V1/V4=11.88 and V5/V4=11.88\n",
+ "for process 4-5,\n",
+ "P4/P5=(V5/V4)^y,or T4/T5=(V5/V4)^(y-1)\n",
+ "so T5=T4/((V5/V4)^(y-1))\n",
+ "air standard thermal efficiency(n)=1-(heat rejected/heat added)\n",
+ "n=1-(m*Cv*(T5-T1)/(m*Cp*(T4-T3)+m*Cv*(T3-T2)))\n",
+ "n= 0.65\n",
+ "air standard thermal efficiency=0.6529\n",
+ "in percentage 65.29\n",
+ "so air standard thermal efficiency=65.29%\n",
+ "Actual thermal efficiency may be different from theoretical efficiency due to following reasons\n",
+ "a> Air standard cycle analysis considers air as the working fluid while in actual cycle it is not air throughtout the cycle.Actual working fluid which are combustion products do not behave as perfect gas.\n",
+ "b> Heat addition does not occur isochorically in actual process.Also combustion is accompanied by inefficiency such as incomplete combustion,dissociation of combustion products,etc.\n",
+ "c> Specific heat variation occurs in actual processes where as in air standard cycle analysis specific heat variation neglected.Also during adiabatic process theoretically no heat loss occur while actually these processes are accompanied by heat losses.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of air standard thermal efficiency\n",
+ "#intiation of all variables\n",
+ "# Chapter 9\n",
+ "print\"Example 9.16, Page:363 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh Chapter 9 Example 16\")\n",
+ "T1=(27+273);#temperature at begining of compression in K\n",
+ "k=70;#ration of maximum to minimum pressures\n",
+ "r=15;#compression ratio\n",
+ "y=1.4;#expansion constant\n",
+ "print(\"here P4/P1=P3/P1=70............eq1\")\n",
+ "print(\"compression ratio,V1/V2=V1/V3=15.............eq2\")\n",
+ "print(\"heat added at constant volume= heat added at constant pressure\")\n",
+ "print(\"Q23=Q34\")\n",
+ "print(\"m*Cv*(T3-T2)=m*Cp*(T4-T3)\")\n",
+ "print(\"(T3-T2)=y*(T4-T3)\")\n",
+ "print(\"for process 1-2;\")\n",
+ "print(\"T2/T1=(P2/P1)^((y-1)/y)\")\n",
+ "print(\"T2/T1=(V1/V2)^(y-1)\")\n",
+ "print(\"so T2=T1*(V1/V2)^(y-1) in K\")\n",
+ "T2=T1*(r)**(y-1)\n",
+ "print(\"and (P2/P1)=(V1/V2)^y\")\n",
+ "print(\"so P2=P1*(V1/V2)^y in Pa...........eq3\")\n",
+ "print(\"for process 2-3,\")\n",
+ "print(\"P2/P3=T2/T3\")\n",
+ "print(\"so T3=T2*P3/P2\")\n",
+ "print(\"using eq 1 and 3,we get\")\n",
+ "print(\"T3=T2*k/r^y in K\")\n",
+ "T3=T2*k/r**y \n",
+ "print(\"using equal heat additions for processes 2-3 and 3-4,\")\n",
+ "print(\"(T3-T2)=y*(T4-T3)\")\n",
+ "print(\"so T4=T3+((T3-T2)/y) in K\")\n",
+ "T4=T3+((T3-T2)/y)\n",
+ "print(\"for process 3-4,\")\n",
+ "print(\"V3/V4=T3/T4\")\n",
+ "print(\"(V3/V1)*(V1/V4)=T3/T4\")\n",
+ "print(\"so (V1/V4)=(T3/T4)*r\")\n",
+ "(T3/T4)*r\n",
+ "print(\"so V1/V4=11.88 and V5/V4=11.88\")\n",
+ "print(\"for process 4-5,\")\n",
+ "print(\"P4/P5=(V5/V4)^y,or T4/T5=(V5/V4)^(y-1)\")\n",
+ "print(\"so T5=T4/((V5/V4)^(y-1))\")\n",
+ "T5=T4/(11.88)**(y-1)\n",
+ "print(\"air standard thermal efficiency(n)=1-(heat rejected/heat added)\")\n",
+ "print(\"n=1-(m*Cv*(T5-T1)/(m*Cp*(T4-T3)+m*Cv*(T3-T2)))\")\n",
+ "n=1-((T5-T1)/(y*(T4-T3)+(T3-T2)))\n",
+ "print(\"n=\"),round(n,2)\n",
+ "print(\"air standard thermal efficiency=0.6529\")\n",
+ "print(\"in percentage\"),round(n*100,2)\n",
+ "print(\"so air standard thermal efficiency=65.29%\")\n",
+ "print(\"Actual thermal efficiency may be different from theoretical efficiency due to following reasons\")\n",
+ "print(\"a> Air standard cycle analysis considers air as the working fluid while in actual cycle it is not air throughtout the cycle.Actual working fluid which are combustion products do not behave as perfect gas.\")\n",
+ "print(\"b> Heat addition does not occur isochorically in actual process.Also combustion is accompanied by inefficiency such as incomplete combustion,dissociation of combustion products,etc.\")\n",
+ "print(\"c> Specific heat variation occurs in actual processes where as in air standard cycle analysis specific heat variation neglected.Also during adiabatic process theoretically no heat loss occur while actually these processes are accompanied by heat losses.\")\n"
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/_Engineering_Thermodynamics_by__O._Singh/chapter_1_3.ipynb b/_Engineering_Thermodynamics_by__O._Singh/chapter_1_3.ipynb
new file mode 100644
index 00000000..9474d100
--- /dev/null
+++ b/_Engineering_Thermodynamics_by__O._Singh/chapter_1_3.ipynb
@@ -0,0 +1,1777 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# chapter 1:Fundemental concepts and definitions"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 1.1;page no:22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 1.1, Page:22 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 1\n",
+ "pressure difference(p)in pa\n",
+ "p= 39755.7\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of pressure difference\n",
+ "#intiation of all variables\n",
+ "# Chapter 1\n",
+ "print\"Example 1.1, Page:22 \\n \\n\"\n",
+ "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 1\"\n",
+ "h=30*10**-2;#manometer deflection of mercury in m\n",
+ "g=9.78;#acceleration due to gravity in m/s^2\n",
+ "rho=13550;#density of mercury at room temperature in kg/m^3\n",
+ "print\"pressure difference(p)in pa\"\n",
+ "p=rho*g*h\n",
+ "print\"p=\",round(p,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 1.2;page no:22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 1.2, Page:22 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 2\n",
+ "effort required for lifting the lid(E)in N\n",
+ "E= 7115.48\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of effort required for lifting the lid\n",
+ "#intiation of all variables\n",
+ "# Chapter 1\n",
+ "print\"Example 1.2, Page:22 \\n \\n\"\n",
+ "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 2\"\n",
+ "d=30*10**-2;#diameter of cylindrical vessel in m\n",
+ "h=76*10**-2;#atmospheric pressure in m of mercury\n",
+ "g=9.78;#acceleration due to gravity in m/s^2\n",
+ "rho=13550;#density of mercury at room temperature in kg/m^3\n",
+ "print\"effort required for lifting the lid(E)in N\"\n",
+ "E=(rho*g*h)*(3.14*d**2)/4\n",
+ "print\"E=\",round(E,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 1.3;page no:22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 1.3, Page:22 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 3\n",
+ "pressure measured by manometer is gauge pressure(Pg)in kpa\n",
+ "Pg=rho*g*h/10^3\n",
+ "actual pressure of the air(P)in kpa\n",
+ "P= 140.76\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of actual pressure of the air\n",
+ "#intiation of all variables\n",
+ "# Chapter 1\n",
+ "print\"Example 1.3, Page:22 \\n \\n\"\n",
+ "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 3\"\n",
+ "h=30*10**-2;# pressure of compressed air in m of mercury\n",
+ "Patm=101*10**3;#atmospheric pressure in pa\n",
+ "g=9.78;#acceleration due to gravity in m/s^2\n",
+ "rho=13550;#density of mercury at room temperature in kg/m^3\n",
+ "print\"pressure measured by manometer is gauge pressure(Pg)in kpa\"\n",
+ "print\"Pg=rho*g*h/10^3\"\n",
+ "Pg=rho*g*h/10**3\n",
+ "print\"actual pressure of the air(P)in kpa\"\n",
+ "P=Pg+Patm/10**3\n",
+ "print\"P=\",round(P,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 1.4;page no:22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 1.4, Page:22 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 4\n",
+ "density of oil(RHOoil)in kg/m^3\n",
+ "RHOoil=sg*RHOw\n",
+ "gauge pressure(Pg)in kpa\n",
+ "Pg= 7.848\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of gauge pressure\n",
+ "#intiation of all variables\n",
+ "# Chapter 1\n",
+ "print\"Example 1.4, Page:22 \\n \\n\"\n",
+ "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 4\"\n",
+ "h=1;#depth of oil tank in m\n",
+ "sg=0.8;#specific gravity of oil\n",
+ "RHOw=1000;#density of water in kg/m^3\n",
+ "g=9.81;#acceleration due to gravity in m/s^2\n",
+ "print\"density of oil(RHOoil)in kg/m^3\"\n",
+ "print\"RHOoil=sg*RHOw\"\n",
+ "RHOoil=sg*RHOw\n",
+ "print\"gauge pressure(Pg)in kpa\"\n",
+ "Pg=RHOoil*g*h/10**3\n",
+ "print\"Pg=\",round(Pg,3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 1.5;page no:22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 1.5, Page:22 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 5\n",
+ "atmospheric pressure(Patm)in kpa\n",
+ "Patm=rho*g*h2/10^3\n",
+ "pressure due to mercury column at AB(Pab)in kpa\n",
+ "Pab=rho*g*h1/10^3\n",
+ "pressure exerted by gas(Pgas)in kpa\n",
+ "Pgas= 154.76\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of pressure exerted by gas\n",
+ "#intiation of all variables\n",
+ "# Chapter 1\n",
+ "print\"Example 1.5, Page:22 \\n \\n\"\n",
+ "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 5\"\n",
+ "rho=13.6*10**3;#density of mercury in kg/m^3\n",
+ "g=9.81;#acceleration due to gravity in m/s^2\n",
+ "h1=40*10**-2;#difference of height in mercury column in m as shown in figure\n",
+ "h2=76*10**-2;#barometer reading of mercury in m\n",
+ "print\"atmospheric pressure(Patm)in kpa\"\n",
+ "print\"Patm=rho*g*h2/10^3\"\n",
+ "Patm=rho*g*h2/10**3\n",
+ "print\"pressure due to mercury column at AB(Pab)in kpa\"\n",
+ "print\"Pab=rho*g*h1/10^3\"\n",
+ "Pab=rho*g*h1/10**3\n",
+ "print\"pressure exerted by gas(Pgas)in kpa\"\n",
+ "Pgas=Patm+Pab\n",
+ "print\"Pgas=\",round(Pgas,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 1.6;page no:23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 1.6, Page:23 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 6\n",
+ "by law of conservation of energy\n",
+ "potential energy(m*g*h)in joule = heat required for heating water(m*Cp*deltaT*1000*4.18)in joule\n",
+ "so m*g*h = m*Cp*deltaT*4.18*1000\n",
+ "change in temperature of water(deltaT) in degree celcius\n",
+ "deltaT= 2.35\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of change in temperature of water\n",
+ "#intiation of all variables\n",
+ "# Chapter 1\n",
+ "print\"Example 1.6, Page:23 \\n \\n\"\n",
+ "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 6\"\n",
+ "m=1;#mass of water in kg\n",
+ "h=1000;#height from which water fall in m\n",
+ "Cp=1;#specific heat of water in kcal/kg k\n",
+ "g=9.81;#acceleration due to gravity in m/s^2\n",
+ "print\"by law of conservation of energy\"\n",
+ "print\"potential energy(m*g*h)in joule = heat required for heating water(m*Cp*deltaT*1000*4.18)in joule\"\n",
+ "print\"so m*g*h = m*Cp*deltaT*4.18*1000\"\n",
+ "print\"change in temperature of water(deltaT) in degree celcius\"\n",
+ "deltaT=(g*h)/(4.18*1000*Cp)\n",
+ "print\"deltaT=\",round(deltaT,2)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 1.7;page no:23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 1.7, Page:23 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 7\n",
+ "mass of object(m)in kg\n",
+ "m=w1/g1\n",
+ "spring balance reading=gravitational force in mass(F)in N\n",
+ "F= 86.65\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of spring balance reading\n",
+ "#intiation of all variables\n",
+ "# Chapter 1\n",
+ "print\"Example 1.7, Page:23 \\n \\n\"\n",
+ "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 7\"\n",
+ "w1=100;#weight of object at standard gravitational acceleration in N\n",
+ "g1=9.81;#acceleration due to gravity in m/s^2\n",
+ "g2=8.5;#gravitational acceleration at some location\n",
+ "print\"mass of object(m)in kg\"\n",
+ "print\"m=w1/g1\"\n",
+ "m=w1/g1\n",
+ "print\"spring balance reading=gravitational force in mass(F)in N\"\n",
+ "F=m*g2\n",
+ "print\"F=\",round(F,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 1.8;page no:24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 1.8, Page:24 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 8\n",
+ "pressure measured by manometer(P) in pa\n",
+ "p=rho*g*h\n",
+ "now weight of piston(m*g) = upward thrust by gas(p*math.pi*d^2/4)\n",
+ "mass of piston(m)in kg\n",
+ "so m= 28.84\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of mass of piston\n",
+ "#intiation of all variables\n",
+ "# Chapter 1\n",
+ "import math\n",
+ "print\"Example 1.8, Page:24 \\n \\n\"\n",
+ "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 8\"\n",
+ "d=15*10**-2;#diameter of cylinder in m\n",
+ "h=12*10**-2;#manometer height difference in m of mercury\n",
+ "rho=13.6*10**3;#density of mercury in kg/m^3\n",
+ "g=9.81;#acceleration due to gravity in m/s^2\n",
+ "print\"pressure measured by manometer(P) in pa\"\n",
+ "print\"p=rho*g*h\"\n",
+ "p=rho*g*h\n",
+ "print\"now weight of piston(m*g) = upward thrust by gas(p*math.pi*d^2/4)\"\n",
+ "print\"mass of piston(m)in kg\"\n",
+ "m=(p*math.pi*d**2)/(4*g)\n",
+ "print\"so m=\",round(m,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 1.9;page no:24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 1.9, Page:24 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 9\n",
+ "balancing pressure at plane BC in figure we get\n",
+ "Psteam+Pwater=Patm+Pmercury\n",
+ "now 1.atmospheric pressure(Patm)in pa\n",
+ "Patm= 101396.16\n",
+ "2.pressure due to water(Pwater)in pa\n",
+ "Pwater= 196.2\n",
+ "3.pressure due to mercury(Pmercury)in pa\n",
+ "Pmercury=RHOm*g*h3 13341.6\n",
+ "using balancing equation\n",
+ "Psteam=Patm+Pmercury-Pwater\n",
+ "so pressure of steam(Psteam)in kpa\n",
+ "Psteam= 114.54\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of pressure due to atmosphere,water,mercury,steam\n",
+ "#intiation of all variables\n",
+ "# Chapter 1\n",
+ "print\"Example 1.9, Page:24 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 9\")\n",
+ "RHOm=13.6*10**3;#density of mercury in kg/m^3\n",
+ "RHOw=1000;#density of water in kg/m^3\n",
+ "h1=76*10**-2;#barometer reading in m of mercury\n",
+ "h2=2*10**-2;#height raised by water in manometer tube in m \n",
+ "h3=10*10**-2;#height raised by mercury in manometer tube in m \n",
+ "g=9.81;#acceleration due to gravity in m/s^2\n",
+ "print(\"balancing pressure at plane BC in figure we get\")\n",
+ "print(\"Psteam+Pwater=Patm+Pmercury\")\n",
+ "print(\"now 1.atmospheric pressure(Patm)in pa\")\n",
+ "Patm=RHOm*g*h1\n",
+ "print(\"Patm=\"),round(Patm,2)\n",
+ "print(\"2.pressure due to water(Pwater)in pa\")\n",
+ "Pwater=RHOw*g*h2\n",
+ "print(\"Pwater=\"),round(Pwater,2)\n",
+ "print(\"3.pressure due to mercury(Pmercury)in pa\")\n",
+ "Pmercury=RHOm*g*h3\n",
+ "print(\"Pmercury=RHOm*g*h3\"),round(Pmercury,2)\n",
+ "print(\"using balancing equation\")\n",
+ "print(\"Psteam=Patm+Pmercury-Pwater\")\n",
+ "print(\"so pressure of steam(Psteam)in kpa\")\n",
+ "Psteam=(Patm+Pmercury-Pwater)/1000\n",
+ "print(\"Psteam=\"),round(Psteam,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 1.10;page no:24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 1.10, Page:24 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 10\n",
+ "atmospheric pressure(Patm)in kpa\n",
+ "absolute temperature in compartment A(Pa) in kpa\n",
+ "Pa= 496.06\n",
+ "absolute temperature in compartment B(Pb) in kpa\n",
+ "Pb= 246.06\n",
+ "absolute pressure in compartments in A & B=496.06 kpa & 246.06 kpa\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of \"absolute temperature in compartment A,B\n",
+ "#intiation of all variables\n",
+ "# Chapter 1\n",
+ "print\"Example 1.10, Page:24 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 10\")\n",
+ "h=720*10**-3;#barometer reading in m of Hg\n",
+ "Pga=400;#gauge pressure in compartment A in kpa\n",
+ "Pgb=150;#gauge pressure in compartment B in kpa\n",
+ "rho=13.6*10**3;#density of mercury in kg/m^3\n",
+ "g=9.81;#acceleration due to gravity in m/s^2\n",
+ "print(\"atmospheric pressure(Patm)in kpa\")\n",
+ "Patm=(rho*g*h)/1000\n",
+ "print(\"absolute temperature in compartment A(Pa) in kpa\")\n",
+ "Pa=Pga+Patm\n",
+ "print\"Pa=\",round(Pa,2)\n",
+ "print\"absolute temperature in compartment B(Pb) in kpa\"\n",
+ "Pb=Pgb+Patm\n",
+ "print\"Pb=\",round(Pb,2)\n",
+ "print\"absolute pressure in compartments in A & B=496.06 kpa & 246.06 kpa\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 1.11;page no:25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 1.11, Page:25 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 11\n",
+ "the pressure of air in air tank can be obtained by equalising pressures at some reference line\n",
+ "P1+RHOw*g*h1+RHOo*g*h2 = Patm+RHOm*g*h3\n",
+ "so P1 = Patm+RHOm*g*h3-RHOw*g*h1-RHOo*g*h2\n",
+ "air pressure(P1)in kpa 139.81\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of air pressure\n",
+ "#intiation of all variables\n",
+ "# Chapter 1\n",
+ "print\"Example 1.11, Page:25 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 11\")\n",
+ "Patm=90*10**3;#atmospheric pressure in pa\n",
+ "RHOw=1000;#density of water in kg/m^3\n",
+ "RHOm=13600;#density of mercury in kg/m^3\n",
+ "RHOo=850;#density of oil in kg/m^3\n",
+ "g=9.81;#acceleration due to ggravity in m/s^2\n",
+ "h1=.15;#height difference between water column in m\n",
+ "h2=.25;#height difference between oil column in m\n",
+ "h3=.4;#height difference between mercury column in m\n",
+ "print\"the pressure of air in air tank can be obtained by equalising pressures at some reference line\"\n",
+ "print\"P1+RHOw*g*h1+RHOo*g*h2 = Patm+RHOm*g*h3\"\n",
+ "print\"so P1 = Patm+RHOm*g*h3-RHOw*g*h1-RHOo*g*h2\"\n",
+ "P1=(Patm+RHOm*g*h3-RHOw*g*h1-RHOo*g*h2)/1000\n",
+ "print\"air pressure(P1)in kpa\",round(P1,2)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 1.12;page no:26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 1.12, Page:26 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 12\n",
+ "mass of object(m)in kg\n",
+ "m=F/g\n",
+ "kinetic energy(E)in J is given by\n",
+ "E= 140625000.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of kinetic energy\n",
+ "#intiation of all variables\n",
+ "# Chapter 1\n",
+ "print\"Example 1.12, Page:26 \\n \\n\"\n",
+ "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 12\"\n",
+ "v=750;#relative velocity of object with respect to earth in m/sec\n",
+ "F=4000;#gravitational force in N\n",
+ "g=8;#acceleration due to gravity in m/s^2\n",
+ "print\"mass of object(m)in kg\"\n",
+ "print\"m=F/g\"\n",
+ "m=F/g\n",
+ "print\"kinetic energy(E)in J is given by\"\n",
+ "E=m*v**2/2\n",
+ "print\"E=\",round(E)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 1.13;page no:26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 1.13, Page:26 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 13\n",
+ "characteristics gas constant(R2)in kJ/kg k\n",
+ "molecular weight of gas(m)in kg/kg mol= 16.63\n",
+ "NOTE=>Their is some calculation mistake while calaulating gas constant in book,which is corrected above hence answer may vary.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of molecular weight of gas\n",
+ "#intiation of all variables\n",
+ "# Chapter 1\n",
+ "print\"Example 1.13, Page:26 \\n \\n\"\n",
+ "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 13\"\n",
+ "Cp=2.286;#specific heat at constant pressure in kJ/kg k\n",
+ "Cv=1.786;#specific heat at constant volume in kJ/kg k\n",
+ "R1=8.3143;#universal gas constant in kJ/kg k\n",
+ "print\"characteristics gas constant(R2)in kJ/kg k\"\n",
+ "R2=Cp-Cv\n",
+ "m=R1/R2\n",
+ "print\"molecular weight of gas(m)in kg/kg mol=\",round(m,2)\n",
+ "print\"NOTE=>Their is some calculation mistake while calaulating gas constant in book,which is corrected above hence answer may vary.\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 1.14;page no:26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 1.14, Page:26 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 14\n",
+ "using perfect gas equation\n",
+ "P1*V1/T1 = P2*V2/T2\n",
+ "=>T2=(P2*V2*T1)/(P1*V1)\n",
+ "so final temperature of gas(T2)in k\n",
+ "or final temperature of gas(T2)in degree celcius= 127.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of final temperature of gas\n",
+ "#intiation of all variables\n",
+ "# Chapter 1\n",
+ "print\"Example 1.14, Page:26 \\n \\n\"\n",
+ "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 14\"\n",
+ "P1=750*10**3;#initial pressure of gas in pa\n",
+ "V1=0.2;#initial volume of gas in m^3\n",
+ "T1=600;#initial temperature of gas in k\n",
+ "P2=2*10**5;#final pressure of gas i pa\n",
+ "V2=0.5;#final volume of gas in m^3\n",
+ "print\"using perfect gas equation\"\n",
+ "print\"P1*V1/T1 = P2*V2/T2\"\n",
+ "print\"=>T2=(P2*V2*T1)/(P1*V1)\"\n",
+ "print\"so final temperature of gas(T2)in k\"\n",
+ "T2=(P2*V2*T1)/(P1*V1)\n",
+ "T2=T2-273\n",
+ "print\"or final temperature of gas(T2)in degree celcius=\",round(T2,2)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 1.15;page no:27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 1.15, Page:27 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 15\n",
+ "from perfect gas equation we get\n",
+ "initial mass of air(m1 in kg)=(P1*V1)/(R*T1)\n",
+ "m1= 5.807\n",
+ "final mass of air(m2 in kg)=(P2*V2)/(R*T2)\n",
+ "m2= 3.111\n",
+ "mass of air removed(m)in kg 2.696\n",
+ "volume of this mass of air(V) at initial states in m^3= 2.32\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of volume of this mass of air(V) at initial states\n",
+ "#intiation of all variables\n",
+ "# Chapter 1\n",
+ "print\"Example 1.15, Page:27 \\n \\n\"\n",
+ "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 15\"\n",
+ "P1=100*10**3;#initial pressure of air in pa\n",
+ "V1=5.;#initial volume of air in m^3\n",
+ "T1=300.;#initial temperature of gas in k\n",
+ "P2=50*10**3;#final pressure of air in pa\n",
+ "V2=5.;#final volume of air in m^3\n",
+ "T2=(280.);#final temperature of air in K\n",
+ "R=287.;#gas constant on J/kg k\n",
+ "print\"from perfect gas equation we get\"\n",
+ "print\"initial mass of air(m1 in kg)=(P1*V1)/(R*T1)\"\n",
+ "m1=(P1*V1)/(R*T1)\n",
+ "print(\"m1=\"),round(m1,3)\n",
+ "print\"final mass of air(m2 in kg)=(P2*V2)/(R*T2)\"\n",
+ "m2=(P2*V2)/(R*T2)\n",
+ "print(\"m2=\"),round(m2,3)\n",
+ "m=m1-m2\n",
+ "print\"mass of air removed(m)in kg\",round(m,3)\n",
+ "V=m*R*T1/P1\n",
+ "print\"volume of this mass of air(V) at initial states in m^3=\",round(V,2)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 1.16;page no:27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 1.16, Page:27 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 16\n",
+ "here V1=V2\n",
+ "so P1/T1=P2/T2\n",
+ "final temperature of hydrogen gas(T2)in k\n",
+ "=>T2=P2*T1/P1\n",
+ "now R=(Cp-Cv) in KJ/kg k\n",
+ "And volume of cylinder(V1)in m^3\n",
+ "V1=(math.pi*d^2*l)/4\n",
+ "mass of hydrogen gas(m)in kg\n",
+ "m= 0.254\n",
+ "now heat supplied(Q)in KJ\n",
+ "Q= 193.93\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of heat supplied\n",
+ "#intiation of all variables\n",
+ "# Chapter 1\n",
+ "import math\n",
+ "print\"Example 1.16, Page:27 \\n \\n\"\n",
+ "print\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 16\"\n",
+ "d=1;#diameter of cylinder in m\n",
+ "l=4;#length of cylinder in m\n",
+ "P1=100*10**3;#initial pressureof hydrogen gas in pa\n",
+ "T1=(27+273);#initial temperature of hydrogen gas in k\n",
+ "P2=125*10**3;#final pressureof hydrogen gas in pa\n",
+ "Cp=14.307;#specific heat at constant pressure in KJ/kg k\n",
+ "Cv=10.183;#specific heat at constant volume in KJ/kg k\n",
+ "print\"here V1=V2\"\n",
+ "print\"so P1/T1=P2/T2\"\n",
+ "print\"final temperature of hydrogen gas(T2)in k\"\n",
+ "print\"=>T2=P2*T1/P1\"\n",
+ "T2=P2*T1/P1\n",
+ "print\"now R=(Cp-Cv) in KJ/kg k\"\n",
+ "R=Cp-Cv\n",
+ "print\"And volume of cylinder(V1)in m^3\"\n",
+ "print\"V1=(math.pi*d^2*l)/4\"\n",
+ "V1=(math.pi*d**2*l)/4\n",
+ "print\"mass of hydrogen gas(m)in kg\"\n",
+ "m=(P1*V1)/(1000*R*T1)\n",
+ "print\"m=\",round(m,3)\n",
+ "print\"now heat supplied(Q)in KJ\"\n",
+ "Q=m*Cv*(T2-T1)\n",
+ "print\"Q=\",round(Q,2)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 1.17;page no:28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 1.17, Page:28 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 17\n",
+ "final total volume(V)in m^3\n",
+ "V=V1*V2\n",
+ "total mass of air(m)in kg\n",
+ "m=m1+m2\n",
+ "final pressure of air(P)in kpa\n",
+ "using perfect gas equation\n",
+ "P= 516.6\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of final pressure\n",
+ "#intiation of all variables\n",
+ "# Chapter 1\n",
+ "print\"Example 1.17, Page:28 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 17\")\n",
+ "V1=2.;#volume of first cylinder in m^3\n",
+ "V2=2.;#volume of second cylinder in m^3\n",
+ "T=(27+273);#temperature of system in k\n",
+ "m1=20.;#mass of air in first vessel in kg\n",
+ "m2=4.;#mass of air in second vessel in kg\n",
+ "R=287.;#gas constant J/kg k\n",
+ "print(\"final total volume(V)in m^3\")\n",
+ "print(\"V=V1*V2\")\n",
+ "V=V1*V2\n",
+ "print(\"total mass of air(m)in kg\")\n",
+ "print(\"m=m1+m2\")\n",
+ "m=m1+m2\n",
+ "print(\"final pressure of air(P)in kpa\")\n",
+ "print(\"using perfect gas equation\")\n",
+ "P=(m*R*T)/(1000*V)\n",
+ "print\"P=\",round(P,2)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 1.18;page no:28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 1.18, Page:28 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 18\n",
+ "1.By considering it as a PERFECT GAS\n",
+ "gas constant for CO2(Rco2)\n",
+ "Rco2=(J/Kg.k) 188.9\n",
+ "Also P*V=M*Rco2*T\n",
+ "pressure of CO2 as perfect gas(P)in N/m^2\n",
+ "P=(m*Rco2*T)/V 141683.71\n",
+ "2.By considering as a REAL GAS\n",
+ "values of vanderwaal constants a,b can be seen from the table which are\n",
+ "a=(N m^4/(kg mol)^2) 362850.0\n",
+ "b=(m^3/kg mol) 0.03\n",
+ "now specific volume(v)in m^3/kg mol\n",
+ "v= 17.604\n",
+ "now substituting the value of all variables in vanderwaal equation\n",
+ "(P+(a/v^2))*(v-b)=R*T\n",
+ "pressure of CO2 as real gas(P)in N/m^2\n",
+ "P= 140766.02\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of pressure of CO2 as perfect,real gas\n",
+ "#intiation of all variables\n",
+ "# Chapter 1\n",
+ "print\"Example 1.18, Page:28 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 18\")\n",
+ "m=5;#mass of CO2 in kg\n",
+ "V=2;#volume of vesssel in m^3\n",
+ "T=(27+273);#temperature of vessel in k\n",
+ "R=8.314*10**3;#universal gas constant in J/kg k\n",
+ "M=44.01;#molecular weight of CO2 \n",
+ "print(\"1.By considering it as a PERFECT GAS\")\n",
+ "print(\"gas constant for CO2(Rco2)\")\n",
+ "Rco2=R/M\n",
+ "print(\"Rco2=(J/Kg.k)\"),round(Rco2,1)\n",
+ "print(\"Also P*V=M*Rco2*T\")\n",
+ "print(\"pressure of CO2 as perfect gas(P)in N/m^2\")\n",
+ "P=(m*Rco2*T)/V\n",
+ "print(\"P=(m*Rco2*T)/V \"),round(P,2)\n",
+ "print(\"2.By considering as a REAL GAS\")\n",
+ "print(\"values of vanderwaal constants a,b can be seen from the table which are\")\n",
+ "a=3628.5*10**2#vanderwall constant in N m^4/(kg mol)^2\n",
+ "b=3.14*10**-2# vanderwall constant in m^3/kg mol\n",
+ "print(\"a=(N m^4/(kg mol)^2) \"),round(a,2)\n",
+ "print(\"b=(m^3/kg mol)\"),round(b,2)\n",
+ "print(\"now specific volume(v)in m^3/kg mol\")\n",
+ "v=V*M/m\n",
+ "print(\"v=\"),round(v,3)\n",
+ "print(\"now substituting the value of all variables in vanderwaal equation\")\n",
+ "print(\"(P+(a/v^2))*(v-b)=R*T\")\n",
+ "print(\"pressure of CO2 as real gas(P)in N/m^2\")\n",
+ "P=((R*T)/(v-b))-(a/v**2)\n",
+ "print(\"P=\"),round(P,2)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 1.19;page no:29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 1.19, Page:29 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 19\n",
+ "1.considering as perfect gas\n",
+ "specific volume(V)in m^3/kg\n",
+ "V= 0.0186\n",
+ "2.considering compressibility effects\n",
+ "reduced pressure(P)in pa\n",
+ "p= 0.8\n",
+ "reduced temperature(t)in k\n",
+ "t= 1.1\n",
+ "from generalised compressibility chart,compressibility factor(Z)can be seen for reduced pressure and reduced temperatures of 0.8 and 1.1\n",
+ "we get Z=0.785\n",
+ "now actual specific volume(v)in m^3/kg\n",
+ "v= 0.0146\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of specific volume of steam\n",
+ "#intiation of all variables\n",
+ "# Chapter 1\n",
+ "print\"Example 1.19, Page:29 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 19\")\n",
+ "P=17672;#pressure of steam on kpa\n",
+ "T=712;#temperature of steam in k\n",
+ "Pc=22.09;#critical pressure of steam in Mpa\n",
+ "Tc=647.3;#critical temperature of steam in k\n",
+ "R=0.4615;#gas constant for steam in KJ/kg k\n",
+ "print(\"1.considering as perfect gas\")\n",
+ "print(\"specific volume(V)in m^3/kg\")\n",
+ "V=R*T/P\n",
+ "print(\"V=\"),round(V,4)\n",
+ "print(\"2.considering compressibility effects\")\n",
+ "print(\"reduced pressure(P)in pa\")\n",
+ "p=P/(Pc*1000)\n",
+ "print(\"p=\"),round(p,2)\n",
+ "print(\"reduced temperature(t)in k\")\n",
+ "t=T/Tc\n",
+ "print(\"t=\"),round(t,2)\n",
+ "print(\"from generalised compressibility chart,compressibility factor(Z)can be seen for reduced pressure and reduced temperatures of 0.8 and 1.1\")\n",
+ "print(\"we get Z=0.785\")\n",
+ "Z=0.785;#compressibility factor\n",
+ "print(\"now actual specific volume(v)in m^3/kg\")\n",
+ "v=Z*V\n",
+ "print(\"v=\"),round(v,4)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 1.20;page no:30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 1.20, Page:30 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 20\n",
+ "volume of ballon(V1)in m^3\n",
+ "V1= 65.45\n",
+ "molecular mass of hydrogen(M)\n",
+ "M=2\n",
+ "gas constant for H2(R1)in J/kg k\n",
+ "R1= 4157.0\n",
+ "mass of H2 in ballon(m1)in kg\n",
+ "m1= 5.316\n",
+ "volume of air printlaced(V2)=volume of ballon(V1)\n",
+ "mass of air printlaced(m2)in kg\n",
+ "m2= 79.66\n",
+ "gas constant for air(R2)=0.287 KJ/kg k\n",
+ "load lifting capacity due to buoyant force(m)in kg\n",
+ "m= 74.343\n"
+ ]
+ }
+ ],
+ "source": [
+ "#estimation of maximum load that can be lifted \n",
+ "#intiation of all variables\n",
+ "# Chapter 1\n",
+ "import math\n",
+ "print\"Example 1.20, Page:30 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 20\")\n",
+ "d=5.;#diameter of ballon in m\n",
+ "T1=(27.+273.);#temperature of hydrogen in k\n",
+ "P=1.013*10**5;#atmospheric pressure in pa\n",
+ "T2=(17.+273.);#temperature of surrounding air in k\n",
+ "R=8.314*10**3;#gas constant in J/kg k\n",
+ "print(\"volume of ballon(V1)in m^3\")\n",
+ "V1=(4./3.)*math.pi*((d/2)**3)\n",
+ "print(\"V1=\"),round(V1,2)\n",
+ "print(\"molecular mass of hydrogen(M)\")\n",
+ "print(\"M=2\")\n",
+ "M=2;#molecular mass of hydrogen\n",
+ "print(\"gas constant for H2(R1)in J/kg k\")\n",
+ "R1=R/M\n",
+ "print(\"R1=\"),round(R1,2)\n",
+ "print(\"mass of H2 in ballon(m1)in kg\")\n",
+ "m1=(P*V1)/(R1*T1)\n",
+ "print(\"m1=\"),round(m1,3)\n",
+ "print(\"volume of air printlaced(V2)=volume of ballon(V1)\")\n",
+ "print(\"mass of air printlaced(m2)in kg\")\n",
+ "R2=0.287*1000;#gas constant for air in J/kg k\n",
+ "m2=(P*V1)/(R2*T2)\n",
+ "print(\"m2=\"),round(m2,2)\n",
+ "print(\"gas constant for air(R2)=0.287 KJ/kg k\")\n",
+ "print(\"load lifting capacity due to buoyant force(m)in kg\")\n",
+ "m=m2-m1\n",
+ "print(\"m=\"),round(m,3)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 1.21;page no:31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 1.21, Page:31 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 21\n",
+ "let initial receiver pressure(p1)=1 in pa\n",
+ "so final receiver pressure(p2)=in pa 0.25\n",
+ "perfect gas equation,p*V*m=m*R*T\n",
+ "differentiating and then integrating equation w.r.t to time(t) \n",
+ "we get t=-(V/v)*log(p2/p1)\n",
+ "so time(t)in min 110.9\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of time required\n",
+ "#intiation of all variables\n",
+ "# Chapter 1\n",
+ "import math\n",
+ "print\"Example 1.21, Page:31 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 21\")\n",
+ "v=0.25;#volume sucking rate of pump in m^3/min\n",
+ "V=20.;#volume of air vessel in m^3\n",
+ "p1=1.;#initial receiver pressure in pa\n",
+ "print(\"let initial receiver pressure(p1)=1 in pa\")\n",
+ "p2=p1/4.\n",
+ "print(\"so final receiver pressure(p2)=in pa\"),round(p2,2)\n",
+ "print(\"perfect gas equation,p*V*m=m*R*T\")\n",
+ "print(\"differentiating and then integrating equation w.r.t to time(t) \")\n",
+ "print(\"we get t=-(V/v)*log(p2/p1)\")\n",
+ "t=-(V/v)*math.log(p2/p1)\n",
+ "print(\"so time(t)in min\"),round(t,2)\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 1.22;page no:32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 1.22, Page:32 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 22\n",
+ "first calculate gas constants for different gases in j/kg k\n",
+ "for nitrogen,R1= 296.9\n",
+ "for oxygen,R2= 259.8\n",
+ "for carbon dioxide,R3= 188.95\n",
+ "so the gas constant for mixture(Rm)in j/kg k\n",
+ "Rm= 288.09\n",
+ "now the specific heat at constant pressure for constituent gases in KJ/kg k\n",
+ "for nitrogen,Cp1= 1.039\n",
+ "for oxygen,Cp2= 0.909\n",
+ "for carbon dioxide,Cp3= 0.819\n",
+ "so the specific heat at constant pressure for mixture(Cpm)in KJ/kg k\n",
+ "Cpm= 1.0115\n",
+ "now no. of moles of constituents gases\n",
+ "for nitrogen,n1=m1/M1 in mol,where m1=f1*m in kg 0.143\n",
+ "for oxygen,n2=m2/M2 in mol,where m2=f2*m in kg 0.028\n",
+ "for carbon dioxide,n3=m3/M3 in mol,where m3=f3*m in kg 0.0023\n",
+ "total no. of moles in mixture in mol\n",
+ "n= 0.1733\n",
+ "now mole fraction of constituent gases\n",
+ "for nitrogen,x1= 0.825\n",
+ "for oxygen,x2= 0.162\n",
+ "for carbon dioxide,x3= 0.0131\n",
+ "now the molecular weight of mixture(Mm)in kg/kmol\n",
+ "Mm= 28.86\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of specific heat at constant pressure for constituent gases \n",
+ "#intiation of all variables\n",
+ "# Chapter 1\n",
+ "print\"Example 1.22, Page:32 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 22\")\n",
+ "m=5;#mass of mixture of gas in kg\n",
+ "P=1.013*10**5;#pressure of mixture in pa\n",
+ "T=300;#temperature of mixture in k\n",
+ "M1=28.;#molecular weight of nitrogen(N2)\n",
+ "M2=32.;#molecular weight of oxygen(O2)\n",
+ "M3=44.;#molecular weight of carbon dioxide(CO2)\n",
+ "f1=0.80;#fraction of N2 in mixture\n",
+ "f2=0.18;#fraction of O2 in mixture\n",
+ "f3=0.02;#fraction of CO2 in mixture\n",
+ "k1=1.4;#ratio of specific heat capacities for N2\n",
+ "k2=1.4;#ratio of specific heat capacities for O2\n",
+ "k3=1.3;#ratio of specific heat capacities for CO2\n",
+ "R=8314;#universal gas constant in J/kg k\n",
+ "print(\"first calculate gas constants for different gases in j/kg k\")\n",
+ "R1=R/M1\n",
+ "print(\"for nitrogen,R1=\"),round(R1,1)\n",
+ "R2=R/M2\n",
+ "print(\"for oxygen,R2=\"),round(R2,1)\n",
+ "R3=R/M3\n",
+ "print(\"for carbon dioxide,R3=\"),round(R3,2)\n",
+ "print(\"so the gas constant for mixture(Rm)in j/kg k\")\n",
+ "Rm=f1*R1+f2*R2+f3*R3\n",
+ "print(\"Rm=\"),round(Rm,2)\n",
+ "print(\"now the specific heat at constant pressure for constituent gases in KJ/kg k\")\n",
+ "Cp1=((k1/(k1-1))*R1)/1000\n",
+ "print(\"for nitrogen,Cp1=\"),round(Cp1,3)\n",
+ "Cp2=((k2/(k2-1))*R2)/1000\n",
+ "print(\"for oxygen,Cp2=\"),round(Cp2,3)\n",
+ "Cp3=((k3/(k3-1))*R3)/1000\n",
+ "print(\"for carbon dioxide,Cp3=\"),round(Cp3,3)\n",
+ "print(\"so the specific heat at constant pressure for mixture(Cpm)in KJ/kg k\")\n",
+ "Cpm=f1*Cp1+f2*Cp2+f3*Cp3\n",
+ "print(\"Cpm=\"),round(Cpm,4)\n",
+ "print(\"now no. of moles of constituents gases\")\n",
+ "m1=f1*m\n",
+ "n1=m1/M1\n",
+ "print(\"for nitrogen,n1=m1/M1 in mol,where m1=f1*m in kg\"),round(n1,3)\n",
+ "m2=f2*m\n",
+ "n2=m2/M2\n",
+ "print(\"for oxygen,n2=m2/M2 in mol,where m2=f2*m in kg\"),round(n2,3)\n",
+ "m3=f3*m\n",
+ "n3=m3/M3\n",
+ "print(\"for carbon dioxide,n3=m3/M3 in mol,where m3=f3*m in kg\"),round(n3,4)\n",
+ "print(\"total no. of moles in mixture in mol\")\n",
+ "n=n1+n2+n3\n",
+ "print(\"n=\"),round(n,4)\n",
+ "print(\"now mole fraction of constituent gases\")\n",
+ "x1=n1/n\n",
+ "print(\"for nitrogen,x1=\"),round(x1,3)\n",
+ "x2=n2/n\n",
+ "print(\"for oxygen,x2=\"),round(x2,3)\n",
+ "x3=n3/n\n",
+ "print(\"for carbon dioxide,x3=\"),round(x3,4)\n",
+ "print(\"now the molecular weight of mixture(Mm)in kg/kmol\")\n",
+ "Mm=M1*x1+M2*x2+M3*x3\n",
+ "print(\"Mm=\"),round(Mm,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 1.23;page no:33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 1.23, Page:33 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 23\n",
+ "mole fraction of constituent gases\n",
+ "x=(ni/n)=(Vi/V)\n",
+ "take volume of mixture(V)=1 m^3\n",
+ "mole fraction of O2(x1)\n",
+ "x1= 0.18\n",
+ "mole fraction of N2(x2)\n",
+ "x2= 0.75\n",
+ "mole fraction of CO2(x3)\n",
+ "x3= 0.07\n",
+ "now molecular weight of mixture = molar mass(m)\n",
+ "m= 29.84\n",
+ "now gravimetric analysis refers to the mass fraction analysis\n",
+ "mass fraction of constituents\n",
+ "y=xi*Mi/m\n",
+ "mole fraction of O2\n",
+ "y1= 0.193\n",
+ "mole fraction of N2\n",
+ "y2= 0.704\n",
+ "mole fraction of CO2\n",
+ "y3= 0.103\n",
+ "now partial pressure of constituents = volume fraction * pressure of mixture\n",
+ "Pi=xi*P\n",
+ "partial pressure of O2(P1)in Mpa\n",
+ "P1= 0.09\n",
+ "partial pressure of N2(P2)in Mpa\n",
+ "P2= 0.375\n",
+ "partial pressure of CO2(P3)in Mpa\n",
+ "P3= 0.04\n",
+ "NOTE=>Their is some calculation mistake for partial pressure of CO2(i.e 0.35Mpa)which is given wrong in book so it is corrected above hence answers may vary.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of pressure difference\n",
+ "#intiation of all variables\n",
+ "# Chapter 1\n",
+ "print\"Example 1.23, Page:33 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 23\")\n",
+ "V1=0.18;#volume fraction of O2 in m^3\n",
+ "V2=0.75;#volume fraction of N2 in m^3\n",
+ "V3=0.07;#volume fraction of CO2 in m^3\n",
+ "P=0.5;#pressure of mixture in Mpa\n",
+ "T=(107+273);#temperature of mixture in k\n",
+ "M1=32;#molar mass of O2\n",
+ "M2=28;#molar mass of N2\n",
+ "M3=44;#molar mass of CO2\n",
+ "print(\"mole fraction of constituent gases\")\n",
+ "print(\"x=(ni/n)=(Vi/V)\")\n",
+ "V=1;# volume of mixture in m^3\n",
+ "print(\"take volume of mixture(V)=1 m^3\")\n",
+ "print(\"mole fraction of O2(x1)\")\n",
+ "x1=V1/V\n",
+ "print(\"x1=\"),round(x1,2)\n",
+ "print(\"mole fraction of N2(x2)\")\n",
+ "x2=V2/V\n",
+ "print(\"x2=\"),round(x2,2)\n",
+ "print(\"mole fraction of CO2(x3)\")\n",
+ "x3=V3/V\n",
+ "print(\"x3=\"),round(x3,2)\n",
+ "print(\"now molecular weight of mixture = molar mass(m)\")\n",
+ "m=x1*M1+x2*M2+x3*M3\n",
+ "print(\"m=\"),round(m,2)\n",
+ "print(\"now gravimetric analysis refers to the mass fraction analysis\")\n",
+ "print(\"mass fraction of constituents\")\n",
+ "print(\"y=xi*Mi/m\")\n",
+ "print(\"mole fraction of O2\")\n",
+ "y1=x1*M1/m\n",
+ "print(\"y1=\"),round(y1,3)\n",
+ "print(\"mole fraction of N2\")\n",
+ "y2=x2*M2/m\n",
+ "print(\"y2=\"),round(y2,3)\n",
+ "print(\"mole fraction of CO2\")\n",
+ "y3=x3*M3/m\n",
+ "print(\"y3=\"),round(y3,3)\n",
+ "print(\"now partial pressure of constituents = volume fraction * pressure of mixture\")\n",
+ "print(\"Pi=xi*P\")\n",
+ "print(\"partial pressure of O2(P1)in Mpa\")\n",
+ "p1=x1*P\n",
+ "print(\"P1=\"),round(p1,2)\n",
+ "print(\"partial pressure of N2(P2)in Mpa\")\n",
+ "P2=x2*P\n",
+ "print(\"P2=\"),round(P2,3)\n",
+ "P3=x3*P\n",
+ "print(\"partial pressure of CO2(P3)in Mpa\")\n",
+ "print(\"P3=\"),round(P3,2)\n",
+ "print(\"NOTE=>Their is some calculation mistake for partial pressure of CO2(i.e 0.35Mpa)which is given wrong in book so it is corrected above hence answers may vary.\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 1.24;page no:34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 1.24, Page:34 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 24\n",
+ "volume of tank of N2(V1) in m^3= 3.0\n",
+ "volume of tank of CO2(V2) in m^3= 3.0\n",
+ "taking the adiabatic condition\n",
+ "no. of moles of N2(n1)\n",
+ "n1= 0.6\n",
+ "no. of moles of CO2(n2)\n",
+ "n2= 0.37\n",
+ "total no. of moles of mixture(n)in mol\n",
+ "n= 0.97\n",
+ "gas constant for N2(R1)in J/kg k\n",
+ "R1= 296.93\n",
+ "gas constant for CO2(R2)in J/kg k\n",
+ "R2=R/M2 188.95\n",
+ "specific heat of N2 at constant volume (Cv1) in J/kg k\n",
+ "Cv1= 742.32\n",
+ "specific heat of CO2 at constant volume (Cv2) in J/kg k\n",
+ "Cv2= 629.85\n",
+ "mass of N2(m1)in kg\n",
+ "m1= 16.84\n",
+ "mass of CO2(m2)in kg\n",
+ "m2= 16.28\n",
+ "let us consider the equilibrium temperature of mixture after adiabatic mixing at T\n",
+ "applying energy conservation principle\n",
+ "m1*Cv1*(T-T1) = m2*Cv2*(T-T2)\n",
+ "equlibrium temperature(T)in k\n",
+ "=>T= 439.44\n",
+ "so the equlibrium pressure(P)in kpa\n",
+ "P= 591.55\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of equilibrium temperature,pressure of mixture\n",
+ "#intiation of all variables\n",
+ "# Chapter 1\n",
+ "print\"Example 1.24, Page:34 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 24\")\n",
+ "V=6;#volume of tank in m^3\n",
+ "P1=800*10**3;#pressure of N2 gas tank in pa\n",
+ "T1=480.;#temperature of N2 gas tank in k\n",
+ "P2=400*10**3;#pressure of CO2 gas tank in pa\n",
+ "T2=390.;#temperature of CO2 gas tank in k\n",
+ "k1=1.4;#ratio of specific heat capacity for N2\n",
+ "k2=1.3;#ratio of specific heat capacity for CO2\n",
+ "R=8314.;#universal gas constant in J/kg k\n",
+ "M1=28.;#molecular weight of N2\n",
+ "M2=44.;#molecular weight of CO2\n",
+ "V1=V/2\n",
+ "print(\"volume of tank of N2(V1) in m^3=\"),round(V1,2)\n",
+ "V2=V/2\n",
+ "print(\"volume of tank of CO2(V2) in m^3=\"),round(V2,2)\n",
+ "print(\"taking the adiabatic condition\")\n",
+ "print(\"no. of moles of N2(n1)\")\n",
+ "n1=(P1*V1)/(R*T1)\n",
+ "print(\"n1=\"),round(n1,2)\n",
+ "print(\"no. of moles of CO2(n2)\")\n",
+ "n2=(P2*V2)/(R*T2)\n",
+ "print(\"n2=\"),round(n2,2)\n",
+ "print(\"total no. of moles of mixture(n)in mol\")\n",
+ "n=n1+n2\n",
+ "print(\"n=\"),round(n,2)\n",
+ "print(\"gas constant for N2(R1)in J/kg k\")\n",
+ "R1=R/M1\n",
+ "print(\"R1=\"),round(R1,2)\n",
+ "print(\"gas constant for CO2(R2)in J/kg k\")\n",
+ "R2=R/M2\n",
+ "print(\"R2=R/M2\"),round(R2,2)\n",
+ "print(\"specific heat of N2 at constant volume (Cv1) in J/kg k\")\n",
+ "Cv1=R1/(k1-1)\n",
+ "print(\"Cv1=\"),round(Cv1,2)\n",
+ "print(\"specific heat of CO2 at constant volume (Cv2) in J/kg k\")\n",
+ "Cv2=R2/(k2-1)\n",
+ "print(\"Cv2=\"),round(Cv2,2)\n",
+ "print(\"mass of N2(m1)in kg\")\n",
+ "m1=n1*M1\n",
+ "print(\"m1=\"),round(m1,2)\n",
+ "print(\"mass of CO2(m2)in kg\")\n",
+ "m2=n2*M2\n",
+ "print(\"m2=\"),round(m2,2)\n",
+ "print(\"let us consider the equilibrium temperature of mixture after adiabatic mixing at T\")\n",
+ "print(\"applying energy conservation principle\")\n",
+ "print(\"m1*Cv1*(T-T1) = m2*Cv2*(T-T2)\")\n",
+ "print(\"equlibrium temperature(T)in k\")\n",
+ "T=((m1*Cv1*T1)+(m2*Cv2*T2))/((m1*Cv1)+(m2*Cv2))\n",
+ "print(\"=>T=\"),round(T,2)\n",
+ "print(\"so the equlibrium pressure(P)in kpa\")\n",
+ "P=(n*R*T)/(1000*V)\n",
+ "print(\"P=\"),round(P,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 1.25;page no:35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 1.25, Page:35 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 25\n",
+ "since two gases are non reacting therefore specific heat of final mixture(Cp)in KJ/kg k can be obtained by following for adiabatic mixing\n",
+ "so the specific heat at constant pressure(Cp)in KJ/kg k\n",
+ "Cp= 7.608\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of specific heat of final mixture\n",
+ "#intiation of all variables\n",
+ "# Chapter 1\n",
+ "print\"Example 1.25, Page:35 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 25\")\n",
+ "m1=2;#mass of H2 in kg\n",
+ "m2=3;#mass of He in kg\n",
+ "T=100;#temperature of container in k\n",
+ "Cp1=11.23;#specific heat at constant pressure for H2 in KJ/kg k\n",
+ "Cp2=5.193;#specific heat at constant pressure for He in KJ/kg k\n",
+ "print(\"since two gases are non reacting therefore specific heat of final mixture(Cp)in KJ/kg k can be obtained by following for adiabatic mixing\")\n",
+ "print(\"so the specific heat at constant pressure(Cp)in KJ/kg k\")\n",
+ "Cp=((Cp1*m1)+Cp2*m2)/(m1+m2)\n",
+ "print(\"Cp=\"),round(Cp,3)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 1.26;page no:35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 1.26, Page:35 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 26\n",
+ "gas constant for H2(R1)in KJ/kg k\n",
+ "R1= 4.157\n",
+ "gas constant for N2(R2)in KJ/kg k\n",
+ "R2= 0.297\n",
+ "gas constant for CO2(R3)in KJ/kg k\n",
+ "R3= 0.189\n",
+ "so now gas constant for mixture(Rm)in KJ/kg k\n",
+ "Rm= 2.606\n",
+ "considering gas to be perfect gas\n",
+ "total mass of mixture(m)in kg\n",
+ "m= 30.0\n",
+ "capacity of vessel(V)in m^3\n",
+ "V= 231.57\n",
+ "now final temperature(Tf) is twice of initial temperature(Ti)\n",
+ "so take k=Tf/Ti=2\n",
+ "for constant volume heating,final pressure(Pf)in kpa shall be\n",
+ "Pf= 202.65\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of capacity and pressure in the vessel\n",
+ "#intiation of all variables\n",
+ "# Chapter 1\n",
+ "print\"Example 1.26, Page:35 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 26\")\n",
+ "m1=18.;#mass of hydrogen(H2) in kg\n",
+ "m2=10.;#mass of nitrogen(N2) in kg\n",
+ "m3=2.;#mass of carbon dioxide(CO2) in kg\n",
+ "R=8.314;#universal gas constant in KJ/kg k\n",
+ "Pi=101.325;#atmospheric pressure in kpa\n",
+ "T=(27+273.15);#ambient temperature in k\n",
+ "M1=2;#molar mass of H2\n",
+ "M2=28;#molar mass of N2\n",
+ "M3=44;#molar mass of CO2\n",
+ "print(\"gas constant for H2(R1)in KJ/kg k\")\n",
+ "R1=R/M1\n",
+ "print(\"R1=\"),round(R1,3)\n",
+ "print(\"gas constant for N2(R2)in KJ/kg k\")\n",
+ "R2=R/M2\n",
+ "print(\"R2=\"),round(R2,3)\n",
+ "print(\"gas constant for CO2(R3)in KJ/kg k\")\n",
+ "R3=R/M3\n",
+ "print(\"R3=\"),round(R3,3)\n",
+ "print(\"so now gas constant for mixture(Rm)in KJ/kg k\")\n",
+ "Rm=(m1*R1+m2*R2+m3*R3)/(m1+m2+m3)\n",
+ "print(\"Rm=\"),round(Rm,3)\n",
+ "print(\"considering gas to be perfect gas\")\n",
+ "print(\"total mass of mixture(m)in kg\")\n",
+ "m=m1+m2+m3\n",
+ "print(\"m=\"),round(m,2)\n",
+ "print(\"capacity of vessel(V)in m^3\")\n",
+ "V=(m*Rm*T)/Pi\n",
+ "print(\"V=\"),round(V,2)\n",
+ "print(\"now final temperature(Tf) is twice of initial temperature(Ti)\")\n",
+ "k=2;#ratio of initial to final temperature\n",
+ "print(\"so take k=Tf/Ti=2\") \n",
+ "print(\"for constant volume heating,final pressure(Pf)in kpa shall be\")\n",
+ "Pf=Pi*k\n",
+ "print(\"Pf=\"),round(Pf,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 1.27;page no:36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 1.27, Page:36 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 27\n",
+ "let inlet state be 1 and exit state be 2\n",
+ "by charles law volume and temperature can be related as\n",
+ "(V1/T1)=(V2/T2)\n",
+ "(V2/V1)=(T2/T1)\n",
+ "or (((math.pi*D2^2)/4)*V2)/(((math.pi*D1^2)/4)*V1)=T2/T1\n",
+ "since change in K.E=0\n",
+ "so (D2^2/D1^2)=T2/T1\n",
+ "D2/D1=sqrt(T2/T1)\n",
+ "say(D2/D1)=k\n",
+ "so exit to inlet diameter ratio(k) 1.29\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of exit to inlet diameter ratio\n",
+ "#intiation of all variables\n",
+ "# Chapter 1\n",
+ "import math\n",
+ "print\"Example 1.27, Page:36 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 27\")\n",
+ "T1=(27.+273.);#initial temperature of air in k\n",
+ "T2=500.;#final temperature of air in k\n",
+ "print(\"let inlet state be 1 and exit state be 2\")\n",
+ "print(\"by charles law volume and temperature can be related as\")\n",
+ "print(\"(V1/T1)=(V2/T2)\")\n",
+ "print(\"(V2/V1)=(T2/T1)\")\n",
+ "print(\"or (((math.pi*D2^2)/4)*V2)/(((math.pi*D1^2)/4)*V1)=T2/T1\")\n",
+ "print(\"since change in K.E=0\")\n",
+ "print(\"so (D2^2/D1^2)=T2/T1\")\n",
+ "print(\"D2/D1=sqrt(T2/T1)\")\n",
+ "print(\"say(D2/D1)=k\")\n",
+ "k=math.sqrt(T2/T1)\n",
+ "print(\"so exit to inlet diameter ratio(k)\"),round(k,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##example 1.28;page no:37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 1.28, Page:37 \n",
+ " \n",
+ "\n",
+ "Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 28\n",
+ "gas constant for H2(R1)in KJ/kg k\n",
+ "R1= 4.157\n",
+ "say initial and final ststes are given by 1 and 2\n",
+ "mass of hydrogen pumped out shall be difference of initial and final mass inside vessel\n",
+ "final pressure of hydrogen(P2)in cm of Hg\n",
+ "P2= 6.0\n",
+ "therefore pressure difference(P)in kpa\n",
+ "P= 93.33\n",
+ "mass pumped out(m)in kg\n",
+ "m=((P1*V1)/(R1*T1))-((P2*V2)/(R1*T2))\n",
+ "here V1=V2=V and T1=T2=T\n",
+ "so m= 0.15\n",
+ "now during cooling upto 10 degree celcius,the process may be consider as constant volume process\n",
+ "say state before and after cooling are denoted by suffix 2 and 3\n",
+ "final pressure after cooling(P3)in kpa\n",
+ "P3= 7.546\n"
+ ]
+ }
+ ],
+ "source": [
+ "#cal of final pressure\n",
+ "#intiation of all variables\n",
+ "# Chapter 1\n",
+ "print\"Example 1.28, Page:37 \\n \\n\"\n",
+ "print(\"Engineering Thermodynamics by Onkar Singh,Chapter 1,Example 28\")\n",
+ "V=2;#volume of vessel in m^3\n",
+ "P1=76;#initial pressure or atmospheric pressure in cm of Hg\n",
+ "T=(27+273.15);#temperature of vessel in k\n",
+ "p=70;#final pressure in cm of Hg vaccum\n",
+ "R=8.314;#universal gas constant in KJ/kg k\n",
+ "M=2;#molecular weight of H2\n",
+ "print(\"gas constant for H2(R1)in KJ/kg k\")\n",
+ "R1=R/M\n",
+ "print(\"R1=\"),round(R1,3)\n",
+ "print(\"say initial and final ststes are given by 1 and 2\")\n",
+ "print(\"mass of hydrogen pumped out shall be difference of initial and final mass inside vessel\")\n",
+ "print(\"final pressure of hydrogen(P2)in cm of Hg\")\n",
+ "P2=P1-p\n",
+ "print(\"P2=\"),round(P2,2)\n",
+ "print(\"therefore pressure difference(P)in kpa\")\n",
+ "P=((P1-P2)*101.325)/76\n",
+ "print(\"P=\"),round(P,2)\n",
+ "print(\"mass pumped out(m)in kg\")\n",
+ "print(\"m=((P1*V1)/(R1*T1))-((P2*V2)/(R1*T2))\")\n",
+ "print(\"here V1=V2=V and T1=T2=T\")\n",
+ "m=(V*P)/(R1*T)\n",
+ "print(\"so m=\"),round(m,2)\n",
+ "print(\"now during cooling upto 10 degree celcius,the process may be consider as constant volume process\")\n",
+ "print(\"say state before and after cooling are denoted by suffix 2 and 3\")\n",
+ "T3=(10+273.15);#final temperature after cooling in k\n",
+ "print(\"final pressure after cooling(P3)in kpa\")\n",
+ "P3=(T3/T)*P2*(101.325/76)\n",
+ "print(\"P3=\"),round(P3,3)\n",
+ "\n"
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(49)_2.png b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(49)_2.png
new file mode 100644
index 00000000..69b43e33
--- /dev/null
+++ b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(49)_2.png
Binary files differ
diff --git a/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(50)_2.png b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(50)_2.png
new file mode 100644
index 00000000..b8c7aad6
--- /dev/null
+++ b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(50)_2.png
Binary files differ
diff --git a/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(51)_2.png b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(51)_2.png
new file mode 100644
index 00000000..f3bb8ad5
--- /dev/null
+++ b/_Engineering_Thermodynamics_by__O._Singh/screenshots/Screenshot_(51)_2.png
Binary files differ
diff --git a/sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation_2.ipynb b/sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation_2.ipynb
new file mode 100644
index 00000000..b60fb136
--- /dev/null
+++ b/sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation_2.ipynb
@@ -0,0 +1,445 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Chapter 8 : Gravitation"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 8.1 , page : 185"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " The planet will take a longer time to traverse BAC than CPB\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Importing module\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "# Variable declaration\n",
+ "\n",
+ "mp=1 # For convenience,mass is assumed to be unity \n",
+ "rp=1 # For convenience,sun-planet distance at perihelton is assumed to be unity \n",
+ "vp=1 # For convenience,speed of the planet at perihelton is assumed to be unity \n",
+ "ra=1 # For convenience,sun-planet distance at aphelton is assumed to be unity \n",
+ "va=1 # For convenience,speed of the planet at aphelton is assumed to be unity \n",
+ "Lp=mp*rp*vp # Angular momentum at perihelton\n",
+ "La=mp*ra*va # Angular momentum at ahelton\n",
+ "\n",
+ "# Result\n",
+ "\n",
+ "# From angular momentum conservation, mp*rp*vp = mp*ra*va or vp/va = rp/ra\n",
+ "# From Kepler’s second law, equal areas are swept in equal times\n",
+ "print(\" The planet will take a longer time to traverse BAC than CPB\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.2 , page : 187 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a) The force acting = [0.0, 2.5849394142282115e-26, 0.0] ≈ 0\n",
+ "(b) The force acting = 2 Gm²\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Importing module\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "# Variable declaration\n",
+ "\n",
+ "G=6.67*pow(10,-11) # Gravitational constant\n",
+ "m=1 # For convenience,mass is assumed to be unity \n",
+ "x=30 # The angle between GC and the positive x-axis is 30° and so is the angle between GB and the negative x-axis\n",
+ "y=math.radians(x) # The angle in radians\n",
+ "a=math.cos(y)\n",
+ "b=math.sin(y)\n",
+ "v1=(0,1,0)\n",
+ "v2=(-a,-b,0)\n",
+ "v3=(a,-b,0)\n",
+ "c=(2*G*pow(m,2))/1 # 2Gm²/1\n",
+ "\n",
+ "# Calculation\n",
+ "\n",
+ "#(a)\n",
+ "F1=[y * c for y in v1] # F(GA)\n",
+ "F2=[y * c for y in v2] # F(GB)\n",
+ "F3=[y * c for y in v3] # F(GC)\n",
+ "# From the principle of superposition and the law of vector addition, the resultant gravitational force FR on (2m) is given by\n",
+ "Fa=[sum(x) for x in zip(F1,F2,F3)]\n",
+ "\n",
+ "#(b)\n",
+ "# By symmetry the x-component of the force cancels out and the y-component survives\n",
+ "Fb=4-2 # 4Gm² j - 2Gm² j\n",
+ "\n",
+ "# Result\n",
+ "\n",
+ "print(\"(a) The force acting =\",Fa,\"≈ 0\")\n",
+ "print(\"(b) The force acting =\",Fb,\"Gm²\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.3 , page : 192 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Potential energy of a system of four particles = -5.414213562373095 Gm²/l\n",
+ "The gravitational potential at the centre of the square = -5.65685424949238 Gm²/l\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Importing module\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "# Variable declaration\n",
+ "\n",
+ "G=6.67*pow(10,-11) # Gravitational constant\n",
+ "m=1 # For convenience,mass is assumed to be unity \n",
+ "l=1 # For convenience,side of the square is assumed to be unity \n",
+ "c=(G*pow(m,2))/l\n",
+ "n=4 # Number of particles\n",
+ "\n",
+ "# Calculation\n",
+ "\n",
+ "d=math.sqrt(2)\n",
+ "# If the side of a square is l then the diagonal distance is √2l\n",
+ "# We have four mass pairs at distance l and two diagonal pairs at distance √2l \n",
+ "# Since the Potential Energy of a system of four particles is -4Gm²/l) - 2Gm²/dl\n",
+ "w=(-n-(2/d)) \n",
+ "# If the side of a square is l then the diagonal distance from the centre to corner is \n",
+ "# Since the Gravitational Potential at the centre of the square\n",
+ "u=-n*(2/d)\n",
+ "\n",
+ "# Result\n",
+ "\n",
+ "print (\"Potential energy of a system of four particles =\",w,\"Gm²/l\")\n",
+ "print(\"The gravitational potential at the centre of the square =\",u,\"Gm²/l\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.4 , page : 193 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Minimum speed of the projectile to reach the surface of the second sphere = ( 0.6 GM/R ) ^(1/2)\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Importing module\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "# Variable declaration\n",
+ "\n",
+ "R=1 # For convenience,radii of both the spheres is assumed to be unity \n",
+ "M=1 # For convenience,mass is assumed to be unity \n",
+ "m1=M # Mass of the first sphere\n",
+ "m2=6*M # Mass of the second sphere\n",
+ "m=1 # Since the mass of the projectile is unknown,take it as unity\n",
+ "d=6*R # Distance between the centres of both the spheres\n",
+ "r=1 # The distance from the centre of first sphere to the neutral point N\n",
+ "\n",
+ "G=6.67*pow(10,-11) # Gravitational constant\n",
+ "\n",
+ "# Calculation\n",
+ "\n",
+ "# Since N is the neutral point; GMm/r² = 4GMm/(6R-r)² and we get\n",
+ "r=2*R\n",
+ "# The mechanical energy at the surface of M is; Et = m(v^2)/2 - GMm/R - 4GMm/5R\n",
+ "# The mechanical energy at N is; En = -GMm/2R - 4GMm/4R\n",
+ "# From the principle of conservation of mechanical energy; Et = En and we get\n",
+ "v_sqr=2*((4/5)-(1/2))\n",
+ "\n",
+ "# Result\n",
+ "\n",
+ "print(\"Minimum speed of the projectile to reach the surface of the second sphere =\",\"(\",round(v_sqr,5),\"GM/R\",\")\",\"^(1/2)\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.5 , page : 195 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(i) Mass of Mars = 6.475139697520706e+23 kg\n",
+ "(ii) Period of revolution of Mars = 684.0033777694376 days\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Importing module\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "# Variable declaration\n",
+ "\n",
+ "Ï€=3.14 # Constant pi\n",
+ "G=6.67*pow(10,-11) # Gravitational constant\n",
+ "R=9.4*pow(10,3) # Orbital radius of Mars in km\n",
+ "T=459*60\n",
+ "Te=365 # Period of revolution of Earth\n",
+ "r=1.52 # Ratio of Rms/Res, where Rms is the mars-sun distance and Res is the earth-sun distance. \n",
+ "\n",
+ "# Calculation\n",
+ "\n",
+ "# (i) \n",
+ "R=R*pow(10,3)\n",
+ "# Using Kepler's 3rd law:T²=4π²(R^3)/GMm\n",
+ "Mm=(4*pow(Ï€,2)*pow(R,3))/(G*pow(T,2))\n",
+ "\n",
+ "# (ii)\n",
+ "# Using Kepler's 3rd law: Tm²/Te² = (Rms^3/Res^3)\n",
+ "Tm=pow(r,(3/2))*365\n",
+ "\n",
+ "\n",
+ "# Result\n",
+ "\n",
+ "print(\"(i) Mass of Mars =\",Mm,\"kg\")\n",
+ "print(\"(ii) Period of revolution of Mars =\",Tm,\"days\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.6 , page : 195 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mass of the Earth = 5.967906881559221e+24 kg\n",
+ "Mass of the Earth = 6.017752855396305e+24 kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Importing module\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "# Variable declaration\n",
+ "\n",
+ "g=9.81 # Acceleration due to gravity\n",
+ "G=6.67*pow(10,-11) # Gravitational constant\n",
+ "Re=6.37*pow(10,6) # Radius of Earth in m\n",
+ "R=3.84*pow(10,8) # Distance of Moon from Earth in m\n",
+ "T=27.3 # Period of revolution of Moon in days\n",
+ "Ï€=3.14 # Constant pi\n",
+ "\n",
+ "# Calculation\n",
+ "\n",
+ "# I Method\n",
+ "# Using Newton's 2nd law of motion:g = F/m = GMe/Re²\n",
+ "Me1=(g*pow(Re,2))/G\n",
+ "\n",
+ "# II Method\n",
+ "# Using Kepler's 3rd law: T²= 4π²(R^3)/GMe\n",
+ "T1=T*24*60*60\n",
+ "Me2=(4*pow(Ï€,2)*pow(R,3))/(G*pow(T1,2))\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print(\"Mass of the Earth =\",Me1,\"kg\")\n",
+ "print(\"Mass of the Earth =\",Me2,\"kg\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.7 , page : 195 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Period of revolution of Moon = 27.5 days\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Importing module\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "# Variable declaration\n",
+ "\n",
+ "k=pow(10,-13) # A constant = 4π² / GME\n",
+ "Re=3.84*pow(10,5) # Distance of the Moon from the Earth in m\n",
+ "\n",
+ "# Calculation\n",
+ "\n",
+ "k=pow(10,-13)*(pow(1/(24*60*60),2))*(1/pow((1/1000),3))\n",
+ "T2=k*pow(Re,3)\n",
+ "T=math.sqrt(T2) # Period of revolution of Moon in days\n",
+ "\n",
+ "# Result\n",
+ "\n",
+ "print(\"Period of revolution of Moon =\",round(T,1),\"days\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.8 , page : 196 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Change in Kinetic Energy = 3124485000.0 J\n",
+ "Change in Potential Energy = 6248970000.0 J\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Importing module\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "# Variable declaration\n",
+ "\n",
+ "m=400 # Mass of satellite in kg\n",
+ "Re=6.37*pow(10,6) # Radius of Earth in m\n",
+ "g=9.81 # Acceleration due to gravity\n",
+ "\n",
+ "# Calculation\n",
+ "\n",
+ "# Change in energy is E=Ef-Ei\n",
+ "ΔE=(g*m*Re)/8 # Change in Total energy\n",
+ "# Since Potential Energy is twice as the change in Total Energy (V = Vf - Vi)\n",
+ "ΔV=2*ΔE # Change in Potential Energy in J\n",
+ "\n",
+ "# Result\n",
+ "\n",
+ "print(\"Change in Kinetic Energy =\",round(ΔE,4),\"J\")\n",
+ "print(\"Change in Potential Energy =\",round(ΔV,4),\"J\")"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 3",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.4.3"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/sample_notebooks/SINDHUARROJU/Chapter12.ipynb b/sample_notebooks/SINDHUARROJU/Chapter12.ipynb
new file mode 100644
index 00000000..09a71a18
--- /dev/null
+++ b/sample_notebooks/SINDHUARROJU/Chapter12.ipynb
@@ -0,0 +1,665 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#12: Fiber Optics"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.1, Page number 12.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 52,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "acceptance angle is 20.41 degrees\n",
+ "answer in the book varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1=1.54; #Core refractive index\n",
+ "n2=1.50; #Cladding refractive index\n",
+ "\n",
+ "#Calculation\n",
+ "NA=math.sqrt(n1**2-n2**2); #numerical aperture\n",
+ "alpha_m=math.asin(NA); #acceptance angle(radian)\n",
+ "alpha_m=alpha_m*180/math.pi; #acceptance angle(degrees)\n",
+ "\n",
+ "#Result\n",
+ "print \"acceptance angle is\",round(alpha_m,2),\"degrees\"\n",
+ "print \"answer in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.2, Page number 12.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 53,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "numerical aperture is 0.387\n",
+ "acceptance angle is 22.8 degrees\n",
+ "critical angle is 75 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1=1.5; #Core refractive index\n",
+ "n2=1.45; #Cladding refractive index\n",
+ "\n",
+ "#Calculation\n",
+ "delta=(n1-n2)/n1; #fractional index change\n",
+ "NA=n1*math.sqrt(2*delta); #numerical aperture\n",
+ "alpha_m=math.asin(NA); #acceptance angle(radian)\n",
+ "alpha_m=alpha_m*180/math.pi; #acceptance angle(degrees)\n",
+ "thetac=math.asin(n2/n1)*180/math.pi; #critical angle(degrees)\n",
+ "\n",
+ "#Result\n",
+ "print \"numerical aperture is\",round(NA,3)\n",
+ "print \"acceptance angle is\",round(alpha_m,1),\"degrees\"\n",
+ "print \"critical angle is\",int(thetac),\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.3, Page number 12.25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 54,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "critical angle is 77.16 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1=1.53; #Core refractive index\n",
+ "p=2.5; #percentage(%)\n",
+ "\n",
+ "#Calculation\n",
+ "n2=n1*(100-p)/100; #Cladding refractive index\n",
+ "thetac=math.asin(n2/n1)*180/math.pi; #critical angle(degrees)\n",
+ "\n",
+ "#Result\n",
+ "print \"critical angle is\",round(thetac,2),\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.4, Page number 12.25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 55,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "numerical aperture is 0.28\n",
+ "acceptance angle is 16.26 degrees\n",
+ "critical angle is 79.1 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "delta=0.018; #fractional difference\n",
+ "n1=1.50; #Core refractive index\n",
+ "\n",
+ "#Calculation\n",
+ "NA=round(n1*math.sqrt(2*delta),2); #numerical aperture\n",
+ "alpha_m=math.asin(NA); #acceptance angle(radian)\n",
+ "alpha_m=alpha_m*180/math.pi; #acceptance angle(degrees)\n",
+ "n2=n1-(delta*n1); #Cladding refractive index\n",
+ "thetac=math.asin(n2/n1)*180/math.pi; #critical angle(degrees)\n",
+ "\n",
+ "#Result\n",
+ "print \"numerical aperture is\",NA\n",
+ "print \"acceptance angle is\",round(alpha_m,2),\"degrees\"\n",
+ "print \"critical angle is\",round(thetac,1),\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.5, Page number 12.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 56,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "total number of guided modes is 490.0\n",
+ "number of modes of graded index fibre is 245.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d=50*10**-6; #diameter(m)\n",
+ "lamda=1*10**-6; #wavelength(m)\n",
+ "NA=0.2; #numerical aperture\n",
+ "\n",
+ "#Calculation\n",
+ "NSI=4.9*(d*NA/lamda)**2; #total number of guided modes\n",
+ "NGI=NSI/2; #number of modes of graded index fibre\n",
+ "\n",
+ "#Result\n",
+ "print \"total number of guided modes is\",NSI\n",
+ "print \"number of modes of graded index fibre is\",NGI"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.6, Page number 12.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 57,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "numerical aperture is 0.47\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "delta=0.05; #fractional difference\n",
+ "n1=1.5; #Core refractive index\n",
+ "\n",
+ "#Calculation\n",
+ "NA=n1*math.sqrt(2*delta); #numerical aperture\n",
+ "\n",
+ "#Result\n",
+ "print \"numerical aperture is\",round(NA,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.7, Page number 12.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 58,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "number of modes that can be propagated is 1\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d=5*10**-6; #diameter(m)\n",
+ "lamda=1*10**-6; #wavelength(m)\n",
+ "NA=0.092; #numerical aperture\n",
+ "\n",
+ "#Calculation\n",
+ "N=4.9*(d*NA/lamda)**2; #number of modes that can be propagated\n",
+ "\n",
+ "#Result\n",
+ "print \"number of modes that can be propagated is\",int(N)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.8, Page number 12.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 59,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "V number is 94.7\n",
+ "maximum number of modes is 4485.7\n",
+ "answer in the book varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1=1.53; #Core refractive index\n",
+ "n2=1.50; #Cladding refractive index\n",
+ "a=50*10**-6; #radius(m)\n",
+ "lamda=1*10**-6; #wavelength(m)\n",
+ "\n",
+ "#Calculation\n",
+ "NA=math.sqrt(n1**2-n2**2); #numerical aperture\n",
+ "Vn=2*math.pi*a*NA/lamda; #V number\n",
+ "N=Vn**2/2; #maximum number of modes\n",
+ "\n",
+ "#Result\n",
+ "print \"V number is\",round(Vn,1)\n",
+ "print \"maximum number of modes is\",round(N,1)\n",
+ "print \"answer in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.9, Page number 12.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 60,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "number of propagating modes is 49177\n",
+ "answer in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=100*10**-6; #radius(m)\n",
+ "lamda=0.85*10**-6; #wavelength(m)\n",
+ "NA=0.3; #numerical aperture\n",
+ "\n",
+ "#Calculation\n",
+ "N=4*math.pi**2*a**2*NA**2/lamda**2; #number of propagating modes\n",
+ "\n",
+ "#Result\n",
+ "print \"number of propagating modes is\",int(N)\n",
+ "print \"answer in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.10, Page number 12.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 61,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Core refractive index is 1.6025\n",
+ "acceptance angle is 8.638 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "NA=0.2; #numerical aperture\n",
+ "n2=1.59; #Cladding refractive index\n",
+ "n0=1.33; #refractive index\n",
+ "\n",
+ "#Calculation\n",
+ "n1=round(math.sqrt(NA**2+n2**2),4); #Core refractive index\n",
+ "NA1=math.sqrt(n1**2-n2**2)/n0; #numerical aperture\n",
+ "alpha_m=math.asin(NA1); #acceptance angle(radian)\n",
+ "alpha_m=alpha_m*180/math.pi; #acceptance angle(degrees)\n",
+ "\n",
+ "#Result\n",
+ "print \"Core refractive index is\",n1\n",
+ "print \"acceptance angle is\",round(alpha_m,3),\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.11, Page number 12.29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 62,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "number of photons is 13.675 *10**15\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c=3*10**8; #velocity of light(m/sec)\n",
+ "h=6.63*10**-34; #plank's constant(Js)\n",
+ "lamda=680*10**-9; #wavelength(m)\n",
+ "P=4*10**-3; #power(W)\n",
+ "\n",
+ "#Calculation\n",
+ "delta_E=c*h/lamda; #energy(J)\n",
+ "N=P/delta_E; #number of photons\n",
+ "\n",
+ "#Result\n",
+ "print \"number of photons is\",round(N/10**15,3),\"*10**15\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.12, Page number 12.29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 64,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Cladding refractive index is 1.49925\n",
+ "numerical aperture is 0.0474\n",
+ "critical angle is 88.2 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "delta=0.0005; #fractional difference\n",
+ "n1=1.5; #Core refractive index\n",
+ "\n",
+ "#Calculation\n",
+ "n2=n1-(delta*n1); #Cladding refractive index\n",
+ "NA=n1*math.sqrt(2*delta); #numerical aperture\n",
+ "thetac=math.asin(n2/n1)*180/math.pi; #critical angle(degrees)\n",
+ "\n",
+ "#Result\n",
+ "print \"Cladding refractive index is\",n2\n",
+ "print \"numerical aperture is\",round(NA,4)\n",
+ "print \"critical angle is\",round(thetac,1),\"degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.13, Page number 12.29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 65,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "fraction of initial intensity after 2km is 0.363\n",
+ "fraction of initial intensity after 5km is 0.048\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "alpha=2.2; #attenuation coefficient(dB/km)\n",
+ "L1=2; #distance(km)\n",
+ "L2=6; #distance(km)\n",
+ "\n",
+ "#Calculation\n",
+ "x1=-alpha*L1/10; \n",
+ "x2=-alpha*L2/10;\n",
+ "P1=10**x1; #fraction of initial intensity after 2km\n",
+ "P2=10**x2; #fraction of initial intensity after 5km\n",
+ "\n",
+ "#Result\n",
+ "print \"fraction of initial intensity after 2km is\",round(P1,3)\n",
+ "print \"fraction of initial intensity after 5km is\",round(P2,3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.14, Page number 12.30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 66,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "attenuation coefficient is 1.41 dB/km\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "L=0.5; #distance(km)\n",
+ "Pout=1; #output power(W)\n",
+ "Pin=85/100; #input power(W)\n",
+ "\n",
+ "#Calculation\n",
+ "alpha=10*math.log10(Pout/Pin)/L; #attenuation coefficient(dB/km)\n",
+ "\n",
+ "#Result\n",
+ "print \"attenuation coefficient is\",round(alpha,2),\"dB/km\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 12.15, Page number 12.30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 67,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "attenuation coefficient is 1.7 dB/km\n",
+ "overall signal attenuation is 17 dB\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "L=10; #distance(km)\n",
+ "Pout=2; #output power(W)\n",
+ "Pin=100; #input power(W)\n",
+ "\n",
+ "#Calculation\n",
+ "alpha=10*math.log10(Pin/Pout)/L; #attenuation coefficient(dB/km)\n",
+ "o_alpha=round(alpha,1)*L; #overall signal attenuation\n",
+ "\n",
+ "#Result\n",
+ "print \"attenuation coefficient is\",round(alpha,1),\"dB/km\"\n",
+ "print \"overall signal attenuation is\",int(o_alpha),\"dB\""
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/sample_notebooks/SPANDANAARROJU/Chapter11.ipynb b/sample_notebooks/SPANDANAARROJU/Chapter11.ipynb
new file mode 100644
index 00000000..d0036604
--- /dev/null
+++ b/sample_notebooks/SPANDANAARROJU/Chapter11.ipynb
@@ -0,0 +1,608 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#11: Lasers"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.1, Page number 11.55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "intensity of laser beam is 1.5 *10**4 watt/m**2\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "P=20*10**-3; #power(watt)\n",
+ "r=1.3/2; #radius(mm)\n",
+ "\n",
+ "#Calculation\n",
+ "r=r*10**-3; #radius(m)\n",
+ "I=P/(math.pi*r**2); #intensity of laser beam(watt/m**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"intensity of laser beam is\",round(I/10**4,1),\"*10**4 watt/m**2\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.2, Page number 11.56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "mode seperation in frequency is 2.5 *10**8 Hz\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c=3*10**8; #velocity of light(m/sec)\n",
+ "L=0.6; #distance(m)\n",
+ "\n",
+ "#Calculation\n",
+ "delta_v=c/(2*L); #mode seperation in frequency(Hz)\n",
+ "\n",
+ "#Result\n",
+ "print \"mode seperation in frequency is\",delta_v/10**8,\"*10**8 Hz\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.3, Page number 11.56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "coherence length is 1.5 *10**-2 m\n",
+ "band width is 2.0 *10**10 Hz\n",
+ "line width is 0.026 nm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c=3*10**8; #velocity of light(m/sec)\n",
+ "delta_t=0.05*10**-9; #time(s)\n",
+ "lamda=623.8*10**-9; #wavelength(m)\n",
+ "\n",
+ "#Calculation\n",
+ "cl=c*delta_t; #coherence length(m)\n",
+ "delta_v=1/delta_t; #band width(Hz)\n",
+ "delta_lamda=lamda**2*delta_v/c; #line width(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"coherence length is\",cl*10**2,\"*10**-2 m\"\n",
+ "print \"band width is\",delta_v/10**10,\"*10**10 Hz\"\n",
+ "print \"line width is\",round(delta_lamda*10**9,3),\"nm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.4, Page number 11.56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "energy difference is 1.96 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c=3*10**8; #velocity of light(m/sec)\n",
+ "h=6.63*10**-34; #plank's constant(Js)\n",
+ "lamda=632.8*10**-9; #wavelength(m)\n",
+ "e=1.6*10**-19; #charge(coulomb)\n",
+ "\n",
+ "#Calculation\n",
+ "E=c*h/(lamda*e); #energy difference(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"energy difference is\",round(E,2),\"eV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.5, Page number 11.57"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio of population is 8.95 *10**-32\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c=3*10**8; #velocity of light(m/sec)\n",
+ "h=6.63*10**-34; #plank's constant(Js)\n",
+ "lamda=6928*10**-10; #wavelength(m)\n",
+ "Kb=1.38*10**-23; #boltzmann constant(J/K)\n",
+ "T=291; #temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "delta_E=c*h/lamda;\n",
+ "N=math.exp(-delta_E/(Kb*T)); #ratio of population\n",
+ "\n",
+ "#Result\n",
+ "print \"ratio of population is\",round(N*10**32,2),\"*10**-32\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.6, Page number 11.57"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "wavelength is 632 *10**-9 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Kb=1.38*10**-23; #boltzmann constant(J/K)\n",
+ "T=330; #temperature(K)\n",
+ "delta_E=3.147*10**-19; #energy(J)\n",
+ "c=3*10**8; #velocity of light(m/sec)\n",
+ "h=6.63*10**-34; #plank's constant(Js)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=c*h/delta_E; #wavelength(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength is\",int(lamda*10**9),\"*10**-9 m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.7, Page number 11.58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "laser beam divergence is 0.5 *10**-3 radian\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r1=2*10**-3; #radius(m)\n",
+ "r2=3*10**-3; #radius(m)\n",
+ "d1=2; #distance(m)\n",
+ "d2=4; #distance(m)\n",
+ "\n",
+ "#Calculation\n",
+ "delta_theta=(r2-r1)/(d2-d1); #laser beam divergence(radian)\n",
+ "\n",
+ "#Result\n",
+ "print \"laser beam divergence is\",delta_theta*10**3,\"*10**-3 radian\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.8, Page number 11.58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio of population is 1.127 *10**30\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c=3*10**8; #velocity of light(m/sec)\n",
+ "h=6.63*10**-34; #plank's constant(Js)\n",
+ "lamda=6943*10**-10; #wavelength(m)\n",
+ "Kb=1.38*10**-23; #boltzmann constant(J/K)\n",
+ "T=300; #temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "new=c/lamda;\n",
+ "N=math.exp(h*new/(Kb*T)); #ratio of population\n",
+ "\n",
+ "#Result\n",
+ "print \"ratio of population is\",round(N*10**-30,3),\"*10**30\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.9, Page number 11.58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "wavelength is 8632.8 angstrom\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c=3*10**8; #velocity of light(m/sec)\n",
+ "h=6.63*10**-34; #plank's constant(Js)\n",
+ "Eg=1.44*1.6*10**-19; #band gap(J)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda=c*h/Eg; #wavelength(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength is\",round(lamda*10**10,1),\"angstrom\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.10, Page number 11.59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "energy gap is 0.8 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda=1.55; #wavelength(micro m)\n",
+ "\n",
+ "#Calculation\n",
+ "Eg=1.24/lamda; #energy gap(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"energy gap is\",Eg,\"eV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.11, Page number 11.59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "coherence length is 12 *10**3 m\n",
+ "spectral half width is 4.56 *10**-17 m\n",
+ "purity factor is 1.6 *10**10\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c=3*10**8; #velocity of light(m/sec)\n",
+ "tow=4*10**-5; #time(sec)\n",
+ "lamda=740*10**-9; #wavelength(m)\n",
+ "\n",
+ "#Calculation\n",
+ "L=tow*c; #coherence length(m)\n",
+ "delta_lamda=lamda**2/L; #spectral half width(m)\n",
+ "Q=lamda/delta_lamda; #purity factor\n",
+ "\n",
+ "#Result\n",
+ "print \"coherence length is\",int(L/10**3),\"*10**3 m\"\n",
+ "print \"spectral half width is\",round(delta_lamda*10**17,2),\"*10**-17 m\"\n",
+ "print \"purity factor is\",round(Q/10**10,1),\"*10**10\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.12, Page number 11.59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio of emissions is 8.4 *10**4\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "new=5.9*10**14; #frequency(Hz)\n",
+ "h=6.63*10**-34; #plank's constant(Js)\n",
+ "Kb=1.38*10**-23; #boltzmann constant(J/K)\n",
+ "T=2500; #temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "R=math.exp(h*new/(Kb*T))-1; #ratio of emissions\n",
+ "\n",
+ "#Result\n",
+ "print \"ratio of emissions is\",round(R/10**4,1),\"*10**4\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.13, Page number 11.60"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "beam divergence is 1.02 *10**-4 radian\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda=1.06*10**-6; #wavelength(m)\n",
+ "d=2.54*10**-2; #distance(m)\n",
+ "\n",
+ "#Calculation\n",
+ "theta=2.44*lamda/d; #beam divergence(radian)\n",
+ "\n",
+ "#Result\n",
+ "print \"beam divergence is\",round(theta*10**4,2),\"*10**-4 radian\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 11.14, Page number 11.60"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "number of photons/minute is 4.39 *10**17\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "P=2.3*10**-3; #power(W)\n",
+ "c=3*10**8; #velocity of light(m/sec)\n",
+ "h=6.63*10**-34; #plank's constant(Js)\n",
+ "lamda=6328*10**-10; #wavelength(m)\n",
+ "\n",
+ "#Calculation\n",
+ "n=P*lamda*60/(c*h); #number of photons/min\n",
+ "\n",
+ "#Result\n",
+ "print \"number of photons/minute is\",round(n/10**17,2),\"*10**17\""
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/sample_notebooks/SundeepKatta/Chapter2.ipynb b/sample_notebooks/SundeepKatta/Chapter2.ipynb
new file mode 100644
index 00000000..601cae27
--- /dev/null
+++ b/sample_notebooks/SundeepKatta/Chapter2.ipynb
@@ -0,0 +1,441 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#2: Crystal Structures"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.1, Page number 2.23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "lattice constant is 4.0 *10**-10 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "M=60.2; #molecular weight\n",
+ "Na=6.023*10**26; #avagadro number(kg/mole)\n",
+ "n=4; \n",
+ "rho=6250; #density(kg/m**3)\n",
+ "\n",
+ "#Calculation\n",
+ "a=(n*M/(rho*Na))**(1/3); #lattice constant(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"lattice constant is\",round(a*10**10),\"*10**-10 m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.2, Page number 2.23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "density is 8.93 gm/cm**3\n",
+ "answer in the book varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "M=63.5; #molecular weight\n",
+ "Na=6.023*10**26; #avagadro number(kg/mole)\n",
+ "n=4; \n",
+ "r=1.278*10**-8; #atomic radius(cm)\n",
+ "\n",
+ "#Calculation\n",
+ "a=2*math.sqrt(2)*r; #lattice constant(m)\n",
+ "rho=n*M/(a**3*Na); #density(kg/cm**3)\n",
+ "\n",
+ "#Result\n",
+ "print \"density is\",round(rho*10**3,2),\"gm/cm**3\"\n",
+ "print \"answer in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.3, Page number 2.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio of densities is 0.92\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "pf_BCC=math.pi*math.sqrt(3)/8; #packing factor for BCC\n",
+ "pf_FCC=math.pi/(3*math.sqrt(2)); #packing factor of FCC\n",
+ "\n",
+ "#Calculation\n",
+ "r=pf_BCC/pf_FCC; #ratio of densities\n",
+ "\n",
+ "#Result\n",
+ "print \"ratio of densities is\",round(r,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.4, Page number 2.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "lattice constant is 2.8687 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "M=55.85; #molecular weight\n",
+ "Na=6.02*10**26; #avagadro number(kg/mole)\n",
+ "n=2; \n",
+ "rho=7860; #density(kg/m**3)\n",
+ "\n",
+ "#Calculation\n",
+ "a=(n*M/(rho*Na))**(1/3); #lattice constant(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"lattice constant is\",round(a*10**10,4),\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.5, Page number 2.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "lattice constant is 5.6 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "M=58.5; #molecular weight\n",
+ "Na=6.02*10**26; #avagadro number(kg/mole)\n",
+ "n=4; \n",
+ "rho=2189; #density(kg/m**3)\n",
+ "\n",
+ "#Calculation\n",
+ "a=(n*M/(rho*Na))**(1/3); #lattice constant(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"lattice constant is\",round(a*10**10,1),\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.6, Page number 2.25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "lattice constant is 3.517 angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "M=6.94; #molecular weight\n",
+ "Na=6.02*10**26; #avagadro number(kg/mole)\n",
+ "n=2; \n",
+ "rho=530; #density(kg/m**3)\n",
+ "\n",
+ "#Calculation\n",
+ "a=(n*M/(rho*Na))**(1/3); #lattice constant(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"lattice constant is\",round(a*10**10,3),\"angstrom\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.7, Page number 2.25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "percent volume change is 0.493 %\n",
+ "answer in the book varies due to rounding off errors\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r1=1.258*10**-10; #radius(m)\n",
+ "r2=1.292*10**-10; #radius(m)\n",
+ "\n",
+ "#Calculation\n",
+ "a_bcc=4*r1/math.sqrt(3);\n",
+ "v=a_bcc**3;\n",
+ "V1=v/2;\n",
+ "a_fcc=2*math.sqrt(2)*r2;\n",
+ "V2=a_fcc**3/4;\n",
+ "V=(V1-V2)*100/V1; #percent volume change is\",V,\"%\"\n",
+ "\n",
+ "#Result\n",
+ "print \"percent volume change is\",round(V,3),\"%\"\n",
+ "print \"answer in the book varies due to rounding off errors\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.8, Page number 2.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "number of atoms/m**3 is 1.77 *10**29\n",
+ "density of diamond is 3534.47 kg/m**3\n",
+ "answer in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=0.356*10**-9; #cube edge(m)\n",
+ "w=12; #atomic weight\n",
+ "Na=6.02*10**26; #avagadro number(kg/mole)\n",
+ "\n",
+ "#Calculation\n",
+ "n=8/(a**3); #number of atoms/m**3\n",
+ "m=w/Na; #mass(kg)\n",
+ "rho=m*n; #density of diamond(kg/m**3)\n",
+ "\n",
+ "#Result\n",
+ "print \"number of atoms/m**3 is\",round(n/10**29,2),\"*10**29\"\n",
+ "print \"density of diamond is\",round(rho,2),\"kg/m**3\"\n",
+ "print \"answer in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.9, Page number 2.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "maximum radius of sphere is 0.414 r\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "from sympy import *\n",
+ "\n",
+ "#Variable declaration\n",
+ "r=Symbol('r')\n",
+ "\n",
+ "#Calculation\n",
+ "a=4*r/math.sqrt(2);\n",
+ "R=(4*r/(2*math.sqrt(2)))-r; #maximum radius of sphere\n",
+ "\n",
+ "#Result\n",
+ "print \"maximum radius of sphere is\",round(R/r,3),\"r\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 2.10, Page number 2.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 35,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "radius of largest sphere is 0.155 r\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "from sympy import *\n",
+ "\n",
+ "#Variable declaration\n",
+ "r=Symbol('r')\n",
+ "\n",
+ "#Calculation\n",
+ "a=4*r/math.sqrt(3);\n",
+ "R=(a/2)-r; #radius of largest sphere\n",
+ "\n",
+ "#Result\n",
+ "print \"radius of largest sphere is\",round(R/r,3),\"r\""
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}