diff options
author | Thomas Stephen Lee | 2015-08-28 16:53:23 +0530 |
---|---|---|
committer | Thomas Stephen Lee | 2015-08-28 16:53:23 +0530 |
commit | 4a1f703f1c1808d390ebf80e80659fe161f69fab (patch) | |
tree | 31b43ae8895599f2d13cf19395d84164463615d9 /sample_notebooks | |
parent | 9d260e6fae7328d816a514130b691fbd0e9ef81d (diff) | |
download | Python-Textbook-Companions-4a1f703f1c1808d390ebf80e80659fe161f69fab.tar.gz Python-Textbook-Companions-4a1f703f1c1808d390ebf80e80659fe161f69fab.tar.bz2 Python-Textbook-Companions-4a1f703f1c1808d390ebf80e80659fe161f69fab.zip |
add books
Diffstat (limited to 'sample_notebooks')
81 files changed, 32676 insertions, 0 deletions
diff --git a/sample_notebooks/ABHISHEKAGRAWAL/chapter2.ipynb b/sample_notebooks/ABHISHEKAGRAWAL/chapter2.ipynb new file mode 100644 index 00000000..1bfa373e --- /dev/null +++ b/sample_notebooks/ABHISHEKAGRAWAL/chapter2.ipynb @@ -0,0 +1,149 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:41187fe2c381fd7b42e97b2fb4a9a8ffca57cedad7f414bab15784b2fa882a72"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter2:ELECTROMAGNETIC PLANE WAVES"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2.6.5:pg-69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ " \n",
+ "import math \n",
+ "#(a) Program to find gold-film surface resistance \n",
+ " \n",
+ " \n",
+ "t=80*(10**(-10)) #Film Thickness\n",
+ "o=4.1*(10**7) #Bulk conductivity \n",
+ "p=570*(10**(-10)) #Electron mean free path \n",
+ "of=((3*t*o)/(4*p))*(0.4228 + math.log(p/t)) #the gold-film conductivity is of=(3*t*o/4*p)*(0.4228 + ln(p/t)) \n",
+ "\n",
+ "Rs=1/(t*of) #the gold-film surface resistance is given by Rs=1/(t*of) in Ohms per square\n",
+ "\n",
+ "\n",
+ "print\"The gold film surface resistance in Ohms per square is=\",round(Rs,2),\"Ohms/square\"\n",
+ "\n",
+ "\n",
+ "#(b) Program to find the microwave attenuation \n",
+ "\n",
+ "Attenuation=40-20*log10(Rs) #Microwave attenuation \n",
+ "\n",
+ "print\"Microwave Attenuation in db is=\",int(Attenuation),\"db\"\n",
+ "\n",
+ "\n",
+ "#(c)Light transmittance T\n",
+ "\n",
+ "print\"From figure No.2-6-5 of Light transmittance T and light attenuation loss L versus wavelength with film thickness t as parameter for gold film, we find that for given gold film of thickness 80 angstrom ,the LIGHT TRANSMITTANCE T is estimated to be 75%\"\n",
+ "\n",
+ "\n",
+ "#(d)light reflection loss R\n",
+ "\n",
+ "print\"From the same figure the LIGHT REFLECTION LOSS R is about 25%\"\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The gold film surface resistance in Ohms per square is= 12.14 Ohms/square\n",
+ "Microwave Attenuation in db is= 18 db\n",
+ "From figure No.2-6-5 of Light transmittance T and light attenuation loss L versus wavelength with film thickness t as parameter for gold film, we find that for given gold film of thickness 80 angstrom ,the LIGHT TRANSMITTANCE T is estimated to be 75%\n",
+ "From the same figure the LIGHT REFLECTION LOSS R is about 25%\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2.6.6:pg-74"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "import math \n",
+ "#(a) Program to find copper-film surface resistance \n",
+ " \n",
+ " \n",
+ "t=60*(10**(-10)) #Film Thickness\n",
+ "o=5.8*(10**7) #Bulk conductivity \n",
+ "p=420*(10**(-10)) #Electron mean free path \n",
+ "of=((3*t*o)/(4*p))*(0.4228 + math.log(p/t)) #the copper-film conductivity is of=(3*t*o/4*p)*(0.4228 + ln(p/t))\n",
+ "Rs=1/(t*of) #the copper-film surface resistance is given by Rs=1/(t*of) in Ohms per square\n",
+ "\n",
+ "print\"The copper-film surface resistance in Ohms per square is=\",round(Rs,2),\"Ohms/square\"\n",
+ "\n",
+ "\n",
+ "#(b) Program to find the microwave attenuation \n",
+ "\n",
+ "Attenuation=40-20*log10(Rs) #Microwave attenuation \n",
+ "\n",
+ "print\"Microwave Attenuation in db is=\",int(round(Attenuation)),\"db\"\n",
+ "\n",
+ "#(c)Light transmittance T\n",
+ "\n",
+ "print\"From figure No.2-6-11 of Light transmittance T and light attenuation loss L versus wavelength with film thickness t as parameter for copper film, we find that for given copper film of thickness 60 angstrom ,the LIGHT TRANSMITTANCE T is estimated to be 82%\"\n",
+ "\n",
+ "#(d)light reflection loss R\n",
+ "\n",
+ "print\"From the same figure the LIGHT REFLECTION LOSS R is about 18%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The copper-film surface resistance in Ohms per square is= 11.32 Ohms/square\n",
+ "Microwave Attenuation in db is= 19 db\n",
+ "From figure No.2-6-11 of Light transmittance T and light attenuation loss L versus wavelength with film thickness t as parameter for copper film, we find that for given copper film of thickness 60 angstrom ,the LIGHT TRANSMITTANCE T is estimated to be 82%\n",
+ "From the same figure the LIGHT REFLECTION LOSS R is about 18%\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/sample_notebooks/AdityaAnand/Chapter_8.ipynb b/sample_notebooks/AdityaAnand/Chapter_8.ipynb new file mode 100644 index 00000000..cbd1971a --- /dev/null +++ b/sample_notebooks/AdityaAnand/Chapter_8.ipynb @@ -0,0 +1,390 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "###Example 8.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 37,
+ "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 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 38,
+ "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"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 33,
+ "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 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 36,
+ "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"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "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 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "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 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "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/AdityaAnand/Chapter_8_-_Gravitation.ipynb b/sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation.ipynb new file mode 100644 index 00000000..c08a4250 --- /dev/null +++ b/sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation.ipynb @@ -0,0 +1,390 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.2 , page : 187"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 37,
+ "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": 38,
+ "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": 33,
+ "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": 36,
+ "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": 17,
+ "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": 9,
+ "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": 1,
+ "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/AdityaAnand/Chapter_8_-_Gravitation_1.ipynb b/sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation_1.ipynb new file mode 100644 index 00000000..c08a4250 --- /dev/null +++ b/sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation_1.ipynb @@ -0,0 +1,390 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.2 , page : 187"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 37,
+ "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": 38,
+ "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": 33,
+ "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": 36,
+ "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": 17,
+ "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": 9,
+ "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": 1,
+ "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/AjayKumar Verma/chapter4.ipynb b/sample_notebooks/AjayKumar Verma/chapter4.ipynb new file mode 100644 index 00000000..408746a4 --- /dev/null +++ b/sample_notebooks/AjayKumar Verma/chapter4.ipynb @@ -0,0 +1,413 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c80be9ee73d5adb979ad6bf2343ea3cff1243505e35fc82560bd445f960931b7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter4 - Signal Degradation in fibers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3.1, page 4-4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import sqrt, pi, log10\n", + "L=10 #fiber length in km\n", + "Pin=150*10**-6 #input power\n", + "Pout=5*10**-6 #output power\n", + "ln=20 #length of optical link\n", + "interval=1 #splices after interval of 1 km\n", + "l=1.2 #loss due to 1 splice\n", + "attenuation=10*log10(Pin/Pout) \n", + "alpha=attenuation/L \n", + "attenuation_loss=alpha*20 \n", + "splices_loss=(ln-interval)*l \n", + "total_loss=attenuation_loss+splices_loss \n", + "power_ratio=10**(total_loss/10) \n", + "print \"Signal attenuation is %.2f dBs.\\nSignal attenuation is %.3f dB/Km.\\nTotal loss in 20 Km fiber is %.2f dbs.\\nTotal attenuation is %.2f dBs.\\ninput/output ratio is %0.e.\" %(attenuation,alpha,attenuation_loss,total_loss,power_ratio) \n", + "# Answer wrong for last part." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Signal attenuation is 14.77 dBs.\n", + "Signal attenuation is 1.477 dB/Km.\n", + "Total loss in 20 Km fiber is 29.54 dbs.\n", + "Total attenuation is 52.34 dBs.\n", + "input/output ratio is 2e+05.\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6.1, page 4-12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import exp\n", + "beta_c=8*10**-11 #isothermal compressibility\n", + "n=1.46 #refractive index\n", + "P=0.286 #photoelastic constat\n", + "k=1.38*10**-23 #Boltzmnn constant\n", + "T=1500 #temperature\n", + "L=1000 #length\n", + "lamda=1000*10**-9 #wavelength\n", + "gamma_r = 8*(3.14**3)*(P**2)*(n**8)*beta_c*k*T/(3*(lamda**4)) #computing coefficient\n", + "attenuation=exp(-gamma_r*L) #computing attenuation\n", + "print \"Attenuation due to Rayleigh scattering is %.3f.\" %(attenuation) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Attenuation due to Rayleigh scattering is 0.794.\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6.2, page 4-12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "beta_c=7*10**-11 #isothermal compressibility\n", + "n=1.46 #refractive index\n", + "P=0.29 #photoelastic constat\n", + "k=1.38*10**-23 #Boltzmnn constant\n", + "T=1400 #temperature\n", + "L=1000 #length\n", + "lamda=0.7*10**-6 #wavelength\n", + "gamma_r = 8*(3.14**3)*(P**2)*(n**8)*beta_c*k*T/(3*(lamda**4)) #computing coefficient\n", + "attenuation=exp(-gamma_r*L) #computing attenuation\n", + "gamma_r=gamma_r\n", + "print \"Raleigh Scattering corfficient is %.3e per meter\" %(gamma_r) \n", + "#Attenuation is not calcualted in textbook\"\n", + "print \"Attenuation due to Rayleigh scattering is %.3f\" %(attenuation) \n", + "#answer for Raleigh Scattering corfficient in the book is given as 0.804d-3, deviation of 0.003d-3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Raleigh Scattering corfficient is 8.074e-04 per meter\n", + "Attenuation due to Rayleigh scattering is 0.446\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7.1, page 4-17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "d=5 #core diameter\n", + "alpha=0.4 #attenuation\n", + "B=0.5 #Bandwidth\n", + "lamda=1.4 #wavelength\n", + "PB=4.4*10**-3*d**2*lamda**2*alpha*B #computing threshold power for SBS\n", + "PR=5.9*10**-2*d**2*lamda*alpha #computing threshold power for SRS\n", + "PB=PB*10**3 \n", + "PR=PR*10**3 \n", + "print \"Threshold power for SBS is %.1f mW.\\nThreshold power for SRS is %.3f mW.\" %(PB,PR) \n", + "#NOTE - Calculation error in the book while calculating threshold for SBS.\n", + "#Also, while calculating SRS, formula is taken incorrectly, \n", + "#Bandwidth is multiplied in second step, which is not in the formula.\") " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Threshold power for SBS is 43.1 mW.\n", + "Threshold power for SRS is 826.000 mW.\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8.1, page 4-18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "n1=1.5 #refractive index of core\n", + "delta=0.03/100 #relative refractive index\n", + "lamda=0.82*10**-6 #wavelength\n", + "n2=sqrt(n1**2-2*delta*n1**2) #computing cladding refractive index\n", + "Rc=(3*n1**2*lamda)/(4*3.14*(n1**2-n2**2)**1.5) #computing critical radius\n", + "Rc=Rc*10**3 \n", + "print \"Critical radius is %.f micrometer.\" %(Rc) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical radius is 9 micrometer.\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8.2, page 4-20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "n1=1.45 #refractive index of core\n", + "delta=3.0/100 #relative refractive index\n", + "lamda=1.5*10**-6 #wavelength\n", + "a=5*10**-6 #core radius\n", + "n2=sqrt(n1**2-2*delta*n1**2) #computing cladding refractive index\n", + "Rc=(3*n1**2*lamda)/(4*3.14*(n1**2-n2**2)**0.5) #computing critical radius for single mode\n", + "Rc=Rc*10**6 \n", + "print \"Critical radius is %.2f micrometer\" %(Rc) \n", + "lamda_cut_off= 2*3.14*a*n1*sqrt(2*delta)/2.405 \n", + "RcSM= (20*lamda/(n1-n2)**1.5)*(2.748-0.996*lamda/lamda_cut_off)**-3 #computing critical radius for single mode\n", + "RcSM=RcSM*10**6 \n", + "print \"Critical radius for single mode fiber is %.2f micrometer.\" %(RcSM) \n", + "#Calculation error in the book.(2.748-0.996*lamda/lamda_cut_off)**-3 in this term raised to -3 is not taken in the book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical radius is 2.12 micrometer\n", + "Critical radius for single mode fiber is 226.37 micrometer.\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.13.1, page 4-28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "lamda=1550*10**-9 \n", + "lamda0=1.3*10**-6 \n", + "s0=0.095 \n", + "Dt=lamda*s0/4*(1-(lamda0/lamda)**4) #computing material dispersion\n", + "Dt=Dt*10**9 \n", + "print \"Material dispersion at 1550 nm is %.1f ps/nm/km\" %Dt\n", + "#answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Material dispersion at 1550 nm is 18.6 ps/nm/km\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.14.1, page 4-33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "tau=0.1*10**-6 #pulse broadning\n", + "dist=20*10**3 #distance\n", + "Bopt=1/(2*tau) #computing optical bandwidth\n", + "Bopt=Bopt*10**-6 \n", + "dispertion=tau/dist #computing dispersion\n", + "dispertion=dispertion*10**12 \n", + "BLP=Bopt*dist #computing Bandwidth length product\n", + "BLP=BLP*10**-3 \n", + "print \"optical bandwidth is %d MHz.\\nDispersion per unit length is %d ns/km.\\nBandwidth length product is %d MHz.km.\" %(Bopt,dispertion,BLP) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "optical bandwidth is 5 MHz.\n", + "Dispersion per unit length is 5 ns/km.\n", + "Bandwidth length product is 100 MHz.km.\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15.1, page 4-34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "RSW=0.0012 #relative spectral width\n", + "lamda=0.90*10**-6 #wavelength\n", + "L=1 #distance in km (assumed)\n", + "P=0.025 #material dispersion parameter\n", + "c=3*10**5 #speed of light in km/s\n", + "M=10**3*P/(c*lamda) #computing material dispersion\n", + "sigma_lamda=RSW*lamda \n", + "sigmaM=sigma_lamda*L*M*10**7 #computing RMS pulse broadning\n", + "sigmaB=25*L*M*10**-3 \n", + "print \"Material dispersion parameter is %.2f ps/nm/km.\\nRMS pulsr broadning when sigma_lamda is 25 is %.1f ns/km.\\nRMS pulse broadning is %.2f ns/km.\" %(M,sigmaB,sigmaM) \n", + "#answer in the book for RMS pulse broadning is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Material dispersion parameter is 92.59 ps/nm/km.\n", + "RMS pulsr broadning when sigma_lamda is 25 is 2.3 ns/km.\n", + "RMS pulse broadning is 1.00 ns/km.\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.17.1, page 4-37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "L=10 #length of optical link\n", + "n1=1.49 #refractive index\n", + "c=3*10**8 #speed of light\n", + "delta=1.0/100 #relative refractive index\n", + "delTS=L*n1*delta/c #computing delay difference\n", + "delTS=delTS*10**12 \n", + "sigmaS=L*n1*delta/(2*sqrt(3)*c) #computing rms pulse broadning\n", + "sigmaS=sigmaS*10**12 \n", + "B=1/(2*delTS) #computing maximum bit rate\n", + "B=B*10**3 \n", + "B_acc=0.2/(sigmaS) #computing accurate bit rate\n", + "B_acc=B_acc*10**3 \n", + "BLP=B_acc*L #computing Bandwidth length product\n", + "print \"Delay difference is %d ns.\\nRMS pulse broadning is %.1f ns.\\nBit rate is %.1f Mbit/s.\\nAccurate bit rate is %.3f Mbits/s.\\nBandwidth length product is %.1f MHz.km\" %(delTS,sigmaS,B,B_acc,BLP) \n", + "#answer for maximum bit rate is given as 1.008 Mb/s, deviation of 0.008 Mb/s." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Delay difference is 496 ns.\n", + "RMS pulse broadning is 143.4 ns.\n", + "Bit rate is 1.0 Mbit/s.\n", + "Accurate bit rate is 1.395 Mbits/s.\n", + "Bandwidth length product is 13.9 MHz.km\n" + ] + } + ], + "prompt_number": 31 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/AjaySatish/Sample_H.S._Fogler.ipynb b/sample_notebooks/AjaySatish/Sample_H.S._Fogler.ipynb new file mode 100755 index 00000000..51134ef9 --- /dev/null +++ b/sample_notebooks/AjaySatish/Sample_H.S._Fogler.ipynb @@ -0,0 +1,231 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:ef32575f9668e7c75384fec9d19e3d17f6260e600de2d26c9157520e2a39253b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "ELEMENTS OF CHEMICAL ENGINEERING BY H.S. FOGLER" + ] + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER NUMBER 1 : MOLE BALANCES" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.3" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "k = 0.23; #min**-1\n", + "v0 = 10;#dm**3/min\n", + "#CA = 0.1*CA0;\n", + "V = (v0/k)*math.log(1/0.1);\n", + "print \"V =\",round(V,4),\"dm**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V = 100.1124 dm**3\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "CHAPTER NUMBER 2 : CONVERSION AND REACTOR SIZING" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.1" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math\n", + " \n", + "P0 = 10; #atm\n", + "yA0 = 0.5;\n", + "T0 = 422.2;#K\n", + "R = 0.082;# dm**3.atm/mol.K\n", + "v0 = 6;#dm**3/s\n", + "CA0=(yA0*P0)/(R*T0);\n", + "FA0 = CA0*v0;\n", + "print \"CA0 =\",round(CA0,4),\"mol/dm**3\"\n", + "print \"FA0 =\",round(FA0,4),\"mol/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "CA0 = 0.1444 mol/dm**3\n", + "FA0 = 0.8665 mol/s\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.2" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "P0 = 10; #atm\n", + "yA0 = 0.5;\n", + "T0 = 422.2;#K\n", + "R = 0.082;# dm**3.atm/mol.K\n", + "v0 = 6;#dm**3/s\n", + "X = 0.8;\n", + "rA = -1/800;#1/-rA = 800#dm**3.s/mol\n", + "CA0=(yA0*P0)/(R*T0);\n", + "FA0 = CA0*v0;\n", + "V = FA0*X*(1/-rA)\n", + "print \"FA0 =\",round(FA0,4),\"mol/s\"\n", + "print \"V =\",round(V,4),\"dm**3\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "FA0 = 0.8665 mol/s\n", + "V = 0.6932 dm**3\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.3" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " \n", + "P0 = 10; #atm\n", + "yA0 = 0.5;\n", + "T0 = 422.2;#K\n", + "R = 0.082;# dm**3.atm/mol.K\n", + "v0 = 6;#dm**3/s\n", + "X = [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8];\n", + "p = [189,192,200,222,250,303,400,556,800];#1/-rA = 800#dm**3.s/mols\n", + "CA0=(yA0*P0)/(R*T0);\n", + "FA0 = CA0*v0;\n", + "#V = FA0*X*(1/-rA)\n", + "\n", + "V = FA0*np.interp(0.42,X,p)\n", + "print \"FA0 =\",FA0,\"mol/s\"\n", + "print \"V =\",V,\"dm**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "FA0 = 0.866541114487 mol/s\n", + "V = 225.820614435 dm**3\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "FA0 = 5; # mol/s\n", + "rAat=-0.0025;\n", + "X = [0,0.1,0.2,0.3,0.4,0.5,0.6];\n", + "p = [189,192,200,222,250,303,400];#1/-rA = 800#dm**3.s/mols\n", + "\n", + "VCSTR = FA0*X[6]*(1/-rAat);\n", + "VPFR = FA0*np.interp(0.00017,X,p)\n", + "print \"VCSTR =\",VCSTR,\"dm**3\"\n", + "print \"VPFR =\",VPFR,\"dm**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "VCSTR = 1200.0 dm**3\n", + "VPFR = 945.0255 dm**3\n" + ] + } + ], + "prompt_number": 37 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/AjaySatish/Sample_H.S._Fogler_UPDATED.ipynb b/sample_notebooks/AjaySatish/Sample_H.S._Fogler_UPDATED.ipynb new file mode 100755 index 00000000..a2bda001 --- /dev/null +++ b/sample_notebooks/AjaySatish/Sample_H.S._Fogler_UPDATED.ipynb @@ -0,0 +1,231 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:37859c50b0a22beb7e2005b729edef7d0375ee40d0e34f554e83e84af89eab44" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "ELEMENTS OF CHEMICAL ENGINEERING BY H.S. FOGLER" + ] + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER NUMBER 1 : MOLE BALANCES" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.3 : PAGE NUMBER 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "k = 0.23; #min**-1\n", + "v0 = 10;#dm**3/min\n", + "#CA = 0.1*CA0;\n", + "V = (v0/k)*math.log(1/0.1);\n", + "print \"V =\",round(V,4),\"dm**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V = 100.1124 dm**3\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER NUMBER 2 : CONVERSION AND REACTOR SIZING" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.1 : PAGE NUMBER 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math\n", + " \n", + "P0 = 10; #atm\n", + "yA0 = 0.5;\n", + "T0 = 422.2;#K\n", + "R = 0.082;# dm**3.atm/mol.K\n", + "v0 = 6;#dm**3/s\n", + "CA0=(yA0*P0)/(R*T0);\n", + "FA0 = CA0*v0;\n", + "print \"CA0 =\",round(CA0,4),\"mol/dm**3\"\n", + "print \"FA0 =\",round(FA0,4),\"mol/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "CA0 = 0.1444 mol/dm**3\n", + "FA0 = 0.8665 mol/s\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.2 : PAGE NUMBER 42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "P0 = 10; #atm\n", + "yA0 = 0.5;\n", + "T0 = 422.2;#K\n", + "R = 0.082;# dm**3.atm/mol.K\n", + "v0 = 6;#dm**3/s\n", + "X = 0.8;\n", + "rA = -1/800;#1/-rA = 800#dm**3.s/mol\n", + "CA0=(yA0*P0)/(R*T0);\n", + "FA0 = CA0*v0;\n", + "V = FA0*X*(1/-rA)\n", + "print \"FA0 =\",round(FA0,4),\"mol/s\"\n", + "print \"V =\",round(V,4),\"dm**3\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "FA0 = 0.8665 mol/s\n", + "V = 0.6932 dm**3\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.3 : PAGE NUMBER 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " \n", + "P0 = 10; #atm\n", + "yA0 = 0.5;\n", + "T0 = 422.2;#K\n", + "R = 0.082;# dm**3.atm/mol.K\n", + "v0 = 6;#dm**3/s\n", + "X = [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8];\n", + "p = [189,192,200,222,250,303,400,556,800];#1/-rA = 800#dm**3.s/mols\n", + "CA0=(yA0*P0)/(R*T0);\n", + "FA0 = CA0*v0;\n", + "#V = FA0*X*(1/-rA)\n", + "\n", + "V = FA0*np.interp(0.42,X,p)\n", + "print \"FA0 =\",FA0,\"mol/s\"\n", + "print \"V =\",V,\"dm**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "FA0 = 0.866541114487 mol/s\n", + "V = 225.820614435 dm**3\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.4 : PAGE NUMBER 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "FA0 = 5; # mol/s\n", + "rAat=-0.0025;\n", + "X = [0,0.1,0.2,0.3,0.4,0.5,0.6];\n", + "p = [189,192,200,222,250,303,400];#1/-rA = 800#dm**3.s/mols\n", + "\n", + "VCSTR = FA0*X[6]*(1/-rAat);\n", + "VPFR = FA0*np.interp(0.00017,X,p)\n", + "print \"VCSTR =\",VCSTR,\"dm**3\"\n", + "print \"VPFR =\",VPFR,\"dm**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "VCSTR = 1200.0 dm**3\n", + "VPFR = 945.0255 dm**3\n" + ] + } + ], + "prompt_number": 37 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/AjaySatish/Sample_H.S._Fogler_UPDATED_(1).ipynb b/sample_notebooks/AjaySatish/Sample_H.S._Fogler_UPDATED_(1).ipynb new file mode 100755 index 00000000..2b950ef8 --- /dev/null +++ b/sample_notebooks/AjaySatish/Sample_H.S._Fogler_UPDATED_(1).ipynb @@ -0,0 +1,191 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:6aa7321c51ecc68ee01a5bb4aa554a936a01c87ebd6725c56b8e0edb6adbcf78" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "ELEMENTS OF CHEMICAL ENGINEERING BY H.S. FOGLER" + ] + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER NUMBER 2 : CONVERSION AND REACTOR SIZING" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.1 : PAGE NUMBER 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math\n", + " \n", + "P0 = 10; #atm\n", + "yA0 = 0.5;\n", + "T0 = 422.2;#K\n", + "R = 0.082;# dm**3.atm/mol.K\n", + "v0 = 6;#dm**3/s\n", + "CA0=(yA0*P0)/(R*T0);\n", + "FA0 = CA0*v0;\n", + "print \"CA0 =\",round(CA0,4),\"mol/dm**3\"\n", + "print \"FA0 =\",round(FA0,4),\"mol/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "CA0 = 0.1444 mol/dm**3\n", + "FA0 = 0.8665 mol/s\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.2 : PAGE NUMBER 42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "P0 = 10; #atm\n", + "yA0 = 0.5;\n", + "T0 = 422.2;#K\n", + "R = 0.082;# dm**3.atm/mol.K\n", + "v0 = 6;#dm**3/s\n", + "X = 0.8;\n", + "rA = -1/800;#1/-rA = 800#dm**3.s/mol\n", + "CA0=(yA0*P0)/(R*T0);\n", + "FA0 = CA0*v0;\n", + "V = FA0*X*(1/-rA)\n", + "print \"FA0 =\",round(FA0,4),\"mol/s\"\n", + "print \"V =\",round(V,4),\"dm**3\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "FA0 = 0.8665 mol/s\n", + "V = 0.6932 dm**3\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.3 : PAGE NUMBER 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " \n", + "P0 = 10; #atm\n", + "yA0 = 0.5;\n", + "T0 = 422.2;#K\n", + "R = 0.082;# dm**3.atm/mol.K\n", + "v0 = 6;#dm**3/s\n", + "X = [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8];\n", + "p = [189,192,200,222,250,303,400,556,800];#1/-rA = 800#dm**3.s/mols\n", + "CA0=(yA0*P0)/(R*T0);\n", + "FA0 = CA0*v0;\n", + "#V = FA0*X*(1/-rA)\n", + "\n", + "V = FA0*np.interp(0.42,X,p)\n", + "print \"FA0 =\",FA0,\"mol/s\"\n", + "print \"V =\",V,\"dm**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "FA0 = 0.866541114487 mol/s\n", + "V = 225.820614435 dm**3\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.4 : PAGE NUMBER 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "FA0 = 5; # mol/s\n", + "rAat=-0.0025;\n", + "X = [0,0.1,0.2,0.3,0.4,0.5,0.6];\n", + "p = [189,192,200,222,250,303,400];#1/-rA = 800#dm**3.s/mols\n", + "\n", + "VCSTR = FA0*X[6]*(1/-rAat);\n", + "VPFR = FA0*np.interp(0.00017,X,p)\n", + "print \"VCSTR =\",VCSTR,\"dm**3\"\n", + "print \"VPFR =\",VPFR,\"dm**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "VCSTR = 1200.0 dm**3\n", + "VPFR = 945.0255 dm**3\n" + ] + } + ], + "prompt_number": 37 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/AkshayPatil/Chapter01.ipynb b/sample_notebooks/AkshayPatil/Chapter01.ipynb new file mode 100755 index 00000000..8594491e --- /dev/null +++ b/sample_notebooks/AkshayPatil/Chapter01.ipynb @@ -0,0 +1,226 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:055c326b63bc3f150b8a5e433c724771cc1733887ec2b1e223ccf712fcd80848" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 01:Stress" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1.1, Page No:9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#NOTE:The notation has been changed to simplify the coding process\n", + "\n", + "#Variable Decleration\n", + "P_AB=4000 #Axial Force at section 1 in lb\n", + "P_BC=5000 #Axial Force at section 2 in lb\n", + "P_CD=7000 #Axial Force at section 3 in lb\n", + "A_1=1.2 #Area at section 1 in in^2\n", + "A_2=1.8 #Area at section 2 in in^2\n", + "A_3=1.6 #Area at section 3 in in^2\n", + "\n", + "#Calculation\n", + "#S indicates sigma here\n", + "S_AB=P_AB/A_1 #Stress at section 1 in psi (T)\n", + "S_BC=P_BC/A_2 #Stress at section 2 in psi (C)\n", + "S_CD=P_CD/A_3 #Stress at section 3 in psi (C)\n", + "\n", + "#Result\n", + "print \"The stress at the three sections is given as\"\n", + "print \"Stress at section 1=\",round(S_AB),\"section 2=\",round(S_BC),\"section 3=\",S_CD\n", + "\n", + "#NOTE:The answer for the following example for section 1 and section 2\n", + "#are incorrect due to rounding in the textbook\n", + "#Computed values are correct" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The stress at the three sections is given as\n", + "Stress at section 1= 3333.0 section 2= 2778.0 section 3= 4375.0\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1.2, Page No:10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable Decleration\n", + "Ay=40 #Vertical Reaction at A in kN\n", + "Hy=60 #Vertical Reaction at H in kN\n", + "Hx=0 #Horizontal Reaction at H in kN\n", + "y=3 #Height in m\n", + "x=5 #Distance in m\n", + "p=4 #Panel distance in m\n", + "A=900 #Area of the member in mm^2\n", + "P_C=30 #Force at point C in kN\n", + "\n", + "#Calculation\n", + "#Part 1\n", + "#Applying summation of forces in the x and y direction and equating to zero\n", + "P_AB=(-Ay)*(x*y**-1) #Force in member AB in kN\n", + "P_AC=-(p*x**-1*P_AB) #Force in member AC in kN\n", + "#Using stress=force/area\n", + "S_AC=(P_AC/A)*10**3 #Stress in member AC in MPa (T)\n", + "\n", + "#Part 2\n", + "#Sum of moments about point E to zero\n", + "P_BD=(Ay*p*2-(P_C*p))*y**-1 #Force in memeber AB in kN (C)\n", + "S_BD=(P_BD/A)*10**3 #Stress in member in MPa (C)\n", + "\n", + "#Result\n", + "print \"The Stress in member AC is\",round(S_AC,1),\"MPa (T)\"\n", + "print \"The Stress in member BD is\",round(S_BD,1),\"MPa (C)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Stress in member AC is 59.3 MPa (T)\n", + "The Stress in member BD is 74.1 MPa (C)\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1.3, Page No:11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "import numpy as num\n", + "\n", + "#Variable Decleration\n", + "A_AB=800 #Area of member AB in m^2\n", + "A_AC=400 #Area of member AC in m^2\n", + "W_AB=110 #Safe value of stress in Pa for AB\n", + "W_AC=120 #Safe value of stress in Pa for AC\n", + "theta1=60*3.14*180**-1 #Angle in radians\n", + "theta2=40*3.14*180**-1 #Angle in radians \n", + "\n", + "#Calculations\n", + "#Applying sum of forces \n", + "#Solving by matrix method putting W as 1\n", + "A=num.array([[-cos(theta1),cos(theta2)],[sin(theta1),sin(theta2)]])\n", + "B=num.array([[1],[1]])\n", + "C=inv(A)\n", + "D=C*B\n", + "\n", + "#Using newtons third law\n", + "#Two values of W hence the change in the notation\n", + "W1=(W_AB*A_AB)*(D[1,1])**-1 #Weight W in N\n", + "W2=(W_AC*A_AC)*(D[0,1])**-1 #Weight W in N\n", + "\n", + "#Result\n", + "print \"The maximum value of W allowable is\",round(W2*1000**-1,1),\"kN\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum value of W allowable is 61.7 kN\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1.4, Page No:19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable Decleration\n", + "d=3*4**-1 #Rivet diameter in inches\n", + "t=7*8**-1 #Thickness of the plate in inches\n", + "tau=14000 #Shear stress limit in psi\n", + "sigma_b=18000 #Normal stress limit in psi\n", + "\n", + "#Calculations\n", + "#Design Shear Stress in Rivets\n", + "V=tau*(d**2*(pi/4))*4 #Shear force maximum allowable in lb\n", + "#Design for bearing stress in plate\n", + "Pb=sigma_b*t*d*4 #lb\n", + "\n", + "#Result\n", + "print \"The maximum load that the joint can carry is\",round(V),\"lb\"\n", + "\n", + "#NOTE:The answer in the textbook is off by 40lb" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum load that the joint can carry is 24740.0 lb\n" + ] + } + ], + "prompt_number": 55 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/AmitRasmiya/ch5.ipynb b/sample_notebooks/AmitRasmiya/ch5.ipynb new file mode 100644 index 00000000..3176c0e5 --- /dev/null +++ b/sample_notebooks/AmitRasmiya/ch5.ipynb @@ -0,0 +1,189 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f9430cdf3ccbe0455a5081c4e47c887588ff78214ec8703c5bcd6324cca5d35d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : Single Phase Transformers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page No : 5.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "kVA = 250.;\t\t\t\t#kVA\n", + "V1 = 11000.;\t\t\t\t#V(Primary voltage)\n", + "V2 = 400.;\t\t\t\t#V(secondary voltage)\n", + "f = 50.;\t\t\t\t#Hz\n", + "N2 = 80.;\t\t\t\t#no. of turns in secondary\n", + "\n", + "# Calculations and Results\n", + "Ifl1 = kVA*1000/V1;\t\t\t\t#A(Full load primay current)\n", + "Ifl2 = kVA*1000/V2;\t\t\t\t#A(Full load secondary current)\n", + "print (\"Part(a)\");\n", + "print \"Full load primary current(A) %.2f\"%Ifl1\n", + "print \"Full load secondary current(A) : %.2f\"%Ifl2\n", + "\n", + "print (\"Part(b)\");\n", + "N1 = N2*V1/V2;\t\t\t\t#no. of turns in secondary\n", + "print \"No. of turns in primary : %.2f\"%N1\n", + "print (\"Part(c)\");\n", + "fi_m = V2/(4.44*N2*f);\t\t\t\t#Wb\n", + "print \"Maximum value of flux(mWb) : %2.f\"%(fi_m*1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part(a)\n", + "Full load primary current(A) 22.73\n", + "Full load secondary current(A) : 625.00\n", + "Part(b)\n", + "No. of turns in primary : 2200.00\n", + "Part(c)\n", + "Maximum value of flux(mWb) : 23\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page No : 5.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "N1 = 480;\t\t\t\t#no. of turns in primary\n", + "N2 = 90;\t\t\t\t#no. of turns in secondary\n", + "lfp = 1.8;\t\t\t\t#m(length of flux path)\n", + "ag = 0.1;\t\t\t\t#mm(airgap)\n", + "Flux = 1.1;\t\t\t\t#T(flux density)\n", + "MF = 400;\t\t\t\t#A/m(Magnetic flux)\n", + "c_loss = 1.7;\t\t\t\t#W/kg\n", + "f = 50;\t\t\t\t#Hz\n", + "d = 7800;\t\t\t\t#kg/m**3(density of core)\n", + "V = 2200;\t\t\t\t#V(potential difference)\n", + "\n", + "# Calculations and Results\n", + "#Part (a)\n", + "fi_m = V/(4.44*N1*f);\t\t\t\t#Wb\n", + "A = fi_m/Flux;\t\t\t\t#m**2(Cross sectional area)\n", + "print \"(a) Cross sectional area(m**2) : %.2f\"%A\n", + "#Part (b)\n", + "Vnl2 = V*N2/N1;\t\t\t\t#V(2ndary voltage on no load)\n", + "print \"(b) 2ndary voltage on no load(V) : %.f\"%Vnl2\n", + "\n", + "#Part (c)\n", + "Fm1 = MF*lfp;\t\t\t\t#A(Magnetootive force for the core)\n", + "Fm2 = Flux/(4*math.pi*10**-7)*ag*10**-3;\t\t\t\t#A(Magnetootive force for airgap)\n", + "Fm = Fm1+Fm2;\t\t\t\t#A(Total magnetomotive force)\n", + "Imax = Fm/N1;\t\t\t\t#A(maximum value of magnetizing current)\n", + "Iom = Imax/math.sqrt(2);\t\t\t\t#A(rms current)\n", + "v = lfp*A;\t\t\t\t#m**3(Volume of core)\n", + "m = v*d;\t\t\t\t#kg(Mass of core)\n", + "coreLoss = c_loss*m;\t\t\t\t#W(Core Loss)\n", + "Io1 = coreLoss/V;\t\t\t\t#A(Core loss component of curent)\n", + "Io = math.sqrt(Iom**2+Io1**2);\t\t\t\t#A(no load current)\n", + "print \"(c) Primary current on no load(A) : %.2f\"%Io\n", + "\n", + "pf = Io1/Io;\t\t\t\t#lagging pf on no load\n", + "print \"(c) Power factor(lagging) on no load : %.2f\"%pf\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Cross sectional area(m**2) : 0.02\n", + "(b) 2ndary voltage on no load(V) : 412\n", + "(c) Primary current on no load(A) : 1.21\n", + "(c) Power factor(lagging) on no load : 0.17\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page No : 5.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "N1 = 1000;\t\t\t\t#no. of turns in primary\n", + "N2 = 200;\t\t\t\t#no. of turns in secondary\n", + "I0 = 3;\t\t\t\t#A\n", + "pf0 = 0.2;\t\t\t\t#lagging power factor\n", + "I2 = 280;\t\t\t\t#A(2ndary current)\n", + "pf2 = 0.8;\t\t\t\t#lagging power factor\n", + "\n", + "# Calculations and Results\n", + "I2dash = I2*N2/N1;\t\t\t\t#A\n", + "cosfi0 = pf0;cosfi2 = pf2;sinfi0 = math.sqrt(1-cosfi0**2);sinfi2 = math.sqrt(1-cosfi2**2);\n", + "I1_cosfi1 = I2dash*cosfi2+I0*cosfi0;\t\t\t\t#A\n", + "I1_sinfi1 = I2dash*sinfi2+I0*sinfi0;\t\t\t\t#A\n", + "I1 = math.sqrt(I1_cosfi1**2+I1_sinfi1**2);\t\t\t\t#A\n", + "print \"Primary current(A) : %.1f\"%I1\n", + "\n", + "fi1 = math.degrees(math.atan(I1_sinfi1/I1_cosfi1));\t\t\t\t#degree\n", + "pf1 = math.cos(math.radians(fi1));\t\t\t\t#lagging\n", + "print \"Primary power factor(lagging) : %.2f\"%pf1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Primary current(A) : 58.3\n", + "Primary power factor(lagging) : 0.78\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/AmitRaval/ch3.ipynb b/sample_notebooks/AmitRaval/ch3.ipynb new file mode 100755 index 00000000..a3c142e2 --- /dev/null +++ b/sample_notebooks/AmitRaval/ch3.ipynb @@ -0,0 +1,251 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b5106ea5cae253fe059288e745550627fa4df81e4cd0d1b81237c843ab3f804d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : Hydrodynamics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 Page No : 39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "# points\n", + "hob= 34. \t#ft\n", + "hoc= 5. \t#ft\n", + "hoa= 50. \t#ft\n", + "\n", + "hod= 80. \t#ft height\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "# sectional areas\n", + "A= 2.1 \t#in**2\n", + "A1= 4.8 \t#in**2\n", + "A2= 9.6 \t#in**2\n", + "\n", + "#CALCULATIONS\n", + "v= math.sqrt(2*g*(hod-hoc))\n", + "Q= v*A/144\n", + "va= v*A/A1\n", + "vb= v*A/A2\n", + "Va= va**2/(2*g)\n", + "Vb= vb**2/(2*g)\n", + "r= hob+hod-hoa-(va**2/(2*g))\n", + "r1=hob+hod-hob-(vb**2/(2*g))\n", + "\n", + "#RESULTS\n", + "print 'Discharge = %.2f cuses'%(Q) \n", + "print ' Velocity head at A = %.2f ft-lb/lb'%(Va)\n", + "print ' Velocity head at B = %.2f ft-lb/lb'%(Vb)\n", + "print ' Pressure head at A = %.2f ft-lb/lb'%(r) \n", + "print ' Pressure head at B = %.2f ft-lb/lb'%(r1) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge = 1.01 cuses\n", + " Velocity head at A = 14.36 ft-lb/lb\n", + " Velocity head at B = 3.59 ft-lb/lb\n", + " Pressure head at A = 49.64 ft-lb/lb\n", + " Pressure head at B = 76.41 ft-lb/lb\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 Page No : 40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "w= 62.4 \t#lb/ft**3\n", + "P= 1.7 \t#lb/in**2 pressure\n", + "d1= 6. \t #in diameters\n", + "d2= 3. \t #in diameters\n", + "hab= 8. \t#ft\n", + "Q= 0.75 \t#cuses\n", + "sm= 13.6 # gravity\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "dP= P*144/w\n", + "va= Q*(d1/d2)**4/math.pi\n", + "k= -(((d1/d2)**4-1)-((-dP+hab)*2*g/va**2))\n", + "h= (-dP+hab)*12/(sm-1)\n", + "\n", + "#RESULTS\n", + "print 'k = %.f '%(k)\n", + "print 'height difference = %.2f in'%(h) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "k = 3 \n", + "height difference = 3.88 in\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 Page No : 42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "h= 20. \t #ft pressure head\n", + "Q= 4.81 \t#cuses \n", + "C= 1.\n", + "g= 32.2 \t#ft/sec**2\n", + "d= 10. \t#indiameter\n", + "\n", + "#CALCULATIONS\n", + "d= ((Q*4*144/(d**2*math.pi))**2*100**2/((Q*4*144/(d**2*math.pi))**2+2*g*h))**0.25\n", + "\n", + "#RESULTS\n", + "print 'Smallest Diameter = %.1f in'%(d)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Smallest Diameter = 4.9 in\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 Page No : 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "d= 1./3 \t#ft\n", + "g= 32.2 \t#ft/sec**2\n", + "d1= 4. \t #in\n", + "d2= 1.6 \t#in diameter\n", + "\n", + "# guage readings\n", + "h1= 5.7 \t#ft\n", + "h2= -1.9 \t#ft\n", + "\n", + "Q= 0.3 \t#cuses\n", + "H1= 34. \t#ft height of water\n", + "H2= 19. \t#ft\n", + "H3= 7. \t #ft\n", + "H4= 9.2 \t#ft\n", + "h3= 2.9 \t#ft\n", + "h4= 3.9 \t#ft\n", + "Et= 54. \t#ft-lb/lb\n", + "\n", + "#CALCULATIONS\n", + "v1= math.sqrt(2*g*(h1-h2)/((d1/d2)**4-1))\n", + "Q1= math.pi*v1*d**2/4\n", + "k= Q/Q1\n", + "P= (H1+H2)*H3/H4\n", + "P1= P-h3\n", + "r= P+h1-h2-h4\n", + "V= v1**2/(2*g)\n", + "E= r+V\n", + "dE= Et-E\n", + "\n", + "#RESULTS\n", + "print 'Coefficienct of venturi meter = %.4f '%(k)\n", + "print ' Pressure of venturi throat = %.2f ft of water'%(P1)\n", + "print ' Loss in energy = %.1f ft-lb/lb'%(dE)\n", + "\n", + "# Note : The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coefficienct of venturi meter = 0.9587 \n", + " Pressure of venturi throat = 37.43 ft of water\n", + " Loss in energy = 9.8 ft-lb/lb\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/AmitSexana/Ch_03.ipynb b/sample_notebooks/AmitSexana/Ch_03.ipynb new file mode 100644 index 00000000..be13231c --- /dev/null +++ b/sample_notebooks/AmitSexana/Ch_03.ipynb @@ -0,0 +1,684 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:38fdf1a79a5afe4aa8258051a4233e0da43992d64154d50af084fa49764f5132" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter - 3 : Junction Diode and Junction Capacitance" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.1 : Page No - 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data\n", + "Co= 20 # in pF\n", + "Vr= 5 # in V\n", + "V_T= 26 # in mV\n", + "V_T= V_T*10**-3 # in V\n", + "C_T= Co/(1+(Vr/V_T)) # in pF\n", + "print \" The transition capacitance of diode = %0.2f pF\" %C_T" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The transition capacitance of diode = 0.10 pF\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.2 : Page No - 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "toh= 10**-6 # in sec\n", + "I=10 # in mA\n", + "I=I*10**-3 # in A\n", + "n=1 \n", + "V_T= 26 # in mV\n", + "V_T= V_T*10**-3 # in V\n", + "C_D= toh*I/(n*V_T) # in F\n", + "print \" The diffusion capacitance in p-n junction diode = %0.f nF\" %(C_D*10**9)\n", + "\n", + "# Note: There are two mistake in the book. First one is this that they put the wrong value of I to evaluating\n", + "# the value of C_D because the value of I is given 10mA (i.e. 10*10**-3= 10**-2 amp) but they put 10**-3 at place \n", + "# of 10**-2 and second one is calculation error. So the answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The diffusion capacitance in p-n junction diode = 385 nF\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.3 : Page No - 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import exp\n", + "#Given data\n", + "T=300 # in K\n", + "V_T= T/11600 # in V\n", + "v= 0.3 # forward bias voltage in volt\n", + "I= 10 # leakage current in micro amp\n", + "I=I*10**-6 # in amp\n", + "id= I*(exp(v/V_T)) # in amp\n", + "print \" The diode current = %0.2f amp\" %id" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The diode current = 1.09 amp\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.4 : Page No - 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log\n", + "#Given data\n", + "Vd_1= 0.3 # in V\n", + "V_T= 25 # in mV\n", + "V_T= V_T*10**-3 # in V\n", + "# when Id_1= 1 mA\n", + "Id_1= 1 # in mA\n", + "Id_1=Id_1*10**-3 # in A\n", + "# Formula Id_1= Io*[%e**(Vd/(n*V_T))-1]= Io*[e**(Vd/(n*V_T))]\n", + "# Id_1= Io*[e**(Vd_1/(n*V_T))] (i)\n", + "\n", + "# when Id_2= 200 mA\n", + "Id_2= 200 # in mA\n", + "Id_2=Id_2*10**-3 # in A\n", + "Vd_2= 0.45 # in V\n", + "# Id_2= Io*[e**(Vd_2/(n*V_T))] (ii)\n", + "# Dividing (ii) by (i), we have\n", + "n= (Vd_2-Vd_1)/(log(Id_2/Id_1)*V_T) \n", + "print \" The value of the constant for the diode = %0.2f \" %n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of the constant for the diode = 1.13 \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.5 : Page No - 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "T=300 # in K\n", + "V_T= T/11600 # in V\n", + "n=1 # assuming value\n", + "Jd=10**5 # in A/m**2\n", + "Jo=250 # in mA/m**2\n", + "Jo= Jo*10**-3 # in A/m**2\n", + "#Formula Id= Io*(%e**(Vd/V_T)-1) and after dividing both the sides by area of the junction, we have\n", + "# Jd= Jo*(%e**(Vd/V_T)) # approx by neglecting 1 \n", + "Vd= V_T*log(Jd/Jo) # in volt\n", + "print \" Voltage to be applied across a p-n junction = %0.2f volt\" %Vd" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Voltage to be applied across a p-n junction = 0.33 volt\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.6 : Page No - 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log\n", + "#Given data\n", + "J=10**4 # in A/m**2\n", + "Jo=200 # in mA/m**2\n", + "Jo= Jo*10**-3 # in A/m**2\n", + "T=300 # in K\n", + "V_T= T/11600 # in V\n", + "e=1.6*10**-19 # electrone charge\n", + "k= 1.38*10**-23 \n", + "n=1 # assuming value\n", + "#Formula I= Io*(%e**(e*V/(n*k*T))-1) and after dividing both the sides by area of the junction, we have\n", + "# J= Jo*(%e**(e*V/(n*k*T))) # approx by neglecting 1 \n", + "V= n*k*log(J/Jo)/e \n", + "print \" Voltage to be applied across the junction = %0.2e volts\" %V" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Voltage to be applied across the junction = 9.33e-04 volts\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.7 : Page No - 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "n=2 \n", + "V_T=26 # in mV\n", + "Io= 30 # in mA\n", + "# (i) when\n", + "I_D= 0.1 # in mA\n", + "V_D= n*V_T*log(I_D/Io) # in mV\n", + "print \" (i) When I_D is 0.1 mA, The junction forward-bias voltage = %0.f mV\" %V_D\n", + "# (ii) when\n", + "I_D= 10 # in mA\n", + "V_D= n*V_T*log(I_D/Io) # in mV\n", + "print \" (ii) When I_D is 10 mA, The junction forward-bias voltage = %0.f mV\" %V_D\n", + "\n", + "# Note: There is calculation error in the book so answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " (i) When I_D is 0.1 mA, The junction forward-bias voltage = -297 mV\n", + " (ii) When I_D is 10 mA, The junction forward-bias voltage = -57 mV\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.8 : Page No - 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I_by_Io= -0.9 \n", + "V_T=26 # in mV\n", + "V_T=V_T*10**-3 #in V\n", + "n=1 \n", + "# From Diode equation I= Io*[e**(e*V/(n*V_T))-1]\n", + "V= n*V_T*log(1+I_by_Io) # in volt\n", + "print \"The value of voltage = %0.1f mV \" %(V*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of voltage = -59.9 mV \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.9 : Page No - 94" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "nita= 2 \n", + "T1= 25 # in \u00b0C\n", + "T2= 150 # in \u00b0C\n", + "k= 8.62*10**-5 \n", + "V_T150= k*(T2+273) # in V\n", + "V_T25= k*(T1+273) # in V\n", + "V= 0.4 # in V\n", + "# Io150= Io25*2**(T2-T1) \n", + "Io150byIo25= 2**((T2-T1)/10) \n", + "I150byI25= Io150byIo25 *(exp(V/(nita*V_T150))-1)/(exp(V/(nita*V_T25))-1) \n", + "print \" The value of factor = %0.f\" %I150byI25" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of factor = 578\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.10 : Page No - 94" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I_F= 100 # in mA\n", + "I_F=I_F*10**-3 # in A\n", + "V_F= 0.75 # in V\n", + "R_F= V_F/I_F # in ohm\n", + "print \" Forward resistance = %0.1f ohm \" %R_F\n", + "# At\n", + "V_R= 50 # in V\n", + "I_R= 100 # in nA\n", + "I_R= I_R*10**-9 # in A\n", + "R_R= V_R/I_R # in ohm\n", + "print \" Reverse resistance = %0.f Mohm \" %(R_R*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Forward resistance = 7.5 ohm \n", + " Reverse resistance = 500 Mohm \n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.11 : Page No - 95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I_F= 70 # in mA\n", + "V_F= 26 # in mV\n", + "delta_I_F= 60 # in mA\n", + "delta_I_F=delta_I_F*10**-3 # in A\n", + "delta_V_F= 0.025 # in V\n", + "r_d= delta_V_F/delta_I_F # in ohm\n", + "print \" Dynamic resistance = %0.2f ohm\" %r_d\n", + "# and the stimated value of the dynamic resistance is\n", + "r_d= V_F/I_F # in ohm\n", + "print \" The estimated value of the Dynamic resistance = %0.2f ohm\" %r_d" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Dynamic resistance = 0.42 ohm\n", + " The estimated value of the Dynamic resistance = 0.37 ohm\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.12 : Page No - 95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "Io= 1 # in micro amp\n", + "Io=Io*10**-6 # in amp\n", + "V_F= 0.52 # in V\n", + "V_R= -0.52 # in V\n", + "nita= 1 \n", + "T=300 # in K\n", + "V_T= T/11600 # in volt\n", + "V_T=round(V_T*10**3) # in mV\n", + "\n", + "# (i)\n", + "r_F= nita*V_T*10**-3/(Io*exp(V_F/(nita*V_T*10**-3))) \n", + "print \"(i) : Dynamic resistance in the forward biased condition = %0.2e ohm\" %r_F\n", + "\n", + "# (ii)\n", + "r_r= nita*V_T*10**-3/(Io*exp(V_R/(nita*V_T*10**-3))) \n", + "print \"(ii) : Dynamic resistance in the reverse biased condition = %0.2e ohm\" %r_r" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) : Dynamic resistance in the forward biased condition = 5.36e-05 ohm\n", + "(ii) : Dynamic resistance in the reverse biased condition = 1.26e+13 ohm\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.13 : Page No - 96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "V_F= 0.2 # in V\n", + "T=300 # in K\n", + "V_T= T/11600 # in volt\n", + "Io= 1 # in micro amp\n", + "Io=Io*10**-6 # in amp\n", + "Id= Io*(exp(V_F/V_T)-1)\n", + "I_F=Id \n", + "r_dc= V_F/I_F # in ohm\n", + "print \" Dynamic resistance = %0.1f ohm\" %r_dc\n", + "r_ac= .026/I_F # in ohm\n", + "print \" Static resistance = %0.1f ohm\" %r_ac" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Dynamic resistance = 87.6 ohm\n", + " Static resistance = 11.4 ohm\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.14 : Page No - 96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "# Part (i)\n", + "I_D=2 # in mA\n", + "I_D=I_D*10**-3 # in amp\n", + "V_D= 0.5 # in volt\n", + "R_DC= V_D/I_D # in ohm\n", + "print \"(i) : DC resistance levels for the diode = %0.f ohm\" %R_DC\n", + "\n", + "# Part (ii)\n", + "I_D=20 # in mA\n", + "I_D=I_D*10**-3 # in amp\n", + "V_D= 0.8 # in volt\n", + "R_DC= V_D/I_D # in ohm\n", + "print \"(ii) : DC resistance levels for the diode = %0.f ohm\" %R_DC\n", + "\n", + "# Part (iii)\n", + "I_D=-1 # in micro amp\n", + "I_D=I_D*10**-6 # in amp\n", + "V_D= -10 # in volt\n", + "R_DC= V_D/I_D # in ohm\n", + "print \"(iii) : DC resistance levels for the diode = %0.f Mohm\" %(R_DC*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) : DC resistance levels for the diode = 250 ohm\n", + "(ii) : DC resistance levels for the diode = 40 ohm\n", + "(iii) : DC resistance levels for the diode = 10 Mohm\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.15 : Page No - 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "T1= 25 # in \u00b0C\n", + "T2= 100 # in \u00b0C\n", + "deltaT= T2-T1 # in \u00b0C\n", + "deltaV_F= -1.8*10**-3 # in mV/\u00b0C\n", + "I_F= 26 # in mA\n", + "V_F1= 0.7 # in V (at T1)\n", + "V_F2= V_F1+(deltaT*deltaV_F) # in V (at T2)\n", + "# At 25\u00b0C\n", + "T= 25+273 # in K\n", + "rd= 26/I_F*T/298 # in \u03a9\n", + "print \" Junction dynamic resistance at 25\u00b0C = %0.f \u03a9 \" %rd\n", + "# At 100\u00b0C\n", + "T= 100+273 # in K\n", + "rd= 26/I_F*T/298 # in \u03a9\n", + "print \" Junction dynamic resistance at 100\u00b0C = %0.2f \u03a9 \" %rd" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Junction dynamic resistance at 25\u00b0C = 1 \u03a9 \n", + " Junction dynamic resistance at 100\u00b0C = 1.25 \u03a9 \n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.16 : Page No - 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I= 2 # in mA\n", + "I=I*10**-3 # in A\n", + "V_T= 25 # in mV\n", + "V_T= V_T*10**-3 # in V\n", + "nita= 1 \n", + "r_F= nita*V_T/I # in \u03a9\n", + "print \" The dynamic resistance of a diode = %0.1f \u03a9\" %r_F " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The dynamic resistance of a diode = 12.5 \u03a9\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.17 : Page No - 98" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I= 30 # in \u00b5A\n", + "I=I*10**-6 # in A\n", + "T=125+273 # in K\n", + "r_F= T/(11600*I*exp(-0.32/T)*11600) # in \u03a9\n", + "print \" The dynamic resistance = %0.3f m\u03a9\" %(r_F*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The dynamic resistance = 98.672 m\u03a9\n" + ] + } + ], + "prompt_number": 32 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/AnandMandali/ch5.ipynb b/sample_notebooks/AnandMandali/ch5.ipynb new file mode 100644 index 00000000..3176c0e5 --- /dev/null +++ b/sample_notebooks/AnandMandali/ch5.ipynb @@ -0,0 +1,189 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f9430cdf3ccbe0455a5081c4e47c887588ff78214ec8703c5bcd6324cca5d35d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : Single Phase Transformers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page No : 5.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "kVA = 250.;\t\t\t\t#kVA\n", + "V1 = 11000.;\t\t\t\t#V(Primary voltage)\n", + "V2 = 400.;\t\t\t\t#V(secondary voltage)\n", + "f = 50.;\t\t\t\t#Hz\n", + "N2 = 80.;\t\t\t\t#no. of turns in secondary\n", + "\n", + "# Calculations and Results\n", + "Ifl1 = kVA*1000/V1;\t\t\t\t#A(Full load primay current)\n", + "Ifl2 = kVA*1000/V2;\t\t\t\t#A(Full load secondary current)\n", + "print (\"Part(a)\");\n", + "print \"Full load primary current(A) %.2f\"%Ifl1\n", + "print \"Full load secondary current(A) : %.2f\"%Ifl2\n", + "\n", + "print (\"Part(b)\");\n", + "N1 = N2*V1/V2;\t\t\t\t#no. of turns in secondary\n", + "print \"No. of turns in primary : %.2f\"%N1\n", + "print (\"Part(c)\");\n", + "fi_m = V2/(4.44*N2*f);\t\t\t\t#Wb\n", + "print \"Maximum value of flux(mWb) : %2.f\"%(fi_m*1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part(a)\n", + "Full load primary current(A) 22.73\n", + "Full load secondary current(A) : 625.00\n", + "Part(b)\n", + "No. of turns in primary : 2200.00\n", + "Part(c)\n", + "Maximum value of flux(mWb) : 23\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page No : 5.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "N1 = 480;\t\t\t\t#no. of turns in primary\n", + "N2 = 90;\t\t\t\t#no. of turns in secondary\n", + "lfp = 1.8;\t\t\t\t#m(length of flux path)\n", + "ag = 0.1;\t\t\t\t#mm(airgap)\n", + "Flux = 1.1;\t\t\t\t#T(flux density)\n", + "MF = 400;\t\t\t\t#A/m(Magnetic flux)\n", + "c_loss = 1.7;\t\t\t\t#W/kg\n", + "f = 50;\t\t\t\t#Hz\n", + "d = 7800;\t\t\t\t#kg/m**3(density of core)\n", + "V = 2200;\t\t\t\t#V(potential difference)\n", + "\n", + "# Calculations and Results\n", + "#Part (a)\n", + "fi_m = V/(4.44*N1*f);\t\t\t\t#Wb\n", + "A = fi_m/Flux;\t\t\t\t#m**2(Cross sectional area)\n", + "print \"(a) Cross sectional area(m**2) : %.2f\"%A\n", + "#Part (b)\n", + "Vnl2 = V*N2/N1;\t\t\t\t#V(2ndary voltage on no load)\n", + "print \"(b) 2ndary voltage on no load(V) : %.f\"%Vnl2\n", + "\n", + "#Part (c)\n", + "Fm1 = MF*lfp;\t\t\t\t#A(Magnetootive force for the core)\n", + "Fm2 = Flux/(4*math.pi*10**-7)*ag*10**-3;\t\t\t\t#A(Magnetootive force for airgap)\n", + "Fm = Fm1+Fm2;\t\t\t\t#A(Total magnetomotive force)\n", + "Imax = Fm/N1;\t\t\t\t#A(maximum value of magnetizing current)\n", + "Iom = Imax/math.sqrt(2);\t\t\t\t#A(rms current)\n", + "v = lfp*A;\t\t\t\t#m**3(Volume of core)\n", + "m = v*d;\t\t\t\t#kg(Mass of core)\n", + "coreLoss = c_loss*m;\t\t\t\t#W(Core Loss)\n", + "Io1 = coreLoss/V;\t\t\t\t#A(Core loss component of curent)\n", + "Io = math.sqrt(Iom**2+Io1**2);\t\t\t\t#A(no load current)\n", + "print \"(c) Primary current on no load(A) : %.2f\"%Io\n", + "\n", + "pf = Io1/Io;\t\t\t\t#lagging pf on no load\n", + "print \"(c) Power factor(lagging) on no load : %.2f\"%pf\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Cross sectional area(m**2) : 0.02\n", + "(b) 2ndary voltage on no load(V) : 412\n", + "(c) Primary current on no load(A) : 1.21\n", + "(c) Power factor(lagging) on no load : 0.17\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page No : 5.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "N1 = 1000;\t\t\t\t#no. of turns in primary\n", + "N2 = 200;\t\t\t\t#no. of turns in secondary\n", + "I0 = 3;\t\t\t\t#A\n", + "pf0 = 0.2;\t\t\t\t#lagging power factor\n", + "I2 = 280;\t\t\t\t#A(2ndary current)\n", + "pf2 = 0.8;\t\t\t\t#lagging power factor\n", + "\n", + "# Calculations and Results\n", + "I2dash = I2*N2/N1;\t\t\t\t#A\n", + "cosfi0 = pf0;cosfi2 = pf2;sinfi0 = math.sqrt(1-cosfi0**2);sinfi2 = math.sqrt(1-cosfi2**2);\n", + "I1_cosfi1 = I2dash*cosfi2+I0*cosfi0;\t\t\t\t#A\n", + "I1_sinfi1 = I2dash*sinfi2+I0*sinfi0;\t\t\t\t#A\n", + "I1 = math.sqrt(I1_cosfi1**2+I1_sinfi1**2);\t\t\t\t#A\n", + "print \"Primary current(A) : %.1f\"%I1\n", + "\n", + "fi1 = math.degrees(math.atan(I1_sinfi1/I1_cosfi1));\t\t\t\t#degree\n", + "pf1 = math.cos(math.radians(fi1));\t\t\t\t#lagging\n", + "print \"Primary power factor(lagging) : %.2f\"%pf1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Primary current(A) : 58.3\n", + "Primary power factor(lagging) : 0.78\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/AnkitBarot/ch15.ipynb b/sample_notebooks/AnkitBarot/ch15.ipynb new file mode 100755 index 00000000..c5a4b2dd --- /dev/null +++ b/sample_notebooks/AnkitBarot/ch15.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/sample_notebooks/BhavinPatel/ch6.ipynb b/sample_notebooks/BhavinPatel/ch6.ipynb new file mode 100755 index 00000000..1c733ac1 --- /dev/null +++ b/sample_notebooks/BhavinPatel/ch6.ipynb @@ -0,0 +1,163 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:098e6f8caaa45e66f3c3c4de6e35624c980f673866a521599c34dc5ef9f6350c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 : Elements of Hydrology" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 Page No : 6-6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "H = 1360\t#ft\n", + "t = 60\t#f\n", + "a = (10**3)*5.5*(10**-3)\t#f\n", + "q = (1.36*10**3)*5.5*(10**-3)\t#f\n", + "s = (4-1.36)*(10**3)*(3.2*10**-3)\t#f\n", + "\t\n", + "#CALCULATIONS\n", + "T = t-q-s\t#F\n", + "T1 = T+3*a\t#F\n", + "\t\n", + "#RESULTS\n", + "print 'the temperature at the mountain top = %.0f F'%(T)\n", + "print 'the temperature on the plain beyond the mountain = %.1f F'%(T1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the temperature at the mountain top = 44 F\n", + "the temperature on the plain beyond the mountain = 60.6 F\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2 Page No : 6-12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "t = 60\t#f\n", + "v = 0.52\t#in\n", + "t1 = 80\t#F\n", + "p = 40\t#percent\n", + "v1 = 1.03*0.40\t#in\n", + "w = 8\t#mph\n", + "pa = 29.0\t#in\n", + "p1 = 0.497\t#ft\n", + "q = 1.32*10**-2\t#ft\n", + "r = 0.268\t#ft\n", + "\t\n", + "#CALCULATIONS\n", + "E = p1*(1-q*pa)*(1+r*w)*(v-.41)\t#in\n", + "\t\n", + "#RESULTS\n", + "print 'the evaporation for the a day during = %.2e in'%(E)\n", + "\n", + "# note : answer is slightly different because of rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the evaporation for the a day during = 1.06e-01 in\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3 Page No : 6-19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "t = 47\t#f\n", + "q = 8000\t#ft\n", + "a = 100\t#ft\n", + "d = 0.10\t#in\n", + "d1 = 7\t#degree days\n", + "s1 = 14000\t#ft\n", + "s2 = 7000\t#ft\n", + "s = 1000\t#ft\n", + "g = 32\t#ft\n", + "h = 17.37\t#ft\n", + "h1 = 1.547\t#ft\n", + "\t\n", + "#CALCULATIONS\n", + "T = q+s*(t-g)/3\t#ft\n", + "T1 = t-3*1\t#F\n", + "T2 = (T1+g)/2\t#F\n", + "T3 = d1*d*a\t#sq mile in\n", + "M = h*T3\t#mgd\n", + "M1 = M*h1\t#cfs\n", + "\t\n", + "#RESULTS\n", + "print 'the upper boundary of the melting zone and temperature at the snow line = %.0f F'%(T1)\n", + "print 'The average temperature of = %d cfs'%(M1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the upper boundary of the melting zone and temperature at the snow line = 44 F\n", + "The average temperature of = 1880 cfs\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/DeepTrambadia/Diode_Applications.ipynb b/sample_notebooks/DeepTrambadia/Diode_Applications.ipynb new file mode 100644 index 00000000..7297aefc --- /dev/null +++ b/sample_notebooks/DeepTrambadia/Diode_Applications.ipynb @@ -0,0 +1,679 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:90aab70b55d4896f0f22aa66f516161405cb3435a2adc68d32d5e3787e2d9de5" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2:Diode Applications\n" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 page : 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#(a)\n", + "#initialisation of variables\n", + "\n", + "E=10 #E in V\n", + "R=1 #R in Kohm\n", + "\n", + "\n", + "#Calculations\n", + " \n", + "Id=E/R #Eq.(2.2)\n", + "Vd=E\n", + "print \"(a) \\nThe current Ic is = %fmA \"%(Id),\";Vd=0V\"\n", + "print \"The diode voltage is = %fV\"%(Vd),\";Id=0A\"\n", + "print \"\\nThe resulting load line appears in Fig. 2.4. The intersection between the load line \\nand the characteristic curve defines the Q-point as\"\n", + "print \"\\nThe level of VD is certainly an estimate, and the accuracy of ID is limited by the chosenscale. \\nA higher degree of accuracy would require a plot that would be much large and perhaps unwieldy\"\n", + "\n", + "\n", + "#(B)\n", + "print \"\\n(B)\\n\"\n", + "Ir=9.25 #Ir in mA\n", + "Vdq=0.78 #Vdq in v\n", + "Vr=Ir*R\n", + "print \"Vr = Ir*R = Idq*R = %dV\"%(Vr),\"or\"\n", + "Vr = E-Vdq\n", + "print \"Vr = E-Vdq = %fV\" %(Vr)\n", + "print \"\\nThe difference in results is due to the accuracy with which the graph can be read. \\nIdeally,the results obtained either way should be the same.\"\n", + "\n", + "#Graph solution to example 2.1\n", + "\n", + "import numpy as np\n", + "import matplotlib.pyplot as plt\n", + "\n", + "Vd = np.linspace(0.0,10.0)\n", + "Id = np.linspace(0.0,10.0)\n", + "Id= -Vd + 10\n", + "plt.plot(Vd, Id)\n", + "Vd = [0,0,0.1,0.1,0.2,0.2,0.3,0.3,0.3,0.3,0.4,0.5,0.6,0.7]\n", + "Id = [0,0,0,0,0,0,0,0,0.1,0.1,0.3,0.7,2.0,10.0]\n", + "\n", + "plt.plot(Vd, Id,'yo-')\n", + "\n", + "plt.xlabel('Voltage (v)')\n", + "plt.ylabel('current (mA)')\n", + "plt.title('Characteristics of diode')\n", + "plt.grid(True)\n", + "plt.savefig(\"test.png\")\n", + "\n", + "plt.show()\n", + "\n", + "print \"example 2.2:\"\n", + "print \"repeat the example 2.1 for R =2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) \n", + "The current Ic is = 10.000000mA ;Vd=0V\n", + "The diode voltage is = 10.000000V ;Id=0A\n", + "\n", + "The resulting load line appears in Fig. 2.4. The intersection between the load line \n", + "and the characteristic curve defines the Q-point as\n", + "\n", + "The level of VD is certainly an estimate, and the accuracy of ID is limited by the chosenscale. \n", + "A higher degree of accuracy would require a plot that would be much large and perhaps unwieldy\n", + "\n", + "(B)\n", + "\n", + "Vr = Ir*R = Idq*R = 9V or\n", + "Vr = E-Vdq = 9.220000V\n", + "\n", + "The difference in results is due to the accuracy with which the graph can be read. \n", + "Ideally,the results obtained either way should be the same.\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEZCAYAAACervI0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlcVPX6B/DPCLgBbgi4AGLubIJiuYuYmRaopRUuKJbd\nFi1bNZer9+pVqJtbaaWZWnmVtGvu3TSkLMMWVNRckhxwIXMBjVWW7++P+c0cQNbhzJw5cz7v14vX\ndWDmzMPT3Hl4vs/5ntEJIQSIiEhz6ik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ffFkIIER4eLn777TchhBBJSUkiPDz8\nrvg2b94spk2bZro9cuRIcfDgQSGEEFu2bBFTp041/Sw6Olrs3btXrtQQVYgdANmN0stA8fHxiIqK\nwk8//YSwsDC4ubnBwcEB48ePx7ffflvmcaLc1VBKSkrwxhtvoHv37hg6dCiuXLmCq1ev4vvvv8eo\nUaNQv359uLi4mD6eMicnB4cPH8bYsWMREhKCZ555xnRVxtLS09PRunVr0+3HH38c8fHxAIAtW7bg\n8ccfN/2sTZs20Ov1suSFqDKOSgdAJJfIyEi89NJLOHr0KHJzcxESElLm8uKA4c2+uuukb9q0Cdev\nX0dycjIcHBzQvn175OfnQ6fTlSkWxn+XlJSgefPmOHr0aLUxln58REQEZs+ejczMTCQnJyM8PLxW\ncRLVFTsAshsuLi4YPHgwYmJiTMPfXr164ZtvvsGNGzdMnxs7aNCgMo9zdXXFX3/9Zbp9+/ZteHh4\nwMHBAQcPHkRaWhp0Oh369euHXbt2oaCgANnZ2dizZ4/p8e3bt8e2bdsAGN68U1JS7oqvXbt2ZToD\nFxcX9OrVCy+88AIiIiLKvOFnZGSUmREQWQILANmVqKgonDhxAlFRUQCA1q1bIzY2FoMHD0ZwcDBC\nQ0NNSzfGN1w3Nzf069cPgYGBmDlzJsaPH4+ff/4ZQUFB+OSTT0wfvB4aGorIyEgEBQVhxIgRCAwM\nNH0m76ZNm7Bu3ToEBwcjICCgzODYqF+/fnd9gMvjjz+O//znP2WWfwDg6NGj6NOnj7zJISqHl4Mm\nqoWcnBw4OzsjNzcXgwYNwtq1axEcHFzjx4eHh2PTpk1lZgHlnTt3Dq+++mqFRYRITuwAiGrh6aef\nRkhICHr27IkxY8bU6s0fAF599VW8//77Vd7n/fffx+uvv16XMIlqhB0AEZFGsQMgItIoFgAiIo1i\nASAi0igWACIijWIBICLSKBYAIiKN+j91tdZGQm+jrgAAAABJRU5ErkJggg==\n", + "text": [ + "<matplotlib.figure.Figure at 0x7f6e4daea050>" + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "example 2.2:\n", + "repeat the example 2.1 for R =2\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 Page : 60" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2.6\n", + "#For the series diode configuration of Fig. 2.16, determine VD, VR, and ID.\n", + "\n", + "import math\n", + "\n", + "#initialisation of variables\n", + "\n", + "\n", + "E=8 #E in V\n", + "R=2.2 #R in Kohm\n", + "Vd=0.7 #Vd in V \n", + "\n", + "#Calculations\n", + "\n", + "Vr=E-Vd \n", + "Id=Vr/R \n", + "print \"Since the applied voltage establishes a current in the clockwise direction to match thearrow of the symbol \\nand the diode is in the 'on' state,\\n\"\n", + "print \"The diode voltage is = %.1fV\"%(Vd),\";Id=0A\"\n", + "print \"The voltage Vr is = %.1fV\"%(Vr)\n", + "print \"The current Id is = %.2fmA \"%(Id)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Since the applied voltage establishes a current in the clockwise direction to match thearrow of the symbol \n", + "and the diode is in the 'on' state,\n", + "\n", + "The diode voltage is = 0.7V ;Id=0A\n", + "The voltage Vr is = 7.3V\n", + "The current Id is = 3.32mA \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 Page : 60" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2.7\n", + "#Repeat Example 2.6 with the diode reversed\n", + "\n", + "import math\n", + "\n", + "#initialisation of variables\n", + "\n", + "\n", + "E=8 #E in V\n", + "R=2.2 #R in Kohm\n", + "I=0 #For open circuit\n", + "\n", + "#Calculations\n", + "\n", + "Vr=I*R \n", + "Vd=E-Vr \n", + "print \"Removing the diode, we find that the direction of I is opposite to the arrow in the diode symbol \\nand the diode equivalent is the open circuit no matter which model isemployed.\"\n", + "print \"The result is the network of Fig. 2.17, where ID = 0A due to the open circuit.\\n\"\n", + "print \"The voltage Vr is = %.1fV\"%(Vr)\n", + "print \"The diode voltage is = %.1fV\"%(Vd)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Removing the diode, we find that the direction of I is opposite to the arrow in the diode symbol \n", + "and the diode equivalent is the open circuit no matter which model isemployed.\n", + "The result is the network of Fig. 2.17, where ID = 0A due to the open circuit.\n", + "\n", + "The voltage Vr is = 0.0V\n", + "The diode voltage is = 8.0V\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8 Page : 61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2.8\n", + "#For the series diode configuration of Fig. 2.19, determine VD, VR, and ID.\n", + "\n", + "import math\n", + "\n", + "#initialisation of variables\n", + "\n", + "\n", + "E=0.5 #E in volt\n", + "R=1.2 #R in Kohm\n", + "Id=0 #For open circuit\n", + "\n", + "\n", + "#calculation\n", + "\n", + "Vr=Id*R\n", + "Vd=E\n", + "\n", + "print \"The voltage Vr is = %.1fV\"%(Vr)\n", + "print \"The diode voltage Vd is = %.1fV\"%(Vd)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The voltage Vr is = 0.0V\n", + "The diode voltage Vd is = 0.5V\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9 Page : 62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2.9 Page no 62\n", + "\n", + "#initialisation of variables\n", + "\n", + "R=5.6 # resistance in kilo ohm\n", + "E=12\t\t\t # supply voltage in volt\n", + "Vt1=0.7 # threshold voltage of siicon in volt\n", + "Vt2=0.3 # threshold voltage of germanium in volt\n", + "\n", + "print \"Applying KVL rule in fig 2.2,\"\n", + "\n", + "Vo=E-(Vt1+Vt2) # resulting voltage in volt\n", + "\n", + "Id=(Vo/R)\n", + "\n", + "print \"The resulting voltage is = %dV\"%(Vo)\n", + "\n", + "print \"The current through diode is = %.2fmA\"%(Id)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Applying KVL rule in fig 2.2,\n", + "The resulting voltage is = 11V\n", + "The current through diode is = 1.96mA\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.12 Page : 64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "\n", + "E=10 #supply voltage in vol't\n", + "R=0.33 #resistance in kilo ohms\n", + "Vd=0.7 # voltage across silicon diode\n", + "\n", + "print\"From figure 2.31 it can be said that both diodes are opened so\"\n", + "\n", + "Vo=0.7 # resulting voltage in volt\n", + "\n", + "I1=(E-Vd)/R\n", + "print\"the value of Id1 is = %.2fmA\"%(I1)\n", + "print\"\\nDiodes are of similar characteristics so\"\n", + "\n", + "Id2=(I1/2)\n", + "print\"the value of Id2 is = %.2fmA\"%(Id2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "From figure 2.31 it can be said that both diodes are opened so\n", + "the value of Id1 is = 28.18mA\n", + "\n", + "Diodes are of similar characteristics so\n", + "the value of Id2 is = 14.09mA\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.13 Page : 65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialization of variables\n", + "\n", + "E1=20 #supply voltage in V\n", + "E2=4 #second port voltage in V\n", + "Vd=0.7 #thresold voltage\n", + "R=2.2 #R in Kohm\n", + "\n", + "\n", + "#calculation\n", + "\n", + "I = (E1-E2-Vd)/R\n", + "\n", + "print \"Diode D1 turn on and Diode D2 turn off\"\n", + "print \"the resultant current I is = %.2fmA\" %(I)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diode D1 turn on and Diode D2 turn off\n", + "the resultant current I is = 6.95mA\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.14 Page :66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialization of variables\n", + "E=12 #supply Voltage in V\n", + "Vd=0.3 #thresold voltage in V\n", + "\n", + "\n", + "#calculation\n", + "\n", + "V0 = E-Vd\n", + "\n", + "print \"If initially both were 'on,'' the 0.7-V drop across the silicon diode would not match the 0.3 V \"\n", + "print \"Across the germanium diode as required by the fact that the voltage across parallel elements must be the same.\"\n", + "print \"\\nThe silicon diode will never have the opportunity to capture its required 0.7 V \\nand therefore remains in its open-circuit state.\"\n", + "print \"the resultant Voltage V0 is = %.1fV\" % (V0)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "If initially both were 'on,'' the 0.7-V drop across the silicon diode would not match the 0.3 V \n", + "Across the germanium diode as required by the fact that the voltage across parallel elements must be the same.\n", + "\n", + "The silicon diode will never have the opportunity to capture its required 0.7 V \n", + "and therefore remains in its open-circuit state.\n", + "the resultant Voltage V0 is = 11.7V\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.15 Page :66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialization of variables\n", + "\n", + "E=20 #supply voltage in V\n", + "VT1=0.7 #thresold voltage\n", + "VT2=0.7 #thresold voltage\n", + "R1=3.3 #R in Kohm\n", + "R2=5.6 #R in Kohm\n", + "\n", + "#calculation\n", + "\n", + "print \"Both Diodes will turn 'on'\"\n", + "print \"So diode voltage will appear over the resistance\"\n", + "\n", + "I1 = (VT2)/R1\n", + "\n", + "print \"the resultant current I2 is = %.3fmA\" %(I1)\n", + "\n", + "print \"\\nApplying Kirchhoff's voltage law around the indicated loop in the clockwise direction yields\"\n", + "\n", + "V2 = E-VT1-VT2\n", + "I2 = V2/R2\n", + "\n", + "print \"the voltage V2 = %.1fV\" %(V2)\n", + "print \"the current I2 = %.2fmA\"%(I2)\n", + "\n", + "#At hte bottom node (a)\n", + "\n", + "ID2=I2-I1\n", + "\n", + "print \"the current I2 = %.3fmA\" %(ID2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Both Diodes will turn 'on'\n", + "So diode voltage will appear over the resistance\n", + "the resultant current I2 is = 0.212mA\n", + "\n", + "Applying Kirchhoff's voltage law around the indicated loop in the clockwise direction yields\n", + "the voltage V2 = 18.6V\n", + "the current I2 = 3.32mA\n", + "the current I2 = 3.109mA\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.18 Page :71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialization of variables\n", + "\n", + "Vm=20 #peak voltage in V\n", + "VT=0.7 #thresold voltage in V\n", + "\n", + "\n", + "#calculation\n", + "#(a)\n", + "print \"(a)\\nIdeal Diode:\"\n", + "\n", + "Vdc1= -(0.318*Vm) #Vdc=-0.318(Vm-VT)\n", + "\n", + "print \" In this situation the diode will conduct during the negative part of the input\"\n", + "print \"For the full period DC level is = %.2fV\" %(Vdc1)\n", + "print \"\\nThe negative sign indicates that the polarity of the output is opposite to the defined polarity\"\n", + "\n", + "\n", + "#(b)\n", + "\n", + "print \"\\n(b)\\nsilicon Diode:\"\n", + "\n", + "Vdc2= -0.318*(Vm-0.7)\n", + "\n", + "print \"Vdc2 = %.2fV\" %(Vdc2)\n", + "\n", + "#(c)\n", + "\n", + "print \"\\n(c)\\nIf Vm is increased to 200V:\"\n", + "\n", + "Vm = 200 #new peak voltage\n", + "Vdc1= -(0.318*Vm)\n", + "Vdc2= -0.318*(Vm-0.7)\n", + "\n", + "print \"using (a), Vdc = %.2fV\" %(Vdc1)\n", + "print \"using (b), Vdc = %.2fV\" %(Vdc2)\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + "Ideal Diode:\n", + " In this situation the diode will conduct during the negative part of the input\n", + "For the full period DC level is = -6.36V\n", + "\n", + "The negative sign indicates that the polarity of the output is opposite to the defined polarity\n", + "\n", + "(b)\n", + "silicon Diode:\n", + "Vdc2 = -6.14V\n", + "\n", + "(c)\n", + "If Vm is increased to 200V:\n", + "using (a), Vdc = -63.60V\n", + "using (b), Vdc = -63.38V\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.19 Page :75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2.19 page no.75\n", + "\n", + "import math\n", + "\n", + "#initialization of variables\n", + "Vi=10 #input voltage in V\n", + "\n", + "#calculation\n", + "\n", + "print \"After redrawing the network configuration,\"\n", + "\n", + "V0 = 0.5*Vi\n", + "\n", + "print \"voltage across the resistance V0 = %dV\" %(V0)\n", + "print \"\\nFor the negative part of the input the roles of the diodes will be interchanged\"\n", + "\n", + "#The effect of removing diodes\n", + "\n", + "Vdc = 0.636*(V0)\n", + "print \"The effect of removing diodes:\"\n", + "print \"\\tReduced available DC level = %.2fV\" %(Vdc)\n", + "print \"\\tPIV = the maximum voltage across R is = %dV\" %(V0)\n", + "print \"or half of that required for a half-wave rectifier with the same input\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "After redrawing the network configuration,\n", + "voltage across the resistance V0 = 5V\n", + "\n", + "For the negative part of the input the roles of the diodes will be interchanged\n", + "The effect of removing diodes:\n", + "\tReduced available DC level = 3.18V\n", + "\tPIV = the maximum voltage across R is = 5V\n", + "or half of that required for a half-wave rectifier with the same input\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/DeepTrambadia/Untitled0.ipynb b/sample_notebooks/DeepTrambadia/Untitled0.ipynb new file mode 100644 index 00000000..e23c7b5f --- /dev/null +++ b/sample_notebooks/DeepTrambadia/Untitled0.ipynb @@ -0,0 +1,154 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3090d4f2b3d4de5b787389193d1e9cb10abedd8dbc02a70d6ec597610190cdf7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2.13 page no.65\n", + "import math\n", + "\n", + "#initialization of variables\n", + "\n", + "E1=20 #supply voltage in V\n", + "E2=4 #second port voltage in V\n", + "Vd=0.7 #thresold voltage\n", + "R=2.2 #R in Kohm\n", + "\n", + "\n", + "#calculation\n", + "\n", + "I = (E1-E2-Vd)/R\n", + "\n", + "print \"Diode D1 turn on and Diode D2 turn off\"\n", + "print \"the resultant current I is %.2fmA\" %(I)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diode D1 turn on and Diode D2 turn off\n", + "the resultant current I is 6.95mA\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2.14 page no.66\n", + "import math\n", + "\n", + "#initialization of variables\n", + "E=12 #supply Voltage in V\n", + "Vd=0.3 #thresold voltage in V\n", + "\n", + "\n", + "#calculation\n", + "\n", + "V0 = E-Vd\n", + "\n", + "print \"If initially both were 'on,'' the 0.7-V drop across the silicon diode would not match the 0.3 V \"\n", + "print \"across the germanium diode as required by the fact that the voltage across parallel elements must be the same\"\n", + "print \"The silicon diode will never have the opportunity to capture its required 0.7 V and therefore remains in its open-circuit state\"\n", + "print \"the resultant Voltage V0 is %.1fV\" % (V0)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "If initially both were 'on,'' the 0.7-V drop across the silicon diode would not match the 0.3 V \n", + "across the germanium diode as required by the fact that the voltage across parallel elements must be the same\n", + "The silicon diode will never have the opportunity to capture its required 0.7 V and therefore remains in its open-circuit state\n", + "the resultant Voltage V0 is 11.7V\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#example 2.15 page no.66\n", + "import math\n", + "\n", + "#initialization of variables\n", + "\n", + "E=20 #supply voltage in V\n", + "VT1=0.7 #thresold voltage\n", + "VT2=0.7 #thresold voltage\n", + "R1=3.3 #R in Kohm\n", + "R2=5.6 #R in Kohm\n", + "\n", + "#calculation\n", + "\n", + "print \"Both Diodes will turn 'on'\"\n", + "print \"So diode voltage will appear over the resistance\"\n", + "\n", + "I1 = (VT2)/R1\n", + "\n", + "print \"the resultant current I2 is %.3fmA\" %(I1)\n", + "\n", + "print \"Applying Kirchhoff's voltage law around the indicated loop in the clockwise direction yields\"\n", + "\n", + "V2 = E-VT1-VT2\n", + "I2 = V2/R2\n", + "\n", + "print \"the voltage V2 =%.1fV\" %(V2)\n", + "print \"the current I2 =%.2fmA\"%(I2)\n", + "\n", + "#At hte bottom node (a)\n", + "\n", + "ID2=I2-I1\n", + "\n", + "print \"the current I2 =%.3fmA\" %(ID2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Both Diodes will turn 'on'\n", + "So diode voltage will appear over the resistance\n", + "the resultant current I2 is 0.212mA\n", + "Applying Kirchhoff's voltage law around the indicated loop in the clockwise direction yields\n", + "the voltage V2 =18.6V\n", + "the current I2 =3.32mA\n", + "the current I2 =3.109mA\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/DeepTrambadia/sc201.ipynb b/sample_notebooks/DeepTrambadia/sc201.ipynb new file mode 100644 index 00000000..b76b0ff0 --- /dev/null +++ b/sample_notebooks/DeepTrambadia/sc201.ipynb @@ -0,0 +1,53 @@ +import math
+
+#(a)
+#initialisation of variables
+
+E=10 #E in V
+R=1 #R in Kohm
+
+
+#Calculations
+
+Id=E/R #Eq.(2.2)
+Vd=E
+print "The current Ic is= %fmA "%(Id),";Vd=0V"
+print "The diode voltage is= %fV"%(Vd),";Id=0A"
+print "The resulting load line appears in Fig. 2.4. The intersection between the load line and the characteristic curve defines the Q-point as"
+print "The level of VD is certainly an estimate, and the accuracy of ID is limited by the chosenscale. A higher degree of accuracy would require a plot that would be much large and perhaps unwieldy"
+
+
+#(B)
+print "(B)"
+Ir=9.25 #Ir in mA
+Vdq=0.78 #Vdq in v
+Vr=Ir*R
+print "Vr = Ir*R = Idq*R %d="%(Vr),"or"
+Vr = E-Vdq
+print "Vr = E-Vdq = %f" %(Vr)
+print "The difference in results is due to the accuracy with which the graph can be read. Ideally,the results obtained either way should be the same."
+
+#Graph solution to example 2.1
+
+import numpy as np
+import matplotlib.pyplot as plt
+
+Vd = np.linspace(0.0,10.0)
+Id = np.linspace(0.0,10.0)
+Id= -Vd + 10
+plt.plot(Vd, Id)
+Vd = [0,0,0.1,0.1,0.2,0.2,0.3,0.3,0.3,0.3,0.4,0.5,0.6,0.7]
+Id = [0,0,0,0,0,0,0,0,0.1,0.1,0.3,0.7,2.0,10.0]
+
+plt.plot(Vd, Id,'yo-')
+
+plt.xlabel('Voltage (v)')
+plt.ylabel('current (mA)')
+plt.title('About as simple as it gets, folks')
+plt.grid(True)
+plt.savefig("test.png")
+
+plt.show()
+
+print "example 2.2:"
+print "repeat the example 2.1 for R =2"
\ No newline at end of file diff --git a/sample_notebooks/DeepTrambadia/sc201_1.ipynb b/sample_notebooks/DeepTrambadia/sc201_1.ipynb new file mode 100644 index 00000000..aa4f487b --- /dev/null +++ b/sample_notebooks/DeepTrambadia/sc201_1.ipynb @@ -0,0 +1,85 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+<html><head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="qrichtext" content="1" /><style type="text/css">
+p, li { white-space: pre-wrap; }
+</style></head><body style=" font-family:'Consolas'; font-size:8pt; font-weight:400; font-style:normal;">
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">IPython QtConsole 3.2.0</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Python 2.7.10 |Anaconda 2.3.0 (64-bit)| (default, May 28 2015, 16:44:52) [MSC v.1500 64 bit (AMD64)]</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Type "copyright", "credits" or "license" for more information.</p>
+<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">IPython 3.2.0 -- An enhanced Interactive Python.</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Anaconda is brought to you by Continuum Analytics.</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Please check out: http://continuum.io/thanks and https://anaconda.org</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">? -> Introduction and overview of IPython's features.</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">%quickref -> Quick reference.</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">help -> Python's own help system.</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">object? -> Details about 'object', use 'object??' for extra details.</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">%guiref -> A brief reference about the graphical user interface.</p>
+<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;">In [</span><span style=" font-weight:600; color:#000080;">1</span><span style=" color:#000080;">]:</span> import math</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> </p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> #(a)</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> #initialisation of variables</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> </p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> E=10 #E in V</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> R=1 #R in Kohm</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> </p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> </p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> #Calculations</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> </p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> Id=E/R #Eq.(2.2)</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> Vd=E</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> print "The current Ic is= %fmA "%(Id),";Vd=0V"</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> print "The diode voltage is= %fV"%(Vd),";Id=0A"</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> print "The resulting load line appears in Fig. 2.4. The intersection between the load line and the characteristic curve defines the Q-point as"</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> print "The level of VD is certainly an estimate, and the accuracy of ID is limited by the chosenscale. A higher degree of accuracy would require a plot that would be much large and perhaps unwieldy"</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> </p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> </p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> #(B)</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> print "(B)"</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> Ir=9.25 #Ir in mA</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> Vdq=0.78 #Vdq in v</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> Vr=Ir*R</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> print "Vr = Ir*R = Idq*R %d="%(Vr),"or"</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> Vr = E-Vdq</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> print "Vr = E-Vdq = %f" %(Vr)</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> print "The difference in results is due to the accuracy with which the graph can be read. Ideally,the results obtained either way should be the same."</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> </p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> #Graph solution to example 2.1</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> </p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> import numpy as np</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> import matplotlib.pyplot as plt</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> </p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> Vd = np.linspace(0.0,10.0)</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> Id = np.linspace(0.0,10.0)</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> Id= -Vd + 10</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> plt.plot(Vd, Id)</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> Vd = [0,0,0.1,0.1,0.2,0.2,0.3,0.3,0.3,0.3,0.4,0.5,0.6,0.7]</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> Id = [0,0,0,0,0,0,0,0,0.1,0.1,0.3,0.7,2.0,10.0]</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> </p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> plt.plot(Vd, Id,'yo-')</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> </p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> plt.xlabel('Voltage (v)')</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> plt.ylabel('current (mA)')</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> plt.title('About as simple as it gets, folks')</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> plt.grid(True)</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> plt.savefig("test.png")</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> </p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> plt.show()</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> </p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> print "example 2.2:"</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> print "repeat the example 2.1 for R =2"</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;"> ...:</span> </p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The current Ic is= 10.000000mA ;Vd=0V</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The diode voltage is= 10.000000V ;Id=0A</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The resulting load line appears in Fig. 2.4. The intersection between the load line and the characteristic curve defines the Q-point as</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The level of VD is certainly an estimate, and the accuracy of ID is limited by the chosenscale. A higher degree of accuracy would require a plot that would be much large and perhaps unwieldy</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(B)</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Vr = Ir*R = Idq*R 9= or</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Vr = E-Vdq = 9.220000</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The difference in results is due to the accuracy with which the graph can be read. Ideally,the results obtained either way should be the same.</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">example 2.2:</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">repeat the example 2.1 for R =2</p>
+<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;">In [</span><span style=" font-weight:600; color:#000080;">2</span><span style=" color:#000080;">]:</span> </p></body></html>
\ No newline at end of file diff --git a/sample_notebooks/DeepTrambadia/sc223.ipynb b/sample_notebooks/DeepTrambadia/sc223.ipynb new file mode 100644 index 00000000..319edd95 --- /dev/null +++ b/sample_notebooks/DeepTrambadia/sc223.ipynb @@ -0,0 +1,34 @@ +#example 2.23 page no.81
+#Repeated example with silicon diode
+import math
+
+#initialization of variables
+
+v=4 #v in Volt
+Vi=[16,-16] #peak voltage in Volt
+VT=0.7 #thresold voltage
+
+#calculation
+
+
+print "+16V dc supply is pressuring the diode to stay in the short circuit state"
+print "But for any Vi < v,it will result in short circuted diode"
+print "But for any Vi > v,it will result in open circuted diode"
+print "If the diode voltage is 0.7V"
+
+v = v-VT
+print "resulting battery input voltage = %.1fV" %(v)
+print "For open circuit state"
+if (Vi[0] >= v):
+ V0=Vi[0]
+ print "V0 =%dV " %(V0)
+
+print "for the negative region of the input signal,the diode will be in the 'on' state"
+
+if [Vi[1]==-16]:
+ V0 = v
+ print "V0 = %.2fV" %(V0)
+
+
+
+
diff --git a/sample_notebooks/DivyangGandhi/ch2.ipynb b/sample_notebooks/DivyangGandhi/ch2.ipynb new file mode 100644 index 00000000..a473f6ff --- /dev/null +++ b/sample_notebooks/DivyangGandhi/ch2.ipynb @@ -0,0 +1,80 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:47d75f27ec6c94d8690b19c8285770e7f28c9cd54fabd419e1b2d7d6e6d4afe5" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : Transmission Lion Structures and Equipment" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 Page No : 77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# GIVEN DATA\n", + "t_s = 0.49 ; # Human body is in contact with 60 Hz power for 0.49 sec\n", + "r = 100 ; # Resistivity of soil based on IEEE std 80-2000 \n", + "\n", + "# CALCULATIONS\n", + "# For case (a)\n", + "v_touch50 = 0.116*(1000+1.5*r)/math.sqrt(t_s) ; # Maximum allowable touch voltage for 50 kg body weight in volts\n", + "\n", + "# For case (b)\n", + "v_step50 = 0.116*(1000+6*r)/math.sqrt(t_s) ; # Maximum allowable step voltage for 50 kg body weight in volts\n", + "# Above Equations of case (a) & (b) applicable if no protective surface layer is used\n", + "\n", + "# For metal to metal contact below equation holds good . Hence resistivity is zero\n", + "r_1 = 0 ; # Resistivity is zero\n", + "\n", + "# For case (c)\n", + "v_mm_touch50 = 0.116*(1000)/math.sqrt(t_s) ; # Maximum allowable touch voltage for 50 kg body weight in volts for metal to metal contact\n", + "\n", + "# For case (d)\n", + "v_mm_touch70 = 0.157*(1000)/math.sqrt(t_s) ; # Maximum allowable touch voltage for 70 kg body weight in volts for metal to metal contact\n", + "\n", + "# DISPLAY RESULTS\n", + "print \" a) Tolerable Touch potential , V_touch50 = %.f V , for 50 kg body weight \"%(v_touch50) ;\n", + "print \" b) Tolerable Step potential , V_step50 = %.f V , for 50 kg body weight \"%(v_step50) ;\n", + "print \" c) Tolerable Touch Voltage for metal-to-metal contact , V_mm_touch50 = %.1f V , for 50 kg body weight \"%(v_mm_touch50) ;\n", + "print \" d) Tolerable Touch Voltage for metal-to-metal contact , V_mm_touch70 = %.1f V , for 70 kg body weight \"%(v_mm_touch70) ;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a) Tolerable Touch potential , V_touch50 = 191 V , for 50 kg body weight \n", + " b) Tolerable Step potential , V_step50 = 265 V , for 50 kg body weight \n", + " c) Tolerable Touch Voltage for metal-to-metal contact , V_mm_touch50 = 165.7 V , for 50 kg body weight \n", + " d) Tolerable Touch Voltage for metal-to-metal contact , V_mm_touch70 = 224.3 V , for 70 kg body weight \n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/DivyangGandhi/ch5.ipynb b/sample_notebooks/DivyangGandhi/ch5.ipynb new file mode 100755 index 00000000..696c90f4 --- /dev/null +++ b/sample_notebooks/DivyangGandhi/ch5.ipynb @@ -0,0 +1,422 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:99b4244f7dba40fbe6b1f9647ffae37a043c932f7cb3e888c2ad7aac3ff9563e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : Flow in Channels" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page No : 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "h= 2.5 \t#ft depth of water\n", + "a= 45. \t#degrees side slope\n", + "x= 5. \t#ft\n", + "Q= 45. \t#cuses\n", + "v= 2.6 \t#ft/sec velocity\n", + "w= 6.92 \t#ft \n", + "C= 120.\n", + "\n", + "#CALCULATIONS\n", + "b= (Q/(v*h))-h\n", + "p= b+2*(h+math.sqrt(2))\n", + "A= h*w\n", + "m= A/p\n", + "i= (v/(C*math.sqrt(m)))**2\n", + "\n", + "#RESULTS\n", + "print 'Width = %.2f ft'%(b) \n", + "print ' Slope = %.6f '%(i) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Width = 4.42 ft\n", + " Slope = 0.000332 \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page No : 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "a= 60. \t#degrees sides inclined\n", + "i= 1./1600\n", + "Q= 8.*10**6 \t#gal/hr discharge\n", + "M= 110.\n", + "w= 6.24 \t#lb/ft**3\n", + "\n", + "#CALCULATIOS\n", + "d= ((Q*2**(2./3)*math.sqrt(1./i))/(w*3600*math.sqrt(3)*M))**(3./8)\n", + "b=6.93 \t#ft\n", + "\n", + "#RESULTS\n", + "print 'Diameter = %.f ft'%(d) \n", + "print ' breadth = %.2f ft'%(b)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diameter = 6 ft\n", + " breadth = 6.93 ft\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page No : 71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/swc**2\n", + "Q= 40. \t#cuses rate\n", + "w= 5.5 \t#ft\n", + "h= 9. \t#in depth\n", + "d= 0.75 \t#ft\n", + "V= 3. \t#ft/sec\n", + "\n", + "#CALCULATIONS\n", + "D= ((Q*2)**2/(g*(w*2)**2))**(1./3)\n", + "v= Q*d/w\n", + "D1= math.sqrt((2*v**2*d/g)+h/64)-(d/2)\n", + "dD= D1-d\n", + "El= -dD+((v**2*(1-(V/v)**2))/(2*g))\n", + "Els= Q*El*62.4/550\n", + "\n", + "#RESULTS\n", + "print 'Critical depth = %.2f ft'%(D)\n", + "print ' Rise in level = %.f ft'%(D1)\n", + "print ' Horse-power lost = %.3f hp'%(Els) \n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical depth = 1.18 ft\n", + " Rise in level = 1 ft\n", + " Horse-power lost = 0.961 hp\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 Page No : 77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "b= 3.5 \t#ft\n", + "H= 2.5 \t#ft\n", + "w= 3. \t#ft depth\n", + "h= 6. \t#ft wide\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "Q= 3.09*b*H**1.5\n", + "v= Q/(w*h)\n", + "H1= H+(v**2/(2*g))\n", + "Q1= 3.09*b*H1**1.5\n", + "hc= (Q1**2/(b**2*g))**(1./3)\n", + "h2= 0.5*(math.sqrt(hc**2+8*hc**2)-hc)\n", + "dh= h2+b-w\n", + "\n", + "#RESULTS\n", + "print \"Flow rate = %.1f cusecs\"%(Q)\n", + "print \" Flow rate = %d cusecs\"%(Q1)\n", + "print ' maximum depth of water downstream = %.3f ft'%(dh) \n", + "print ' Shooting flow depth at hump = %.3f ft'%(h2) \n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Flow rate = 42.8 cusecs\n", + " Flow rate = 45 cusecs\n", + " maximum depth of water downstream = 2.226 ft\n", + " Shooting flow depth at hump = 1.726 ft\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7 Page No : 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "m= 60./26\n", + "i= 1./2000\n", + "h1= 3. \t#ft depth\n", + "h2= 5. \t#ft depth\n", + "m1= 10./3\n", + "C= 90. # constant\n", + "l= 500. \t#ft depth\n", + "H= 20. \t#ft broad\n", + "H1= 29.62 \t#ft\n", + "g= 32.2 \t#ft/s**2\n", + "\n", + "#CALCULATIONS\n", + "v= 90*math.sqrt(m*i)\n", + "v1= v*h1/h2\n", + "dh= (i-(v1**2/(C**2*m1)))*l/(1-v1**2/(g*h2))\n", + "h3= h2-dh\n", + "V= h1*v/h3\n", + "\n", + "#RESULTS\n", + "print 'Height of water 1000 ft upstream = %.3f ft'%(h3) \n", + "print ' Height of water upstream = %.3f ft'%(h3) \n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Height of water 1000 ft upstream = 4.808 ft\n", + " Height of water upstream = 4.808 ft\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8 Page No : 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "v= 5. \t #ft/sec\n", + "m= 60./26\n", + "i= 1./2000\n", + "h= 5.5 \t#ft\n", + "m1= 110./31\n", + "d= 3. \t #ft\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "C= v/(math.sqrt(m*i))\n", + "v1= v*d/h\n", + "r= (i-(v1**2/(C**2*m1)))/(1-(v1**2/(g*h)))\n", + "x= 1/r\n", + "\n", + "#RESULTS\n", + "print 'Distance upstream = %.f ft'%(round(x,-1)) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Distance upstream = 2380 ft\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 Page No : 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "from numpy import *\n", + "from numpy.linalg import *\n", + "\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/sec**2\n", + "Q= 12 \t#cuses\n", + "\n", + "#CALCULATIONS\n", + "hc= (Q/(3*math.sqrt(g)))**(2./3)\n", + "vec=roots([1,6,12,8,0,-8.95,-8.95])\n", + "H=vec[2]\n", + "\n", + "#RESULTS\n", + "print 'Critical depth = %.2f ft'%(hc) \n", + "print ' Critical depth = %.2f ft'%(H) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical depth = 0.79 ft\n", + " Critical depth = 0.89 ft\n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "-c:17: ComplexWarning: Casting complex values to real discards the imaginary part\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11 Page No : 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "Cd= 0.64 # coefficient\n", + "g= 32.2 \t#ft/sec**2\n", + "A= 12.5 \t#ft**2\n", + "H= 24.8 \t#ft\n", + "Q= 3200. \t#cuses\n", + "b= 150. \t#ft wide\n", + "A1= 5.*10**6 # avg surface area\n", + "h= 9. \t#ft\n", + "h1= 6. \t #in\n", + "\n", + "#CALCULATIONS\n", + "N= Q/(Cd*A*math.sqrt(2*g*H))\n", + "H1= (Q/(3.2*b))**(2./3)\n", + "ES= (H1-(h1/12))*A1*h\n", + "\n", + "#RESULTS\n", + "print 'number of siphons = %.f '%(N) \n", + "print ' Extra Storage = %.2e ft**3'%(ES) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "number of siphons = 10 \n", + " Extra Storage = 1.37e+08 ft**3\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/GauravMittal/chapter2.ipynb b/sample_notebooks/GauravMittal/chapter2.ipynb new file mode 100755 index 00000000..739819fc --- /dev/null +++ b/sample_notebooks/GauravMittal/chapter2.ipynb @@ -0,0 +1,349 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Ch-2 : DC Machines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exam:2.1 page 112" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Calculate the increase of main field flux in percentage\n", + "N_1=750 #speed of dc machine(in rpm)\n", + "E_1=220 #induced emf in dc machine when running at N_1\n", + "N_2=700 #speed of dc machine second time (in rpm)\n", + "E_2=250 #induced emf in dc machine when running at N_2\n", + "F=E_2*N_1/(E_1*N_2) \n", + "Inc=(F-1) \n", + "print 'increase in main field flux of the dc machine =',round((Inc*100),2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "increase in main field flux of the dc machine = 21.75\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exam:2.2 page 114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#a)find the emf generated in a 6 pole machine b)find speed at which machine generated 550 V emf\n", + "F_1=0.06 #Flux per pole(in Wb)\n", + "N_1=250 #speed of the rotor(in rpm)\n", + "A=2 #number of parllel (paths armature wave wound)\n", + "P=6 #poles in machine\n", + "Z=664 #total conductor in machine\n", + "E_g=P*F_1*N_1*Z/(60*A) #emf generated\n", + "print \"emf generated in machine =\",E_g,\"Volts\"\n", + "E_2=550 #new emf generating machine(in V)\n", + "F_2=0.058 #flux per pole (in Wb) for generating E_2\n", + "N_2=60*E_2*A/(P*F_2*Z) #new speed at which machine generating E_2(in rpm)\n", + "print \"new speed of the rotor =\",round(N_2,2),\"rpm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "emf generated in machine = 498.0 Volts\n", + "new speed of the rotor = 285.63 rpm\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exam:2.3 page 116" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#determine the value of torque in Nw-m\n", + "F=24 #flux per pole (in m Wb)\n", + "F_1=F*10**-3 #flux per pole (in Wb)\n", + "Z=760 #number of conductors in armature\n", + "P=4 #number of pole\n", + "A=2 #number of parallel paths\n", + "I_a=50 #armature cuurrent(in Amp)\n", + "T_a=0.159*F_1*Z*P*I_a/A #torque develope(in Nw-m)\n", + "print \"torque developed in machine =\",round(T_a,2),\"Nw-m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "torque developed in machine = 290.02 Nw-m\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exam:2.4 page 119" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the total torque in Nw-m\n", + "P=6 #poles \n", + "A=P #number of parallel paths\n", + "S=60 #slots in motor\n", + "C_s=12 #conductor per slot\n", + "Z=S*C_s #total conductor in machine\n", + "I_a=50 #armature current(in Amp)\n", + "F_1=20#flux per pole(in m Wb)\n", + "F_2=F_1*10**-3 #flux per pole)(in Wb)\n", + "T=0.15924*F_2*Z*P*I_a/A #total torque (in Nw-m)\n", + "print 'total torque by motor =',T,'Nw-m' " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total torque by motor = 114.6528 Nw-m\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exam 2.5 page 132" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import ceil\n", + "#Calculate the drop in speed when motor takes 51 Amp\n", + "V=220 #supply voltage(in V)\n", + "R_sh=220 #shunt field resistance(in Ohm)\n", + "R_a=0.2 #armature resistance(in Ohm)\n", + "I_sh=V/R_sh #shunt field current(in Amp)\n", + "N_1=1200 #starting speed of the motor(in rpm)\n", + "I_1=5.4 #at N_1 speed current in motor(in Amp)\n", + "I_a1=I_1-I_sh #armature current at speed N_1(in Amp)\n", + "E_b1=V-I_a1*R_a #emf induced due to I_a1(in V)\n", + "I_2=51 #new current which motor taking(in Amp)\n", + "I_a2=I_2-I_sh #armature current at I_2(in Amp)\n", + "E_b2=V-I_a2*R_a #emf induced due to I_a2(in V)\n", + "N_2=E_b2*N_1/E_b1 #speed of the motor when taking I_2 current(in rpm)\n", + "N_r=ceil(N_1-N_2) #reduction in speed(in rpm)\n", + "print 'reduction in speed =',N_r,'rpm'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "reduction in speed = 50.0 rpm\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exam:2.6 page 135" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#In a dc machine Calculate (a)induced emf (b)Electro magnetic torque (c)armature copper loss \n", + "V=220 #voltage at the armature of dc motor\n", + "I_a=15 #current through armature(in Amp)\n", + "R_a=1 #armature resistance(in Ohm)\n", + "w=100 #speed of the machine(in radian/sec)\n", + "E=V-I_a*R_a #induced emf(in V)\n", + "print 'induced emf =',E,'V' \n", + "T=E*I_a/w #electro magnentic torque developed(in Nw-m)\n", + "print 'electro magnentic torque developed =',T,'Nw-m'\n", + "L=(I_a**2)*R_a #Armature copper loss(in Watt)\n", + "print 'Armature copper loss =',L,'Watt'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "induced emf = 205 V\n", + "electro magnentic torque developed = 30.75 Nw-m\n", + "Armature copper loss = 225 Watt\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exam:2.7 page 135" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Calculate the electro magnetic torque\n", + "E=250 #emf induced in dc machine(in V)\n", + "I_a=20 #current flowing through the armature(in Amp)\n", + "N=1500 #speed(in rpm)\n", + "T_e=0.1591*E*I_a*60/N #torque developed in machine(in Nw-m)\n", + "print 'electro magnetic torque developed in dc machine =',T_e,'Nw-m'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "electro magnetic torque developed in dc machine = 31.82 Nw-m\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exam:2.8 page 136" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#calculate the gross torque in dc machine\n", + "P=4 #number of poles \n", + "Z=1600 #number of armature conductor\n", + "F=0.027 #flux per pole(in Wb)\n", + "A=2 #number of parallel paths (wave wound)\n", + "I=75 #current in machine(in Amp)\n", + "N=1000 #speed of the motor(in rpm)\n", + "T=0.1591*P*F*Z*I/A #torque generate in machine(in Nw-m)\n", + "print 'Torque generated in machine =',T,'Nw-m'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Torque generated in machine = 1030.968 Nw-m\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exam:2.9 page 140" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Calculate the value of back emf\n", + "V=230 #applied voltage (in V)\n", + "R_a=0.1 #armature resistance(in Ohm)\n", + "I_a=60 #armature current (in Amp)\n", + "E_b=V-I_a*R_a #back emf(in Volts)\n", + "print 'back emf produced by machine =',E_b,'V'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "back emf produced by machine = 224.0 V\n" + ] + } + ], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +} diff --git a/sample_notebooks/GirirajsinhDodiya/ch7.ipynb b/sample_notebooks/GirirajsinhDodiya/ch7.ipynb new file mode 100755 index 00000000..b5eb3280 --- /dev/null +++ b/sample_notebooks/GirirajsinhDodiya/ch7.ipynb @@ -0,0 +1,453 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:8fbfdaa034f011c9304b20c16adbf915d0a8f58f4b89051b6e8db7227dd1440f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 : Flow Under Varying Head" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1 Page No : 139" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad\n", + "\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/sec**2\n", + "d= 6. \t#ft\n", + "di= 2. \t #in\n", + "h= 9. \t #ft\n", + "Cd= 0.6\n", + "\n", + "#CALCULATIONS\n", + "def fun(H):\n", + " return H**-0.5*(d/2)**2*math.pi/(Cd*math.pi*math.sqrt(2*g)/144)\n", + "\n", + "\n", + "vec2=quad(fun,0,h)\n", + "T= vec2[0]\n", + "\n", + "#RESULTS\n", + "print 'Time to emptify = %.f sec'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time to emptify = 1615 sec\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2 Page No : 140" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad\n", + "\n", + "#initialisation of variables\n", + "d1= 4. \t#ft\n", + "d2= 2. \t #in\n", + "l= 300. \t#ft\n", + "P= 5. \t #lb/in**2\n", + "h1= 3. \t #ft\n", + "h2= 6. \t #ft\n", + "f= 0.01\n", + "\n", + "#CALCULATIONS\n", + "X= P*2.31*10*(d2/12)**5/(f*l)\n", + "A= math.pi*d1**2/4\n", + "\n", + "def fun(h):\n", + " return A*math.sqrt((P*2.31*10*(d2/12)**5/(f*l))-(10*(d2/12)**5*h/(f*l)))/(10*(d2/12)**5/(f*l))/7\n", + "\n", + "vec2=quad(fun,h1,h2)\n", + "T= vec2[0]\n", + "\n", + "#RESULTS\n", + "print 'time for the channel to fall = %.2f sec'%(T)\n", + "\n", + "# rounding error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time for the channel to fall = 689.35 sec\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3 Page No : 141" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.integrate import quad\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "d= 10. \t#in\n", + "l= 15. \t#ft\n", + "di= 3. \t#in\n", + "Cd= 0.62 \n", + "g=32.2\n", + "\n", + "#CALCULATIONS\n", + "def fun(H):\n", + " return -l*2*math.sqrt((d/2)**2-((d/2)-H)**2)/(Cd*(math.pi*(di/12)**2/4)*H**0.5*math.sqrt(2*g))\n", + "\n", + "vec2=quad(fun,0,d/2)\n", + "T= vec2[0]\n", + "secs = -T%60\n", + "mins = -T/60\n", + "#RESULTS\n", + "print 'time for the channel to fall = %d mins and %d seconds'%(mins,secs)\n", + "\n", + "# rounding error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time for the channel to fall = 27 mins and 54 seconds\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4 Page No : 142" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad\n", + "\n", + "#initialisation of variables\n", + "h= 4. \t#ft\n", + "w= 6. \t#ft\n", + "l= 100. \t#yd\n", + "a= 60. \t#degrees\n", + "h1= 3. \t#ft\n", + "h2= 2. \t#ft\n", + "Cd= 0.6\n", + "g=32.2 \t#ft/s**2\n", + "\n", + "#CALCULATIONS\n", + "A= l*3*w\n", + "def fun(H):\n", + " return -A*H**-2.5/(Cd*(8./15)*(math.tan(math.radians(a/2)))*math.sqrt(2*g))\n", + "\n", + "vec2=quad(fun,h1,(h1-h2))\n", + "T= vec2[0]\n", + "\n", + "#RESULTS\n", + "print 'time for the channel to fall = %.f sec'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time for the channel to fall = 654 sec\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5 Page No : 143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "A= 1./16 \t#mile**2\n", + "d= 2. \t#ft\n", + "h= 18. \t#ft\n", + "h1= 5. \t#ft\n", + "f= 0.006\n", + "l= 200. \t#ft\n", + "h2= 10. \t#ft\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "X= math.sqrt(1./((1.5+(4*f*l/d))/(2*g)))\n", + "def fun(H):\n", + " return A*5280**2*H**-0.5/(math.pi*d**2*X/4)\n", + "\n", + "vec2=quad(fun,h-h1,h)\n", + "T= vec2[0]\n", + "hours = T/3600\n", + "mins = T%3600/60\n", + "\n", + "#RESULTS\n", + "print 'time for the channel to fall = %d hours and %d mins sec'%(hours,round(mins,-1))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time for the channel to fall = 48 hours and 20 mins sec\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.6 Page No : 144" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "l= 8. \t#ft\n", + "b= 6. \t#ft\n", + "h= 10. \t#ft\n", + "r= 3.\n", + "Cd= 0.6\n", + "A1= 36. \t#ft**2\n", + "A2= 12. \t#ft**2\n", + "l1= 6. \t#ft\n", + "h1= 1. \t#ft\n", + "d= 2. \t#in\n", + "g=32.2 \t#ft/s**2\n", + "\n", + "#CALCULATIONS\n", + "def fun(H):\n", + " return H**-0.5/(Cd*(math.pi*(d/12)**2/4)*math.sqrt(2*g)*((1/A1)+(1/A2)))\n", + "\n", + "vec2=quad(fun,0,(b-h1))\n", + "T= vec2[0]\n", + "\n", + "#RESULTS\n", + "print 'time for the levels to become equal = %.f sec'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time for the levels to become equal = 383 sec\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7 Page No : 145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "h1= 3. \t#ft\n", + "h2= 4. \t#ft diameter\n", + "r= 0.95 \t#m**-1\n", + "k= 27.65 \t#sec\n", + "Cd= 0.95\n", + "\n", + "#CALCULATIONS\n", + "T= k*(math.log(r*math.sqrt(h2)-1)+(r*math.sqrt(h2)-1))-k*(math.log(r*math.sqrt(h1)-1)+(r*math.sqrt(h1)-1))\n", + "h= ((h2-h1)/Cd)**2\n", + "\n", + "#RESULTS\n", + "print 'Time = %.2f sec'%(T)\n", + "print ' Increase in water level = %.2f ft'%(h)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time = 16.23 sec\n", + " Increase in water level = 1.11 ft\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.8 Page No : 146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "t= 75. \t#sec\n", + "h= 10.5 \t#in constant\n", + "h1= 13.5 \t#in\n", + "\n", + "#CALCULATIONS\n", + "r= t*math.pi*math.sqrt(2*h**2)/math.log((math.sqrt(2*h1**2)+h1)/(math.sqrt(2*h**2)-h))\n", + "t= -r*((1/h1)-(1/h))\n", + "\n", + "#RESULTS\n", + "print 'A/K = %.f '%(r)\n", + "print ' Time taken = %.1f sec'%(t)\n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "A/K = 1737 \n", + " Time taken = 36.8 sec\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.9 Page No : 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "g= 9.8 \t#m/sec**2\n", + "h1= 10. \t#in\n", + "h2= 12. \t#in\n", + "r1= 1.32\n", + "r2= 1.56\n", + "r3= 1.97\n", + "r4= 4.10\n", + "r5= 2.64\n", + "\n", + "#CALCULATIONS\n", + "Q= math.sqrt(32.2)*(h2/18)**1.5\n", + "T= 10**5*(r1+2*r3+r4+4*(r3+r5))/(6*h2*60*60)\n", + "\n", + "#RESULTS\n", + "print 'Actual discharge = %.2f CBH**1.5 cuses'%(Q)\n", + "print ' Time = %.1f hr'%(T)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Actual discharge = 3.09 BH**1.5 cuses\n", + " Time = 10.7 hr\n" + ] + } + ], + "prompt_number": 20 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/GirishVora/ch2.ipynb b/sample_notebooks/GirishVora/ch2.ipynb new file mode 100755 index 00000000..9eb5c1ee --- /dev/null +++ b/sample_notebooks/GirishVora/ch2.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/sample_notebooks/Haseen/ch4.ipynb b/sample_notebooks/Haseen/ch4.ipynb new file mode 100755 index 00000000..c4d5994a --- /dev/null +++ b/sample_notebooks/Haseen/ch4.ipynb @@ -0,0 +1,376 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Ch-4, Permanent Magnet Generators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1 page 222 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, floor\n", + "# Given data\n", + "kf=0.12 # in Nm/A\n", + "V=48 #in volt\n", + "\n", + "#Calculations\n", + "omega_mo=V/kf#in radian/sec\n", + "No=omega_mo*60/(2*pi)#in rpm\n", + "print \"No load speed in rpm =\",floor(No) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No load speed in rpm = 3819.0\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 page 223" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Tst=1.0 # in N-m\n", + "Ist=5.0 #in Ampere\n", + "V=28.0 #in volt\n", + "\n", + "#Calculations\n", + "kf=Tst/Ist #in Nm/A\n", + "omega_m=V/kf#in radian/sec\n", + "No=omega_m*60/(2*pi)#in rpm\n", + "print \"No load speed in rpm =\", No " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No load speed in rpm = 1336.90152197\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3 page 223" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Ra=0.8 #in \u03a9\n", + "Vdd=2 #in volt\n", + "V=28 #in volt\n", + "T1=0.3 # in N-m\n", + "Tst=1 # in N-m\n", + "Ist=5 #in Ampere\n", + "\n", + "#Calculations\n", + "#We know : Tst = fi_1*Ist and T1 = IL*fi_2\n", + "#Deviding these two eqn we have\n", + "IL=(T1/Tst)*Ist/0.8 #in Ampere\n", + "Ebo=V #in volt\n", + "NLbyNo=(V-IL*Ra-Vdd)/(0.8*Ebo) # temporary calculation for NL\n", + "No=1337 #in rpm\n", + "NL=NLbyNo*No #in rpm\n", + "print \"Speed of motor in rpm =\",NL " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed of motor in rpm = 1462.34375\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4 page 224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "ke=0.12 #in Nm/A\n", + "V=48 #in volt\n", + "Rph=0.15 #in \u03a9\n", + "Vdd=2 #in volt\n", + "\n", + "#Calculations\n", + "omega_mo=V/ke#in radian/sec\n", + "No=omega_mo*60/(2*pi)#in rpm\n", + "print \"No load speed in rpm =\",No \n", + "\n", + "Ist=(V-Vdd)/(2*Rph) #in Ampere\n", + "Tst=ke*Ist # in N-m\n", + "print \"Starting Torque in N-m =\",Tst \n", + "#Note : answer is wrong in the book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No load speed in rpm = 3819.71863421\n", + "Starting Torque in N-m = 18.4\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 page 225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Vs=120 #in volt\n", + "V=60 #in volt\n", + "Ra=2.5 #in \u03a9\n", + "T=0.5 # in N-m\n", + "N=6000#in rpm\n", + "\n", + "#Calculations\n", + "\n", + "omega_mo=2*pi*N/60#in radian/sec\n", + "ke=Vs/omega_mo #in Nm/A\n", + "Ia=T/ke #in Ampere\n", + "E=V-Ia*Ra #in Volt\n", + "omega_m=E/ke#in radian/sec\n", + "N=omega_m/(2*pi/60) #in rpm\n", + "print \"Speed in rpm =\",N \n", + "#Note : answer is wrong in the book because calculation is not accurate. ." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed in rpm = 2672.75076525\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6 page 226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "lm=6*10**-3 #magnet length in m\n", + "g=2*10**-3 #in m\n", + "Tph=200.0 #turns\n", + "Br=0.3 #in T\n", + "l=50*10**-3 #in m\n", + "n=25*10**-3 #in m\n", + "I=10*10**-3 #in A\n", + "N=200.0 #turns\n", + "mo=4.0*pi*10**-7 #permittivity\n", + "#Calculations\n", + "Am=(2/3)*pi*(n-g-lm/2)*l #in m**2\n", + "Ag=((2/3)*pi*(n-g/2)+2*g)*(l+2*g) #in m**2 \n", + "Cfi=Am/Ag #unitless\n", + "#For normal BLDG motor, HC=606 KA/M\n", + "HC=606 #in KA/M\n", + "Hm=N*I/l #KA/M\n", + "Bm=Br*(1-Hm/HC) #in T\n", + "Mrec=(Br-Bm)*10**-3.0/(4*pi*10**-7*40) \n", + "Pmo=mo*Mrec*Am/lm #in m-Wb/AT\n", + "Pmo=Pmo*10**-3 #in Wb/AT\n", + "Kc=1.05 #given constant\n", + "g_dash=Kc*g #in m\n", + "Rg=g_dash/mo/Am \n", + "Bg=Cfi*Br/(1+Pmo*Rg) #in T\n", + "Torque=2*Tph*Bg*l*n*I #in N-m\n", + "print \"Torque per phase in N-m =\",Torque " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Torque per phase in N-m = 0.00107194515868\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7 page 228" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sin, sqrt, pi\n", + "# Given data\n", + "P=16 #no.of poles\n", + "slots=144 #no. of slotes\n", + "conductors=10 #per slot\n", + "fi=0.03 #in mb/pole\n", + "N=375#in rpm\n", + "\n", + "#Calculations\n", + "f=P*N/120 #in Hz\n", + "print f,\"Frequency in Hz = \" \n", + "kc=1 #for full pitcheed coil\n", + "n=slots/P #slots per pole\n", + "Beta=180/n #in degree\n", + "m=n/3 #slots per pole per phase\n", + "kd=sin(3*Beta/2*pi/180)/(m*sin(Beta/2*pi/180)) #Distribution factor\n", + "Z=conductors*slots #total no. of conductors\n", + "Zph=Z/3 # no. of armature per phase conductions\n", + "Tph=Zph/2 #turns/ph\n", + "Eph=4.44*kc*kd*f*fi*Tph #in volts\n", + "print Eph,\"Phase Voltage in volts = \" \n", + "VL=sqrt(3)*Eph #in volt\n", + "print \"Line Voltage in Volts =\",VL " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "50.0 Frequency in Hz = \n", + "1534.13645671 Phase Voltage in volts = \n", + "Line Voltage in Volts = 2657.20228876\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8 page 229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import cos\n", + "# Given data\n", + "P=4 #no.of poles\n", + "phase=3 #no. of phase\n", + "slots=36 #no. of stator slotes\n", + "turns=20 #turns per coil\n", + "conductors=10 #per slot\n", + "fi_m=1.8 #in m wb\n", + "N=3000#in rpm\n", + "\n", + "#Calculations\n", + "f=P*N/120 #in Hz\n", + "Tph=turns*phase*P #no. of turns per phase\n", + "m=slots/(phase*P) #slots per pole per phase\n", + "n=slots/P #slots per pole\n", + "beta=180/n #in degree\n", + "kd1=sin(3*beta/2*pi/180)/(m*sin(beta/2*pi/180)) #Distribution factor\n", + "alfa=2*beta #in degree(Short Pitched by 2slots)\n", + "kp1=cos(alfa/2*pi/180) #unitless\n", + "ks1=1 #coefficient\n", + "kn1=kd1*kp1*ks1 #winding factor\n", + "Eq=4.44*f*fi_m*10**-3*kn1*Tph #in volts\n", + "print \"Open Circuit Phase emf in Volts =\",Eq " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Open Circuit Phase emf in Volts = 172.994004918\n" + ] + } + ], + "prompt_number": 34 + } + ], + "metadata": {} + } + ] +} diff --git a/sample_notebooks/HimanshuRajput/chapter3.ipynb b/sample_notebooks/HimanshuRajput/chapter3.ipynb new file mode 100755 index 00000000..16142135 --- /dev/null +++ b/sample_notebooks/HimanshuRajput/chapter3.ipynb @@ -0,0 +1,798 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:f5ac69af9ae1d841a7df309d87210c9fa6bb22448fba66aee7e2b96f7445f61f"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter3:THREE PHASE CIRCUITS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.1:pg-286"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import cmath\n",
+ "f=50.0; #Assigning values to parameters\n",
+ "Vl=400.0;\n",
+ "Rph=20.0;\n",
+ "L=0.5;\n",
+ "Xl=2*math.pi*f*L;\n",
+ "Zph=20+1j*157;\n",
+ "[r,t]=cmath.polar(Zph);\n",
+ "Vph=Vl/sqrt(3); #Star connection\n",
+ "Iph=Vph/r;\n",
+ "Il=Iph;\n",
+ "P=sqrt(3)*Vl*Il*cos(t);\n",
+ "print\"The line current for Star connection is Il=\",round(Il,2),\"Amperes\"\n",
+ "print\"The total power absorbed in Star connection is P=\",round(P,3),\"Watts\"\n",
+ "Vph=Vl; #Delta connection\n",
+ "Iph=Vph/r;\n",
+ "Il=sqrt(3)*Iph;\n",
+ "P=sqrt(3)*Vl*Il*cos(t);\n",
+ "print\"The line current for Delta connection is Il=\",round(Il,2),\"Amperes\"\n",
+ "print\"The total power absorbed in Delta connection is P=\",round(P,2),\"Watts\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The line current for Star connection is Il= 1.46 Amperes\n",
+ "The total power absorbed in Star connection is P= 127.75 Watts\n",
+ "The line current for Delta connection is Il= 4.38 Amperes\n",
+ "The total power absorbed in Delta connection is P= 383.25 Watts\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.2:pg-288"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import cmath\n",
+ "f=50 #Assigning values to parameters\n",
+ "rph=8\n",
+ "l=0.02\n",
+ "xl=2*math.pi*f*l\n",
+ "vl=230\n",
+ "f=50\n",
+ "vph=vl/sqrt(3)\n",
+ "zph=8+1j*6.28\n",
+ "[r,t]=cmath.polar(zph)\n",
+ "iph=vph/r\n",
+ "il=iph\n",
+ "p=sqrt(3)*vl*il*cos(t)\n",
+ "q=sqrt(3)*vl*il*sin(t)\n",
+ "s=sqrt(3)*vl*il\n",
+ "print\"The line current is il=\",round(il,2),\"Amperes\"\n",
+ "print\"The total Power absorbed is P=\",round(P,2),\"Watts\"\n",
+ "print\"The reactive volt amperes is q=\",round(q,2),\"VAR\"\n",
+ "print\"The Volt amperes is s=\",round(s,2),\"Volt Ampere\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The line current is il= 13.06 Amperes\n",
+ "The total Power absorbed is P= 383.25 Watts\n",
+ "The reactive volt amperes is q= 3211.69 VAR\n",
+ "The Volt amperes is s= 5201.33 Volt Ampere\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.3:pg-289"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import cmath\n",
+ "Vl=230; #Assigning values to parameters\n",
+ "f=50;\n",
+ "Rph=15;\n",
+ "L=0.03;\n",
+ "Xl=2*math.pi*f*L;\n",
+ "Zph=15+1j*9.42;\n",
+ "[r,t]=cmath.polar(Zph)\n",
+ "Vph=Vl;\n",
+ "Iph=Vph/r;\n",
+ "Il=sqrt(3)*Iph;\n",
+ "P=sqrt(3)*Vl*Il*cos(t);\n",
+ "print\"Phase current is Iph=\",round(Iph,2),\"Amperes\"\n",
+ "print\"Line current is Il=\",round(Il,1),\"Amperes\"\n",
+ "print\"Power absorbed is=\",round(P/1000,2),\"KW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Phase current is Iph= 12.99 Amperes\n",
+ "Line current is Il= 22.5 Amperes\n",
+ "Power absorbed is= 7.59 KW\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.4:pg-290"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import cmath\n",
+ "f=50#assigning values to the parameters\n",
+ "xc=200\n",
+ "vph=400\n",
+ "vl=vph\n",
+ "zph=14.151-1j*200\n",
+ "[r,t]=cmath.polar(zph)\n",
+ "iph=vph/r\n",
+ "il=sqrt(3)*iph\n",
+ "p=sqrt(3)*vl*il*cos(t)\n",
+ "pwr=vph*iph*cos(t)\n",
+ "c=1.0/(2*math.pi*f*xc)\n",
+ "print\"power consumed in each branch of delta is pwr=\",round(pwr,2),\"Watts\"\n",
+ "print\"capacitive reactance is c=\"\"{:.2e}\".format(c),\"Farads\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "power consumed in each branch of delta is pwr= 56.32 Watts\n",
+ "capacitive reactance is c=1.59e-05 Farads\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.5:pg-290"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import cmath\n",
+ "l=50 #Assigning values to parameters\n",
+ "w=800\n",
+ "c=50\n",
+ "xl=w*l\n",
+ "xc=1/(w*c)\n",
+ "z1=0+1j*40\n",
+ "z2=50\n",
+ "z3=0-1j*25\n",
+ "zph=z1+z2*z3/(z2+z3)\n",
+ "[r,t]=cmath.polar(zph)\n",
+ "vl=550\n",
+ "vph=vl\n",
+ "iph=vph/r\n",
+ "il=sqrt(3)*iph\n",
+ "p=sqrt(3)*vl*il*cos(t)\n",
+ "pf=cos(t)\n",
+ "q=sqrt(3)*vl*il*sin(t)\n",
+ "s=sqrt(3)*vl*il\n",
+ "print\"The phase current is\",round(iph,2),\"Amperes\"\n",
+ "print\"The line current is\",round(il,2),\"Amperes\"\n",
+ "print\"The power drawn is\",round(p/1000,2),\"kw\"\n",
+ "print\"The power factor is\",round(pf,2)\n",
+ "print\"The reactive power is\",round(q/1000,2),\"kw\"\n",
+ "print\"The kva rating of load is\",round(s/1000,2),\"KVA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The phase current is 24.6 Amperes\n",
+ "The line current is 42.6 Amperes\n",
+ "The power drawn is 18.15 kw\n",
+ "The power factor is 0.45\n",
+ "The reactive power is 36.3 kw\n",
+ "The kva rating of load is 40.58 KVA\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.7:pg-294"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import cmath\n",
+ "p=10000 #Assigning values to parameters\n",
+ "t=math.acos(0.6)\n",
+ "vl=440\n",
+ "vph=vl\n",
+ "il=p/(sqrt(3)*vl*cos(t))\n",
+ "iph=il/sqrt(3)\n",
+ "zph=vph/iph\n",
+ "zph1=20.9-1j*27.87\n",
+ "res=zph1.real\n",
+ "xc=zph1.imag\n",
+ "q=sqrt(3)*vl*il*sin(t)\n",
+ "print\"The resistance value of circuit element is\",round(res,2),\"ohms\"\n",
+ "print\"The capacitive value of circuit element is\",round(-xc,2),\"ohms\"\n",
+ "print\"The reactive volt-ampere\",round(-q/1000,2),\"KVAR\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resistance value of circuit element is 20.9 ohms\n",
+ "The capacitive value of circuit element is 27.87 ohms\n",
+ "The reactive volt-ampere -13.33 KVAR\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.8:pg-295"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import cmath\n",
+ "f=50 #Assigning values to parameters\n",
+ "vl=440\n",
+ "p=1500\n",
+ "t=math.acos(0.2)\n",
+ "vph=vl/sqrt(3)\n",
+ "il=p/(sqrt(3)*vl*p*cos(t))\n",
+ "iph=il\n",
+ "zph=vph/iph\n",
+ "zph1=5.17+1j*25.3\n",
+ "res=zph1.real\n",
+ "xl=zph1.imag\n",
+ "l=xl/(2*math.pi*f)\n",
+ "print\"The resistive circuit constant is\",round(res,2),\"ohms\"\n",
+ "print\"The inductive circuit constant is\",round(l,2),\"H\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resistive circuit constant is 5.17 ohms\n",
+ "The inductive circuit constant is 0.08 H\n"
+ ]
+ }
+ ],
+ "prompt_number": 52
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.9:pg-296"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import cmath\n",
+ "p=100000 #Assigning values to parameters\n",
+ "il=80\n",
+ "vl=1100\n",
+ "f=50\n",
+ "vph=vl/sqrt(3)\n",
+ "iph=il\n",
+ "zph=vph/iph\n",
+ "t=math.acos(p/(sqrt(3)*vl*il))\n",
+ "zph1=5.21-1j*6\n",
+ "r=zph1.real\n",
+ "xc=zph1.imag\n",
+ "c=1/(2*math.pi*f*xc)\n",
+ "print\"The resistive circuit constant is\",round(r,2),\"ohms\"\n",
+ "print\"The capacitive circuit constant is\",round(-xc,2),\"ohms\"\n",
+ "print\"The capacitance is\",\"{:.2e}\".format(-c),\"farads\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resistive circuit constant is 5.21 ohms\n",
+ "The capacitive circuit constant is 6.0 ohms\n",
+ "The capacitance is 5.31e-04 farads\n"
+ ]
+ }
+ ],
+ "prompt_number": 58
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.10:pg-296"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vl=400; #Assigning values to parameters\n",
+ "Il=34.65;\n",
+ "P=14.4*10**3;\n",
+ "Vph=Vl;\n",
+ "Iph=Il/sqrt(3);\n",
+ "Zph=Vph/Iph;\n",
+ "t=math.acos(P/(sqrt(3)*Vl*Il))\n",
+ "Z=complex(Zph,t);\n",
+ "a=cmath.rect(Zph,t)\n",
+ "print\"Impedance\",a,\"ohms\"\n",
+ "print \"Resistance\",round(a.real),\"ohms\"\n",
+ "print \"Reactance\",round(a.imag),\"ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Impedance (11.9937782275+15.9981840036j) ohms\n",
+ "Resistance 12.0 ohms\n",
+ "Reactance 16.0 ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 79
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.11:pg-297"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import cmath\n",
+ "vl=415 #assigning values to the parameters\n",
+ "r=15\n",
+ "l=0.1\n",
+ "c=177*10**-6\n",
+ "f=50\n",
+ "vph=vl/sqrt(3)\n",
+ "xl=2*math.pi*f*l\n",
+ "xc=1.0/(2*math.pi*f*c)\n",
+ "a=xl-xc\n",
+ "zph=r+1j*a\n",
+ "[r1,t]=cmath.polar(zph)\n",
+ "iph=vph/r1\n",
+ "il=iph\n",
+ "p=sqrt(3)*vl*il*cos(t)\n",
+ "q=sqrt(3)*vl*il*sin(t)\n",
+ "s=sqrt(3)*vl*il\n",
+ "print\"The phase current is\",round(iph,1),\"Amperes\"\n",
+ "print\"The line current is\",round(il,2),\"Amperes\"\n",
+ "print\"The power drawn is\",round(p/1000,2),\"KW\"\n",
+ "print\"The reactive power is\",round(q/1000,2),\"KVAR\"\n",
+ "print\"The total kVA is\",round(s/1000,2),\"KVA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The phase current is 11.9 Amperes\n",
+ "The line current is 11.9 Amperes\n",
+ "The power drawn is 6.37 KW\n",
+ "The reactive power is 5.71 KVAR\n",
+ "The total kVA is 8.55 KVA\n"
+ ]
+ }
+ ],
+ "prompt_number": 102
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.12:pg-299"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "vl=400 #assigning values to the parameters\n",
+ "t=0\n",
+ "zph=50\n",
+ "vph=vl/sqrt(3)\n",
+ "iph=vph/zph\n",
+ "il=iph\n",
+ "p=sqrt(3)*vl*il*cos(t)\n",
+ "print\"Power taken is\",round(p,2),\"Watts\"\n",
+ "iph=4\n",
+ "il=iph\n",
+ "p=vl*il*cos(t)\n",
+ "print\"Power taken after disconecting one of the resistor is\",round(p,2),\"Watts\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power taken is 3200.0 Watts\n",
+ "Power taken after disconecting one of the resistor is 1600.0 Watts\n"
+ ]
+ }
+ ],
+ "prompt_number": 103
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.13:pg-300"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "vl=400 #Assigning values to parameters\n",
+ "vph=vl\n",
+ "r=40\n",
+ "t=0\n",
+ "iph=vph/r\n",
+ "il=sqrt(3)*iph\n",
+ "p=sqrt(3)*vl*il*cos(t)\n",
+ "print\"Power taken is\",round(p,2),\"Watts\"\n",
+ "i=10\n",
+ "p=2*i*i*r\n",
+ "print\"Power taken after diconnecting one resistor is\",round(p,2),\"Watts\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power taken is 12000.0 Watts\n",
+ "Power taken after diconnecting one resistor is 8000.0 Watts\n"
+ ]
+ }
+ ],
+ "prompt_number": 104
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.16:pg-310"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "w1=500 #Assigning values to parameters\n",
+ "w2=2500\n",
+ "p=w1+w2\n",
+ "t=math.atan(sqrt(3)*(w2-w1)/(w1+w2))\n",
+ "pf=cos(t)\n",
+ "print\"Total Power supplied is\",round(p,2),\"Watts\"\n",
+ "print\"Power factor is\",round(pf,3)\n",
+ "w2=2500\n",
+ "w1=-500\n",
+ "p=w1+w2\n",
+ "t=math.atan(sqrt(3)*(w2-w1)/(w1+w2))\n",
+ "pf=cos(t)\n",
+ "print\"Total Power supplied after reversing the connections to the current coil is\",round(p,2),\"Watts\"\n",
+ "print\"Power factor after reversing the connections to the current coil is\",round(pf,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total Power supplied is 3000.0 Watts\n",
+ "Power factor is 0.655\n",
+ "Total Power supplied after reversing the connections to the current coil is 2000.0 Watts\n",
+ "Power factor after reversing the connections to the current coil is 0.359\n"
+ ]
+ }
+ ],
+ "prompt_number": 117
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.17:pg-311"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "w1=3000 #Assigning values to parameters\n",
+ "w2=5000\n",
+ "t=math.atan(sqrt(3)*(w2-w1)/(w1+w2))\n",
+ "pf=cos(t)\n",
+ "p=w1+w2\n",
+ "il=p/(sqrt(3)*vl*cos(t))\n",
+ "print\"Watts\",p,\"Total Power supplied is\",round(p,2),\"Watts\"\n",
+ "print\"Power factor is\",round(pf,2)\n",
+ "print\"The line current is\",round(il,2),\"Amperes\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Watts 8000 Total Power supplied is 8000.0 Watts\n",
+ "Power factor is 0.92\n",
+ "The line current is 12.58 Amperes\n"
+ ]
+ }
+ ],
+ "prompt_number": 112
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "\n",
+ "Ex3.18:pg-311"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "w1=-1000 #Assigning values to parameters\n",
+ "w2=3000\n",
+ "vl=400\n",
+ "t=math.atan(sqrt(3)*(w2-w1)/(w1+w2))\n",
+ "pf=cos(t)\n",
+ "p=w1+w2\n",
+ "il=p/(sqrt(3)*vl*cos(t))\n",
+ "print\"Total Power supplied is\",round(p,2),\"Watts\"\n",
+ "print\"Power factor is\",round(pf,3)\n",
+ "print\"The line current is\",round(il,2),\"Amperes\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total Power supplied is 2000.0 Watts\n",
+ "Power factor is 0.277\n",
+ "The line current is 10.41 Amperes\n"
+ ]
+ }
+ ],
+ "prompt_number": 119
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "\n",
+ "Ex3.19:pg-312"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "w1=100000 #Assigning values to parameters\n",
+ "w2=300000\n",
+ "vl=2000\n",
+ "n=0.9\n",
+ "t=math.atan(sqrt(3)*(w2-w1)/(w1+w2))\n",
+ "pf=cos(t)\n",
+ "p=w1+w2\n",
+ "il=p/(sqrt(3)*vl*cos(t))\n",
+ "print\"Total Power supplied is\",round(p,2),\"Watts\"\n",
+ "print\"Power factor is\",round(pf,2)\n",
+ "print\"The line current is\",round(il,2),\"Amperes\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total Power supplied is 400000.0 Watts\n",
+ "Power factor is 0.76\n",
+ "The line current is 152.75 Amperes\n"
+ ]
+ }
+ ],
+ "prompt_number": 121
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "\n",
+ "Ex3.20:pg-312"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "vl=220 #Assigning values to parameters\n",
+ "il=38\n",
+ "n=0.88\n",
+ "p=11200\n",
+ "ip=p/n\n",
+ "t=math.acos(ip/(sqrt(3)*vl*il))\n",
+ "a=math.degrees(t)\n",
+ "w2=vl*il*cos(30-a)\n",
+ "w1=vl*il*cos(30+a)\n",
+ "print\"The wattmeter reading is w2=\",round(w2,2),\"Watts\"\n",
+ "print\"The wattmeter reading is w1=\",round(w1,2),\"Watts\"\n",
+ "# the answer of w2,w1 are wrong in the book\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The wattmeter reading is w2= 449.52 Watts\n",
+ "The wattmeter reading is w1= -2972.66 Watts\n"
+ ]
+ }
+ ],
+ "prompt_number": 138
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "\n",
+ "Ex3.21:pg-313"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "w1=1 #Assigning values to parameters\n",
+ "w2=2*w1\n",
+ "t=math.atan(sqrt(3)*(w2-w1)/(w1+w2))\n",
+ "pf=cos(t)\n",
+ "print\"Power factor is\",round(pf,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power factor is 0.866\n"
+ ]
+ }
+ ],
+ "prompt_number": 127
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/sample_notebooks/HirenShah/ch3.ipynb b/sample_notebooks/HirenShah/ch3.ipynb new file mode 100755 index 00000000..cd8562e6 --- /dev/null +++ b/sample_notebooks/HirenShah/ch3.ipynb @@ -0,0 +1,160 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:be8f61b53e434158045726efedae14168d3ad7c750cfe29d070385bb73f71e47" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : Dimensional Analysis" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 Page No : 58" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/sec**2\n", + "t= 1. \t#hr\n", + "g1= 32.2 \t#ft/sec**2\n", + "g2= 32.2 \t#lbm ft/lbf\n", + "u= 2.4*10**-5 \t#lbf sec/ft**2\n", + "\t\n", + "#CALCULATIONS\n", + "q2= g*(t*60*60)**2\n", + "go= g*(t*60*60)**2\n", + "q3= g/g2\n", + "u1= u/(t*60*60)\n", + "\t\n", + "#RESULTS\n", + "print ' q2 = %.2e lbm ft/lbf hr**2'%(q2)\n", + "print ' go = %.2e lbm ft/lbf hr**2'%(go)\n", + "print ' go = %.f slug ft/lbf sec**2'%(q3)\n", + "print ' viscosity = %.2e lbf hr/ft**2'%(u1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " q2 = 4.17e+08 lbm ft/lbf hr**2\n", + " go = 4.17e+08 lbm ft/lbf hr**2\n", + " go = 1 slug ft/lbf sec**2\n", + " viscosity = 6.67e-09 lbf hr/ft**2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 Page No : 64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/sec**2\n", + "m= 1 \t#lb\n", + "\t\n", + "#CALCULATIONS\n", + "m1= g/m\n", + "\t\n", + "#RESULTS\n", + "print '1 lbf/sec ft**2 = %.1f lbm/ft sec'%(m1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1 lbf/sec ft**2 = 32.2 lbm/ft sec\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 Page No : 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "n1=1.\n", + "n2= 3.\n", + "n3=2.\n", + "\t\n", + "#CALCULATIONS\n", + "a1= -n1\n", + "a2= -n3\n", + "a3= -n1-a2+3*a1\n", + "b1= -n1\n", + "b2= -n1\n", + "b3= n1+3*b1-b2\n", + "\t\n", + "#RESULTS\n", + "print ' a1 = %.f '%(a1)\n", + "print ' a2 = %.f '%(a2)\n", + "print ' a3 = %.f '%(a3)\n", + "print ' b1 = %.f '%(b1)\n", + "print ' b2 = %.f '%(b2)\n", + "print ' b3 = %.f '%(b3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " a1 = -1 \n", + " a2 = -2 \n", + " a3 = -2 \n", + " b1 = -1 \n", + " b2 = -1 \n", + " b3 = -1 \n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/Hrituraj/chapter6.ipynb b/sample_notebooks/Hrituraj/chapter6.ipynb new file mode 100755 index 00000000..75d57cac --- /dev/null +++ b/sample_notebooks/Hrituraj/chapter6.ipynb @@ -0,0 +1,395 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter6, Steam" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1, page 346" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi, cos, sin, atan, sqrt, acos\n", + "\n", + "#initialisation of variables\n", + "c=400.0 #steam speed in m/s\n", + "alpla=12.0 #angle in degrees\n", + "cwo=0\n", + "pi=(22.0/7)\n", + "#CALCULATIONS\n", + "u=c*cos(12*(pi/180))/2\n", + "cwi=c*cos(12*(pi/180))\n", + "cfi=c*sin(12*(180/pi))\n", + "thetha=atan(cfi/(cwi-u))*(pi/180)\n", + "cro=sqrt((cfi)**2+(cwi-u)**2)\n", + "phi=acos(u/cro)*(180/pi)\n", + "wo=(cwi-cwo)*u\n", + "ke=(c)**2/2\n", + "eff=wo/ke\n", + "#RESULTS\n", + "print ' blade efficiency is %2f'%eff" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " blade efficiency is 0.956738\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2, page 349" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import asin\n", + "#initialisation of variables\n", + "hd=159 #heat drop in kj/kg\n", + "eff=0.89 #and its corresponding efficiency is mentioned\n", + "ra=0.4 #ratio of blade speed to steam speed\n", + "sp=3000 #rotational speed of an impulse turbine wheel in revolutions\n", + "a=20 #angle is 20 degrees\n", + "beff=0.76 #blade efficiency\n", + "cwo=5.4 #m/s\n", + "pi=(22/7)\n", + "bvc=0.82 #blade velocity coefficient\n", + "m=15 #mass is 15 kgs\n", + "#CALCULATIONS\n", + "ci=44.72*sqrt(eff*hd)\n", + "u=ci*ra\n", + "dm=(60*u)/(sp*0.3184)\n", + "cfi=ci*sin(20*(pi/180))\n", + "cwi=ci*cos(20*(pi/180))\n", + "cri=sqrt((cwi-u)**2+(cfi)**2)\n", + "cro=bvc*cri\n", + "x=(beff*(ci)**2)/(2*u) #x=cwi-cwo\n", + "theta=atan((cfi/(cwi-u)))*(180/pi)\n", + "cfo=sqrt((cro)**2-(cwo+u)**2)\n", + "co=sqrt((cwo)**2+(cfo)**2)\n", + "bet=(asin(cfo/co))*(180/pi)\n", + "pd=(m*x*u)/1000\n", + "re=hd-(pd/15)\n", + "phi=asin((cfo/cro))*(180/pi)\n", + "#RESULTS\n", + "print 'mean blade ring diameter is %2fm'%dm #textbook answer is wrong\n", + "print ' \\npower developed is %2fkw'%(pd)\n", + "print ' \\nresidual energy at out let foe friction and nozzle efficiency is %2fkw/kg'%(re )\n", + "print ' \\nblade angles are %2f,%2f,%2f'%(theta,bet,phi)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mean blade ring diameter is 13.366333m\n", + " \n", + "power developed is 1613.115917kw\n", + " \n", + "residual energy at out let foe friction and nozzle efficiency is 51.458939kw/kg\n", + " \n", + "blade angles are 0.000000,92.007507,35.107859\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3, page 352" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, tan\n", + "#initialisation of variables\n", + "alpha=20 #angle in degrees\n", + "theta=27 #angle in degrees\n", + "m=10 #kgs\n", + "vs=0.4799 #specific volume in m*m*m/kg\n", + "pi=(22/7)\n", + "u=100 #blade speed in m/s\n", + "#CALCULATIONS\n", + "ci=u*tan(27*(pi/180))/(cos(20*(pi/180))*tan(27*(pi/180))-sin(20*(pi/180)))\n", + "x=2*ci*cos(20*(pi/180))-u\n", + "pd=m*x*u\n", + "cf=ci*sin(20*(pi/180))\n", + "a=(m*vs)/cf\n", + "dm=sqrt(a/(0.08*pi))\n", + "h=0.08*dm\n", + "#RESULTS\n", + "print 'power developed is %2f w'%(pd)\n", + "print ' \\narea of flow is %2f m*m'%(a)\n", + "print ' \\nblade height is %2f m'%(h)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power developed is 600057.358847 w\n", + " \n", + "area of flow is 0.037652 m*m\n", + " \n", + "blade height is 0.030958 m\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4, page 359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "sp=1500 #rotational speed of an impulse turbine wheel in revolutions\n", + "pi=(22/7)\n", + "dm=1.5 #diameter in m\n", + "ra=0.8 #ratio of blade speed to steam speed\n", + "x=159 #x=cwi-cwo in m/s\n", + "m=10 #kgs mass\n", + "cf=50.4 #m*m*m/kg\n", + "vs=1.159 #\n", + "#CALCULATIONS\n", + "u=(pi*dm*sp)/60\n", + "ci=u/ra\n", + "pd=(m*x*u)/1000\n", + "a=(m*vs)/cf\n", + "h=a/(pi*dm)\n", + "#RESULTS\n", + "print 'power developed for steam flow is %2f kw'%(pd)\n", + "print ' \\nheight of the blade is %2f m'%(h)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power developed for steam flow is 187.392857 kw\n", + " \n", + "height of the blade is 0.048779 m\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5, page 365" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "u=170 #blade velocity in m/s\n", + "ra=0.2 #ratio of blade speed to steam speed\n", + "cril=696 #m/s\n", + "co1=0.84 #velocity coefficient \n", + "co2=0.87 #velocity coefficient\n", + "co3=0.90 #velocity coefficient\n", + "cri2=232 #m/s\n", + "#CALCULATIONS\n", + "ci=u/ra\n", + "crol=cril*co1\n", + "ci2=crol*co2\n", + "cro2=cri2*co3\n", + "wd=(1176+344)*u*10**-3\n", + "beff=wd*1000*2/(ci**2)\n", + "#RESULTS\n", + "print 'work developed in the blade is %2f kj/kg'%(wd)\n", + "print ' \\nblading efficiency is %2f'%(beff)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "work developed in the blade is 258.400000 kj/kg\n", + " \n", + "blading efficiency is 0.715294\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6, page 368" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "u=250 #blade speed in m/s\n", + "theta=80 #angle in degrees\n", + "alpha=20 #angle in degrees\n", + "oed=786.7 #overall enthalpic drop in kj/kg\n", + "sp=3000 #rotational speed of an impulse turbine wheel in revolutions\n", + "p=6000 #power developed in kw\n", + "rf=1.04 #reheat factor\n", + "ie=2993.4 #kj/kg\n", + "vs=9.28 #m*m*m/kg\n", + "pi=(22/7)\n", + "#CALCULATIONS\n", + "ci=(u*sin(100*(pi/180)))/sin(60*(pi/180))\n", + "x=(2*ci*cos(20*(pi/180)))-u #x=cwi-cwo\n", + "wd=x*u*10**-3\n", + "ed=wd*10\n", + "teff=ed/oed\n", + "seff=teff/rf\n", + "m=p/ed\n", + "ae=ie-ed\n", + "cf=ci*sin(20*(pi/180))\n", + "a=(m*vs)/cf\n", + "dm=(60*u)/(pi*sp)\n", + "h=a/(pi*dm)\n", + "#RESULTS\n", + "print 'enthalpy drop is %2f kj/kg'%(ed)\n", + "print ' \\nturbine efficiency is %2f'%(teff)\n", + "print ' \\nstage efficiency is %2f'%(seff)\n", + "print ' \\nmass flow of steam is %2f kg/s'%(m)\n", + "print ' \\nblade height us %2f m'%(h)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "enthalpy drop is 710.164887 kj/kg\n", + " \n", + "turbine efficiency is 0.902714\n", + " \n", + "stage efficiency is 0.867994\n", + " \n", + "mass flow of steam is 8.448742 kg/s\n", + " \n", + "blade height us 0.161268 m\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex7, page 371" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "x1=3025 # according to 20 bar pressure and 300 degrees temp\n", + "x2=2262 #according to 20 bar pressure and 300 degrees temp\n", + "x3=2039 #according to 20 bar pressure and 300 degrees temp\n", + "x4=2896 #according to 20 bar pressure and 300 degrees temp\n", + "x5=2817 #according to 20 bar pressure and 300 degrees temp\n", + "x6=2728 #according to 20 bar pressure and 300 degrees temp\n", + "x7=2699 #according to 20 bar pressure and 300 degrees temp\n", + "x8=2592 #according to 20 bar pressure and 300 degrees temp\n", + "x9=2525 #according to 20 bar pressure and 300 degrees temp\n", + "x10=2430 #according to 20 bar pressure and 300 degrees temp\n", + "x11=2398 #according to 20 bar pressure and 300 degrees temp\n", + "x12=2262 #according to 20 bar pressure and 300 degrees temp\n", + "x13=2192 #according to 20 bar pressure and 300 degrees temp\n", + "#CALCULATIONS\n", + "ieff=(x1-x2)/(x1-x3)\n", + "feff=(x1-x4)/(x1-x5)\n", + "seff=(x4-x6)/(x4-x7)\n", + "teff=(x6-x8)/(x6-x9)\n", + "oeff=(x8-x10)/(x8-x11)\n", + "yeff=(x10-x12)/(x10-x13)\n", + "ced=(x1-x5)+(x4-x7)+(x6-x9)+(x8-x11)+(x10-x13)\n", + "rf=ced/(x1-x3)\n", + "#RESULTS\n", + "print 'cumulative enthaloy drop is %.f'%(ced)\n", + "print ' \\nreheat factor is %0.2f'%(rf)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "cumulative enthaloy drop is 1040\n", + " \n", + "reheat factor is 1.05\n" + ] + } + ], + "prompt_number": 35 + } + ], + "metadata": {} + } + ] +} diff --git a/sample_notebooks/JaiMathur/ch2.ipynb b/sample_notebooks/JaiMathur/ch2.ipynb new file mode 100755 index 00000000..eab5eede --- /dev/null +++ b/sample_notebooks/JaiMathur/ch2.ipynb @@ -0,0 +1,309 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:30849a845cb23e6184901c441ceb4a2e2451d5db6a2c0f60dce1b23531e4d077" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : Similarity" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 Page No : 23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "r= 4.\n", + "l1= 4 \t#units long axis\n", + "l2= 10 \t#units long axis\n", + "\t\n", + "#CALCULATIONS\n", + "sxy= (4/r)\n", + "sxy1= l1**2\n", + "sxy2= l2**2\n", + "\t\n", + "#RESULTS\n", + "print 'x**2+4*y**2 = %.f '%(sxy)\n", + "print ' x**2+4*y**2 = %.f '%(sxy1)\n", + "print ' x**2+4*y**2 = %.f '%(sxy2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "x**2+4*y**2 = 1 \n", + " x**2+4*y**2 = 16 \n", + " x**2+4*y**2 = 100 \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 Page No : 29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "vo= 10 \t#ft/sec\n", + "a= 0.5 \t#ft**-1\n", + "b= 1 \t#ft\n", + "x= -2 \t#ft\n", + "y= 2 \t#ft\n", + "b1= 2\n", + "a1= 3./5 \t#ft\n", + "\t\n", + "#CALCULATIONS\n", + "Vx= vo/(a*x**2+b)\n", + "Vy= -2*a*b*vo*x*y/(a*x**2+b)**2\n", + "V= math.sqrt(Vx**2+Vy**2)\n", + "fx= -2*a*b**2*vo**2*x/(a*x**2+b)**3\n", + "fy= 2*a*b**2*vo**2*y*(b-a*x**2)/(a*x**2+b)**4\n", + "f= math.sqrt(fx**2+fy**2)\n", + "r= b1**2/a1\n", + "f1= f*r\n", + "\t\n", + "#RESULTS\n", + "print 'Vx = %.2f ft/sec'%(Vx)\n", + "print ' Vy = %.2f ft/sec'%(Vy)\n", + "print ' V = %.2f ft/sec'%(V)\n", + "print ' fx = %.2f ft/sec**2'%(fx)\n", + "print ' fy = %.2f ft/sec**2'%(fy)\n", + "print ' f = %.2f ft/sec**2'%(f)\n", + "print ' r = %.2f in the present case'%(r)\n", + "print ' f1 = %.2f ft/sec**2'%(f1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vx = 3.33 ft/sec\n", + " Vy = 4.44 ft/sec\n", + " V = 5.56 ft/sec\n", + " fx = 7.41 ft/sec**2\n", + " fy = -2.47 ft/sec**2\n", + " f = 7.81 ft/sec**2\n", + " r = 6.67 in the present case\n", + " f1 = 52.05 ft/sec**2\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 Page No : 36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "r= 1./5\n", + "b1= 2 \t#ft\n", + "a1= 3./5 \t#ft\n", + "\t\n", + "#CALCULATIONS\n", + "r= (a1*b1)**2*r\n", + "\t\n", + "#RESULTS\n", + "print 'ratio of resultant forces acting on coorresponding fluid elements = %.3f '%(r)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ratio of resultant forces acting on coorresponding fluid elements = 0.288 \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 Page No : 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "vos= 70. \t#ft/sec\n", + "as1= 78. \t#ft density\n", + "am= 72. \t#ft wind-tunnel\n", + "ls1= 6. \t#ft strut section\n", + "lm= 2. \t#ft length\n", + "um= 386. \t#ft/sec\n", + "us= 372. \t#ft/sec\n", + "dm= 0.4\n", + "\t\n", + "#CALCULATIONS\n", + "vom= vos*as1*ls1*um/(am*lm*us)\n", + "Ds= dm*(am/as1)*(us/um)**2\n", + "\t\n", + "#RESULTS\n", + "print 'Air speed = %.f ft/sec'%(vom)\n", + "print ' Ds = %.3f lbf'%(Ds)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Air speed = 236 ft/sec\n", + " Ds = 0.343 lbf\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 Page No : 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "vom= 236. \t#ft/sec\n", + "as1= 0.072 \t#ft\n", + "am = 62.4 \t#ft density of water\n", + "ls1= 2. \t#ft\n", + "lm= 8. \t#ft\n", + "um= 248. \t#ft/sec viscosity\n", + "us= 3.86 \t#ft/sec\n", + "Pm= 0.4/3.3\n", + "\t\n", + "#CALCULATIONS\n", + "voh= vom*as1*ls1*um/(am*lm*us)\n", + "Ds= Pm*(as1/am)*(um/us)**2*(ls1/lm)*(lm-ls1)\n", + "\t\n", + "#RESULTS\n", + "print 'Air speed = %.2f ft/sec'%(voh)\n", + "print ' Drag force = %.3f lbf'%(Ds)\n", + "\n", + "# note : rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Air speed = 4.37 ft/sec\n", + " Drag force = 0.866 lbf\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 Page No : 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\n", + "#initialisation of variables\n", + "To1= 540. \t#R temperature\n", + "po3= 12.6 \t#lbf/in**2\n", + "l3= 3. \t#ft\n", + "po1= 14.7 \t#lbf/in**2 pressure\n", + "l1= 1. \t#ft\n", + "vo1= 500. \t#ft/sec velocity\n", + "r= 0.83\n", + "P1= 1. \t#lbf/in**2 turbine blade\n", + "\t\n", + "#CALCULATIONS\n", + "To3= To1*(po3*l3/(po1*l1))**r\n", + "Vo3= vo1*math.sqrt(To3/To1)\n", + "P3= P1*po3*l3/(po1*l1)\n", + "\t\n", + "#RESULTS\n", + "print 'To3 = %.f R'%(To3)\n", + "print ' Vo3 = %.f ft/sec'%(Vo3)\n", + "print ' P3 = %.2f lbf/ft'%(P3)\n", + "\n", + "# note : book answers are not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "To3 = 1183 R\n", + " Vo3 = 740 ft/sec\n", + " P3 = 2.57 lbf/ft\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/JayDadlani/SAMPLE_NB_KI_KAPOOR.ipynb b/sample_notebooks/JayDadlani/SAMPLE_NB_KI_KAPOOR.ipynb new file mode 100755 index 00000000..7ccc9697 --- /dev/null +++ b/sample_notebooks/JayDadlani/SAMPLE_NB_KI_KAPOOR.ipynb @@ -0,0 +1,220 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:58e66a1486b17622aacd34bb93b225c18134442ddc1f2fbedecd0abdd0c9b88e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "A TEXTBOOK OF PHYSICAL CHEMISTRY BY K.I. KAPOOR" + ] + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER NUMBER 1 : EQUILIBRIUM BETWEEN PHASES" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.5.1 : PAGE NUMBER 10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "T1 = 234.5 # Temperature in K\n", + "P = 1 # Pressure in atm\n", + "rho1 = 14.19 # Density of solid Hg in g/(cm**3)\n", + "rho2 = 13.70 # Density of liquid Hg in g/(cm**3)\n", + "V = 200.59 # volume of liquid and solid in g/mol\n", + "delV = ((V/rho2)-(V/rho1))*(10**-3)# in dm**3/mol\n", + "delTdelP = 0.0051 # K/atm\n", + "R1 = 8.314 # in J\n", + "R2 = 0.082 # in (dm)**3/atm\n", + "delH = ((delV*T1)/(delTdelP))*(R1/R2)*10**-3;#molar heat of fusion in kJ/mol\n", + "print \" delH = \",round(delH,4),\"(KJ)/mol \"\n", + "T2 = 273# in K\n", + "delP = (delH*(R2/R1)*(T2-T1))/(delV*T1)*10**3;#pressure required to raise melting point to T2 in atm\n", + "print \" delP = \",round(delP,4),\"atm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " delH = 2.3571 (KJ)/mol \n", + " delP = 7549.0196 atm\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.5.2 : PAGE NUMBER 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math;\n", + "T1=373.15;#in K\n", + "P=1;#atm\n", + "Vv=1674;#in cm**3/gm\n", + "delPdelT=27.12;#in torr/K\n", + "R1=8.314;#in J\n", + "R2=0.082;#in atm/(dm)**3\n", + "delH=((delPdelT)/760)*T1*((Vv*10**-3)*18)*(R1/R2)\n", + "print \" delH = \",round(delH,4),\" J/mol \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " delH = 40680.2549 J/mol \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.5.3 : PAGE NUMBER 16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math;\n", + "T1=313.75;#in K\n", + "P1=59.1;#in torr\n", + "T2=353.15;#in K\n", + "P2=298.7;#in torr\n", + "R=2.303*8.314;#in J/(K*mol)\n", + "delH=R*math.log10(P2/P1)*((T2*T1)/(T2-T1))\n", + "print \" delH= \",round(delH,4),\" J/mol \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " delH= 37888.375 J/mol \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.5.4 : PAGE NUMBER 16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "T1=325.15;#in K\n", + "T2=338.15;#in K\n", + "P2=760;#in torr\n", + "DelHm_v=10.5;#\n", + "P1=P2/(10**((DelHm_v/2.303)*((T2/T1)-1)));#in torr\n", + "print \" P1= \",round(P1,4),\"torr \"\n", + "P=200;#in torr\n", + "T=T2/(1+((2.303/10.5)*math.log10(P2/P)));#in K\n", + "print \" T =\",round(T,4),\" K \"\n", + "I=math.log10(P2)-(((DelHm_v*T2)/2.303)*(-1/T2));#\n", + "print \" I = \",round(I,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " P1= 499.4901 torr \n", + " T = 306.1154 K \n", + " I = 7.4401\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 1.5.5 : PAGE NUMBER 17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math;\n", + "P=760;#in torr\n", + "dP=52;#in torr\n", + "dT=2;#in K\n", + "DelH_RTb=10.5;#Trouton rule\n", + "Tb=(DelH_RTb*P)/(dP/dT)\n", + "print \" Tb = \",round(Tb,4),\" K\"\n", + "R=8.314;#in J/Kmol\n", + "DelH_v=(DelH_RTb*R*Tb)\n", + "print \" DelH_v = \",round(DelH_v,4),\"J/mol \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Tb = 306.9231 K\n", + " DelH_v = 26793.4638 J/mol \n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/JigneshBhadani/ch5.ipynb b/sample_notebooks/JigneshBhadani/ch5.ipynb new file mode 100644 index 00000000..189e1172 --- /dev/null +++ b/sample_notebooks/JigneshBhadani/ch5.ipynb @@ -0,0 +1,2270 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f2a55784eb064c2602de5db3699903ee6b51018dcf324e42007dffa21eb1e0ba" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : SINGLE PHASE AC CIRCUITS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page No : 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import ones\n", + "\n", + "def r2p(x,y):\t\t\t#function to convert recmath.tangular to polar\n", + " polar = ones(2)\n", + " polar[0] = math.sqrt ((x **2) +(y**2))\n", + " polar[1] = math.atan (y/x)\n", + " polar[1] = (polar [1]*180)/math.pi\n", + " return polar\n", + " \n", + "def p2r(r,theta):\t\t\t#function to convert polar to recmath.tangular\n", + " rect = ones(2)\n", + " theta = ( theta *math.pi) /180\n", + " rect [0] = r* math.cos(theta)\n", + " rect [1] = r* math.sin(theta)\n", + " return rect\n", + "\n", + "#CALCULATIONS\n", + "I1 = r2p(7,-5);\n", + "print (I1);\n", + "I2 = r2p(-9,6);\n", + "I2[1] = I2[1]+(180);\t\t\t#this belongs to quadrant 2 and hence 180 degrees should be added\n", + "print (I2);\n", + "I3 = r2p(-8,-8);\n", + "I3[1] = I3[1]+(180);\t\t\t#this belongs to quadrant 3 and hence 180 degrees should be added\n", + "print (I3);\n", + "I4 = r2p(6,6);\n", + "print (I4);\n", + "#note:here direct functions for converson are not available and hence we defined user defined functions for polar to rect and rect to polar conversions\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "[ 8.60232527 -45. ]\n", + "[ 10.81665383 135. ]\n", + "[ 11.3137085 225. ]\n", + "[ 8.48528137 45. ]\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page No : 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import ones\n", + "\n", + "def r2p(x,y):\t\t\t#function to convert recmath.tangular to polar\n", + " polar = ones(2)\n", + " polar[0] = math.sqrt ((x **2) +(y**2))\n", + " polar[1] = math.atan (y/x)\n", + " polar[1] = (polar [1]*180)/math.pi\n", + " return polar\n", + " \n", + "def p2r(r,theta):\t\t\t#function to convert polar to recmath.tangular\n", + " rect = ones(2)\n", + " theta = ( theta *math.pi) /180\n", + " rect [0] = r* math.cos(theta)\n", + " rect [1] = r* math.sin(theta)\n", + " return rect\n", + " \n", + "#CALCULATIONS\n", + "#for subdivision 1\n", + "I1 = p2r(10,60);\n", + "I2 = p2r(8,-45);\n", + "I3 = I1+I2;\n", + "print (I3);\n", + "I4 = r2p(I3[0],I3[1]);\n", + "print (I4)\n", + "#for subdivision 2\n", + "I5 = r2p(5,4);\n", + "I6 = r2p(-4,-6);\n", + "I7 = ones(2)\n", + "I7[0] = (I5[0])*(I6[0]);\n", + "I7[1] = (I5[1]+I6[1]);\n", + "I7[1] = I7[1]-180;\n", + "print (I7);\n", + "#for subdivision 3\n", + "I8 = r2p(-2,-5);\n", + "I9 = r2p(5,7);\n", + "I10 = ones(2)\n", + "I10[0] = I8[0]/I9[0];\n", + "I10[1] = I8[1]-I9[1];\n", + "I10[1] = I10[1]-180\n", + "print (I10);\n", + "#note:here direct functions for converson are not available and hence we defined user defined functions for polar to rect and rect to polar conversions\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "[ 10.65685425 3.00339979]\n", + "[ 11.07198956 15.73932193]\n", + "[ 46.17358552 -135. ]\n", + "[ 0.62601269 -161.56505118]\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page No : 160" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#given i(t) = 5*math.sin(314*t+(2*math.pi/3))&& v(t) = 20*math.sin(314*t+(5*math.pi/6))\n", + "#CALCULATIONS\n", + "P1 = 2*(math.pi/3);\t\t\t#phase angle of current in radians\n", + "P1 = P1*(180/math.pi);\t\t\t#phase angle of current in degrees\n", + "P2 = 5*(math.pi/6);\t\t\t#phase angle of voltage in radians\n", + "P2 = P2*(180/math.pi);\t\t\t#phase angle of voltage in degrees\n", + "P3 = P2-P1;\t\t\t#current lags voltage by P3 degrees\n", + "P4 = P3*math.pi/180;\n", + "pf = math.cos(P4);\t\t\t#lagging pf\n", + "Vm = 20;\t\t\t#peak voltage\n", + "Im = 5;\t\t\t#peak current\n", + "Z = Vm/Im;\t\t\t#impedance in ohms\n", + "R = (Z)*math.cos(P4);\t\t\t#resistance in ohms\n", + "Xl = math.sqrt((Z)**2-(R)**2);\t\t\t#reacmath.tance \n", + "W = 314;\n", + "L = Xl/W;\t\t\t#inductance in henry\n", + "V = Vm/math.sqrt(2);\t\t\t#average value of voltage\n", + "I = Im/math.sqrt(2);\t\t\t#average value of current\n", + "av = (V*I)*math.cos(P4);\t\t\t#average power in watts\n", + "print \"thus impedance, resistance, inductance, powerfactor and average power are %d ohms, %1.2f ohms, %g H,%1.3f and %2.1f W respectively\"%(Z,R,L,pf,av);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "thus impedance, resistance, inductance, powerfactor and average power are 4 ohms, 3.46 ohms, 0.00636943 H,0.866 and 43.3 W respectively\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4 Page No : 161" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.4, Page 161\n", + "\n", + "#INPUT DATA\n", + "I = 10.;\t\t\t#given current in A\n", + "P = 1000.;\t\t\t#power in Watts\n", + "V = 250.;\t\t\t#voltage in volts\n", + "f = 25.;\t\t\t#frequency in Hz\n", + "\n", + "#CALCULATIONS\n", + "R = P/((I)**2);\t\t\t#resistance in ohms\n", + "Z = V/I;\t\t\t#impedance in ohms\n", + "Xl = math.sqrt((Z)**2-(R)**2);\t\t\t#reacmath.tance in ohms\n", + "L = Xl/(2*math.pi*f);\t\t\t#inductance in Henry\n", + "Pf = R/Z;\t\t\t#power factor,lagging,pf = math.cos(phi)\n", + "\n", + "# Results\n", + "print \"thus impedance, resistance, inductance, reactance and powerfactor are %d ohms, %d ohms, %1.3f H, \\\n", + "%2.2f ohms and %1.1f respectively\"%(Z,R,L,Xl,Pf);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "thus impedance, resistance, inductance, reactance and powerfactor are 25 ohms, 10 ohms, 0.146 H, 22.91 ohms and 0.4 respectively\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5 Page No : 162" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.5, Page 162\n", + "\n", + "#INPUT DATA\n", + "V = 250.;\t\t\t#supply voltage in volts\n", + "f = 50.;\t\t\t#frequency in hz\n", + "Vr = 125.;\t\t\t#voltage across resistance in volts\n", + "Vc = 200.;\t\t\t#voltage across coil in volts\n", + "I = 5.;\t\t\t#current in A\n", + "#CALCULATIONS\n", + "R = Vr/I;\t\t\t#resistance in ohms\n", + "Z1 = Vc/I;\t\t\t#impedance of coil in ohms\n", + "#Z1 = math.sqrt((R1)**2+(Xl)**2)------eqn(1)\n", + "Z = V/I;\t\t\t#total impedance in ohms\n", + "#Z = math.sqrt((R+R1)**2+(Xl)**2)-----eqn(2)\n", + "#solving eqn(1)and eqn(2) we get R1 as follows\n", + "R1 = (((Z)**2-(Z1)**2)-(R)**2)/(2*R);\t\t\t#in ohms\n", + "Xl = math.sqrt((Z1)**2-(R1)**2);\t\t\t#reacmath.tance of coil in ohms\n", + "P = ((I)**2*R1);\t\t\t#power absorbed by the coil in Watts\n", + "Pt = ((I)**2)*(R+R1);\t\t\t#total power in Watts\n", + "\n", + "# Results\n", + "print \"thus impedance, resistance, reactance are %d ohms, %d ohms, %2.2f ohms respectively\"%(Z1,R,Xl);\n", + "print \"power absorbed and total power are %3.1f W and %3.1f W respectively\"%(P,Pt)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "thus impedance, resistance, reactance are 40 ohms, 25 ohms, 39.62 ohms respectively\n", + "power absorbed and total power are 137.5 W and 762.5 W respectively\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 Page No : 163" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.6, Page 163\n", + "\n", + "#INPUT DATA\n", + "V = 240;\t\t\t#supply voltage in volts\n", + "Vl = 171;\t\t\t#voltage across inductor in volts\n", + "I = 3;\t\t\t#current in A\n", + "phi = 37;\t\t\t#power factor laggging in degrees\n", + "#CALCULATIONS\n", + "Zl = Vl/I;\t\t\t#impedance of coil in ohms\n", + "#Zl = math.sqrt((R1)**2+(Xl)**2)------eqn(1)\n", + "Z = V/I;\t\t\t#total impedance in ohms\n", + "#Z = math.sqrt((R+R1)**2+(Xl)**2)-----eqn(2)\n", + "pf = math.cos(phi*math.pi/180);\t\t\t#powerfactor\n", + "Rt = pf*Z;\t\t\t#total resistance in ohms\t\t\t#Rt = (R+R1)\n", + "#substituting Rt value in eqn(2) we find Xl as follows\n", + "Xl = math.sqrt((Z)**2-(Rt)**2);\t\t\t#reacmath.tance of inductor in ohms\n", + "#ubstituting Xl value in eqn(1) we find R1 as follows\n", + "R1 = math.sqrt((Zl)**2-(Xl)**2);\t\t\t#resistance of inductor in ohms\n", + "R = Rt-R1;\t\t\t#resistance of resistor in ohms\n", + "print \"Thus resistance of resistor is %2.2f ohms\"%(R);\n", + "print \"Thus resisimath.tance and reacmath.tance of inductor are %2.2f ohms and %2.2f ohms respectively\"%(R1,Xl)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resistance of resistor is 33.38 ohms\n", + "Thus resisimath.tance and reacmath.tance of inductor are 30.51 ohms and 48.15 ohms respectively\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7 Page No : 164" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.7, Page 164\n", + "\n", + "#INPUT DATA\n", + "V = 100;\t\t\t#supply voltage in volts\n", + "#for COIL A\n", + "f = 50;\t\t\t#frequency in Hz\n", + "I1 = 8;\t\t\t#current in A\n", + "P1 = 120;\t\t\t#power in Watts\n", + "#for COIL B\n", + "I2 = 10;\t\t\t#current in A\n", + "P2 = 500;\t\t\t#power in Watts\n", + "#CALCULATIONS\n", + "#FOR COIL A\n", + "Z1 = V/I1;\t\t\t#impedance of coil A in ohms\n", + "R1 = P1/(I1)**2;\t\t\t#resistance of coil A in ohms\n", + "X1 = math.sqrt(((Z1)**2-(R1)**2));\t\t\t#reacmath.tance of coil A in ohms\n", + "#FOR COIL B\n", + "Z2 = V/I2;\t\t\t#impedance of coil B in ohms\n", + "R2 = P2/(I2)**2;\t\t\t#resistance of coil B in ohms\n", + "X2 = math.sqrt(((Z2)**2-(R2)**2));\t\t\t#reacmath.tance of coil B in ohms\n", + "#When both COILS A and B are in series\n", + "Rt = R1+R2;\t\t\t#total resistance in ohms\n", + "Xt = X1+X2;\t\t\t#total reacmath.tance in ohms\n", + "Zt = math.sqrt((Rt)**2+(Xt)**2);\t\t\t#total impedance in ohms\n", + "It = V/Zt;\t\t\t#current drawn in A\n", + "P = ((It)**2)*(Rt);\t\t\t#power taken in watts\n", + "print \"Thus current drawn and power taken in watts are %2.2f A and %3.2f W respectively\"%(It,P);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus current drawn and power taken in watts are 4.66 A and 130.12 W respectively\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8 Page No : 167" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.8, Page 167\n", + "\n", + "#INPUT DATA\n", + "R = 100;\t\t\t#resistance in ohms\n", + "C = 50*10**-6;\t\t\t#capacitance in F\n", + "V = 200;\t\t\t#voltage in Volts\n", + "f = 50;\t\t\t#frequency in Hz\n", + "#Z = R-(1j)*(Xc)------>impedance\n", + "Xc = 1/(2*math.pi*f*C);\t\t\t#capacitive reacmath.tance in ohms\n", + "Z = math.sqrt((R)**2+(Xc)**2);\t\t\t#impedance in ohms\n", + "I = V/Z;\t\t\t#current in A\n", + "pf = R/Z;\t\t\t#power factor ------>math.cos(phi)---->leading\n", + "phi = math.acos(0.844);\t\t\t#phase angle in radians\n", + "phi = phi*180/math.pi;\t\t\t#phase angle in degrees\n", + "Vr = (I)*(R);\t\t\t#voltage across resistor\n", + "Vc = (I)*(Xc);\t\t\t#votage across capacitor\n", + "print \"Thus impedance, current, powerfactor and phaseangle are %3.2f ohms, %1.2f A, %1.3f and %2.2f degrees respectively\"%(Z,I,pf,phi);\n", + "print \"voltage across resistor and capacitor are %d V and %3.2f V respectively\"%(Vr,Vc)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus impedance, current, powerfactor and phaseangle are 118.54 ohms, 1.69 A, 0.844 and 32.44 degrees respectively\n", + "voltage across resistor and capacitor are 168 V and 107.41 V respectively\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 Page No : 169" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.9, Page 169\n", + "\n", + "#INPUT DATA\n", + "phi = 40;\t\t\t#phase in degrees\n", + "V = 150;\t\t\t#voltage in Volts\n", + "I = 8;\t\t\t#current in A\n", + "#the applied voltage lags behind the current .That means the current leads the voltage\n", + "#hence pf is leading\n", + "#CALCULATIONS\n", + "pf = math.cos(phi*math.pi/180);\t\t\t#in degrees--->leading\n", + "#hence it is a capacitive circuit\n", + "pa = V*I*pf;\t\t\t#active power in W\n", + "pr = V*I*math.sin(phi*math.pi/180);\t\t\t#reactive power in VAR\n", + "print \"Thus active and reactive power are %3.1f W and %3.1f VAR respectively\"%(pa,pr);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus active and reactive power are 919.3 W and 771.3 VAR respectively\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.10 Page No : 169" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.10, Page 169\n", + "\n", + "#INPUT DATA\n", + "#given v = 141.4*math.sin(314*t)\n", + "P = 700.;\t\t\t#power in Watts\n", + "pf = 0.707;\t\t\t#powerfactor------>leading------>math.cos(phi)\n", + "Vm = 141.4;\t\t\t#maximum value of supply voltage\n", + "#CALCULATIONS\n", + "Vr = Vm/(math.sqrt(2));\t\t\t#rms value of supply voltage\n", + "I = P/(Vr*pf);\t\t\t#current in A\n", + "Z = Vr/I;\t\t\t#impedance in ohms\n", + "R = (Z)*(pf);\t\t\t#resistance in ohms\n", + "phi = math.acos(pf)*180/math.pi;\t\t\t#angle in degrees\n", + "Xc = (Z)*(math.sin(phi));\t\t\t#reacmath.tance in ohms\n", + "C = 1/(3.14*7.13);\t\t\t#capacitance in F\n", + "print \"Thus resistance and capacitance are %1.2f ohms and %g F respectively\"%(R,C);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resistance and capacitance are 7.14 ohms and 0.0446664 F respectively\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11 Page No : 169" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.11, Page 169\n", + "\n", + "#INPUT DATA\n", + "V = 200.;\t\t\t#supply voltage in volts\n", + "f = 50.;\t\t\t#freq in hz\n", + "P = 7000.;\t\t\t#power in Watts\n", + "Vr = 130.;\t\t\t#volatge across resistor in volts\n", + "P = 7000.;\t\t\t#power in Watts\n", + "\n", + "#CALCULATIONS\n", + "R = ((Vr)**2)/P;\t\t\t#resistance in ohms\n", + "I = Vr/R;\t\t\t#current in A\n", + "Z = V/I;\t\t\t#total impedance in ohms\n", + "Xc = math.sqrt((Z)**2-(R)**2);\n", + "C = 1/(2*math.pi*f*Xc);\t\t\t#capacitance in F\n", + "pf = R/Z;\t\t\t#power factor------>leading\n", + "phi = math.acos(pf);\t\t\t#angle in radians\n", + "phi = phi*180/math.pi;\t\t\t#angle in degrees\n", + "Vm = V*math.sqrt(2);\t\t\t#maximum value of voltage\n", + "#voltage equation v = Vm*math.sin(2*math.pi*f*t)------>282.84*math.sin(314.16*t)\n", + "#current leads voltage by phi\n", + "#current equation ------>i = 76.155*math.sin(314.16*t+phi)\n", + "print \"Thus current, resistance, p.f, capacitance, impedance are %2.2f A , %1.2f ohms, %2.1f , \\\n", + "%g F and %1.2f ohms respectively\"%(I,R,pf,C,Z);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus current, resistance, p.f, capacitance, impedance are 53.85 A , 2.41 ohms, 0.6 , 0.00112771 F and 3.71 ohms respectively\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.12 Page No : 170" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "C = 50.;\t\t\t#capacitance in uf\n", + "R = 100.;\t\t\t#resistance in ohms\n", + "V = 200.;\t\t\t#supply voltage in volts\n", + "f = 50.;\t\t\t#freq in hz\n", + "#CALCULATIONS\n", + "Xc = 1/(2*math.pi*f*C*10**-6);\t\t\t#capacitive reacmath.tance in ohms\n", + "Z = R-((1j)*Xc);\t\t\t#impedance in ohms\n", + "print (Z);\n", + "z1 = math.sqrt((R)**2+(Xc)**2);\n", + "theta = math.atan(Xc/R);\n", + "pf = math.cos(theta);\t\t\t#powerfactor\n", + "I = V/z1;\t\t\t#current in A\n", + "P = V*I*pf;\t\t\t#power in Watts\n", + "print \"Thus current, power factor, power are % 1.2f A ,%1.3f ,%d W respectively\"%(I,pf,P);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(100-63.6619772368j)\n", + "Thus current, power factor, power are 1.69 A ,0.844 ,284 W respectively\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.13 Page No : 170" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "C = 0.05;\t\t\t#capacitance in uf\n", + "F = 500;\t\t\t#freq in hz\n", + "#CALCULATIONS\n", + "Xl = 1/(2*math.pi*F*C*10**-6);\t\t\t#capacitive reacmath.tance in ohms\n", + "#at resonance Xl = Xc \n", + "L = (Xl/(2*math.pi*F));\t\t\t#inductance in H\n", + "print \"Thus value of L is %1.2f H\"%(L);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus value of L is 2.03 H\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.14 Page No : 171" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "V = 200;\t\t\t#voltage in V\n", + "R = 50;\t\t\t#resistance in ohms\n", + "L = 0.5;\t\t\t#inductance in Henry\n", + "F = 50;\t\t\t#freq in hz\n", + "#CALCULATIONS\n", + "Xl = 2*math.pi*F*L;\t\t\t#inductive reacmath.tance\n", + "Z = (R)+((1j)*Xl)\t\t\t#impedance\n", + "print (Z);\n", + "z1 = math.sqrt((R)**2+(Xl)**2);\t\t\t#magnitude\n", + "theta = math.atan(Xl/R);\t\t\t#angle in radians\n", + "I = V/z1;\t\t\t#current in A\n", + "P = V*I*math.cos(theta);\t\t\t#power supplied in W\n", + "#here capacitive reacmath.tance equals inductive reacmath.tance\n", + "#hence Xc = Xl\n", + "C = 1/(2*math.pi*F*Xl);\t\t\t#capacitance in uf\n", + "r = (V/I)-(R);\t\t\t#additional resistance to be added in series\n", + "print \"Thus current and power required are % 1.2f A and %2.2f W respectively\"%(I,P);\n", + "print \"Thus additional resistance that neede to be connected in series with R and C to have\\\n", + " same current at unity power factor is %1.1f ohms\"%(r);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(50+157.079632679j)\n", + "Thus current and power required are 1.21 A and 73.60 W respectively\n", + "Thus additional resistance that neede to be connected in series with R and C to have same current at unity power factor is 114.8 ohms\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15 Page No : 171" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "R = 50.;\t\t\t#resistance in ohms\n", + "L = 9.;\t\t\t#inductance in Henry\n", + "I0 = 1.;\t\t\t#current in A\n", + "f = 75.;\t\t\t#ferquency in Hz\n", + "#at resonance Xl = Xc \n", + "#CALCULATIONS\n", + "Xl = 2*math.pi*f*L;\t\t\t#inductive reacmath.tance\n", + "Xc = Xl;\t\t\t#capacitive reacmath.tance\n", + "C = 1/(2*math.pi*f*Xc);\t\t\t#capacitance in uf\n", + "print \"Thus capacitance is %g F\"%(C);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus capacitance is 5.00352e-07 F\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.16 Page No : 175" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "R = 10.;\t\t\t#resistance in ohms\n", + "L = 0.1;\t\t\t#inductance in Henry\n", + "C = 150.;\t\t\t#capacitor in uf\n", + "V = 200.;\t\t\t#voltage in V\n", + "f = 50.;\t\t\t#frequency in hz\n", + "#CALCULATIONS\n", + "Xc = 1/(2*math.pi*f*C*10**-6);\t\t\t#Capacitive reacmath.tance in ohms\n", + "Xl = (2*math.pi*f*L);\t\t\t#inductive reacmath.tance in ohms\n", + "Z = R+((1j)*(Xl-Xc));\t\t\t#impedance in ohms\n", + "z1 = math.sqrt((R)**2+(Xl-Xc)**2);\t\t\t#magnitude of Z\n", + "I = V/z1;\t\t\t#current in A\n", + "pf = R/z1;\t\t\t#power factor----->math.cos(phi)\n", + "#As Xl-Xc is inductive,pf is lagging\n", + "z2 = math.sqrt((R**2)+(Xl)**2);\t\t\t#impedance of coil in ohms\n", + "Vl = I*(z2);\t\t\t#voltage across coil in volts\n", + "Vc = I*(Xc);\t\t\t#voltage across capacitor in volts\n", + "print \"Thus inductive reacmath.tance, capacitive reacmath.tance, impedance, current, powerfactor are %2.2f ohms, \\\n", + "%2.2f ohms, %2.2f ohms, %d A, %1.1f respectively\"%(Xl,Xc,z1,I,pf);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus inductive reacmath.tance, capacitive reacmath.tance, impedance, current, powerfactor are 31.42 ohms, 21.22 ohms, 14.28 ohms, 14 A, 0.7 respectively\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.17 Page No : 176" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "L = 10;\t\t\t#inductance in milliHenry\n", + "C = 5;\t\t\t#capacitor in uf\n", + "phi = 50;\t\t\t#phase in degrees-------->lagging\n", + "f = 500;\t\t\t#frequency in hz\n", + "V = 200;\t\t\t#supply voltage in volts\n", + "\n", + "#CALCULATIONS\n", + "Xc = 1/(2*math.pi*f*C*10**-6);\t\t\t#Capacitive reacmath.tance in ohms\n", + "Xl = (2*math.pi*f*L*10**-3);\t\t\t#inductive reacmath.tance in ohms\n", + "R = (Xc-Xl)/(math.tan(phi*math.pi/180));\t\t\t#resistance in ohms\n", + "Z = math.sqrt((R)**2+(Xc-Xl)**2);\t\t\t#impedance in ohms\n", + "I = V/Z;\t\t\t#current in A\n", + "Vr = (I)*(R);\t\t\t#voltage across resistance\n", + "Vl = (I)*(Xl);\t\t\t#voltage across inductance\n", + "Vc = (I)*(Xc);\t\t\t#voltage across capacitance\n", + "print \"Thus voltages across resistance, inductance, capacitance are %3.2f volts, %3.2f volts, %3.2f volts respectively\"%(Vr,Vl,Vc);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus voltages across resistance, inductance, capacitance are 128.56 volts, 149.26 volts, 302.47 volts respectively\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.18 Page No : 176" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from sympy import Symbol,solve\n", + "#Chapter-5, Example 5.18, Page 176\n", + "\n", + "#INPUT DATA\n", + "L = 5;\t\t\t#inductance in Henry\n", + "f = 50;\t\t\t#frequency in hz\n", + "V = 230;\t\t\t#supply voltage in volts\n", + "R = 2;\t\t\t#resistance in ohms\n", + "V1 = 250;\t\t\t#voltage across coil in V\n", + "\n", + "#CALCULATIONS\n", + "Xl = (2*math.pi*f*L);\t\t\t#inductive reacmath.tance in ohms\n", + "Z1 = math.sqrt((R)**2+(Xl)**2);\t\t\t#impedance of coil in ohms\n", + "I = V1/Z1;\t\t\t#current in A\n", + "Z = V/I;\t\t\t#total impedance in ohms\n", + "#Z = math.sqrt((R)**2+(Xl-Xc)**2) and solving for Xc\n", + "Xc = Symbol(\"Xc\");\n", + "p = (Xc**2)-3141.58*(Xc)+378004\n", + "roots2 = solve(p);\n", + "r2 = roots2[1];\n", + "#Xc cannot be greater than Z\n", + "C = 1/(2*math.pi*f*r2);\t\t\t#capacitance in F\n", + "print \"Thus value of C that must be present suct that voltage across coil is 250 volts is %g F respectively\"%(C);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus value of C that must be present suct that voltage across coil is 250 volts is 1.05531e-06 F respectively\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.19 Page No : 178" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.19, Page 178\n", + "\n", + "#v = 350*math.cos(3000*t-20)\n", + "#i = 15*math.cos(3000*t-60)\n", + "#INPUT DATA\n", + "L = 0.5;\t\t\t#inductance in Henry\n", + "phi = -40;\t\t\t#phase difference between applied voltage and current\n", + "#Xl>Xc(P.f is lagging)\n", + "w = 3000;\t\t\t#freq in hz\n", + "Vm = 350;\t\t\t#peak voltage in volts\n", + "Im = 15;\t\t\t#peak current in amps\n", + "#CALCULATIONS\n", + "Z = Vm/Im;\t\t\t#total impedance in ohms\n", + "#Xl-Xc = 0.839*R = X\n", + "#Z = math.sqrt((R)**2+(X)**2)\n", + "#Z = 1.305*R\n", + "R = Z/1.305;\t\t\t#resistance in ohms\n", + "X = 0.839*R;\t\t\t#\n", + "#X = Xl-Xc\n", + "Xl = w*L;\t\t\t#reactive inductance in ohms\n", + "Xc = Xl-X;\t\t\t#capacitive reacmath.tance in ohms\n", + "C = 1/(w*Xc);\t\t\t#capacitance in uf\n", + "print \"Thus resistance and capacitance are %2.2f ohms and %g F respectively\"%(R,C);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resistance and capacitance are 17.62 ohms and 2.24435e-07 F respectively\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.20 Page No : 182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "from scipy.optimize import fsolve\n", + "from sympy.solvers import solve\n", + "\n", + "\n", + "#INPUT DATA\n", + "R = 10;\t\t\t#resistance in ohms\n", + "L = 0.1;\t\t\t#inductance in henry\n", + "f = 50;\t\t\t#frequency in hz\n", + "#CALCULATIONS\n", + "Xl = (2*math.pi*f*L);\t\t\t#inductive reacmath.tance in ohms\n", + "Z = R+((1j)*(Xl));\t\t\t#impedance in ohms\n", + "Y = inv([[Z]])#[0];\t\t\t#admittance in mho\n", + "y = abs(Y);\t\t\t#admittance in mho\n", + "print \"admittance is %1.5f mho\"%(y);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "admittance is 0.03033 mho\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.21 Page No : 182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "\n", + "#INPUT DATA\n", + "#CALCULATIONS\n", + "Z = 10+((1j)*(5));\t\t\t#impedance in ohms\n", + "Y = inv([[Z]]);\t\t\t#admittance in mho\n", + "print (Y);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "[[ 0.08-0.04j]]\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.22 Page No : 182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "Z1 = 7.+((1j)*5);\t\t\t#impedance of branch1 in ohms\n", + "Z2 = 10.-((1j)*8);\t\t\t#impedance of branch2 in ohms\n", + "V = 230.;\t\t\t#supply voltage in volts\n", + "f = 50.;\t\t\t#frequency in hz\n", + "#CALCULATIONS\n", + "Y1 = 1/(Z1);\t\t\t#admittance of branch1 in mho\n", + "Y2 = 1/(Z2);\t\t\t#admittance of branch2 in mho\n", + "Y = Y1+Y2;\t\t\t#admittance of combined circuit\n", + "print (Y);\n", + "g = abs(Y);\t\t\t#conductance in mho;\n", + "B = math.atan(Y.imag/Y.real);\t\t\t#susceptance in mho\n", + "I = V*(Y);\t\t\t#current\n", + "print (I);\t\t\t#total current taken from mains in A\n", + "z = math.atan(I.imag/I.real);\n", + "pf = math.cos(z);\t\t\t#power factor\n", + "print \"thus conductance and susceptance of the circuit is %1.3f mho and %1.3f mho respectively\"%(g,B);\n", + "print \"power factor is %1.3f lagging\"%(pf)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(0.155570204351-0.0187870797627j)\n", + "(35.7811470007-4.32102834542j)\n", + "thus conductance and susceptance of the circuit is 0.157 mho and -0.120 mho respectively\n", + "power factor is 0.993 lagging\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.23 Page No : 183" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.23, Page 183\n", + "\n", + "#INPUT DATA\n", + "V = 240.;\t\t\t#voltage in volts\n", + "f = 50.;\t\t\t#frequency in Hz\n", + "R = 15.;\t\t\t#resisimath.tance in ohms\n", + "I = 22.1;\t\t\t#current in A\n", + "#CALCULATIONS\n", + "G = 1/R;\t\t\t#conductance in mho\n", + "#susceptance of the circuit,B = 1/(Xl) = 0.00318/L\n", + "#admittance of the circuit,(G-jB) = (0.067-j(0.00318/L))\n", + "Y = I/V;\t\t\t#admittance in mho;\n", + "#Y = math.sqrt((0.067)**2+(0.00318/L)**2) = 0.092-----eqn(1)\n", + "#solving eqn(1) for L we have it as\n", + "L = math.sqrt((0.00318)**2/((Y)**2-(G)**2));\t\t\t#inductance in henry\n", + "#when current is 34A\n", + "I1 = 34;\t\t\t#current in A\n", + "Y1 = I1/V;\t\t\t#admittance in mho\n", + "#for Y1 we need to find f \n", + "f1 = math.sqrt((3.183)**2/((Y1)**2-(G)**2));\t\t\t#frequency in hz\n", + "print \"Thus value of frequency when current is 34A is %2.1f Hz\"%(f1);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus value of frequency when current is 34A is 25.5 Hz\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.24 Page No : 184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "\n", + "#Chapter-5, Example 5.24, Page 184\n", + "\n", + "#INPUT DATA\n", + "L = 0.05;\t\t\t#inductance in henry\n", + "R2 = 20.;\t\t\t#resistance in ohms\n", + "R1 = 15.;\t\t\t#resistance in ohms\n", + "V = 200.;\t\t\t#supply voltage in volts\n", + "f = 50.;\t\t\t#frequency in hz\n", + "#CALCULATIONS\n", + "#for branch 1\n", + "Z1 = (R1)+((1j)*(2*math.pi*f*L));\t\t\t#impedance in ohms\n", + "Y1 = inv([[Z1]]);\t\t\t#admittance in branch\n", + "I1 = V*(Y1);\t\t\t#current in branch\n", + "print (I1);\n", + "i1 = abs(I1);\t\t\t#magnitude of current\n", + "#for branch 2\n", + "Y2 = 1/R2;\t\t\t#admittance in branch\n", + "I2 = V*Y2;\t\t\t#current in branch\n", + "i2 = abs(I2);\t\t\t#magnitude of current\n", + "I = I1+I2;\t\t\t#total current in A\n", + "i = abs(I);\t\t\t#magnitude of total current\n", + "theta = math.atan(I.imag/I.real);\t\t\t#angle in radians\n", + "theta = theta*(180)/(math.pi);\t\t\t#angle in degrees\n", + "print \"Thus current in branch1,branch2 abd total currents are %1.2f A, %d A, %2.2f A respectively\"%(i1,i2,i);\n", + "print \"phase angle of the combination is %2.1f degrees\"%(theta);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "[[ 6.3594338-6.6595835j]]\n", + "Thus current in branch1,branch2 abd total currents are 9.21 A, 10 A, 17.66 A respectively\n", + "phase angle of the combination is -22.2 degrees\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.25 Page No : 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "\n", + "#INPUT DATA\n", + "L = 6.;\t\t\t#inductance in millihenry\n", + "R2 = 50.;\t\t\t#resistance in ohms\n", + "R1 = 40.;\t\t\t#resistance in ohms\n", + "C = 4.;\t\t\t#capacitance in uf\n", + "V = 100.;\t\t\t#voltage in volts\n", + "f = 800.;\t\t\t#frequency in hz\n", + "#CALCULATIONS\n", + "Xl = (2*math.pi*f*L*10**-3);\t\t\t#inductive reacmath.tance in ohms\n", + "Xc = 1/(2*math.pi*f*C*10**-6);\t\t\t#capacitive reacmath.tance in ohms\n", + "Y1 = inv([[(R1)+(1j*Xl)]]);\t\t\t#admittance of branch1 in mho\n", + "Y2 = inv([[(R2)-(1j*Xc)]]);\t\t\t#admittance of branch2 in mho\n", + "I1 = V*(Y1);\t\t\t#current in branch 1\n", + "I2 = V*(Y2);\t\t\t#current in branch 2\n", + "I = I1+I2;\t\t\t#total curremt in A\n", + "theta = (math.atan(I1.imag/I1.real))-math.atan(I2.imag/I2.real);\n", + "theta = theta*180/math.pi;\t\t\t#angle in degrees\n", + "print \"Thus total current taken from supply is %2.2f\"%(abs(I));\n", + "print \"phase angle between currents of coil and capacitor is %2.2f degrees\"%(theta);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus total current taken from supply is 2.61\n", + "phase angle between currents of coil and capacitor is -81.86 degrees\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.26 Page No : 186" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "Z1 = 10+(1j*15);\t\t\t#impedance in ohms\n", + "Z2 = 6-(1j*8);\t\t\t#impedance in ohms\n", + "I = 15.;\t\t\t#current in A\n", + "#CALCULATIONS\n", + "I1 = ((Z2)/(Z1+Z2))*(I);\t\t\t#umath.sing current division rule\n", + "I2 = ((Z1)/(Z1+Z2))*(I);\t\t\t#umath.sing current division rule\n", + "i1 = abs(I1);\t\t\t#magnitude of current 1\n", + "i2 = abs(I2);\t\t\t#magnitdude of current 2\n", + "P1 = ((i1)**2)*(Z1*(1));\t\t\t#power consumed by branch 1\n", + "P2 = ((i2)**2)*(Z2*(1));\t\t\t#power consumed by branch 2\n", + "print \"Thus power consumed by branches 1 and 2 are %3.2f W and %4.1f W respectively\"%(P1.real,P2.real);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus power consumed by branches 1 and 2 are 737.70 W and 1438.5 W respectively\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.27 Page No : 187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "#Chapter-5, Example 5.27, Page 187\n", + "\n", + "#INPUT DATA\n", + "V = 200.;\t\t\t#voltage in volts\n", + "f = 50.;\t\t\t#frequency in hz\n", + "R1 = 10.;\t\t\t#resistance in ohms\n", + "L1 = 0.0023;\t\t\t#inductance in henry\n", + "R2 = 5.;\t\t\t#resistance in ohms\n", + "L2 = 0.035;\t\t\t#inductance in henry\n", + "#CALCULATIONS\n", + "Xl1 = (2*math.pi*f*L1);\t\t\t#inductive reacmath.tance in branch 1 in ohm\n", + "Xl2 = (2*math.pi*f*L2);\t\t\t#inductive reacmath.tance in branch 2 in ohm\n", + "Y1 = inv([[10+(1j*7.23)]]);\t\t\t#admittance of branch 1 in mho\n", + "Y2 = inv([[5+(1j*10.99)]]);\t\t\t#admittance of branch 2 in mho\n", + "Y = Y1+Y2;\t\t\t#total admittance in mho\n", + "I1 = V*(Y1);\t\t\t#current through branch1\n", + "I2 = V*(Y2);\t\t\t#current through branch2\n", + "I = I1+I2;\t\t\t#total current in A\n", + "theta = math.atan(I.imag/I.real);\t\t\t#angle in radians\n", + "pf_of_combination = math.cos(theta);\t\t\t#powerfactor---->lagging\n", + "print \"Thus currents in branch1, branch2 and total current are %2.1f A, %2.1f A and %2.2f A respectively\"%(abs(I1),abs(I2),abs(I));\n", + "print \"pf of combination is %1.3f\"%(pf_of_combination);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus currents in branch1, branch2 and total current are 16.2 A, 16.6 A and 31.68 A respectively\n", + "pf of combination is 0.631\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.28 Page No : 189" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "f = 50.;\t\t\t#freq in hz\n", + "V = 100.;\t\t\t#volatge in V\n", + "L1 = 0.015;\t\t\t#inductance in branch 1 in henry\n", + "L2 = 0.08;\t\t\t#inductance in branch 2 in henry\n", + "R1 = 2.;\t\t\t#resistance of branch 1 in ohms\n", + "x1 = 4.71;\t\t\t#reacmath.tance of branch 1 in ohms\n", + "R2 = 1.;\t\t\t#resistance of branch 2 in ohms\n", + "x2 = 25.13;\t\t\t#reacmath.tance of branch 2 in ohms\n", + "Z1 = (R1)+(1j*x1);\t\t\t#impedance of branch1 in ohms\n", + "Z2 = (R2)+(1j*x2);\t\t\t#impedance of branch1 in ohms\n", + "I1 = V/Z1;\t\t\t#current in branch 1 in A\n", + "print \"current in branch 1 in A\"\n", + "print (I1);\n", + "I2 = V/Z2;\t\t\t#current in branch 2 in A\n", + "print \"current in branch 2 in A\"\n", + "print (I2);\n", + "I3 = I1+I2;\t\t\t#total current in A\n", + "print \"total current in A\"\n", + "print (I3);\n", + "#note:Answer for real part of total current given in textbook is wrong.Please check the calculations\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "current in branch 1 in A\n", + "(7.63822319652-17.9880156278j)\n", + "current in branch 2 in A\n", + "(0.158098542505-3.97301637316j)\n", + "total current in A\n", + "(7.79632173903-21.961032001j)\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.29 Page No : 189" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "\n", + "#CALCULATIONS\n", + "R = 8;\t\t\t#resistance in ohms\n", + "Xc = -(1j)*12;\t\t\t#capacitive reacmath.tance in ohms\n", + "Y = (inv([[R]])+inv([[Xc]]));\t\t\t#admittance in mho\n", + "print (Y);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "[[ 0.125+0.08333333j]]\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.30 Page No : 189" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "\n", + "#CALCULATIONS\n", + "R = 3;\t\t\t#resistance in ohms\n", + "Xl = (1j)*4;\t\t\t#inductive reacmath.tance in ohms\n", + "Y = (inv([[R]])+inv([[Xl]]));\t\t\t#admittance in mho\n", + "print (Y);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "[[ 0.33333333-0.25j]]\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.31 Page No : 196" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "R = 10.;\t\t\t#resistance in ohms\n", + "L = 10.;\t\t\t#inductance in milli henry\n", + "C = 1.;\t\t\t#capacitance in uF\n", + "V = 200.;\t\t\t#applied voltage in volts\n", + "\n", + "#CALCULATIONS\n", + "fr = 1/(2*math.pi*(math.sqrt(L*C*10**-3*10**-6)));\t\t\t#resonant frequency in hz\n", + "I0 = V/(R);\t\t\t#current at resonance in A\n", + "Vr = I0*R;\t\t\t#voltage across resistance in volts\n", + "Xl = 2*math.pi*fr*L*10**-3;\t\t\t#inductance in ohms\n", + "Vl = I0*Xl;\t\t\t#voltage across inductor in volts\n", + "Xc = inv([[2*math.pi*fr*C*10**-6]]);\t\t\t#capacitance in ohms\n", + "Vc = I0*Xc;\t\t\t#voltage across capacitor in volts\n", + "wr = 2*math.pi*fr\t\t\t#angular resonant frewuency in rad/sec\n", + "Q = (wr*L*10**-3)/(R);\t\t\t#quality factor\n", + "Bw = (fr/Q);\t\t\t#bandwidth in hz\n", + "print \"Thus resonant frequency and current are %4.2f hz and %d A respectively\"%(fr,I0);\n", + "print \"voltages across resistance, inductance and capacitance are %d V, %d V and %d V respectively\"%(Vr,Vl,Vc);\n", + "print \"bandwidth and quality factor are %3.2f hz and %d respectively\"%(Bw,Q);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resonant frequency and current are 1591.55 hz and 20 A respectively\n", + "voltages across resistance, inductance and capacitance are 200 V, 2000 V and 2000 V respectively\n", + "bandwidth and quality factor are 159.15 hz and 10 respectively\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.32 Page No : 196" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "#Chapter-5, Example 5.32, Page 196\n", + "\n", + "#INPUT DATA\n", + "V = 220.;\t\t\t#applied voltage in volts\n", + "f = 50.;\t\t\t#frequency in hz\n", + "Imax = 0.4;\t\t\t#maximum current in A\n", + "Vc = 330.;\t\t\t#voltage across capacitance in volts\n", + "#at resonance condition I0 = 0.4 A\n", + "I0 = 0.4\t\t\t#current in A\n", + "#CALCULATIONS\n", + "Xc = (Vc)/(I0);\t\t\t#capacitive reacmath.tance in ohms\n", + "C = inv([[2*math.pi*f*Xc]]);\t\t\t#capacitance in F\n", + "#at resonance condition Xc = Xl, hence\n", + "L = Xc/(2*math.pi*f);\t\t\t#inductance in henry\n", + "R = V/(Imax);\t\t\t#resistance in ohms\n", + "print \"Thus resistance, inductance and capacitance are %d ohms, %1.2f H and %g F respectively\"%(R,L,C);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resistance, inductance and capacitance are 550 ohms, 2.63 H and 3.8583e-06 F respectively\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.33 Page No : 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "R1 = 5;\t\t\t#resistance of branch1 in ohms\n", + "R2 = 2;\t\t\t#resistance of branch2 in ohms\n", + "L = 10;\t\t\t#inductance in mH\n", + "C = 40;\t\t\t#capacitance in uF \n", + "#CALCULATIONS\n", + "fr = (1./(2*math.pi*(math.sqrt(L*C*10**-9))))*(math.sqrt(((C*10**-6*(R1)**2)-L*10**-3)/((C*10**-6*(R2)**2)-L*10**-3)));\t\t\t#resonant frequency in hz\n", + "print \"Thus resonant frequency is %f hz\"%(fr);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resonant frequency is 240.665502 hz\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.34 Page No : 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "R = 20;\t\t\t#resistance in ohms\n", + "L = 0.2;\t\t\t#inductance in H\n", + "C = 100;\t\t\t#capacitance in uF \n", + "#resistance will be non-inductive only at reosnant frequency\n", + "#CALCULATIONS\n", + "fr = (1./(2*math.pi*(math.sqrt(L*C*10**-6))))*(math.sqrt((L-(C*10**-6*(R)**2))/(L)));\t\t\t#resonant frequency in hz\n", + "print \"Thus resonant frequency is %2.2f hz\"%(fr);\n", + "Rf = (L)/(C*R*10**-6);\t\t\t#non-inductive resistance\n", + "print \"Thus value of non-inductive resistance is %d ohms\"%(Rf);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resonant frequency is 31.83 hz\n", + "Thus value of non-inductive resistance is 100 ohms\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.35 Page No : 198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "Q = 250;\t\t\t#quality factor\n", + "fr = 1.5*10**6;\t\t\t#resonant freq in hertz\n", + "\n", + "#CALCULATIONS\n", + "Bw = (fr)/(Q);\t\t\t#bandwidth in Hz\n", + "hf1 = fr+Bw;\t\t\t#half power freq 1\n", + "hf2 = fr-Bw;\t\t\t#half power freq 2\n", + "print \"Thus bandwidth is %d hz\"%(Bw);\n", + "print \"Thus value of half-power frequencies are %g hz and %g hz\"%(hf1,hf2);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus bandwidth is 6000 hz\n", + "Thus value of half-power frequencies are 1.506e+06 hz and 1.494e+06 hz\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.36 Page No : 198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "L = 40*10**-3;\t\t\t#inductance in henry\n", + "C = 0.01*10**-6;\t\t\t#capacitance in uf\n", + "#CALCULATIONS\n", + "fr = 1./(2*math.pi*math.sqrt(L*C));\t\t\t#resonant frequency\n", + "print \"Thus resonant frequency is %d hz\"%(fr);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resonant frequency is 7957 hz\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.37 Page No : 198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "#Chapter-5, Example 5.37, Page 198\n", + "\n", + "#INPUT DATA\n", + "V = 120.;\t\t\t#source voltage in volts\n", + "R = 50.;\t\t\t#resistance in ohms\n", + "L = 0.5;\t\t\t#inductance in Henry\n", + "C = 50.;\t\t\t#capacitance in uF\n", + "\n", + "#CALCULATIONS\n", + "#at Resonance\n", + "fr = (1./(2*math.pi*(math.sqrt(L*C*10**-6))));\t\t\t#resonant frequency in hz\n", + "I0 = V/R;\t\t\t#current at resonance in A\n", + "Vl = (1j)*(I0*L);\t\t\t#voltage developed across inductor in volts\n", + "Vc = (-1j)*(I0*L);\t\t\t#voltage developed across capacitor in volts\n", + "Q = (inv([[R]]))*(math.sqrt(L/(C*10**-6)));\t\t\t#quality factor\n", + "Bw = (fr)/(Q);\t\t\t#Bandwidth in Hz\n", + "#given resonance is to occur at 300 rad/sec,then\n", + "wr = 300;\t\t\t#wr = (2*math.pi*f*r)------->measured in Hz\n", + "#wr = inv(math.sqrt(L*Cn))\n", + "Cr = inv([[L*(wr)**2]]);\t\t\t#capacitance required in uF\n", + "print \"Thus resonant frequency, current, quality factor and bandwidth are %2.1f Hz, \\\n", + "%1.1f A, %d and %2.1f hz respectively\"%(fr,I0,Q,Bw);\n", + "print \"New value of capacitance at 300 rad/sec is %g F\"%(Cr)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resonant frequency, current, quality factor and bandwidth are 31.8 Hz, 2.4 A, 2 and 15.9 hz respectively\n", + "New value of capacitance at 300 rad/sec is 2.22222e-05 F\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.38 Page No : 199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#INPUT DATA\n", + "Q = 45.;\t\t\t#quality factor\n", + "f1 = 600.*10**3;\t\t\t#freq in Hz\n", + "f2 = 1000.*10**3;\t\t\t#freq in Hz\n", + "#given new resistance is 50% greater than former.let us consider two reismath.tances as R1 = 1 ohm and R2 = 1.5 ohm for ease of calculation.Then\n", + "R1 = 1;\t\t\t#resistance in ohm\n", + "R2 = 1.5;\t\t\t#resistance in ohm\n", + "\n", + "#CALCULATIONS\n", + "W1 = 2*math.pi*f1;\t\t\t#angular freq 1 in rad/sec\n", + "W2 = 2*math.pi*f2;\t\t\t#angular freq 2 in rad/sec\n", + "Q = 45;\t\t\t#quality factor\n", + "L = (Q*R1)/(W1);\t\t\t#inductance in henry\n", + "Q1 = (W2*L)/(R2);\t\t\t#new quality factor\n", + "print \"Thus new quality factor is %d\"%(Q1);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus new quality factor is 50\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.39 Page No : 199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "\n", + "#INPUT DATA\n", + "R = 4.;\t\t\t#resistance in ohm\n", + "L = 100.*10**-6;\t\t\t#inductance in henry\n", + "C = 250.*10**-12;\t\t\t#capacitance in Farads\n", + "\n", + "#CALCULATIONS\n", + "fr = inv([[2*math.pi*math.sqrt(L*C)]]);\t\t\t#resonant frequency in Hz\n", + "Q = (inv([[R]]))*(math.sqrt(L/C));\t\t\t#Q-factor\n", + "Bw = fr/Q;\t\t\t#bandwidth in Hz\n", + "hf1 = fr+Bw;\t\t\t#halfpower freq1 in Hz\n", + "hf2 = fr-Bw;\t\t\t#halfpower freq2 in Hz\n", + "\n", + "print \"Thus resonant freq, Q-factor and new halfpower frequencies are %d hz , %d, %g hz, %g hz respectively\"%(fr,Q,hf1,hf2);\n", + "#note:given answers are wrong in textbook.Please check the answers\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resonant freq, Q-factor and new halfpower frequencies are 1006584 hz , 158, 1.01295e+06 hz, 1.00022e+06 hz respectively\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.40 Page No : 200" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy.linalg import inv\n", + "\n", + "#INPUT DATA\n", + "R = 10;\t\t\t#resistance in ohm\n", + "L = 10**-3;\t\t\t#inductance in henry\n", + "C = 1000*10**-12;\t\t\t#capacitance in Farads\n", + "V = 20;\t\t\t#voltage in volts\n", + "#CALCULATIONS\n", + "fr = inv([[2*math.pi*math.sqrt(L*C)]]);\t\t\t#resonant frequency in Hz\n", + "Q = (inv([[R]]))*(math.sqrt(L/C));\t\t\t#Q-factor\n", + "Bw = fr/Q;\t\t\t#bandwidth in Hz\n", + "hf1 = fr+Bw;\t\t\t#halfpower freq1 in Hz\n", + "hf2 = fr-Bw;\t\t\t#halfpower freq2 in Hz\n", + "print \"Thus resonant freq, Q-factor and new halfpower frequencies are %d hz , %d , %g hz, %g hz respectively\"%(fr,Q,hf1,hf2);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus resonant freq, Q-factor and new halfpower frequencies are 159154 hz , 100 , 160746 hz, 157563 hz respectively\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.41 Page No : 208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "P1 = 1000.;\t\t\t#power1 in watts\n", + "P2 = 1000.;\t\t\t#power2 in watts\n", + "#CALCULATIONS\n", + "#for case(1)\n", + "Pt = P1+P2;\t\t\t#total power in watts\n", + "phi = math.atan(math.sqrt(3)*((P2-P1)/(P2+P1))*(180/math.pi));\t\t\t#math.since math.tan(phi) = math.sqrt(3)*((P2-P1)/(P2+P1)))\n", + "pf = math.cos(phi);\n", + "print \"Thus power and powerfactor are %d W ,%d respectively\"%(Pt,pf);\n", + "#for case(2)\n", + "P3 = 1000;\t\t\t#power3 in watts\n", + "P4 = -1000;\t\t\t#power4 in watts\n", + "Pt1 = P3+P4;\t\t\t#total power in watts\n", + "pf1 = 0;\t\t\t#math.since we cannot perform division by zero in scilab,it doesn't consider it as infinite quantity to yield 90 degree angle and hence powerfactor 0\n", + "print \"Thus power and powerfactor are %d W ,%d respectively\"%(Pt1,pf1);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus power and powerfactor are 2000 W ,1 respectively\n", + "Thus power and powerfactor are 0 W ,0 respectively\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.42 Page No : 209" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "V1 = 400.;\t\t\t#voltage in volts\n", + "Z1 = (3.+((1j)*4));\t\t\t#impedance in ohms\n", + "#CALCULATIONS\n", + "#in star connected system,phase voltage = (line voltage)\n", + "Ep = V1/(math.sqrt(3));\t\t\t#voltage in volts\n", + "Ip = Ep/Z1;\t\t\t#current in A\n", + "ip1 = abs(Ip);\t\t\t#line current in A\n", + "theta = math.atan(Ip.imag/Ip.real);\n", + "Pt = math.sqrt(3)*V1*ip1*math.cos(theta);\t\t\t#total power consumed in load in W\n", + "print \"Thus total power consumed in load is %f W\"%(Pt);\n", + "#note:for line current the answer given is 46.02A instead of 46.2 A and hence total power consumed changes\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus total power consumed in load is 19200.000000 W\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.43 Page No : 209" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "V1 = 400;\t\t\t#voltage in volts\n", + "Il = 10;\t\t\t#current in A\n", + "#CALCULATIONS\n", + "#in star connected system,phase current = (line current) = I1\n", + "phase_voltage = (V1)/(math.sqrt(3));\t\t\t#voltage in Volts\n", + "print \"Thus phase voltage is %1.0f V\"%(phase_voltage);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus phase voltage is 231 V\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.44 Page No : 209" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-5, Example 5.44, Page 209\n", + "\n", + "#INPUT DATA\n", + "Z1 = (6-((1j)*8));\t\t\t#impedance1 in ohms\n", + "Z2 = (16+((1j)*12));\t\t\t#impedance2 in ohms\n", + "I1 = (12+((1j)*16));\t\t\t#current in A\n", + "#CALCULATIONS\n", + "V = I1*Z1;\t\t\t#applied voltage in volts\n", + "I2 = V/(Z2);\t\t\t#current in other branch in A\n", + "print \"current in other branch in Amps\"\n", + "print (I2);\n", + "I = I1+I2;\t\t\t#total current in A\n", + "print \"total current in Amps\";\n", + "print (I);\n", + "i1 = abs(I);\t\t\t#magnitude in A\n", + "i2 = math.atan(I.imag/I.real);\n", + "P = V*i1*math.cos(i2);\t\t\t#power consumed in circuit\n", + "print \"Thus voltage applied and power consumed are %d V and %d W respectively\"%(V.real,P.real);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "current in other branch in Amps\n", + "(8-6j)\n", + "total current in Amps\n", + "(20+10j)\n", + "Thus voltage applied and power consumed are 200 V and 4000 W respectively\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.45 Page No : 210" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "Vl = 415.;\t\t\t#voltage in volts\n", + "Z = (4+((1j)*6));\t\t\t#impedance in each phase in ohm\n", + "#CALCULATIONS\n", + "Ip = Vl/Z;\t\t\t#current in each phase in A\n", + "ip1 = abs(Ip);\t\t\t#magnitude of Ip\n", + "Il = (math.sqrt(3))*(ip1);\t\t\t#line current in A\n", + "phi = math.atan(Ip.imag/Ip.real)\n", + "P = (math.sqrt(3))*Vl*Il*math.cos(phi);\t\t\t#power supplied in W\n", + "print \"Thus power supplied is %d W\"%(P);\n", + "#note:the math.cosfunction of scilab and calculator will differ slightly\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus power supplied is 39744 W\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.46 Page No : 210" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#INPUT DATA\n", + "Vl = 400;\t\t\t#voltage in volts\n", + "Il = 20;\t\t\t#current in A\n", + "f = 50;\t\t\t#freq in hz\n", + "pf = 0.3\t\t\t#power factor\n", + "#CALCULATIONS\n", + "Ip = Il/math.sqrt(3);\t\t\t#phase current in A\n", + "Z = Vl/Ip;\t\t\t#impedance in each phase in ohms\n", + "phi = math.acos(0.3);\t\t\t#angle in radians\n", + "Zb = Z*(math.cos(phi)+(1j)*math.sin(phi));\t\t\t#impedance connected in each phase\n", + "print \"Thus impedance connected in each phase in ohms\";\n", + "print (Zb);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus impedance connected in each phase in ohms\n", + "(10.3923048454+33.0454232837j)\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.47 Page No : 210" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "P1 = 6*10**3;\t\t\t#power in Kw\n", + "P2 = -1*10**3;\t\t\t#power in Kw\n", + "#CALCULATIONS\n", + "P = P1+P2;\t\t\t#total power in Kw\n", + "a = math.atan(math.sqrt(3)*((P2-P1)/(P2+P1)));\n", + "pf = math.cos(a);\t\t\t#power factor\n", + "print \"Thus power and power factor are %d W and %1.2f respectively\"%(P,pf);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus power and power factor are 5000 W and 0.28 respectively\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.48 Page No : 211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "Z = 3-((1j)*4);\t\t\t#impedance in ohms\n", + "Vl = 400;\t\t\t#line voltage in volts\n", + "#CALCULATIONS\n", + "Vp = Vl/(math.sqrt(3));\t\t\t#phase voltage in volts\n", + "Ip = Vp/abs(Z);\t\t\t#phase current in Amps\n", + "#line current(Il) = phase current(Ip)\n", + "Il = Ip;\t\t\t#line current in A\n", + "power_factor = math.cos(math.atan(Z.imag/Z.real));\n", + "power_consumed = math.sqrt(3)*Vl*Il*power_factor;\n", + "print \"Thus power consumed and power factor are %f W and %1.1f respectively\"%(power_consumed,power_factor);\n", + "#note:answer computed for power consumed in textbook is wrong.Please check the calculations\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus power consumed and power factor are 19200.000000 W and 0.6 respectively\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.49 Page No : 211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "Il = 10.;\t\t\t#current in Amps\n", + "Vl = 400.;\t\t\t#line voltage in volts\n", + "#CALCULATIONS\n", + "Vp = Vl/(math.sqrt(3));\t\t\t#line to neutral voltage\n", + "Ip = Il;\t\t\t#phase current in Amps\n", + "print \"Thus line to neutral voltage and phase current are %1.0f V and %d A respectively\"%(Vp,Ip);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus line to neutral voltage and phase current are 231 V and 10 A respectively\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.50 Page No : 211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "P1 = 2000;\t\t\t#power in watts\n", + "P2 = 1000;\t\t\t#power in watts\n", + "Vl = 400;\t\t\t#line voltage in volts\n", + "#CALCULATIONS\n", + "P = P1+P2;\t\t\t#power in Watts\n", + "a = math.sqrt(3*(P1-P2)/(P1+P2));\n", + "b = math.atan(math.sqrt(a));\n", + "power_factor = math.cos(b);\n", + "kVA = P/power_factor;\n", + "print \"Thus power, power factor and kVA are %d W , %1.3f and %1.2f respectively\"%(P,power_factor,kVA);\n", + "#note:computed value for powerfactor and kVA in textbook are wrong.Please check the calculations" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus power, power factor and kVA are 3000 W , 0.707 and 4242.64 respectively\n" + ] + } + ], + "prompt_number": 26 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/KonasaniSai Dheeraj/sample(chapter_1).ipynb b/sample_notebooks/KonasaniSai Dheeraj/sample(chapter_1).ipynb new file mode 100755 index 00000000..cbbd7757 --- /dev/null +++ b/sample_notebooks/KonasaniSai Dheeraj/sample(chapter_1).ipynb @@ -0,0 +1,236 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 1 Survey of Units and Dimensions"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1_1 pgno:10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Force to accelerate = lbf 3.10810936815\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Initialization of variables\n",
+ "gc=32.1739 #lbm ft/lbf s**2\n",
+ "m=10 #lbm\n",
+ "a=10 #ft/s**2\n",
+ "#calculations\n",
+ "F=m*a/gc\n",
+ "#results\n",
+ "print\"Force to accelerate = lbf\",F\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1_2 pgno:11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Force to accelerate = lbf 10.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Initialization of variables\n",
+ "gc=32.1739 #lbm ft/lbf s^2\n",
+ "m=10 #lbm\n",
+ "a=gc #ft/s^2\n",
+ "#calculations\n",
+ "F=m*a/gc\n",
+ "#results\n",
+ "print\"Force to accelerate = lbf\",F\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1_3 pgno:11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "velocity = mph 60.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Initialization of variables\n",
+ "v=88 #ft/s\n",
+ "#calculations\n",
+ "v2=v*3600./5280.\n",
+ "#results\n",
+ "print\"velocity = mph\",v2\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1_4 pgno:12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "velocity = mph 60.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Initialization of variables\n",
+ "v=88 #ft/s\n",
+ "#calculations\n",
+ "v2=v*1./5280*3600\n",
+ "#results\n",
+ "print\"velocity = mph\",v2\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1_5 pgno:13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Force without dimensions = lbm/ft sec 0.0005791302\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Initialization of variables\n",
+ "F=5e-9 #lbf/ft^2 hr\n",
+ "g=32.1739\n",
+ "#calculations\n",
+ "F2=F*3600*g\n",
+ "#results\n",
+ "print\"Force without dimensions = lbm/ft sec\",F2\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1_6 pgno:14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Density of water in this system = lbf/ft^2 1.93650754183\n",
+ "\n",
+ " Specific weight = lbf/ft^2 62.305\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Initialization of variables\n",
+ "rho=62.305 #lbf/ft^2\n",
+ "g=32.1739 #ft/s^2\n",
+ "#calculations\n",
+ "gam=rho/g\n",
+ "#results\n",
+ "print\"Density of water in this system = lbf/ft^2\",gam\n",
+ "print\"\\n Specific weight = lbf/ft^2\",rho\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/sample_notebooks/KonasaniSai Dheeraj/sample_(chapter_6).ipynb b/sample_notebooks/KonasaniSai Dheeraj/sample_(chapter_6).ipynb new file mode 100755 index 00000000..58372eed --- /dev/null +++ b/sample_notebooks/KonasaniSai Dheeraj/sample_(chapter_6).ipynb @@ -0,0 +1,256 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 6 : FORMULAE"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6_1 pgno:69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "expr=8*i-5\n",
+ "the number is 16\n"
+ ]
+ }
+ ],
+ "source": [
+ " #8 times a number is decreased by 5 the result is 123\n",
+ "#let x be the number\n",
+ "\n",
+ "print'expr=8*i-5'\n",
+ "x=0;\n",
+ "for x in range(0,100):\n",
+ " if((8*x-5)==123):\n",
+ " print\"the number is \",x\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6_2 pgno:71"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "expr=(2*n+1)+(2*n+3)+(2*n+5)\n",
+ "n=%i \n",
+ "12\n",
+ "\n",
+ " the numbers are 199 201 203\n"
+ ]
+ }
+ ],
+ "source": [
+ "#sum of 3 consecutive odd no.'s is 81\n",
+ "\n",
+ "#let the 3 consecutive odd numbers be 2n+1,2n+3,2n+5\n",
+ "\n",
+ "print\"expr=(2*n+1)+(2*n+3)+(2*n+5)\"\n",
+ "n=0;\n",
+ "for n in range(0,100):\n",
+ " if((2*n+1)+(2*n+3)+(2*n+5)==81):\n",
+ " print\"n=%i \\n\",n \n",
+ "\n",
+ "n1=2*n+1;\n",
+ "n2=2*n+3;\n",
+ "n3=2*n+5;\n",
+ "print\"\\n the numbers are \",n1,n2,n3\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6_3 pgno:72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "p1=(6*x-5)\n",
+ "p2=(2*x+9)\n",
+ "p3=p1-p2\n",
+ "satisfies the equation \n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "print\"p1=(6*x-5)\"\n",
+ "p1=numpy.array([6, -5])\n",
+ "print\"p2=(2*x+9)\"\n",
+ "p2=numpy.array([2, 9])\n",
+ "print\"p3=p1-p2\"\n",
+ "p3=p1-p2\n",
+ "\n",
+ "x1=numpy.roots(p3)\n",
+ "left=6*x1-5; #check by substituion \n",
+ "right=2*x1+9;\n",
+ "if(left==right):\n",
+ "\tprint'satisfies the equation '\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6_4 pgno:73"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "x is a polynomial function\n",
+ "by the law of sighs roots are [ 3.]\n"
+ ]
+ }
+ ],
+ "source": [
+ "print\"x is a polynomial function\"\n",
+ "import numpy\n",
+ "p1=numpy.array([3/5+1/2, 0])\n",
+ "p2=numpy.array([5/4, -3])\n",
+ "#p1=3*x/5+x/2;\n",
+ "#p2=5*x/4-3;\n",
+ "p3=p1-p2;\n",
+ "x=numpy.roots(p3) #by the law of signs\n",
+ "print\"by the law of sighs roots are\",x\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6_5 pgno:75"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "p1=4*x-(x-2)/3\n",
+ "p2=5+(2*x+1)/4\n",
+ "p3=p1-p2\n",
+ "satisfies the equation \n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy\n",
+ "print\"p1=4*x-(x-2)/3\"\n",
+ "p1=numpy.array([11/3, 2/3])\n",
+ "print\"p2=5+(2*x+1)/4\"\n",
+ "p2=numpy.array([1/2, 21/4])\n",
+ "print\"p3=p1-p2\"\n",
+ "p3=p1-p2\n",
+ "\n",
+ "x=numpy.roots(p3)\n",
+ "left=4*x-(x-2)/3; #check by substituion \n",
+ "right=5+(2*x+1)/4;\n",
+ "if(left != right):\n",
+ "\tprint'satisfies the equation '\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": []
+ },
+ {
+ "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/sample_notebooks/LalitKumar/chapter2_1.ipynb b/sample_notebooks/LalitKumar/chapter2_1.ipynb new file mode 100755 index 00000000..855095b5 --- /dev/null +++ b/sample_notebooks/LalitKumar/chapter2_1.ipynb @@ -0,0 +1,339 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:4a31773c970db99aecfd55acb0ef8a97d14b54e9f5682909d8824d63b10be118" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter2 : Atomic model & bonding in solids" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example-2.1, page no-28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#given\n", + "#atomic no. of gold\n", + "Z=79\n", + "#kinetic energy of alpha particle\n", + "E=7.68*1.6*(10)**(-13) #J because [1MeV=1.6*(10)**(-13)]\n", + "e=1.6*10**(-19) #C\n", + "E0=8.854*10**(-12) #F/m\n", + "#the distance of closest approach is given by:\n", + "d0=2*e*Z*e/(4*(math.pi)*E0*E) #m\n", + "print \"The closest approach of alpha particle is %.2ef m\" %d0" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The closest approach of alpha particle is 2.96e-14f m\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example-2.2, page no-29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "from numpy import *\n", + "#given\n", + "#IN THE RUTHERFORD SCATTERING EXPERIMENT\n", + "#the no of particles scattered at\n", + "theta1=(pi)/2 #radians\n", + "#is\n", + "N90=44 #per minute\n", + "#the number of particles scattered particales N is given by\n", + "#N=C*(1/(sin(theta/2))**4) where C is propotionality constant\n", + "#solving above equation for C\n", + "C=N90*(sin(theta1/2))**4 \n", + "# now to find the no of particles scatering at 75 and 135 degrees\n", + "theta2=75*(pi)/180 #radians\n", + "N75=C*(1/(sin(theta2/2))**4) #per minute\n", + "theta3=135*(pi)/180 #radians\n", + "N135=C*(1/(sin(theta3/2))**4) #per minute\n", + "print \"The no of particles scattered at 75 and 135 degrees are %d per minute and %d per minutes\" %(N75,N135)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The no of particles scattered at 75 and 135 degrees are 80 per minute and 15 per minutes\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example-2.3, page no-32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "#mass of electron\n", + "m=9.11*10**(-31) #kg\n", + "#charge on an electron\n", + "e=1.6*10**(-19) #C\n", + "#plank's constant\n", + "h=6.62*10**(-34)\n", + "E0=8.85*10**(-12) \n", + "#NO OF ELECTRONS SHELLS IN HYDROZEN ATOm\n", + "n=1\n", + "#atomic number of hydrogen\n", + "Z=1\n", + "#radius of first orbit of hydrogen is given by\n", + "r1=n**2*E0*h**2/((pi)*m*Z*e**2) #m\n", + "print \"The radius of the first orbit of the electron in the hydrogen atom %.2e\"%(r1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The radius of the first orbit of the electron in the hydrogen atom 5.29e-11\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example-2.4, page no-32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "#mass of electron\n", + "m=9.11*10**(-31) #kg\n", + "#charge on an electron\n", + "e=1.6*10**(-19) #C\n", + "#plank's constant\n", + "h=6.62*10**(-34)\n", + "E0=8.85*10**(-12) \n", + "#NO OF ELECTRONS SHELLS IN HYDROZEN ATOm\n", + "n=1\n", + "#atomic number of hydrogen\n", + "Z=1\n", + "#ionization potential energy of hydrogen atom is given by\n", + "E=m*Z**2*e**4/(8*(E0)**2*h**2*n**2) #J\n", + "#energy in eV\n", + "EV=E/e #eV\n", + "print \"The ionization potential for hydrogen atom is %0.2f V\" %(EV)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ionization potential for hydrogen atom is 13.59 V\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example-2.6, page no-36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "#uncertainity in the momentum\n", + "deltap=10**-27 #kg ms**-1\n", + "#according to uncertainity principle\n", + "#deltap* deltax >=h/(2*(pi))\n", + "#we know that \n", + "h=6.626*10**-34 #Js\n", + "#here instead of inequality we are using only equality just for notation otherwise it is greater than equal to as mentioned above\n", + "#now deltax is given by\n", + "deltax=h/(2*(pi)*deltap) #m\n", + "print \"The minimum uncertainity is %.2e m\"%(deltax)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum uncertainity is 1.05e-07 m\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example-2.10, page no- 57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "#ionization potential of hydrogen\n", + "E1=13.6 #eV\n", + "#when \n", + "n=3\n", + "E3=-E1/n**2 #eV\n", + "#when \n", + "n=5\n", + "E5=-E1/n**2 #eV\n", + "print \"Energy of 3rd and 5th orbits are %0.2f eV and %0.2f eV\"%(E3,E5)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy of 3rd and 5th orbits are -1.51 eV and -0.54 eV\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example-2.11, page no-59" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "#dipole moment og HF is\n", + "DM=6.375*10**(-30) #Cm\n", + "#intermolecular distance\n", + "r=0.9178*10**(-10) #m\n", + "#charge on an electron\n", + "e=1.67*10**(-19) #C\n", + "#since the HF posses ionic characters\n", + "#so\n", + "#Hf in fully ionic state has dipole moment as\n", + "DM2=r*e #Cm\n", + "#percentage ionic characters\n", + "percentage=DM/DM2*100 #%\n", + "print \"The percentage ionic character is %0.2f approx.\"%(percentage)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The percentage ionic character is 41.59 approx.\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "example-2.12, page no-60" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given\n", + "#elctronegativity of In\n", + "EnIn=1.5\n", + "#elctronegativity of As\n", + "EnAs=2.2\n", + "#elctronegativity of Ga\n", + "EnGa=1.8\n", + "#for InAs\n", + "ionic_charater1=(1-exp((-0.25)*(EnAs-EnIn)**2))*100 #in %\n", + "#for GaAs\n", + "ionic_charater2=(1-exp((-0.25)*(EnAs-EnGa)**2))*100 # in %\n", + "print \"Ionic character in InAs and GaAs are %0.1f %% and %0.1f %%\"%(ionic_charater1,ionic_charater2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ionic character in InAs and GaAs are 11.5 % and 3.9 %\n" + ] + } + ], + "prompt_number": 30 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/ManchukondaGopi Krishna/Chapter_7_Wave_Guides.ipynb b/sample_notebooks/ManchukondaGopi Krishna/Chapter_7_Wave_Guides.ipynb new file mode 100644 index 00000000..38d38099 --- /dev/null +++ b/sample_notebooks/ManchukondaGopi Krishna/Chapter_7_Wave_Guides.ipynb @@ -0,0 +1,299 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 7 Wave Guides"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7_1 pgno:75"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "-Critical wavelength = cm\n",
+ "15.24\n",
+ "-Guide wavelength = cm 13.3\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "c=3.*(10**8);\n",
+ "f=3000.*(10**8);\n",
+ "lo=c/f;\n",
+ "l=lo*(10**4);\n",
+ "m=1.;n=0;a=7.62;\n",
+ "lc=2*a;\n",
+ "print\"-Critical wavelength = cm\\n\",lc\n",
+ "lg=sqrt((l*l*lc*lc)/((lc*lc)-(l*l)));\n",
+ "print\"-Guide wavelength = cm\",round(lg*10)/10\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7_2 pgno:76"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Frequency of dominant mode = GHz 5.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "a=3;\n",
+ "lc=2*a;\n",
+ "Zs=500;n=377;c=3*(10**8);\n",
+ "lo=sqrt(1-((n/Zs)**2))*lc;\n",
+ "f=c/lo;\n",
+ "f1=f/(10**7);\n",
+ "print\"Frequency of dominant mode = GHz\",round(f1*100)/100\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7_3 pgno:78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(i)Cutoff wavelegth = cm\n",
+ "9.0\n",
+ "(ii)Guide wavelength = cm\n",
+ "3.59\n",
+ "(iii)Phase velocity = * 10**8 m/sec\n",
+ "3.23\n",
+ " Group velocity = * 10**8 m/sec\n",
+ "2.79\n",
+ "(iv)Characteristic impedance = ohm 406.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "a=4.5;b=3.;f=9.*(10**9);c=3.0*(10**8);n=377.\n",
+ "lo=c/f;\n",
+ "l=lo*(10**2);\n",
+ "lc=2*a;\n",
+ "print\"(i)Cutoff wavelegth = cm\\n\",lc\n",
+ "lg=l /(sqrt(1-((l/lc)**2)));\n",
+ "print\"(ii)Guide wavelength = cm\\n\",round(lg*100)/100\n",
+ "Vp=(lg/l)*c*10**-8;\n",
+ "print\"(iii)Phase velocity = * 10**8 m/sec\\n\",round(Vp*100)/100\n",
+ "Vg=(l/lg)*c*10**-8;\n",
+ "print\" Group velocity = * 10**8 m/sec\\n\",round(Vg*100)/100\n",
+ "Z=n/(sqrt(1-((l/lc)**2)));\n",
+ "print\"(iv)Characteristic impedance = ohm\",round(Z)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7_4 pgno:79"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total attenuation = db 681.88\n",
+ "The difference in result is due to erroneous value in textbook\n"
+ ]
+ }
+ ],
+ "source": [
+ "a=1.;c=3.*(10**8);f=(10**9);d=25.;\n",
+ "lc=2*a;\n",
+ "lo=c/f;\n",
+ "l=lo/(10**2);\n",
+ "att=(54.55/lc)*d;\n",
+ "print\"Total attenuation = db\",round(att*100)/100\n",
+ "#the difference in result is due to erroneous value in textbook.\n",
+ "print (\"The difference in result is due to erroneous value in textbook\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7_5 pgno:80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "-Phase velocity Vp = * 10**8 m/sec\n",
+ "4.2\n",
+ "-Group velocity Vg = * 10**8 m/sec\n",
+ "2.2\n",
+ "-Phase constant = radians/m 45.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi\n",
+ "c=3.*(10**8);f=3000.*(10**6);a=.0722;\n",
+ "lo=c/f;\n",
+ "lc=2*a;\n",
+ "lg=lo/(sqrt(1-((lo/lc)**2)));\n",
+ "Vp=(lg/lo)*c*10**-8;\n",
+ "print\"-Phase velocity Vp = * 10**8 m/sec\\n\",round(Vp*10)/10\n",
+ "Vg=(lo/lg)*c*10**-8;\n",
+ "print\"-Group velocity Vg = * 10**8 m/sec\\n\",round(Vg*10)/10\n",
+ "b=(2*pi)/lg;\n",
+ "print\"-Phase constant = radians/m\",round(b)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7_6 pgno:81"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(i)Cutoff frequency for TE11 = GHz\n",
+ "3.52\n",
+ "(ii)Cutoff frequency for TE01 = GHz 4.6\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "d=5.;c=3.*(10**8);\n",
+ "lo=1.706*d;\n",
+ "f=c/lo;\n",
+ "ff=f/(10**7);\n",
+ "print\"(i)Cutoff frequency for TE11 = GHz\\n\",round(ff*100)/100\n",
+ "l=1.306*d;\n",
+ "fc=c/l;\n",
+ "ffc=fc/(10**7);\n",
+ "print\"(ii)Cutoff frequency for TE01 = GHz\",round(ffc*10)/10\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7_7 pgno:82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "-Cutoff wavelength = cm\n",
+ "8.54\n",
+ "-Guide wavelength = cm\n",
+ "4.17\n",
+ "-Characteristic wave impedance = ohm 419.7\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,sqrt\n",
+ "c=3.*(10**8);f=8.*(10**9);r=2.5;h=1.84;n=377.;\n",
+ "l=c/f;\n",
+ "lo=l*(10**2);\n",
+ "lc=2*pi*r/h;\n",
+ "print\"-Cutoff wavelength = cm\\n\",round(lc*100)/100\n",
+ "lp=lo/(sqrt(1-((lo/lc)**2)));\n",
+ "print\"-Guide wavelength = cm\\n\",round(lp*100)/100\n",
+ "Zo=n/(sqrt(1-((lo/lc)**2)));\n",
+ "print\"-Characteristic wave impedance = ohm\",round(Zo*10)/10\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/sample_notebooks/MaulikRathod/ch11.ipynb b/sample_notebooks/MaulikRathod/ch11.ipynb new file mode 100755 index 00000000..3b3ec8a7 --- /dev/null +++ b/sample_notebooks/MaulikRathod/ch11.ipynb @@ -0,0 +1,745 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f1e32f78d016d65eaf62d619ce157e62f2d402e55bfc70a9a046c3e8d919d007" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11 : Pumping Machinery" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1 Page No : 223" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "\n", + "import math \n", + "h= 75. \t#ft\n", + "e= 0.75\n", + "k= 0.01\n", + "Q= 3000. \t#gal/min\n", + "k1= 1.2\n", + "N= 1500.\n", + "g= 32.2 \t#ft/sec**2\n", + "D= 0.836 \t#ft\n", + "\n", + "#CALCULATIONS\n", + "W= h/e\n", + "v1= math.sqrt((W-h)/k)\n", + "Q1= Q/374.06\n", + "f1= Q1/(k1*D**2)\n", + "u1= math.pi*D*N/60\n", + "w1= W*g/u1\n", + "B= math.degrees(math.atan((f1/(u1-w1))))\n", + "\n", + "#RESULTS\n", + "print 'Diameter of impeller = %.3f ft '%(D)\n", + "print ' Blade angle at outlet edge of impeller = %.f degrees '%(B)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diameter of impeller = 0.836 ft \n", + " Blade angle at outlet edge of impeller = 30 degrees \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.3 Page No : 226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "V= 150. \t#ft**3/sec\n", + "A1= 750. \t#r.p.m\n", + "di= 21. \t#in\n", + "do= 30. \t#in\n", + "v= 50. \t#ft/sec\n", + "A= 70. \t#degrees\n", + "w= 4.\t#in\n", + "p= 30. \t#per cent\n", + "p1= 25. \t#per cent\n", + "sv= 12.8 \t#ft**3/lb\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "u= A1*2*math.pi*di/(24*60)\n", + "u1= A1*2*math.pi*do/(24*60)\n", + "f1= V/(math.pi*(do/12)*(1./3))\n", + "w1= u1-f1*1/math.tan(math.radians((A)))\n", + "v1= math.sqrt(f1**2+w1**2)\n", + "P= (u1**2+v**2-(f1**2/(math.sin(math.radians(A)))**2))/(2*g)\n", + "h= 30*v1**2/(100*2*g)\n", + "Nh= v1**2/(20*2*g)\n", + "Prt= P+Nh\n", + "W= u1*w1/g\n", + "e= Prt*100/W\n", + "Power= Prt*V/(sv*550)\n", + "\n", + "#RESULTS\n", + "print 'Total pressure rise = %.1f ft of air'%(Prt)\n", + "print ' manometric efficiency = %.1f percent'%(e)\n", + "print ' Power = %.2f hp '%(Power)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total pressure rise = 137.9 ft of air\n", + " manometric efficiency = 58.5 percent\n", + " Power = 2.94 hp \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.4 Page No : 228" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/sec**2\n", + "u1= 90. \t#ft/sec\n", + "w1= 70. \t#ft\n", + "e= 0.8\n", + "h1= 10. \t#ft\n", + "h2= 16. \t#ft\n", + "h3= 5. \t#ft\n", + "k= 2./5\n", + "f1= 20. \t#ft/sec\n", + "f= 18. \t#ft/sec\n", + "a= 45. \t #degrees\n", + "x1= 164.4 \t#ft\n", + "\n", + "#CALCULATIONS\n", + "Hm= u1*w1/g\n", + "Hm1= e*Hm\n", + "lh= Hm-Hm1-h1-h2-h3\n", + "vg= k*math.sqrt(f1**2+w1**2)\n", + "pr= ((f**2+u1**2-f1**2/(math.sin(math.radians(a)))**2)/(2*g))-h2\n", + "pr1= x1-pr\n", + "ge= pr1*g*2*100/(vg/k)**2\n", + "\n", + "#RESULTS\n", + "print 'manometer Head = %.1f ft '%(Hm1)\n", + "print ' outlet velocity from guides = %.1f ft/sec '%(vg)\n", + "print ' Pressure rise through impeller only = %.1f ft '%(pr)\n", + "print ' Guide balde efficiency = %.f per cent '%(ge)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "manometer Head = 156.5 ft \n", + " outlet velocity from guides = 29.1 ft/sec \n", + " Pressure rise through impeller only = 102.4 ft \n", + " Guide balde efficiency = 75 per cent \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.6 Page No : 231" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "D1= 7.5 \t#in\n", + "Q1= 850. \t#gal/min\n", + "p1= 62.4 \t#lb/ft**3\n", + "N1= 1800.\n", + "D2= 15. \t#in\n", + "Q2= 12000. \t#gal/min\n", + "p2= 64. \t#lb/ft**3\n", + "N1= 1800. \t#r.p.m \n", + "H1= 14. \t#lb/ft**2\n", + "\n", + "#CALCULATIONS\n", + "N2= Q2*N1*(D1)**3/(Q1*D2**3)\n", + "P1= p1*H1/144\n", + "P2= P1*N2**2*D2**2*p2/(N1**2*p1*D1**2)\n", + "\n", + "#RESULTS\n", + "print 'N2 = %.f r.p.m '%(N2+4)\n", + "print ' P2 = %.f lb/in**2 '%(P2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "N2 = 3180 r.p.m \n", + " P2 = 78 lb/in**2 \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.8 Page No : 234" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#initialisation of variables\n", + "r= 5.\n", + "\n", + "#CALCULATIONS\n", + "sr= r**2\n", + "sr1= r**2/r\n", + "\n", + "#RESULTS\n", + "print 'Corresponding ratio = %.f '%(sr)\n", + "print ' Corresponding ratio = %.f '%(sr1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Corresponding ratio = 25 \n", + " Corresponding ratio = 5 \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.9 Page No : 236" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "e= 0.88\n", + "w= 1.25 \t#in\n", + "d= 10. \t#in\n", + "q= 630. \t#gal/min\n", + "a= 40. \t#degrees\n", + "g= 32.2 \t#ft/sec**2\n", + "e1= 0.83\n", + "\n", + "#CALCULATIONS\n", + "Q= q/(6.24*60)\n", + "f1= Q/(e*math.pi*(d/12)*(w/12))\n", + "u1= 1000*(w*4/12)*2*math.pi/60\n", + "w1= u1-f1*1/math.tan(math.radians(a))\n", + "W= u1*w1/g\n", + "lr= (f1**2+u1**2-f1**2/(math.sin(math.radians(a)))**2)/(2*g)\n", + "mh= e1*W\n", + "p= mh-lr\n", + "v1= math.sqrt(f1**2+w1**2)\n", + "ke= v1**2/(2*g)\n", + "pke= p*100/ke\n", + "me= 100*lr/W\n", + "\n", + "#RESULTS\n", + "print 'Velocity of flow = %.f ft/sec'%(f1)\n", + "print ' Work done = %.1f ft-lb/lb'%(W)\n", + "print ' manometric efficiency = %.1f ft'%(mh)\n", + "print ' Pressure recovered = %.1f ft head'%(p)\n", + "print ' Kinetic energy discharge = %.f ft-lb/lb'%(ke)\n", + "print ' Percentage of kinetic energy recovered = %.1f per cent'%(pke)\n", + "print ' manometric efficiency = %d percent'%(me)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity of flow = 7 ft/sec\n", + " Work done = 47.8 ft-lb/lb\n", + " manometric efficiency = 39.7 ft\n", + " Pressure recovered = 11.2 ft head\n", + " Kinetic energy discharge = 20 ft-lb/lb\n", + " Percentage of kinetic energy recovered = 55.7 per cent\n", + " manometric efficiency = 59 percent\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.10 Page No : 239" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "W1= 7640. \t#gal/min\n", + "W2= 11400. \t#gal/min\n", + "Hm= 63. \t#ft\n", + "Hm1= 80. \t#ft\n", + "ep1= 72. \t#per cent\n", + "ep2= 76. \t#per cent\n", + "\n", + "#CALCULATIONS\n", + "whp1= W1*Hm/(60*550)\n", + "whp2= W2*Hm1/(60*550)\n", + "bhp1= whp1*100/ep1\n", + "bhp2= whp2*100/ep2\n", + "w1= W2/10\n", + "\n", + "#RESULTS\n", + "print 'For both pumps discharge = %.f gal/min against an 80-ft head'%(W2)\n", + "print ' delivery from one pump = %.1f h.p '%(bhp1)\n", + "print ' delivery from two pumps = %.1f h.p '%(bhp2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For both pumps discharge = 11400 gal/min against an 80-ft head\n", + " delivery from one pump = 20.3 h.p \n", + " delivery from two pumps = 36.4 h.p \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.11 Page No : 241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "h= 94. \t#ft\n", + "w= 62.4 \t#lb/ft**3\n", + "e= 0.58\n", + "p= 73.5 \t#per cent\n", + "\n", + "#CALCULATIONS\n", + "WHP= h*e*w/550\n", + "BHP= WHP/(p/100)\n", + "\n", + "#RESULTS\n", + "print 'W.H.P= %.2f h.p'%(WHP)\n", + "print ' Brake horse power= %.1f'%(BHP)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "W.H.P= 6.19 h.p\n", + " Brake horse power= 8.4\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.12 Page No : 243" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "sl= 12. \t#ft\n", + "l= 20. \t#ft\n", + "d= 4. \t#in\n", + "dp= 6. \t#in\n", + "lst= 18. \t#in\n", + "k= 0.025\n", + "H= 32. \t#ft\n", + "g= 32.2 \t#ft/sec**2\n", + "pf= 6. \t#ft\n", + "a= 33.83 \n", + "a1= 9.53\n", + "\n", + "#CALCULATIONS\n", + "A= math.sqrt((H-sl-d)*g/a)*a1\n", + "Q= 2*math.pi*(dp/12)**2*lst/(12*4*60)\n", + "v= Q/(math.pi*(d/12)**2/4)\n", + "kh= v**2/(2*g)\n", + "fh= k*l*v**2*12/(2*g*d)\n", + "N= math.sqrt((H-sl-pf)/(kh+fh))\n", + "\n", + "#RESULTS\n", + "print 'premissible speed = %.1f r.p.m'%(A)\n", + "print ' maximum premissible speed = %.1f r.p.m'%(N)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "premissible speed = 37.2 r.p.m\n", + " maximum premissible speed = 168.8 r.p.m\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.13 Page No : 245" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "b= 6. \t#in\n", + "s= 12. \t #in\n", + "d= 4. \t #in\n", + "a1= 30. \t#degrees\n", + "a2= 90. \t#degrees\n", + "a3= 120. \t#degrees\n", + "N= 120. \t#r.p.m\n", + "n= 4.\n", + "#calculations\n", + "A= 2*math.pi*N/60\n", + "V= math.pi*(b/12)**2*n/4\n", + "v= (b/12)**2*A*(b/12)/(d/12)**2\n", + "Q1= v*math.pi*(d/12)**2*math.sin(math.radians(a1))/4\n", + "Q2= v*math.pi*(d/12)**2*math.sin(math.radians(a2))/4\n", + "Q3= v*math.pi*(d/12)**2*math.sin(math.radians(a3))/4\n", + "Q4= V-Q1\n", + "Q5= Q2-V\n", + "Q6= Q3-V\n", + "a4= math.degrees(math.asin(V/(v*math.pi*(d/12)**2)))+a1\n", + "A= 180-a4\n", + "\n", + "#RESULTS\n", + "print 'rate of flow at a1 = %.3f cuses'%(Q4)\n", + "print ' rate of flow at a2 = %.3f cuses'%(Q5)\n", + "print ' rate of flow at a3 = %.3f cuses'%(Q6)\n", + "print ' crak angle = %.1f degrees'%(a4)\n", + "print ' crak angle = %.1f degrees'%(A)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rate of flow at a1 = 0.169 cuses\n", + " rate of flow at a2 = 0.448 cuses\n", + " rate of flow at a3 = 0.283 cuses\n", + " crak angle = 39.2 degrees\n", + " crak angle = 140.8 degrees\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.14 Page No : 247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "n= 2. \t#strokes/sec\n", + "dp= 6. \t#in\n", + "ds= 18. \t#in\n", + "ds1=4. \t#in\n", + "l= 20. \t#ft\n", + "l1= 20. \t#ft\n", + "f= 0.008\n", + "la= 5. \t#ft\n", + "A= 60. \t#r.p.m\n", + "f= 0.008\n", + "w= 62.4 \t#lb/ft**3\n", + "g=32.2\n", + "\n", + "#CALCULATIONS\n", + "V= math.pi*(ds/12)*n*(dp/12)**2/4\n", + "vmp= 2*math.pi*A*(ds/24)/60\n", + "vmp1= vmp*(dp**2/ds1**2)\n", + "hfmax= 4*f*(l-la)*vmp1**2/(2*g*ds1/12)\n", + "H1= round(2*hfmax/3,1)\n", + "H2= H1*13\n", + "Wls= (H1+H2)*w*math.pi/16*1.5*2\n", + "mv= V/(math.pi*(ds1/12)**2/4)\n", + "lh= round(4*f*(l-la)*mv**2/(2*g*(ds1/12)),2)\n", + "lhf= 12*lh\n", + "Wls1= (lh+13.21)*w*math.pi*1.5/16 *2 \n", + "WS= Wls-Wls1\n", + "\n", + "#RESULTS\n", + "print 'Work lost per second= %.f ft lb/sec'%(Wls)\n", + "print ' Work saved per second = %.f ft-lb/sec'%(WS)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work lost per second= 875 ft lb/sec\n", + " Work saved per second = 352 ft-lb/sec\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.15 Page No : 248" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "d= 7.5 \t#in\n", + "s= 15. \t#in\n", + "l= 36. \t#ft\n", + "h1= 34. \t#ft\n", + "h2= 12. \t#ft\n", + "L= 10. \t #ft\n", + "g= 32.2 \t#ft/sec**2\n", + "f= 0.008\n", + "l1= 20. \t#ft\n", + "d1= 4. \t#in\n", + "h3= 110. \t#ft\n", + "w= 62.4 \t#lb/ft**3\n", + "l2= 180. \t#ft\n", + "\n", + "#CALCULATIONS\n", + "Q= (math.pi/4)*(d)**2*(s/12)*2*(l/60)/144\n", + "v= Q/((math.pi/4)*(d1/12)**2)\n", + "a= (d/4)**2*(d/12)*(l*2*math.pi/60)**2\n", + "H= h1-h2-(L*a/g)-(v**2*0.5/g)-(4*f*l1*v**2/(2*g*(d1/12)))\n", + "H1= h1+h3+(L*a/g)+(v**2*0.5/g)+(4*f*l2*v**2/(2*g*(d1/12)))\n", + "dh= (H1-H)*w/144\n", + "NP= dh*(math.pi/4)*d**2\n", + "\n", + "#RESULTS\n", + "print 'Head at piston = %.2f ft of water absolute'%(H)\n", + "print ' Head at piston = %.2f ft of water absolute'%(H1)\n", + "print ' Difference on head of piston = %.f lb/in**2'%(dh)\n", + "print ' Net load on piston = %.f lb'%(NP)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Head at piston = 11.04 ft of water absolute\n", + " Head at piston = 161.59 ft of water absolute\n", + " Difference on head of piston = 65 lb/in**2\n", + " Net load on piston = 2882 lb\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.16 Page No : 250" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "from numpy import *\n", + "from numpy.linalg import *\n", + "\n", + "#initialisation of variables\n", + "f= 0.009\n", + "dc= 3.5 \t#in\n", + "ds= 6. \t#in\n", + "r= 0.25\n", + "sl= 8. \t#ft\n", + "d= 2.5 \t#in\n", + "l= 14. \t#ft\n", + "el= 8. \t#ft\n", + "ed= 22.5 \t#in\n", + "ph= 4. \t#ft\n", + "g= 32.2 \t#ft/sec**2\n", + "f= 0.009\n", + "\n", + "#CALCULATIONS\n", + "BC= el+l\n", + "v= math.sqrt(BC*g/(l*(d/2)*(r)*(dc/d)**2))*9.55\n", + "vec=roots([2,1/r,-1])\n", + "H1= 77\n", + "MV= math.sqrt(BC*g/(l*(d/2)*(r)*(dc/d)**2))*r*(math.sin(math.radians(H1))+(math.sin(math.radians(2*H1))/8))\n", + "mvp= MV*dc**2/d**2\n", + "hf= 4*f*(sl+l)*mvp**2/(2*g*(d/12))\n", + "\n", + "#RESULTS\n", + "print 'pump speed = %.1f r.p.m'%(v)\n", + "print ' Friction head = %.3f ft'%(hf)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "pump speed = 86.8 r.p.m\n", + " Friction head = 1.240 ft\n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/MaulikRathod/ch11_1.ipynb b/sample_notebooks/MaulikRathod/ch11_1.ipynb new file mode 100755 index 00000000..f4d8bc9d --- /dev/null +++ b/sample_notebooks/MaulikRathod/ch11_1.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/sample_notebooks/MohdAnwar/Chapter4_1.ipynb b/sample_notebooks/MohdAnwar/Chapter4_1.ipynb new file mode 100644 index 00000000..66a0b7e3 --- /dev/null +++ b/sample_notebooks/MohdAnwar/Chapter4_1.ipynb @@ -0,0 +1,424 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:fc56911ca78177974b04004faec461a6b97c01b43d461299fb0cf06eea3ba6da" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter4 - Analog Electronic Volt-Ohm Milliammeters" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2.1 - page : 4-4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Peak amplitude\n", + "#given data :\n", + "E_rms=230.0 #in V\n", + "Ep=2**(1.0/2)*E_rms \n", + "print \"Peak amplitude, Ep = \", round(Ep,2), \" V.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Peak amplitude, Ep = 325.27 V.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12.1 - page : 4-21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Resistance\n", + "#given data :\n", + "import math\n", + "Rm=500.0 #in ohm\n", + "E_rms=50.0 # in V\n", + "E_dc=(2**(1.0/2)*E_rms)/(math.pi/2) \n", + "Im=1*10**-3 #in A\n", + "R=E_dc/Im \n", + "Rs=(R-Rm)*10**-3 \n", + "print \"The resistance, Rs = \", round(Rs,1), \" kohm.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The resistance, Rs = 44.5 kohm.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.14.1 - page : 4-25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Percentage error\n", + "ff1=1.0 #form factor\n", + "r=1.11 #sine wave form factor\n", + "per=((r-ff1)/ff1)*100 #percentage error\n", + "print \"Percentage error is \", per, \" %\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage error is 11.0 %\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.14.2 - page : 4-26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#part (i)\n", + "# form factor\n", + "T1=3.0 #\n", + "T=range(0,4) \n", + "##Function for integration\n", + "def integrate(a,b,f):\n", + " # def function before using this\n", + " # eg. : f=lambda t:200**2*t**2\n", + " #a=lower limit;b=upper limit;f is a function\n", + " import numpy\n", + " N=1000 # points for iteration\n", + " t=numpy.linspace(a,b,N)\n", + " ft=f(t)\n", + " ans=numpy.sum(ft)*(b-a)/N\n", + " return ans\n", + "# Calculating Vrms\n", + "a=T[0]\n", + "b=T[3]\n", + "f=lambda t:200**2*t**2\n", + "Vrms=(1/T1*integrate(a,b,f))**(1.0/2) # V\n", + "# Calculating Vav\n", + "g=lambda t:200*t\n", + "Vav=1/T1*integrate(a,b,g) # V\n", + "ff=Vrms/Vav # form factor\n", + "print \"Form factor is \", round(ff,4)\n", + "# part (ii)\n", + "ff1=1.11 #form factor of sine wave\n", + "per=((ff1/ff)-1)*100 #percentage errpr\n", + "print \"Percentage error in meter indication is\", round(per,3), \" %\"\n", + "# Answer is not accurate in the textbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Form factor is 1.155\n", + "Percentage error in meter indication is -3.895 %\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.19.1 - page : 4-43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Current\n", + "#Given data :\n", + "gm=0.005 #in mho\n", + "V1=1.5 #in V\n", + "rd=200.0*10**3 # in Ohm\n", + "Rd=15.0*10**3 #in ohm\n", + "Rm=75.0 #in ohm\n", + "I=(gm*V1*((Rd*rd)/(rd+Rd)))/((2*((Rd*rd)/(rd+Rd)))+Rm) # A\n", + "I*=10**3 # mA\n", + "print \"Current, I = \", round(I,2), \" mA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current, I = 3.74 mA\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.19.2 - page : 4-44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Current\n", + "#Given data :\n", + "gm=0.005 #in mho\n", + "V1=[0.2,0.4,0.6,0.8,1.0] #in V\n", + "rd=200.0*10**3 # in Ohm\n", + "Rd=15.0*10**3 #in ohm\n", + "Rm=75.0 #in ohm\n", + "Im=[]\n", + "for v1 in V1:\n", + " Im.append(gm*(rd*Rd*v1/(rd+Rd))/(2.0*(rd*Rd/(rd+Rd))+Rm)*1000) # mA\n", + "#Im*=1000 # mA\n", + "print \"Voltage Current\"\n", + "i=0\n", + "for im in Im:\n", + " print V1[i],\" V \",round(Im[i],3),\" A\"\n", + " i+=1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage Current\n", + "0.2 V 0.499 A\n", + "0.4 V 0.997 A\n", + "0.6 V 1.496 A\n", + "0.8 V 1.995 A\n", + "1.0 V 2.493 A\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.19.3 - page : 4-44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Design\n", + "v1=100.0 # in V\n", + "v2=30.0 #in V\n", + "v3=103.0 # in V\n", + "v4=1.0 #in V\n", + "x=9.0 #assume input resistance in Mohm\n", + "r4=(v4/v3)*x*10**3 #in kohm\n", + "r3=(((v4/v1)*x*10**6)-(r4*10**3))*10**-3 #in kohm\n", + "r2=(((v4/v2)*x*10**6)-((r4+r3)*10**3))*10**-3 # in kohm\n", + "r1=9*10**6-((r2+r3+r4)*10**3) # in ohm\n", + "r1*=10**-6 # Mohm\n", + "print \"Resistance, R4 is \",round(r4,2),\" kohm.\"\n", + "print \"Resistance, R3 is \",round(r3,2),\" kohm.\"\n", + "print \"Resistance, R2 is \",r2,\" kohm.\"\n", + "print \"Resistance, R1 is \",r1,\" Mohm.\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance, R4 is 87.38 kohm.\n", + "Resistance, R3 is 2.62 kohm.\n", + "Resistance, R2 is 210.0 kohm.\n", + "Resistance, R1 is 8.7 Mohm.\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.19.4 - page : 4-51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Current\n", + "#given data :\n", + "rd=150.0*10**3 # in ohm\n", + "Rm=50.0 # in ohm\n", + "Rs=1000.0*10**3 # in ohm\n", + "gm=0.0052 #in mho\n", + "rd1=rd/((gm*rd)+1) \n", + "V0=gm*((rd1*Rs)/(rd1+Rs))\n", + "R0=(2*Rs*rd1)/(Rs+rd1)\n", + "I=V0/(R0+Rm) # A\n", + "I*=10**3 # mA\n", + "print \"Curent, I = \", round(I,3),\" mA\"\n", + "# Answer in the textbook is not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Curent, I = 2.3 mA\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.19.5 - page : 4-52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Resistance\n", + "#given data :\n", + "V1=1.0 #in V\n", + "I=1.5*10**-3 #in A\n", + "rd=200.0*10**3 # in ohm\n", + "Rm=50.0 # in ohm\n", + "Rs=600.0*10**3 # in ohm\n", + "gm=0.005 #in mho\n", + "rd1=rd/((gm*rd)+1) \n", + "V0=gm*((rd1*Rs)/(rd1+Rs))*V1\n", + "R0=(2*Rs*rd1)/(Rs+rd1)\n", + "R_cal=(V0/I)-Rm-R0 \n", + "print \"Resistance , R_cal = \",round(R_cal,2),\" ohm\" \n", + "# answer is wrong in book" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance , R_cal = 216.31 ohm\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example q.3 - page : 4-73" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Current and voltage\n", + "rm=10.0 #in ohm\n", + "im=5.0 # in mA\n", + "i=1.0 # in A\n", + "v=5.0 #in A\n", + "ish=i-(im*10**-3) # in A\n", + "m=i/(im*10**-3) # ratio\n", + "rsh=rm/(m-1) #in ohm\n", + "vo=v/i #in V\n", + "rsh1=vo/(im) #in kohm\n", + "print \"Shunt resistance is \",round(rsh,2),\" ohm to measure current upto 1 A\"\n", + "print \"Shunt resistance is \", rsh1,\" kohm to measure voltage upto 5 V\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Shunt resistance is 0.05 ohm to measure current upto 1 A\n", + "Shunt resistance is 1.0 kohm to measure voltage upto 5 V\n" + ] + } + ], + "prompt_number": 30 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/MohdAsif/ch2.ipynb b/sample_notebooks/MohdAsif/ch2.ipynb new file mode 100755 index 00000000..66270ccb --- /dev/null +++ b/sample_notebooks/MohdAsif/ch2.ipynb @@ -0,0 +1,387 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 Casting Processes" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Problem 2.1 on page no. 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import sqrt\n", + "# Given that\n", + "h=15 # Height of spur in cm\n", + "l= 50 # Length of cast in cm\n", + "w= 25 # weidth of cast in cm\n", + "h1= 15 # Height of cast in cm\n", + "g= 981 # Acceleration due to gravity in cm/sec**2\n", + "Ag= 5 # Cross sectional area of the grate in cm**2\n", + "v3= sqrt(2* g * h)\n", + "V = l*w*h1\n", + "tf1= V/(Ag*v3)\n", + "Am = l*w\n", + "tf2 = (Am/Ag)*(1/sqrt(2*g))*2*(sqrt(h) - sqrt(h-h1))\n", + "print \" Filling time for first design = %f sec, \\n Filling time for second design = %f sec\"% (tf1, tf2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Filling time for first design = 21.859294 sec, \n", + " Filling time for second design = 43.718589 sec\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Problem 2 on page no. 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi, sqrt\n", + "# Given that\n", + "h=15 # Height of spur in cm\n", + "l= 50 # Length of cast in cm\n", + "w= 25 # weidth of cast in cm\n", + "h1= 15 # Height of cast in cm\n", + "g= 981 # Acceleration due to gravity in cm/sec**2\n", + "Ag= 5 # Cross sectional area of the grate in cm**2\n", + "Dm = 7800 # Density of molten Fe in Kg/m**3\n", + "Neta = 0.00496 # Kinetic viscosity in Kg/m-sec\n", + "theta = 90 # Angle in degree\n", + "Eq = 25 # (L/D) Equivalent \n", + "v3= sqrt(2* g * h)*(10**(-2))\n", + "d= sqrt((Ag*4)/(pi))*(10**(-2))\n", + "Re = Dm*v3*d/Neta\n", + "f = 0.0791*(Re)**(-1/4)\n", + "L=0.12 # in meter\n", + "Cd= (1+0.45+4*f*((L/d)+Eq))**(-1/2)\n", + "v3_ = Cd*v3\n", + "Re_ = (v3_/v3)*(Re)\n", + "f_ = 0.0791 *(Re_)**(-1/4)\n", + "Cd_ = (1+0.46+4*f_*(L/d + Eq))**(-1/2)\n", + "v3__ = Cd_*v3\n", + "V = l*w*h1\n", + "tf= (V/(Ag*v3__))*(10**-2)\n", + "print \" Filling time for first design = %f sec. \"% tf " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Filling time for first design = 31.918954 sec. \n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Problem on page no. 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given that\n", + "Hi=1.2 # Initial height in m\n", + "H= 0.05 # Height in m\n", + "g= 9.81 # Acceleration due to gravity in m/sec**2\n", + "Dm = 2700 # Density of molten metal in Kg/m**3\n", + "Neta = 0.00273 # Kinetic viscosity in Kg/m-sec \n", + "d= 0.075 # Diameter in m\n", + "D = 1 # Internal diameter of ladle in m\n", + "v3= sqrt(2* g * Hi)\n", + "Re = Dm*v3*d/Neta\n", + "ef=0.075\n", + "Cd= (1+ef)**(-1/2)\n", + "ef_=0.82\n", + "Re_ = (2+ef_)**(-1/2)\n", + "v3_ = sqrt(2*g*H)\n", + "Re_ = Dm*v3_*d/Neta\n", + "At = (pi/4)*D**2\n", + "An = (pi/4)*d**2\n", + "Cd= 0.96\n", + "tf= (sqrt(2/g))*(At/An)*(1/Cd)*sqrt(Hi)\n", + "m = Dm*An*Cd*sqrt(2*g*Hi)\n", + "m_ = Dm*An*Cd*sqrt(2*g*Hi*0.25)\n", + "print \"\"\"Time required to empty the ladle = %f sec,\n", + "Discharge rate are -\n", + "Initially = %f Kg/sec \n", + "When the ladle is 75 percent empty = %f Kg/sec. \"\"\"%(tf,m,m_)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time required to empty the ladle = 91.596179 sec,\n", + "Discharge rate are -\n", + "Initially = 55.563236 Kg/sec \n", + "When the ladle is 75 percent empty = 27.781618 Kg/sec. \n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Problem 5 on page no. 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import symbols, solve\n", + "# Given that\n", + "thetaF= 1540 # Temperature of mould face in degree centigrade\n", + "Theta0 = 28 # Initial temperature of mould in Degree centigrade\n", + "L= 272e3 # Latent heat of liquid metal in J/Kg\n", + "Dm = 7850 # Density of liquid metal in Kg/m**3\n", + "c = 1.17e+3 #Specific heat of sand in J/Kg-K\n", + "k = 0.8655 # Conductivity of sand in W/m-K\n", + "D= 1600 # Density of sand in Kg/m**3\n", + "h = 0.1 # Height in m\n", + "b = 10 # Thickness of slab in cm\n", + "r =h/2# V/A in meter\n", + "lamda = (thetaF - Theta0)*(D*c)/(Dm*L)\n", + "Beta1 = 2*lamda/sqrt(pi)\n", + "Alpha = k /(D*c)\n", + "ts1 = r**2 /((Beta1**2)*Alpha)#In sec\n", + "ts1_=ts1/3600 # In hour\n", + "Beta= symbols('Beta') \n", + "p=Beta**2 - lamda*(2/sqrt(pi))*Beta -lamda/3\n", + "Beta2 = solve(p)[0]\n", + "print \"The value of Beta2 is %f \"%Beta2\n", + "print \"We only take the positive value of Beta2 ,\\nHence Beta2=1.75\" \n", + "r1 = r/3\n", + "ts2 = (r1**2)/((1.75**2)*Alpha) # in sec\n", + "ts2_=ts2/3600#in Hour\n", + "print \"Solidification time for slab-shaped casting = %f hr,\\nSolidification time for sphere = %f hr\"%(ts1_,ts2_)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Beta2 is -0.252713 \n", + "We only take the positive value of Beta2 ,\n", + "Hence Beta2=1.75\n", + "Solidification time for slab-shaped casting = 0.671318 hr,\n", + "Solidification time for sphere = 0.054495 hr\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Problem 7 on page no. 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given that\n", + "thetaF= 1540 # Temperature of mould face in degree centigrade\n", + "thetaO = 28 # Initial temperature of mould in Degree centigrade\n", + "L= 272e3 # Latent heat of iron in J/Kg\n", + "Dm = 7850 # Density of iron in Kg/m**3\n", + "Cs = 0.67e+3 #Specific heat of iron in J/Kg-K\n", + "C = 0.376e3 #Specific heat of copper in J/Kg-K\n", + "Ks = 83 # Conductivity of iron in W/m-K\n", + "K = 398 # Conductivity of copper in W/m-K\n", + "D= 8960 # Density of copper in Kg/m**3\n", + "h = .1 # Height in m\n", + "hF = 1420 # Total heat transfer coefficient across the casting-mould interface in W/m**2-\u00b0C\n", + "AlphaS = K /(D*C)\n", + "thetaS = 982 #In \u00b0C as in example 2.6\n", + "h1= (1+(sqrt((Ks*Dm*Cs)/(K*D*C))))*hF\n", + "a = 1/2 + (sqrt((1/4)+Cs*(thetaF-thetaS)/(3*L)))\n", + "delta=h/2\n", + "ts = (delta+((h1*delta**2)/(2*Ks)))/((h1*(thetaF-thetaS))/(Dm*L*a)) # in sec\n", + "ts_ = ts/3600 # in hours\n", + "h2= (1+(sqrt((K*D*C)/(Ks*Dm*Cs))))*hF\n", + "gama= ((h2**2)/(K**2))*AlphaS*ts\n", + "thetaS_ = thetaO + (thetaS-thetaO)*(1-((exp(gama))))\n", + "print \" Solidification time = %f hr,\\n The surface temperature of the mould = %f \u00b0 C\"%(ts_,thetaS_)\n", + "# The value of the surface temperature of the mould in the book is given as 658.1\u00b0 C, Which is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Solidification time = 0.026965 hr,\n", + " The surface temperature of the mould = -1901.439242 \u00b0 C\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Problem 8 on page no. 77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given that\n", + "A= 60*7.5 # Cross sectional area in cm**2\n", + "v=0.05 # Withdrawal rate in m/sec\n", + "t = 0.0125 # Thickness in m\n", + "thetaF= 1500 # Temperature of mould face in degree centigrate\n", + "thetaP = 1550 # \n", + "thetaO = 20 # Initial temperature of mould in Degree centigrate\n", + "L= 268e3 # Latent heat of molten metal in J/Kg\n", + "Dm = 7680 # Density of molten metal in Kg/m**3\n", + "Cs = 0.67e+3 #Specific heat of molten metal in J/Kg-K\n", + "Cm = 0.755e3 #Specific heat of mould in J/Kg-K\n", + "Ks = 76 # Conductivity of molten metal in W/m-K\n", + "hF = 1420 # Heat transfer coefficient at the casting-mould interface in W/m**2-\u00b0C\n", + "Dtheta = 10 # Maximum temperature of cooling water in \u00b0 C\n", + "L_ = L+Cm*(thetaP-thetaF)\n", + "x=L_ / (Cs*(thetaF-thetaO))\n", + "y= hF*t/Ks\n", + "print \"L_/(Cs(thetaF-thetaO)) = %f,\\nhF*t/Ks = %f\"%(x,y)\n", + "z=0.11 # Where z=hF**2 * lm / (v*Ks*Dm*Cs)\n", + "lm= (z*v*Ks*Dm*Cs)/(hF**2)\n", + "Z=0.28 # Where Z=Q/(lm*(thetaF-thetaO)*sqrt(lm*v*Dm*Cs*Ks))\n", + "Q = Z*lm*(thetaF-thetaO)*sqrt(lm*v*Dm*Cs*Ks)\n", + "m = Q / (4.2e3*Dtheta)\n", + "print \"The mould length = %f meter,\\nThe cooling water requirement = %f Kg/sec\"%(lm,m)\n", + "# Answer for The cooling water requirement in the book is given as 5.05 Kg/sec, Which is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "L_/(Cs(thetaF-thetaO)) = 0.308340,\n", + "hF*t/Ks = 0.233553\n", + "The mould length = 1.066684 meter,\n", + "The cooling water requirement = 48.065525 Kg/sec\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Problem 9 on page no. 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import floor\n", + "# Given that\n", + "a = 15 # Side of the aluminium cube in cm\n", + "Sh = 0.065 # Volume shrinkage of aluminium during solidification\n", + "Vc = a**3\n", + "Vr = 3*Sh*Vc\n", + "h = ((4*Vr)/pi)**(1/3)\n", + "Rr = 6.0/h # Where Rr= (A/V)r\n", + "Rc = 6.0/a # Where Rc = (A/V)c\n", + "print \"(A/V)r=%f, (A/V)c=%f\\n Hence Rr is greater than Rc\"%(Rr,Rc)\n", + "dmin = 6.0/Rc\n", + "Vr_ = (pi/4)*dmin**3\n", + "print \"\"\" With minimum value of d Vr=%d cm**3 .\n", + "This valume is much more than the minimum Vr necessary. \n", + "Let us now consider the top riser when the optimum cylindrical shape is obtained with h=d/2 \n", + "and again (A/V)r = 6/d. However, with a large top riser,\\n the cube loses its top surface for the purpose of heat dissipation.\"\"\"%Vr_\n", + "Rc_ = 5.0/a\n", + "dmin_=6.0/Rc_\n", + "print \" d should be greater than or equal to %d cm\"%dmin_\n", + "Vr__ = (pi/4)*dmin_**2 *floor(h)\n", + "print \" The riser volume with minimum diameter is %d cm**3\"%Vr__" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(A/V)r=6.000000, (A/V)c=0.400000\n", + " Hence Rr is greater than Rc\n", + " With minimum value of d Vr=2650 cm**3 .\n", + "This valume is much more than the minimum Vr necessary. \n", + "Let us now consider the top riser when the optimum cylindrical shape is obtained with h=d/2 \n", + "and again (A/V)r = 6/d. However, with a large top riser,\n", + " the cube loses its top surface for the purpose of heat dissipation.\n", + " d should be greater than or equal to 18 cm\n", + " The riser volume with minimum diameter is 254 cm**3\n" + ] + } + ], + "prompt_number": 40 + } + ], + "metadata": {} + } + ] +} diff --git a/sample_notebooks/MohdIrfan/Chapter6.ipynb b/sample_notebooks/MohdIrfan/Chapter6.ipynb new file mode 100644 index 00000000..59db3bd3 --- /dev/null +++ b/sample_notebooks/MohdIrfan/Chapter6.ipynb @@ -0,0 +1,519 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter6 - Oscillators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.1 - page 438" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Vf= 0.0125 # in volt\n", + "Vo= 0.5 # in volt\n", + "Beta= Vf/Vo \n", + "# For oscillator A*Beta= 1\n", + "A= 1/Beta \n", + "print \"Amplifier Should have a minimum gain of\",A,\"to provide oscillation\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Amplifier Should have a minimum gain of 40.0 to provide oscillation\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.2 - page 439" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi, sqrt\n", + "# Given data\n", + "R1= 50 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "R2=R1 # in ohm\n", + "R3=R2 # in ohm\n", + "C1= 60 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2=C1 # in F\n", + "C3=C2 # in F\n", + "f= 1/(2*pi*R1*C1*sqrt(6)) \n", + "print \"Frequency of oscilltions = %0.2f kHz\" %( f*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 21.66 kHz\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.3 - page 445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "# Given data\n", + "f=2 # in kHz\n", + "f=f*10**3 # in Hz\n", + "# Let\n", + "R= 10 # in kohm (As R should be greater than 1 kohm)\n", + "R=R*10**3 # in ohm\n", + "# Formula f= 1/(2*pi*R*C)\n", + "C= 1/(2*pi*f*R) # in F\n", + "C= C*10**9 # in nF\n", + "# For Bita to be 1/3, Choose\n", + "R4= R # in ohm\n", + "R3= 2*R4 # in ohm\n", + "print \"Value of C = %0.2f nF\" %C\n", + "print \"Value of R3 = %0.f kohm\" %(R3*10**-3)\n", + "print \"Value of R4 = %0.f kohm\" %(R4*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of C = 7.96 nF\n", + "Value of R3 = 20 kohm\n", + "Value of R4 = 10 kohm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.4 - page 445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R1= 200 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "R2=R1 # in ohm\n", + "C1= 200 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2=C1 # in F\n", + "f= 1/(2*pi*R1*C1) # in Hz\n", + "print \"Frequency of oscilltions = %0.2f kHz\" %(f*10**-3)\n", + "\n", + "# Note: Calculation to find the value of f in the book is wrong, so answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 3.98 kHz\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.5 - page 460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 100 # in \u00b5H\n", + "L= L*10**-6 # in H\n", + "C1= .001 # in \u00b5F\n", + "C1= C1*10**-6 # in F\n", + "C2= .01 # in \u00b5F\n", + "C2= C2*10**-6 # in F\n", + "C= C1*C2/(C1+C2) # in F\n", + "# (i)\n", + "f= 1/(2*pi*sqrt(L*C)) # in Hz\n", + "print \"Operating frequency = %0.f kHz\" %(round(f*10**-3))\n", + "# (ii)\n", + "Beta= C1/C2 \n", + "print \"Feedback fraction = %0.1f \" %Beta\n", + "# (iii)\n", + "# A*Bita >=1, so Amin*Bita= 1\n", + "Amin= 1/Beta \n", + "print \"Minimum gain to substain oscillations is\",Amin" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Operating frequency = 528 kHz\n", + "Feedback fraction = 0.1 \n", + "Minimum gain to substain oscillations is 10.0\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.6 - page 460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 15 # in \u00b5H\n", + "L= L*10**-6 # in H\n", + "C1= .004 # in \u00b5F\n", + "C1= C1*10**-6 # in F\n", + "C2= .04 # in \u00b5F\n", + "C2= C2*10**-6 # in F\n", + "C= C1*C2/(C1+C2) # in F\n", + "f= 1/(2*pi*sqrt(L*C)) # in Hz\n", + "print \"Frequency of oscilltions = %0.1f kHz\" %(f*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 681.5 kHz\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.7 - page 461" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 0.01 # in H\n", + "C= 10 # in pF\n", + "C= C*10**-12 # in F\n", + "f= 1/(2*pi*sqrt(L*C)) # in Hz\n", + "print \"Frequency of oscilltions = %0.2f kHz\" %(f*10**-3)\n", + "# Note: Calculation to find the value of f in the book is wrong, so answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 503.29 kHz\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.8 - page 463" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 0.8 # in H\n", + "\n", + "C= .08 # in pF\n", + "C= C*10**-12 # in F\n", + "C_M= 1.9 # in pF\n", + "C_M= C_M*10**-12 # in F\n", + "C_T= C*C_M/(C+C_M) # in F\n", + "R=5 # in kohm\n", + "f_s= 1/(2*pi*sqrt(L*C)) # in Hz\n", + "print \"Series resonant frequency = %0.f kHz\" %(f_s*10**-3)\n", + "# (ii)\n", + "f_p= 1/(2*pi*sqrt(L*C_T)) # in Hz\n", + "print \"Parallel resonant frequency = %0.f kHz\" %(f_p*10**-3)\n", + "# Note: Calculation to find the value of parallel resonant frequency in the book is wrong, so answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Series resonant frequency = 629 kHz\n", + "Parallel resonant frequency = 642 kHz\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.10 - page 466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R1= 220 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "R2=R1 # in ohm\n", + "C1= 250 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2=C1 # in F\n", + "f= 1/(2*pi*R1*C1) \n", + "print \"Frequency of oscilltions = %0.2f Hz\" %f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 2893.73 Hz\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.11 - page 467" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import tan\n", + "# Given data\n", + "R= 10 # in kohm\n", + "R=R*10**3 # in ohm\n", + "f=1000 \n", + "fie= 60 # in \u00b0\n", + "# The impedence of given circuit , Z= R+j*1/(omega*C)\n", + "# the phase shift, tan(fie)= imaginary part/ Real part\n", + "# tand(fie) = 1/(omega*R*C)\n", + "C= 1/(2*pi*R*tan(fie*pi/180)) \n", + "print \"The value of C = %0.2f pF\" %(C*10**12)\n", + "# Note : There is an calculation error to evaluate the value of C, So the answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of C = 9188814.92 pF\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R= 10 # in kohm\n", + "R=R*10**3 # in ohm\n", + "f=1000 \n", + "fie= 60 # in \u00b0\n", + "# The impedence of given circuit , Z= R+j*1/(omega*C)\n", + "# the phase shift, tan(fie)= imaginary part/ Real part\n", + "# tand(fie) = 1/(omega*R*C)\n", + "C= 1/(2*pi*R*tan(fie*pi/180)) \n", + "print \"The value of C = %0.2f \u00b5F\" %(C*10**6)\n", + "# Note : There is an calculation error to evaluate the value of C, So the answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of C = 9.19 \u00b5F\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.12 - page 467" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 50 # in \u00b5H\n", + "L= L*10**-6 # in H\n", + "C1= 300 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2= 100 # in pF\n", + "C2= C2*10**-12 # in F\n", + "C_eq= C1*C2/(C1+C2) # in F\n", + "f= 1/(2*pi*sqrt(L*C_eq)) # in Hz\n", + "print \"Frequency of oscillations = %0.1f MHz\" %(f*10**-6)\n", + "Beta= C2/C1 \n", + "# (iii)\n", + "# A*Beta >=1, so A*Bita= 1 (for sustained oscillations)\n", + "Amin= 1/Beta \n", + "print \"Minimum gain to substain oscillations is\",Amin" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscillations = 2.6 MHz\n", + "Minimum gain to substain oscillations is 3.0\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.14 - page 469" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L1= 2 # in mH\n", + "L1= L1*10**-3 # in H\n", + "L2= 1.5 # in mH\n", + "L2= L2*10**-3 # in H\n", + "# Formula f= 1/(2*pi*sqrt((L1+L2)*C)\n", + "# For f= 1000 kHz, C will be maximum\n", + "f=1000 # in kHz\n", + "f=f*10**3 # in Hz\n", + "Cmax= 1/((2*pi*f)**2*(L1+L2)) # in F\n", + "# For f= 2000 kHz, C will be maximum\n", + "f=2000 # in kHz\n", + "f=f*10**3 # in Hz\n", + "Cmin= 1/((2*pi*f)**2*(L1+L2)) # in F\n", + "print \"Maximum Capacitance = %0.1f pF\" %(Cmax*10**12)\n", + "print \"Minimum Capacitance = %0.1f pF\" %(Cmin*10**12)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum Capacitance = 7.2 pF\n", + "Minimum Capacitance = 1.8 pF\n" + ] + } + ], + "prompt_number": 19 + } + ], + "metadata": {} + } + ] +} diff --git a/sample_notebooks/MohdIrfan/Chapter6_1.ipynb b/sample_notebooks/MohdIrfan/Chapter6_1.ipynb new file mode 100644 index 00000000..9261f4c5 --- /dev/null +++ b/sample_notebooks/MohdIrfan/Chapter6_1.ipynb @@ -0,0 +1,490 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter6 - Oscillators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.1 - page 438" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Vf= 0.0125 # in volt\n", + "Vo= 0.5 # in volt\n", + "Beta= Vf/Vo \n", + "# For oscillator A*Beta= 1\n", + "A= 1/Beta \n", + "print \"Amplifier Should have a minimum gain of\",A,\"to provide oscillation\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Amplifier Should have a minimum gain of 40.0 to provide oscillation\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.2 - page 439" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi, sqrt\n", + "# Given data\n", + "R1= 50 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "R2=R1 # in ohm\n", + "R3=R2 # in ohm\n", + "C1= 60 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2=C1 # in F\n", + "C3=C2 # in F\n", + "f= 1/(2*pi*R1*C1*sqrt(6)) \n", + "print \"Frequency of oscilltions = %0.2f kHz\" %( f*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 21.66 kHz\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.3 - page 445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "# Given data\n", + "f=2 # in kHz\n", + "f=f*10**3 # in Hz\n", + "# Let\n", + "R= 10 # in kohm (As R should be greater than 1 kohm)\n", + "R=R*10**3 # in ohm\n", + "# Formula f= 1/(2*pi*R*C)\n", + "C= 1/(2*pi*f*R) # in F\n", + "C= C*10**9 # in nF\n", + "# For Bita to be 1/3, Choose\n", + "R4= R # in ohm\n", + "R3= 2*R4 # in ohm\n", + "print \"Value of C = %0.2f nF\" %C\n", + "print \"Value of R3 = %0.f kohm\" %(R3*10**-3)\n", + "print \"Value of R4 = %0.f kohm\" %(R4*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of C = 7.96 nF\n", + "Value of R3 = 20 kohm\n", + "Value of R4 = 10 kohm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.4 - page 445" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R1= 200 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "R2=R1 # in ohm\n", + "C1= 200 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2=C1 # in F\n", + "f= 1/(2*pi*R1*C1) # in Hz\n", + "print \"Frequency of oscilltions = %0.2f kHz\" %(f*10**-3)\n", + "\n", + "# Note: Calculation to find the value of f in the book is wrong, so answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 3.98 kHz\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.5 - page 460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 100 # in \u00b5H\n", + "L= L*10**-6 # in H\n", + "C1= .001 # in \u00b5F\n", + "C1= C1*10**-6 # in F\n", + "C2= .01 # in \u00b5F\n", + "C2= C2*10**-6 # in F\n", + "C= C1*C2/(C1+C2) # in F\n", + "# (i)\n", + "f= 1/(2*pi*sqrt(L*C)) # in Hz\n", + "print \"Operating frequency = %0.f kHz\" %(round(f*10**-3))\n", + "# (ii)\n", + "Beta= C1/C2 \n", + "print \"Feedback fraction = %0.1f \" %Beta\n", + "# (iii)\n", + "# A*Bita >=1, so Amin*Bita= 1\n", + "Amin= 1/Beta \n", + "print \"Minimum gain to substain oscillations is\",Amin" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Operating frequency = 528 kHz\n", + "Feedback fraction = 0.1 \n", + "Minimum gain to substain oscillations is 10.0\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.6 - page 460" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 15 # in \u00b5H\n", + "L= L*10**-6 # in H\n", + "C1= .004 # in \u00b5F\n", + "C1= C1*10**-6 # in F\n", + "C2= .04 # in \u00b5F\n", + "C2= C2*10**-6 # in F\n", + "C= C1*C2/(C1+C2) # in F\n", + "f= 1/(2*pi*sqrt(L*C)) # in Hz\n", + "print \"Frequency of oscilltions = %0.1f kHz\" %(f*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 681.5 kHz\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.7 - page 461" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 0.01 # in H\n", + "C= 10 # in pF\n", + "C= C*10**-12 # in F\n", + "f= 1/(2*pi*sqrt(L*C)) # in Hz\n", + "print \"Frequency of oscilltions = %0.2f kHz\" %(f*10**-3)\n", + "# Note: Calculation to find the value of f in the book is wrong, so answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 503.29 kHz\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.8 - page 463" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 0.8 # in H\n", + "\n", + "C= .08 # in pF\n", + "C= C*10**-12 # in F\n", + "C_M= 1.9 # in pF\n", + "C_M= C_M*10**-12 # in F\n", + "C_T= C*C_M/(C+C_M) # in F\n", + "R=5 # in kohm\n", + "f_s= 1/(2*pi*sqrt(L*C)) # in Hz\n", + "print \"Series resonant frequency = %0.f kHz\" %(f_s*10**-3)\n", + "# (ii)\n", + "f_p= 1/(2*pi*sqrt(L*C_T)) # in Hz\n", + "print \"Parallel resonant frequency = %0.f kHz\" %(f_p*10**-3)\n", + "# Note: Calculation to find the value of parallel resonant frequency in the book is wrong, so answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Series resonant frequency = 629 kHz\n", + "Parallel resonant frequency = 642 kHz\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.10 - page 466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R1= 220 # in kohm\n", + "R1=R1*10**3 # in ohm\n", + "R2=R1 # in ohm\n", + "C1= 250 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2=C1 # in F\n", + "f= 1/(2*pi*R1*C1) \n", + "print \"Frequency of oscilltions = %0.2f Hz\" %f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscilltions = 2893.73 Hz\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.11 - page 467" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import tan\n", + "# Given data\n", + "R= 10 # in kohm\n", + "R=R*10**3 # in ohm\n", + "f=1000 \n", + "fie= 60 # in \u00b0\n", + "# The impedence of given circuit , Z= R+j*1/(omega*C)\n", + "# the phase shift, tan(fie)= imaginary part/ Real part\n", + "# tand(fie) = 1/(omega*R*C)\n", + "C= 1/(2*pi*R*tan(fie*pi/180)) \n", + "print \"The value of C = %0.2f pF\" %(C*10**12)\n", + "# Note : There is an calculation error to evaluate the value of C, So the answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of C = 9188814.92 pF\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.12 - page 467" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L= 50 # in \u00b5H\n", + "L= L*10**-6 # in H\n", + "C1= 300 # in pF\n", + "C1= C1*10**-12 # in F\n", + "C2= 100 # in pF\n", + "C2= C2*10**-12 # in F\n", + "C_eq= C1*C2/(C1+C2) # in F\n", + "f= 1/(2*pi*sqrt(L*C_eq)) # in Hz\n", + "print \"Frequency of oscillations = %0.1f MHz\" %(f*10**-6)\n", + "Beta= C2/C1 \n", + "# (iii)\n", + "# A*Beta >=1, so A*Bita= 1 (for sustained oscillations)\n", + "Amin= 1/Beta \n", + "print \"Minimum gain to substain oscillations is\",Amin" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of oscillations = 2.6 MHz\n", + "Minimum gain to substain oscillations is 3.0\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 6.14 - page 469" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L1= 2 # in mH\n", + "L1= L1*10**-3 # in H\n", + "L2= 1.5 # in mH\n", + "L2= L2*10**-3 # in H\n", + "# Formula f= 1/(2*pi*sqrt((L1+L2)*C)\n", + "# For f= 1000 kHz, C will be maximum\n", + "f=1000 # in kHz\n", + "f=f*10**3 # in Hz\n", + "Cmax= 1/((2*pi*f)**2*(L1+L2)) # in F\n", + "# For f= 2000 kHz, C will be maximum\n", + "f=2000 # in kHz\n", + "f=f*10**3 # in Hz\n", + "Cmin= 1/((2*pi*f)**2*(L1+L2)) # in F\n", + "print \"Maximum Capacitance = %0.1f pF\" %(Cmax*10**12)\n", + "print \"Minimum Capacitance = %0.1f pF\" %(Cmin*10**12)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum Capacitance = 7.2 pF\n", + "Minimum Capacitance = 1.8 pF\n" + ] + } + ], + "prompt_number": 19 + } + ], + "metadata": {} + } + ] +} diff --git a/sample_notebooks/MohdRizwan/chapter04.ipynb b/sample_notebooks/MohdRizwan/chapter04.ipynb new file mode 100644 index 00000000..24ed6788 --- /dev/null +++ b/sample_notebooks/MohdRizwan/chapter04.ipynb @@ -0,0 +1,310 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4, Fuel Air and Actual Cycles" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 4.10, page 340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Initialisation of Variables\n", + "r=7 #Compression Ratio\n", + "t2=715 #Temperature at the end of isentropic compression in Kelvin\n", + "t4=1610 #Temperature at the end of expansion in Kelvin\n", + "#Calculations\n", + "vr2=65.8 #From steam table\n", + "u2=524.2 #From steam table\n", + "vr4=5.69 #From steam table\n", + "u4=1307.63 #From steam table\n", + "vr1=r*vr2 \n", + "t1=338 #From steam table\n", + "u1=241.38 #From steam table\n", + "vr3=vr4/r \n", + "t3=2800 #From steam table\n", + "u3=2462.5 #From steam table\n", + "W=(u3-u2)-(u4-u1) #Work done\n", + "Qa=(u3-u2) #Heat added\n", + "eta=W/Qa #Cycle efficiency\n", + "print \"The cycle work = %0.2f kJ/kg \" %W \n", + "print \"The cycle efficiency = %0.2f %%\" %(eta*100) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The cycle work = 872.05 kJ/kg \n", + "The cycle efficiency = 44.99 %\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 4.2, page 342" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log\n", + "# Initialisation of Variables\n", + "r=8 #Compression Ratio\n", + "ga=1.4 #Degree of freedom for the gas\n", + "Cvinc=1.1 #Increase of specific heat at constant volume in percentage\n", + "#Calculations\n", + "eta=1-1/(r**(ga-1)) #efficiency of otto cycle\n", + "deta=(1-eta)*(ga-1)*log(r)*(Cvinc/100) #Change in efficiency\n", + "etach=-deta/eta #Percentage change in efficiency of change in efficiency\n", + "print \"The percentage change in the efficiency of otto cycle = %0.2f %%\"%(etach*100)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The percentage change in the efficiency of otto cycle = -0.71 %\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 4.3, page 345" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Initialisation of Variables\n", + "r=7.0 #Compression Ratio\n", + "ga=1.4 #Degree of freedom for the gas\n", + "Cvinc=3.0 #Increase of specific heat at constant volume in percentage\n", + "#Calculations\n", + "eta=1-1/(r**(ga-1)) #efficiency of otto cycle\n", + "deta=(1-eta)*(ga-1)*log(r)*(Cvinc/100) #Change in efficiency\n", + "etach=-deta/eta #Percentage change in efficiency of change in efficiency\n", + "print \"The percentage change in the efficiency of otto cycle = %0.2f %%\"%(etach*100)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The percentage change in the efficiency of otto cycle = -1.98 %\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 4.4, page 349" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Initialisation of Variables\n", + "r=18.0 #Compression Ratio\n", + "co=5.0 #Cut off percent of stroke\n", + "cv=0.71 #Mean specific heat for cycle in kJ/kg K\n", + "R=0.285 #Charecteristic gas constant in kJ/kh K\n", + "cvinc=2.0 #Percentage increase in mean specific heat of the cycle\n", + "#Calculation\n", + "rho=(co/100)*(r-1)+1 \n", + "ga=1+(R/cv) \n", + "eta=1-(1/(ga*(r**(ga-1))))*((rho**ga)-1)/(rho-1) #Efficiency of diesel cycle \n", + "etach=-((1-eta)/eta)*(ga-1)*(log(r)-(((rho**ga)*log(rho))/((rho**ga)-1))+(1/ga))*(cvinc/100) #Variation in the air standard efficiency\n", + "print \"The percentage change in the efficiency = %0.2f %%\"%(etach*100)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The percentage change in the efficiency = -1.15 %\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 4.5, page 351" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import sqrt\n", + "# Initialisation of Variables\n", + "r=7 #Compression ratio\n", + "C=44000 #Calorific value of fuel used in kJ/kg\n", + "afr=15 #Air fuel ratio\n", + "t1=338 #Temperature of the charge at the end of the stroke in Kelvin\n", + "p1=1 #Pressure of the charge at the end of the stroke in bar\n", + "n=1.33 #Index of compression\n", + "cv=0.71 #Specific heat constant at constant volume in kJ/kgK\n", + "k=20*10**(-5) \n", + "#Calculations\n", + "p2=p1*(r)**n \n", + "t2=(t1*p2)/(p1*r) \n", + "ha=C/(afr+1) #Heat added per kg of charge in kJ\n", + "t3=((-2*cv)+sqrt((4*cv*cv)+(4*k*((2*cv*t2)+(k*t2*t2)+(2*ha)))))/(2*k) \n", + "p3=(p2*t3)/t2 #Max pressure for constant volume process in bar\n", + "P3=p2*((ha/cv)+t2)/t2 #Max pressure for constant specific heat in bar\n", + "print \"Max pressure in the cylinder = %0.2f bar \" %(p3)\n", + "print \"Max pressure for constant specific heat = %0.2f bar\" %P3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Max pressure in the cylinder = 65.52 bar \n", + "Max pressure for constant specific heat = 93.52 bar\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 4.6, page 356" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Initialisation of Variables\n", + "r=10 #Compression ratio\n", + "C=48000 #Calorific value of fuel used in kJ/kg\n", + "afr=15 #Air fuel ratio\n", + "t1=330 #Temperature of the charge at the end of the stroke in Kelvin\n", + "p1=1 #Pressure of the charge at the end of the stroke in bar\n", + "n=1.36 #Index of compression\n", + "cv=0.7117 #Specific heat constant at constant volume in kJ/kgK\n", + "k=2.1*10**(-4) \n", + "#Calculations\n", + "p2=p1*(r)**n \n", + "t2=t1*((p2/p1)**((n-1)/n)) \n", + "ha=C/(afr+1) #Heat added per kg of charge in kJ\n", + "t3=((-2*cv)+sqrt((4*cv*cv)+(4*k*((2*cv*t2)+(k*t2*t2)+(2*ha)))))/(2*k) \n", + "p3=(p2*t3)/t2 #Max pressure for constant volume process in bar\n", + "P3=p2*((ha/cv)+t2)/t2 #Max pressure for constant specific heat in bar\n", + "print \"Max pressure in the cylinder = %0.2f bar \" %(p3)\n", + "print \"Max pressure for constant specific heat = %0.2f bar\" %P3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Max pressure in the cylinder = 102.27 bar \n", + "Max pressure for constant specific heat = 150.64 bar\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE 4.7, page 360" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Initialisation of Variables\n", + "r=15 #Compression ratio\n", + "C=43000 #Calorific value of fuel used in kJ/kg\n", + "afr=27 #Air fuel ratio\n", + "t2=870 #Temperature of the charge at the end of the stroke in Kelvin\n", + "cv=0.71 #Specific heat constant at constant volume in kJ/kgK\n", + "R=0.287 #Gas constant in kJ/kgK\n", + "k=20*10**(-5) \n", + "#Calculations\n", + "cp=cv+R #Specific heat at constant pressure\n", + "ha=C/(afr+1) #Heat added per kg of charge in kJ\n", + "t3=((-2*cp)+sqrt((4*cp*cp)+(4*k*((2*cp*t2)+(k*t2*t2)+(2*ha)))))/(2*k) \n", + "co=((t3/t2)-1)/(r-1) #combustion occupies this amt of stroke \n", + "print \"Percentage of the stroke when the combustion is completed is\",round((co*100),2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage of the stroke when the combustion is completed is 9.77\n" + ] + } + ], + "prompt_number": 28 + } + ], + "metadata": {} + } + ] +} diff --git a/sample_notebooks/MohdTasleem/Ch2.ipynb b/sample_notebooks/MohdTasleem/Ch2.ipynb new file mode 100755 index 00000000..59039ed8 --- /dev/null +++ b/sample_notebooks/MohdTasleem/Ch2.ipynb @@ -0,0 +1,333 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter2 : Energy Bands and Charge Carriers in semiconductor"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.1 Page No. 58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Eg=0.72 #eV\n",
+ "Ef=0.5*Eg\n",
+ "dE=Eg-Ef #eV\n",
+ "k=8.61*10**-5 #Boltzman constant\n",
+ "T=300 #K\n",
+ "\n",
+ "import math\n",
+ "N=1/(1+math.exp(dE/(k*T)))\n",
+ "\n",
+ "\n",
+ "print\"the fraction of total no. of electron is \",round(N,9)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the fraction of total no. of electron is 8.85e-07\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.4 Page No. 62"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "E=300*1.602*10**-19 #eV Energy\n",
+ "m=9.108*10**-31 #kg, mass of electron\n",
+ "h=6.626*10**-34 #Planck constant\n",
+ "\n",
+ "v=math.sqrt(2*E/m)\n",
+ "lam=h*v/E\n",
+ "\n",
+ "print\"The wavwlength is\",round(lam*10**10,3),\"A\"\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The wavwlength is 1.416 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.5 Page No. 70"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "ni=1.4*10**18\t\t\t#in atoms/m**3\n",
+ "Nd=1.4*10**24\t\t\t#in atoms/m**3\n",
+ "n=Nd\t\t\t\t#in atoms/m**3\n",
+ "\n",
+ "p=ni**2/n\t\t\t#in atoms/m**3\n",
+ "ratio=n/p\t\t\t#unitless\n",
+ "\n",
+ "print\"Ratio of electron to hole concentration : \",round(ratio,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ratio of electron to hole concentration : 1e+12\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.7 Page no 74"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "n=10**24 #Electron density\n",
+ "e=1.6*10**-19 #Electron charge\n",
+ "v=0.015 #m/s drift velocity\n",
+ "A=10**-4 #m**2 area\n",
+ "\n",
+ "I=n*e*v/A\n",
+ "\n",
+ "print\"The magnitude of current is\",round(I/10**8,2),\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The magnitude of current is 0.24 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.8 Page No. 74"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Ef=5.5\t\t\t#in eV\n",
+ "MUe=7.04*10**-3\t\t#in m**2/V-s\n",
+ "n=5.8*10**28\t\t#in m**-3\n",
+ "e=1.6*10**-19\t\t#constant\n",
+ "m=9.1*10**-31\t\t#in Kg\n",
+ "\n",
+ "import math\n",
+ "tau=MUe*m/e\t\t#in sec\n",
+ "rho=1/(n*e*MUe)\t\t#in ohm-m\n",
+ "vF=math.sqrt(2*Ef*1.6*10**-19/m)\n",
+ "\n",
+ "print\"Relaxation time in sec : \",tau,\"s\"\n",
+ "print\"Resistivity of conductor in ohm-m : \",round(rho,11),\"ohm m\"\n",
+ "print\"velocity of electron with fermi energy is \",round(vF,0),\"m/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Relaxation time in sec : 4.004e-14 s\n",
+ "Resistivity of conductor in ohm-m : 1.531e-08 ohm m\n",
+ "velocity of electron with fermi energy is 1390707.0 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.9 Page No. 92"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "e=1.6*10**-19\t\t\t#in coulamb\n",
+ "ND=10**17\t\t\t#in cm**-3\n",
+ "Bz=0.1\t\t\t\t#in Wb/m**2\n",
+ "w=4\t\t\t\t#in mm\n",
+ "d=4\t\t\t\t#in mm\n",
+ "Ex=5\t\t\t\t#in V/cm\n",
+ "MUe=3800\t\t\t#in cm**2/V-s\n",
+ "\n",
+ "v=MUe*Ex\t\t\t#in cm/s\n",
+ "v=v*10**-2\t\t\t#in m/s\n",
+ "VH=Bz*v*d\t\t\t#in mV\n",
+ "\n",
+ "print\"Magnitude of hall voltage is\",VH,\"mV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Magnitude of hall voltage is 76.0 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.11 Page No.92"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "e=1.6*10**-19\t\t\t#in coulamb\n",
+ "ND=10**21\t\t\t#in m**-3\n",
+ "Bz=0.2\t\t\t\t#in T\n",
+ "d=4\t\t\t\t#in mm\n",
+ "d=d*10**-3\t\t\t#in meter\n",
+ "J=600\t\t\t\t#in A/m**2\n",
+ "n=ND\t\t\t\t#in m**-3\n",
+ "\n",
+ "VH=Bz*J*d/(n*e)\t\t\t#in V\n",
+ "\n",
+ "print\"Magnitude of hall voltage is \",VH*10**3,\"mV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Magnitude of hall voltage is 3.0 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.12 Page No."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "e=1.6*10**-19\t\t\t#in coulamb\n",
+ "rho=0.00912\t\t\t#in ohm-m\n",
+ "B=0.48\t\t\t\t#in Wb/m**2\n",
+ "RH=3.55*10**-4\t\t\t#in m**3-coulamb**-1\n",
+ "SIGMA=1/rho\t\t\t#in (ohm=m)**-1\n",
+ "\n",
+ "import math\n",
+ "THETAh=math.atan(SIGMA*B*RH)\t#in Degree\n",
+ "\n",
+ "print\"Hall angle is\",round(THETAh*180/3.14,4),\"degree\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hall angle is 1.0709 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 169
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/sample_notebooks/Mohdarif/chapter9.ipynb b/sample_notebooks/Mohdarif/chapter9.ipynb new file mode 100755 index 00000000..d7050fa1 --- /dev/null +++ b/sample_notebooks/Mohdarif/chapter9.ipynb @@ -0,0 +1,445 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:efded2f677db2675356cffa3b1053d25367de2f521a0cbcad887abf7b22a8cb7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter - 09 : Hydraulic Turbines" + ] + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Ex9.1, page 305" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#input data\n", + "H=91.5#Head of the pelton wheel at inlet in m\n", + "Q=0.04#Discharge of the pelton wheel in m**3/s\n", + "N=720#Rotating speed of the wheel in rpm\n", + "Cv=0.98#Velocity coefficient of the nozzle \n", + "n0=0.8#Efficiency of the wheel\n", + "UC1=0.46#Ratio of bucket speed to jet speed\n", + "g=9.81#Acceleration due to gravity in m/s**2\n", + "dw=1000#Density of water in kg/m**3\n", + "\n", + "#calculations\n", + "P=dw*g*H*Q*n0*10**-3#Power developed in kw\n", + "C1=Cv*(2*g*H)**(1/2)#Jet speed in m/s\n", + "U=UC1*C1#Wheel speed in m/s\n", + "w=(2*3.1415*N)/60#Angular velocity of the wheel in rad/s\n", + "D=(2*U)/w#Diameter of the wheel in m\n", + "A=Q/C1#Jet area in m**2\n", + "d=((4*A)/3.1415)**(1/2)#Jet diameter in m\n", + "Dd=D/d#Wheel to jet diameter ratio at centre line of the buckets\n", + "Nsp=((1/(g*H))**(5/4))*(((P*10**3)/dw)**(1/2))*(N/60)*2*3.1415#Dimensionless power specific speed in rad\n", + "\n", + "#output\n", + "print '''(a)Wheel-to-jet diameter ratio at the centre line of the buckets is %3.1f\n", + "(b)The jet speed of the wheel is %3.2f m/s\n", + " Wheel speed is %3.1f m/s\n", + "(c)Dimensionless power specific speed is %3.3f rad'''%(Dd,C1,U,Nsp)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Wheel-to-jet diameter ratio at the centre line of the buckets is 0.0\n", + "(b)The jet speed of the wheel is 0.98 m/s\n", + " Wheel speed is 0.5 m/s\n", + "(c)Dimensionless power specific speed is 0.084 rad\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.2, page 306" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import atan, degrees\n", + "#input data\n", + "D=1.4#Diameter of the turbine in m\n", + "N=430#Speed of the turbine in rpm\n", + "Cr1=9.5#Flow velocity without shock at runner in m/s\n", + "C2=7#Absolute velocity at the exit without whirl in /s\n", + "dSPH=62#Difference between the sum of static and potential heads at entrance to runner and at exit from runner in m\n", + "W=12250#Power given to runner in kW\n", + "Q=12#Flow rate of water from the turbine in m**3/s\n", + "H=115#Net head from the turbine in m\n", + "g=9.81#Acceleration due to gravity in m/s**2\n", + "dw=1000#Density of water in kg/m**3\n", + "\n", + "#calculations\n", + "U1=(3.1415*D*N)/60#Runner tip speed in m/s\n", + "Cx1=(W*10**3)/(dw*Q*U1)#Absolute inlet velocity in m/s as flow is radial at outlet Cx2=0 in m/s as Cx2=0 as zero whirl at outlet\n", + "a1=atan(degrees(Cr1/Cx1))#Guide vane angle in degree\n", + "C1=(Cr1**2+Cx1**2)**(1/2)#Inlet velocity in m/s\n", + "b1=atan(degrees(Cr1/(Cx1-U1)))#Runner blade entry angle in degree\n", + "dHr=dSPH+(((C1**2)-(C2**2))/(2*g))-(U1*Cx1/g)#Loss of head in the runner in m\n", + "\n", + "#output\n", + "print '''(a)\n", + " (1)Guide vane angle at inlet is %3.1f degree\n", + " (2)Inlet absolute velocity of water at entry to runner is %3.1f m/s\n", + "(b)Runner blade entry angle is %3.1f degree\n", + "(c)Total Loss of head in the runner is %3.2f m'''%(a1,C1,b1,dHr)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)\n", + " (1)Guide vane angle at inlet is 1.5 degree\n", + " (2)Inlet absolute velocity of water at entry to runner is 1.0 m/s\n", + "(b)Runner blade entry angle is 1.6 degree\n", + "(c)Total Loss of head in the runner is -44.51 m\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.3, page 308" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sin, tan, pi, atan\n", + "#input data\n", + "D1=0.9#External diameter of the turbine in m\n", + "D2=0.45#Internal diameter of the turbine in m\n", + "N=200#Speed of turbine running in rpm\n", + "b1=0.2#Width of turbine at inlet in m\n", + "Cr1=1.8#Velocity of flow through runner at inlet in m/s\n", + "Cr2=Cr1#Velocity of flow through runner at outlet in m/s\n", + "a11=10#Guide blade angle to the tangent of the wheel in degree\n", + "a22=90#Discharge angle at outlet of turbine in degree\n", + "g=9.81#Acceleration due to gravity in m/s**2\n", + "dw=1000#Density of water in kg/m**3\n", + "\n", + "#calculations\n", + "C1=Cr1/sin(a11*pi/180)#Absolute velocity of water at inlet of runner in m/s\n", + "Cx1=Cr1/tan(a11*pi/180)#Velocity of whirl at inlet in m/s\n", + "U1=(3.1415*D1*N)/60#Runner tip speed at inlet in m/s\n", + "Wx1=Cx1-U1#Inlet whirl velocity component in m/s\n", + "W1=(Wx1**2+Cr1**2)**(1/2)#Relative velocity at inlet in m/s\n", + "b11=atan(degrees(Cr1/Wx1))#Runner blade entry angle in degree\n", + "U2=(3.1415*D2*N)/60#Runner tip speed at exit in m/s\n", + "b22=atan(degrees(Cr2/U2))#Runner blade exit angle in degree\n", + "b2=D1*b1/D2#Width of runner at outlet in m\n", + "Q=3.1415*D1*b1*Cr1#Discharge of water in turbine in m**3/s\n", + "m=dw*Q#Mass of water flowing through runner per second in kg/s\n", + "V2=Cr2#Velocity of water at exit in m/s \n", + "H=(U1*Cx1/g)+(V2**2/(2*g))#Head at the turbine inlet in m\n", + "W=m*U1*Cx1*10**-3#Power developed in kW\n", + "nH=(U1*Cx1/(g*H))#Hydraulic efficiency\n", + "\n", + "#output\n", + "print '''(a)Absolute velocity of water at inlet of runner is %3.3f m/s\n", + "(b)Velocity of whirl at inlet is %3.3f m/s\n", + "(c)Relative velocity at inlet is %3.3f m/s\n", + "(d)Runner blade entry angle is %3.2f degree\n", + " Runner blade exit angle is %3.2f degree\n", + "(e)Width of runner at outlet is %3.1f m\n", + "(f)Mass of water flowing through runner per second is %3.f kg/s\n", + "(g)Head at the turbine inlet is %3.3f m\n", + "(h)Power developed is %3.3f kW\n", + "(i)Hydraulic efficiency is %3.4f'''%(C1,Cx1,W1,b11,b22,b2,m,H,W,nH)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Absolute velocity of water at inlet of runner is 10.366 m/s\n", + "(b)Velocity of whirl at inlet is 10.208 m/s\n", + "(c)Relative velocity at inlet is 1.000 m/s\n", + "(d)Runner blade entry angle is 1.56 degree\n", + " Runner blade exit angle is 1.53 degree\n", + "(e)Width of runner at outlet is 0.4 m\n", + "(f)Mass of water flowing through runner per second is 1018 kg/s\n", + "(g)Head at the turbine inlet is 9.972 m\n", + "(h)Power developed is 97.925 kW\n", + "(i)Hydraulic efficiency is 0.9834\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.4, page 312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import atan\n", + "#input data\n", + "P=330#Power output from the turbine is kW\n", + "H=70#Head of operating turbine in m\n", + "N=750#Speed of the turbine in rpm\n", + "nH=0.94#Hydraulic efficiency\n", + "n0=0.85#Overall efficiency\n", + "FR=0.15#Flow ratio \n", + "BR=0.1#Breadth ratio\n", + "D1D2=2#Ratio inner and outer diameter of runner\n", + "g=9.81#Acceleration due to gravity in m/s**2\n", + "dw=1000#Density of water in kg/m**3\n", + "\n", + "#calculations\n", + "Cr1=FR*(2*g*H)**(1/2)#Flow velocity at inlet in m/s\n", + "Q=(P*10**3)/(dw*g*H*n0)#Discharge at outlet in m**3/s\n", + "D1=(Q/(nH*3.1415*BR*Cr1))**(1/2)#Runner inlet diameter in m\n", + "b1=BR*D1#Height of the runner vanes at inlet in m\n", + "U1=(3.1415*D1*N)/60#Runner tip speed at inlet in m/s\n", + "Cx1=(nH*g*H)/(U1)#Velocity of whirl at inlet in m/s\n", + "a11=atan(degrees(Cr1/Cx1))#Guide blade angle in degree\n", + "b11=atan(degrees(Cr1/(Cx1-U1)))#Runner vane angle at inlet in degree\n", + "D2=D1/D1D2#Runner outlet diameter in m\n", + "U2=(3.1415*D2*N)/60#Runner tip speed at outlet in m/s\n", + "Cr2=Cr1#Flow velocity at outlet in m/s\n", + "b22=atan(degrees(Cr2/U2))#Runner vane angle at outlet in degree\n", + "b2=D1*b1/D2#Width at outlet in m\n", + "\n", + "#output\n", + "print '''(a)Flow velocity at inlet is %3.2f m/s\n", + "(b)Discharge at outlet is %3.3f m**3/s\n", + "(c)Runner inlet diameter is %3.3f m\n", + "(d)Height of the runner vanes at inlet is %3.4f m\n", + "(e)Guide blade angle is %3.2f degree\n", + "(f)Runner vane angle at inlet is %3.2f degree\n", + " Runner vane angle at outlet is %3.2f degree\n", + "(g)Runner outlet diameter is %3.4f m\n", + "(h)Width at outlet is %3.4f m\n", + "(i)Runner tip speed at inlet is %3.2f m/s\n", + "(j)Velocity of whirl at inlet is %3.f m/s'''%(Cr1,Q,D1,b1,a11,b11,b22,D2,b2,U1,Cx1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Flow velocity at inlet is 0.15 m/s\n", + "(b)Discharge at outlet is 0.565 m**3/s\n", + "(c)Runner inlet diameter is 1.000 m\n", + "(d)Height of the runner vanes at inlet is 0.1000 m\n", + "(e)Guide blade angle is 0.48 degree\n", + "(f)Runner vane angle at inlet is -0.36 degree\n", + " Runner vane angle at outlet is 0.41 degree\n", + "(g)Runner outlet diameter is 0.5000 m\n", + "(h)Width at outlet is 0.2000 m\n", + "(i)Runner tip speed at inlet is 39.27 m/s\n", + "(j)Velocity of whirl at inlet is 16 m/s\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.5, page 316" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#input data\n", + "H=30#Working head of the turbine in m\n", + "D1=1.2#Inlet wheel diameter in m\n", + "D2=0.6#Outlet wheel diameter in m\n", + "b11=90#Vane angle at entrance in degree\n", + "a11=15#Guide blade angle in degree\n", + "Cx2=0#Velocity of whirl at inlet in m/s\n", + "g=9.81#Acceleration due to gravity in m/s**2\n", + "dw=1000#Density of water in kg/m**3\n", + "\n", + "#calculations\n", + "U11=1/tan(a11*pi/180)#Runner tip speed at inlet in m/s in terms of Cr1\n", + "Cr1=(H/((U11**2/g)+(1/(2*g))))**(1/2)#Flow velocity at inlet in m/s\n", + "Cr2=Cr1#Flow velocity at outlet in m/s\n", + "U1=Cr1*U11#Runner tip speed at inlet in m/s \n", + "N=(60*U1)/(3.1415*D1)#Speed of the wheel in rpm\n", + "U2=(3.1415*D2*N)/60#Runner tip speed at inlet in m/s \n", + "b22=atan(degrees(Cr2/U2))#Vane angle at exit in degree\n", + "\n", + "#output\n", + "print '''(a)Speed of the wheel is %3.2f rpm\n", + "(b)Vane angle at exit is %3.2f degree'''%(N,b22)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Speed of the wheel is 59.40 rpm\n", + "(b)Vane angle at exit is 1.54 degree\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.6, page 321" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#input data\n", + "D1=0.6#Internal runner diameter in m\n", + "D2=1.2#External runner diameter in m\n", + "a11=15#Guide blade angle in degree\n", + "Cr1=4#Flow velocity at inlet in m/s\n", + "Cr2=Cr1#Flow velocity at outlet in m/s\n", + "N=200#Speed of the turbine in rpm\n", + "H=10#Head of the turbine in m\n", + "a22=90#Discharge angle at outlet in degree\n", + "g=9.81#Acceleration due to gravity in m/s**2\n", + "dw=1000#Density of water in kg/m**3\n", + "\n", + "#calculations\n", + "U1=(3.1415*D1*N)/60#Runner tip speed at inlet in m/s \n", + "U2=(3.1415*D2*N)/60#Runner tip speed at outlet in m/s \n", + "Cx1=Cr1/tan(a11*pi/180)#Velocity of whirl at inlet in m/s\n", + "Wx1=Cx1-U1#Inlet whirl velocity component in m/s\n", + "b11=atan(degrees(Cr1/Wx1))#Vane angle at entrance in degree\n", + "b22=atan(degrees(Cr2/U2))#Vane angle at exit in degree\n", + "Wm=U1*Cx1#Work one per unit mass flow rate in W/(kg/s) as Cx2=0 in m/s\n", + "nH=(U1*Cx1/(g*H))#Hydraulic efficiency \n", + "\n", + "#output\n", + "print '''(a)Inlet vane angle is %3.2f degree\n", + " Outlet vane angle is %3.2f degree\n", + "(b)Work done by the water on the runner per kg of water is %3.2f W/(kg/s)\n", + "(c)Hydraulic efficiency is %3.4f'''%(b11,b22,Wm,nH)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Inlet vane angle is 1.53 degree\n", + " Outlet vane angle is 1.52 degree\n", + "(b)Work done by the water on the runner per kg of water is 93.79 W/(kg/s)\n", + "(c)Hydraulic efficiency is 0.9561\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex9.7, page 326" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#input data\n", + "H=23#Net head across the turbine in m\n", + "N=150#Speed of the turbine in rpm\n", + "P=23#Power developed by the turbine in MW\n", + "D=4.75#Blade tip diameter in m\n", + "d=2#Blade hub diameter in m\n", + "nH=0.93#Hydraulic efficiency\n", + "n0=0.85#Overall efficiency\n", + "g=9.81#Acceleration due to gravity in m/s**2\n", + "dw=1000#Density of water in kg/m**3\n", + "\n", + "#calculations\n", + "dm=(D+d)/2#Mean diameter of the turbine in m\n", + "Pa=(P*10**6)/n0#Power available in MW\n", + "Q=(Pa/(dw*g*H))#Flow rate in the turbine in m**3/s\n", + "Um=(3.1415*dm*N)/60#Rotor speed at mean diameter in m/s\n", + "Pr=Pa*nH*10**-6#Power given to runner in MW\n", + "Cx1=Pr*10**6/(dw*Q*Um)#Velocity of whirl at inlet in m/s as Cx2=0 in m/s\n", + "Ca=Q/((3.1415/4)*(D**2-d**2))#Axial velocity in m/s\n", + "b11=180-(atan(degrees(Ca/(Um-Cx1))))#Inlet blade angle in degree\n", + "Wx2=Um#Outlet whirl velocity component in m/s\n", + "b22=atan(degrees(Ca/Wx2))#Outlet blade angle in degree\n", + "\n", + "#output\n", + "print '''(a)The inlet blade angle at mean radius is %3.1f degree\n", + "(b)The outlet blade angle at mean radius is %3.1f degree'''%(b11,b22)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)The inlet blade angle at mean radius is 178.5 degree\n", + "(b)The outlet blade angle at mean radius is 1.5 degree\n" + ] + } + ], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +} diff --git a/sample_notebooks/MukteshChaudhary/ch13.ipynb b/sample_notebooks/MukteshChaudhary/ch13.ipynb new file mode 100755 index 00000000..2ae8430e --- /dev/null +++ b/sample_notebooks/MukteshChaudhary/ch13.ipynb @@ -0,0 +1,212 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d7e6ca5b0b3b9273677b365c5a5c5dfae6429b091a9cdd3065bc98b47d3ef56f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13: Detectors and Mixers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.1, Page 546" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "P=10000. #average power (W)\n", + "V=1000. #amplitude (V)\n", + "\n", + "#Calculations&Results\n", + "W1=4*math.pi*10**6\n", + "Wc=2*math.pi*10**8\n", + "alpha = P/V**2\n", + "print \"alpha=%.2f\"%alpha\n", + "#(b)=\n", + "A=1000+2*225+2*150+2*75\n", + "peak_power=alpha*A**2\n", + "print \"A=%.0f V\\npeak_power=%.0f W\"%(A,peak_power)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "alpha=0.01\n", + "A=1900 V\n", + "peak_power=36100 W\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.2, Page 551" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "n=1\n", + "q=1.602*10**-19 #C\n", + "k=1.38*10**-23\n", + "T=290 #K\n", + "Is=10**-8 #A\n", + "\n", + "#Calculations&Results\n", + "a=q/(n*k*T)\n", + "Ib=0 #A\n", + "Rj=1/(a*(Ib+Is))\n", + "print \"(a)Rj=%d kohm\"%(Rj*10**-3)\n", + "Ib=100*10**-6\n", + "Rj=1/(a*(Ib+Is))\n", + "print \"(b)Rj=%.1f ohm\"%Rj" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Rj=2498 kohm\n", + "(b)Rj=249.8 ohm\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.3, Page 557" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "fc = 5*10**6 #hz\n", + "Vm = 1 #V\n", + "fm = 1*10**3 #Hz\n", + "\n", + "#Calculations&Results\n", + "#(a)\n", + "#Since the i/p frequency is multiplied by 12\n", + "fd = 10*12 #Hz\n", + "print \"Frequency deviation at output = +/-%d KHz\"%fd\n", + "\n", + "#(b)\n", + "fosc = 55*10**6 #i/p signal from oscillator (Hz)\n", + "fs = fosc+fc+fd*10**3\n", + "print \"\\nSum frequency at output = %.2f MHz\"%(fs*10**-6)\n", + "\n", + "#(c)\n", + "a=1\n", + "delf=10*1000\n", + "fm=1000\n", + "B=a*delf/fm\n", + "print \"\\nFrequency deviation = %d\"%B\n", + "\n", + "#(d)\n", + "a=2\n", + "delf=10*1000\n", + "fm=500\n", + "B=a*delf/fm\n", + "print \"\\nFrequency deviation = %d \"%B" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency deviation at output = +/-120 KHz\n", + "\n", + "Sum frequency at output = 60.12 MHz\n", + "\n", + "Frequency deviation = 10\n", + "\n", + "Frequency deviation = 40 \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.5, Page 573" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "IDss=50*10**-3 #mA\n", + "gm=200*10**-3 #mS\n", + "VL=.25 #V \n", + "RL=50 #ohms\n", + "\n", + "#Calculations&Results\n", + "Vp=2*VL #V\n", + "#gm=-2*IDss/Vp\n", + "Vp=2*IDss/gm #V\n", + "print \"Vp=%.2f V\"%Vp\n", + "gc=IDss/(2*Vp)\n", + "print \"gc=%.e S\"%gc\n", + "Av=gc*RL\n", + "print \"Av=%.1f\"%Av" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vp=0.50 V\n", + "gc=5e-02 S\n", + "Av=2.5\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/NeerajBaunthiyal/chapter1.ipynb b/sample_notebooks/NeerajBaunthiyal/chapter1.ipynb new file mode 100755 index 00000000..2d6f6ded --- /dev/null +++ b/sample_notebooks/NeerajBaunthiyal/chapter1.ipynb @@ -0,0 +1,570 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter1 : Introduction" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.1 : 25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import *\n", + "B=100 #W(8Bulb)\n", + "F=60 #W(2Fan)\n", + "L=100 #W(2Light)\n", + "LoadConnected=8*B+2*F+2*L #W\n", + "print \"(a) Connected Load =\",LoadConnected,\"W\"\n", + "#12 midnight to 5am\n", + "demand1=1*F #W\n", + "#5am to 7am\n", + "demand2=2*F+1*L #W\n", + "#7am to 9am\n", + "demand3=0 #W\n", + "#9am to 6pm\n", + "demand4=2*F #W\n", + "#6pm to midnight\n", + "demand5=2*F+4*B #W\n", + "DEMAND=array([demand1, demand2, demand3, demand4, demand5])\n", + "max_demand=max(DEMAND) \n", + "print \"(b) Maximum demand =\",max_demand,\"W\" \n", + "df=max_demand/LoadConnected #demand factor\n", + "print \"(c) Demand factor =\",df \n", + "E=demand1*5+demand2*2+demand3*2+demand4*9+demand5*6 #Wh\n", + "E=E/1000 #kWh\n", + "print \"(d) Energy consumed during 24 hours =\",E,\"kWh \"\n", + "Edash=LoadConnected*24/1000 #kWh\n", + "print \"(e) Energy consumed during 24 hours if all devices are used =\",Edash,\"kWh\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Connected Load = 1120 W\n", + "(b) Maximum demand = 520 W\n", + "(c) Demand factor = 0.464285714286\n", + "(d) Energy consumed during 24 hours = 4.94 kWh \n", + "(e) Energy consumed during 24 hours if all devices are used = 26.88 kWh\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.2 : page 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "LoadA=2.5*1000 #W\n", + "#12 midnight to 5am\n", + "d1A=100 #W\n", + "#5am to 6am\n", + "d2A=1.1*1000 #W\n", + "#6am to 8am\n", + "d3A=200 #W\n", + "#8am to 5pm\n", + "d4A=0 #W\n", + "#5pm to 12 midnight\n", + "d5A=500 #W\n", + "LoadB=3*1000 #W\n", + "#11 pm to 7am\n", + "d1B=0 #W\n", + "#7 am to 8 am\n", + "d2B=300 #W\n", + "#8 am to 10 am\n", + "d3B=1*1000 #W\n", + "#10 am to 6 pm\n", + "d4B=200 #W\n", + "#6 pm to 11 pm\n", + "d5B=600 #W\n", + "DEMAND_A=array([d1A, d2A, d3A, d4A, d5A]) #W\n", + "DEMAND_B=array([d1B, d2B, d3B, d4B, d5B]) #W\n", + "max_demand_A=max(DEMAND_A) #W\n", + "max_demand_B=max(DEMAND_B) #W\n", + "df_A=max_demand_A/LoadA #demand factor\n", + "df_B=max_demand_B/LoadB #demand factor\n", + "print \"Demand factor of consumer A & B are :\",round(df_A,2),\"&\",round(df_B ,2)\n", + "gd_factor=(max_demand_A+max_demand_B)/max_demand_A \n", + "print \"Group diversity factor :\",round(gd_factor,2)\n", + "E_A=d1A*5+d2A*1+d3A*2+d4A*9+d5A*7 #Wh\n", + "E_B=d1B*8+d2B*1+d3B*2+d4B*8+d5B*5 #Wh\n", + "E_A=E_A/1000 #kWh\n", + "E_B=E_B/1000 #kWh\n", + "print \"Energy consumed by A & B during 24 hours =\",E_A,\"&\",E_B,\"kWh\"\n", + "Emax_A=max_demand_A*24/1000 #kWh\n", + "Emax_B=max_demand_B*24/1000 #kWh\n", + "print \"Maximum energy consumer A & B can consume during 24 hours =\",Emax_B,Emax_A,\"kWh \"\n", + "ratio_A=E_A/Emax_A \n", + "ratio_B=E_B/Emax_B \n", + "print \"Ratio of actual energy to maximum energy of consumer A & B :\",round(ratio_A,2),\"&\",round(ratio_B,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Demand factor of consumer A & B are : 0.44 & 0.33\n", + "Group diversity factor : 1.91\n", + "Energy consumed by A & B during 24 hours = 5.5 & 6.9 kWh\n", + "Maximum energy consumer A & B can consume during 24 hours = 24.0 26.4 kWh \n", + "Ratio of actual energy to maximum energy of consumer A & B : 0.21 & 0.29\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.3 : page 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "n1=600 #No. of apartments\n", + "L1=5 #kW#Each Apartment Load\n", + "n2=20 #No. of general purpose shops\n", + "L2=2 #kW#Each Shop Load\n", + "df=0.8 #demand factor\n", + "#1 Floor mill\n", + "L3=10 #kW#Load\n", + "df3=0.7 #demand factor\n", + "#1 Saw mill\n", + "L4=5 #kW#Load\n", + "df4=0.8 #demand factor\n", + "#1 Laundry\n", + "L5=20 #kW#Load\n", + "df5=0.65 #demand factor\n", + "#1 Cinema\n", + "L6=80 #kW#Load\n", + "df6=0.5 #demand factor\n", + "#Street lights\n", + "n7=200 #no. of tube lights\n", + "L7=40 #W#Load of each light\n", + "#Residential Load\n", + "df8=0.5 #demand factor\n", + "gdf_r=3 #group diversity factor\n", + "pdf_r=1.25 #peak diversity factor\n", + "#Commertial Load\n", + "gdf_c=2 #group diversity factor\n", + "pdf_c=1.6 #peak diversity factor\n", + "#Solution :\n", + "#Maximum demand of each apartment\n", + "dmax_1a=L1*df8 #kW\n", + "#Maximum demand of 600 apartment\n", + "dmax_a=n1*dmax_1a/gdf_r #kW\n", + "#demand of apartments at system peak time\n", + "d_a_sp=dmax_a/pdf_r #kW\n", + "#Maximum Commercial demand\n", + "dmax_c=(n2*L2*df+L3*df3+L4*df4+L5*df5+L6*df6)/gdf_c #kW\n", + "#Commercial demand at system peak time\n", + "d_c_sp=dmax_c/pdf_c #kW\n", + "#demand of street light at system peak time\n", + "d_sl_sp=n7*L7/1000 #kW\n", + "#Increase in system peak demand\n", + "DI=d_a_sp+d_c_sp+d_sl_sp #kW\n", + "print \"Increase in system peak demand =\",DI,\"kW \" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Increase in system peak demand = 438.0 kW \n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.4 : page 35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#12 to 5 am\n", + "L1=20 #MW\n", + "t1=5 #hours\n", + "#5 to 9 am\n", + "L2=40 #MW\n", + "t2=4 #hours\n", + "#9 to 6 pm\n", + "L3=80 #MW\n", + "t3=9 #hours\n", + "#6 to 10 pm\n", + "L4=100 #MW\n", + "t4=4 #hours\n", + "#10 to 12 am\n", + "L5=20 #MW\n", + "t5=2 #hours\n", + "#Energy Poduced in 24 hours\n", + "E=L1*t1+L2*t2+L3*t3+L4*t4+L5*t5 #MWh\n", + "print \"Energy Supplied by the plant in 24 hours =\",E,\"MWh \" \n", + "LF=E/24 #%#Load Factor\n", + "print \"Load Factor =\",round(LF,2),\"% \" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy Supplied by the plant in 24 hours = 1420 MWh \n", + "Load Factor = 59.17 % \n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.5 : page 39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "C=125 #MW#Installed Capacity\n", + "#12 to 5 am\n", + "L1=20 #MW\n", + "t1=5 #hours\n", + "#5 to 9 am\n", + "L2=40 #MW\n", + "t2=4 #hours\n", + "#9 to 6 pm\n", + "L3=80 #MW\n", + "t3=9 #hours\n", + "#6 to 10 pm\n", + "L4=100 #MW\n", + "t4=4 #hours\n", + "#10 to 12 am\n", + "L5=20 #MW\n", + "t5=2 #hours\n", + "#Energy Poduced in 24 hours\n", + "E=L1*t1+L2*t2+L3*t3+L4*t4+L5*t5 #MWh\n", + "LF=E/24 #%#Load Factor\n", + "CF=LF/C #%#Capacity Factor\n", + "print \"Capacity Factor =\",round(CF,2),\"% \" \n", + "UF=100/C #%#Utilisation Factor\n", + "print \"Utilisation Factor =\",UF,\"% \" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Capacity Factor = 0.47 % \n", + "Utilisation Factor = 0.8 % \n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.6 : page 40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#12 to 5 am & 10 to 12 am\n", + "L1=20 #MW\n", + "E1=L1*24 #MWh\n", + "#5 to 9 am\n", + "L2=40 #MW\n", + "E2=E1+(L2-L1)*17 #MWh\n", + "#9 to 6 pm\n", + "L3=80 #MW\n", + "E3=E2+(L3-L2)*13 #MWh\n", + "#6 to 10 pm\n", + "L4=100 #MW\n", + "E4=E3+(L4-L3)*4 #MWh\n", + "#Plotting Energy load curve\n", + "%matplotlib inline\n", + "from matplotlib.pyplot import *\n", + "L=array([0,L1,L2,L3,L4]) #MW\n", + "E=array([0,E1,E2,E3,E4]) #Mwh\n", + "subplot(3,1,1)\n", + "plot(E,L)\n", + "xlabel('Energy(MWh)') \n", + "ylabel('Load(MW)') \n", + "title('Energy Load Curve') \n", + "#Energy Supplied\n", + "#Upto 5am\n", + "t1=5 #hours\n", + "E1=L1*t1 #MWh\n", + "#Upto 9am\n", + "t2=4 #hours\n", + "E2=E1+L2*t2 #MWh\n", + "#Upto 6pm\n", + "t3=9 #hours\n", + "E3=E2+L3*t3 #MWh\n", + "#Upto 10pm\n", + "t4=4 #hours\n", + "E4=E3+L4*t4 #MWh\n", + "#Upto 12pm\n", + "t4=2 #hours\n", + "E4=E3+L4*t4 #MWh\n", + "#Plotting Mass curve\n", + "T=[0,1,2,3,4] #MW\n", + "E=[0,E1,E2,E3,E4] #Mwh\n", + "subplot(3,1,3)\n", + "plot(T,E)\n", + "ylabel('Energy(MWh)') \n", + "xlabel('0-1: 12-5am 1-2: 5-9am 2-3: 9-6pm 3-4: 6-10pm above4: 10-12pm') \n", + "title('Mass Curve') \n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZMAAAEZCAYAAABSN8jfAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXmYVMXV/z9fERFlFwVZZHHXoCjuUSBmMxo1b3zdoiZq\nNmNcE/NGNG8kMRrFxC2JiYkat6Ci8fWHxo2oRNwAFZDVjUUQAWURRFnn/P6oauZO0z3TM90zfXvm\nfJ6nn763bt1b59b03O+tqlOnZGY4juM4TjFsUW4DHMdxnMrHxcRxHMcpGhcT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KEGrqSQ0q5aJ4zipwd9Sm45U\n1LW3TBzHcZyi8ZaJ4ziOUzQuJo7jOE7RuJg4juM4ReNi4jiO4xSNi4njOI5TNC4mjuM4TtH8f3Sp\nUZu5Oj0hAAAAAElFTkSuQmCC\n", + "text": [ + "<matplotlib.figure.Figure at 0x7fbc05b82a10>" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.7 : page 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "dmax=40 #MW#Maximum demand\n", + "CF=0.5 #Capacity Factor\n", + "UF=0.8 #Utilisation Factor\n", + "LF=CF/UF #/Load Factor\n", + "print \"(a) Load Factor =\",LF \n", + "C=dmax/UF #MW#Plant Capacity\n", + "print \"(b) Plant Capacity =\",C,\"MW \" \n", + "RC=C-dmax #MW#Reserve Capacity\n", + "print \"(c) Reserve Capacity =\",RC,\"MW \" \n", + "p=dmax*LF*24*365 #MWh#Annual Energy Production\n", + "print \"(d) Annual Energy Production =\",p,\"MWh\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Load Factor = 0.625\n", + "(b) Plant Capacity = 50.0 MW \n", + "(c) Reserve Capacity = 10.0 MW \n", + "(d) Annual Energy Production = 219000.0 MWh\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.8 : page 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "L1=50 #MW#Initial\n", + "t1=5 #hours\n", + "L2=50 #MW#5am\n", + "t2=4 #hours\n", + "L3=100 #MW#9am\n", + "t3=9 #hours\n", + "L4=100 #MW#6pm\n", + "t4=2 #hours\n", + "L5=150 #MW#8pm\n", + "t5=2 #hours\n", + "L6=80 #MW#10pm\n", + "t6=2 #hours\n", + "L7=50 #MW\n", + "#Energy Required in 24 hours\n", + "E=L1*t1+(L2+L3)/2*t2+(L3+L4)/2*t3+(L4+L5)/2*t4+(L5+L6)/2*t5+(L6+L1)/2*t6 #MWh\n", + "print \"Energy required in one day =\",E,\"MWh\" \n", + "DLF=E/L5/24*100 #%#Daily Load Factor\n", + "print \"Daily Load Factor =\",round(DLF,2),\"%\" \n", + "#Plotting load curve\n", + "% matplotlib inline\n", + "T=arange(0,7,1) #Slots\n", + "L=array([L1,L2,L3,L4,L5,L6,L7]) #MW\n", + "plot(T,L)\n", + "ylabel('Load(MW)') \n", + "xlabel('0-1: 12-5am 1-2: 5-9am 2-3: 9-6pm 3-4: 6-8pm 4-5:8-10pm 5-6 :10-12pm') \n", + "title('Chronological Load Curve') \n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy required in one day = 2060.0 MWh\n", + "Daily Load Factor = 57.22 %\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZEAAAEZCAYAAABWwhjiAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XucHFWZ//HPlxDUgBIQ5RokiihRUGBB0EVHFBVcEsD1\ngooGVBTWoAg/CYoSXUREvBEFVlgi4hJABAQJCiKjsFwFQrhKQC4JSLjI1bgQyPP745xJOp3unp6e\n7q6+fN+v17zSXV1d/VTPpJ465zl1ShGBmZlZI1YpOgAzM+teTiJmZtYwJxEzM2uYk4iZmTXMScTM\nzBrmJGJmZg1zErGGSZoh6bSi4wCQtFTSq5uwnTmS9h7lNqZKuny0sYwyhkFJnyoyBusPTiJWk6SP\nSvqzpKclPZgPsm/LL/fcRUYRsWtEtCwxStokJ7xW/98Lavx+JG0m6ZeSHpH0hKSbJB3Uhrisx/gP\nxqqS9CXgB8CRwCuBCcBPgN2GVhnBtlZteoDWEEmvAa4B7gPeGBHjgQ8C2wAvbWB7Y5oboXUTJxGr\nSNKawDeAAyLivIj4Z0S8EB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QsyseWjSVtHxFXAx8FLh9mW5U/LHVJjYmIp7V8mvhvVDpeSVogabNI\n9c6RTLe+QhwR8TdJT0l6C6nAvjfpxK7S33e1uLcCTgTem0+mSm2Xv6P7ScffE+uMs6q2JpEYwZTu\nqjI9unI9pFKXlqR7SSNgVpO0O+mP8xlSRr4duEGpjjQzchGsxIuA3+YD8BjgElIXAsAM4JeSHieN\nTnnV0C6xYmYv765bqftO0h7AcaQzyAsl3RgRu1T4CmaS7tl9SY75qog4QNIGwEkVunpqxV/uh1o+\nFPUbJQfBpu1ntfgrrPdtSa8jdUndTUoK1NjPWvGXOxQ4TdIPgYdZPgV2kP4TXUtKnJ+NiOck1drP\n8teGfD6f9S0hHRxHPM12/huo1KV1NGkK74NI/dSfLl8hIpZK2hc4S+mL/jupBjUU8zxSN9Y6pJFq\nD+Xvu1ZNYzTdzv8O7C/peWAx6R4kQKqJAJ/KMVSLeQWSDiSdjKxLupXAhRGxX0TMURomfBep+6j0\ne/8LqevpFNLBvFIdZ7i/aRjZNPHDTreuVKD+l6EurUrHq4i4g1TD+RmpJ2BOVLllgqRjgL2Al+Rj\n5EkR8U3gGGB14Owc+30RMVScvw74MbAp6d4w51bZ/+G+m+VxpC5Os/5RciZ9zrArdzFJRwDPRMT3\nio6lXfJZ9gURsUXBoXQcpds2HxwRNUdbjZSvWDfrbf14ltiP+1yP0bYyK3JLxMzMGuaWiJmZNcxJ\nxMzMGuYkYmZmDXMSMTOzhjmJmJlZw5xEzMysYf8fAHl1R8P2C3cAAAAASUVORK5CYII=\n", + "text": [ + "<matplotlib.figure.Figure at 0x7fbc0577c050>" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.9 : page 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "L1=50 #MW#Initial\n", + "t1=5 #hours\n", + "L2=50 #MW#5am\n", + "t2=4 #hours\n", + "L3=100 #MW#9am\n", + "t3=9 #hours\n", + "L4=100 #MW#6pm\n", + "t4=2 #hours\n", + "L5=150 #MW#8pm\n", + "t5=2 #hours\n", + "L6=80 #MW#10pm\n", + "t6=2 #hours\n", + "L7=50 #MW\n", + "#Load Duration Curve\n", + "l1=L5 #Mw\n", + "l2=L4 #MW\n", + "l3=L1 #MW\n", + "L=array([l1,l2,l2,l3,l3])\n", + "T=arange(0,30,6) #Duration in hours\n", + "subplot(3,1,1)\n", + "plot(T,L)\n", + "ylabel('Load(MW)') \n", + "xlabel('Hours') \n", + "title('Load Duration Curve') \n", + "#Energy Consumed\n", + "#Upto 5am\n", + "t1=5 #hours\n", + "E1=L1*t1 #MWh\n", + "#Upto 9am\n", + "t2=4 #hours\n", + "E2=E1+L2*t2 #MWh\n", + "#Upto 6pm\n", + "t3=9 #hours\n", + "E3=E2+L3*t3 #MWh\n", + "#Upto 10pm\n", + "t4=4 #hours\n", + "E4=E3+L4*t4 #MWh\n", + "#Upto 12pm\n", + "t4=2 #hours\n", + "E4=E3+L4*t4 #MWh\n", + "#Plotting Mass curve\n", + "T=arange(0,5,1) #MW\n", + "E=[0,E1,E2,E3,E4] #Mwh\n", + "subplot(3,1,3)\n", + "plot(T,E)\n", + "ylabel('Energy(MWh)') \n", + "xlabel('0-1: 12-5am 1-2: 5-9am 2-3: 9-6pm 3-4: 6-10pm above4: 10-12pm') \n", + "title('Mass Curve') \n", + "show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAY8AAAEZCAYAAABvpam5AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXe4FNX5xz9fURRUmgQBAbFgbGDBQowKEk3sJjYwamwx\nxpoYkyjmF8HExJLEEqNJTMQaFCwx9hqxY4mgKHalKVIUERRp9/39cc5y5y67e3f2lt299/08zz7M\nnDlz5p3D3PnOKe97ZGY4juM4ThpWK7cBjuM4TvXh4uE4juOkxsXD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MNpCgPCEwmz\nxVKHHVf+MY+LgENiN+LvgB/mOf+M+ExtQAjlfg1AHF95X2E85u/UjmtAeCmfKmkK0BH4a0wvdM+5\n7v9BYPVYzoWErqsMXxBav5MJ/7eZwf9jgD/E/5cBiXQIQnMktd2KSwkv84vjMzKR2m6fJMkxpLzP\njqRLYl21i++I8+Kha4H1JL0D/BQ4J8/5O8bzDwX+rlpXgsMJ3cXHJno0BiRO7Rzv93TC+MYqdlPc\n31XReEh2x2lkFGay3JPnC7HFE1se95hZ/zKb0ipohFZRSbSolofjOBWDf5U2H2Wpa295OI7jOKnx\nlofjOI6TGhcPx3EcJzUuHo7jOE5qXDwcx3Gc1Lh4OI7jOKlx8XAcx3FS8//ja4GDLNv8OwAAAABJ\nRU5ErkJggg==\n", + "text": [ + "<matplotlib.figure.Figure at 0x7fbc0576d9d0>" + ] + } + ], + "prompt_number": 39 + } + ], + "metadata": {} + } + ] +} diff --git a/sample_notebooks/NeerajBaunthiyal/chapter1_1.ipynb b/sample_notebooks/NeerajBaunthiyal/chapter1_1.ipynb new file mode 100755 index 00000000..3adc7469 --- /dev/null +++ b/sample_notebooks/NeerajBaunthiyal/chapter1_1.ipynb @@ -0,0 +1,571 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a43ad834b520d63f186663d7cd92f123a2eb2f923f95a0f00e0d45a5a563ba8b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter1 : Introduction" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.1 : 25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import array\n", + "B=100 #W(8Bulb)\n", + "F=60 #W(2Fan)\n", + "L=100 #W(2Light)\n", + "LoadConnected=8*B+2*F+2*L #W\n", + "print \"(a) Connected Load =\",LoadConnected,\"W\"\n", + "#12 midnight to 5am\n", + "demand1=1*F #W\n", + "#5am to 7am\n", + "demand2=2*F+1*L #W\n", + "#7am to 9am\n", + "demand3=0 #W\n", + "#9am to 6pm\n", + "demand4=2*F #W\n", + "#6pm to midnight\n", + "demand5=2*F+4*B #W\n", + "DEMAND=array([demand1, demand2, demand3, demand4, demand5])\n", + "max_demand=max(DEMAND) \n", + "print \"(b) Maximum demand =\",max_demand,\"W\" \n", + "df=max_demand/LoadConnected #demand factor\n", + "print \"(c) Demand factor =\",df \n", + "E=demand1*5+demand2*2+demand3*2+demand4*9+demand5*6 #Wh\n", + "E=E/1000 #kWh\n", + "print \"(d) Energy consumed during 24 hours =\",E,\"kWh \"\n", + "Edash=LoadConnected*24/1000 #kWh\n", + "print \"(e) Energy consumed during 24 hours if all devices are used =\",Edash,\"kWh\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Connected Load = 1120 W\n", + "(b) Maximum demand = 520 W\n", + "(c) Demand factor = 0.464285714286\n", + "(d) Energy consumed during 24 hours = 4.94 kWh \n", + "(e) Energy consumed during 24 hours if all devices are used = 26.88 kWh\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.2 : page 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "LoadA=2.5*1000 #W\n", + "#12 midnight to 5am\n", + "d1A=100 #W\n", + "#5am to 6am\n", + "d2A=1.1*1000 #W\n", + "#6am to 8am\n", + "d3A=200 #W\n", + "#8am to 5pm\n", + "d4A=0 #W\n", + "#5pm to 12 midnight\n", + "d5A=500 #W\n", + "LoadB=3*1000 #W\n", + "#11 pm to 7am\n", + "d1B=0 #W\n", + "#7 am to 8 am\n", + "d2B=300 #W\n", + "#8 am to 10 am\n", + "d3B=1*1000 #W\n", + "#10 am to 6 pm\n", + "d4B=200 #W\n", + "#6 pm to 11 pm\n", + "d5B=600 #W\n", + "DEMAND_A=array([d1A, d2A, d3A, d4A, d5A]) #W\n", + "DEMAND_B=array([d1B, d2B, d3B, d4B, d5B]) #W\n", + "max_demand_A=max(DEMAND_A) #W\n", + "max_demand_B=max(DEMAND_B) #W\n", + "df_A=max_demand_A/LoadA #demand factor\n", + "df_B=max_demand_B/LoadB #demand factor\n", + "print \"Demand factor of consumer A & B are :\",round(df_A,2),\"&\",round(df_B ,2)\n", + "gd_factor=(max_demand_A+max_demand_B)/max_demand_A \n", + "print \"Group diversity factor :\",round(gd_factor,2)\n", + "E_A=d1A*5+d2A*1+d3A*2+d4A*9+d5A*7 #Wh\n", + "E_B=d1B*8+d2B*1+d3B*2+d4B*8+d5B*5 #Wh\n", + "E_A=E_A/1000 #kWh\n", + "E_B=E_B/1000 #kWh\n", + "print \"Energy consumed by A & B during 24 hours =\",E_A,\"&\",E_B,\"kWh\"\n", + "Emax_A=max_demand_A*24/1000 #kWh\n", + "Emax_B=max_demand_B*24/1000 #kWh\n", + "print \"Maximum energy consumer A & B can consume during 24 hours =\",Emax_B,Emax_A,\"kWh \"\n", + "ratio_A=E_A/Emax_A \n", + "ratio_B=E_B/Emax_B \n", + "print \"Ratio of actual energy to maximum energy of consumer A & B :\",round(ratio_A,2),\"&\",round(ratio_B,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Demand factor of consumer A & B are : 0.44 & 0.33\n", + "Group diversity factor : 1.91\n", + "Energy consumed by A & B during 24 hours = 5.5 & 6.9 kWh\n", + "Maximum energy consumer A & B can consume during 24 hours = 24.0 26.4 kWh \n", + "Ratio of actual energy to maximum energy of consumer A & B : 0.21 & 0.29\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.3 : page 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "n1=600 #No. of apartments\n", + "L1=5 #kW#Each Apartment Load\n", + "n2=20 #No. of general purpose shops\n", + "L2=2 #kW#Each Shop Load\n", + "df=0.8 #demand factor\n", + "#1 Floor mill\n", + "L3=10 #kW#Load\n", + "df3=0.7 #demand factor\n", + "#1 Saw mill\n", + "L4=5 #kW#Load\n", + "df4=0.8 #demand factor\n", + "#1 Laundry\n", + "L5=20 #kW#Load\n", + "df5=0.65 #demand factor\n", + "#1 Cinema\n", + "L6=80 #kW#Load\n", + "df6=0.5 #demand factor\n", + "#Street lights\n", + "n7=200 #no. of tube lights\n", + "L7=40 #W#Load of each light\n", + "#Residential Load\n", + "df8=0.5 #demand factor\n", + "gdf_r=3 #group diversity factor\n", + "pdf_r=1.25 #peak diversity factor\n", + "#Commertial Load\n", + "gdf_c=2 #group diversity factor\n", + "pdf_c=1.6 #peak diversity factor\n", + "#Solution :\n", + "#Maximum demand of each apartment\n", + "dmax_1a=L1*df8 #kW\n", + "#Maximum demand of 600 apartment\n", + "dmax_a=n1*dmax_1a/gdf_r #kW\n", + "#demand of apartments at system peak time\n", + "d_a_sp=dmax_a/pdf_r #kW\n", + "#Maximum Commercial demand\n", + "dmax_c=(n2*L2*df+L3*df3+L4*df4+L5*df5+L6*df6)/gdf_c #kW\n", + "#Commercial demand at system peak time\n", + "d_c_sp=dmax_c/pdf_c #kW\n", + "#demand of street light at system peak time\n", + "d_sl_sp=n7*L7/1000 #kW\n", + "#Increase in system peak demand\n", + "DI=d_a_sp+d_c_sp+d_sl_sp #kW\n", + "print \"Increase in system peak demand =\",DI,\"kW \" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Increase in system peak demand = 438.0 kW \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.4 : page 35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#12 to 5 am\n", + "L1=20 #MW\n", + "t1=5 #hours\n", + "#5 to 9 am\n", + "L2=40 #MW\n", + "t2=4 #hours\n", + "#9 to 6 pm\n", + "L3=80 #MW\n", + "t3=9 #hours\n", + "#6 to 10 pm\n", + "L4=100 #MW\n", + "t4=4 #hours\n", + "#10 to 12 am\n", + "L5=20 #MW\n", + "t5=2 #hours\n", + "#Energy Poduced in 24 hours\n", + "E=L1*t1+L2*t2+L3*t3+L4*t4+L5*t5 #MWh\n", + "print \"Energy Supplied by the plant in 24 hours =\",E,\"MWh \" \n", + "LF=E/24 #%#Load Factor\n", + "print \"Load Factor =\",round(LF,2),\"% \" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy Supplied by the plant in 24 hours = 1420 MWh \n", + "Load Factor = 59.17 % \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.5 : page 39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "C=125 #MW#Installed Capacity\n", + "#12 to 5 am\n", + "L1=20 #MW\n", + "t1=5 #hours\n", + "#5 to 9 am\n", + "L2=40 #MW\n", + "t2=4 #hours\n", + "#9 to 6 pm\n", + "L3=80 #MW\n", + "t3=9 #hours\n", + "#6 to 10 pm\n", + "L4=100 #MW\n", + "t4=4 #hours\n", + "#10 to 12 am\n", + "L5=20 #MW\n", + "t5=2 #hours\n", + "#Energy Poduced in 24 hours\n", + "E=L1*t1+L2*t2+L3*t3+L4*t4+L5*t5 #MWh\n", + "LF=E/24 #%#Load Factor\n", + "CF=LF/C #%#Capacity Factor\n", + "print \"Capacity Factor =\",round(CF,2),\"% \" \n", + "UF=100/C #%#Utilisation Factor\n", + "print \"Utilisation Factor =\",UF,\"% \" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Capacity Factor = 0.47 % \n", + "Utilisation Factor = 0.8 % \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.6 : page 40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#12 to 5 am & 10 to 12 am\n", + "L1=20 #MW\n", + "E1=L1*24 #MWh\n", + "#5 to 9 am\n", + "L2=40 #MW\n", + "E2=E1+(L2-L1)*17 #MWh\n", + "#9 to 6 pm\n", + "L3=80 #MW\n", + "E3=E2+(L3-L2)*13 #MWh\n", + "#6 to 10 pm\n", + "L4=100 #MW\n", + "E4=E3+(L4-L3)*4 #MWh\n", + "#Plotting Energy load curve\n", + "%matplotlib inline\n", + "import matplotlib.pyplot as plt\n", + "L=array([0,L1,L2,L3,L4]) #MW\n", + "E=array([0,E1,E2,E3,E4]) #Mwh\n", + "plt.subplot(3,1,1)\n", + "plt.plot(E,L)\n", + "plt.xlabel('Energy(MWh)') \n", + "plt.ylabel('Load(MW)') \n", + "plt.title('Energy Load Curve') \n", + "#Energy Supplied\n", + "#Upto 5am\n", + "t1=5 #hours\n", + "E1=L1*t1 #MWh\n", + "#Upto 9am\n", + "t2=4 #hours\n", + "E2=E1+L2*t2 #MWh\n", + "#Upto 6pm\n", + "t3=9 #hours\n", + "E3=E2+L3*t3 #MWh\n", + "#Upto 10pm\n", + "t4=4 #hours\n", + "E4=E3+L4*t4 #MWh\n", + "#Upto 12pm\n", + "t4=2 #hours\n", + "E4=E3+L4*t4 #MWh\n", + "#Plotting Mass curve\n", + "T=[0,1,2,3,4] #MW\n", + "E=[0,E1,E2,E3,E4] #Mwh\n", + "plt.subplot(3,1,3)\n", + "plt.plot(T,E)\n", + "plt.ylabel('Energy(MWh)') \n", + "plt.xlabel('0-1: 12-5am 1-2: 5-9am 2-3: 9-6pm 3-4: 6-10pm above4: 10-12pm') \n", + "plt.title('Mass Curve') \n", + "plt.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZMAAAEZCAYAAABSN8jfAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUe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Zr/NbQldXhtWE1vFUwt8240zwHeC6+HfZJ5EOQXhOo7obch3h4X5t/I1M\norqbKElyDCrvb0fSiFhXbeMz4pfx0O3AdpLeBi4CLs1z/oHx/P8GblX11IWTCN3LZyZ6PPZJnNo5\n3u/5hPGRzeymsP+rBuMh6B2nxCh4yjya5w2y2RNbJo+a2YAym9IiKEGrqSQ0q5aJ4zipwd9Sm45U\n1LW3TBzHcZyi8ZaJ4ziOUzQuJo7jOE7RuJg4juM4ReNi4jiO4xSNi4njOI5TNC4mjuM4TtH8f3Sp\nUZu5Oj0hAAAAAElFTkSuQmCC\n", + "text": [ + "<matplotlib.figure.Figure at 0x7fe6f57defd0>" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.7 : page 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "dmax=40 #MW#Maximum demand\n", + "CF=0.5 #Capacity Factor\n", + "UF=0.8 #Utilisation Factor\n", + "LF=CF/UF #/Load Factor\n", + "print \"(a) Load Factor =\",LF \n", + "C=dmax/UF #MW#Plant Capacity\n", + "print \"(b) Plant Capacity =\",C,\"MW \" \n", + "RC=C-dmax #MW#Reserve Capacity\n", + "print \"(c) Reserve Capacity =\",RC,\"MW \" \n", + "p=dmax*LF*24*365 #MWh#Annual Energy Production\n", + "print \"(d) Annual Energy Production =\",p,\"MWh\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Load Factor = 0.625\n", + "(b) Plant Capacity = 50.0 MW \n", + "(c) Reserve Capacity = 10.0 MW \n", + "(d) Annual Energy Production = 219000.0 MWh\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.8 : page 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import arange\n", + "L1=50 #MW#Initial\n", + "t1=5 #hours\n", + "L2=50 #MW#5am\n", + "t2=4 #hours\n", + "L3=100 #MW#9am\n", + "t3=9 #hours\n", + "L4=100 #MW#6pm\n", + "t4=2 #hours\n", + "L5=150 #MW#8pm\n", + "t5=2 #hours\n", + "L6=80 #MW#10pm\n", + "t6=2 #hours\n", + "L7=50 #MW\n", + "#Energy Required in 24 hours\n", + "E=L1*t1+(L2+L3)/2*t2+(L3+L4)/2*t3+(L4+L5)/2*t4+(L5+L6)/2*t5+(L6+L1)/2*t6 #MWh\n", + "print \"Energy required in one day =\",E,\"MWh\" \n", + "DLF=E/L5/24*100 #%#Daily Load Factor\n", + "print \"Daily Load Factor =\",round(DLF,2),\"%\" \n", + "#Plotting load curve\n", + "% matplotlib inline\n", + "T=arange(0,7,1) #Slots\n", + "L=array([L1,L2,L3,L4,L5,L6,L7]) #MW\n", + "plt.plot(T,L)\n", + "plt.ylabel('Load(MW)') \n", + "plt.xlabel('0-1: 12-5am 1-2: 5-9am 2-3: 9-6pm 3-4: 6-8pm 4-5:8-10pm 5-6 :10-12pm') \n", + "plt.title('Chronological Load Curve') \n", + "plt.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy required in one day = 2060.0 MWh\n", + "Daily Load Factor = 57.22 %\n" + ] + }, + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAAAZEAAAEZCAYAAABWwhjiAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XucHFWZ//HPlxDUgBIQ5RokiihRUGBB0EVHFBVcEsD1\ngooGVBTWoAg/CYoSXUREvBEFVlgi4hJABAQJCiKjsFwFQrhKQC4JSLjI1bgQyPP745xJOp3unp6e\n7q6+fN+v17zSXV1d/VTPpJ465zl1ShGBmZlZI1YpOgAzM+teTiJmZtYwJxEzM2uYk4iZmTXMScTM\nzBrmJGJmZg1zErGGSZoh6bSi4wCQtFTSq5uwnTmS9h7lNq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7fe6f5884cd0>" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "exa 1.9 : page 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "L1=50 #MW#Initial\n", + "t1=5 #hours\n", + "L2=50 #MW#5am\n", + "t2=4 #hours\n", + "L3=100 #MW#9am\n", + "t3=9 #hours\n", + "L4=100 #MW#6pm\n", + "t4=2 #hours\n", + "L5=150 #MW#8pm\n", + "t5=2 #hours\n", + "L6=80 #MW#10pm\n", + "t6=2 #hours\n", + "L7=50 #MW\n", + "#Load Duration Curve\n", + "l1=L5 #Mw\n", + "l2=L4 #MW\n", + "l3=L1 #MW\n", + "L=array([l1,l2,l2,l3,l3])\n", + "T=arange(0,30,6) #Duration in hours\n", + "plt.subplot(3,1,1)\n", + "plt.plot(T,L)\n", + "plt.ylabel('Load(MW)') \n", + "plt.xlabel('Hours') \n", + "plt.title('Load Duration Curve') \n", + "#Energy Consumed\n", + "#Upto 5am\n", + "t1=5 #hours\n", + "E1=L1*t1 #MWh\n", + "#Upto 9am\n", + "t2=4 #hours\n", + "E2=E1+L2*t2 #MWh\n", + "#Upto 6pm\n", + "t3=9 #hours\n", + "E3=E2+L3*t3 #MWh\n", + "#Upto 10pm\n", + "t4=4 #hours\n", + "E4=E3+L4*t4 #MWh\n", + "#Upto 12pm\n", + "t4=2 #hours\n", + "E4=E3+L4*t4 #MWh\n", + "#Plotting Mass curve\n", + "T=arange(0,5,1) #MW\n", + "E=[0,E1,E2,E3,E4] #Mwh\n", + "plt.subplot(3,1,3)\n", + "plt.plot(T,E)\n", + "plt.ylabel('Energy(MWh)') \n", + "plt.xlabel('0-1: 12-5am 1-2: 5-9am 2-3: 9-6pm 3-4: 6-10pm above4: 10-12pm') \n", + "plt.title('Mass Curve') \n", + "plt.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "display_data", + "png": "iVBORw0KGgoAAAANSUhEUgAA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4OL477Ml2piKFtXyiH2JmXDoU4CxZvZGrrwK\nob6fBTaTNEPScTE975iHpKnAn4Bj4zmbK6wNfC6wBfBy/Io4PsfpawIPSnqF8AKbQegqABgF3Cbp\nJWAutV8ORt2viOwvq1W+tCR9TyF0+SDgPkkP5LoXQitgHeCRaPPV8fx8/bmF7M/mckmvA08DFyZe\nfo12n/nsz8GFkibHbo8hwFn13Gch+7M5GxgV6+TITNnR3unAC4SxmJPMbGk995l9LMNpCgPCEwmz\nxVKHHVf+MY+LgENiN+LvgB/mOf+M+ExtQAjlfg1AHF95X2E85u/UjmtAeCmfKmkK0BH4a0wvdM+5\n7v9BYPVYzoWErqsMXxBav5MJ/7eZwf9jgD/E/5cBiXQIQnMktd2KSwkv84vjMzKR2m6fJMkxpLzP\njqRLYl21i++I8+Kha4H1JL0D/BQ4J8/5O8bzDwX+rlpXgsMJ3cXHJno0BiRO7Rzv93TC+MYqdlPc\n31XReEh2x2lkFGay3JPnC7HFE1se95hZ/zKb0ipohFZRSbSolofjOBWDf5U2H2Wpa295OI7jOKnx\nlofjOI6TGhcPx3EcJzUuHo7jOE5qXDwcx3Gc1Lh4OI7jOKlx8XAcx3FS8//ja4GDLNv8OwAAAABJ\nRU5ErkJggg==\n", + "text": [ + "<matplotlib.figure.Figure at 0x7fe6f58bc190>" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/NirenNegandhi/ch2_2.ipynb b/sample_notebooks/NirenNegandhi/ch2_2.ipynb new file mode 100755 index 00000000..9f685b2b --- /dev/null +++ b/sample_notebooks/NirenNegandhi/ch2_2.ipynb @@ -0,0 +1,453 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:93b6ee47cf464df569e4895dab3158be49c4f81380cffe2b4a954430fff24e01" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2: Nuclear Models" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.1, Page 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "# For Ca(20,40), actual binding energy is ...... \n", + "m_p = 1.007825; # Mass of proton, amu\n", + "m_n = 1.008665; # Mass of neutron, amu\n", + "Z = 20; # Number of protons\n", + "N = 20; # Number of neutrons\n", + "M_n = 39.962591; # Mass of the nucleus, amu\n", + "B_actual = (M_n-Z*m_p-N*m_n)*931.49; # Actual binding energy, MeV\n", + "# For Ca(20,40), Binding energ as per semiemperical mas formula......\n", + "Z = 20; # Number of protons\n", + "a_v = 15.5; # Volume constant, MeV\n", + "a_s = 16.8; # Surface constant, MeV\n", + "a_a = 23.0; # Asymmetric constant, MeV\n", + "a_c = 0.7; # Coulomb constant, MeV\n", + "a_p = 34.0; # Paring constant, MeV\n", + "A = 40; # Mass number\n", + "\n", + "#Calculations\n", + "B_semi = (a_v*A-(a_s*A**(2./3))-(a_c*Z*(Z-1)/A**(1./3))-(a_a*(A-2*Z)**2/A)-(a_p*A**(-3./4))); # Binding energy as per semiemperical mass formula\n", + "# Percentage discrepancy between actual and semiemperical mass formula values are.......\n", + "Per_des = -(B_semi+B_actual)/B_actual*100; # Percentage discrepancy \n", + "\n", + "#Result\n", + "print \"Actual binding energy = %6.2f MeV\\nBinding energy as per semiemperical mass formula = %6.2f MeV\\nPercentage discrepancy = %.2f percent\"%(B_actual, B_semi, Per_des)\n", + "\n", + "#answers vary due to rounding-off errors" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Actual binding energy = -342.05 MeV\n", + "Binding energy as per semiemperical mass formula = 343.59 MeV\n", + "Percentage discrepancy = 0.45 percent\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.2, Page 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration \n", + " # Calculation of coulomb energy for mirror nuclei : N-7 and O-8\n", + " # For N-7 nucleus\n", + "a_c = 0.7; # Coulomb energy constant, MeV\n", + "Z_N = 7; # Atpmic no. \n", + "A = 15; # Atomic mass\n", + "E_C_N = a_c*Z_N*(Z_N-1)/(A**(1./3)); # Coulomb energy for N-7, MeV\n", + "# For O-8 nucleus\n", + "a_c = 0.7; # Coulomb energy constant, MeV\n", + "Z_O = 8; # Atpmic no. \n", + "A = 15.; # Atomic mass\n", + "\n", + "#Calculations\n", + "E_C_O = a_c*Z_O*(Z_O-1)/(A**(1./3)); # Coulomb energy for O-8, MeV\n", + "C_E_d = E_C_O-E_C_N; # Coulomb energy difference, MeV\n", + "m_p = 1.007276*931.49; # Mass of proton, MeV\n", + "m_n = 1.008665*931.49; # Mass of neutron, MeV\n", + "M_d = m_n-m_p; # Mass difference of nucleons, MeV \n", + "D_C_M = round(C_E_d-M_d); # Difference in coulomb energy and nucleon mass difference, MeV\n", + "M_O = 15.003070*931.49; # Mass of O-8, MeV\n", + "M_N = 15.000108*931.49; # Mass of N-7, MeV\n", + "D_A = (M_O-M_N); # Actual mass difference, MeV\n", + "\n", + "#Result\n", + "print \"Difference in Coulomb energy = %5.3f MeV\\nNucleon mass difference = %6.4f MeV\\nDifference in Coulomb energy and nucleon mass difference = %5.3f MeV\\nActual mass difference = %.3f MeV\"%(C_E_d, M_d ,D_C_M, D_A)\n", + "if D_A == D_C_M:\n", + " print \"Result is verified\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Difference in Coulomb energy = 3.974 MeV\n", + "Nucleon mass difference = 1.2938 MeV\n", + "Difference in Coulomb energy and nucleon mass difference = 3.000 MeV\n", + "Actual mass difference = 2.759 MeV\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.3, Page 68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration&Calculations\n", + "# For Kr-80, \n", + "m_p = 1.007825; # Mass of proton, amu\n", + "m_n = 1.008665; # Mass of neutron, amu\n", + "Z = 36; # Number of protons\n", + "N_80 = 44; # Number of neutrons\n", + "M_n_80 = 79.91628; # Mass of Kr nucleus\n", + "BE_Kr_80 = (Z*m_p+N_80*m_n-M_n_80)*931.49; # Binding energy for Kr-80, MeV\n", + "# For Kr-81,\n", + "N_81 = 45; # Number of neutrons\n", + "M_n_81 = 80.91661; # Mass of Kr-81 nucleus\n", + "BE_Kr_81 = (Z*m_p+N_81*m_n-M_n_81)*931.49; # Binding energy for Kr-81 nucleus\n", + "# For Kr-82\n", + "N_82 = 46; # Number of neutrons\n", + "M_n_82 = 81.913482; # Mass of Kr nucleus\n", + "BE_Kr_82 = (Z*m_p+N_82*m_n-M_n_82)*931.49; # Binding energy for Kr-82,MeV\n", + "# For Kr-83 \n", + "N_83 = 47; # Number of protons\n", + "M_n_83 = 82.914134; # Mass of Kr-83 nucleus\n", + "BE_Kr_83 = (Z*m_p+N_83*m_n-M_n_83)*931.49; # Binding energy for Kr-83, MeV\n", + "E_sep_81 = BE_Kr_81-BE_Kr_80; # Energy seperation of neutron for Kr-81, MeV\n", + "E_sep_82 = BE_Kr_82-BE_Kr_81; # Energy seperation of neutron for Kr-82, MeV\n", + "E_sep_83 = BE_Kr_83-BE_Kr_82; # Energy seperation of neutron for Kr-83, MeV\n", + "\n", + "#Result\n", + "print \"Energy seperation of neutron for Kr-81 = %4.2f MeV\\nEnergy seperation of neutron for Kr-82 = %4.2f MeV\\nEnergy seperation of neutron for Kr-83 = %5.2f MeV\"%(E_sep_81, E_sep_82, E_sep_83)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy seperation of neutron for Kr-81 = 7.76 MeV\n", + "Energy seperation of neutron for Kr-82 = 10.99 MeV\n", + "Energy seperation of neutron for Kr-83 = 7.46 MeV\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.4, Page 68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sympy\n", + "from sympy.solvers import solve\n", + "from sympy import Symbol\n", + "\n", + "#Variable declaration\n", + "a_v = 15.5; # Volume energy coefficient, MeV\n", + "a_s = 16.8; # Surface energy coefficient MeV\n", + "a_c = 0.7; # Coulomb energy coefficient, MeV\n", + "a_a = 23.0; # Asymmetric energy coefficient, MeV\n", + "a_p = 34.0; # Pairing energy coefficient, MeV\n", + "A = 75; # Given atomic mass \n", + "\n", + "#Calculations\n", + "z = Symbol('z')\n", + "B =solve((((-a_c*(2*z-1))/A**1./3)+((4*a_a*(A-2*z))/A)),z) # Binding energy as per liquid drop model\n", + "\n", + "#Result\n", + "print \"Most stable isotope of A = 75 corresponds to Z = %.d\"%B[0]\n", + "\n", + "#answer varies due to usage of sympy module" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Most stable isotope of A = 75 corresponds to Z = 37\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.5, Page 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sympy\n", + "from sympy.solvers import solve\n", + "from sympy import Symbol\n", + "\n", + "#Variable declaration\n", + "a_v = 15.5; # Volume energy, MeV \n", + "a_s = 16.8; # Surface energy, MeV \n", + "a_c = 0.7; # Coulomb energy, MeV\n", + "a_a = 23.0; # Asymmetric energy, MeV\n", + "a_p = 34.0; # Pairing energy, MeV\n", + "\n", + "z = Symbol('z')\n", + "A = 27\n", + "#Calculations\n", + "# For A = 27;\n", + "A = 27\n", + "Z_27 = ((4*a_a)+(a_c/A**1./3))/(((2*a_c)/A**1./3)+(8*a_a/A))\n", + "\n", + "# For A = 118 \n", + "A = 118\n", + "Z_118 = ((4*a_a)+(a_c/A**1./3))/(((2*a_c)/A**1./3)+(8*a_a/A))\n", + "\n", + "# For A = 238\n", + "A = 238\n", + "Z_238 = ((4*a_a)+(a_c/A**1./3))/(((2*a_c)/A**1./3)+(8*a_a/A))\n", + "\n", + "#Result\n", + "print \"Most stable isotopes for A = 27, A = 118, A = 238 corresponds to z = %d, %d and %d respectively\"%(Z_27, Z_118, Z_238)\n", + "\n", + "#Incorrect answers in the textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Most stable isotopes for A = 27, A = 118, A = 238 corresponds to z = 13, 58 and 118 respectively\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.6, Page 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "# Mirror nuclei : Na-11 and Mg-12 \n", + "m_p = 1.007276; # Mass of proton, amu\n", + "m_n = 1.008665; # Mass of neutron, amu\n", + "M_Mg = 22.994124; # Atomic mass of Mg-12, amu\n", + "M_Na = 22.989768; # Atomic mass of Na-11, amu\n", + "A = 23; # Mass number\n", + "Z_Mg = 12; # Atomic number of Mg-12\n", + "e = 1.6e-019; # Charge of the electron, C\n", + "K = 8.98e+09; # Coulomb force constant\n", + "\n", + "#Calculations\n", + "a_c = A**(1./3)/(2*Z_Mg-1)*((M_Mg-M_Na)+(m_n-m_p))*931.47; # Coulomb coefficient, MeV \n", + "r_0 = 3./5*K*e**2/(a_c*1.6e-013); # Nuclear radius, m\n", + "\n", + "#Result\n", + "print \"Coulomb coefficient = %4.2f MeV\\nNuclear radius = %3.1e m\"%(a_c, r_0)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coulomb coefficient = 0.66 MeV\n", + "Nuclear radius = 1.3e-15 m\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.7, Page 71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Z = 92; # Atomic number of U-236\n", + "e = 1.6e-019; # Charge of an electron, C\n", + "A = 236; # Mass number of U-236\n", + "K = 8.98e+09; # Coulomb constant,\n", + "r_o = 1.2e-015; # Distance of closest approach, m\n", + "a_s = -16.8; # Surface constant\n", + "\n", + "#Calculations\n", + "E_c = -(3*K*Z*(Z-1)*e**2)/(5*r_o*A**(1./3)*1.6e-013); # Coulomb energy, MeV\n", + "E_s = a_s*A**(2./3); # Surface energy, MeV \n", + "\n", + "#Result\n", + "print \"Coulomb energy for U(92,236) = %5.1f MeV \\nSurface energy for U(92,236) = %5.1f MeV \"%(E_c, E_s)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coulomb energy for U(92,236) = -973.3 MeV \n", + "Surface energy for U(92,236) = -641.6 MeV \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3.1, Page 126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Variable declaration\n", + "t_prime = 1600; # Half life of radioactive material, years\n", + "t = 2000; # Total time, years\n", + "lamda = 0.6931/t_prime; # Decay constant, years^(-1)\n", + "m0 = 1; # The mass of radioactive substance at t0, mg\n", + "\n", + "#Calculations\n", + "m = m0* math.exp(-(lamda*t)); # Ratio of total number of atoms and number of atoms disintegrat, mg\n", + "a = 1-m; # The amount of radioactive substance decayed, mg \n", + "\n", + "#Result\n", + "print \"The amount of radioactive substance decayed : %6.4f mg\"%a\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The amount of radioactive substance decayed : 0.5795 mg\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3.4, Page 126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Variable declaration\n", + "t_prime = 1600; # Half life of radioactive material, years\n", + "t = 2000; # Total time, years\n", + "lamda = 0.6931/t_prime; # Decay constant, years^(-1)\n", + "m0 = 1; # The mass of radioactive substance at t0, mg\n", + "\n", + "#Calculations\n", + "m = m0* math.exp(-(lamda*t)); # Ratio of total number of atoms and number of atoms disintegrat, mg\n", + "a = 1-m; # The amount of radioactive substance decayed, mg \n", + "\n", + "#Result\n", + "print \"The amount of radioactive substance decayed : %6.4f mg\"%a\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The amount of radioactive substance decayed : 0.5795 mg\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/Nitin Kumar/chapter12.ipynb b/sample_notebooks/Nitin Kumar/chapter12.ipynb new file mode 100755 index 00000000..ceed3190 --- /dev/null +++ b/sample_notebooks/Nitin Kumar/chapter12.ipynb @@ -0,0 +1,471 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:1379f2f8d6e289c373beb86705dd50349840a6850fd79932957ae177aa587cc0" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12 : Microwave Measurements" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.1 Page Number: 649" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Is=0.1*(10**-6) #A\n", + "Pi=0 #dBm\n", + "Cs=0.1*(10**-12) #F\n", + "Ls=2*(10**-9) \n", + "Cj=0.15*(10**-12) #F\n", + "Rs=10 #ohm\n", + "T=293 #K\n", + "nktbye=25*(10**-3) #V\n", + "\n", + "#Rj\n", + "Rj=(nktbye/Is) \n", + "print 'Rj =',Rj/1000,'kohm'\n", + "\n", + "#Bi\n", + "Bi=nktbye/2 \n", + "Bii=Bi*1000 \n", + "print 'Bi =',Bii,'A/W' \n", + "\n", + "#Bv\n", + "Bv=Rj*Bii \n", + "print 'Bv =',Bv,'V/W' " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rj = 250.0 kohm\n", + "Bi = 12.5 A/W\n", + "Bv = 3125000.0 V/W\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.2 Page Number: 650" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log10\n", + "#Given\n", + "vswr=4.0 \n", + "\n", + "modT=(vswr-1)/(vswr+1) \n", + "Lm=-10*log10(1-(modT*modT)) #dB\n", + "print 'Mismatch Loss =',round(Lm,3),'dB' \n", + "\n", + "#Sensitivity reduces by a factor\n", + "Bvd=(1-(modT*modT)) \n", + "Bvdp=Bvd*100 \n", + "print 'Voltge sensitivity reduces by',Bvdp,\"%\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mismatch Loss = 1.938 dB\n", + "Voltge sensitivity reduces by 64.0 %\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.3 Page Number: 650" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "#Given\n", + "f=10E+9 #Hz\n", + "c=3E+10 #cm/s\n", + "a=4 #cm\n", + "s=0.1 #cm\n", + "lmb=c/f #cm\n", + "lmbg=lmb/(sqrt(1-((lmb/(2*a))**2))) \n", + "vswr=lmbg/(pi*s) \n", + "print 'VSWR =',round(vswr,3) \n", + "\n", + "#Answer in book for lmbg is given as 3.49 but it should be 3.23 and hence the answer will be 10.3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "VSWR = 10.301\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.4 Page Number: 651" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "delx=3.5 #cm\n", + "s=0.25 #cm\n", + "\n", + "lmbg=2*delx \n", + "vswr=lmbg/(pi*s) \n", + "print 'VSWR =',round(vswr,3) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "VSWR = 8.913\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.5 Page Number: 651" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "vswr=2.0 \n", + "Pin=4.5E-3 #W\n", + "\n", + "modT=(vswr-1)/(vswr+1) \n", + "#Power reflected,\n", + "Pr=(modT**2)*Pin \n", + "#As coupler samples only 1/1000th power\n", + "Prr=Pr*1000 \n", + "print 'Reflected Power =',Prr,'W' " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reflected Power = 0.5 W\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.6 Page Number: 652" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "from math import tan, sqrt, pi\n", + "Z0=50 #ohm\n", + "p=2.4 \n", + "L=0.313 \n", + "x=2*pi*L \n", + "y=tan(x) \n", + "\n", + "Zl=(Z0*(1+(p*p*1J)))/(p+(p*1J)) \n", + "T=(Zl-Z0)/(Zl+Z0) \n", + "p=sqrt(T.real**2+T.imag**2) \n", + "print 'Reflection coefficient =',round(p,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reflection coefficient = 0.41\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.7 Page Number: 652" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "Zl=25+25*1J #ohm\n", + "Z0=50 #ohm\n", + "\n", + "T=(Zl-Z0)/(Zl+Z0) \n", + "p=sqrt(T.real**2+T.imag**2) \n", + "print 'Reflection coefficient =',round(p,2) \n", + "\n", + "vswrr=(1+p)/(1-p) \n", + "print 'VSWR =', round(vswrr,2) \n", + "\n", + "#Fraction of power delivered\n", + "Pd=1-(p**2) \n", + "Pdp=Pd*100 \n", + "print 'Fraction of power delivered =',Pdp,'%' " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reflection coefficient = 0.45\n", + "VSWR = 2.62\n", + "Fraction of power delivered = 80.0 %\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.8 Page Number: 653" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "d=2.4 #cm\n", + "lmbc=1.8 \n", + "c=3*10**10 #cm/s\n", + "\n", + "lmbg=2*d \n", + "lmb=(lmbg*lmbc)/(sqrt(lmbg**2+lmbc**2)) \n", + "#Operating frequency\n", + "f=c/lmb \n", + "print 'Operating frequency =',round((f/10**9),2), 'GHz' " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Operating frequency = 17.8 GHz\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.9 Page Number: 653" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from numpy import array#Given\n", + "p=1.5 \n", + "IsL=1 #dB\n", + "InL=30 #dB\n", + "\n", + "S21=10**(-IsL/20) \n", + "\n", + "#Assuming three ports to be identical\n", + "S32=S21 \n", + "S13=S21 \n", + "\n", + "#Isolations are also the same\n", + "S31=10**(-InL/20) \n", + "S23=S31 \n", + "S12=S31 \n", + "\n", + "#Refelction coefficients are also the same\n", + "T=(p-1)/(p+1) \n", + "S11=T \n", + "S22=T \n", + "S33=T \n", + "\n", + "S=array([S11,S12,S13,S21,S22,S23,S31,S32,S33] )\n", + "print 'Matrix is:',S " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Matrix is: [ 0.2 0.01 0.1 0.1 0.2 0.01 0.01 0.1 0.2 ]\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.10 Page Number: 654" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "R1=10.6 #GHz\n", + "R2=8.30 #GHz\n", + "Q0=8200 \n", + "Q0d=890.0 \n", + "\n", + "Er=(R1/R2)**2 \n", + "print 'Dielectric constant =', round(Er ,2)\n", + "\n", + "Qd=(Q0-Q0d)/(Q0*Q0d) \n", + "print 'Loss tangent of dielectric =',round(Qd ,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dielectric constant = 1.63\n", + "Loss tangent of dielectric = 0.001\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.11 Page Number: 654" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given\n", + "l0=0.15 #cm\n", + "lmbg=2*2.24 #cm\n", + "le=1.14 #cm\n", + "a=2.286 #cm\n", + "d=2 \n", + "\n", + "B0=(2*pi)/lmbg \n", + "x=tan(B0*l0)/(B0*l0) \n", + "#Also\n", + "x1=(l0*x)/le \n", + "#Correct value seems to be\n", + "Bele=2.786 \n", + "e1=((((a/pi)**2)*(Bele/le)**2)+1) \n", + "e2=(((2*a)/lmbg)**2)+1 \n", + "Er=e1/e2 \n", + "print 'Er =',round(Er ,3)\n", + "\n", + "\n", + "#Answer in book for Er is given as 2.062 but it should be 2.038" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Er = 2.039\n" + ] + } + ], + "prompt_number": 45 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/ParitoshMehta/ch1.ipynb b/sample_notebooks/ParitoshMehta/ch1.ipynb new file mode 100755 index 00000000..8ed87e00 --- /dev/null +++ b/sample_notebooks/ParitoshMehta/ch1.ipynb @@ -0,0 +1,466 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:82344ff688f3e86a09716345a8eb43cec4a8aadc2157f526516e21d9f1e84d30" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 : Hydrostatics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2 Page No : 5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "w= 62.4 #lb/ft**3\n", + "A= 18. #ft**2\n", + "x= 6. # height ft\n", + "kg= 6.\n", + "y= 2. #ft hinges\n", + "y1= 5. #ft\n", + "\n", + "#CALCULATIONS\n", + "F= w*A*x\n", + "F1= F/2\n", + "Ft= (F*y-F1*(y1/2))/y1\n", + "Fb= F1-Ft\n", + "\n", + "#RESULTS\n", + "print 'Force exerted on the bolt = %.f lb'%(F1)\n", + "print ' Force exerted on the hinge = %.f lb'%(Ft)\n", + "print ' Force exerted on the bolt = %.f lb'%(Fb)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force exerted on the bolt = 3370 lb\n", + " Force exerted on the hinge = 1011 lb\n", + " Force exerted on the bolt = 2359 lb\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3 Page No : 6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "h1= 11.54 \t#ft\n", + "h2= 16.33 \t#ft\n", + "w= 62.4 \t#lb/ft**3\n", + "x1= 7.69 \t#ft\n", + "x2= 14.09 \t#ft\n", + "x3= 18.23 \t#ft\n", + "\n", + "#CALCULATIONS\n", + "Ft= round(w*h1**2/2)\n", + "\n", + "#RESULTS\n", + "print 'h1 = %.2f ft'%(h1)\n", + "print ' h2 = %.2f ft'%(h2)\n", + "print ' h1+ = %.2f ft'%(x1)\n", + "print ' h2+ = %.2f ft'%(x2)\n", + "print ' h3+ = %.2f ft'%(x3)\n", + "print ' Thrust force = %.f lb/ft run'%(round(Ft,-1))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "h1 = 11.54 ft\n", + " h2 = 16.33 ft\n", + " h1+ = 7.69 ft\n", + " h2+ = 14.09 ft\n", + " h3+ = 18.23 ft\n", + " Thrust force = 4160 lb/ft run\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4 Page No : 8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#initialisation of variables\n", + "spo= 0.9 # gravity\n", + "h= 3. \t#ft depth\n", + "d= 2. \t #ft depth of water\n", + "w= 62.4 \t#lb/ft**3\n", + "H= 0.71 \t#ft\n", + "\n", + "#CALCULATIONS\n", + "do= spo*w\n", + "de= w*d\n", + "bc= do*h\n", + "Pt= (bc*(h/2)+bc*d+de*(d/2))*(h+d)\n", + "y= (bc*(h/2)+bc*d+de*(d/2)*(d/3))*(h+d)/Pt+H\n", + "\n", + "#RESULTS\n", + "print \"Total pressure = %d lb\"%(Pt)\n", + "print ' position of centre of pressure above the base = %.2f ft position of centre of pressure above the axis '%(y)\n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total pressure = 3572 lb\n", + " position of centre of pressure above the base = 1.65 ft position of centre of pressure above the axis \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5 Page No : 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "a= 30. \t#degrees\n", + "b= 30. \t#degrees\n", + "h= 20. \t#ft width of lock\n", + "h1= 10. \t#ft water level\n", + "h2= 15. \t#ft water level\n", + "h3= 16. \t#ft high\n", + "w= 62.4 \t#lb/ft**3\n", + "h4= 10./3 \t#ft\n", + "\n", + "#CALCULATIONS\n", + "Rt= (1./h3)*((w*(h*h2**2*(h2/3)/(2*math.sqrt(3))))-(w*(h*h1**2*h4/(2*math.sqrt(3)))))\n", + "R= ((w*(h*h2**2/(2*math.sqrt(3))))-(w*(h*h1**2/(2*math.sqrt(3)))))\n", + "Rb= R-Rt\n", + "\n", + "#RESULTS\n", + "print 'Force at the hinge = %.f lb '%(Rt)\n", + "print ' Force at the hinge = %.f lb '%(Rb)\n", + "\n", + "# Note : Round off error in textbook\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force at the hinge = 17826 lb \n", + " Force at the hinge = 27208 lb \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6 Page No : 10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "\n", + "#initialisation of variables\n", + "x= 32. \t #ft\n", + "h= 60. \t#ft depth\n", + "w= 62.4 \t#lb/ft**3\n", + "AE= 20. \t#ft\n", + "\n", + "#CALCULATIONS\n", + "Vabc= 2*x*h/3\n", + "vc= Vabc*w\n", + "Tab= w*h**2/2\n", + "Rt= math.sqrt(vc**2+Tab**2)/2240\n", + "A= math.degrees(math.atan(vc/Tab))\n", + "AD= x-AE+AE*(1/(math.tan(math.radians(A))))\n", + "\n", + "\n", + "#RESULTS\n", + "print \"resulmath.tant thrust = %.1f tons\"%(Rt)\n", + "print \" Angle = %.2f degrees\"%(A)\n", + "print ' AD = %.1f ft '%(AD)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resulmath.tant thrust = 61.5 tons\n", + " Angle = 35.42 degrees\n", + " AD = 40.1 ft \n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7 Page No : 12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "wdc= 3*math.sqrt(3) \t#ft\n", + "wdo= math.sqrt(3)\n", + "ac= 30. \t#degrees\n", + "ao= 60. \t#degrees\n", + "hob= 3. \t#ft\n", + "haf= 2.6 \t#ft\n", + "hfc= 3. \t#ft\n", + "w= 62.4 \t#lb/ft**3\n", + "V= 5.63 \t#ft**3\n", + "h= 4.3 \t#ft\n", + "y= 3.6 \t #ft\n", + "\n", + "#CALCULATIONS\n", + "W1= int(wdc*hfc*w/2)\n", + "Hbc= round(w*hob*(hob/2))\n", + "W2= int(V*w)\n", + "W3= int(w*haf*h)\n", + "Vt= W1+W2\n", + "Vht= Hbc+W3\n", + "Rt= int(math.sqrt(Vt**2+Vht**2))\n", + "A= math.degrees(math.atan(Vht/Vt))\n", + "x= (W1*(wdo-(hob/2))+Hbc*y)/Rt\n", + "OP= x/math.sin(math.radians(A))\n", + "AP= hob+OP\n", + "\n", + "#RESULTS\n", + "print \"Resultant thrust = %d lb\"%(Rt)\n", + "print \" Angle = %.2f degrees \"%(A)\n", + "print ' Distance from A till horizontal thrust = %.3f ft '%(AP)\n", + "\n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resultant thrust = 1287 lb\n", + " Angle = 49.44 degrees \n", + " Distance from A till horizontal thrust = 4.150 ft \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.8 Page No : 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "r= 96. # T air\n", + "T= 10.5 \t#C\n", + "K1= 288. \t#C temperature gound level\n", + "K2= 0.0015 \t#C**-1 temperature gradient\n", + "h= 3000. \t#ft height\n", + "P1= 14.69\n", + "\n", + "#CALCULATIONS\n", + "P2= P1*10**(((1/(r*K2))*math.log10((K1-K2*h)/K1)))\n", + "w= P2*144/(r*(273+T))\n", + "\n", + "#RESULTS\n", + "print 'Density = %.4f lb/ft**3 '%(w)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Density = 0.0697 lb/ft**3 \n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.9 Page No : 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "Hb= 20. \t#in ratio\n", + "Ha= 1. \t#in ratio\n", + "a= 20. \t #degrees\n", + "\n", + "#CALCULATIONS\n", + "hb= Hb*math.sin(math.radians(a))\n", + "dh= hb+Ha\n", + "dP= dh/(12*2.309)\n", + "\n", + "#RESULTS\n", + "print 'Pressure difference between tapping points = %.3f lb/in**2 '%(dP)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure difference between tapping points = 0.283 lb/in**2 \n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.10 Page No : 16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "P= 180. \t#ln/in**2 pressure\n", + "r= 53. #T air\n", + "T= 60. \t#F temperature of air\n", + "w= 62.4 \t#lb/ft**3\n", + "h= 12. \t #in water level\n", + "\n", + "#CALCULATIONS\n", + "R= P*144/(r*(460+T))\n", + "dP= 12*(1-(R/w))\n", + "Pab= dP/(12*2.309)\n", + "\n", + "#RESULTS\n", + "print 'Difference in water level = %.2f in of water '%(dP)\n", + "print \" Pressure difference = %.3f lb/in**2\"%(Pab)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Difference in water level = 11.82 in of water \n", + " Pressure difference = 0.427 lb/in**2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/ParthThakkar/ch6.ipynb b/sample_notebooks/ParthThakkar/ch6.ipynb new file mode 100644 index 00000000..af4c67a6 --- /dev/null +++ b/sample_notebooks/ParthThakkar/ch6.ipynb @@ -0,0 +1,320 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b09b7fb5366e8af61b1c0396c23ff3a998c9bd372716836d0d1fda9706db6296" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 : DC Machines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 Page No : 6.3" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "P = 4;\t\t\t\t#no. of poles\n", + "c = 2;\t\t\t\t#no. of parallel paths\n", + "p = 4./2;\t\t\t\t#no. of pair of poles\n", + "S = 51;\t\t\t\t#no. of slots\n", + "C = 12;\t\t\t\t#conductors per slot\n", + "N = 900;\t\t\t\t#rpm(speed)\n", + "fi = 25./1000;\t\t\t\t#Wb\n", + "\n", + "# Calculations\n", + "Z = S*C;\t\t\t\t#total no. of conductors\n", + "E = 2*Z/c*N*p/60*fi;\t\t\t\t#V\n", + "\n", + "# Results\n", + "print \"Generated emf(V): %.2f\"%E\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Generated emf(V): 459.00\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2 Page No : 6.4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "P = 8.;\t\t\t\t#no. of poles\n", + "c = 8.;\t\t\t\t#no. of parallel paths\n", + "p = 8./2;\t\t\t\t#no. of pair of poles\n", + "E = 260.;\t\t\t\t#V(generated emf)\n", + "fi = 0.05;\t\t\t\t#Wb\n", + "S = 120;\t\t\t\t#no. of slots\n", + "N = 350;\t\t\t\t#rpm(speed)\n", + "\n", + "# Calculations\n", + "Z = E/(2./c*N*p/60*fi);\t\t\t\t#V\n", + "\n", + "# Results\n", + "print \"No. of conductors per slot\",int(Z)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No. of conductors per slot 891\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3 Page No : 6.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Ra = 0.1;\t\t\t\t#ohm(Armature Resistance)\n", + "Vs = 250;\t\t\t\t#V(supply voltage)\n", + "\n", + "# Calculations and Results\n", + "#part(a)\n", + "I = 80;\t\t\t\t#A\n", + "Vdrop = Ra*I;\t\t\t\t#V\n", + "emf = Vs+Vdrop;\t\t\t\t#V(Generated emf)\n", + "print \"Part(a) Generated emf(V) : %.2f\"%emf\n", + "\n", + "#part(b)\n", + "I = 60;\t\t\t\t#A(current taken by Motor)\n", + "Vdrop = Ra*I;\t\t\t\t#V\n", + "emf = Vs-Vdrop;\t\t\t\t#V(Generated emf)\n", + "print \"Part(b) Generated emf(V) : %.2f\"%emf\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part(a) Generated emf(V) : 258.00\n", + "Part(b) Generated emf(V) : 244.00\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4 Page No : 6.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "P = 4;\t\t\t\t#no. of poles\n", + "Vs = 440;\t\t\t\t#V\n", + "c = 2;\t\t\t\t#no. of parallel paths\n", + "p = 4./2;\t\t\t\t#no. of pair of poles\n", + "Ia = 50;\t\t\t\t#A\n", + "Ra = 0.28;\t\t\t\t#ohm\n", + "Z = 888;\t\t\t\t#conductors\n", + "fi = 0.023;\t\t\t\t#Wb\n", + "\n", + "# Calculations\n", + "emf = Vs-Ia*Ra;\t\t\t\t#V\n", + "N = emf/(2*Z/c*p/60*fi);\t\t\t\t#rpm\n", + "\n", + "# Results\n", + "print \"Speed in rpm\",round(N)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed in rpm 626.0\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5 Page No : 6.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "N = 900;\t\t\t\t#rpm\n", + "Vs = 460.;\t\t\t\t#V\n", + "Vs_new = 200;\t\t\t\t#V\n", + "fi_ratio = 0.7;\t\t\t\t#ratio of new flux to original flux\n", + "\n", + "# Calculations\n", + "kfi = Vs/N;\t\t\t\t#for original flux\n", + "Nnew = Vs_new/kfi/fi_ratio;\t\t\t\t#rpm(new speed)\n", + "\n", + "# Results\n", + "print \"Speed in rpm\",round(Nnew)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed in rpm 559.0\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6 Page No : 6.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Ia = 110;\t\t\t\t#A\n", + "Vs = 480;\t\t\t\t#V\n", + "Ra = 0.2;\t\t\t\t#ohm\n", + "P = 6.;\t\t\t\t#no. of poles\n", + "c = 6.;\t\t\t\t#no. of parallel paths\n", + "p = P/2;\t\t\t\t#no. of pair of poles\n", + "Z = 864;\t\t\t\t#no. of conductors\n", + "fi = 0.05;\t\t\t\t#Wb\n", + "\n", + "# Calculations and Results\n", + "emf = Vs-Ia*Ra;\t\t\t\t#V\n", + "N = emf/(2*Z/c*p/60*fi);\t\t\t\t#rpm\n", + "print \"(a) Speed in rpm\",round(N)\n", + "\n", + "Pm = Ia*emf;\t\t\t\t#W(Mechanical power developed)\n", + "M = Pm/(N/60)/(2*math.pi);\t\t\t\t#Nm(Torque)\n", + "print \"(b) Gross torque developed(Nm) : %.f\"%M\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Speed in rpm 636.0\n", + "(b) Gross torque developed(Nm) : 756\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7 Page No : 6.9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "N = 15;\t\t\t\t#rps\n", + "M = 2*1000;\t\t\t\t#Nm(Torque required)\n", + "Loss = 8*1000;\t\t\t\t#W\n", + "\n", + "# Calculations\n", + "P = 2*math.pi*M*N;\t\t\t\t#W(Power required)\n", + "Pa = P-Loss;\t\t\t\t#W(Power generated in armature)\n", + "\n", + "# Results\n", + "print \"Power generated in armature(kW) : %.2f\"%(Pa/1000)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power generated in armature(kW) : 180.50\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/PreetiRani/ch6.ipynb b/sample_notebooks/PreetiRani/ch6.ipynb new file mode 100644 index 00000000..c3a88008 --- /dev/null +++ b/sample_notebooks/PreetiRani/ch6.ipynb @@ -0,0 +1,367 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2286c67a37dc36a4b2463b6ff90eb31f4de0251dedc09d4493cdbe015dfacf59" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter06 : Levers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "sum 6-1 : page 296" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "Del=10 \n", + "k=500 \n", + "W=k*Del \n", + "#Let load arm be l1\n", + "l1=200 \n", + "#Let effort arm be l2\n", + "l2=500 \n", + "P=W*l1/l2 \n", + "Ro=sqrt(W**2+P**2) \n", + "Ta=40 \n", + "d=sqrt(Ro*4/(2*pi*Ta)) \n", + "d=10 \n", + "pb=10 \n", + "d1=sqrt(Ro/(pb*1.5)) \n", + "d1=20 \n", + "l=1.5*d \n", + "t=10 \n", + "T=Ro*4/(2*pi*d1**2) \n", + "M=(Ro/2*(l/2+t/3))-(Ro/2*l/4) \n", + "sigb=32*M/(pi*d1**3) \n", + "sigmax=(sigb/2)+sqrt((sigb/2)**2+T**2) \n", + "P=Ro/(l*d1) \n", + "D=2*d1 \n", + "\n", + "# Output\n", + "print \"d1 is %0.1f mm \"%d1 \n", + "print \"D is %0.1f mm \"%D" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "d1 is 20.0 mm \n", + "D is 40.0 mm \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "sum 6-2 : page 297" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "d1=80 \n", + "p=0.981 \n", + "Ta=40 \n", + "siga=80 \n", + "pa=15 \n", + "W=pi*(d1**2)*p/4 \n", + "P=W/8 \n", + "Ws=W-P \n", + "d=sqrt(W*4/(pi*2*Ta)) \n", + "l=1.5*d \n", + "D=2*d \n", + "T=W/(2*pi*pa**2/4) \n", + "M1=P*(700-87.5-(D/2)) \n", + "h=50 \n", + "b=h/4 \n", + "Z=b*h**2/6 \n", + "sigb=M1/Z \n", + "pmax=80 \n", + "T=2465.6/h**2 \n", + "pmax=(sigb/2)+sqrt((sigb/2)**2+T**2) \n", + "\n", + "# Output\n", + "print \"h is %0.2f mm \"%h \n", + "print \"pmax is %0.2f MPa \"%pmax\n", + " \n", + "#The difference in the value of pmax is due to rounding-off the digits." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "h is 50.00 mm \n", + "pmax is 74.43 MPa \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "sum 6-3 : page 303" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "P=((4*360)+(2*360))/900 \n", + "Fv=4-2 \n", + "Fh=P \n", + "Fr=sqrt(Fv**2+Fh**2) \n", + "P1=4*0.36/0.9 \n", + "Rf=sqrt(4**2+1.6**2) \n", + "d=sqrt(Rf*10**3/(15*1.25)) \n", + "d=16 \n", + "l=1.25*d \n", + "T=Rf*10**3*4/(2*pi*d**2) \n", + "D=2*d \n", + "M1=Rf*10**3*(360-(D/2)) \n", + "pa=15 \n", + "h=80 \n", + "b=h/4 \n", + "Z=b*h**2/6 \n", + "sigb=M1/Z \n", + "T=4310/(b*h) \n", + "pmax=(sigb/2)+sqrt((sigb/2)**2+T**2) \n", + "\n", + "# Output\n", + "print \"P is %0.1f KN \"%P \n", + "print \"pmax is %0.2f MPa \"%pmax" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "P is 2.0 KN \n", + "pmax is 69.53 MPa \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "sum 6-4 : page 304" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "l=360 \n", + "P=400 \n", + "Mh=2*P*l/3 \n", + "sigb=50 \n", + "l1=60 \n", + "d=(Mh*32/(pi*l1))**(1/3) \n", + "d=30 \n", + "L=420 \n", + "siga=60 \n", + "H=20 \n", + "B=H/3 \n", + "Mx=P*(L-H/2) \n", + "Tx=2*P*l/3 \n", + "sigb1=Mx*18/H**3 \n", + "Td=P/(B*H) \n", + "Tr=17.17*Tx/H**4 \n", + "T=Tr+Td \n", + "sigmax=(sigb1/2)+sqrt((sigb1/2)**2+T**2) \n", + "Tmax=sqrt((sigb1/2)**2+T**2) \n", + "T=P*L \n", + "M=P*(l1+(2/3*l)) \n", + "Te=sqrt(T**2+M**2) \n", + "Ta=40 \n", + "D=(Te*16/(pi*Ta))**(1/3) \n", + "D=round(D) #Rounding off \n", + "# Output\n", + "print \"d is %0.1f mm \"%d \n", + "print \"D is %0.1f mm \"%D" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "d is 30.0 mm \n", + "D is 1.0 mm \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "sum 6-5 : page 306" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "l2=300 \n", + "l=450 \n", + "P=400 \n", + "Mx=2*P*l2/3 \n", + "siga=80 \n", + "dh=(Mx*32/(pi*siga))**(1/3) \n", + "dh=22 \n", + "L=(2*l2/3)+l \n", + "T=P*L \n", + "Ta=40 \n", + "d=(T*16/(pi*Ta))**(1/3) \n", + "d=35 \n", + "d1=1.6*d \n", + "Th=T*16*d1/(pi*(d1**4-d**4)) \n", + "l1=1.5*d \n", + "My=P*(L-(d1/2)) \n", + "B=dh \n", + "H=sqrt(3.66*75) \n", + "H=30 \n", + "Mz=P*l1/2 \n", + "Te=sqrt(T**2+Mz**2) \n", + "d2=(Te*16/(pi*Ta))**(1/3) \n", + "d2=32 \n", + "b=d/4 \n", + "b=round(b)\n", + "t=d/6 \n", + "t=round(t)\n", + "# Output\n", + "print \"d is %0.1f mm \"%d \n", + "print \"dh is %0.1f mm \"%dh \n", + "print \"d1 is %0.1f mm \"%d1 \n", + "print \"l1 is %0.1f mm \"%l1 \n", + "print \"d2 is %0.1f mm \"%d2 \n", + "print \"b is %0.1f mm \"%b \n", + "print \"t is %0.1f mm \"%t " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "d is 35.0 mm \n", + "dh is 22.0 mm \n", + "d1 is 56.0 mm \n", + "l1 is 52.5 mm \n", + "d2 is 32.0 mm \n", + "b is 8.0 mm \n", + "t is 5.0 mm \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "sum 6-6 : page 307" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "L=450 \n", + "P=700 \n", + "T=P*L \n", + "Ta=50 \n", + "d=(T*16/(pi*Ta))**(1/3) \n", + "d=32 \n", + "d1=1.6*d \n", + "d1=52 #Rounding off to nearest whole number\n", + "l1=1.25*d \n", + "My=P*(L-d1/2) \n", + "sigb=65 \n", + "H=(My*18/sigb)**(1/3) \n", + "H=45 \n", + "B=H/3 \n", + "T1=P/(B*H) \n", + "sigmax=(sigb/2)+sqrt((sigb/2)**2+T**2) \n", + "Mx=P*l1/2 \n", + "Te=sqrt((T)**2+(Mx**2)) \n", + "d2=(Te*16/(pi*Ta))**(1/3) \n", + "d2=d2+6 \n", + "d2=round(d2)\n", + "# utput\n", + "print \"d is %0.1f mm \"%d \n", + "print \"d1 is %0.1f mm \"%d1 \n", + "print \"l1 is %0.1f mm \"%l1 \n", + "print \"B is %0.1f mm \"%B \n", + "print \"H is %0.1f mm \"%H \n", + "print \"d2 is %0.1f mm \"%d2 " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "d is 32.0 mm \n", + "d1 is 52.0 mm \n", + "l1 is 40.0 mm \n", + "B is 15.0 mm \n", + "H is 45.0 mm \n", + "d2 is 7.0 mm \n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/RavirajJadeja/ch16.ipynb b/sample_notebooks/RavirajJadeja/ch16.ipynb new file mode 100755 index 00000000..2b395898 --- /dev/null +++ b/sample_notebooks/RavirajJadeja/ch16.ipynb @@ -0,0 +1,64 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3c3856bc217e5f495e078375001a6745906e09c45dfca2c5d1fe105500ef94b8" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16 : Machinery and Equipment" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.2 Page No : 16-11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\t\n", + "#initialisation of variables\n", + "p = 500\t#ft\n", + "p1 = 6\t#in\n", + "t = 500\t#cfm\n", + "p2 = 7\t#psig\n", + "P = p2+14.7\t#psia\n", + "T = 520*(P/14.7)**0.283\t#F\n", + "f = 0.048*p1**0.027/(t)**0.148\t#in\n", + "\t\n", + "#CALCULATIONS\n", + "delP = 20.*10**-3*p*T*(t)**2/(38*10**3*P*p1**5)\t#psia\n", + "\t\n", + "#RESULTS\n", + "print 'the pressure drop = %.2f psia'%(delP)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the pressure drop = 0.23 psia\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/RohitPhadtare/chapter_1_som.ipynb b/sample_notebooks/RohitPhadtare/chapter_1_som.ipynb new file mode 100755 index 00000000..ff3fcb22 --- /dev/null +++ b/sample_notebooks/RohitPhadtare/chapter_1_som.ipynb @@ -0,0 +1,438 @@ +{
+ "metadata": {
+ "name": "chapter 1 som.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1:Centre Of Gravity\n"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Problem 1.1,Page No.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "#Rectangle-1\n",
+ "a_1=37.5 #cm**2 \n",
+ "y_1=26.25 #cm \n",
+ "\n",
+ "#Rectangle-2\n",
+ "a_2=50 #cm**2 \n",
+ "y_2=15 #cm \n",
+ "\n",
+ "#Rectangle-3\n",
+ "a_3=150 #cm**2 \n",
+ "y_3=2.5 #cm \n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "\n",
+ "Y_bar=(a_1*y_1+a_2*y_2+a_3*y_3)*(a_1+a_2+a_3)**-1 #cm \n",
+ "\n",
+ "#Result\n",
+ "print\"The centroid of the section is\",round(Y_bar,2),\"cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The centroid of the section is 8.88 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Problem 1.2,Page No.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "#Area-1\n",
+ "a_1=6 #cm**2 \n",
+ "x_1=3 #cm\n",
+ "y_1=0.5 #cm\n",
+ "\n",
+ "#Area-2\n",
+ "a_2=6 #cm**2\n",
+ "x_2=2.671 #cm\n",
+ "y_2=3 #cm\n",
+ "\n",
+ "#Area-3\n",
+ "a_3=16 #cm**2\n",
+ "x_3=1 #cm\n",
+ "y_3=5 #cm\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "\n",
+ "X_bar=(a_1*x_1+a_2*x_2+a_3*x_3)*(a_1+a_2+a_3)**-1 #cm\n",
+ "Y_bar=(a_1*y_1+a_2*y_2+a_3*y_3)*(a_1+a_2+a_3)**-1 #cm\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"The centre of gravity of section is\",round(X_bar,2),\"cm\"\n",
+ "print\"The centre of gravity of section is\",round(Y_bar,2),\"cm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The centre of gravity of section is 1.79 cm\n",
+ "The centre of gravity of section is 3.61 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Problem 1.3,Page no.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "#Area-1\n",
+ "a_1=93.75 #cm**2 \n",
+ "y_1=6.25 #cm\n",
+ "\n",
+ "#Area-2\n",
+ "a_2=93.75 #cm**2 \n",
+ "y_2=6.25 #cm\n",
+ "\n",
+ "#Area-3\n",
+ "a_3=375 #cm**2 \n",
+ "y_3=9.375 #cm\n",
+ "\n",
+ "#Area-4\n",
+ "a_4=353.43 #cm**2\n",
+ "y_4=6.366 #cm\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Y_bar=(a_1*y_1+a_2*y_2+a_3*y_3-a_4*y_4)*(a_1+a_2+a_3-a_4)**-1 #cm\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"The centre of gravity lies at a distance of \",round(Y_bar,2),\"cm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The centre of gravity lies at a distance of 11.66 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Problem 1.4,Page no.10\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "\n",
+ "a_1=36*pi #cm**2 #Area of Quadrant of a circle\n",
+ "x_1=16/pi #cm \n",
+ "y_1=16*pi**-1 #cm\n",
+ "\n",
+ "\n",
+ "a_2=18*pi #cm**2 #Area of the semicircle\n",
+ "x_2=6 #cm\n",
+ "y_2=8*pi**-1 #cm\n",
+ "\n",
+ "\n",
+ "#Calculation-1\n",
+ "\n",
+ "X_bar=(a_1*x_1-a_2*x_2)*(a_1-a_2)**-1 #cm\n",
+ "\n",
+ "#Calculation-2\n",
+ "#To calculate Y_bar,taking AB as the Reference line\n",
+ "\n",
+ "Y_bar=(a_1*y_1-a_2*y_2)*(a_1-a_2)**-1 #cm\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print\"The centre of gravity is \",round(X_bar,2),\"cm\"\n",
+ "print\"The centre of gravity is\",round(Y_bar,2),\"cm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The centre of gravity is 4.19 cm\n",
+ "The centre of gravity is 7.64 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Problem 1.5,Page no.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "#Circle-1 \n",
+ "a_1=100*pi #cm**2\n",
+ "x_1=10 #cm\n",
+ " \n",
+ "#Square-2 \n",
+ "a_2=50 #cm**2\n",
+ "x_2=15 #cm\n",
+ " \n",
+ "#Calculation\n",
+ "\n",
+ "X_bar=(a_1*x_1-a_2*x_2)*(a_1-a_2)**-1 #cm\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"The centre of gravity is\",round(X_bar,2),\"cm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The centre of gravity is 9.05 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Problem 1.6,Page no.12\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#intilization of variables \n",
+ "\n",
+ "#Rectangle-1\n",
+ "a_1=51200 #mm**2 \n",
+ "x_1=160 #mm\n",
+ "y_1=80 #mm\n",
+ "\n",
+ "#Triangle-2\n",
+ "a_2=6400 #mm**2\n",
+ "x_2=80*3**-1 #mm\n",
+ "y_2=320*3**-1 #mm\n",
+ "\n",
+ "#Semicircle-3\n",
+ "a_3=1250*pi #mm**2\n",
+ "x_3=210 #mm\n",
+ "y_3=(160-(4*50-(3*pi)**-1)) #mm\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "X_bar=(a_1*x_1-a_2*x_2-a_3*x_3)*(a_1-a_2-a_3)**-1 #mm\n",
+ "Y_bar=(a_1*y_1-a_2*y_2-a_3*y_3)*(a_1-a_2-a_3)**-1 #mm\n",
+ "\n",
+ "#Result\n",
+ "print\"The centroid of the given area is\",round(X_bar,2),\"mm\"\n",
+ "print\"The centroid of the given area is\",round(Y_bar,2),\"mm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The centroid of the given area is 176.07 mm\n",
+ "The centroid of the given area is 87.34 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Problem 1.8,Page no.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "\n",
+ "alpha=pi/2 #degree #In case of semicircle\n",
+ "\n",
+ "#Semicircle-1\n",
+ "r_1=20 #cm #radius of semicircle \n",
+ "y_1=4*r_1*(3*pi)**-1 #cm #distance from the base\n",
+ "a_1=(pi*r_1**2)*2**-1 #cm**2 #area of semicircle\n",
+ "\n",
+ "#Semicircle-2\n",
+ "r_2=16 #cm #radius of semicircle\n",
+ "y_2=4*r_2*(3*pi)**-1 #cm #distance from the base\n",
+ "a_2=(pi*r_2**2)*2**-1 #cm**2 #area of semicircle\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "\n",
+ "Y_bar=(a_1*y_1-a_2*y_2)*(a_1-a_2)**-1 #cm #centroid\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print\"The centroid of the area is \",round(Y_bar,2),\"cm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The centroid of the area is 11.51 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Problem no1.12,Page no.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of variables\n",
+ "\n",
+ "#Right Circular Cyclinder\n",
+ "#m_1=(16*pi*h*rho_1) #gm \n",
+ "#y_1=4+h*2**-1 #cm\n",
+ "\n",
+ "#Hemisphere\n",
+ "#m_2=256*pi*rho_1 #gm \n",
+ "y_2=2.5 #cm \n",
+ "\n",
+ "Y_bar=4 #cm\n",
+ "r=4 #cm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#Y_bar=(m_1*y_1+m_2*y_2)*(m_1+m_2)**-1 #cm #Centroid\n",
+ "h=(402.114*25.132**-1)**0.5\n",
+ "\n",
+ "#Result\n",
+ "print\"The value of h is\",round(h,2),\"cm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of h is 4.0 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/sample_notebooks/RohithYeedulapalli/Chapter_7_1.ipynb b/sample_notebooks/RohithYeedulapalli/Chapter_7_1.ipynb new file mode 100755 index 00000000..56cbd13b --- /dev/null +++ b/sample_notebooks/RohithYeedulapalli/Chapter_7_1.ipynb @@ -0,0 +1,236 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 7:LASERS "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 7.1, Page number 7.32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Divergence = 0.5 *10**-3 radian\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#variable declaration\n",
+ "r1 = 2; #in radians\n",
+ "r2 = 3; #in radians\n",
+ "d1 = 4; #Converting from mm to radians\n",
+ "d2 = 6; #Converting from mm to radians\n",
+ "\n",
+ "#calculations\n",
+ "D = (r2-r1)/(d2*10**3-d1*10**3) #Divergence\n",
+ "\n",
+ "#Result\n",
+ "print \"Divergence =\",round(D*10**3,3),\"*10**-3 radian\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 7.2, Page number 7.32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Frequency (V) = 4.32 *10**14 Hz\n",
+ "Relative Population= 1.081 *10**30\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#variable declaration\n",
+ "C=3*10**8 #The speed of light\n",
+ "Lamda=6943 #Wavelength\n",
+ "T=300 #Temperature in Kelvin\n",
+ "h=6.626*10**-34 #Planck constant \n",
+ "k=1.38*10**-23 #Boltzmann's constant\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "V=(C)/(Lamda*10**-10) #Frequency\n",
+ "R=math.exp(h*V/(k*T)) #Relative population\n",
+ "\n",
+ "#Result\n",
+ "print \"Frequency (V) =\",round(V/10**14,2),\"*10**14 Hz\"\n",
+ "print \"Relative Population=\",round(R/10**30,3),\"*10**30\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 7.3, Page number 7.32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " Frequency= 4.74 *10**14 Hz\n",
+ "no.of photons emitted= 7.322 *10**15 photons/sec\n",
+ "Power density = 2.3 kWm**-2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#variable declaration\n",
+ "C=3*10**8 #Velocity of light\n",
+ "W=632.8*10**-9 #wavelength\n",
+ "P=2.3\n",
+ "t=1\n",
+ "h=6.626*10**-34 #Planck constant \n",
+ "S=1*10**-6\n",
+ "\n",
+ "#Calculations\n",
+ "V=C/W #Frequency\n",
+ "n=((P*10**-3)*t)/(h*V) #no.of photons emitted\n",
+ "PD=P*10**-3/S #Power density\n",
+ "\n",
+ "#Result\n",
+ "print \"Frequency=\",round(V/10**14,2),\"*10**14 Hz\"\n",
+ "print \"no.of photons emitted=\",round(n/10**15,3),\"*10**15 photons/sec\"\n",
+ "print \"Power density =\",round(PD/1000,1),\"kWm**-2\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 7.4, Page number 7.33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Wavelenght = 8628.0 Angstrom\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#variable declaration\n",
+ "h=6.626*10**-34 #Planck constant \n",
+ "C=3*10**8 #Velocity of light\n",
+ "E_g=1.44 #bandgap \n",
+ "\n",
+ "#calculations\n",
+ "lamda=(h*C)*10**10/(E_g*1.6*10**-19) #Wavelenght\n",
+ "\n",
+ "#Result\n",
+ "print \"Wavelenght =\",round(lamda),\"Angstrom\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 7.5, Page number 7.33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Band gap = 0.8 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#variable declaration\n",
+ "W=1.55 #wavelength\n",
+ "\n",
+ "#Calculations\n",
+ "E_g=(1.24)/W #Bandgap in eV \n",
+ "\n",
+ "#Result\n",
+ "print \"Band gap =\",E_g,\"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/sample_notebooks/RuchiMittal/chap1.ipynb b/sample_notebooks/RuchiMittal/chap1.ipynb new file mode 100755 index 00000000..c87721c5 --- /dev/null +++ b/sample_notebooks/RuchiMittal/chap1.ipynb @@ -0,0 +1,412 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:0634d7bf5367e0141c25c22bd055ab7dd0d67262eacfb1ab474c7c9ba196985e"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1 Qualities of measurments"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.1 Page no 3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "V=80.0 #expected value of voltage in Volts\n",
+ "V1=79 #Volts\n",
+ "\n",
+ "#Calculation\n",
+ "E=V-V1\n",
+ "E1=((V-V1)/V)*100\n",
+ "E2=1-((V-V1)/V)\n",
+ "A=100*E2\n",
+ "#Result\n",
+ "print\"(i) Absolute error is \",E,\"V\"\n",
+ "print\"(ii) percent error is \", E1,\"%\"\n",
+ "print\"(iii) reletive error is \", E2\n",
+ "print\"(iv) percent of accuracy is \", A,\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Absolute error is 1.0 V\n",
+ "(ii) percent error is 1.25 %\n",
+ "(iii) reletive error is 0.9875\n",
+ "(iv) percent of accuracy is 98.75 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2 Page no 4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "x1=98\n",
+ "x2=101\n",
+ "x3=102\n",
+ "x4=97\n",
+ "x5=101\n",
+ "x6=100\n",
+ "x7=103\n",
+ "x8=98\n",
+ "x9=106\n",
+ "x10=99\n",
+ "\n",
+ "#Calculation\n",
+ "X=(x1+x2+x3+x4+x5+x6+x7+x8+x9+x10)/10.0\n",
+ "P=(x6/X)\n",
+ "\n",
+ "#Result\n",
+ "print\"Precision of the 6th measurment is \",round(P,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Precision of the 6th measurment is 0.995\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.3(a) Page no 7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given\n",
+ "V=80 #milliammeter readings\n",
+ "I=10.0 #mA\n",
+ "V1=150 #Volts\n",
+ "R1=1000 #ohm/volt\n",
+ "\n",
+ "#Calculation\n",
+ "R=V/I\n",
+ "Rv=R1*V1\n",
+ "Rx=(R*V1)/(V1-R)\n",
+ "E=((Rx-R)/Rx)*100\n",
+ "\n",
+ "#Result\n",
+ "print\"(i) Apparent resistance of the unknown resistance \",R,\"K ohm\"\n",
+ "print \"Actual resistance of the unknown resistance is \",round(Rx,2),\"K ohm\"\n",
+ "print \"Error due to the loading effet of the voltmeter \",round(E,1),\"%\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Apparent resistance of the unknown resistance 8.0 K ohm\n",
+ "Actual resistance of the unknown resistance is 8.45 K ohm\n",
+ "Error due to the loading effet of the voltmeter 5.3 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 104
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.3(b) Page no 7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "V=30 #Volts\n",
+ "V1=150 #Volts\n",
+ "I=0.6 #A\n",
+ "R1=1000 #ohm/volts\n",
+ "\n",
+ "#Calculation\n",
+ "R=V/I\n",
+ "Rv=(R1*V1)\n",
+ "Rx=(R*Rv)/(Rv-R)\n",
+ "E=((Rx-R)/Rx)*100\n",
+ "\n",
+ "#Result\n",
+ "print\"(i) total circuit resistance is \", R,\"ohm\"\n",
+ "print \"(ii) The voltmeter resistance is \",round(Rx,2)\n",
+ "print\"(iii) Error due to loading effect of voltmeter \", round(E,3),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) total circuit resistance is 50.0 ohm\n",
+ "(ii) The voltmeter resistance is 50.02\n",
+ "(iii) Error due to loading effect of voltmeter 0.033 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 113
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.4 Page no 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "x1=49.7\n",
+ "x2=50.1\n",
+ "x3=50.2\n",
+ "x4=49.6\n",
+ "x5=49.7\n",
+ "\n",
+ "#Calculation\n",
+ "X=(x1+x2+x3+x4+x5)/5.0\n",
+ "d1=x1-X\n",
+ "d2=x2-X\n",
+ "d3=x3-X\n",
+ "d4=x4-X\n",
+ "d5=x5-X\n",
+ "dtotal=(d1+d2+d3+d4+d5)\n",
+ "\n",
+ "#Result\n",
+ "print\"(i) Arithmetic mean is \", X\n",
+ "print\"(ii) derivations from each value are\"\n",
+ "print \"d1=\",d1,\"\\nd2=\",d2,\"\\nd3=\",d3,\"\\nd4=\",d4,\"\\nd5=\",d5\n",
+ "print\"(iii) The algebric sum of derivative is \",round(dtotal,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Arithmetic mean is 49.86\n",
+ "(ii) derivations from each value are\n",
+ "d1= -0.16 \n",
+ "d2= 0.24 \n",
+ "d3= 0.34 \n",
+ "d4= -0.26 \n",
+ "d5= -0.16\n",
+ "(iii) The algebric sum of derivative is 0.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 77
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.5 Page no 14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "x1=49.7\n",
+ "x2=50.1\n",
+ "x3=50.2\n",
+ "x4=49.6\n",
+ "x5=49.7\n",
+ "\n",
+ "#Calculation\n",
+ "X=(x1+x2+x3+x4+x5)/5.0\n",
+ "d1=x1-X\n",
+ "d2=x2-X\n",
+ "d3=x3-X\n",
+ "d4=x4-X\n",
+ "d5=x5-X\n",
+ "dtotal=(d1+d2+d3+d4+d5)/5.0\n",
+ "\n",
+ "#Result\n",
+ "print\"The average deviation is \",round(dtotal*10**14,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The average deviation is 0.284\n"
+ ]
+ }
+ ],
+ "prompt_number": 86
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.6 Page no 14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "d1= -0.16 \n",
+ "d2= 0.24 \n",
+ "d3= 0.34 \n",
+ "d4= -0.26 \n",
+ "d5= -0.16\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "D=math.sqrt((d1**2+d2**2+d3**2+d4**2+d5**2)/4.0)\n",
+ "print\"The standard deviation is \",round(D,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The standard deviation is 0.27\n"
+ ]
+ }
+ ],
+ "prompt_number": 90
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.7 Page no 15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "V=600 #Volts\n",
+ "V1=250.0 #Volts\n",
+ "a=0.02\n",
+ "\n",
+ "#Calculation\n",
+ "M=a*V\n",
+ "E=(M/V1)*100\n",
+ "\n",
+ "#Result\n",
+ "print\"The limited error is \", E,\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The limited error is 4.8 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 94
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.8 Page no 15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given\n",
+ "V=70.0 #Volts\n",
+ "V1=100 #Volts\n",
+ "I=80.0 #mA\n",
+ "I1=150 #mA\n",
+ "a=0.015\n",
+ "\n",
+ "#calculation\n",
+ "M=a*V1\n",
+ "E=(M/V)*100\n",
+ "E1=a*I1\n",
+ "E2=(E1/I)*100\n",
+ "E3=E+E2\n",
+ "\n",
+ "#Result\n",
+ "print\"limiting error is \",round (E3,3),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "limiting error is 4.955 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 102
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/sample_notebooks/SachinNaik/ch5.ipynb b/sample_notebooks/SachinNaik/ch5.ipynb new file mode 100644 index 00000000..153ee7fb --- /dev/null +++ b/sample_notebooks/SachinNaik/ch5.ipynb @@ -0,0 +1,416 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:98db718d0bf89da2e915ec31624499d68101b659175b122291fbf41d86cde068" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5: Fundamentals of Cellular Communications" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1, Page 130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "ToCH=960.;# Total available channels\n", + "Cellarea=6.; #in km^2\n", + "Covarea=2000.;#in km^2\n", + "N1=4.; # Cluster Size\n", + "N2=7.; #Cluster Size\n", + "\n", + "#Calculations\n", + "Area1=N1*Cellarea;#for N=4\n", + "Area2=N2*Cellarea;#For N=7\n", + "No_of_clusters1=round(Covarea/Area1);\n", + "No_of_clusters2=round(Covarea/Area2);\n", + "No_of_CH1=ToCH/N1; # No of channels with cluster size 4\n", + "No_of_CH2=ToCH/N2; # No of channels with cluster size 7\n", + "SysCap1=No_of_clusters1*ToCH;\n", + "SysCap2=No_of_clusters2*ToCH;\n", + "\n", + "#Results\n", + "print 'System Capacity with cluster size 4 is %d channels'%SysCap1\n", + "print 'Number of clusters for covering total area with N equals 4 are %d'%No_of_clusters1\n", + "print 'System Capacity with cluster size 7 is %d channels'%SysCap2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "System Capacity with cluster size 4 is 79680 channels\n", + "Number of clusters for covering total area with N equals 4 are 83\n", + "System Capacity with cluster size 7 is 46080 channels\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2, Page 132" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "S_IAMP=18.;# S/I ratio in dB\n", + "S_IGSM=12.;# S/I ratio in dB\n", + "PPL=4.; # propogation path loss coefficient\n", + "\n", + "#Calculations\n", + "# Using Equation 5.16 on page no 132, we get\n", + "N_AMP=(1./3)*((6*10**(0.1*S_IAMP))**(2/PPL));#reuse factor for AMPS\n", + " \n", + "N_GSM=(1./3)*((6*10**(0.1*S_IGSM))**(2/PPL));#reuse factor for GSM\n", + "\n", + "\n", + "#Result\n", + "print 'Reuse Factor for AMP system is N = %.3f = approx %d \\n'%(N_AMP,N_AMP+1);\n", + "print 'Reuse Factor for GSM system is N = %.3f = approx %d \\n'%(N_GSM,N_GSM+1);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reuse Factor for AMP system is N = 6.486 = approx 7 \n", + "\n", + "Reuse Factor for GSM system is N = 3.251 = approx 4 \n", + "\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3, Page 132" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "VCH=395.;#Total voice channels\n", + "CallHT=120.;#average call holding time in sec\n", + "Blocking=0.02;# 2%\n", + "PPL=4.; #propogation path loss coefficient\n", + "N1=4. #reuse factor\n", + "N2=7.; #reuse factor\n", + "N3=12.; #reuse factor\n", + "\n", + "#Calculations&Results\n", + "No_of_VCH1=VCH/N1; #for reuse factor N1\n", + "No_of_VCH2=VCH/N2; #for reuse factor N2\n", + "No_of_VCH3=VCH/N3; #for reuse factor N3\n", + "print 'NO of voice channels for N=4 are %d'%(round(No_of_VCH1));\n", + "print 'NO of voice channels for N=7 are %d'%(round(No_of_VCH2));\n", + "print 'NO of voice channels for N=12 are %d\\n'%(round(No_of_VCH3));\n", + "TrafLoad1=87.004;\n", + "Carryload1=(1-Blocking)*TrafLoad1;\n", + "TrafLoad2=45.877;\n", + "Carryload2=(1-Blocking)*TrafLoad2;\n", + "TrafLoad3=24.629;\n", + "Carryload3=(1-Blocking)*TrafLoad3;\n", + "# To find cell capacity\n", + "Ncall1=Carryload1*3600/CallHT;#Calls per hour per cell \n", + "Ncall2=Carryload2*3600/CallHT;\n", + "Ncall3=Carryload3*3600/CallHT;\n", + "print 'calls per hour per cell for N=4 are %d'%(round(Ncall1));\n", + "print 'calls per hour per cell for N=7 are %d'%(round(Ncall2));\n", + "print 'calls per hour per cell for N=12 are %d \\n'%(Ncall3);\n", + "# To find S BY I\n", + "# N=(1/3)[6*(S/I)]**(2/PPL)\n", + "S_I1=10*(PPL/2)*(math.log10(N1)-math.log10(1./3)-(2./PPL)*math.log10(6));#Mean S/I (dB)\n", + "\n", + "S_I2=10*(PPL/2)*(math.log10(N2)-math.log10(1./3)-(2./PPL)*math.log10(6));\n", + "S_I3=10*(PPL/2)*(math.log10(N3)-math.log10(1./3)-(2./PPL)*math.log10(6));\n", + "\n", + "print 'Mean S/I(dB) for N=4 is %.1f'%S_I1\n", + "print 'Mean S/I(dB) for N=7 is %.1f'%S_I2\n", + "print 'Mean S/I(dB) for N=12 is %.1f'%S_I3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "NO of voice channels for N=4 are 99\n", + "NO of voice channels for N=7 are 56\n", + "NO of voice channels for N=12 are 33\n", + "\n", + "calls per hour per cell for N=4 are 2558\n", + "calls per hour per cell for N=7 are 1349\n", + "calls per hour per cell for N=12 are 724 \n", + "\n", + "Mean S/I(dB) for N=4 is 13.8\n", + "Mean S/I(dB) for N=7 is 18.7\n", + "Mean S/I(dB) for N=12 is 23.3\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4, Page 154" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "spectrum=12.5*10**6; #in Hz\n", + "CHBW=200*10**3;#in Hz\n", + "N=4.;#reuse factor\n", + "Blocking=0.02; # 2%\n", + "callHT=120.;#average call holding time in sec\n", + "PPL=4.;#propogation path loss coefficient\n", + "CntrlCH=3.; #No of control channels\n", + "Ts=8.; # No of voice channels per RF channel\n", + "\n", + "#Calculations&Results\n", + "No_ofVCH=((spectrum*Ts)/(CHBW*N))-CntrlCH;\n", + "print 'No of voice channels for N=4 are %d'%(No_ofVCH)\n", + "TrafLoad=110.;\n", + "CarryLoad=(1-Blocking)*TrafLoad;\n", + "Ncall=CarryLoad*3600/callHT;\n", + "print 'Calls per hour per cell for N=4 are %d calls/hour/cell \\n '%(round(Ncall));\n", + "S_I=10*(PPL/2)*(math.log10(N)-math.log10(1./3)-(2./PPL)*math.log10(6));\n", + "print 'Mean S/I(dB) for N=4 is %.1f dB \\n '%(S_I)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No of voice channels for N=4 are 122\n", + "Calls per hour per cell for N=4 are 3234 calls/hour/cell \n", + " \n", + "Mean S/I(dB) for N=4 is 13.8 dB \n", + " \n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5, Page 139" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "VCH=395.;#Total allocated voice channels\n", + "CHBW=30.; # in kHz\n", + "Spectrum=12.5; # in MHz\n", + "CallHT=120.; #Average call holding time in sec\n", + "Blocking=0.02; # 2%\n", + "PL=40.; #slope of path loss in dBperdecade\n", + "\n", + "#Calculations&Results\n", + "print \"We consider only the \ufb01rst tier interferers and neglect the effects of cochannel interference from the second and other higher tiers.\"\n", + "#FOR 120degree sectorization\n", + "#N=4\n", + "VCH11=(VCH/(4*3));\n", + "OffLoad11=24.629; # Offered traf\ufb01c load per sector from Erlang-B table(Appendix A)\n", + "Load_site11=3*OffLoad11;\n", + "CarLoad11=(1-Blocking)*Load_site11;\n", + "Calls_hr_site11=CarLoad11*3600/CallHT;\n", + "R11=math.sqrt(CarLoad11/0.52);\n", + "Seff11=CarLoad11/(2.6*Spectrum*R11**2);\n", + "S_I11=PL*math.log10(math.sqrt(3*4))-10*math.log10(2);\n", + "#N=7\n", + "VCH12=(VCH/(3*7));\n", + "OffLoad12=12.341; # Offered traf\ufb01c load per sector from Erlang-B table(Appendix A)\n", + "Load_site12=3*OffLoad12;\n", + "CarLoad12=(1-Blocking)*Load_site12;\n", + "Calls_hr_site12=CarLoad12*3600/CallHT;\n", + "R12=math.sqrt(CarLoad12/0.52);\n", + "Seff12=CarLoad12/(2.6*Spectrum*R12**2);\n", + "S_I12=PL*math.log10(math.sqrt(3*7))-10*math.log10(2);\n", + "#N=12\n", + "VCH13=VCH/(3*12);\n", + "OffLoad13=5.842; # Offered traf\ufb01c load per sector from Erlang-B table(Appendix A)\n", + "Load_site13=3*OffLoad13;\n", + "CarLoad13=(1-Blocking)*Load_site13;\n", + "Calls_hr_site13=CarLoad13*3600/CallHT;\n", + "R13=math.sqrt(CarLoad13/0.52);\n", + "Seff13=CarLoad13/(2.6*Spectrum*R13**2);\n", + "S_I13=PL*math.log10(math.sqrt(3*12))-10*math.log10(2);\n", + "#For omnidirectional \n", + "#N=4\n", + "VCH21=VCH/(4);\n", + "OffLoad21=87.004; # Offered traf\ufb01c load per sector from Erlang-B table(Appendix A)\n", + "Load_site21=OffLoad21;\n", + "CarLoad21=(1-Blocking)*Load_site21;\n", + "Calls_hr_site21=CarLoad21*3600/CallHT;\n", + "R21=math.sqrt(CarLoad21/0.52);\n", + "Seff21=CarLoad21/(2.6*Spectrum*R21**2);\n", + "S_I21=PL*math.log10(math.sqrt(3*4))-10*math.log10(6);\n", + "#N=7\n", + "VCH22=VCH/(7);\n", + "OffLoad22=46.817; # Offered traf\ufb01c load per sector from Erlang-B table(Appendix A)\n", + "Load_site22=OffLoad22;\n", + "CarLoad22=(1-Blocking)*Load_site22;\n", + "Calls_hr_site22=CarLoad22*3600/CallHT;\n", + "R22=math.sqrt(CarLoad22/0.52);\n", + "Seff22=CarLoad22/(2.6*Spectrum*R22**2);\n", + "S_I22=PL*math.log10(math.sqrt(3*7))-10*math.log10(6);\n", + "#N=12\n", + "VCH23=VCH/(12);\n", + "OffLoad23=24.629; # Offered traf\ufb01c load per sector from Erlang-B table(Appendix A)\n", + "Load_site23=OffLoad23;\n", + "CarLoad23=(1-Blocking)*Load_site23;\n", + "Calls_hr_site23=CarLoad23*3600/CallHT;\n", + "R23=math.sqrt(CarLoad23/0.52);\n", + "Seff23=CarLoad23/(2.6*Spectrum*R23**2);\n", + "S_I23=PL*math.log10(math.sqrt(3*12))-10*math.log10(6);\n", + "# For 60degree Sectorization\n", + "#N=3\n", + "VCH31=VCH/(6*3);\n", + "OffLoad31=14.902; # Offered traf\ufb01c load per sector from Erlang-B table(Appendix A)\n", + "Load_site31=6*OffLoad31;\n", + "CarLoad31=(1-Blocking)*Load_site31;\n", + "Calls_hr_site31=CarLoad31*3600/CallHT;\n", + "R31=math.sqrt(CarLoad31/0.52);\n", + "Seff31=CarLoad31/(2.6*Spectrum*R31**2);\n", + "S_I31=PL*math.log10(math.sqrt(3*3))-10*math.log10(1);\n", + "#N=4\n", + "VCH32=VCH/(6*4);\n", + "OffLoad32=10.656; # Offered traf\ufb01c load per sector from Erlang-B table(Appendix A)\n", + "Load_site32=6*OffLoad32;\n", + "CarLoad32=(1-Blocking)*Load_site32;\n", + "Calls_hr_site32=CarLoad32*3600/CallHT;\n", + "R32=math.sqrt(CarLoad32/0.52);\n", + "Seff32=CarLoad32/(2.6*Spectrum*R32**2);\n", + "S_I32=PL*math.log10(math.sqrt(3*4))-10*math.log10(1);\n", + "#N=7\n", + "VCH33=VCH/(6*7);\n", + "OffLoad33=5.084; # Offered traf\ufb01c load per sector from Erlang-B table(Appendix A)\n", + "Load_site33=6*OffLoad33;\n", + "CarLoad33=(1-Blocking)*Load_site33;\n", + "Calls_hr_site33=CarLoad33*3600/CallHT;\n", + "R33=math.sqrt(CarLoad33/0.52);\n", + "Seff33=CarLoad33/(2.6*Spectrum*R33**2);\n", + "S_I33=PL*math.log10(math.sqrt(3*7))-10*math.log10(1);\n", + "#N=12\n", + "VCH34=VCH/(6*12);\n", + "OffLoad34=2.227; # Offered traf\ufb01c load per sector from Erlang-B table(Appendix A)\n", + "Load_site34=6*OffLoad34;\n", + "CarLoad34=(1-Blocking)*Load_site34;\n", + "Calls_hr_site34=CarLoad34*3600/CallHT;\n", + "R34=math.sqrt(CarLoad34/0.52);\n", + "Seff34=CarLoad34/(2.6*Spectrum*R34**2);\n", + "S_I34=PL*math.log10(math.sqrt(3.*12))-10*math.log10(1);\n", + "\n", + "print 'For Omnidirectional Calls_per_hour_per_cellsite Mean S_I ratio SpecrtalEfficiency'\n", + "print 'For N=4 %d %.1f %.3f\\n'%(Calls_hr_site21,S_I21,Seff21);\n", + "print 'For N=7 %d %.1f %.3f\\n'%(Calls_hr_site22,S_I22,Seff22);\n", + "print 'For N=12 %d %.1f %.3f\\n'%(Calls_hr_site23,S_I23,Seff23);\n", + "\n", + "print 'For 120deg sector Calls_per_hour_per_cellsite Mean S_I ratio SpecrtalEfficiency\\n'\n", + "print 'For N=4 %d %.1f %.3f\\n'%(Calls_hr_site11,S_I11,Seff11);\n", + "print 'For N=7 %d %.1f %.3f\\n'%(Calls_hr_site12,S_I12,Seff12);\n", + "print 'For N=12 %d %.1f %.3f\\n'%(Calls_hr_site13,S_I13,Seff13);\n", + "\n", + "print 'For 60 deg Sector Calls_per_hour_per_cellsite Mean S_I ratio SpecrtalEfficiency\\n'\n", + "print 'For N=3 %d %.1f %.3f\\n'%(Calls_hr_site31,S_I31,Seff31);\n", + "print 'For N=4 %d %.1f %.3f\\n'%(Calls_hr_site32,S_I32,Seff32);\n", + "print 'For N=7 %d %.1f %.3f\\n'%(Calls_hr_site33,S_I33,Seff33);\n", + "print 'For N=12 %d %.1f %.3f\\n'%(Calls_hr_site34,S_I34,Seff34);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "We consider only the \ufb01rst tier interferers and neglect the effects of cochannel interference from the second and other higher tiers.\n", + "For Omnidirectional Calls_per_hour_per_cellsite Mean S_I ratio SpecrtalEfficiency\n", + "For N=4 2557 13.8 0.016\n", + "\n", + "For N=7 1376 18.7 0.016\n", + "\n", + "For N=12 724 23.3 0.016\n", + "\n", + "For 120deg sector Calls_per_hour_per_cellsite Mean S_I ratio SpecrtalEfficiency\n", + "\n", + "For N=4 2172 18.6 0.016\n", + "\n", + "For N=7 1088 23.4 0.016\n", + "\n", + "For N=12 515 28.1 0.016\n", + "\n", + "For 60 deg Sector Calls_per_hour_per_cellsite Mean S_I ratio SpecrtalEfficiency\n", + "\n", + "For N=3 2628 19.1 0.016\n", + "\n", + "For N=4 1879 21.6 0.016\n", + "\n", + "For N=7 896 26.4 0.016\n", + "\n", + "For N=12 392 31.1 0.016\n", + "\n" + ] + } + ], + "prompt_number": 22 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/Sadananda CharyArroju/Chapter1.ipynb b/sample_notebooks/Sadananda CharyArroju/Chapter1.ipynb new file mode 100755 index 00000000..55497994 --- /dev/null +++ b/sample_notebooks/Sadananda CharyArroju/Chapter1.ipynb @@ -0,0 +1,412 @@ +{
+ "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": 15,
+ "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": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "compressibility is -25.1095 *10**14\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\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 1.3, Page number 10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "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": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "binding energy is 665.0 *10**3 kJ/kmol\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\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 1.5, Page number 11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 36,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "density of CsClis 4.389 *10**3 kg/m**3\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\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 1.6, Page number 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 37,
+ "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": 42,
+ "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": 43,
+ "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": 44,
+ "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/sample_notebooks/Sadananda CharyArroju/Chapter10.ipynb b/sample_notebooks/Sadananda CharyArroju/Chapter10.ipynb new file mode 100755 index 00000000..bd43d700 --- /dev/null +++ b/sample_notebooks/Sadananda CharyArroju/Chapter10.ipynb @@ -0,0 +1,431 @@ +{
+ "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": 3,
+ "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": 5,
+ "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": 7,
+ "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": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "critical current is 251.3 amp\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\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 10.5, Page number 225"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "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": 19,
+ "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 given in the book is wrong\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 given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 10.7, Page number 226"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "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": 31,
+ "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": 32,
+ "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": 34,
+ "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/sample_notebooks/Sadananda CharyArroju/Chapter1_1.ipynb b/sample_notebooks/Sadananda CharyArroju/Chapter1_1.ipynb new file mode 100755 index 00000000..55497994 --- /dev/null +++ b/sample_notebooks/Sadananda CharyArroju/Chapter1_1.ipynb @@ -0,0 +1,412 @@ +{
+ "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": 15,
+ "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": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "compressibility is -25.1095 *10**14\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\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 1.3, Page number 10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "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": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "binding energy is 665.0 *10**3 kJ/kmol\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\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 1.5, Page number 11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 36,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "density of CsClis 4.389 *10**3 kg/m**3\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\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 1.6, Page number 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 37,
+ "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": 42,
+ "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": 43,
+ "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": 44,
+ "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/sample_notebooks/SaiRakesh/Untitled.ipynb b/sample_notebooks/SaiRakesh/Untitled.ipynb new file mode 100755 index 00000000..a688f606 --- /dev/null +++ b/sample_notebooks/SaiRakesh/Untitled.ipynb @@ -0,0 +1,1802 @@ +{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#ENGINEERING THERMODYNAMICS"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##chapter 1:Fundemental concepts and definitions"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "###example 1.1"
+ ]
+ },
+ {
+ "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 2:"
+ ]
+ },
+ {
+ "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:"
+ ]
+ },
+ {
+ "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:"
+ ]
+ },
+ {
+ "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:"
+ ]
+ },
+ {
+ "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:"
+ ]
+ },
+ {
+ "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:"
+ ]
+ },
+ {
+ "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:"
+ ]
+ },
+ {
+ "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:"
+ ]
+ },
+ {
+ "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:"
+ ]
+ },
+ {
+ "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:"
+ ]
+ },
+ {
+ "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:"
+ ]
+ },
+ {
+ "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:"
+ ]
+ },
+ {
+ "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:"
+ ]
+ },
+ {
+ "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:"
+ ]
+ },
+ {
+ "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"
+ ]
+ },
+ {
+ "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:"
+ ]
+ },
+ {
+ "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:"
+ ]
+ },
+ {
+ "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:"
+ ]
+ },
+ {
+ "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:"
+ ]
+ },
+ {
+ "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:"
+ ]
+ },
+ {
+ "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:"
+ ]
+ },
+ {
+ "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:"
+ ]
+ },
+ {
+ "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:"
+ ]
+ },
+ {
+ "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:"
+ ]
+ },
+ {
+ "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:"
+ ]
+ },
+ {
+ "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"
+ ]
+ },
+ {
+ "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:"
+ ]
+ },
+ {
+ "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"
+ ]
+ },
+ {
+ "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/sample_notebooks/SaiRakesh/chapter_1.ipynb b/sample_notebooks/SaiRakesh/chapter_1.ipynb new file mode 100755 index 00000000..9474d100 --- /dev/null +++ b/sample_notebooks/SaiRakesh/chapter_1.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/sample_notebooks/SakshiGoplani/Sample.ipynb b/sample_notebooks/SakshiGoplani/Sample.ipynb new file mode 100755 index 00000000..108f20cf --- /dev/null +++ b/sample_notebooks/SakshiGoplani/Sample.ipynb @@ -0,0 +1,662 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:b8d3bc6c59d0efdfca4aa426416ba1f24e3078d69f0411d3e3ed7b293bd81c78" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "ELEMENTS OF MECHANICAL ENGINEERING by R.K. RAJPUT" + ] + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER NUMBER 2 : FUELS AND COMBUSTION" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.1" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " #DATA GIVEN\n", + "c=88; #% of carbon in coal\n", + "h=4.2; #% of hydrogen in coal\n", + "Wf=0.848; #weight of coal in g\n", + "Wfw=0.027; #weight of fuse wire in calorimeter in g\n", + "W=1950; #weight of water in calorimeter in g\n", + "We=380; #water equivalent of calorimeter\n", + "Dt=3.06; #observed temperature rise (t2-t1) in deg celsius\n", + "tc=0.017; #cooling correction in deg celsius\n", + "cfw=6700; #calorific value of fuse wire in J/g\n", + "\n", + " #CALCULATIONS\n", + "ctr=(Dt)+tc; #corrected temp. rise\n", + "Hw=(W+We)*4.18*(ctr); #heat recieved by water in J\n", + "Hfw=Wfw*cfw; #heat given out by fuse wire in J\n", + "Hcf=Hw-Hfw; #heat produced due to combustion of fuel in J\n", + "HCV=Hcf/Wf; #higher calorific value of fuel in kJ/kg\n", + "Ms=9*h/100; #steam produced per kg of coal\n", + "LCV=HCV-2465*Ms; #lower calorific value of fuel in kJ/kg\n", + "\n", + "print \"The Higher calorific value of fuel, H.C.V. is: \",round(HCV,4),\" kJ/kg.\"\n", + "print \"The Lower calorific value of fuel, L.C.V. is: \",round(LCV,4),\" kJ/kg.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Higher calorific value of fuel, H.C.V. is: 35126.455 kJ/kg.\n", + "The Lower calorific value of fuel, L.C.V. is: 34194.685 kJ/kg.\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 2.2" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " \n", + " #DATA GIVEN\n", + "V1=0.08; #gas burnt in calorimeter in m^3\n", + "Pg=5.2; #pressure of gas supply in cm of water\n", + "Pb=75.5; #barometer reading in cm of Hg\n", + "Ww=28; #weight of water heated by gas in kg\n", + "Tg=13; #temperature of gas in deg celsius\n", + "Twi=10; #temperature of water at inlet in deg celsius\n", + "Two=23.5; #temperature of water at outlet in deg celsius\n", + "Ms=0.06; #steam condensed in kg\n", + "\n", + " #CALCULATIONS\n", + " #by using general gas equation, reducing the volume to S.T.P.\n", + " #p1*V1/T1=p2*V2/T2\n", + "p1=Pb+(Pg/13.6); #in cm of Hg\n", + "T1=Tg+273; #in K\n", + "p2=76; #in cm of Hg\n", + "T2=15+273; #in K\n", + "V2=p1*V1*T2/T1/p2; #in m^3\n", + "Hw=Ww*4.18*(Two-Twi); #heat recieved by water in kJ\n", + "HCV=Hw/V1; #higher calorific value of fuel in kJ/m^3\n", + "LCV=HCV-2465*Ms/V1; #lower calorific value of fuel in kJ/m^3\n", + "\n", + "print \" The Calorific values of fuel per m^3 of gas at 15 deg celsius and 76 cm of Hg pressure are:\"\n", + "print \" The Higher calorific value of fuel, H.C.V. is: \",HCV,\" kJ/m^3.\"\n", + "print \" The Lower calorific value of fuel, L.C.V. is: \",LCV,\" kJ/m^3.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Calorific values of fuel per m^3 of gas at 15 deg celsius and 76 cm of Hg pressure are:\n", + " The Higher calorific value of fuel, H.C.V. is: 19750.5 kJ/m^3.\n", + " The Lower calorific value of fuel, L.C.V. is: 17901.75 kJ/m^3.\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "CHAPTER NUMBER 3 : PROPERTIES OF GASES" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.1" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " \n", + " #DATA GIVEN\n", + "Q=-50; #heat rejected to cooling water in kJ/kg\n", + "W=-100; #work input in kJ/kg\n", + "\n", + " #using First Law of Thermodynamics, Q=(u2-u1)+W\n", + "Du=Q-W; #(u2-u1) change in internal energy in kJ/kg\n", + " #since Du is +ve, there is gain in internal energy\n", + "\n", + "print \"The GAIN in internal energy is: \",Du,\" kJ/kg.\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The GAIN in internal energy is: 50 kJ/kg.\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.2" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " \n", + " #DATA GIVEN\n", + "u1=450; #internal energy at beginning of the expansion in kJ/kg\n", + "u2=220; #internal energy after expansion in kJ/kg\n", + "W=120; #work done by the air during expansion in kJ/kg\n", + "\n", + " #using First Law of Thermodynamics, Q=(u2-u1)+W\n", + "Q=(u2-u1)+W; #heat flow in kJ/kg\n", + " #since Q is -ve, there is rejection of heat\n", + "\n", + "print \"The heat REJECTED by air is: \",(-Q),\" kJ/kg.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat REJECTED by air is: 110 kJ/kg.\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.3" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " \n", + " #DATA GIVEN\n", + "m=0.3; #mass of nitrogen in kg\n", + "p1=0.1; #pressure in MPa\n", + "T1=40+273; #temperature before compression in K\n", + "p2=1; #pressure in MPa\n", + "T2=160+273; #temperature after compression in K\n", + "W=-30; #work done during the compression in kJ/kg\n", + "Cv=0.75 #in kJ/kgK\n", + "\n", + " #using First Law of Thermodynamics, Q=(u2-u1)+W\n", + " #(u2-u1)=m*Cv*(T2-T1)\n", + "Du=m*Cv*(T2-T1);\n", + "Q=Du+W; #heat flow in kJ/kg\n", + " #since Q is -ve, there is rejection of heat\n", + "\n", + "print \"The heat REJECTED by air is: \",(-Q),\" kJ. \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The heat REJECTED by air is: 3.0 kJ. \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER 3.4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " \n", + " #DATA GIVEN\n", + " #initial state\n", + "p1=0.105; #pressure of gas in MPa\n", + "V1=0.4; #volume of gas in m^3\n", + " #final state\n", + "p2=0.105; #pressure of gas in MPa\n", + "V2=0.20; #volume of gas in m^3\n", + "\n", + "Q=-42.5; #heat transferred in kJ\n", + "p=p1;\n", + "\n", + " #process used- ISOBARIC (Constant pressure)\n", + "W12=p*(V2-V1)*1000; #work in kJ\n", + " #using First Law of Thermodynamics, Q=(u2-u1)+W\n", + "Du=Q-W12; #(u2-u1) change in internal energy in kJ\n", + " #since Du is -ve, there is decrease in internal energy\n", + "\n", + "print \"The DECREASE in internal energy is: \",(-Du),\" kJ.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The DECREASE in internal energy is: 21.5 kJ.\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER: 3.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " \n", + " #DATA GIVEN\n", + " #part-1\n", + " #pressure=p1,temperature=T1\n", + " #part-2\n", + " #pressure=p2,temperature=T2\n", + "\n", + " #Acc. First Law of Thermodynamics, Q=(u2-u1)+W\n", + " #when partition moved\n", + "DQ=0;\n", + "DW=0;\n", + "DU=DQ-DW;\n", + " #DU=0\n", + "\n", + "print \" CONCLUSION: \"\n", + "print \" Acc. to First Law of Thermodynamics, \"\n", + "print \" When partion moved, there is conservation of internal energy. \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " CONCLUSION: \n", + " Acc. to First Law of Thermodynamics, \n", + " When partion moved, there is conservation of internal energy. \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER: 3.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " \n", + " #DATA GIVEN\n", + " #initial state\n", + "p1=10**5; #initial pressure of air in Pa\n", + "v1=1.8; #volume of air in m^3/kg\n", + "T1=25+273; #initial temperature of air in K\n", + " #final state\n", + "p2=5*10**5; #final pressure of air in Pa\n", + "T2=25+273; #final temperature of air in K\n", + "\n", + " #process used- ISOTHERMAL (Constant temperature)\n", + "W12=(p1*v1*float(math.log(float(p1)/float(p2))/1000)); #work in kJ/kg\n", + " #since W is -ve, work is supplied to the air\n", + "\n", + " #since temperature is constant\n", + "Du=0; #(u2-u1) change in internal energy in kJ/kg\n", + "\n", + " #using First Law of Thermodynamics, Q=(u2-u1)+W\n", + "Q=Du+W12;\n", + " #since Q is -ve, there is rejection of heat from system to surroundings\n", + "\n", + "print \" (i) The Work done on the air is: \",round(-W12,4),\" kJ/kg. \"\n", + "print \" (ii) The change in internal energy is: \",(Du),\" kJ/kg. \"\n", + "print \" (iii) The Heat REJECTED is: \",round(-Q,4),\" kJ/kg. \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " (i) The Work done on the air is: 289.6988 kJ/kg. \n", + " (ii) The change in internal energy is: 0 kJ/kg. \n", + " (iii) The Heat REJECTED is: 289.6988 kJ/kg. \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER: 3.8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " \n", + " #DATA GIVEN\n", + "p1=4*10**5; #initial pressure in N/m^2\n", + "V1=0.2; #initial volume in m^3\n", + "T1=130+273; #initial temperature in K\n", + "p2=1.02*10**5; #final pressure after adiabatic expansion in N/m^2\n", + "Q23=72.5; #increase in enthalpy during constant pressure process in kJ\n", + "Cp=1; #in kJ/kgK\n", + "Cv=0.714; #in kJ/khK\n", + "\n", + " #gamma for air, g\n", + "g=Cp/Cv;\n", + "R=(Cp-Cv)*1000;\n", + "\n", + " #for reversible adiabatic process 1-2\n", + " #p1*(V1**g)=p2*(V2**g)\n", + "V2=V1*(p1/p2)**(1/g); #final volume in m^3\n", + " #(T2/T1)=(p2/p1)**((g-1)/g);\n", + "T2=T1*(p2/p1)**((g-1)/g); #final temp. T2 in K\n", + "\n", + "m=p1*V1/R/T1; #mass in kg\n", + "\n", + " #for constant pressure process 2-3\n", + " #Q23=m*Cp*(T3-T2);\n", + "T3=Q23/m/Cp+T2;\n", + " #V2/T2=V3/T3\n", + "V3=V2/T2*T3;\n", + "\n", + " #Work done by the path 1-2-3, W123=W12+W23\n", + "W12=(p1*V1-p2*V2)/(g-1);\n", + "W23=p2*(V3-V2);\n", + "W123=W12+W23;\n", + "\n", + " #if the above processes are replaced by a single reversible polytropic process giving the same work between initial and final states,\n", + " #W13=W123=(p1V1-p3V3)/(n-1)\n", + "p3=p2;\n", + "n=1+(p1*V1-p3*V3)/W123; #index of expansion, n\n", + "\n", + "print \" (i) The Total Work done is: \",round(W123,4),\" Nm or J.\"\n", + "print \" (ii) The value of index of expansion, n is: \",round(n,4),\".\"\n", + "\n", + " #NOTE:\n", + " #there is slight variation in answers of the book due to rounding off of the values " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " (i) The Total Work done is: 85343.6734 Nm or J.\n", + " (ii) The value of index of expansion, n is: 1.0603 .\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER: 3.10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " \n", + " #DATA GIVEN\n", + " #initial state\n", + "p1=10**5; #initial pressure of gas in Pa\n", + "V1=0.45; #initial volume of gas in m^3\n", + "T1=80+273; #initial temperature of gas in K\n", + " #final state\n", + "p2=5*10**5; #final pressure of gas in Pa\n", + "V2=0.13; #final volume of gas in m^3\n", + "\n", + " #gamma for air, g\n", + "g=1.4;\n", + "R=294.2 #J/kgK\n", + "\n", + "m=p1*V1/R/T1; #mass in kg\n", + "\n", + " #p1*(V1^n)=p2*(V2^n)\n", + "n=math.log(p2/p1)/math.log(V2/V1); #index n\n", + "\n", + " #In a polytropic process\n", + " #(T2/T1)=(V1/V2)^(n-1);\n", + "T2=T1*(V1/V2)**(n-1); #temp. T2 in K\n", + "\n", + "Cv=R/(g-1);\n", + "Du=m*Cv*(T2-T1)/1000; #increase in internal energy in kJ\n", + "\n", + " #using First Law of Thermodynamics, Q=(u2-u1)+W\n", + " #W12=(p1*V1-p2*V2)/(n-1)=mR(T2-T1)/(n-1)\n", + "W12=m*R*(T1-T2)/(n-1)/1000;\n", + "Q=Du+W12;\n", + " #since Q is -ve, there is rejection of heat from system to surroundings\n", + "\n", + "print \" (i) The Mass of the gas is: \",round(m,4),\" kg.\"\n", + "print \" (ii) The index n is: \",round(n,4),\".\"\n", + "print \"(iii) The change in internal energy is: \",(Du),\" kJ.\"\n", + "print \" (iv) The Heat REJECTED is: \",round(-Q,4),\"kJ.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " (i) The Mass of the gas is: 0.4333 kg.\n", + " (ii) The index n is: -1.2961 .\n", + "(iii) The change in internal energy is: -106.0 kJ.\n", + " (iv) The Heat REJECTED is: 124.4657 kJ.\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER: 3.11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " \n", + " #DATA GIVEN\n", + " #initial state\n", + "p1=1.02; #initial pressure of air in bar\n", + "V1=0.015; #initial volume of air in m^3\n", + "T1=22+273; #initial temperature of air in K\n", + " #final state\n", + "p2=6.8; #final pressure of air in bar\n", + " #Law of adiabatic compression, pV^g=C\n", + "\n", + " #gamma for air, g\n", + "g=1.4\n", + "R=0.287;\n", + "\n", + " #In a adiabatic process\n", + " #(T2/T1)=(p2/p1)**((g-1)/g);\n", + "T2=T1*(p2/p1)**((g-1)/g); #final temp. T2 in K\n", + "\n", + " #p1*(V1**g)=p2*(V2**g)\n", + "V2=V1*(p1/p2)**(1/g); #final volume in m^3\n", + "\n", + "m=p1*10**5*V1/10**3/R/T1; #mass in kg\n", + "\n", + " #W=(p1*V1-p2*V2)/(g-1)=mR(T2-T1)/(g-1)\n", + "W=m*R*(T1-T2)/(g-1);\n", + " #since W is -ve, the work is done on the air\n", + "\n", + "print \" (i) The Final temperature is: \",(T2-273),\" deg. celsius.\"\n", + "print \" (ii) The Final Volume is: \",V2,\" m**3. \"\n", + "print \"(iii) The Work done on the air is: \",(-W),\" kJ.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " (i) The Final temperature is: 234.252870551 deg. celsius.\n", + " (ii) The Final Volume is: 0.00386887782624 m**3. \n", + "(iii) The Work done on the air is: 2.7520923046 kJ.\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "EXAMPLE NUMBER: 3.13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + " \n", + " #DATA GIVEN\n", + "m=1; #mass of etahne gas in kg\n", + "M=30; #molecular weight of ethane\n", + "p1=1.1; #initial pressure in bar\n", + "T1=27+273; #initial temperature in K\n", + "p2=6.6; #final pressure in bar\n", + "Cp=1.75; #in kJ/kgK\n", + "\n", + " #Law of compression, pV**1.3=C\n", + "n=1.3;\n", + "\n", + " #Characteristic gas constant, R = Universal gas constant (Ro)/Molecular weight(M)\n", + "Ro=8314;\n", + "R=Ro/(M); #kJ/kgK\n", + "R1 = float(R)/1000;\n", + " #R=Cp-Cv\n", + "Cv=Cp-float(R1);\n", + "g=Cp/Cv; #gamma g\n", + "\n", + " #In a polytropic process\n", + " #(T2/T1)=(p2/p1)**((n-1)/n);\n", + "T2=T1*(p2/p1)**((n-1)/n); #final temp. T2 in K\n", + "\n", + " #W=(p1*V1-p2*V2)/(n-1)=mR(T2-T1)/(g-1)\n", + "W=m*R*(T1-T2)/(n-1);\n", + "\n", + "Q=(g-n)*W/(g-1); #heat flow in kJ/kg\n", + "\n", + "print \" The Heat SUPPLIED is: \",float(Q),\" kJ/kg.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The Heat SUPPLIED is: 84441.1861346 kJ/kg.\n" + ] + } + ], + "prompt_number": 102 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/SandeshNaik/ch8.ipynb b/sample_notebooks/SandeshNaik/ch8.ipynb new file mode 100755 index 00000000..ffd91f68 --- /dev/null +++ b/sample_notebooks/SandeshNaik/ch8.ipynb @@ -0,0 +1,237 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:983adfa64951b4c71938be02f10b2d0d40d82e513916f6ced5042486c6dc7d21" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8: Particle Physics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5.1, Page 360" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "# Proton and antiproton annihilate to produced three pions\n", + "E_p = 938; # Energy of proton, MeV\n", + "E_pi = 139.5; # Energy of pions, MeV\n", + "E_pi_0 = 134.9; # Energy of pi_0_ion, MeV\n", + "\n", + "#Calculations\n", + "E_KE = (2*E_p-(2*E_pi+E_pi_0))/3; # The average kinetic energy of each pions, MeV\n", + "\n", + "#Result\n", + "print \"The average kinetic energy of each pions : %5.1f MeV\"%E_KE\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average kinetic energy of each pions : 487.4 MeV\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5.2, Page 360" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "# Here r_1 and r_2 are two decay rates are given\n", + "# Declare the cell\n", + "R1 = [[0,0],[0,0]]\n", + "R1[0][0] = 'r_1'\n", + "R1[0][1] = 'r_2'\n", + "\n", + "#Calculations&Results\n", + "print \"The inherent uncertainity in mass of particle = h(%s + %s) \"%(R1[0][0], R1[0][1]) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The inherent uncertainity in mass of particle = h(r_1 + r_2) \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.7.3, Page 362" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "# Declare cell for the given reaction\n", + "R1 = [[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0]]\n", + "# Enter data for the cell\n", + "R1[0][0] = 'p'\n", + "R1[0][1] = 1 \n", + "R1[0][2] = 1\n", + "R1[0][3] = 0\n", + "R1[0][4] = 1./2\n", + "R1[1][0] = 'K_+'\n", + "R1[1][1] = 1\n", + "R1[1][2] = 0\n", + "R1[1][3] = 1\n", + "R1[1][4] = 1./2\n", + "R1[2][0] = 'S_+'\n", + "R1[2][1] = 1\n", + "R1[2][2] = 1\n", + "R1[2][3] = -1\n", + "R1[2][4] = 1\n", + "R1[3][0] = 'pi_-'\n", + "R1[3][1] = -1\n", + "R1[3][2] = 0\n", + "R1[3][3] = 0\n", + "R1[3][4] = 1\n", + "R1[4][0] = 'S_0'\n", + "R1[4][1] = 0\n", + "R1[4][2] = 1\n", + "R1[4][3] = -1\n", + "R1[4][4] = 0\n", + "R1[5][0] = 'p_-'\n", + "R1[5][1] = -1\n", + "R1[5][2] = -1\n", + "R1[5][3] = 0\n", + "R1[5][4] = 1./2\n", + "R1[6][0] = 'n_0'\n", + "R1[6][1] = 0\n", + "R1[6][2] = 0\n", + "R1[6][3] = 0\n", + "R1[6][4] = 0\n", + "\n", + "\n", + "#Calculations&Results\n", + "def check_Isotopic_no(Ir_sum,Ip_sum):\n", + " if Ir_sum == Ip_sum:\n", + " f = 1;\n", + " else: \n", + " f = 0;\n", + " return f\n", + "\n", + "\n", + "# Declare a function returning equality status of proton number\n", + "def check_strangeness(sr_sum,sp_sum):\n", + " if sr_sum == sp_sum:\n", + " f = 1;\n", + " else:\n", + " f = 0;\n", + " return f\n", + " \n", + "def check_charge(cr_sum,cp_sum):\n", + " if cr_sum == cp_sum:\n", + " f = 1;\n", + " else:\n", + " f = 0;\n", + " return f\n", + " \n", + "# Declare a function returning equality status of lepton number\n", + " \n", + "#Reaction-I\n", + "print \"\\n\\nReaction-I:\\n\\n\"\n", + "Ir_sum = R1[0][4]+R1[0][4];\n", + "Ip_sum = R1[1][4]+R1[2][4];\n", + "if (check_Isotopic_no(Ir_sum,Ip_sum) == 0):\n", + " print \"The Reaction\\n\"\n", + " print \"\\t%s + %s --> %s + %s \\nis not possible\"%(R1[0][0],R1[0][0],R1[1][0],R1[2][0])\n", + "\n", + "#Reaction-II\n", + "print \"\\n\\nReaction-II\"\n", + "sr_sum = R1[0][3]+R1[3][3];\n", + "sp_sum = R1[4][3]+R1[6][3];\n", + "if (check_strangeness(sr_sum,sp_sum)== 0):\n", + " print \"\\nThe Reaction\\n\"\n", + " print \"\\t%s + %s --> %s + %s \\nis not possible\"%(R1[0][0],R1[3][0],R1[4][0],R1[6][0])\n", + "\n", + "#Reaction-III\n", + "print \"\\n\\nReaction-III:\\n\\n\"\n", + "cr_sum = R1[0][1]+R1[0][1];\n", + "cp_sum = R1[0][1]+R1[0][1]+R1[0][1]+R1[5][1]; \n", + "if (check_charge(cr_sum,cp_sum) == 1):\n", + " print \"The Reaction\\n\"\n", + " print \"\\t%s + %s --> %s + %s + %s \\nis possible\"%(R1[0][0],R1[0][0],R1[0][0],R1[0][0],R1[5][0]) \n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "\n", + "\n", + "Reaction-I:\n", + "\n", + "\n", + "The Reaction\n", + "\n", + "\tp + p --> K_+ + S_+ \n", + "is not possible\n", + "\n", + "\n", + "Reaction-II\n", + "\n", + "The Reaction\n", + "\n", + "\tp + pi_- --> S_0 + n_0 \n", + "is not possible\n", + "\n", + "\n", + "Reaction-III:\n", + "\n", + "\n", + "The Reaction\n", + "\n", + "\tp + p --> p + p + p_- \n", + "is possible\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/SaurabhBarot/ch2.ipynb b/sample_notebooks/SaurabhBarot/ch2.ipynb new file mode 100644 index 00000000..79ba56c5 --- /dev/null +++ b/sample_notebooks/SaurabhBarot/ch2.ipynb @@ -0,0 +1,510 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:883876eb2a3f623c02ca3c86ebd8020a1b244805e7be4ab0f882af58fcdc4d16" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : MAGNETIC CIRCUITS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 Page No : 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "N = 2000.;\t\t\t#no of turns\n", + "I = 10.;\t\t\t#current in A\n", + "Rm = 25.;\t\t\t#mean radius in cm\n", + "d = 6.;\t\t\t#diameter of each turn in cm\n", + "\n", + "#CALCULATIONS \n", + "MMF = N*I;\t\t\t#magneto motive force in A\n", + "l = 2*math.pi*(Rm/100);\t\t\t#circumference of coli in m\n", + "u = (4*math.pi*10**-7);\t\t\t#permeability (U = Ur*U0)\n", + "a = (math.pi*d*d*10**-4)/4;\n", + "reluctance = (l/(a*u));\t\t\t#reluctance in At/Wb\n", + "flux = (MMF)/(reluctance);\t\t\t#flux in Wb\n", + "fluxdensity = (flux/a);\t\t\t#flux density in Wb/m**2 or tesla\n", + "\n", + "#OUTPUT\n", + "print \"Thus MMF, flux, flux density are %d A, %g Wb , %g Wb/m**2 or Tesla respectively \"%(MMF,flux,fluxdensity);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus MMF, flux, flux density are 20000 A, 4.52389e-05 Wb , 0.016 Wb/m**2 or Tesla respectively \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 Page No : 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-2, Example 2.2, Page 90\n", + "\n", + "#INPUT DATA\n", + "phi = 5*10**-2;\t\t\t#flux in wb\n", + "a = 0.2;\t\t\t#area of cross-section in m**2\n", + "lg = 1.2*10**-2;\t\t\t#length of air gap in m\n", + "ur = 1;\t\t\t#permeability\n", + "u = ur*4*math.pi*10**-7;\t\t\t#permeability\n", + "\n", + "#CALCULATIONS \n", + "B = (phi/a);\t\t\t#flux density in wb/sq.m\n", + "H = (B/(4*math.pi*10**-7*ur));\t\t\t#magnetic flux density in A/m\n", + "S = lg/(a*u);\t\t\t#reluctance of air gap in A/wb\n", + "permeance = 1/S;\t\t\t#permenace in A/wb\n", + "mmf_in_airgap = phi*S;\t\t\t#mmf in A\n", + "\n", + "#OUTPUT\n", + "print \"Thus B, H,S, permeance, MMF in air gap are %1.2f Wb/sq.m, %g A/m ,%f A/wb ,\\\n", + "%g Wb/A %d A respectively \"%(B,H,S,permeance,mmf_in_airgap);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus B, H,S, permeance, MMF in air gap are 0.25 Wb/sq.m, 198944 A/m ,47746.482928 A/wb ,2.0944e-05 Wb/A 2387 A respectively \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 Page No : 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "phi = 0.1*10**-3;\t\t\t#flux in wb\n", + "a = 1.7*10**-4;\t\t\t#area of cross-section in m**2\n", + "lg = 0.5*10**-3;\t\t\t#length of air gap in m\n", + "Rm = 15./2;\t\t\t#radius of ring in cm\n", + "u0 = 4*math.pi*10**-7;\t\t\t#permeability in free space in henry/m\n", + "N = 1500.;\t\t\t#no of turns of ring\n", + "\n", + "#CALCULATIONS \n", + "B = (phi/a);\t\t\t#flux density in wb/sq.m\n", + "H = (B/(4*math.pi*10**-7));\t\t\t#magnetic flux density in A/m\n", + "ampere_turns_provided_fo = H*lg;\n", + "total_ampere_turns_provi = N*1;\n", + "Available_for_iron_path = N-(H*lg);\n", + "length_of_iron_path = (2*Rm*math.pi*10**-2)-(lg);\t\t\t#length of iron path in m\n", + "H_for_iron_path = ((N-(H*lg)))/(length_of_iron_path);\n", + "ur = (B/(u0*H_for_iron_path));\t\t\t#relative permeability of iron\n", + "\n", + "#OUTPUT\n", + "print \"Thus relative permeability of iron is %d\"%(ur);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus relative permeability of iron is 174\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 Page No : 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "li = 0.5;\t\t\t#iron path length in m\n", + "lg = 10.**-3;\t\t\t#length of air gap in m\n", + "phi = 0.9*10**-3;\t\t\t#flux in wb\n", + "a = 6.66*10**-4;\t\t\t#area of cross-section of iron in m**2\n", + "N = 400.;\t\t\t#no of turns \n", + "\n", + "#CALCULATIONS \n", + "B = (phi/a);\t\t\t#flux density in wb/sq.m\n", + "Hg = (B/(4*math.pi*10**-7));\t\t\t#magnetic flux density in A/m\n", + "AT_required = Hg*lg;\t\t\t#AT required for air path\n", + "Hi = 1000;\t\t\t#magnetic flux density in A/m\n", + "AT_required_for_iron_pat = Hi*li;\n", + "total_AT_required = (Hg*lg)+(Hi*li);\n", + "I = ((Hg*lg)+(Hi*li))/(N);\n", + "\n", + "#OUTPUT\n", + "print \"Thus exciting current required is %1.2f A\"%(I);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus exciting current required is 3.94 A\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 Page No : 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-2, Example 2.5, Page 92\n", + "\n", + "#INPUT DATA\n", + "r = 0.01;\t\t\t#radius in m\n", + "lg = 10.**-3;\t\t\t#length of air gap in m\n", + "Rm = (30./2)*10**-2;\t\t\t#mean radius in m\n", + "ur = 800.;\t\t\t#relative permeability of iron\n", + "ur2 = 1.;\t\t\t#relative permeability of air gap\n", + "N = 250.;\t\t\t#no of turns\n", + "phi = 20000.*10**-8;\t\t\t#flux in Wb\n", + "u0 = 4*math.pi*10**-7;\t\t\t#permeability in free space \n", + "a = math.pi*(r)**2;\t\t\t#area of cross-section in m\n", + "leakage_factor = 1.1\n", + "\n", + "#CALCULATIONS \n", + "reluctance_of_air_gap = (lg/(u0*ur2*a));\t\t\t#reluctance of air gap in A/wb\n", + "li = (math.pi*(2*r)-(lg));\t\t\t#length of iron path in m\n", + "reluctance_of_iron_path = ((math.pi*0.3)-(lg))/(4*math.pi*10**-7*800*a);\t\t\t#in A/wb\n", + "total_reluctance = reluctance_of_air_gap+reluctance_of_iron_path;\t\t\t#in A/wb\n", + "MMF = phi*total_reluctance;\t\t\t#in Ampere turns\n", + "current_required = (MMF)/(N);\t\t\t#in A\n", + "\n", + "#OUTPUT\n", + "print \"Thus current required is %1.2f A \"%(current_required);\n", + "#Including leakage\n", + "\n", + "#CALCULATIONS\n", + "MMF_of_airgap = phi*reluctance_of_air_gap;\t\t\t#in A/wb\n", + "Total_flux_in_ironpath = leakage_factor*phi;\t\t\t#in Wb\n", + "MMF_of_ironpath = Total_flux_in_ironpath*reluctance_of_iron_path;\t\t\t#in A\n", + "Total_MMF = MMF_of_ironpath+MMF_of_airgap;\t\t\t#in A/wb\n", + "current_required2 = Total_MMF/(N);\t\t\t#in A\n", + "\n", + "#OUTPUT\n", + "print \"Thus current required is %1.3f A\"%(current_required2);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus current required is 4.41 A \n", + "Thus current required is 4.650 A\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 Page No : 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "l1 = 0.1;\t\t\t#length in m\n", + "l2 = 0.18;\t\t\t#length in m\n", + "l3 = 0.18;\t\t\t#length in m\n", + "lg = 1.*10**-3;\t\t\t#airgap length in mm\n", + "a1 = 6.25*10**-4;\t\t\t#area in m**2\n", + "a2 = 3.*10**-4;\t\t\t#area in m**2\n", + "ur = 800.;\t\t\t#relative permeability of iron path\n", + "ur2 = 1.;\t\t\t#relative permeability in free space\n", + "u0 = 4*math.pi*10**-7\n", + "N = 600.;\n", + "phi = 10.**-4;\t\t\t#airgap flux in Wb\n", + "\n", + "#CALCULATIONS \n", + "#for the airgap\n", + "Bg = (phi/(a1));\t\t\t#fluxdensity in Tesla\n", + "Hg = (Bg/(u0*ur2));\t\t\t#magnetimath.sing force in A/m\n", + "MMF1 = Hg*lg;\t\t\t#in A\n", + "#for path I1\n", + "B1 = 0.16;\t\t\t# flux density in tesla\n", + "H1 = (B1/(ur*u0));\t\t\t#magnetimath.sing force in A/m\n", + "MMF2 = H1*l1;\t\t\t#in A\n", + "#math.since paths l2 and l3 are similar,the total flux divide equally between these two paths.Since these paths are in parallel,consider only one of them\n", + "#for path l2\n", + "flux = 50*10**-6;\t\t\t#flux in wb\n", + "B2 = (flux/a2);\t\t\t#fluxdensity in tesla\n", + "H2 = (B2/(ur*u0));\t\t\t#magnetimath.sing force in A/m\n", + "MMF3 = H2*l2;\t\t\t#in A\n", + "totalmmf = MMF1+MMF2+MMF3;\t\t\t#in A\n", + "I = (totalmmf/N);\t\t\t#current required in A\n", + "\n", + "#OUTPUT\n", + "print \"Thus current required is %1.3f A\"%(I);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus current required is 0.288 A\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 Page No : 95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Chapter-2, Example 2.7, Page 95\n", + "\n", + "#INPUT DATA\n", + "Dm = 0.1\t\t\t#diameter in m\n", + "a = 10.**-3;\t\t\t#area of cross-section im m**2\n", + "N = 150.;\t\t\t#no of turns\n", + "ur = 800.;\t\t\t#permeability of iron ring\n", + "B = 0.1;\t\t\t#in Wb/m**2\n", + "u0 = 4*math.pi*10**-7;\t\t\t#permeability of free space\n", + "\n", + "#CALCULATIONS \n", + "S = (math.pi*Dm)/(a*ur*u0);\t\t\t#reluctance\n", + "I = (B*a*S)/(N);\t\t\t#current in A\n", + "\n", + "#OUTPUT\n", + "print \"Thus current is %f A\"%(I);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus current is 0.208333 A\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8 Page No : 95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "l = 0.3;\t\t\t#length in m\n", + "d = 1.5*10**-2;\t\t\t#diameter in m\n", + "N = 900;\t\t\t#no of turns\n", + "ur = 1;\t\t\t#relative permeability in free space\n", + "u0 = 4*math.pi*10**-7;\t\t\t#permeability in free space\n", + "I = 5;\t\t\t#current in A\n", + "\n", + "#CALCULATIONS \n", + "a = (math.pi*(d)**2/4);\t\t\t#in m**2\n", + "S = (l)/(a*ur*u0);\t\t\t#reluctance\n", + "\n", + "#OUTPUT\n", + "print \"Thus reluctance is %f A/wb\"%(S);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus reluctance is 1350949115.231170 A/wb\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9 Page No : 95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "lg = 10**-3;\t\t\t#length of air gap in m\n", + "B = 0.9;\t\t\t#flux density in wb/m**2\n", + "li = 0.3;\t\t\t#length of ironpath in m\n", + "Hi = 800;\t\t\t#magnetic flux density in AT/m\n", + "u0 = 4*math.pi*10**-7;\t\t\t#permeabilty in free space\n", + "\n", + "#CALCULATIONS \n", + "#for iron path\n", + "MMF_required1 = Hi*li;\t\t\t#magnetic motive force in AT\n", + "#for air gap\n", + "MMF_required2 = (B/u0)*lg;\t\t\t#magnetic motive force in AT\n", + "Totalmmf = MMF_required1+MMF_required2\n", + "\n", + "#OUTPUT\n", + "print \"Thus total MMF required is %d AT\"%(Totalmmf);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus total MMF required is 956 AT\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.10 Page No : 96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#INPUT DATA\n", + "li = 0.5;\t\t\t#length of iron ring mean length in m\n", + "N = 220;\t\t\t#no of turns\n", + "I = 1.2;\t\t\t#current in A\n", + "lg = 1.2*10**-3;\t\t\t#length of airgap in m\n", + "ur = 350;\t\t\t#relative permeability of iron\n", + "u0 = 4*math.pi*10**-7;\t\t\t#permeability in free space\n", + "\n", + "#CALCULATIONS \n", + "MMF_produced = N*I;\n", + "Si = li/(u0*ur);\t\t\t#reluctance of iron path\n", + "Sg = lg/(u0);\t\t\t#reluctance of air gap\n", + "S = Si+Sg;\t\t\t#total reluctance \n", + "Flux_density = (MMF_produced)/(S);\n", + "\n", + "#OUTPUT\n", + "print \"Thus fluxdensity is %1.3f Wb/m**2\"%(Flux_density);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thus fluxdensity is 0.126 Wb/m**2\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/SurajAhir/ch1.ipynb b/sample_notebooks/SurajAhir/ch1.ipynb new file mode 100644 index 00000000..dd3dc8fd --- /dev/null +++ b/sample_notebooks/SurajAhir/ch1.ipynb @@ -0,0 +1,641 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:ff1f8d37d08a8211fcc46eff9f443b7ece70ebe22359cada1bbdfcde008d38d6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 : DC Circuits" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1 Page No : 1.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R = 3.;\t\t\t\t#kohm\n", + "V = 220;\t\t\t\t#V\n", + "\n", + "# Calculations and Results\n", + "#First Case\n", + "I = V/R;\t\t\t\t#mA\n", + "print \"1st case : Current in the circuit(mA) : %.f\"%I\n", + "\n", + "#Second Case\n", + "Req = R+R;\t\t\t\t#ohm(Equivalent Resistance)\n", + "I = V/Req;\t\t\t\t#mA\n", + "print \"2nd case : Current in the circuit(mA) : %.f\"%I\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1st case : Current in the circuit(mA) : 73\n", + "2nd case : Current in the circuit(mA) : 37\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2 Page No : 1.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "I = 1.5;\t\t\t\t#A\n", + "R1 = 2;\t\t\t\t#ohm\n", + "R2 = 3;\t\t\t\t#ohm\n", + "R3 = 8;\t\t\t\t#ohm\n", + "\n", + "# Calculations and Results\n", + "V1 = I*R1;\t\t\t\t#V\n", + "V2 = I*R2;\t\t\t\t#V\n", + "V3 = I*R3;\t\t\t\t#V\n", + "print \"Voltage across R1(V) : %.2f\"%V1\n", + "print \"Voltage across R2(V) : %.2f\"%V2\n", + "print \"Voltage across R3(V) : %.2f\"%V3\n", + "\n", + "V = V1+V2+V3;\t\t\t\t#V(Supply voltage)\n", + "print \"Supply Voltage(V) : %.2f\"%V\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage across R1(V) : 3.00\n", + "Voltage across R2(V) : 4.50\n", + "Voltage across R3(V) : 12.00\n", + "Supply Voltage(V) : 19.50\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3 Page No : 1.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "Vs = 100.;\t\t\t\t#V(Supply voltage)\n", + "R1 = 40.;\t\t\t\t#ohm\n", + "R2 = 50.;\t\t\t\t#ohm\n", + "R3 = 70.;\t\t\t\t#ohm\n", + "\n", + "# Calculations\n", + "R = R1+R2+R3;\t\t\t\t#ohm(Equivalent Resistance)\n", + "I = Vs/R;\t\t\t\t#A(Current in the circuit)\n", + "\n", + "# Results\n", + "print \"Circuit current(A) : %.2f\"%I\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Circuit current(A) : 0.62\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4 Page No : 1.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Vo = 10.;\t\t\t\t#V(Output voltage)\n", + "Vin = 30;\t\t\t\t#V(Input voltage)\n", + "R2 = 100;\t\t\t\t#ohm\n", + "\n", + "# Calculations\n", + "#V2/V = R2/(R1+R2)\t\t\t\t#Voltage divider rule\n", + "R1 = (Vin*R2-Vo*R2)/Vo;\t\t\t\t#ohm\n", + "\n", + "# Results\n", + "print \"Resistance of R1(ohm) : %.2f\"%R1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance of R1(ohm) : 200.00\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5 Page No : 1.11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 110.;\t\t\t\t#V\n", + "R1 = 22.;\t\t\t\t#ohm\n", + "R2 = 44.;\t\t\t\t#ohm\n", + "\n", + "# Calculations\n", + "I1 = V/R1;\t\t\t\t#A\n", + "I2 = V/R2;\t\t\t\t#A\n", + "I = I1+I2;\t\t\t\t#A\n", + "\n", + "# Results\n", + "print \"Supply current(A) : %.2f\"%I\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Supply current(A) : 7.50\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6 Page No : 1.11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 12.;\t\t\t\t#V\n", + "R1 = 6.8;\t\t\t\t#ohm\n", + "R2 = 4.7;\t\t\t\t#ohm\n", + "R3 = 2.2;\t\t\t\t#ohm\n", + "\n", + "# Calculations\n", + "R = 1./(1/R1+1/R2+1/R3);\t\t\t\t#ohm(Effective Resistance)\n", + "I = V/R;\t\t\t\t#A(Supply current)\n", + "\n", + "# Results\n", + "print \"Effective Resistance(ohm) : %.2f\"%R\n", + "print \"Supply current(A) : %.2f\"%I\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Effective Resistance(ohm) : 1.23\n", + "Supply current(A) : 9.77\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7 Page No : 1.12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "I = 8.;\t\t\t\t#A\n", + "R2 = 2.;\t\t\t\t#ohm\n", + "\n", + "# Calculations and Results\n", + "# Part (a) \n", + "R1 = 2.;\t\t\t\t#ohm\n", + "I2 = I*R1/(R1+R2);\t\t\t\t#A\n", + "print \"(a) Current in 2 ohm Resistance(A) : %.2f\"%I2\n", + "\n", + "# Part (b) \n", + "R1 = 4.;\t\t\t\t#ohm\n", + "I2 = I*R1/(R1+R2);\t\t\t\t#A\n", + "print \"(b) Current in 2 ohm Resistance(A) : %.2f\"%I2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Current in 2 ohm Resistance(A) : 4.00\n", + "(b) Current in 2 ohm Resistance(A) : 5.33\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.8 Page No : 1.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "I1 = 3;\t\t\t\t#A\n", + "I2 = -4;\t\t\t\t#A\n", + "I4 = 2;\t\t\t\t#A\n", + "\n", + "# Calculations\n", + "#I1-I2+I3-I4 = 0\t\t\t\t#from KCL\n", + "I3 = -I1+I2+I4;\t\t\t\t#A\n", + "\n", + "# Results\n", + "print \"Current I3(A) : %.2f\"%I3\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current I3(A) : -5.00\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.9 Page No : 1.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "G1 = 20.;\t\t\t\t#dB\n", + "G2 = 30.;\t\t\t\t#dB\n", + "G3 = 40.;\t\t\t\t#dB\n", + "\n", + "# Calculations and Results\n", + "Ap1 = 10**(G1/10);\t\t\t\t#Power Gain\n", + "print \"Power gain for 20 dB : %.2f\"%Ap1\n", + "Av1 = 10**(G1/20);\t\t\t\t#Voltage Gain\n", + "print \"Voltage gain for 20 dB : %.2f\"%Av1\n", + "Ap2 = 10**(G2/10);\t\t\t\t#Power Gain\n", + "print \"Power gain for 30 dB : %.2f\"%Ap2\n", + "Av2 = 10**(G2/20);\t\t\t\t#Voltage Gain\n", + "print \"Voltage gain for 30 dB : %.2f\"%Av2\n", + "Ap3 = 10**(G3/10);\t\t\t\t#Power Gain\n", + "print \"Power gain for 40 dB : %.2f\"%Ap3\n", + "Av3 = 10**(G3/20);\t\t\t\t#Voltage Gain\n", + "print \"Voltage gain for 40 dB : %.2f\"%Av3\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power gain for 20 dB : 100.00\n", + "Voltage gain for 20 dB : 10.00\n", + "Power gain for 30 dB : 1000.00\n", + "Voltage gain for 30 dB : 31.62\n", + "Power gain for 40 dB : 10000.00\n", + "Voltage gain for 40 dB : 100.00\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.10 Page No : 1.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "I1 = 2.5;\t\t\t\t#A\n", + "I2 = -1.5;\t\t\t\t#A\n", + "\n", + "# Calculations\n", + "#I1+I2+I3 = 0\t\t\t\t#from KCL\n", + "I3 = -I1-I2;\t\t\t\t#A\n", + "\n", + "# Results\n", + "print \"Current I3(A) : %.2f\"%I3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current I3(A) : -1.00\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.11 Page No : 1.16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "I1 = 3;\t\t\t\t#A\n", + "I3 = 1;\t\t\t\t#A\n", + "I6 = 1;\t\t\t\t#A\n", + "\n", + "# Calculations\n", + "#I1-I2-I3 = 0\t\t\t\t#from KCL at point a\n", + "I2 = I1-I3;\t\t\t\t#A\n", + "#I2+I4-I6 = 0\t\t\t\t#from KCL at point b\n", + "I4 = I6-I2;\t\t\t\t#A\n", + "#I3-I4-I5 = 0\t\t\t\t#from KCL at point c\n", + "I5 = I3-I4;\t\t\t\t#A\n", + "\n", + "# Results\n", + "print \"Current I2(A) : %.2f\"%I2\n", + "print \"Current I4(A) : %.2f\"%I4\n", + "print \"Current I5(A) : %.2f\"%I5\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current I2(A) : 2.00\n", + "Current I4(A) : -1.00\n", + "Current I5(A) : 2.00\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.12 Page No : 1.17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R1 = 30;\t\t\t\t#ohm\n", + "R2 = 60.;\t\t\t\t#ohm\n", + "R3 = 30;\t\t\t\t#ohm\n", + "I3 = 1;\t\t\t\t#A\n", + "\n", + "# Calculations\n", + "I1 = I3*(R2+R3)/R2;\t\t\t\t#A\n", + "I2 = I1-I3;\t\t\t\t#A\n", + "\n", + "# Results\n", + "print \"Current I1(A) : %.2f\"%I1\n", + "print \"Current I2(A) : %.2f\"%I2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current I1(A) : 1.50\n", + "Current I2(A) : 0.50\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.13 Page No : 1.18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "E = 12;\t\t\t\t#V\n", + "V2 = 8;\t\t\t\t#V\n", + "V4 = 2;\t\t\t\t#V\n", + "\n", + "# Calculations\n", + "V1 = E-V2;\t\t\t\t#V\n", + "#-V2+V3+V4 = 0;\t\t\t\t#for Loop B\n", + "V3 = V2-V4;\t\t\t\t#V\n", + "\n", + "# Results\n", + "print \"Voltage V1(V) : %.2f\"%V1\n", + "print \"Voltage V3(V) : %.2f\"%V3\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage V1(V) : 4.00\n", + "Voltage V3(V) : 6.00\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14 Page No : 1.19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 20.;\t\t\t\t#V\n", + "R1 = 25;\t\t\t\t#ohm\n", + "R2 = 40;\t\t\t\t#ohm\n", + "R3 = 15;\t\t\t\t#ohm\n", + "R4 = 10;\t\t\t\t#ohm\n", + "\n", + "# Calculations\n", + "VAC = R3*V/(R1+R3);\t\t\t\t#V\n", + "VBC = R4*V/(R2+R4);\t\t\t\t#V\n", + "#0 = VAB+VBC-VAC;\t\t\t\t#/from KVL\n", + "VAB = -VBC+VAC;\t\t\t\t#V\n", + "\n", + "# Results\n", + "print \"Voltage VAB(V) : %.2f\"%VAB\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage VAB(V) : 3.50\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15 Page No : 1.20\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "E1 = 10;\t\t\t\t#V\n", + "V2 = 6;\t\t\t\t#V\n", + "V3 = 8;\t\t\t\t#V\n", + "\n", + "# Calculations\n", + "#E1 = V1+V2;\t\t\t\t#KCL for left loop\n", + "V1 = E1-V2;\t\t\t\t#V\n", + "#-E2 = -V2-V3;\t\t\t\t#KCL for right loop\n", + "E2 = V2+V3;\t\t\t\t#Vc\n", + "\n", + "# Results\n", + "print \"Voltage V1(V) : %.2f\"%V1\n", + "print \"Voltage E2(V) : %.2f\"%E2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage V1(V) : 4.00\n", + "Voltage E2(V) : 14.00\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/VaibhavShah/ch7.ipynb b/sample_notebooks/VaibhavShah/ch7.ipynb new file mode 100755 index 00000000..fefbf834 --- /dev/null +++ b/sample_notebooks/VaibhavShah/ch7.ipynb @@ -0,0 +1,134 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b878fc066fefa58833a7b2835f2e845d255863cbc07b67c34a50477d1af138d4" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 : Induction Machines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1 Page No : 7.4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "P = 4.;\t\t\t\t#no. of poles\n", + "f = 50;\t\t\t\t#Hz\n", + "S = 4./100;\t\t\t\t#slip\n", + "N = 600;\t\t\t\t#rpm\n", + "p = P/2;\t\t\t\t#pair of poles\n", + "\n", + "# Calculations and Results\n", + "#(a)\n", + "Ns = 60*f/p;\t\t\t\t#rpm(Synchronous speed)\n", + "print \"(a) Synchronous speed(rpm) : %.2f\"%Ns\n", + "\n", + "#(b)\n", + "Nr = Ns-S*Ns;\t\t\t\t#rpm(Rotor speed)\n", + "print \"(b) Rotor speed(rpm) : %.2f\"%Nr\n", + "\n", + "#(c)\n", + "Sdash = (Ns-N)/Ns;\t\t\t\t#per unot slip\n", + "fr = f*Sdash;\t\t\t\t#Hz(Rotor frequency)\n", + "print \"Rotor frequency(Hz) : %.2f\"%fr\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Synchronous speed(rpm) : 1500.00\n", + "(b) Rotor speed(rpm) : 1440.00\n", + "Rotor frequency(Hz) : 30.00\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2 Page No : 7.4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Zs = 240.;\t\t\t\t#no. of conductors in stator winding\n", + "Zr = 48.;\t\t\t\t#no. of conductors in rotor winding\n", + "Rr = 0.013;\t\t\t\t#ohm/phase(ressmath.tance rotor windig)\n", + "XL = 0.048;\t\t\t\t#ohm/phase(leakega reacmath.tance)\n", + "Vs = 400.;\t\t\t\t#V\n", + "\n", + "# Calculations and Results\n", + "#(a)\n", + "Eo = Vs*Zr/Zs;\t\t\t\t#V(rotor emf)\n", + "print \"(a) Rotor emf(V) : %.2f\"%Eo\n", + "\n", + "#(b)\n", + "S = 4./100;\t\t\t\t#slip\n", + "Eo = Eo*S;\t\t\t\t#V(rotor emf for 4% slip)\n", + "print \"(b) Rotor emf at 4%% slip(V) : %.2f\"%Eo\n", + "\n", + "Z = math.sqrt(Rr**2+(S*XL)**2);\t\t\t\t#ohm/phase(rotor impedence at 4% slip)\n", + "Ir = Eo/Z;\t\t\t\t#A(Rotor curren at 4% slip)\n", + "print \"(b) Rotor curren at 4%% slip(A) : %.2f\"%Ir\n", + "\n", + "#(c)\n", + "fi_r = math.degrees(math.atan(S*XL/Rr));\t\t\t\t#degree\n", + "print \"(c) Phase difference at 4%% slip(degree) : %.2f\"%fi_r\n", + "\n", + "S = 100./100;\t\t\t\t#100% slip\n", + "fi_r = math.degrees(math.atan(S*XL/Rr));\t\t\t\t#degree\n", + "print \"(c) Phase difference at 100%% slip(degree) : %.2f\"%fi_r\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Rotor emf(V) : 80.00\n", + "(b) Rotor emf at 4% slip(V) : 3.20\n", + "(b) Rotor curren at 4% slip(A) : 243.51\n", + "(c) Phase difference at 4% slip(degree) : 8.40\n", + "(c) Phase difference at 100% slip(degree) : 74.85\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/VineshSaini/ch1.ipynb b/sample_notebooks/VineshSaini/ch1.ipynb new file mode 100755 index 00000000..338df5a0 --- /dev/null +++ b/sample_notebooks/VineshSaini/ch1.ipynb @@ -0,0 +1,279 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 01 : Standards, Units & Dimensions" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.17 : page 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "Y=90.0 \n", + "X=89.0 \n", + "Error_absolute=Y-X \n", + "print 'absolute Error =',Error_absolute\n", + "Error_relative=(Y-X)*100/Y \n", + "print 'relative Error =',round(Error_relative,2),'%'\n", + "Accuracy_relative=1-Error_relative \n", + "print 'Accuracy relative =',round(Accuracy_relative,2)\n", + "Accuracy_percentage=100*Accuracy_relative \n", + "print 'Accuracy =',round(Accuracy_percentage,2),'%'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "absolute Error = 1.0\n", + "relative Error = 1.11 %\n", + "Accuracy relative = -0.11\n", + "Accuracy = -11.11 %\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.18 : page " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "S=98+100+102+98+100+100+104+104+105+97 \n", + "n=10 \n", + "Avg=S/n \n", + "P=1-abs((104-Avg)/Avg) \n", + "print \"Precision for the 8th reading=%.2f\"%P" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Precision for the 8th reading=0.97\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.19 : page " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "V=10 \n", + "I=20*10**-3 \n", + "RI=50 \n", + "R=(V/I)-RI \n", + "print \"The value of Resistance = %.0f ohm\"%R \n", + "dV=0.2 \n", + "dI=1*10**-3 \n", + "dRI=5 \n", + "dR=(dV/I)+(V*dI/I**2)+(dRI)\n", + "print \"Limiting error of resistance = %.0f ohm\"%dR" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Resistance = 450 ohm\n", + "Limiting error of resistance = 40 ohm\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.20 : page " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "R0=5 \n", + "a=0.004 \n", + "T=30 \n", + "R=R0*(1+a*(T-20)) \n", + "print \"Resistance of the wire = %.1f ohm\"%R \n", + "#Let (dR/dR0) =b (dR/da)=c (dR/dT)=d\n", + "b=(1+a*(T-20)) \n", + "c=R0*(T-20) \n", + "d=R0*a \n", + "ur0=5*0.003 \n", + "ua=0.004*0.01 \n", + "ut=1 \n", + "uR=(b**2*ur0**2+c**2*ua**2+d**2*ut**2)**0.5 \n", + "print \"Uncertanity in resistance = %.2f ohm\"%uR" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance of the wire = 5.2 ohm\n", + "Uncertanity in resistance = 0.03 ohm\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.21 : page " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "X_mean=(15+20+25+30+35+45)/6 \n", + "print \"The sample mean of the temperature=%.2f degree C\"%X_mean \n", + "Y_mean=(1.9+1.93+1.97+2+2.01+2.01+1.94+1.95+1.97+2.02+2.02+2.04)/12*10**-6 \n", + "print \"The sample mean of the faliure=%.6f failures/hour\"%Y_mean\n", + "print 'from these values we get' \n", + "a=1.80*10**-6 \n", + "b=0.00226 \n", + "print 'Y=1.80+0.00226x is the required least square line'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The sample mean of the temperature=28.33 degree C\n", + "The sample mean of the faliure=0.000002 failures/hour\n", + "from these values we get\n", + "Y=1.80+0.00226x is the required least square line\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.22 : page " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "n=2 \n", + "k=1 \n", + "dof=n-k \n", + "chi_square=(3-5)**2/5+(7-5)**2/5 \n", + "print 'Chi square value =',chi_square\n", + "print 'From the dof and chi square value we find P=0.22'\n", + "print 'Hence there are 22% chance that the distribution is just the result of random fluctuations and the coin may be unweighted'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Chi square value = 1.6\n", + "From the dof and chi square value we find P=0.22\n", + "Hence there are 22% chance that the distribution is just the result of random fluctuations and the coin may be unweighted\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1.23 : page " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "X_mean=501*1/5 \n", + "print \"Assigned Value=%.1f V\"%X_mean \n", + "sigma=((1/(5-1))*((100.2-X_mean)**2+(100.3-X_mean)**2+(100.2-X_mean)**2+(100.2-X_mean)**2+(100.1-X_mean)**2))**0.5 \n", + "# For 95% confidance level student factor t is 2.78'\n", + "t=2.78 \n", + "n=5 \n", + "Ur=t*sigma/(n**0.5) \n", + "print \"Uncertanity=%.3f V\"%Ur " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Assigned Value=100.2 V\n", + "Uncertanity=0.088 V\n" + ] + } + ], + "prompt_number": 23 + } + ], + "metadata": {} + } + ] +} diff --git a/sample_notebooks/VishalSangani/ch1.ipynb b/sample_notebooks/VishalSangani/ch1.ipynb new file mode 100644 index 00000000..dd3dc8fd --- /dev/null +++ b/sample_notebooks/VishalSangani/ch1.ipynb @@ -0,0 +1,641 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:ff1f8d37d08a8211fcc46eff9f443b7ece70ebe22359cada1bbdfcde008d38d6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 : DC Circuits" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1 Page No : 1.5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R = 3.;\t\t\t\t#kohm\n", + "V = 220;\t\t\t\t#V\n", + "\n", + "# Calculations and Results\n", + "#First Case\n", + "I = V/R;\t\t\t\t#mA\n", + "print \"1st case : Current in the circuit(mA) : %.f\"%I\n", + "\n", + "#Second Case\n", + "Req = R+R;\t\t\t\t#ohm(Equivalent Resistance)\n", + "I = V/Req;\t\t\t\t#mA\n", + "print \"2nd case : Current in the circuit(mA) : %.f\"%I\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1st case : Current in the circuit(mA) : 73\n", + "2nd case : Current in the circuit(mA) : 37\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2 Page No : 1.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "I = 1.5;\t\t\t\t#A\n", + "R1 = 2;\t\t\t\t#ohm\n", + "R2 = 3;\t\t\t\t#ohm\n", + "R3 = 8;\t\t\t\t#ohm\n", + "\n", + "# Calculations and Results\n", + "V1 = I*R1;\t\t\t\t#V\n", + "V2 = I*R2;\t\t\t\t#V\n", + "V3 = I*R3;\t\t\t\t#V\n", + "print \"Voltage across R1(V) : %.2f\"%V1\n", + "print \"Voltage across R2(V) : %.2f\"%V2\n", + "print \"Voltage across R3(V) : %.2f\"%V3\n", + "\n", + "V = V1+V2+V3;\t\t\t\t#V(Supply voltage)\n", + "print \"Supply Voltage(V) : %.2f\"%V\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage across R1(V) : 3.00\n", + "Voltage across R2(V) : 4.50\n", + "Voltage across R3(V) : 12.00\n", + "Supply Voltage(V) : 19.50\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3 Page No : 1.6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "Vs = 100.;\t\t\t\t#V(Supply voltage)\n", + "R1 = 40.;\t\t\t\t#ohm\n", + "R2 = 50.;\t\t\t\t#ohm\n", + "R3 = 70.;\t\t\t\t#ohm\n", + "\n", + "# Calculations\n", + "R = R1+R2+R3;\t\t\t\t#ohm(Equivalent Resistance)\n", + "I = Vs/R;\t\t\t\t#A(Current in the circuit)\n", + "\n", + "# Results\n", + "print \"Circuit current(A) : %.2f\"%I\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Circuit current(A) : 0.62\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4 Page No : 1.7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "Vo = 10.;\t\t\t\t#V(Output voltage)\n", + "Vin = 30;\t\t\t\t#V(Input voltage)\n", + "R2 = 100;\t\t\t\t#ohm\n", + "\n", + "# Calculations\n", + "#V2/V = R2/(R1+R2)\t\t\t\t#Voltage divider rule\n", + "R1 = (Vin*R2-Vo*R2)/Vo;\t\t\t\t#ohm\n", + "\n", + "# Results\n", + "print \"Resistance of R1(ohm) : %.2f\"%R1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance of R1(ohm) : 200.00\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5 Page No : 1.11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 110.;\t\t\t\t#V\n", + "R1 = 22.;\t\t\t\t#ohm\n", + "R2 = 44.;\t\t\t\t#ohm\n", + "\n", + "# Calculations\n", + "I1 = V/R1;\t\t\t\t#A\n", + "I2 = V/R2;\t\t\t\t#A\n", + "I = I1+I2;\t\t\t\t#A\n", + "\n", + "# Results\n", + "print \"Supply current(A) : %.2f\"%I\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Supply current(A) : 7.50\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6 Page No : 1.11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 12.;\t\t\t\t#V\n", + "R1 = 6.8;\t\t\t\t#ohm\n", + "R2 = 4.7;\t\t\t\t#ohm\n", + "R3 = 2.2;\t\t\t\t#ohm\n", + "\n", + "# Calculations\n", + "R = 1./(1/R1+1/R2+1/R3);\t\t\t\t#ohm(Effective Resistance)\n", + "I = V/R;\t\t\t\t#A(Supply current)\n", + "\n", + "# Results\n", + "print \"Effective Resistance(ohm) : %.2f\"%R\n", + "print \"Supply current(A) : %.2f\"%I\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Effective Resistance(ohm) : 1.23\n", + "Supply current(A) : 9.77\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7 Page No : 1.12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "I = 8.;\t\t\t\t#A\n", + "R2 = 2.;\t\t\t\t#ohm\n", + "\n", + "# Calculations and Results\n", + "# Part (a) \n", + "R1 = 2.;\t\t\t\t#ohm\n", + "I2 = I*R1/(R1+R2);\t\t\t\t#A\n", + "print \"(a) Current in 2 ohm Resistance(A) : %.2f\"%I2\n", + "\n", + "# Part (b) \n", + "R1 = 4.;\t\t\t\t#ohm\n", + "I2 = I*R1/(R1+R2);\t\t\t\t#A\n", + "print \"(b) Current in 2 ohm Resistance(A) : %.2f\"%I2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Current in 2 ohm Resistance(A) : 4.00\n", + "(b) Current in 2 ohm Resistance(A) : 5.33\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.8 Page No : 1.14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "I1 = 3;\t\t\t\t#A\n", + "I2 = -4;\t\t\t\t#A\n", + "I4 = 2;\t\t\t\t#A\n", + "\n", + "# Calculations\n", + "#I1-I2+I3-I4 = 0\t\t\t\t#from KCL\n", + "I3 = -I1+I2+I4;\t\t\t\t#A\n", + "\n", + "# Results\n", + "print \"Current I3(A) : %.2f\"%I3\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current I3(A) : -5.00\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.9 Page No : 1.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "G1 = 20.;\t\t\t\t#dB\n", + "G2 = 30.;\t\t\t\t#dB\n", + "G3 = 40.;\t\t\t\t#dB\n", + "\n", + "# Calculations and Results\n", + "Ap1 = 10**(G1/10);\t\t\t\t#Power Gain\n", + "print \"Power gain for 20 dB : %.2f\"%Ap1\n", + "Av1 = 10**(G1/20);\t\t\t\t#Voltage Gain\n", + "print \"Voltage gain for 20 dB : %.2f\"%Av1\n", + "Ap2 = 10**(G2/10);\t\t\t\t#Power Gain\n", + "print \"Power gain for 30 dB : %.2f\"%Ap2\n", + "Av2 = 10**(G2/20);\t\t\t\t#Voltage Gain\n", + "print \"Voltage gain for 30 dB : %.2f\"%Av2\n", + "Ap3 = 10**(G3/10);\t\t\t\t#Power Gain\n", + "print \"Power gain for 40 dB : %.2f\"%Ap3\n", + "Av3 = 10**(G3/20);\t\t\t\t#Voltage Gain\n", + "print \"Voltage gain for 40 dB : %.2f\"%Av3\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power gain for 20 dB : 100.00\n", + "Voltage gain for 20 dB : 10.00\n", + "Power gain for 30 dB : 1000.00\n", + "Voltage gain for 30 dB : 31.62\n", + "Power gain for 40 dB : 10000.00\n", + "Voltage gain for 40 dB : 100.00\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.10 Page No : 1.15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "I1 = 2.5;\t\t\t\t#A\n", + "I2 = -1.5;\t\t\t\t#A\n", + "\n", + "# Calculations\n", + "#I1+I2+I3 = 0\t\t\t\t#from KCL\n", + "I3 = -I1-I2;\t\t\t\t#A\n", + "\n", + "# Results\n", + "print \"Current I3(A) : %.2f\"%I3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current I3(A) : -1.00\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.11 Page No : 1.16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "I1 = 3;\t\t\t\t#A\n", + "I3 = 1;\t\t\t\t#A\n", + "I6 = 1;\t\t\t\t#A\n", + "\n", + "# Calculations\n", + "#I1-I2-I3 = 0\t\t\t\t#from KCL at point a\n", + "I2 = I1-I3;\t\t\t\t#A\n", + "#I2+I4-I6 = 0\t\t\t\t#from KCL at point b\n", + "I4 = I6-I2;\t\t\t\t#A\n", + "#I3-I4-I5 = 0\t\t\t\t#from KCL at point c\n", + "I5 = I3-I4;\t\t\t\t#A\n", + "\n", + "# Results\n", + "print \"Current I2(A) : %.2f\"%I2\n", + "print \"Current I4(A) : %.2f\"%I4\n", + "print \"Current I5(A) : %.2f\"%I5\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current I2(A) : 2.00\n", + "Current I4(A) : -1.00\n", + "Current I5(A) : 2.00\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.12 Page No : 1.17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "R1 = 30;\t\t\t\t#ohm\n", + "R2 = 60.;\t\t\t\t#ohm\n", + "R3 = 30;\t\t\t\t#ohm\n", + "I3 = 1;\t\t\t\t#A\n", + "\n", + "# Calculations\n", + "I1 = I3*(R2+R3)/R2;\t\t\t\t#A\n", + "I2 = I1-I3;\t\t\t\t#A\n", + "\n", + "# Results\n", + "print \"Current I1(A) : %.2f\"%I1\n", + "print \"Current I2(A) : %.2f\"%I2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Current I1(A) : 1.50\n", + "Current I2(A) : 0.50\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.13 Page No : 1.18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "E = 12;\t\t\t\t#V\n", + "V2 = 8;\t\t\t\t#V\n", + "V4 = 2;\t\t\t\t#V\n", + "\n", + "# Calculations\n", + "V1 = E-V2;\t\t\t\t#V\n", + "#-V2+V3+V4 = 0;\t\t\t\t#for Loop B\n", + "V3 = V2-V4;\t\t\t\t#V\n", + "\n", + "# Results\n", + "print \"Voltage V1(V) : %.2f\"%V1\n", + "print \"Voltage V3(V) : %.2f\"%V3\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage V1(V) : 4.00\n", + "Voltage V3(V) : 6.00\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14 Page No : 1.19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "V = 20.;\t\t\t\t#V\n", + "R1 = 25;\t\t\t\t#ohm\n", + "R2 = 40;\t\t\t\t#ohm\n", + "R3 = 15;\t\t\t\t#ohm\n", + "R4 = 10;\t\t\t\t#ohm\n", + "\n", + "# Calculations\n", + "VAC = R3*V/(R1+R3);\t\t\t\t#V\n", + "VBC = R4*V/(R2+R4);\t\t\t\t#V\n", + "#0 = VAB+VBC-VAC;\t\t\t\t#/from KVL\n", + "VAB = -VBC+VAC;\t\t\t\t#V\n", + "\n", + "# Results\n", + "print \"Voltage VAB(V) : %.2f\"%VAB\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage VAB(V) : 3.50\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15 Page No : 1.20\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "E1 = 10;\t\t\t\t#V\n", + "V2 = 6;\t\t\t\t#V\n", + "V3 = 8;\t\t\t\t#V\n", + "\n", + "# Calculations\n", + "#E1 = V1+V2;\t\t\t\t#KCL for left loop\n", + "V1 = E1-V2;\t\t\t\t#V\n", + "#-E2 = -V2-V3;\t\t\t\t#KCL for right loop\n", + "E2 = V2+V3;\t\t\t\t#Vc\n", + "\n", + "# Results\n", + "print \"Voltage V1(V) : %.2f\"%V1\n", + "print \"Voltage E2(V) : %.2f\"%E2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage V1(V) : 4.00\n", + "Voltage E2(V) : 14.00\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/keerthi vanigundla/R.K.RAJPUTCHAPTER_12.ipynb b/sample_notebooks/keerthi vanigundla/R.K.RAJPUTCHAPTER_12.ipynb new file mode 100644 index 00000000..b7f5147f --- /dev/null +++ b/sample_notebooks/keerthi vanigundla/R.K.RAJPUTCHAPTER_12.ipynb @@ -0,0 +1,292 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 12:Measurement of Non-Electrical Quantities"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.1,Page No:600"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Gf = 2; #guage factor \n",
+ "a = 100*10**6; #stress in N/m**2\n",
+ "E = 200*10**9; #elasticity of steel in N/m**2\n",
+ "\n",
+ "#calculation\n",
+ "st = (a/float(E)); #strain\n",
+ "x = Gf*st; # change in guage resistance\n",
+ "p = (x)*100; #percentage change in resistance in %\n",
+ "\n",
+ "#result\n",
+ "print\"percentage change in resistance %1.1f\"%p,\"%\";\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.4,Page No:631"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "water flow rate 0.0586 m**3/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "D1 = 200*10**-3; # inlet horizontal venturimeter in m\n",
+ "D2 = 100*10**-3; #throat horizontal enturimeter in m\n",
+ "h = 220*10**-3; #pressure in m\n",
+ "Cd = 0.98; #coefficient of discharge \n",
+ "phg = 13.6; #specific gravity of mercury\n",
+ "p = 1000; #density of water in kg/m**3\n",
+ "g = 9.81; #gravitational constant\n",
+ "pw = 1; #density of water in kg/m**3\n",
+ "w = 9.81; \n",
+ "\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "x = (g)*(h)*(phg-pw)*1000; #differential pressure head in N/m**2\n",
+ "a = 1-((D2/float(D1))**4); #velocity approach factor\n",
+ "M = 1/(float(math.sqrt(a))); #velocity of approach\n",
+ "b = math.sqrt(((2*g)/(float(w*p)))*x);\n",
+ "A2 = (math.pi/float(4))*((D2)**2); #area in m**2\n",
+ "Q = Cd*M*A2*(b); #discharge through venturimeter in m**3/s\n",
+ " \n",
+ "#result\n",
+ "print'water flow rate %3.4f'%Q,'m**3/s'; \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.5,Page No:631"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "rate of flow of oil 0.137850 m**3/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "D1 = 400*10**-3; #diameter at inlet in m\n",
+ "D2 = 200*10**-3; #diameter at throat in m\n",
+ "y = 50*10**-3; #reading of differential manometer in m\n",
+ "Shl = 13.6; #specific gravity of mercury in U-tube \n",
+ "Sp = 0.7; #specific gravity of oil in U-tube \n",
+ "h = 0.92;\n",
+ "\n",
+ "#bernoulli's equation\n",
+ "#p1/w +z1+V1**2=p2/w +z2+V2**2\n",
+ "#solving we get h+(V1**2/2*g)-(V2**2/2*g)=0\n",
+ "# calculations\n",
+ "\n",
+ "A1 = (math.pi/float(4))*(D1**2); #area in m**2\n",
+ "A2 = (math.pi/4)*(D2**2); #area in m**2\n",
+ "a = A2/float(A1); #ratio of areas\n",
+ "#V1 = a*V2;\n",
+ "#h+(V1**2/2*g)*(1-(1/4))=0\n",
+ "V2 = math.sqrt((2*g*h)/(float(1-((a)**2)))); \n",
+ "Q = A2*V2; #rate of oil flow in m**3/s\n",
+ "\n",
+ "#result\n",
+ "print'rate of flow of oil %f'%Q,'m**3/s';\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.6,Page No:633"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "difference in pressure head 4952.073 N/m**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Q = 0.015; #rate of flow in m**3/s\n",
+ "D0 = 100*10**-3; #diameter orifice in m\n",
+ "D1 = 200*10**-3; #diameter of pipe in m\n",
+ "Cc = 0.6; #coefficient of contraction\n",
+ "Cd = 0.6; #coefficient of discharge\n",
+ "E = 1; #thermal expansion factor\n",
+ "g = 9.81; #gravitational constant \n",
+ "w = 9810;\n",
+ "\n",
+ "#calculations\n",
+ "A0 = ((math.pi)/float(4))*(D0**2); #area in m**2\n",
+ "A1 = ((math.pi)/float(4))*(D1**2); #area in m**2\n",
+ "a = (Cc*A0)/(float(A1)); \n",
+ "M = math.sqrt(1-((a)**2));\n",
+ "K = Cd/float(M);\n",
+ "x = ((Q/float(K*E*A0))**2);\n",
+ "dp = (x*w/float(2*g)); #difference in pressure head in N/m**2\n",
+ "\n",
+ "#result\n",
+ "print'difference in pressure head %3.3f'%dp,'N/m**2';\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:12.7,Page No:633"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "discharge through the orifice 0.742 m**3/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "C0 = 0.6; #coefficient of orifice\n",
+ "Cv = 0.97; #coefficient of discharge\n",
+ "Qv = 1.2; #flow rate in m**3/s\n",
+ "\n",
+ "#calculations\n",
+ "Q0 = (C0/Cv)*Qv; #discharge through the orifice in m**3/s\n",
+ "\n",
+ "#result\n",
+ "print'discharge through the orifice %3.3f'%Q0,'m**3/s'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:12.8,Page No:634"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "velocity of submarine 25.0 km/h\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Shl = 13.6; #specific gravity of mercury\n",
+ "Sl = 1.025; #specific gravity of sea water\n",
+ "y = 200*10**-3; #reading in m\n",
+ "g = 9.81; #constant\n",
+ "\n",
+ "#calculation\n",
+ "x = Shl/float(Sl);\n",
+ "h = (y*((x)-1)); #head\n",
+ "V = math.sqrt(2*g*h); #velocity of submarine in km/h\n",
+ "\n",
+ "#result\n",
+ "print'velocity of submarine %3.1f'%(V*(18/float(5))),'km/h';"
+ ]
+ }
+ ],
+ "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.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/sample_notebooks/kushrami/Chapter_1_-_Overview_of_optical_fiber_communication.ipynb b/sample_notebooks/kushrami/Chapter_1_-_Overview_of_optical_fiber_communication.ipynb new file mode 100755 index 00000000..7649fb45 --- /dev/null +++ b/sample_notebooks/kushrami/Chapter_1_-_Overview_of_optical_fiber_communication.ipynb @@ -0,0 +1,251 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:256c8b99e0e56930e177cf311c8d82ebc12805b19dc6acba2736a9016b128039"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1: Overview of optical fiber communication"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.1, Page Number: 8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "f1 = 100*1e3 #frequency1 = 100KHz\n",
+ "f2 = 1e9 #frequency2 = 1GHz\n",
+ "T1 = 1.0/f1 #Time period1 = 0.01ms\n",
+ "T2 = 1.0/f2 #Time period2 = 1 ns\n",
+ "\n",
+ "#calculation\n",
+ "phi = (0.25)*360.0 # Phase shift(degree)\n",
+ "\n",
+ "#result\n",
+ "print \"Phase shift = \",round(phi),\"Degree\",\"= \",round((round(phi)*math.pi)/180,4), \"radian\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Phase shift = 90.0 Degree = 1.5708 radian\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2, Page Number: 10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#variable Declaration\n",
+ "flow=10*1e3 #Lowest frequency\n",
+ "fhigh=100*1e3 #Highest frequency\n",
+ "\n",
+ "#calculation\n",
+ "bandwidth=fhigh-flow\n",
+ "\n",
+ "#result\n",
+ "print \"Bandwidth=\",bandwidth/1000 ,\"KHz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Bandwidth= 90.0 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.4, Page Number: 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#variable Declaration\n",
+ "B = 10*1e6 # Bandwidth of noisy channel 1MHZ\n",
+ "S_N = 1 # signal to noise ratio is 1\n",
+ "\n",
+ "#calculation\n",
+ "C=B*(math.log(1+S_N)/math.log(2)) #capacity of channel(Mb/s)\n",
+ "\n",
+ "#result\n",
+ "print \"Capacity of channel =\",C/(10*1e6),\"Mb/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Capacity of channel = 1.0 Mb/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.5, Page Number: 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#variable Declaration\n",
+ "fLow = 3*1e6 #low frequency = 3MHz\n",
+ "fHigh = 4*1e6 #high frequency = 4MHz\n",
+ "SNR_dB = 20 #signal to noise ratio 20 dB\n",
+ "\n",
+ "#calculation\n",
+ "B = fHigh-fLow #Bandwidth(MHz)\n",
+ "S_N = 10**(SNR_dB/10)\n",
+ "C = B*(math.log(1+S_N)/math.log(2)) #capacity of channel(Mb/s)\n",
+ "\n",
+ "#result\n",
+ "print \"Capacity of channel=\",round(C/(1e6),1),\"Mb/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Capacity of channel= 6.7 Mb/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.6, Page Number: 14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#variable Declaration\n",
+ "P1 = 1 # Let p1 be 1 watt\n",
+ "P2 = P1*0.5 # P2 is half of p1 so 1/2\n",
+ "\n",
+ "#calculation\n",
+ "Atten_dB = 10*(math.log(P2/P1)/math.log(10)) #attenuation or loss of power(dB)\n",
+ "\n",
+ "#result\n",
+ "print \"Attenuation loss =\",round(Atten_dB,0), \"dB\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Attenuation loss = -3.0 dB\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.7, Page Number: 14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#variable Declaration\n",
+ "Loss_line1 = -9 #attenuation of signal between point 1 to 2 = 9 dB\n",
+ "Amp_gain2 = 14 #Amplification of signal between point 2 to 3 = 14 dB\n",
+ "Loss_line3 = -3 #attenuation of signal between point 3 to 4 = 3 dB\n",
+ "\n",
+ "#calculation\n",
+ "dB_at_line4 = Loss_line1+Amp_gain2+Loss_line3 #power gain\n",
+ "\n",
+ "#result\n",
+ "print \"Power gain for a signal travelling from point1 to another point4 = \",dB_at_line4, \"dB\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power gain for a signal travelling from point1 to another point4 = 2 dB\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/sample_notebooks/makarala shamukha venkatasahithi/Chapter_2_Nuclear_Sturcture_and_Radioactivity.ipynb b/sample_notebooks/makarala shamukha venkatasahithi/Chapter_2_Nuclear_Sturcture_and_Radioactivity.ipynb new file mode 100644 index 00000000..505cf999 --- /dev/null +++ b/sample_notebooks/makarala shamukha venkatasahithi/Chapter_2_Nuclear_Sturcture_and_Radioactivity.ipynb @@ -0,0 +1,234 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 2 Nuclear Sturcture and Radioactivity"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2_1 pgno:25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Half life of radioactive nuclide=t1/2=minutes 14.7674928978\n",
+ "\n",
+ "Time required for the activity to decrease to 25percent of the initial activity=t1=minutes 68.0335182976\n",
+ "\n",
+ "Time required for the activity to decrease to 10percent of the initial activity=t2=minutes 113.001227913\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log\n",
+ "N0=3396.;#no. of counts per minute given by radioactive nuclide at a given time#\n",
+ "N=1000.;#no. of counts per minute given by radioactive nuclide one hour later#\n",
+ "thalf=0.693*60/(2.303*log(N0/N));#half life of nuclide in minutes#\n",
+ "print'Half life of radioactive nuclide=t1/2=minutes',thalf\n",
+ "t1=2.303*log(100/25)*thalf/0.693;#time required for the activity to decrease to 25% of the initial activity in minutes#\n",
+ "print'\\nTime required for the activity to decrease to 25percent of the initial activity=t1=minutes',t1\n",
+ "t2=2.303*log(100/10)*thalf/0.693;#time required for the activity to decrease to 10% of the initial activity in minutes#\n",
+ "print'\\nTime required for the activity to decrease to 10percent of the initial activity=t2=minutes',t2\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2_2 pgno:27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Half life of 226Ra molecule=t1/2=years 1584.62090409\n"
+ ]
+ }
+ ],
+ "source": [
+ "R=3.7*10**10;#no. of alpha particles per second emitted by 1g of 226Ra#\n",
+ "N=(6.023*10**23)/226;#no. of atoms of 226Ra#\n",
+ "yr=3.15*10**7;#no of seconds in a year#\n",
+ "thalf=0.693*N/(R*yr);#half life of 226Ra in years#\n",
+ "print'Half life of 226Ra molecule=t1/2=years',thalf#here the answer written in textbook is wrongly printed actual answer will be the one we are getting here#\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2_3 pgno:29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Weight of 1 Ci of 24Na=w=micrograms=1.13*10**-7grams 0.113352495089\n"
+ ]
+ }
+ ],
+ "source": [
+ "thalf=14.8*60*60;#half life of 24Na atom in seconds#\n",
+ "L=6.023*10**23;#Avagadro number#\n",
+ "v=3.7*10**10;#1 Ci of radioactivity in disintegrations per second#\n",
+ "w=(24*10**6*v*thalf)/(0.693*L);#weight of 1 Ci of 24Na in grams#\n",
+ "print'Weight of 1 Ci of 24Na=w=micrograms=1.13*10**-7grams',w\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2_4 pgno:30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "dM value of H atom=dM=amu 0.00239\n",
+ "\n",
+ "Binding energy of H atom=BE=MeV 2.22509\n"
+ ]
+ }
+ ],
+ "source": [
+ "Mp=1.00728;#mass of proton in amu#\n",
+ "Mn=1.00866;#mass of neutronin amu#\n",
+ "MH=2.01355;#isotopic mass of H atom in amu#\n",
+ "dM=((1*Mp)+(1*Mn)-MH);#dM value of H atom in amu#\n",
+ "print'dM value of H atom=dM=amu',dM\n",
+ "BE=dM*931;#binding energy of H atom in MeV#\n",
+ "print'\\nBinding energy of H atom=BE=MeV',BE\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2_5 pgno:32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Age of the specimen=t=%fyears 36120.0499843\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log\n",
+ "N0=15.3;#decay rate of Contemporary Carbon in disintegrations/min/gram#\n",
+ "N=2.25;#decay rate of 14C specimen in disintegrtions/min/gram#\n",
+ "thalf=5670.;#half life of nuclide in years#\n",
+ "t=2.303*log(N0/N)*thalf/0.693;#Age of the specimen in years#\n",
+ "print'Age of the specimen=t=years',t#here the answer given in textbook is actually wrong we get twice that of the answer which is shown through execution#\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2_6 pgno:33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Here N0 and N must be in terms of Uranium.N is proportional to 1gram og Uranium\n",
+ "\n",
+ "N0 can be calculated from the given data.0.0453grams of 206Pb corresponds to 238*0.0453/206=0.0523grams of 238U,i.e 0.0453 grams of 206Pb must have been formed by the decaying of 0.523grams of 238U.\n",
+ "Since N is proportional to 1,N0 is proportional to 1.0523.\n",
+ "\n",
+ "Age of the mineral=t=years=7.62*10**8years 762356478.526\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log\n",
+ "thalf=4.5*10**9;#half life of Uranium in years#\n",
+ "print'Here N0 and N must be in terms of Uranium.N is proportional to 1gram og Uranium'\n",
+ "print'\\nN0 can be calculated from the given data.0.0453grams of 206Pb corresponds to 238*0.0453/206=0.0523grams of 238U,i.e 0.0453 grams of 206Pb must have been formed by the decaying of 0.523grams of 238U.\\nSince N is proportional to 1,N0 is proportional to 1.0523.'\n",
+ "N0=1.0523;\n",
+ "N=1;\n",
+ "t=2.303*log(N0/N)*thalf/0.693;#Age of the mineral in years#\n",
+ "print'\\nAge of the mineral=t=years=7.62*10**8years',t#here also the answer given in textbook is wrong the one resulted through execution is the right one#\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/sample_notebooks/makarala shamukha venkatasahithi/Chapter_5_Imperfection_in_Solids.ipynb b/sample_notebooks/makarala shamukha venkatasahithi/Chapter_5_Imperfection_in_Solids.ipynb new file mode 100755 index 00000000..0e2a1db4 --- /dev/null +++ b/sample_notebooks/makarala shamukha venkatasahithi/Chapter_5_Imperfection_in_Solids.ipynb @@ -0,0 +1,227 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 5 Imperfection in Solids"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5_1 pgno:56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 5.1\n",
+ "\n",
+ "\n",
+ " Equilibrium number of vacancies/m**3 is for 1273K 2.18444488963e+25\n"
+ ]
+ }
+ ],
+ "source": [
+ "# given that\n",
+ "Na=6.023*10**23 #Avogadro No.\n",
+ "rho=8.4e6 #Density of Copper in g/m**3\n",
+ "A=63.5 #Atomic weight of Copper\n",
+ "Qv=0.9 #Activation energy in eV\n",
+ "k=8.62*10**-5 #Boltzmann Constant in eV/K\n",
+ "T=1000+273#Temperature in K\n",
+ "from math import exp\n",
+ "print\"Example 5.1\\n\"\n",
+ "N=Na*rho/A #No. of atomic site per cubic meter\n",
+ "Nv=N*exp(-Qv/(k*T))\n",
+ "print\"\\n Equilibrium number of vacancies/m**3 is for 1273K\",Nv\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5_3 pgno:57"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " Example 5.3\n",
+ "\n",
+ "\n",
+ " Atomic of Al is 98.7039833218\n",
+ "\n",
+ " Atomic of Cu is 1.29601667817\n"
+ ]
+ }
+ ],
+ "source": [
+ "# given that\n",
+ "C_Al=97. #Aluminium wt%\n",
+ "C_Cu=3. #Copper wt%\n",
+ "A_Al=26.98 #Atomic wt of Aluminium\n",
+ "A_Cu=63.55 #Atomic wt of Copper\n",
+ "\n",
+ "print\" Example 5.3\\n\"\n",
+ "CAl=C_Al*A_Cu*100/((C_Al*A_Cu)+(C_Cu*A_Al))\n",
+ "CCu=C_Cu*A_Al*100/((C_Cu*A_Al)+(C_Al*A_Cu))\n",
+ "print\"\\n Atomic of Al is\",CAl\n",
+ "print\"\\n Atomic of Cu is\",CCu\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5_4 pgno:58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 5.4\n",
+ "\n",
+ "\n",
+ " Number of Schottky defects are defects/m**3. 5.31422380078e+19\n"
+ ]
+ }
+ ],
+ "source": [
+ "# given that\n",
+ "Na=6.023*10**23 #Avogadro No.\n",
+ "rho=1.955 #Density of KCl in g/cm**3\n",
+ "A_k= 39.10 #Atomic weight of potassium in g/mol\n",
+ "A_cl= 35.45 #Atomic weight of Chlorine in g/mol\n",
+ "Qs=2.6 #Activation energy in eV\n",
+ "k=8.62*10**-5 #Boltzmann Constant in eV/K\n",
+ "T=500+273 #Temperature in K\n",
+ "from math import exp\n",
+ "\n",
+ "print\"Example 5.4\\n\"\n",
+ "A = A_k+A_cl # Molar mass of KCl in gram\n",
+ "N=Na*rho*1e6/A #No. of atomic site per cubic meter\n",
+ "Ns=N*exp(-Qs/(2*k*T))\n",
+ "print\"\\n Number of Schottky defects are defects/m**3.\",Ns\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5_6 pgno:58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 5.6\n",
+ "\n",
+ "\n",
+ " Part A\n",
+ "\n",
+ " Grain size number is \n",
+ "6.49185309633\n",
+ "\n",
+ " Part B\n",
+ "\n",
+ " At magnification of 85x\n",
+ "\n",
+ " Number of grains per inch square are\n",
+ "62.2837370242\n"
+ ]
+ }
+ ],
+ "source": [
+ "# given that \n",
+ "N=45. #Number of grains per square inch\n",
+ "M=85. # magnification\n",
+ "from math import log\n",
+ "print\"Example 5.6\\n\"\n",
+ "print\"\\n Part A\"\n",
+ "n=(log(N)/log(2))+1 #calculation for grain size no. N=2**(n-1)\n",
+ "print\"\\n Grain size number is \\n\",n\n",
+ "print\"\\n Part B\"\n",
+ "Nm=(100/M)**2*2**(n-1)\n",
+ "print\"\\n At magnification of 85x\\n\"\n",
+ "print\" Number of grains per inch square are\\n\",Nm\n",
+ "# answer in book is 62.6. It is because of rounding off at intermediate stages\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": []
+ },
+ {
+ "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/sample_notebooks/makarala shamukha venkatasahithi/Chapter_5_Imperfection_in_Solids_1.ipynb b/sample_notebooks/makarala shamukha venkatasahithi/Chapter_5_Imperfection_in_Solids_1.ipynb new file mode 100755 index 00000000..0e2a1db4 --- /dev/null +++ b/sample_notebooks/makarala shamukha venkatasahithi/Chapter_5_Imperfection_in_Solids_1.ipynb @@ -0,0 +1,227 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 5 Imperfection in Solids"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5_1 pgno:56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 5.1\n",
+ "\n",
+ "\n",
+ " Equilibrium number of vacancies/m**3 is for 1273K 2.18444488963e+25\n"
+ ]
+ }
+ ],
+ "source": [
+ "# given that\n",
+ "Na=6.023*10**23 #Avogadro No.\n",
+ "rho=8.4e6 #Density of Copper in g/m**3\n",
+ "A=63.5 #Atomic weight of Copper\n",
+ "Qv=0.9 #Activation energy in eV\n",
+ "k=8.62*10**-5 #Boltzmann Constant in eV/K\n",
+ "T=1000+273#Temperature in K\n",
+ "from math import exp\n",
+ "print\"Example 5.1\\n\"\n",
+ "N=Na*rho/A #No. of atomic site per cubic meter\n",
+ "Nv=N*exp(-Qv/(k*T))\n",
+ "print\"\\n Equilibrium number of vacancies/m**3 is for 1273K\",Nv\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5_3 pgno:57"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " Example 5.3\n",
+ "\n",
+ "\n",
+ " Atomic of Al is 98.7039833218\n",
+ "\n",
+ " Atomic of Cu is 1.29601667817\n"
+ ]
+ }
+ ],
+ "source": [
+ "# given that\n",
+ "C_Al=97. #Aluminium wt%\n",
+ "C_Cu=3. #Copper wt%\n",
+ "A_Al=26.98 #Atomic wt of Aluminium\n",
+ "A_Cu=63.55 #Atomic wt of Copper\n",
+ "\n",
+ "print\" Example 5.3\\n\"\n",
+ "CAl=C_Al*A_Cu*100/((C_Al*A_Cu)+(C_Cu*A_Al))\n",
+ "CCu=C_Cu*A_Al*100/((C_Cu*A_Al)+(C_Al*A_Cu))\n",
+ "print\"\\n Atomic of Al is\",CAl\n",
+ "print\"\\n Atomic of Cu is\",CCu\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5_4 pgno:58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 5.4\n",
+ "\n",
+ "\n",
+ " Number of Schottky defects are defects/m**3. 5.31422380078e+19\n"
+ ]
+ }
+ ],
+ "source": [
+ "# given that\n",
+ "Na=6.023*10**23 #Avogadro No.\n",
+ "rho=1.955 #Density of KCl in g/cm**3\n",
+ "A_k= 39.10 #Atomic weight of potassium in g/mol\n",
+ "A_cl= 35.45 #Atomic weight of Chlorine in g/mol\n",
+ "Qs=2.6 #Activation energy in eV\n",
+ "k=8.62*10**-5 #Boltzmann Constant in eV/K\n",
+ "T=500+273 #Temperature in K\n",
+ "from math import exp\n",
+ "\n",
+ "print\"Example 5.4\\n\"\n",
+ "A = A_k+A_cl # Molar mass of KCl in gram\n",
+ "N=Na*rho*1e6/A #No. of atomic site per cubic meter\n",
+ "Ns=N*exp(-Qs/(2*k*T))\n",
+ "print\"\\n Number of Schottky defects are defects/m**3.\",Ns\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5_6 pgno:58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example 5.6\n",
+ "\n",
+ "\n",
+ " Part A\n",
+ "\n",
+ " Grain size number is \n",
+ "6.49185309633\n",
+ "\n",
+ " Part B\n",
+ "\n",
+ " At magnification of 85x\n",
+ "\n",
+ " Number of grains per inch square are\n",
+ "62.2837370242\n"
+ ]
+ }
+ ],
+ "source": [
+ "# given that \n",
+ "N=45. #Number of grains per square inch\n",
+ "M=85. # magnification\n",
+ "from math import log\n",
+ "print\"Example 5.6\\n\"\n",
+ "print\"\\n Part A\"\n",
+ "n=(log(N)/log(2))+1 #calculation for grain size no. N=2**(n-1)\n",
+ "print\"\\n Grain size number is \\n\",n\n",
+ "print\"\\n Part B\"\n",
+ "Nm=(100/M)**2*2**(n-1)\n",
+ "print\"\\n At magnification of 85x\\n\"\n",
+ "print\" Number of grains per inch square are\\n\",Nm\n",
+ "# answer in book is 62.6. It is because of rounding off at intermediate stages\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": []
+ },
+ {
+ "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/sample_notebooks/manchukondasrinivasa rao/Chapter_7_Wave_Guides.ipynb b/sample_notebooks/manchukondasrinivasa rao/Chapter_7_Wave_Guides.ipynb new file mode 100644 index 00000000..38d38099 --- /dev/null +++ b/sample_notebooks/manchukondasrinivasa rao/Chapter_7_Wave_Guides.ipynb @@ -0,0 +1,299 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 7 Wave Guides"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7_1 pgno:75"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "-Critical wavelength = cm\n",
+ "15.24\n",
+ "-Guide wavelength = cm 13.3\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "c=3.*(10**8);\n",
+ "f=3000.*(10**8);\n",
+ "lo=c/f;\n",
+ "l=lo*(10**4);\n",
+ "m=1.;n=0;a=7.62;\n",
+ "lc=2*a;\n",
+ "print\"-Critical wavelength = cm\\n\",lc\n",
+ "lg=sqrt((l*l*lc*lc)/((lc*lc)-(l*l)));\n",
+ "print\"-Guide wavelength = cm\",round(lg*10)/10\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7_2 pgno:76"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Frequency of dominant mode = GHz 5.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "a=3;\n",
+ "lc=2*a;\n",
+ "Zs=500;n=377;c=3*(10**8);\n",
+ "lo=sqrt(1-((n/Zs)**2))*lc;\n",
+ "f=c/lo;\n",
+ "f1=f/(10**7);\n",
+ "print\"Frequency of dominant mode = GHz\",round(f1*100)/100\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7_3 pgno:78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(i)Cutoff wavelegth = cm\n",
+ "9.0\n",
+ "(ii)Guide wavelength = cm\n",
+ "3.59\n",
+ "(iii)Phase velocity = * 10**8 m/sec\n",
+ "3.23\n",
+ " Group velocity = * 10**8 m/sec\n",
+ "2.79\n",
+ "(iv)Characteristic impedance = ohm 406.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "a=4.5;b=3.;f=9.*(10**9);c=3.0*(10**8);n=377.\n",
+ "lo=c/f;\n",
+ "l=lo*(10**2);\n",
+ "lc=2*a;\n",
+ "print\"(i)Cutoff wavelegth = cm\\n\",lc\n",
+ "lg=l /(sqrt(1-((l/lc)**2)));\n",
+ "print\"(ii)Guide wavelength = cm\\n\",round(lg*100)/100\n",
+ "Vp=(lg/l)*c*10**-8;\n",
+ "print\"(iii)Phase velocity = * 10**8 m/sec\\n\",round(Vp*100)/100\n",
+ "Vg=(l/lg)*c*10**-8;\n",
+ "print\" Group velocity = * 10**8 m/sec\\n\",round(Vg*100)/100\n",
+ "Z=n/(sqrt(1-((l/lc)**2)));\n",
+ "print\"(iv)Characteristic impedance = ohm\",round(Z)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7_4 pgno:79"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total attenuation = db 681.88\n",
+ "The difference in result is due to erroneous value in textbook\n"
+ ]
+ }
+ ],
+ "source": [
+ "a=1.;c=3.*(10**8);f=(10**9);d=25.;\n",
+ "lc=2*a;\n",
+ "lo=c/f;\n",
+ "l=lo/(10**2);\n",
+ "att=(54.55/lc)*d;\n",
+ "print\"Total attenuation = db\",round(att*100)/100\n",
+ "#the difference in result is due to erroneous value in textbook.\n",
+ "print (\"The difference in result is due to erroneous value in textbook\")\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7_5 pgno:80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "-Phase velocity Vp = * 10**8 m/sec\n",
+ "4.2\n",
+ "-Group velocity Vg = * 10**8 m/sec\n",
+ "2.2\n",
+ "-Phase constant = radians/m 45.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,pi\n",
+ "c=3.*(10**8);f=3000.*(10**6);a=.0722;\n",
+ "lo=c/f;\n",
+ "lc=2*a;\n",
+ "lg=lo/(sqrt(1-((lo/lc)**2)));\n",
+ "Vp=(lg/lo)*c*10**-8;\n",
+ "print\"-Phase velocity Vp = * 10**8 m/sec\\n\",round(Vp*10)/10\n",
+ "Vg=(lo/lg)*c*10**-8;\n",
+ "print\"-Group velocity Vg = * 10**8 m/sec\\n\",round(Vg*10)/10\n",
+ "b=(2*pi)/lg;\n",
+ "print\"-Phase constant = radians/m\",round(b)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7_6 pgno:81"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(i)Cutoff frequency for TE11 = GHz\n",
+ "3.52\n",
+ "(ii)Cutoff frequency for TE01 = GHz 4.6\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "d=5.;c=3.*(10**8);\n",
+ "lo=1.706*d;\n",
+ "f=c/lo;\n",
+ "ff=f/(10**7);\n",
+ "print\"(i)Cutoff frequency for TE11 = GHz\\n\",round(ff*100)/100\n",
+ "l=1.306*d;\n",
+ "fc=c/l;\n",
+ "ffc=fc/(10**7);\n",
+ "print\"(ii)Cutoff frequency for TE01 = GHz\",round(ffc*10)/10\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7_7 pgno:82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "-Cutoff wavelength = cm\n",
+ "8.54\n",
+ "-Guide wavelength = cm\n",
+ "4.17\n",
+ "-Characteristic wave impedance = ohm 419.7\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,sqrt\n",
+ "c=3.*(10**8);f=8.*(10**9);r=2.5;h=1.84;n=377.;\n",
+ "l=c/f;\n",
+ "lo=l*(10**2);\n",
+ "lc=2*pi*r/h;\n",
+ "print\"-Cutoff wavelength = cm\\n\",round(lc*100)/100\n",
+ "lp=lo/(sqrt(1-((lo/lc)**2)));\n",
+ "print\"-Guide wavelength = cm\\n\",round(lp*100)/100\n",
+ "Zo=n/(sqrt(1-((lo/lc)**2)));\n",
+ "print\"-Characteristic wave impedance = ohm\",round(Zo*10)/10\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/sample_notebooks/pramodkumardesu/sample(Chapter6).ipynb b/sample_notebooks/pramodkumardesu/sample(Chapter6).ipynb new file mode 100755 index 00000000..a79c8bcb --- /dev/null +++ b/sample_notebooks/pramodkumardesu/sample(Chapter6).ipynb @@ -0,0 +1,307 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 6 Mechanical Properties"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6_1 pgno:151"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The value in psi is= 4992.60678261\n",
+ "The value of epselon 0.0005\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "F=1000#in lb\n",
+ "Ao=(pi/4)*(0.505)**2#in**2\n",
+ "rho=F/Ao\n",
+ "delta_I=0.001#in\n",
+ "I_o=2#in\n",
+ "e=delta_I/I_o\n",
+ "print\"The value in psi is=\",rho\n",
+ "print\"The value of epselon\",e"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6_2 pgno:152"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "1 The required crosssectional area of the rod in in^2:\n",
+ "1.1283791671 Diameter of rod in in:\n",
+ "0.000625 The maximum length of the rod in in:\n",
+ "100.0 The minimum strain allowed on rod:\n",
+ "2 The minimum cross-sectional area in in^2:\n"
+ ]
+ }
+ ],
+ "source": [
+ "#EXAMPLE 6.2\n",
+ "#page 152\n",
+ "# Initialisation of Variables\n",
+ "F=45000;#Force applied on an aluminum rod in lb\n",
+ "e=25000;#the maximum allowable stress on the rod in psi\n",
+ "l2=150;#the minimum length of the rod in in\n",
+ "e1=0.0025;#The strain appiled on rod\n",
+ "sigma=16670;#Stress applied on rod in psi\n",
+ "L=0.25;#The maximum allowable elastic deformation in in\n",
+ "from math import sqrt,pi\n",
+ "#CALCULATIONS\n",
+ "Ao1=F/e;#The required crosssectional area of the rod\n",
+ "d=sqrt((Ao1*4)/pi);#Diameter of rod in in\n",
+ "l1=e1*L;#The maximum length of the rod in in\n",
+ "e2=L/e1;#The minimum strain allowed on rod\n",
+ "Ao2=F/sigma;#The minimum cross-sectional area in in^2\n",
+ "print Ao1,\"The required crosssectional area of the rod in in^2:\"\n",
+ "print d,\"Diameter of rod in in:\"\n",
+ "print l1,\"The maximum length of the rod in in:\"\n",
+ "print e2,\"The minimum strain allowed on rod:\"\n",
+ "print Ao2,\"The minimum cross-sectional area in in^2:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6_3 pgno:154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "10000000.0 Modulus of elasticity of aluminum alloy from table 6-1:\n",
+ "50.15 The length after deformation of bar in in\n",
+ "0.003 Strain applied of aluminum alloy:\n"
+ ]
+ }
+ ],
+ "source": [
+ "#EXAMPLE 6.3\n",
+ "# Initialisation of Variables\n",
+ "sigma1=35000;#Stress applied of aluminum alloy in psi from table 6-1\n",
+ "e1=0.0035;##Strain applied of aluminum alloy from table 6-1\n",
+ "sigma2=30000;#Stress applied of aluminum alloy in psi\n",
+ "Lo=50;#initial length of aluminum alloy\n",
+ "#CALCULATIONS\n",
+ "E=sigma1/e1;#Modulus of elasticity of aluminum alloy\n",
+ "e2=sigma2/E;#Strain applied of aluminum alloy\n",
+ "L=Lo+(e2*Lo);#The length after deformation of bar in in\n",
+ "print E,\"Modulus of elasticity of aluminum alloy from table 6-1:\"\n",
+ "print L,\"The length after deformation of bar in in\"\n",
+ "print e2,\"Strain applied of aluminum alloy:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6_4 pgno:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "9.75 Percentage of Elongation:\n",
+ "37.8868738359 Percentage of Reduction in area:\n",
+ "The final length is less than 2.205 in because, after fracture, the elastic strain is recovered.\n"
+ ]
+ }
+ ],
+ "source": [
+ "#EXAMPLE 6.4\n",
+ "# Initialisation of Variables\n",
+ "Lf=2.195;#Final length after failure\n",
+ "d1=0.505;#Diameter of alluminum alloy in in\n",
+ "d2=0.398;#Final diameter of alluminum alloy in in\n",
+ "Lo=2;#Initial length of alluminum alloy \n",
+ "from math import pi\n",
+ "#CALCULATIONS\n",
+ "A0=(pi/4)*d1**2;#Area of original of alluminum alloy\n",
+ "Af=(pi/4)*d2**2;#Area of final of alluminum alloy\n",
+ "E=((Lf-Lo)/Lo)*100;#Percentage of Elongation \n",
+ "R=((A0-Af)/A0)*100;#Percentage of Reduction in area\n",
+ "print E,\"Percentage of Elongation:\"\n",
+ "print R,\"Percentage of Reduction in area:\"\n",
+ "print\"The final length is less than 2.205 in because, after fracture, the elastic strain is recovered.\" "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6_5 pgno:155"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "39940.8542609 Engineering stress in psiAt the tensile or maximum load\n",
+ "41237.025201 True stress in psi At the tensile or maximum load\n",
+ "0.06 Engineering strain At the tensile or maximum load\n",
+ "0.058268908124 True strain At the tensile or maximum load\n",
+ "37943.8115478 Engineering stress At fracture:\n",
+ "61088.2335041 True stress At fracture\n",
+ "0.1025 Engineering strain At fracture:\n",
+ "0.476212847982 True strain At fracture:\n"
+ ]
+ }
+ ],
+ "source": [
+ "#EXAMPLE 6.5\n",
+ "# Initialisation of Variables\n",
+ "F=8000.;#.......#Load applied for the aluminum alloy in lb\n",
+ "F2=7600.;#......#Load applied for the aluminum alloy in lb at fracture\n",
+ "dt1=0.505;#.......#diameter of for the aluminum alloy in in\n",
+ "dt2=0.497;#.......#The diameter at maximum load\n",
+ "Lt=2.120;#..........#Final length at maxium load\n",
+ "Lot=2.;#.............#Initial length of alluminum alloy\n",
+ "Ff=7600.;#.........#Load applied for the aluminum alloy after fracture in lb\n",
+ "df=0.398;#.......#The diameter at maximum load after fracture\n",
+ "Lf=0.205;#.......#Final length at fracture\n",
+ "from math import pi,log\n",
+ "#CALCULATIONS\n",
+ "Es=F/((pi/4)*dt1**2);#.....#Engineering stress in psiAt the tensile or maximum load\n",
+ "Ts=F/((pi/4)*dt2**2);#.....#True stress in psi At the tensile or maximum load\n",
+ "Ee=(Lt-Lot)/Lot;#........#Engineering strain At the tensile or maximum load\n",
+ "Te=log(Lt/Lot);#........#True strain At the tensile or maximum load\n",
+ "Es2=F2/((pi/4)*dt1**2);#......##Engineering stress At fracture:\n",
+ "Ts2=F2/((pi/4)*df**2);#......#True stress At fracture:\n",
+ "Ee2=Lf/Lot;#..........#Engineering strain At fracture:\n",
+ "Te2=log(((pi/4)*dt1**2)/((pi/4)*df**2));#.......#True strain At fracture:\n",
+ "print Es,\"Engineering stress in psiAt the tensile or maximum load\"\n",
+ "print Ts,\"True stress in psi At the tensile or maximum load\"\n",
+ "print Ee,\"Engineering strain At the tensile or maximum load\"\n",
+ "print Te,\"True strain At the tensile or maximum load\"\n",
+ "print Es2,\"Engineering stress At fracture:\"\n",
+ "print Ts2,\"True stress At fracture\"\n",
+ "print Ee2,\"Engineering strain At fracture:\"\n",
+ "print Te2,\"True strain At fracture:\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6_6 pgno:156"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "421.875 The force required to fracture the material in lb:\n",
+ "0.0277777777778 The deflection of the sample at fracture in in\n"
+ ]
+ }
+ ],
+ "source": [
+ "#EXAMPLE 6.6\n",
+ "# Initialisation of Variables\n",
+ "Fs=45000;#.......#The flexural strength of a composite material in psi\n",
+ "Fm=18*10**6;#........#The flexural modulus of composite material in psi\n",
+ "w=0.5;#.......#wide of sample in in\n",
+ "h=0.375;#......#Height of sample in in\n",
+ "l=5;#..........#Length of sample in in\n",
+ "#CALCULATIONS\n",
+ "F=Fs*2*w*h**2/(3*l);#......#The force required to fracture the material in lb\n",
+ "delta=(l**3)*F/(Fm*4*w*h**3);#.......#The deflection of the sample at fracture \n",
+ "print F,\"The force required to fracture the material in lb:\"\n",
+ "print delta,\"The deflection of the sample at fracture in in\"\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/sample_notebooks/sanketkhair/chapter4.ipynb b/sample_notebooks/sanketkhair/chapter4.ipynb new file mode 100644 index 00000000..f35bbbba --- /dev/null +++ b/sample_notebooks/sanketkhair/chapter4.ipynb @@ -0,0 +1,159 @@ +{ + "metadata": { + "celltoolbar": "Raw Cell Format", + "name": "", + "signature": "sha256:01140ffa208fb1ff4e49e5a80a5419f4194d3a8c5f0baf26d8febde3805a9450" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4: Optical Detectors" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1,Page number 99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "Tn=5; #in micrometer\n", + "Vs=10**7; #in m/s\n", + "tr=Tn*10**-6/Vs;\n", + "print\"Response time\",tr/10**-12,\"ps\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Response time 0.5 ps\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2,Page number 106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "\n", + "Pd=1.15; #in mW\n", + "\n", + "TA=25; #in deg C\n", + "theta_JA=200; #in C/W for hermetric led\n", + "TJ=TA+theta_JA*Pd/10**3;\n", + "TF=8.01*10**12 *math.e**-(8111/(TJ+273));\n", + "print\"Value of TJ is\" ,round(TJ,4), \"deg C\";\n", + "print\"Value of TF is\" ,round(TF,4), \"deg C\";\n", + "\n", + "BF=1.1*10**-3; #from table\n", + "QF=0.5; #from table\n", + "EF=1; #from table\n", + "RF=BF*TF*EF*QF*1/10**6;\n", + "print\"Value of RF\",\"{0:.3e}\".format(RF);\n", + "print\"Value of MTBF is \",round(1/RF/10**6,4),\"*10^6 hours \\n\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of TJ is 25.23 deg C\n", + "Value of TF is 12.3614 deg C\n", + "Value of RF 6.799e-09\n", + "Value of MTBF is 147.0849 *10^6 hours \n", + "\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3,Page number 114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#given\n", + "\n", + "R1=0.7;\n", + "R2=0.99;\n", + "ad=0.1;\n", + "\n", + "Ld=1-R1*R2*math.e**-(2*ad);\n", + "print\"Decay Loss \",round(Ld,4);\n", + "trt=40; #fs\n", + "tph=trt/Ld;\n", + "print\"Photon lifetime \",round(tph,4),\"fs\";\n", + "BW=1/tph;\n", + "print\"Bandwidth\",round(BW*1000,4) ,\"Thz\"; #Answer in Thz \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Decay Loss 0.4326\n", + "Photon lifetime 92.46 fs\n", + "Bandwidth 10.8155 Thz\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/srinivasparupalli/CHAPTER2.ipynb b/sample_notebooks/srinivasparupalli/CHAPTER2.ipynb new file mode 100755 index 00000000..91657135 --- /dev/null +++ b/sample_notebooks/srinivasparupalli/CHAPTER2.ipynb @@ -0,0 +1,116 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:a87b776675d5bac90b6fac25c1a236bc0e485ed79b01767e8b8d1e2b69104021"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "CHAPTER 2- Mechanical Behavior, Testing, and Manufacturing Properties of Materials"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 2.1 - PG NO. 63"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#example 2.1,chapter 2, page 63\n",
+ "\n",
+ "# Given that\n",
+ "#True stress=100000*(True strain)**0.5\n",
+ "\n",
+ "# Sample Problem on page no. 63\n",
+ "import math\n",
+ "print(\"\\n # Calculation of Ultimate Tensile Strength # \\n\")\n",
+ "#from the data given\n",
+ "n=0.5\n",
+ "E=0.5\n",
+ "K=690.\n",
+ "Truestress=K*((E)**n)\n",
+ "#let An(area of neck)/Ao=t\n",
+ "#from math.log(Ao/An)=n\n",
+ "print'%s %d %s' %(\"true Ultimate Tensile Strength =\",round(Truestress),\"MPa \\n\")\n",
+ "t=math.exp(-n)\n",
+ "UTS=Truestress*math.exp(-n)#from the math.expression UTS= P/Ao where P(Maximum Load)=Truestress*An\n",
+ "print'%s %d %s' %(\"Ultimate Tensile Strength =\",round(UTS),\"MPa\")\n",
+ "#answer in the book is approximated to 42850 psi \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ " # Calculation of Ultimate Tensile Strength # \n",
+ "\n",
+ "true Ultimate Tensile Strength = 488 MPa \n",
+ "\n",
+ "Ultimate Tensile Strength = 296 MPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 2.2 - PG NO. 72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#example 2.1,chapter 2, page 72\n",
+ "\n",
+ "print(\"## Calculation of Modulus of Resilience from Hardness ##\\n\")\n",
+ "#given data\n",
+ "Hardness=300.\n",
+ "Y=100.#\n",
+ "E=210000.\n",
+ "a=100.*100.\n",
+ "b=2.*210000.\n",
+ "Modulus=a/b\n",
+ "print(\"The area under the stress-strain curve is :\\n\")\n",
+ "print'%s %.4f %s' %(\"Modulus of Resilience =\",Modulus*9.81,\"mm-kg/mm^3\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "## Calculation of Modulus of Resilience from Hardness ##\n",
+ "\n",
+ "The area under the stress-strain curve is :\n",
+ "\n",
+ "Modulus of Resilience = 0.2336 mm-kg/mm^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/sample_notebooks/sureshp/CHAPTER1.ipynb b/sample_notebooks/sureshp/CHAPTER1.ipynb new file mode 100755 index 00000000..6c66d92e --- /dev/null +++ b/sample_notebooks/sureshp/CHAPTER1.ipynb @@ -0,0 +1,206 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:cb7821e52dda76fa27e45154f9c14ca9fa493fbd763be86cc9be92d018411582"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "CHAPTER 1 - Breakdown Mechanism of Gases Liquid and Solid Materials"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 1.1 - PG NO.51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Chapter 1,Example 1.1 Page 51\n",
+ "import math\n",
+ "I = 600. # micor amps\n",
+ "x = 0.5 # distance in cm\n",
+ "V = 10. # kV\n",
+ "I2 = 60. # micro amps\n",
+ "x2 = 0.1 # distance in cm \n",
+ "#Calculation 600 = I0*exp(0.5*alpha) and 60 = I0*exp(0.1*alpha)\n",
+ "alpha =math.log(600./60.)/(0.5-0.1)\n",
+ "print'%s %.3f %s' %(\"Townsends first ionising coefficient = \",alpha,\" ionizing collisions/cm\")\n",
+ "\n",
+ "#Answers may vary due to round of error \n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Townsends first ionising coefficient = 5.756 ionizing collisions/cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 1.2 - PG NO.52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Chapter 1,Example 1.2 Page 52\n",
+ "import math\n",
+ "# Refering the table in example 1.2\n",
+ "# slope between any two points (math.log(I/I0)/x)\n",
+ "# taking the gap between 2 and 2.5 mm\n",
+ "I1= 1.5*10**-12\n",
+ "I2= 5.6*10**-12\n",
+ "I0 = 6*10**-14\n",
+ "gi1 = math.log(I1/I0) # gradual increase when gap is 2\n",
+ "gi2 = math.log(I2/I0) # gradual increase when gap is 2.5 #claculation in text is wrong\n",
+ "slope = (gi1-gi2)/0.05\n",
+ "print'%s %.3f %s' %(\"Slope = \", -slope,'\\n') \n",
+ "#evaluvating ghama\n",
+ "e1 = math.exp(-slope*0.5)\n",
+ "e2 = math.exp(-slope*0.5) # -1 is ignored due to the large magnitude\n",
+ "ghama = (7*10**7-6*e1)/(e2*7*10**7)\n",
+ "print'%s %.3f %s' %(\"Ghama for set 1= \", ghama*100000,\"*10^-5 /cm \\n \")\n",
+ "#Gap between the slope for set 2\n",
+ "alpha = math.log(12./8.)/0.05\n",
+ "print'%s %.1f %s' %(\"Alpha = \", alpha,\" collosions/cm \\n\")\n",
+ "e1 = math.exp(alpha*0.5)\n",
+ "e2 = math.exp(alpha*0.5) # -1 is ignored due to the large magnitude\n",
+ "ghama = (2*10**5-e1)/(e2*2*10**5)\n",
+ "print'%s %.1f %s' %(\"Ghama for set 2=\", ghama*100,\"*10^-2 colissions/cm \\n\")\n",
+ "\n",
+ "#Answers may vary due to round of error \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Slope = 26.346 \n",
+ "\n",
+ "Ghama for set 1= 0.182 *10^-5 /cm \n",
+ " \n",
+ "Alpha = 8.1 collosions/cm \n",
+ "\n",
+ "Ghama for set 2= 1.7 *10^-2 colissions/cm \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 1.3 - PG NO.53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Chapter 1,Example 1.3 Page 53\n",
+ "\n",
+ "#employing equation Vb = K*d**n\n",
+ "#88 = K*4**n --- eq(1) 165 = K*8**n ---eq(2) \n",
+ "#dividing eq(2)/q(1)\n",
+ "Vb1 = 88.\n",
+ "Vb2 = 165.\n",
+ "n1 = 0.6286/0.693\n",
+ "K1 = Vb1/4**n1\n",
+ "#135 = K*6**n --- eq(1) 212 = K*10**n ---eq(2) \n",
+ "#dividing eq(2)/q(1) \n",
+ "Vb1 = 135.\n",
+ "Vb2 = 212.\n",
+ "n2 = 0.4513/0.5128\n",
+ "K2 = Vb1/6.**n2\n",
+ "n = (n1+n2)/2.\n",
+ "K = (K1+K2)/2.\n",
+ "print'%s %.2f %s %.2f' % (\"n =\",n,\"K = \",K,)\n",
+ "\n",
+ "#Answer may vary due to round of error \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "n = 0.89 K = 26.46\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 1.4 - PG NO.53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Chapter 1,Example 1.4 Page 53\n",
+ "# Determine (pd)min Vbmin\n",
+ "import math\n",
+ "A = 12.\n",
+ "B = 365.\n",
+ "e = 2.718\n",
+ "ghama = 0.02\n",
+ "K = 51.\n",
+ "pd = (e/A)*math.log(1.+(1./ghama))\n",
+ "Vbmin = (B/A)*e*math.log(K)\n",
+ "print'%s %.2f %s %d %s' % (\"(pd)min = \",pd,\" Vbmin = \",Vbmin,\"Volts\")\n",
+ "\n",
+ "#Answers may vary due to round of error\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(pd)min = 0.89 Vbmin = 325 Volts\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/sample_notebooks/vijayadurga/sample_(chapter_3).ipynb b/sample_notebooks/vijayadurga/sample_(chapter_3).ipynb new file mode 100755 index 00000000..f655751e --- /dev/null +++ b/sample_notebooks/vijayadurga/sample_(chapter_3).ipynb @@ -0,0 +1,410 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 3 Fundamentals of Fault Clearing and Switching Phenomena"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_1 pgno:24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "the transient current =A 1.56\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,exp\n",
+ "from math import atan,sin\n",
+ "from math import sqrt\n",
+ "R=10; \n",
+ "L=0.1; \n",
+ "f=50; \n",
+ "w=2*pi*f; \n",
+ "k=sqrt((R**2)+((w*L)**2));\n",
+ "angle=atan(w*L/R);\n",
+ "E=400 \n",
+ "A=E*sin(angle)/k;\n",
+ "i=A*exp((-R)*.02/L);\n",
+ "i=round(i*100)/100;\n",
+ "print\"the transient current =A\",i\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_2 pgno:26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "current in amperes for part1=A\n",
+ "4.1\n",
+ "current in part 2& part 3= 0\n",
+ "\n",
+ "the DC component vanishes if e=V 141.4\n",
+ "\n",
+ "current at .5 cycles for t1=sec \n",
+ "current in the problem = A 0.01 1.50368424845\n",
+ "\n",
+ "current at 1.5 cycles for t2=sec \n",
+ "current in the problem = A 0.03 0.203501533662\n",
+ "\n",
+ "current at 5.5 cycles for t3=sec \n",
+ "current in the problem = A 0.11 6.82671592646e-05\n",
+ "the difference in result is due to erroneous value in textbook.\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,sin,atan,pi,exp\n",
+ "R=10; \n",
+ "L=0.1; \n",
+ "f=50; \n",
+ "w=2*pi*f; \n",
+ "k=sqrt((R**2)+((w*L)**2));\n",
+ "angle=atan(w*L/R); \n",
+ "E=100; \n",
+ "Em=sqrt(2)*E; \n",
+ "A=Em*sin(angle)/k;\n",
+ "i1=A; \n",
+ "Em=round(Em*10)/10;\n",
+ "i1=round(i1*10)/10;\n",
+ "print\"current in amperes for part1=A\\n\",i1\n",
+ "print\"current in part 2& part 3= 0\\n\"\n",
+ "print\"the DC component vanishes if e=V\",Em#the error is due to the erroneous values in the textbook\n",
+ "\n",
+ "t1=0.5*.02; \n",
+ "i2=A*exp((-R)*t1/L);\n",
+ "print\"\\ncurrent at .5 cycles for t1=sec \\ncurrent in the problem = A\",t1,i2\n",
+ "t2=1.5*.02;\n",
+ "i3=A*exp((-R)*t2/L);\n",
+ "print\"\\ncurrent at 1.5 cycles for t2=sec \\ncurrent in the problem = A\",t2,i3\n",
+ "t3=5.5*.02;\n",
+ "i4=A*exp((-R)*t3/L);\n",
+ "print\"\\ncurrent at 5.5 cycles for t3=sec \\ncurrent in the problem = A\",t3,i4\n",
+ "\n",
+ "\n",
+ "print\"the difference in result is due to erroneous value in textbook.\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_3 pgno:28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "frequency of oscillations=c/s 72400.0\n",
+ "\n",
+ "time of maximum restriking voltage=microsec 3.46\n",
+ "\n",
+ "maximum restriking voltage=V/microsecs 2430.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt,e,pi\n",
+ "C=.003e-6 \n",
+ "L=1.6e-3 \n",
+ "y=sqrt(L*C);\n",
+ "y=round(y*1e7)/1e7;\n",
+ "f=(2*3.14*y)**-1; \n",
+ "f=round(f/100)*100;\n",
+ "i=7500;\n",
+ "E=i*2*3.15*L*50;\n",
+ "Em=1.414*E;\n",
+ "Em=round(Em/10)*10\n",
+ "t=y*pi/2;\n",
+ "t=t*1e6;\n",
+ "t=round(t*100)/100;\n",
+ "e=Em/y;\n",
+ "e=round((e)/1e6)*1e6;\n",
+ "e=round(e/1e7)*1e7\n",
+ "print\"frequency of oscillations=c/s\",f\n",
+ "print\"\\ntime of maximum restriking voltage=microsec\",t\n",
+ "print\"\\nmaximum restriking voltage=V/microsecs\",e/1e6\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_4 pgno:30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "peak restriking voltage=kV 18.0\n",
+ "\n",
+ "frequency of oscillations=c/s 12637.7514913\n",
+ "\n",
+ "average rate of restriking voltage=kV/microsecs 0.455\n",
+ "\n",
+ "max restriking voltage=V/microsecs 714.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,sqrt\n",
+ "R=5 \n",
+ "f=50\n",
+ "L=R/(2*pi*f);\n",
+ "V=11e3;\n",
+ "Vph=11/sqrt(3);\n",
+ "C=0.01e-6;\n",
+ "y=sqrt(L*C);\n",
+ "Em=sqrt(2)*Vph;\n",
+ "ep=2*Em;\n",
+ "ep=round(ep*10)/10;\n",
+ "y=round(y*1e7)/1e7;\n",
+ "t=y*pi;\n",
+ "t=round(t*1e7)/1e7\n",
+ "ea=ep/t;\n",
+ "ea=round(ea/1e3)*1e3\n",
+ "fn=(2*3.14*y)**-1;\n",
+ "Em=round(Em)\n",
+ "Emax=Em/y;\n",
+ "Emax=round(Emax/1000)*1e3;\n",
+ "print\"peak restriking voltage=kV\",ep\n",
+ "print\"\\nfrequency of oscillations=c/s\",fn\n",
+ "print\"\\naverage rate of restriking voltage=kV/microsecs\",ea/1e6\n",
+ "print\"\\nmax restriking voltage=V/microsecs\",Emax/1e3\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_5 pgno:31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "average restriking voltage=V/microsecs 1220.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,sqrt\n",
+ "E=19.1*1e3;\n",
+ "L=10*1e-3;\n",
+ "C=.02*1e-6;\n",
+ "Em=sqrt(2)*E;\n",
+ "y=sqrt(L*C);\n",
+ "t=pi*y*1e6;\n",
+ "emax=2*Em;\n",
+ "eavg=emax/t;\n",
+ "eavg=round(eavg/10)*10\n",
+ "print\"average restriking voltage=V/microsecs\",eavg\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_6 pgno:33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "average restriking voltage=kV/microsecs 4.8\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import e,sqrt,acos,sin\n",
+ "V=78e3;\n",
+ "Vph=V/sqrt(3);\n",
+ "Em=2*Vph;\n",
+ "pf=0.4;\n",
+ "angle=acos(pf);\n",
+ "k1=sin(angle); \n",
+ "k1=round(k1*100)/100;\n",
+ "k2=.951;\n",
+ "k3=1;\n",
+ "k=k1*k2*k3;\n",
+ "k=round(k*1000)/1e3;\n",
+ "E=k*Em;\n",
+ "f=15000.; \n",
+ "t=1/(2*f);\n",
+ "t=round(t*1e6);\n",
+ "eavg=2*E/t;\n",
+ "eavg=round(eavg/100)*100;\n",
+ "print\"average restriking voltage=kV/microsecs\",eavg/1e3\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_7 pgno:35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "average voltage in volts=V/microsecs 1430.0\n",
+ "frequency of oscillation =c/s 7143.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "Em=100e3\n",
+ "t=70e-6\n",
+ "Ea=Em/t/1e6\n",
+ "f=1/(2*t);\n",
+ "Ea=round(Ea/10)*10;\n",
+ "f=round(f);\n",
+ "print\"average voltage in volts=V/microsecs\",Ea\n",
+ "print\"frequency of oscillation =c/s\",f\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3_8 pgno:37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "damping resistance in ohms=kohms 12.25\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "L=6; \n",
+ "C=0.01e-6;\n",
+ "i=10;\n",
+ "v=i*sqrt(L/C);\n",
+ "R=.5*v/i;\n",
+ "R=round(R/10)*10;\n",
+ "print\"damping resistance in ohms=kohms\",R/1e3\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": []
+ },
+ {
+ "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
+}
|