diff options
Diffstat (limited to 'TestContribution')
35 files changed, 7770 insertions, 0 deletions
diff --git a/TestContribution/Chapter2.ipynb b/TestContribution/Chapter2.ipynb new file mode 100755 index 00000000..f5907f3a --- /dev/null +++ b/TestContribution/Chapter2.ipynb @@ -0,0 +1,322 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:d3b8a40a5268a38ad3fc311ebed2078460c9192ee65f2f5e3922c8f65a52bf49"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2: Properties of Pure Substances"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2.1:pg-22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initialization of variables\n",
+ "\n",
+ "m=1; #mass of saturated water in kg\n",
+ "\n",
+ " # All the necessary values are taken from table C-2\n",
+ " \n",
+ "# part (a)\n",
+ "\n",
+ "P=0.001; # Pressure in MPa\n",
+ "vf=0.001; #specific volume of saturated liquid at 0.001 Mpa in Kg/m^3\n",
+ "vg=129.2; # specific volume of saturated vapour at 0.001 Mpa in Kg/m^3\n",
+ "deltaV=m*(vg-vf) # by properties of pure substance \n",
+ "# result\n",
+ "print \"The Volume change at pressure \",(P),\" MPa is\",round(deltaV,1),\" m^3/kg \\n\"\n",
+ "\n",
+ "# part (b) \n",
+ "\n",
+ "P=0.10; # Pressure in MPa\n",
+ "vf=0.001; # specific volume of saturated liquid at 0.26 MPa( it is same from at 0.2 and 0.3 MPa upto 4 decimals)\n",
+ "vg=1.694; # specific volume of saturated vapour at 0.1 Mpa\n",
+ "deltaV=m*(vg-vf) # by properties of pure substance\n",
+ "# result\n",
+ "print \"The Volume change at pressure \",(P),\" MPa is\",round(deltaV,3),\" m^3/kg \\n\"\n",
+ "\n",
+ "# part (c) \n",
+ "P=10; # Pressure in MPa\n",
+ "vf=0.00145; # specific volume of saturated liquid at 10 MPa\n",
+ "vg=0.01803; # specific volume of saturated vapour at 10 MPa\n",
+ "deltaV=m*(vg-vf) # by properties of pure substance \n",
+ "# result\n",
+ "print \"The Volume change at pressure \",(P),\" MPa is\",round(deltaV,5),\" m^3/kg \\n\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Volume change at pressure 0.001 MPa is 129.2 m^3/kg \n",
+ "\n",
+ "The Volume change at pressure 0.1 MPa is 1.693 m^3/kg \n",
+ "\n",
+ "The Volume change at pressure 10 MPa is 0.01658 m^3/kg \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2.2:pg-23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initialization of variables\n",
+ "m=4.0 # mass of water in kg\n",
+ "V=1.0 # volume in m^3\n",
+ "T=150 # temperature of water in degree centigrade\n",
+ "\n",
+ "# TABLE C-1 is used for values in wet region\n",
+ "# Part (a)\n",
+ "P=475.8 # pressure in KPa in wet region at temperature of 150 *C\n",
+ "print \" The pressure is\",round(P,1),\" kPa \\n\"\n",
+ "\n",
+ "# Part (b)\n",
+ "#first we determine the dryness fraction\n",
+ "v=V/m # specific volume of water\n",
+ "vg=0.3928 # specific volume of saturated vapour @150 degree celsius\n",
+ "vf=0.00109 # specific volume of saturated liquid @150 degree celsius\n",
+ "x=(v-vf)/(vg-vf); # dryness fraction\n",
+ "mg=m*x; # mass of vapour\n",
+ "print \" The mass of vapour present is\",round(mg,3),\" kg \\n\"\n",
+ "\n",
+ "# Part(c) \n",
+ "Vg=vg*mg; # volume of vapour\n",
+ "print \" The volume of vapour is\",round(Vg,4),\" m^3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The pressure is 475.8 kPa \n",
+ "\n",
+ " The mass of vapour present is 2.542 kg \n",
+ "\n",
+ " The volume of vapour is 0.9984 m^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2.3:pg-23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initialization of variables\n",
+ "m=4 # mass of water in kg\n",
+ "P=220 # pressure in KPa\n",
+ "x=0.8 # quality of steam\n",
+ "\n",
+ "# Table C-2 is used for values\n",
+ "\n",
+ "vg=(P-200)*(0.6058-0.8857)/(300-200)+0.8857 # specific volume of saturated vapour @ given pressure by interpolating\n",
+ "vf=0.0011 # specific volume of saturated liquid at 220 KPa\n",
+ "v=vf+x*(vg-vf)# property of pure substance\n",
+ "V=m*v # total volume\n",
+ "#result\n",
+ "print \"The Total volume of the mixture is \",round(V,3),\" m^3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Total volume of the mixture is 2.656 m^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Ex2.4:pg-23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initialization of variables\n",
+ "m=2 # mass of water in lb\n",
+ "P=540 # pressure in psi\n",
+ "T=700 # temperature in degree fahrenheit\n",
+ " # Table C-3E is used for values\n",
+ "v=1.3040+(P-500)*(1.0727-1.3030)/(600-500) # specific volue by interpolatin between 500 and 600 psi\n",
+ "V=m*v # final volume\n",
+ "print \"The Final Volume is\",round(V,3),\" ft^3\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Final Volume is 2.424 ft^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2.5:pg-25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# initialization of variables\n",
+ "V=0.6 # volume of tyre in m^3\n",
+ "Pgauge=200 # gauge pressure in KPa\n",
+ "T=20+273 # temperature converted to kelvin\n",
+ "Patm=100 # atmospheric pressure in KPa\n",
+ "R=287 # gas constant in Nm/kg.K\n",
+ "Pabs=(Pgauge+Patm)*1000 # calculating absolute pressue in Pa \n",
+ "\n",
+ "m=Pabs*V/(R*T)# mass from ideal gas equation\n",
+ "print \"The Mass of air is\",round(m,2),\" Kg\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Mass of air is 2.14 Kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2.6:pg-26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "# initialization of variables\n",
+ "T=500+273 # temperature of steam in kelvin\n",
+ "rho=24.0 # density in Kg/m^3\n",
+ "R=0.462 # gas constant from Table B-2\n",
+ "v=1/rho # specific volume and density relation\n",
+ "# PART (a)\n",
+ "P=rho*R*T # from Ideal gas equation\n",
+ "print \" PART (a) The Pressure is \",int(P),\" KPa \\n\"\n",
+ "# answer is approximated in textbook\n",
+ "\n",
+ "# PART (b)\n",
+ "a=1.703 # van der Waal's constant a value from Table B-8\n",
+ "b=0.00169 # van der Waal's constant b value from Table B-8\n",
+ "P=(R*T/(v-b))-(a/v**2) # Pressure from van der Waals equation\n",
+ "print \" PART (b) The Pressure is \",int(P),\" KPa \\n\"\n",
+ "# answer is approximated in textbook\n",
+ "\n",
+ "# PART (c)\n",
+ "a=43.9 # van der Waal's constant a value from Table B-8\n",
+ "b=0.00117 # van der Waal's constant b value from Table B-8\n",
+ "\n",
+ "P=(R*T/(v-b))-(a/(v*(v+b)*math.sqrt(T))) # Redlich-Kwong equation\n",
+ "print \" PART (c) The Pressure is \",int(P),\" KPa \\n\"\n",
+ "# answer is approximated in textbook\n",
+ "\n",
+ "# PART (d)\n",
+ "Tcr=947.4 # compressibilty temperature from table B-3\n",
+ "Pcr=22100 # compressibility pressure from table B-3\n",
+ "\n",
+ "TR=T/Tcr # reduced temperature\n",
+ "PR=P/Pcr # reduced pressure\n",
+ "Z=0.93 # from compressiblility chart\n",
+ "P=Z*R*T/v # Pressure in KPa\n",
+ "print \" PART (d) The Pressure is \",int(P),\" KPa \\n\"\n",
+ "# answer is approximated in textbook\n",
+ "\n",
+ "# PART (e)\n",
+ "P=8000 # pressure from steam table @ 500*c and v= 0.0417 m^3\n",
+ "print \" PART (e) The Pressure is \",int(P),\" KPa \\n\"\n",
+ "# answer is approximated in textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " PART (a) The Pressure is 8571 KPa \n",
+ "\n",
+ " PART (b) The Pressure is 7952 KPa \n",
+ "\n",
+ " PART (c) The Pressure is 7934 KPa \n",
+ "\n",
+ " PART (d) The Pressure is 7971 KPa \n",
+ "\n",
+ " PART (e) The Pressure is 8000 KPa \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/TestContribution/README.txt b/TestContribution/README.txt new file mode 100755 index 00000000..e9a60064 --- /dev/null +++ b/TestContribution/README.txt @@ -0,0 +1,10 @@ +Contributed By: Test Contributor +Course: mtech +College/Institute/Organization: IIT +Department/Designation: CS +Book Title: TestContribution +Author: TestContribution +Publisher: TestContribution +Year of publication: Test +Isbn: TestContribution +Edition: TestContributio
\ No newline at end of file diff --git a/TestContribution/abhisheksharma.ipynb b/TestContribution/abhisheksharma.ipynb new file mode 100755 index 00000000..e09e86cb --- /dev/null +++ b/TestContribution/abhisheksharma.ipynb @@ -0,0 +1,946 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:54ccd26f8e7172369b740037968be286180ddfff5f2fc10ebe6be83fc34647f9"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "HF,VHF AND UHF ANTENNAS (CHAPTER 6)"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.1,PAGE NUMBER 278 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi,sin\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "f = 30 # frequency in MHz\n",
+ "f = 30*10**6 # frequency in Hz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "lamda = c/f # wavelength in meter\n",
+ "Delta = 30 # angle of elevation in Degrees\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "H = lamda/(4 * sin(Delta*pi/180)) # Rhombic height in m\n",
+ "l = lamda/(2 * sin(Delta*pi/180) **2) # wire length in m\n",
+ "phi = 90-Delta # tilt angle in Degrees\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print \"Rhombic height is:\",round(H,2),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l,2),\"meter\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rhombic height is: 5.0 meter\n",
+ "Tilt angle is: 60.0 degrees\n",
+ "length of wire is: 20.0 meter\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.2,PAGE NUMBER 278"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi,sin\n",
+ "\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "f = 20 # frequency in MHz\n",
+ "f = 20*10**6 # frequency in Hz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "lamda = c/f # wavelength in meter\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "Delta = 10 # angle of elevation in Degrees\n",
+ "H = lamda/(4 * sin(Delta*pi/180)) # Rhombic height in m\n",
+ "l = lamda/(2 * sin(Delta*pi/180) **2) # wire length in m\n",
+ "phi = 90-Delta # tilt angle in Degrees\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print \"Rhombic height is:\",round(H,3),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l,3),\"meter\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rhombic height is: 21.595 meter\n",
+ "Tilt angle is: 80.0 degrees\n",
+ "length of wire is: 248.726 meter\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.3,PAGE NUMBER 279-281"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi,sin,cos\n",
+ "\n",
+ "\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "f = 30 # frequency in MHz\n",
+ "f = 30*10**6 # frequency in Hz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "lamda = c/f # wavelength in meter\n",
+ "\n",
+ "#calculation and results:\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"for Delta = 10 degrees\"\n",
+ "\n",
+ "\n",
+ "Delta1 = 10 # angle of elevation in Degrees\n",
+ "H1 = lamda/(4 * sin(Delta1*pi/180)) # Rhombic height in m\n",
+ "l1 = lamda/(2 * sin(Delta1*pi/180) **2) # wire length in m\n",
+ "phi1 = 90-Delta1 # tilt angle in Degrees\n",
+ "print \"Rhombic height is:\",round(H1,3),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi1,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l1,2),\"meter\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"for Delta = 15 degrees\"\n",
+ "\n",
+ "\n",
+ "Delta2 = 15 # angle of elevation in Degrees\n",
+ "H2 = lamda/(4 * sin(Delta2*pi/180)) # Rhombic height in m\n",
+ "l2 = lamda/(2 * sin(Delta2*pi/180) **2) # wire length in m\n",
+ "phi2 = 90-Delta2 # tilt angle in Degrees\n",
+ "print \"Rhombic height is:\",round(H2,3),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi2,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l2,2),\"meter\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"for Delta = 20 degrees\"\n",
+ "\n",
+ "\n",
+ "Delta3 = 20 # angle of elevation in Degrees\n",
+ "H3 = lamda/(4 * sin(Delta3*pi/180)) # Rhombic height in m\n",
+ "l3 = lamda/(2 * sin(Delta3*pi/180) **2) # wire length in m\n",
+ "phi3 = 90-Delta3 # tilt angle in Degrees\n",
+ "print \"Rhombic height is:\",round(H3,3),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi3,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l3,2),\"meter\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"for Delta = 25 degrees\"\n",
+ "\n",
+ "\n",
+ "Delta4 = 25 # angle of elevation in Degrees\n",
+ "H4 = lamda/(4 * sin(Delta4*pi/180)) # Rhombic height in m\n",
+ "l4 = lamda/(2 * sin(Delta4*pi/180) **2) # wire length in m\n",
+ "phi4 = 90-Delta4 # tilt angle in Degrees\n",
+ "print \"Rhombic height is:\",round(H4,3),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi4,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l4,2),\"meter\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"for Delta = 30 degrees\"\n",
+ "\n",
+ "\n",
+ "Delta5 = 30 # angle of elevation in Degrees\n",
+ "H5 = lamda/(4 * sin(Delta5*pi/180)) # Rhombic height in m\n",
+ "l5 = lamda/(2 * sin(Delta5*pi/180) **2) # wire length in m\n",
+ "phi5 = 90-Delta5 # tilt angle in Degrees\n",
+ "print \"Rhombic height is:\",round(H5,3),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi5,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l5,2),\"meter\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"for Delta = 35 degrees\"\n",
+ "\n",
+ "\n",
+ "Delta6 = 35 # angle of elevation in Degrees\n",
+ "H6 = lamda/(4 * sin(Delta6*pi/180)) # Rhombic height in m\n",
+ "l6 = lamda/(2 * sin(Delta6*pi/180) **2) # wire length in m\n",
+ "phi6 = 90-Delta6 # tilt angle in Degrees\n",
+ "print \"Rhombic height is:\",round(H6,3),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi6,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l6,2),\"meter\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"for Delta = 40 degrees\"\n",
+ "\n",
+ "\n",
+ "Delta7 = 40 # angle of elevation in Degrees\n",
+ "H7 = lamda/(4 * sin(Delta7*pi/180)) # Rhombic height in m\n",
+ "l7 = lamda/(2 * sin(Delta7*pi/180) **2) # wire length in m\n",
+ "phi7 = 90-Delta7 # tilt angle in Degrees\n",
+ "print \"Rhombic height is:\",round(H7,3),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi7,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l7,2),\"meter\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "for Delta = 10 degrees\n",
+ "Rhombic height is: 14.397 meter\n",
+ "Tilt angle is: 80.0 degrees\n",
+ "length of wire is: 165.82 meter\n",
+ "for Delta = 15 degrees\n",
+ "Rhombic height is: 9.659 meter\n",
+ "Tilt angle is: 75.0 degrees\n",
+ "length of wire is: 74.64 meter\n",
+ "for Delta = 20 degrees\n",
+ "Rhombic height is: 7.31 meter\n",
+ "Tilt angle is: 70.0 degrees\n",
+ "length of wire is: 42.74 meter\n",
+ "for Delta = 25 degrees\n",
+ "Rhombic height is: 5.916 meter\n",
+ "Tilt angle is: 65.0 degrees\n",
+ "length of wire is: 27.99 meter\n",
+ "for Delta = 30 degrees\n",
+ "Rhombic height is: 5.0 meter\n",
+ "Tilt angle is: 60.0 degrees\n",
+ "length of wire is: 20.0 meter\n",
+ "for Delta = 35 degrees\n",
+ "Rhombic height is: 4.359 meter\n",
+ "Tilt angle is: 55.0 degrees\n",
+ "length of wire is: 15.2 meter\n",
+ "for Delta = 40 degrees\n",
+ "Rhombic height is: 3.889 meter\n",
+ "Tilt angle is: 50.0 degrees\n",
+ "length of wire is: 12.1 meter\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.4,PAGE NUMBER 281"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi,sin,cos\n",
+ "\n",
+ "\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "f = 30 # frequency in MHz\n",
+ "f = 30*10**6 # frequency in Hz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "lamda = c/f # wavelength in meter\n",
+ "Delta = 30 # angle of elevation in Degrees\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "k = 0.74 # constant\n",
+ "H = lamda/(4 * sin(Delta*pi/180)) # Rhombic height in m\n",
+ "l = lamda/(2 * sin(Delta*pi/180) **2)*k # wire length in m\n",
+ "phi = 90-Delta # tilt angle in Degrees\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print \"Rhombic height is:\",round(H,2),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l,2),\"meter\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rhombic height is: 5.0 meter\n",
+ "Tilt angle is: 60.0 degrees\n",
+ "length of wire is: 14.8 meter\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.5,PAGE NUMBER 282"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi,sin\n",
+ "\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "f = 20 # frequency in MHz\n",
+ "f = 20*10**6 # frequency in Hz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "lamda = c/f # wavelength in meter\n",
+ "Delta = 20 # angle of elevation in Degrees\n",
+ "k = 0.74 # constant\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "H = lamda/(4 * sin(Delta*pi/180)) # Rhombic height in m\n",
+ "l = lamda/(2 * sin(Delta*pi/180) **2)*k # wire length in m\n",
+ "phi = 90-Delta # tilt angle in Degrees\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "\n",
+ "print \"Rhombic height is:\",round(H,2),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l,2),\"meter\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rhombic height is: 10.96 meter\n",
+ "Tilt angle is: 70.0 degrees\n",
+ "length of wire is: 47.44 meter\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.6,PAGE NUMBER 282"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "\n",
+ "f_MHz = 172 # frequency in MHz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "lamda = c/f_MHz # wavelength in m\n",
+ "La = 478/f_MHz # length of driven element in feet\n",
+ "Lr = 492/f_MHz # length of reflector in feet\n",
+ "Ld = 461.5/f_MHz # length of director in feet\n",
+ "S = 142/f_MHz # element spacing in feet\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "\n",
+ "print \"length of driven element is:\", round(La,2),\"feet\"\n",
+ "print \"length of reflector is:\", round(Lr,2),\"feet\"\n",
+ "print \"length of director is:\", round(Ld,3),\"feet\"\n",
+ "print \"element spacing is:\",round(S,3),\"feet\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "length of driven element is: 2.78 feet\n",
+ "length of reflector is: 2.86 feet\n",
+ "length of director is: 2.683 feet\n",
+ "element spacing is: 0.826 feet\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.7,PAGE NUMBER 283"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "\n",
+ "G = 12 # required gain in dB\n",
+ "f = 200 # frequency in MHz \n",
+ "f = 200*10**6 # frequency in Hz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "\n",
+ "lamda = c/f # wavelength in m\n",
+ "La = 0.46*lamda # length of driven element in m (note: in book La is given 0.416*lamda misprint)\n",
+ "Lr = 0.475*lamda # length of reflector in m\n",
+ "Ld1 = 0.44*lamda # length of director1 in m\n",
+ "Ld2 = 0.44*lamda # length of director2 in m\n",
+ "Ld3 = 0.43*lamda # length of director3 in m\n",
+ "Ld4 = 0.40*lamda # length of director4 in m\n",
+ "SL = 0.25*lamda # spacing between reflector and driver in m\n",
+ "Sd = 0.31*lamda # spacing director and driving element in m\n",
+ "d = 0.01*lamda # diameter of elements in m\n",
+ "l = 1.5*lamda # length of array in m\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "\n",
+ "print \"length of driven element is:\" ,round(La,2),\"m\"\n",
+ "print \"length of reflector is:\",round(Lr,4),\"m\"\n",
+ "print \"length of director1 is:\",round(Ld1,2),\"m\"\n",
+ "print \"length of director2 is:\",round(Ld2,2),\"m\"\n",
+ "print \"length of director3 is:\",round(Ld3,3),\"m\"\n",
+ "print \"length of director4 is:\",round(Ld4,2),\"m\"\n",
+ "print \"spacing between reflector and driver is:\",round(SL,3),\"m\"\n",
+ "print \"spacing director and driving element is:\",round(Sd,3),\"m\"\n",
+ "print \"diameter of elements is:\",round(d,3),\"m\"\n",
+ "print \"length of array is:\",round(l,2),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "length of driven element is: 0.69 m\n",
+ "length of reflector is: 0.7125 m\n",
+ "length of director1 is: 0.66 m\n",
+ "length of director2 is: 0.66 m\n",
+ "length of director3 is: 0.645 m\n",
+ "length of director4 is: 0.6 m\n",
+ "spacing between reflector and driver is: 0.375 m\n",
+ "spacing director and driving element is: 0.465 m\n",
+ "diameter of elements is: 0.015 m\n",
+ "length of array is: 2.25 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.8,PAGE NUMBER 283"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from math import atan\n",
+ "\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "\n",
+ "G = 9 # required gain in dB\n",
+ "f_l = 125 # lowest frequency in MHz\n",
+ "f_l = 125*10**6 # lowest frequency in Hz\n",
+ "f_h = 500 # highest frequency in MHz\n",
+ "f_h = 500*10**6 # lowest frequency in Hz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "tau = 0.861 # scaling factor\n",
+ "sigma = 0.162 # spacing factor\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "\n",
+ "lamda_l = c/f_l # longest wavelength in m\n",
+ "lamda_s = c/f_h # shortest wavelength in m\n",
+ "alpha = 2*atan((1-tau)/(4*sigma)) # wedge angle in Degrees\n",
+ "L1 = lamda_l/2 # in m\n",
+ "L2 = tau*L1 # in m\n",
+ "L3 = tau*L2 # in m\n",
+ "L4 = tau*L3 # in m\n",
+ "L5 = tau*L4 # in m\n",
+ "L6 = tau*L5 # in m\n",
+ "L7 = tau*L6 # in m\n",
+ "L8 = tau*L7 # in m\n",
+ "L9 = tau*L8 # in m\n",
+ "L10 = tau*L9 # in m\n",
+ "L11 = tau*L10 # in m\n",
+ "\n",
+ "# element spacing relation\n",
+ "#formula : sn = 2*sigma*Ln\n",
+ "\n",
+ "\n",
+ "S1 = 2*sigma*L1 # in m\n",
+ "S2 = 2*sigma*L2 # in m\n",
+ "S3 = 2*sigma*L3 # in m\n",
+ "S4 = 2*sigma*L4 # in m\n",
+ "S5 = 2*sigma*L5 # in m\n",
+ "S6 = 2*sigma*L6 # in m\n",
+ "S7 = 2*sigma*L7 # in m\n",
+ "S8 = 2*sigma*L8 # in m\n",
+ "S9 = 2*sigma*L9 # in m\n",
+ "S10 = 2*sigma*L10 # in m\n",
+ "S11 = 2*sigma*L11 # in m\n",
+ "\n",
+ "\n",
+ "\n",
+ "#results\n",
+ "\n",
+ "\n",
+ "print(\"designing of log-periodic antenna:\")\n",
+ "\n",
+ "print \"L1 is:\",round(L1,4),\"m\"\n",
+ "print \"L2 is:\",round(L2,4),\"m\"\n",
+ "print \"L3 is:\",round(L3,4),\"m\"\n",
+ "print \"L4 is:\",round(L4,4),\"m\"\n",
+ "print \"L5 is:\",round(L5,4),\"m\"\n",
+ "print \"L6 is:\",round(L6,4),\"m\"\n",
+ "print \"L7 is:\",round(L7,4),\"m\"\n",
+ "print \"L8 is:\",round(L8,4),\"m\"\n",
+ "print \"L9 is:\",round(L9,4),\"m\"\n",
+ "print \"L10 is:\",round(L10,4),\"m\"\n",
+ "print \"L11 is:\",round(L11,4),\"m\"\n",
+ "\n",
+ "print \"elements spacing relation:\"\n",
+ "\n",
+ "print \"S1 is:\",round(S1,4),\"m\"\n",
+ "print \"S2 is:\",round(S2,4),\"m\"\n",
+ "print \"S3 is:\",round(S3,4),\"m\"\n",
+ "print \"S4 is:\",round(S4,4),\"m\"\n",
+ "print \"S5 is:\",round(S5,4),\"m\"\n",
+ "print \"S6 is:\",round(S6,4),\"m\"\n",
+ "print \"S7 is:\",round(S7,4),\"m\"\n",
+ "print \"S8 is:\",round(S8,4),\"m\"\n",
+ "print \"S9 is:\",round(S9,4),\"m\"\n",
+ "print \"S10 is:\",round(S10,4),\"m\"\n",
+ "print \"S11 is:\",round(S11,4),\"m\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "designing of log-periodic antenna:\n",
+ "L1 is: 1.2 m\n",
+ "L2 is: 1.0332 m\n",
+ "L3 is: 0.8896 m\n",
+ "L4 is: 0.7659 m\n",
+ "L5 is: 0.6595 m\n",
+ "L6 is: 0.5678 m\n",
+ "L7 is: 0.4889 m\n",
+ "L8 is: 0.4209 m\n",
+ "L9 is: 0.3624 m\n",
+ "L10 is: 0.312 m\n",
+ "L11 is: 0.2687 m\n",
+ "elements spacing relation:\n",
+ "S1 is: 0.3888 m\n",
+ "S2 is: 0.3348 m\n",
+ "S3 is: 0.2882 m\n",
+ "S4 is: 0.2482 m\n",
+ "S5 is: 0.2137 m\n",
+ "S6 is: 0.184 m\n",
+ "S7 is: 0.1584 m\n",
+ "S8 is: 0.1364 m\n",
+ "S9 is: 0.1174 m\n",
+ "S10 is: 0.1011 m\n",
+ "S11 is: 0.087 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.9,PAGE NUMBER 285"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi,cos,sqrt\n",
+ "\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "E_rms = 10 # electric field in mV/m\n",
+ "E_rms = 10*10 **-3 # electric field in V/m\n",
+ "f = 2 # frequency in MHz\n",
+ "f = 2*10 **6 # frequency in Hz\n",
+ "N = 10 # number of turns\n",
+ "phi = 0 # angle between the plane of loop and direction of incident wave in Degrees\n",
+ "S = 1.4 # area of loop antenna in m **2\n",
+ "c = 3*10 **8 # speed of light in m/s\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "lamda = c/f # wavelength in m\n",
+ "E_max = sqrt(2)*E_rms # electric field in V/m\n",
+ "V_rms = (2*pi*E_max*S*N/lamda)*cos(phi) # induced voltage\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print \"induced voltage is:\",round(V_rms*1000,2),\"mV\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "induced voltage is: 8.29 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.10,PAGE NUMBER 285"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "\n",
+ "D = 0.5 # diameter of loop antenna in m\n",
+ "a = D/2 # radius of loop antenna in m\n",
+ "f = 1 # frequency in MHz\n",
+ "f = 1*10**6 # frequency in Hz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "lamda = c/f # wavelength in m\n",
+ "Rr = 3720*(a/lamda) # radiation resistance of loop antenna in ohm\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print \"radiation resistance of loop antenna is:\",Rr,\"ohm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "radiation resistance of loop antenna is: 3.1 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.11,PAGE NUMBER 285-286"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from math import pi\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "a = 0.5 # radius of loop antenna in m\n",
+ "f = 0.9 # frequency in MHz\n",
+ "f = 0.9*10**6 # frequency in Hz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "lamda = c/f # wavelength in m\n",
+ "k = (2*pi*a)/lamda # constant\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print \"the value of k is:\",round(k,2)\n",
+ "print \"since,k<1/3\"\n",
+ "print \"So Directivity of loop antenna is D = 1.5\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the value of k is: 0.01\n",
+ "since,k<1/3\n",
+ "So Directivity of loop antenna is D = 1.5\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.13,PAGE NUMBER 286"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from sympy import Symbol\n",
+ "\n",
+ "#variable declaration and calculation\n",
+ "\n",
+ "Lm = Symbol('Lm') # defining Lm as lambda\n",
+ "d = 1.5*Lm # diameter of antenna in m\n",
+ "a = d/2 # radius of antenna in m\n",
+ "Rr = 3720*(a/Lm) # radiation resistance of loop antenna in ohm\n",
+ "D = 4.25*(a/Lm) # Directivity of the loop antenna\n",
+ "\n",
+ "#results\n",
+ "\n",
+ "print \"radiation resistance of the loop antenna is:\",round(Rr,0),\"ohm\"\n",
+ "print \"Directivity of the loop antenna is:\",round(D,4)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "radiation resistance of the loop antenna is: 2790.0 ohm\n",
+ "Directivity of the loop antenna is: 3.1875\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.14,PAGE NUMBER 287"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt,pi\n",
+ "from sympy import Symbol\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "Gp = 28 # power gain\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "Lm = Symbol('Lm') # defining Lm as lamda\n",
+ "d = Lm/2 # length of dipole\n",
+ "\n",
+ "#formula : Gp = 4*(L/lamda)\n",
+ "\n",
+ "L = Gp*Lm/4 # array length\n",
+ "N = 7*2 # Number of elements in the array when spaced at lamda/2\n",
+ "\n",
+ "# formula : B.W = 2*sqrt((2*/N)*(lamda/d))\n",
+ "\n",
+ "BW = 2*sqrt(2*Lm/(N*d)) # null-to-null beam width in radians\n",
+ "BW_d = BW*180/pi # null-to-null beam width in degrees\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print \"Number of elements in the array when spaced at lamda/2 are:\",N\n",
+ "print \"array length(where Lm is wavelength in m) is:\",L,\"m\"\n",
+ "print \"null-to-null beam width is:\",round(BW_d,1),\"degrees\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number of elements in the array when spaced at lamda/2 are: 14\n",
+ "array length(where Lm is wavelength in m) is: 7*Lm m\n",
+ "null-to-null beam width is: 61.3 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.15,PAGE NUMBER 287"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from math import pi,sqrt\n",
+ "\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "S = 0.05 # spacing in m\n",
+ "Dh = 0.1 # diameter of helical antenna in m\n",
+ "N = 20 # number of turns\n",
+ "f = 1000 # frequency in MHz\n",
+ "f = 1000*10**6 # frequency in MHz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "\n",
+ "lamda = c/f # wavelength in m\n",
+ "C = pi*Dh # circumfrence of helix in m\n",
+ "La = N*S # axial legth in m\n",
+ "phi_not = (115*(lamda**(3/2))/(C*sqrt(La))) # B.W.F.N., null-to-null beamwidth of main beam in Degreess\n",
+ "phi = (52*lamda**(3/2)/(C*sqrt(La))) # H.P.B.W, half power beamwidth in Degreess\n",
+ "D = (15*N*C**2*S/(lamda)**3) # Directivity\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print \"B.W.F.N., null-to-null beamwidth of main beam is:\",round(phi_not,1),\"degrees\"\n",
+ "print \"H.P.B.W, half power beamwidth is:\",round(phi,1),\"degrees\"\n",
+ "print \"Directivity is:\",round(D,2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "B.W.F.N., null-to-null beamwidth of main beam is: 60.1 degrees\n",
+ "H.P.B.W, half power beamwidth is: 27.2 degrees\n",
+ "Directivity is: 54.83\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/TestContribution/abhisheksharma_1.ipynb b/TestContribution/abhisheksharma_1.ipynb new file mode 100755 index 00000000..e09e86cb --- /dev/null +++ b/TestContribution/abhisheksharma_1.ipynb @@ -0,0 +1,946 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:54ccd26f8e7172369b740037968be286180ddfff5f2fc10ebe6be83fc34647f9"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "HF,VHF AND UHF ANTENNAS (CHAPTER 6)"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.1,PAGE NUMBER 278 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi,sin\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "f = 30 # frequency in MHz\n",
+ "f = 30*10**6 # frequency in Hz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "lamda = c/f # wavelength in meter\n",
+ "Delta = 30 # angle of elevation in Degrees\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "H = lamda/(4 * sin(Delta*pi/180)) # Rhombic height in m\n",
+ "l = lamda/(2 * sin(Delta*pi/180) **2) # wire length in m\n",
+ "phi = 90-Delta # tilt angle in Degrees\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print \"Rhombic height is:\",round(H,2),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l,2),\"meter\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rhombic height is: 5.0 meter\n",
+ "Tilt angle is: 60.0 degrees\n",
+ "length of wire is: 20.0 meter\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.2,PAGE NUMBER 278"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi,sin\n",
+ "\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "f = 20 # frequency in MHz\n",
+ "f = 20*10**6 # frequency in Hz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "lamda = c/f # wavelength in meter\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "Delta = 10 # angle of elevation in Degrees\n",
+ "H = lamda/(4 * sin(Delta*pi/180)) # Rhombic height in m\n",
+ "l = lamda/(2 * sin(Delta*pi/180) **2) # wire length in m\n",
+ "phi = 90-Delta # tilt angle in Degrees\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print \"Rhombic height is:\",round(H,3),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l,3),\"meter\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rhombic height is: 21.595 meter\n",
+ "Tilt angle is: 80.0 degrees\n",
+ "length of wire is: 248.726 meter\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.3,PAGE NUMBER 279-281"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi,sin,cos\n",
+ "\n",
+ "\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "f = 30 # frequency in MHz\n",
+ "f = 30*10**6 # frequency in Hz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "lamda = c/f # wavelength in meter\n",
+ "\n",
+ "#calculation and results:\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"for Delta = 10 degrees\"\n",
+ "\n",
+ "\n",
+ "Delta1 = 10 # angle of elevation in Degrees\n",
+ "H1 = lamda/(4 * sin(Delta1*pi/180)) # Rhombic height in m\n",
+ "l1 = lamda/(2 * sin(Delta1*pi/180) **2) # wire length in m\n",
+ "phi1 = 90-Delta1 # tilt angle in Degrees\n",
+ "print \"Rhombic height is:\",round(H1,3),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi1,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l1,2),\"meter\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"for Delta = 15 degrees\"\n",
+ "\n",
+ "\n",
+ "Delta2 = 15 # angle of elevation in Degrees\n",
+ "H2 = lamda/(4 * sin(Delta2*pi/180)) # Rhombic height in m\n",
+ "l2 = lamda/(2 * sin(Delta2*pi/180) **2) # wire length in m\n",
+ "phi2 = 90-Delta2 # tilt angle in Degrees\n",
+ "print \"Rhombic height is:\",round(H2,3),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi2,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l2,2),\"meter\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"for Delta = 20 degrees\"\n",
+ "\n",
+ "\n",
+ "Delta3 = 20 # angle of elevation in Degrees\n",
+ "H3 = lamda/(4 * sin(Delta3*pi/180)) # Rhombic height in m\n",
+ "l3 = lamda/(2 * sin(Delta3*pi/180) **2) # wire length in m\n",
+ "phi3 = 90-Delta3 # tilt angle in Degrees\n",
+ "print \"Rhombic height is:\",round(H3,3),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi3,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l3,2),\"meter\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"for Delta = 25 degrees\"\n",
+ "\n",
+ "\n",
+ "Delta4 = 25 # angle of elevation in Degrees\n",
+ "H4 = lamda/(4 * sin(Delta4*pi/180)) # Rhombic height in m\n",
+ "l4 = lamda/(2 * sin(Delta4*pi/180) **2) # wire length in m\n",
+ "phi4 = 90-Delta4 # tilt angle in Degrees\n",
+ "print \"Rhombic height is:\",round(H4,3),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi4,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l4,2),\"meter\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"for Delta = 30 degrees\"\n",
+ "\n",
+ "\n",
+ "Delta5 = 30 # angle of elevation in Degrees\n",
+ "H5 = lamda/(4 * sin(Delta5*pi/180)) # Rhombic height in m\n",
+ "l5 = lamda/(2 * sin(Delta5*pi/180) **2) # wire length in m\n",
+ "phi5 = 90-Delta5 # tilt angle in Degrees\n",
+ "print \"Rhombic height is:\",round(H5,3),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi5,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l5,2),\"meter\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"for Delta = 35 degrees\"\n",
+ "\n",
+ "\n",
+ "Delta6 = 35 # angle of elevation in Degrees\n",
+ "H6 = lamda/(4 * sin(Delta6*pi/180)) # Rhombic height in m\n",
+ "l6 = lamda/(2 * sin(Delta6*pi/180) **2) # wire length in m\n",
+ "phi6 = 90-Delta6 # tilt angle in Degrees\n",
+ "print \"Rhombic height is:\",round(H6,3),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi6,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l6,2),\"meter\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"for Delta = 40 degrees\"\n",
+ "\n",
+ "\n",
+ "Delta7 = 40 # angle of elevation in Degrees\n",
+ "H7 = lamda/(4 * sin(Delta7*pi/180)) # Rhombic height in m\n",
+ "l7 = lamda/(2 * sin(Delta7*pi/180) **2) # wire length in m\n",
+ "phi7 = 90-Delta7 # tilt angle in Degrees\n",
+ "print \"Rhombic height is:\",round(H7,3),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi7,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l7,2),\"meter\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "for Delta = 10 degrees\n",
+ "Rhombic height is: 14.397 meter\n",
+ "Tilt angle is: 80.0 degrees\n",
+ "length of wire is: 165.82 meter\n",
+ "for Delta = 15 degrees\n",
+ "Rhombic height is: 9.659 meter\n",
+ "Tilt angle is: 75.0 degrees\n",
+ "length of wire is: 74.64 meter\n",
+ "for Delta = 20 degrees\n",
+ "Rhombic height is: 7.31 meter\n",
+ "Tilt angle is: 70.0 degrees\n",
+ "length of wire is: 42.74 meter\n",
+ "for Delta = 25 degrees\n",
+ "Rhombic height is: 5.916 meter\n",
+ "Tilt angle is: 65.0 degrees\n",
+ "length of wire is: 27.99 meter\n",
+ "for Delta = 30 degrees\n",
+ "Rhombic height is: 5.0 meter\n",
+ "Tilt angle is: 60.0 degrees\n",
+ "length of wire is: 20.0 meter\n",
+ "for Delta = 35 degrees\n",
+ "Rhombic height is: 4.359 meter\n",
+ "Tilt angle is: 55.0 degrees\n",
+ "length of wire is: 15.2 meter\n",
+ "for Delta = 40 degrees\n",
+ "Rhombic height is: 3.889 meter\n",
+ "Tilt angle is: 50.0 degrees\n",
+ "length of wire is: 12.1 meter\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.4,PAGE NUMBER 281"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi,sin,cos\n",
+ "\n",
+ "\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "f = 30 # frequency in MHz\n",
+ "f = 30*10**6 # frequency in Hz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "lamda = c/f # wavelength in meter\n",
+ "Delta = 30 # angle of elevation in Degrees\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "k = 0.74 # constant\n",
+ "H = lamda/(4 * sin(Delta*pi/180)) # Rhombic height in m\n",
+ "l = lamda/(2 * sin(Delta*pi/180) **2)*k # wire length in m\n",
+ "phi = 90-Delta # tilt angle in Degrees\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print \"Rhombic height is:\",round(H,2),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l,2),\"meter\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rhombic height is: 5.0 meter\n",
+ "Tilt angle is: 60.0 degrees\n",
+ "length of wire is: 14.8 meter\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.5,PAGE NUMBER 282"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi,sin\n",
+ "\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "f = 20 # frequency in MHz\n",
+ "f = 20*10**6 # frequency in Hz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "lamda = c/f # wavelength in meter\n",
+ "Delta = 20 # angle of elevation in Degrees\n",
+ "k = 0.74 # constant\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "H = lamda/(4 * sin(Delta*pi/180)) # Rhombic height in m\n",
+ "l = lamda/(2 * sin(Delta*pi/180) **2)*k # wire length in m\n",
+ "phi = 90-Delta # tilt angle in Degrees\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "\n",
+ "print \"Rhombic height is:\",round(H,2),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l,2),\"meter\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rhombic height is: 10.96 meter\n",
+ "Tilt angle is: 70.0 degrees\n",
+ "length of wire is: 47.44 meter\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.6,PAGE NUMBER 282"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "\n",
+ "f_MHz = 172 # frequency in MHz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "lamda = c/f_MHz # wavelength in m\n",
+ "La = 478/f_MHz # length of driven element in feet\n",
+ "Lr = 492/f_MHz # length of reflector in feet\n",
+ "Ld = 461.5/f_MHz # length of director in feet\n",
+ "S = 142/f_MHz # element spacing in feet\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "\n",
+ "print \"length of driven element is:\", round(La,2),\"feet\"\n",
+ "print \"length of reflector is:\", round(Lr,2),\"feet\"\n",
+ "print \"length of director is:\", round(Ld,3),\"feet\"\n",
+ "print \"element spacing is:\",round(S,3),\"feet\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "length of driven element is: 2.78 feet\n",
+ "length of reflector is: 2.86 feet\n",
+ "length of director is: 2.683 feet\n",
+ "element spacing is: 0.826 feet\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.7,PAGE NUMBER 283"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "\n",
+ "G = 12 # required gain in dB\n",
+ "f = 200 # frequency in MHz \n",
+ "f = 200*10**6 # frequency in Hz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "\n",
+ "lamda = c/f # wavelength in m\n",
+ "La = 0.46*lamda # length of driven element in m (note: in book La is given 0.416*lamda misprint)\n",
+ "Lr = 0.475*lamda # length of reflector in m\n",
+ "Ld1 = 0.44*lamda # length of director1 in m\n",
+ "Ld2 = 0.44*lamda # length of director2 in m\n",
+ "Ld3 = 0.43*lamda # length of director3 in m\n",
+ "Ld4 = 0.40*lamda # length of director4 in m\n",
+ "SL = 0.25*lamda # spacing between reflector and driver in m\n",
+ "Sd = 0.31*lamda # spacing director and driving element in m\n",
+ "d = 0.01*lamda # diameter of elements in m\n",
+ "l = 1.5*lamda # length of array in m\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "\n",
+ "print \"length of driven element is:\" ,round(La,2),\"m\"\n",
+ "print \"length of reflector is:\",round(Lr,4),\"m\"\n",
+ "print \"length of director1 is:\",round(Ld1,2),\"m\"\n",
+ "print \"length of director2 is:\",round(Ld2,2),\"m\"\n",
+ "print \"length of director3 is:\",round(Ld3,3),\"m\"\n",
+ "print \"length of director4 is:\",round(Ld4,2),\"m\"\n",
+ "print \"spacing between reflector and driver is:\",round(SL,3),\"m\"\n",
+ "print \"spacing director and driving element is:\",round(Sd,3),\"m\"\n",
+ "print \"diameter of elements is:\",round(d,3),\"m\"\n",
+ "print \"length of array is:\",round(l,2),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "length of driven element is: 0.69 m\n",
+ "length of reflector is: 0.7125 m\n",
+ "length of director1 is: 0.66 m\n",
+ "length of director2 is: 0.66 m\n",
+ "length of director3 is: 0.645 m\n",
+ "length of director4 is: 0.6 m\n",
+ "spacing between reflector and driver is: 0.375 m\n",
+ "spacing director and driving element is: 0.465 m\n",
+ "diameter of elements is: 0.015 m\n",
+ "length of array is: 2.25 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.8,PAGE NUMBER 283"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from math import atan\n",
+ "\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "\n",
+ "G = 9 # required gain in dB\n",
+ "f_l = 125 # lowest frequency in MHz\n",
+ "f_l = 125*10**6 # lowest frequency in Hz\n",
+ "f_h = 500 # highest frequency in MHz\n",
+ "f_h = 500*10**6 # lowest frequency in Hz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "tau = 0.861 # scaling factor\n",
+ "sigma = 0.162 # spacing factor\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "\n",
+ "lamda_l = c/f_l # longest wavelength in m\n",
+ "lamda_s = c/f_h # shortest wavelength in m\n",
+ "alpha = 2*atan((1-tau)/(4*sigma)) # wedge angle in Degrees\n",
+ "L1 = lamda_l/2 # in m\n",
+ "L2 = tau*L1 # in m\n",
+ "L3 = tau*L2 # in m\n",
+ "L4 = tau*L3 # in m\n",
+ "L5 = tau*L4 # in m\n",
+ "L6 = tau*L5 # in m\n",
+ "L7 = tau*L6 # in m\n",
+ "L8 = tau*L7 # in m\n",
+ "L9 = tau*L8 # in m\n",
+ "L10 = tau*L9 # in m\n",
+ "L11 = tau*L10 # in m\n",
+ "\n",
+ "# element spacing relation\n",
+ "#formula : sn = 2*sigma*Ln\n",
+ "\n",
+ "\n",
+ "S1 = 2*sigma*L1 # in m\n",
+ "S2 = 2*sigma*L2 # in m\n",
+ "S3 = 2*sigma*L3 # in m\n",
+ "S4 = 2*sigma*L4 # in m\n",
+ "S5 = 2*sigma*L5 # in m\n",
+ "S6 = 2*sigma*L6 # in m\n",
+ "S7 = 2*sigma*L7 # in m\n",
+ "S8 = 2*sigma*L8 # in m\n",
+ "S9 = 2*sigma*L9 # in m\n",
+ "S10 = 2*sigma*L10 # in m\n",
+ "S11 = 2*sigma*L11 # in m\n",
+ "\n",
+ "\n",
+ "\n",
+ "#results\n",
+ "\n",
+ "\n",
+ "print(\"designing of log-periodic antenna:\")\n",
+ "\n",
+ "print \"L1 is:\",round(L1,4),\"m\"\n",
+ "print \"L2 is:\",round(L2,4),\"m\"\n",
+ "print \"L3 is:\",round(L3,4),\"m\"\n",
+ "print \"L4 is:\",round(L4,4),\"m\"\n",
+ "print \"L5 is:\",round(L5,4),\"m\"\n",
+ "print \"L6 is:\",round(L6,4),\"m\"\n",
+ "print \"L7 is:\",round(L7,4),\"m\"\n",
+ "print \"L8 is:\",round(L8,4),\"m\"\n",
+ "print \"L9 is:\",round(L9,4),\"m\"\n",
+ "print \"L10 is:\",round(L10,4),\"m\"\n",
+ "print \"L11 is:\",round(L11,4),\"m\"\n",
+ "\n",
+ "print \"elements spacing relation:\"\n",
+ "\n",
+ "print \"S1 is:\",round(S1,4),\"m\"\n",
+ "print \"S2 is:\",round(S2,4),\"m\"\n",
+ "print \"S3 is:\",round(S3,4),\"m\"\n",
+ "print \"S4 is:\",round(S4,4),\"m\"\n",
+ "print \"S5 is:\",round(S5,4),\"m\"\n",
+ "print \"S6 is:\",round(S6,4),\"m\"\n",
+ "print \"S7 is:\",round(S7,4),\"m\"\n",
+ "print \"S8 is:\",round(S8,4),\"m\"\n",
+ "print \"S9 is:\",round(S9,4),\"m\"\n",
+ "print \"S10 is:\",round(S10,4),\"m\"\n",
+ "print \"S11 is:\",round(S11,4),\"m\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "designing of log-periodic antenna:\n",
+ "L1 is: 1.2 m\n",
+ "L2 is: 1.0332 m\n",
+ "L3 is: 0.8896 m\n",
+ "L4 is: 0.7659 m\n",
+ "L5 is: 0.6595 m\n",
+ "L6 is: 0.5678 m\n",
+ "L7 is: 0.4889 m\n",
+ "L8 is: 0.4209 m\n",
+ "L9 is: 0.3624 m\n",
+ "L10 is: 0.312 m\n",
+ "L11 is: 0.2687 m\n",
+ "elements spacing relation:\n",
+ "S1 is: 0.3888 m\n",
+ "S2 is: 0.3348 m\n",
+ "S3 is: 0.2882 m\n",
+ "S4 is: 0.2482 m\n",
+ "S5 is: 0.2137 m\n",
+ "S6 is: 0.184 m\n",
+ "S7 is: 0.1584 m\n",
+ "S8 is: 0.1364 m\n",
+ "S9 is: 0.1174 m\n",
+ "S10 is: 0.1011 m\n",
+ "S11 is: 0.087 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.9,PAGE NUMBER 285"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi,cos,sqrt\n",
+ "\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "E_rms = 10 # electric field in mV/m\n",
+ "E_rms = 10*10 **-3 # electric field in V/m\n",
+ "f = 2 # frequency in MHz\n",
+ "f = 2*10 **6 # frequency in Hz\n",
+ "N = 10 # number of turns\n",
+ "phi = 0 # angle between the plane of loop and direction of incident wave in Degrees\n",
+ "S = 1.4 # area of loop antenna in m **2\n",
+ "c = 3*10 **8 # speed of light in m/s\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "lamda = c/f # wavelength in m\n",
+ "E_max = sqrt(2)*E_rms # electric field in V/m\n",
+ "V_rms = (2*pi*E_max*S*N/lamda)*cos(phi) # induced voltage\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print \"induced voltage is:\",round(V_rms*1000,2),\"mV\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "induced voltage is: 8.29 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.10,PAGE NUMBER 285"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "\n",
+ "D = 0.5 # diameter of loop antenna in m\n",
+ "a = D/2 # radius of loop antenna in m\n",
+ "f = 1 # frequency in MHz\n",
+ "f = 1*10**6 # frequency in Hz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "lamda = c/f # wavelength in m\n",
+ "Rr = 3720*(a/lamda) # radiation resistance of loop antenna in ohm\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print \"radiation resistance of loop antenna is:\",Rr,\"ohm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "radiation resistance of loop antenna is: 3.1 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.11,PAGE NUMBER 285-286"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from math import pi\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "a = 0.5 # radius of loop antenna in m\n",
+ "f = 0.9 # frequency in MHz\n",
+ "f = 0.9*10**6 # frequency in Hz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "lamda = c/f # wavelength in m\n",
+ "k = (2*pi*a)/lamda # constant\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print \"the value of k is:\",round(k,2)\n",
+ "print \"since,k<1/3\"\n",
+ "print \"So Directivity of loop antenna is D = 1.5\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the value of k is: 0.01\n",
+ "since,k<1/3\n",
+ "So Directivity of loop antenna is D = 1.5\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.13,PAGE NUMBER 286"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from sympy import Symbol\n",
+ "\n",
+ "#variable declaration and calculation\n",
+ "\n",
+ "Lm = Symbol('Lm') # defining Lm as lambda\n",
+ "d = 1.5*Lm # diameter of antenna in m\n",
+ "a = d/2 # radius of antenna in m\n",
+ "Rr = 3720*(a/Lm) # radiation resistance of loop antenna in ohm\n",
+ "D = 4.25*(a/Lm) # Directivity of the loop antenna\n",
+ "\n",
+ "#results\n",
+ "\n",
+ "print \"radiation resistance of the loop antenna is:\",round(Rr,0),\"ohm\"\n",
+ "print \"Directivity of the loop antenna is:\",round(D,4)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "radiation resistance of the loop antenna is: 2790.0 ohm\n",
+ "Directivity of the loop antenna is: 3.1875\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.14,PAGE NUMBER 287"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt,pi\n",
+ "from sympy import Symbol\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "Gp = 28 # power gain\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "Lm = Symbol('Lm') # defining Lm as lamda\n",
+ "d = Lm/2 # length of dipole\n",
+ "\n",
+ "#formula : Gp = 4*(L/lamda)\n",
+ "\n",
+ "L = Gp*Lm/4 # array length\n",
+ "N = 7*2 # Number of elements in the array when spaced at lamda/2\n",
+ "\n",
+ "# formula : B.W = 2*sqrt((2*/N)*(lamda/d))\n",
+ "\n",
+ "BW = 2*sqrt(2*Lm/(N*d)) # null-to-null beam width in radians\n",
+ "BW_d = BW*180/pi # null-to-null beam width in degrees\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print \"Number of elements in the array when spaced at lamda/2 are:\",N\n",
+ "print \"array length(where Lm is wavelength in m) is:\",L,\"m\"\n",
+ "print \"null-to-null beam width is:\",round(BW_d,1),\"degrees\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number of elements in the array when spaced at lamda/2 are: 14\n",
+ "array length(where Lm is wavelength in m) is: 7*Lm m\n",
+ "null-to-null beam width is: 61.3 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.15,PAGE NUMBER 287"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from math import pi,sqrt\n",
+ "\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "S = 0.05 # spacing in m\n",
+ "Dh = 0.1 # diameter of helical antenna in m\n",
+ "N = 20 # number of turns\n",
+ "f = 1000 # frequency in MHz\n",
+ "f = 1000*10**6 # frequency in MHz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "\n",
+ "lamda = c/f # wavelength in m\n",
+ "C = pi*Dh # circumfrence of helix in m\n",
+ "La = N*S # axial legth in m\n",
+ "phi_not = (115*(lamda**(3/2))/(C*sqrt(La))) # B.W.F.N., null-to-null beamwidth of main beam in Degreess\n",
+ "phi = (52*lamda**(3/2)/(C*sqrt(La))) # H.P.B.W, half power beamwidth in Degreess\n",
+ "D = (15*N*C**2*S/(lamda)**3) # Directivity\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print \"B.W.F.N., null-to-null beamwidth of main beam is:\",round(phi_not,1),\"degrees\"\n",
+ "print \"H.P.B.W, half power beamwidth is:\",round(phi,1),\"degrees\"\n",
+ "print \"Directivity is:\",round(D,2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "B.W.F.N., null-to-null beamwidth of main beam is: 60.1 degrees\n",
+ "H.P.B.W, half power beamwidth is: 27.2 degrees\n",
+ "Directivity is: 54.83\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/TestContribution/abhisheksharma_2.ipynb b/TestContribution/abhisheksharma_2.ipynb new file mode 100755 index 00000000..e09e86cb --- /dev/null +++ b/TestContribution/abhisheksharma_2.ipynb @@ -0,0 +1,946 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:54ccd26f8e7172369b740037968be286180ddfff5f2fc10ebe6be83fc34647f9"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "HF,VHF AND UHF ANTENNAS (CHAPTER 6)"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.1,PAGE NUMBER 278 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi,sin\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "f = 30 # frequency in MHz\n",
+ "f = 30*10**6 # frequency in Hz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "lamda = c/f # wavelength in meter\n",
+ "Delta = 30 # angle of elevation in Degrees\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "H = lamda/(4 * sin(Delta*pi/180)) # Rhombic height in m\n",
+ "l = lamda/(2 * sin(Delta*pi/180) **2) # wire length in m\n",
+ "phi = 90-Delta # tilt angle in Degrees\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print \"Rhombic height is:\",round(H,2),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l,2),\"meter\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rhombic height is: 5.0 meter\n",
+ "Tilt angle is: 60.0 degrees\n",
+ "length of wire is: 20.0 meter\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.2,PAGE NUMBER 278"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi,sin\n",
+ "\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "f = 20 # frequency in MHz\n",
+ "f = 20*10**6 # frequency in Hz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "lamda = c/f # wavelength in meter\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "Delta = 10 # angle of elevation in Degrees\n",
+ "H = lamda/(4 * sin(Delta*pi/180)) # Rhombic height in m\n",
+ "l = lamda/(2 * sin(Delta*pi/180) **2) # wire length in m\n",
+ "phi = 90-Delta # tilt angle in Degrees\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print \"Rhombic height is:\",round(H,3),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l,3),\"meter\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rhombic height is: 21.595 meter\n",
+ "Tilt angle is: 80.0 degrees\n",
+ "length of wire is: 248.726 meter\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.3,PAGE NUMBER 279-281"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi,sin,cos\n",
+ "\n",
+ "\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "f = 30 # frequency in MHz\n",
+ "f = 30*10**6 # frequency in Hz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "lamda = c/f # wavelength in meter\n",
+ "\n",
+ "#calculation and results:\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"for Delta = 10 degrees\"\n",
+ "\n",
+ "\n",
+ "Delta1 = 10 # angle of elevation in Degrees\n",
+ "H1 = lamda/(4 * sin(Delta1*pi/180)) # Rhombic height in m\n",
+ "l1 = lamda/(2 * sin(Delta1*pi/180) **2) # wire length in m\n",
+ "phi1 = 90-Delta1 # tilt angle in Degrees\n",
+ "print \"Rhombic height is:\",round(H1,3),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi1,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l1,2),\"meter\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"for Delta = 15 degrees\"\n",
+ "\n",
+ "\n",
+ "Delta2 = 15 # angle of elevation in Degrees\n",
+ "H2 = lamda/(4 * sin(Delta2*pi/180)) # Rhombic height in m\n",
+ "l2 = lamda/(2 * sin(Delta2*pi/180) **2) # wire length in m\n",
+ "phi2 = 90-Delta2 # tilt angle in Degrees\n",
+ "print \"Rhombic height is:\",round(H2,3),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi2,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l2,2),\"meter\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"for Delta = 20 degrees\"\n",
+ "\n",
+ "\n",
+ "Delta3 = 20 # angle of elevation in Degrees\n",
+ "H3 = lamda/(4 * sin(Delta3*pi/180)) # Rhombic height in m\n",
+ "l3 = lamda/(2 * sin(Delta3*pi/180) **2) # wire length in m\n",
+ "phi3 = 90-Delta3 # tilt angle in Degrees\n",
+ "print \"Rhombic height is:\",round(H3,3),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi3,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l3,2),\"meter\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"for Delta = 25 degrees\"\n",
+ "\n",
+ "\n",
+ "Delta4 = 25 # angle of elevation in Degrees\n",
+ "H4 = lamda/(4 * sin(Delta4*pi/180)) # Rhombic height in m\n",
+ "l4 = lamda/(2 * sin(Delta4*pi/180) **2) # wire length in m\n",
+ "phi4 = 90-Delta4 # tilt angle in Degrees\n",
+ "print \"Rhombic height is:\",round(H4,3),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi4,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l4,2),\"meter\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"for Delta = 30 degrees\"\n",
+ "\n",
+ "\n",
+ "Delta5 = 30 # angle of elevation in Degrees\n",
+ "H5 = lamda/(4 * sin(Delta5*pi/180)) # Rhombic height in m\n",
+ "l5 = lamda/(2 * sin(Delta5*pi/180) **2) # wire length in m\n",
+ "phi5 = 90-Delta5 # tilt angle in Degrees\n",
+ "print \"Rhombic height is:\",round(H5,3),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi5,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l5,2),\"meter\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"for Delta = 35 degrees\"\n",
+ "\n",
+ "\n",
+ "Delta6 = 35 # angle of elevation in Degrees\n",
+ "H6 = lamda/(4 * sin(Delta6*pi/180)) # Rhombic height in m\n",
+ "l6 = lamda/(2 * sin(Delta6*pi/180) **2) # wire length in m\n",
+ "phi6 = 90-Delta6 # tilt angle in Degrees\n",
+ "print \"Rhombic height is:\",round(H6,3),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi6,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l6,2),\"meter\"\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "print \"for Delta = 40 degrees\"\n",
+ "\n",
+ "\n",
+ "Delta7 = 40 # angle of elevation in Degrees\n",
+ "H7 = lamda/(4 * sin(Delta7*pi/180)) # Rhombic height in m\n",
+ "l7 = lamda/(2 * sin(Delta7*pi/180) **2) # wire length in m\n",
+ "phi7 = 90-Delta7 # tilt angle in Degrees\n",
+ "print \"Rhombic height is:\",round(H7,3),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi7,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l7,2),\"meter\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "for Delta = 10 degrees\n",
+ "Rhombic height is: 14.397 meter\n",
+ "Tilt angle is: 80.0 degrees\n",
+ "length of wire is: 165.82 meter\n",
+ "for Delta = 15 degrees\n",
+ "Rhombic height is: 9.659 meter\n",
+ "Tilt angle is: 75.0 degrees\n",
+ "length of wire is: 74.64 meter\n",
+ "for Delta = 20 degrees\n",
+ "Rhombic height is: 7.31 meter\n",
+ "Tilt angle is: 70.0 degrees\n",
+ "length of wire is: 42.74 meter\n",
+ "for Delta = 25 degrees\n",
+ "Rhombic height is: 5.916 meter\n",
+ "Tilt angle is: 65.0 degrees\n",
+ "length of wire is: 27.99 meter\n",
+ "for Delta = 30 degrees\n",
+ "Rhombic height is: 5.0 meter\n",
+ "Tilt angle is: 60.0 degrees\n",
+ "length of wire is: 20.0 meter\n",
+ "for Delta = 35 degrees\n",
+ "Rhombic height is: 4.359 meter\n",
+ "Tilt angle is: 55.0 degrees\n",
+ "length of wire is: 15.2 meter\n",
+ "for Delta = 40 degrees\n",
+ "Rhombic height is: 3.889 meter\n",
+ "Tilt angle is: 50.0 degrees\n",
+ "length of wire is: 12.1 meter\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.4,PAGE NUMBER 281"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi,sin,cos\n",
+ "\n",
+ "\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "f = 30 # frequency in MHz\n",
+ "f = 30*10**6 # frequency in Hz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "lamda = c/f # wavelength in meter\n",
+ "Delta = 30 # angle of elevation in Degrees\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "k = 0.74 # constant\n",
+ "H = lamda/(4 * sin(Delta*pi/180)) # Rhombic height in m\n",
+ "l = lamda/(2 * sin(Delta*pi/180) **2)*k # wire length in m\n",
+ "phi = 90-Delta # tilt angle in Degrees\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print \"Rhombic height is:\",round(H,2),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l,2),\"meter\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rhombic height is: 5.0 meter\n",
+ "Tilt angle is: 60.0 degrees\n",
+ "length of wire is: 14.8 meter\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.5,PAGE NUMBER 282"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi,sin\n",
+ "\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "f = 20 # frequency in MHz\n",
+ "f = 20*10**6 # frequency in Hz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "lamda = c/f # wavelength in meter\n",
+ "Delta = 20 # angle of elevation in Degrees\n",
+ "k = 0.74 # constant\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "H = lamda/(4 * sin(Delta*pi/180)) # Rhombic height in m\n",
+ "l = lamda/(2 * sin(Delta*pi/180) **2)*k # wire length in m\n",
+ "phi = 90-Delta # tilt angle in Degrees\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "\n",
+ "print \"Rhombic height is:\",round(H,2),\"meter\"\n",
+ "print \"Tilt angle is:\",round(phi,2),\"degrees\"\n",
+ "print \"length of wire is:\",round(l,2),\"meter\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rhombic height is: 10.96 meter\n",
+ "Tilt angle is: 70.0 degrees\n",
+ "length of wire is: 47.44 meter\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.6,PAGE NUMBER 282"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "\n",
+ "f_MHz = 172 # frequency in MHz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "lamda = c/f_MHz # wavelength in m\n",
+ "La = 478/f_MHz # length of driven element in feet\n",
+ "Lr = 492/f_MHz # length of reflector in feet\n",
+ "Ld = 461.5/f_MHz # length of director in feet\n",
+ "S = 142/f_MHz # element spacing in feet\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "\n",
+ "print \"length of driven element is:\", round(La,2),\"feet\"\n",
+ "print \"length of reflector is:\", round(Lr,2),\"feet\"\n",
+ "print \"length of director is:\", round(Ld,3),\"feet\"\n",
+ "print \"element spacing is:\",round(S,3),\"feet\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "length of driven element is: 2.78 feet\n",
+ "length of reflector is: 2.86 feet\n",
+ "length of director is: 2.683 feet\n",
+ "element spacing is: 0.826 feet\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.7,PAGE NUMBER 283"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "\n",
+ "G = 12 # required gain in dB\n",
+ "f = 200 # frequency in MHz \n",
+ "f = 200*10**6 # frequency in Hz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "\n",
+ "lamda = c/f # wavelength in m\n",
+ "La = 0.46*lamda # length of driven element in m (note: in book La is given 0.416*lamda misprint)\n",
+ "Lr = 0.475*lamda # length of reflector in m\n",
+ "Ld1 = 0.44*lamda # length of director1 in m\n",
+ "Ld2 = 0.44*lamda # length of director2 in m\n",
+ "Ld3 = 0.43*lamda # length of director3 in m\n",
+ "Ld4 = 0.40*lamda # length of director4 in m\n",
+ "SL = 0.25*lamda # spacing between reflector and driver in m\n",
+ "Sd = 0.31*lamda # spacing director and driving element in m\n",
+ "d = 0.01*lamda # diameter of elements in m\n",
+ "l = 1.5*lamda # length of array in m\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "\n",
+ "print \"length of driven element is:\" ,round(La,2),\"m\"\n",
+ "print \"length of reflector is:\",round(Lr,4),\"m\"\n",
+ "print \"length of director1 is:\",round(Ld1,2),\"m\"\n",
+ "print \"length of director2 is:\",round(Ld2,2),\"m\"\n",
+ "print \"length of director3 is:\",round(Ld3,3),\"m\"\n",
+ "print \"length of director4 is:\",round(Ld4,2),\"m\"\n",
+ "print \"spacing between reflector and driver is:\",round(SL,3),\"m\"\n",
+ "print \"spacing director and driving element is:\",round(Sd,3),\"m\"\n",
+ "print \"diameter of elements is:\",round(d,3),\"m\"\n",
+ "print \"length of array is:\",round(l,2),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "length of driven element is: 0.69 m\n",
+ "length of reflector is: 0.7125 m\n",
+ "length of director1 is: 0.66 m\n",
+ "length of director2 is: 0.66 m\n",
+ "length of director3 is: 0.645 m\n",
+ "length of director4 is: 0.6 m\n",
+ "spacing between reflector and driver is: 0.375 m\n",
+ "spacing director and driving element is: 0.465 m\n",
+ "diameter of elements is: 0.015 m\n",
+ "length of array is: 2.25 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.8,PAGE NUMBER 283"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from math import atan\n",
+ "\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "\n",
+ "G = 9 # required gain in dB\n",
+ "f_l = 125 # lowest frequency in MHz\n",
+ "f_l = 125*10**6 # lowest frequency in Hz\n",
+ "f_h = 500 # highest frequency in MHz\n",
+ "f_h = 500*10**6 # lowest frequency in Hz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "tau = 0.861 # scaling factor\n",
+ "sigma = 0.162 # spacing factor\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "\n",
+ "lamda_l = c/f_l # longest wavelength in m\n",
+ "lamda_s = c/f_h # shortest wavelength in m\n",
+ "alpha = 2*atan((1-tau)/(4*sigma)) # wedge angle in Degrees\n",
+ "L1 = lamda_l/2 # in m\n",
+ "L2 = tau*L1 # in m\n",
+ "L3 = tau*L2 # in m\n",
+ "L4 = tau*L3 # in m\n",
+ "L5 = tau*L4 # in m\n",
+ "L6 = tau*L5 # in m\n",
+ "L7 = tau*L6 # in m\n",
+ "L8 = tau*L7 # in m\n",
+ "L9 = tau*L8 # in m\n",
+ "L10 = tau*L9 # in m\n",
+ "L11 = tau*L10 # in m\n",
+ "\n",
+ "# element spacing relation\n",
+ "#formula : sn = 2*sigma*Ln\n",
+ "\n",
+ "\n",
+ "S1 = 2*sigma*L1 # in m\n",
+ "S2 = 2*sigma*L2 # in m\n",
+ "S3 = 2*sigma*L3 # in m\n",
+ "S4 = 2*sigma*L4 # in m\n",
+ "S5 = 2*sigma*L5 # in m\n",
+ "S6 = 2*sigma*L6 # in m\n",
+ "S7 = 2*sigma*L7 # in m\n",
+ "S8 = 2*sigma*L8 # in m\n",
+ "S9 = 2*sigma*L9 # in m\n",
+ "S10 = 2*sigma*L10 # in m\n",
+ "S11 = 2*sigma*L11 # in m\n",
+ "\n",
+ "\n",
+ "\n",
+ "#results\n",
+ "\n",
+ "\n",
+ "print(\"designing of log-periodic antenna:\")\n",
+ "\n",
+ "print \"L1 is:\",round(L1,4),\"m\"\n",
+ "print \"L2 is:\",round(L2,4),\"m\"\n",
+ "print \"L3 is:\",round(L3,4),\"m\"\n",
+ "print \"L4 is:\",round(L4,4),\"m\"\n",
+ "print \"L5 is:\",round(L5,4),\"m\"\n",
+ "print \"L6 is:\",round(L6,4),\"m\"\n",
+ "print \"L7 is:\",round(L7,4),\"m\"\n",
+ "print \"L8 is:\",round(L8,4),\"m\"\n",
+ "print \"L9 is:\",round(L9,4),\"m\"\n",
+ "print \"L10 is:\",round(L10,4),\"m\"\n",
+ "print \"L11 is:\",round(L11,4),\"m\"\n",
+ "\n",
+ "print \"elements spacing relation:\"\n",
+ "\n",
+ "print \"S1 is:\",round(S1,4),\"m\"\n",
+ "print \"S2 is:\",round(S2,4),\"m\"\n",
+ "print \"S3 is:\",round(S3,4),\"m\"\n",
+ "print \"S4 is:\",round(S4,4),\"m\"\n",
+ "print \"S5 is:\",round(S5,4),\"m\"\n",
+ "print \"S6 is:\",round(S6,4),\"m\"\n",
+ "print \"S7 is:\",round(S7,4),\"m\"\n",
+ "print \"S8 is:\",round(S8,4),\"m\"\n",
+ "print \"S9 is:\",round(S9,4),\"m\"\n",
+ "print \"S10 is:\",round(S10,4),\"m\"\n",
+ "print \"S11 is:\",round(S11,4),\"m\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "designing of log-periodic antenna:\n",
+ "L1 is: 1.2 m\n",
+ "L2 is: 1.0332 m\n",
+ "L3 is: 0.8896 m\n",
+ "L4 is: 0.7659 m\n",
+ "L5 is: 0.6595 m\n",
+ "L6 is: 0.5678 m\n",
+ "L7 is: 0.4889 m\n",
+ "L8 is: 0.4209 m\n",
+ "L9 is: 0.3624 m\n",
+ "L10 is: 0.312 m\n",
+ "L11 is: 0.2687 m\n",
+ "elements spacing relation:\n",
+ "S1 is: 0.3888 m\n",
+ "S2 is: 0.3348 m\n",
+ "S3 is: 0.2882 m\n",
+ "S4 is: 0.2482 m\n",
+ "S5 is: 0.2137 m\n",
+ "S6 is: 0.184 m\n",
+ "S7 is: 0.1584 m\n",
+ "S8 is: 0.1364 m\n",
+ "S9 is: 0.1174 m\n",
+ "S10 is: 0.1011 m\n",
+ "S11 is: 0.087 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.9,PAGE NUMBER 285"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi,cos,sqrt\n",
+ "\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "E_rms = 10 # electric field in mV/m\n",
+ "E_rms = 10*10 **-3 # electric field in V/m\n",
+ "f = 2 # frequency in MHz\n",
+ "f = 2*10 **6 # frequency in Hz\n",
+ "N = 10 # number of turns\n",
+ "phi = 0 # angle between the plane of loop and direction of incident wave in Degrees\n",
+ "S = 1.4 # area of loop antenna in m **2\n",
+ "c = 3*10 **8 # speed of light in m/s\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "lamda = c/f # wavelength in m\n",
+ "E_max = sqrt(2)*E_rms # electric field in V/m\n",
+ "V_rms = (2*pi*E_max*S*N/lamda)*cos(phi) # induced voltage\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print \"induced voltage is:\",round(V_rms*1000,2),\"mV\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "induced voltage is: 8.29 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.10,PAGE NUMBER 285"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "\n",
+ "D = 0.5 # diameter of loop antenna in m\n",
+ "a = D/2 # radius of loop antenna in m\n",
+ "f = 1 # frequency in MHz\n",
+ "f = 1*10**6 # frequency in Hz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "lamda = c/f # wavelength in m\n",
+ "Rr = 3720*(a/lamda) # radiation resistance of loop antenna in ohm\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print \"radiation resistance of loop antenna is:\",Rr,\"ohm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "radiation resistance of loop antenna is: 3.1 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.11,PAGE NUMBER 285-286"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from math import pi\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "a = 0.5 # radius of loop antenna in m\n",
+ "f = 0.9 # frequency in MHz\n",
+ "f = 0.9*10**6 # frequency in Hz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "lamda = c/f # wavelength in m\n",
+ "k = (2*pi*a)/lamda # constant\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print \"the value of k is:\",round(k,2)\n",
+ "print \"since,k<1/3\"\n",
+ "print \"So Directivity of loop antenna is D = 1.5\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the value of k is: 0.01\n",
+ "since,k<1/3\n",
+ "So Directivity of loop antenna is D = 1.5\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.13,PAGE NUMBER 286"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from sympy import Symbol\n",
+ "\n",
+ "#variable declaration and calculation\n",
+ "\n",
+ "Lm = Symbol('Lm') # defining Lm as lambda\n",
+ "d = 1.5*Lm # diameter of antenna in m\n",
+ "a = d/2 # radius of antenna in m\n",
+ "Rr = 3720*(a/Lm) # radiation resistance of loop antenna in ohm\n",
+ "D = 4.25*(a/Lm) # Directivity of the loop antenna\n",
+ "\n",
+ "#results\n",
+ "\n",
+ "print \"radiation resistance of the loop antenna is:\",round(Rr,0),\"ohm\"\n",
+ "print \"Directivity of the loop antenna is:\",round(D,4)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "radiation resistance of the loop antenna is: 2790.0 ohm\n",
+ "Directivity of the loop antenna is: 3.1875\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.14,PAGE NUMBER 287"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt,pi\n",
+ "from sympy import Symbol\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "Gp = 28 # power gain\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "Lm = Symbol('Lm') # defining Lm as lamda\n",
+ "d = Lm/2 # length of dipole\n",
+ "\n",
+ "#formula : Gp = 4*(L/lamda)\n",
+ "\n",
+ "L = Gp*Lm/4 # array length\n",
+ "N = 7*2 # Number of elements in the array when spaced at lamda/2\n",
+ "\n",
+ "# formula : B.W = 2*sqrt((2*/N)*(lamda/d))\n",
+ "\n",
+ "BW = 2*sqrt(2*Lm/(N*d)) # null-to-null beam width in radians\n",
+ "BW_d = BW*180/pi # null-to-null beam width in degrees\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print \"Number of elements in the array when spaced at lamda/2 are:\",N\n",
+ "print \"array length(where Lm is wavelength in m) is:\",L,\"m\"\n",
+ "print \"null-to-null beam width is:\",round(BW_d,1),\"degrees\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number of elements in the array when spaced at lamda/2 are: 14\n",
+ "array length(where Lm is wavelength in m) is: 7*Lm m\n",
+ "null-to-null beam width is: 61.3 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EXAMPLE 6.15,PAGE NUMBER 287"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from math import pi,sqrt\n",
+ "\n",
+ "\n",
+ "# Variable Declaration\n",
+ "\n",
+ "S = 0.05 # spacing in m\n",
+ "Dh = 0.1 # diameter of helical antenna in m\n",
+ "N = 20 # number of turns\n",
+ "f = 1000 # frequency in MHz\n",
+ "f = 1000*10**6 # frequency in MHz\n",
+ "c = 3*10**8 # speed of light in m/s\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "\n",
+ "lamda = c/f # wavelength in m\n",
+ "C = pi*Dh # circumfrence of helix in m\n",
+ "La = N*S # axial legth in m\n",
+ "phi_not = (115*(lamda**(3/2))/(C*sqrt(La))) # B.W.F.N., null-to-null beamwidth of main beam in Degreess\n",
+ "phi = (52*lamda**(3/2)/(C*sqrt(La))) # H.P.B.W, half power beamwidth in Degreess\n",
+ "D = (15*N*C**2*S/(lamda)**3) # Directivity\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print \"B.W.F.N., null-to-null beamwidth of main beam is:\",round(phi_not,1),\"degrees\"\n",
+ "print \"H.P.B.W, half power beamwidth is:\",round(phi,1),\"degrees\"\n",
+ "print \"Directivity is:\",round(D,2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "B.W.F.N., null-to-null beamwidth of main beam is: 60.1 degrees\n",
+ "H.P.B.W, half power beamwidth is: 27.2 degrees\n",
+ "Directivity is: 54.83\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/TestContribution/bilal.ipynb b/TestContribution/bilal.ipynb new file mode 100755 index 00000000..22d13091 --- /dev/null +++ b/TestContribution/bilal.ipynb @@ -0,0 +1,406 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:e19af2f3d200c02cdde989919b1864a16727820a7b37667c650dffdfc779957b"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 25: Resonance"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.1, page no. 754"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import numpy as np\n",
+ "\n",
+ "#Variable declaration\n",
+ "L = 8 # Value of Inductor (8-H)\n",
+ "C = 20e-6 #Value of Capacitor (20-uF)\n",
+ "p = 3.142 #Value of pi\n",
+ "\n",
+ "#Calculation\n",
+ "a = np.sqrt(L*C)\n",
+ "fr = 1/(2*p*a)\n",
+ "\n",
+ "#Result\n",
+ "print \"Resonant frequency is\",float(fr), \"Hz i.e 12.6 Hz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resonant frequency is 12.5806717862 Hz i.e 12.6 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.2, page no. 755"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import numpy as np\n",
+ "\n",
+ "#Variable declaration\n",
+ "L = 2e-6 # Value of Inductor (2-uH)\n",
+ "C = 3e-12 #Value of Capacitor (3-pF)\n",
+ "p = 3.142 #Value of pi\n",
+ "\n",
+ "#Calculation\n",
+ "a = np.sqrt(L*C)\n",
+ "fr = 1/(2*p*a)\n",
+ "\n",
+ "#Result\n",
+ "print \"Resonant frequency is\",float(fr), \"Hz i.e 65 MHz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resonant frequency is 64966309.7492 Hz i.e 65 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.3, page no. 756"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "L = 239e-6 # Value of Inductor (239-uH)\n",
+ "f = 1000*10^3 #Frequency (1000 KHz)\n",
+ "p = 3.142 #Value of pi\n",
+ "\n",
+ "#Calculation\n",
+ "a = p*p\n",
+ "b = f*f\n",
+ "C = 1/(4*a*b*L)\n",
+ "\n",
+ "#Result\n",
+ "print \"Value of Capacitor is\",float(C), \"F i.e 106 pF\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of Capacitor is 1.05893477038e-06 F i.e 106 pF\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.4, page no. 756"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "C = 106e-12 # Value of Capacitor (106-pF)\n",
+ "f = 1000000 #Frequency (1 MHz)\n",
+ "p = 3.142 #Value of pi\n",
+ "\n",
+ "#Calculation\n",
+ "a = 4*(p*p)\n",
+ "b = f*f\n",
+ "c = a*b*C\n",
+ "L = 1/(a*C*b)\n",
+ "\n",
+ "#Result\n",
+ "print \"Value of Inductor is\",float(L), \"H i.e 239 uH\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of Inductor is 0.000238903098251 H i.e 239 uH\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.5, page no. 759"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vo = 100e-3 #Output Voltage(100-mV)\n",
+ "Vi = 2e-3 #Input Voltage(2-mV)\n",
+ "\n",
+ "#Calculation\n",
+ "Q = Vo/Vi\n",
+ "\n",
+ "#Result\n",
+ "print \"Value of Q is\",round(Q),"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of Q is 50.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.6, page no. 759"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Q = 50 #Quality Factor\n",
+ "L = 250e-6 # Value of Inductor (250-uH)\n",
+ "f = 400000 #Frequency (400 KHz)\n",
+ "p = 3.142 #Value of pi\n",
+ "\n",
+ "#Calculation\n",
+ "x = 2*p*f*L\n",
+ "rs = x/Q\n",
+ "\n",
+ "#Result\n",
+ "print \"Value of AC resistance is\",float(rs),\"Ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of AC resistance is 12.568\n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.7, page no. 761"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print \"Because they divide VT equally, ZEQ is 225 kOhms, the same as R1. The amount of input voltage does not matter, as the voltage division determines the relative proportions between R1 and ZEQ. With 225 kOhms for ZEQ and 1.5 kOhms for XL, the Q is 225\u20441.5, or Q = 150.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Because they divide VT equally, ZEQ is 225 kOhms, the same as R1. The amount of input voltage does not matter, as the voltage division determines the relative proportions between R1 and ZEQ. With 225 kOhms for ZEQ and 1.5 kOhms for XL, the Q is 225\u20441.5, or Q = 150.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.8, page no. 761"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Z = 17600 #Equivalent Impedence\n",
+ "L = 350e-6 # Value of Inductor (350-uH)\n",
+ "f = 200000 #Frequency (200 KHz)\n",
+ "p = 3.142 #Value of pi\n",
+ "\n",
+ "#Calculation\n",
+ "x = 2*p*f*L\n",
+ "Q = Z/x\n",
+ "\n",
+ "#Result\n",
+ "print \"Value of Quality factor is\", round(Q)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of Quality factor is 40.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.9, page no. 764"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Q = 100 #Quality Factor\n",
+ "fr = 2000000 # Resonant frequency (2000 KHz)\n",
+ "\n",
+ "#Calculation\n",
+ "f = fr/Q\n",
+ "f1 = fr-(f/2)\n",
+ "f2 = fr+(f/2)\n",
+ "\n",
+ "#Result\n",
+ "print \"The total Bandwidth is\",round(f),\"Hz\"\n",
+ "print \"The edge frequency f1 is\",round(f1),\"Hz\"\n",
+ "print \"The edge frequency f2 is\",round(f2),\"Hz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total Bandwidth is 20000.0 Hz\n",
+ "The edge frequency f1 is 1990000.0 Hz\n",
+ "The edge frequency f2 is 2010000.0 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.10, page no. 764"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Q = 100 #Quality Factor\n",
+ "fr = 6000000 # Resonant frequency (6000 KHz)\n",
+ "\n",
+ "#Calculation\n",
+ "f = fr/Q\n",
+ "f1 = fr-(f/2)\n",
+ "f2 = fr+(f/2)\n",
+ "\n",
+ "#Result\n",
+ "print \"The total Bandwidth is\",round(f),\"Hz\"\n",
+ "print \"The edge frequency f1 is\",round(f1),\"Hz\"\n",
+ "print \"The edge frequency f2 is\",round(f2),\"Hz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total Bandwidth is 60000.0 Hz\n",
+ "The edge frequency f1 is 5970000.0 Hz\n",
+ "The edge frequency f2 is 6030000.0 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/TestContribution/bilal_1.ipynb b/TestContribution/bilal_1.ipynb new file mode 100755 index 00000000..22d13091 --- /dev/null +++ b/TestContribution/bilal_1.ipynb @@ -0,0 +1,406 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:e19af2f3d200c02cdde989919b1864a16727820a7b37667c650dffdfc779957b"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 25: Resonance"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.1, page no. 754"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import numpy as np\n",
+ "\n",
+ "#Variable declaration\n",
+ "L = 8 # Value of Inductor (8-H)\n",
+ "C = 20e-6 #Value of Capacitor (20-uF)\n",
+ "p = 3.142 #Value of pi\n",
+ "\n",
+ "#Calculation\n",
+ "a = np.sqrt(L*C)\n",
+ "fr = 1/(2*p*a)\n",
+ "\n",
+ "#Result\n",
+ "print \"Resonant frequency is\",float(fr), \"Hz i.e 12.6 Hz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resonant frequency is 12.5806717862 Hz i.e 12.6 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.2, page no. 755"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import numpy as np\n",
+ "\n",
+ "#Variable declaration\n",
+ "L = 2e-6 # Value of Inductor (2-uH)\n",
+ "C = 3e-12 #Value of Capacitor (3-pF)\n",
+ "p = 3.142 #Value of pi\n",
+ "\n",
+ "#Calculation\n",
+ "a = np.sqrt(L*C)\n",
+ "fr = 1/(2*p*a)\n",
+ "\n",
+ "#Result\n",
+ "print \"Resonant frequency is\",float(fr), \"Hz i.e 65 MHz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resonant frequency is 64966309.7492 Hz i.e 65 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.3, page no. 756"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "L = 239e-6 # Value of Inductor (239-uH)\n",
+ "f = 1000*10^3 #Frequency (1000 KHz)\n",
+ "p = 3.142 #Value of pi\n",
+ "\n",
+ "#Calculation\n",
+ "a = p*p\n",
+ "b = f*f\n",
+ "C = 1/(4*a*b*L)\n",
+ "\n",
+ "#Result\n",
+ "print \"Value of Capacitor is\",float(C), \"F i.e 106 pF\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of Capacitor is 1.05893477038e-06 F i.e 106 pF\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.4, page no. 756"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "C = 106e-12 # Value of Capacitor (106-pF)\n",
+ "f = 1000000 #Frequency (1 MHz)\n",
+ "p = 3.142 #Value of pi\n",
+ "\n",
+ "#Calculation\n",
+ "a = 4*(p*p)\n",
+ "b = f*f\n",
+ "c = a*b*C\n",
+ "L = 1/(a*C*b)\n",
+ "\n",
+ "#Result\n",
+ "print \"Value of Inductor is\",float(L), \"H i.e 239 uH\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of Inductor is 0.000238903098251 H i.e 239 uH\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.5, page no. 759"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vo = 100e-3 #Output Voltage(100-mV)\n",
+ "Vi = 2e-3 #Input Voltage(2-mV)\n",
+ "\n",
+ "#Calculation\n",
+ "Q = Vo/Vi\n",
+ "\n",
+ "#Result\n",
+ "print \"Value of Q is\",round(Q),"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of Q is 50.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.6, page no. 759"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Q = 50 #Quality Factor\n",
+ "L = 250e-6 # Value of Inductor (250-uH)\n",
+ "f = 400000 #Frequency (400 KHz)\n",
+ "p = 3.142 #Value of pi\n",
+ "\n",
+ "#Calculation\n",
+ "x = 2*p*f*L\n",
+ "rs = x/Q\n",
+ "\n",
+ "#Result\n",
+ "print \"Value of AC resistance is\",float(rs),\"Ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of AC resistance is 12.568\n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.7, page no. 761"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print \"Because they divide VT equally, ZEQ is 225 kOhms, the same as R1. The amount of input voltage does not matter, as the voltage division determines the relative proportions between R1 and ZEQ. With 225 kOhms for ZEQ and 1.5 kOhms for XL, the Q is 225\u20441.5, or Q = 150.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Because they divide VT equally, ZEQ is 225 kOhms, the same as R1. The amount of input voltage does not matter, as the voltage division determines the relative proportions between R1 and ZEQ. With 225 kOhms for ZEQ and 1.5 kOhms for XL, the Q is 225\u20441.5, or Q = 150.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.8, page no. 761"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Z = 17600 #Equivalent Impedence\n",
+ "L = 350e-6 # Value of Inductor (350-uH)\n",
+ "f = 200000 #Frequency (200 KHz)\n",
+ "p = 3.142 #Value of pi\n",
+ "\n",
+ "#Calculation\n",
+ "x = 2*p*f*L\n",
+ "Q = Z/x\n",
+ "\n",
+ "#Result\n",
+ "print \"Value of Quality factor is\", round(Q)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of Quality factor is 40.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.9, page no. 764"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Q = 100 #Quality Factor\n",
+ "fr = 2000000 # Resonant frequency (2000 KHz)\n",
+ "\n",
+ "#Calculation\n",
+ "f = fr/Q\n",
+ "f1 = fr-(f/2)\n",
+ "f2 = fr+(f/2)\n",
+ "\n",
+ "#Result\n",
+ "print \"The total Bandwidth is\",round(f),\"Hz\"\n",
+ "print \"The edge frequency f1 is\",round(f1),\"Hz\"\n",
+ "print \"The edge frequency f2 is\",round(f2),\"Hz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total Bandwidth is 20000.0 Hz\n",
+ "The edge frequency f1 is 1990000.0 Hz\n",
+ "The edge frequency f2 is 2010000.0 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.10, page no. 764"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Q = 100 #Quality Factor\n",
+ "fr = 6000000 # Resonant frequency (6000 KHz)\n",
+ "\n",
+ "#Calculation\n",
+ "f = fr/Q\n",
+ "f1 = fr-(f/2)\n",
+ "f2 = fr+(f/2)\n",
+ "\n",
+ "#Result\n",
+ "print \"The total Bandwidth is\",round(f),\"Hz\"\n",
+ "print \"The edge frequency f1 is\",round(f1),\"Hz\"\n",
+ "print \"The edge frequency f2 is\",round(f2),\"Hz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total Bandwidth is 60000.0 Hz\n",
+ "The edge frequency f1 is 5970000.0 Hz\n",
+ "The edge frequency f2 is 6030000.0 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/TestContribution/bilal_2.ipynb b/TestContribution/bilal_2.ipynb new file mode 100755 index 00000000..22d13091 --- /dev/null +++ b/TestContribution/bilal_2.ipynb @@ -0,0 +1,406 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:e19af2f3d200c02cdde989919b1864a16727820a7b37667c650dffdfc779957b"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 25: Resonance"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.1, page no. 754"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import numpy as np\n",
+ "\n",
+ "#Variable declaration\n",
+ "L = 8 # Value of Inductor (8-H)\n",
+ "C = 20e-6 #Value of Capacitor (20-uF)\n",
+ "p = 3.142 #Value of pi\n",
+ "\n",
+ "#Calculation\n",
+ "a = np.sqrt(L*C)\n",
+ "fr = 1/(2*p*a)\n",
+ "\n",
+ "#Result\n",
+ "print \"Resonant frequency is\",float(fr), \"Hz i.e 12.6 Hz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resonant frequency is 12.5806717862 Hz i.e 12.6 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.2, page no. 755"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import numpy as np\n",
+ "\n",
+ "#Variable declaration\n",
+ "L = 2e-6 # Value of Inductor (2-uH)\n",
+ "C = 3e-12 #Value of Capacitor (3-pF)\n",
+ "p = 3.142 #Value of pi\n",
+ "\n",
+ "#Calculation\n",
+ "a = np.sqrt(L*C)\n",
+ "fr = 1/(2*p*a)\n",
+ "\n",
+ "#Result\n",
+ "print \"Resonant frequency is\",float(fr), \"Hz i.e 65 MHz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resonant frequency is 64966309.7492 Hz i.e 65 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.3, page no. 756"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "L = 239e-6 # Value of Inductor (239-uH)\n",
+ "f = 1000*10^3 #Frequency (1000 KHz)\n",
+ "p = 3.142 #Value of pi\n",
+ "\n",
+ "#Calculation\n",
+ "a = p*p\n",
+ "b = f*f\n",
+ "C = 1/(4*a*b*L)\n",
+ "\n",
+ "#Result\n",
+ "print \"Value of Capacitor is\",float(C), \"F i.e 106 pF\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of Capacitor is 1.05893477038e-06 F i.e 106 pF\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.4, page no. 756"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "C = 106e-12 # Value of Capacitor (106-pF)\n",
+ "f = 1000000 #Frequency (1 MHz)\n",
+ "p = 3.142 #Value of pi\n",
+ "\n",
+ "#Calculation\n",
+ "a = 4*(p*p)\n",
+ "b = f*f\n",
+ "c = a*b*C\n",
+ "L = 1/(a*C*b)\n",
+ "\n",
+ "#Result\n",
+ "print \"Value of Inductor is\",float(L), \"H i.e 239 uH\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of Inductor is 0.000238903098251 H i.e 239 uH\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.5, page no. 759"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vo = 100e-3 #Output Voltage(100-mV)\n",
+ "Vi = 2e-3 #Input Voltage(2-mV)\n",
+ "\n",
+ "#Calculation\n",
+ "Q = Vo/Vi\n",
+ "\n",
+ "#Result\n",
+ "print \"Value of Q is\",round(Q),"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of Q is 50.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.6, page no. 759"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Q = 50 #Quality Factor\n",
+ "L = 250e-6 # Value of Inductor (250-uH)\n",
+ "f = 400000 #Frequency (400 KHz)\n",
+ "p = 3.142 #Value of pi\n",
+ "\n",
+ "#Calculation\n",
+ "x = 2*p*f*L\n",
+ "rs = x/Q\n",
+ "\n",
+ "#Result\n",
+ "print \"Value of AC resistance is\",float(rs),\"Ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of AC resistance is 12.568\n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.7, page no. 761"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print \"Because they divide VT equally, ZEQ is 225 kOhms, the same as R1. The amount of input voltage does not matter, as the voltage division determines the relative proportions between R1 and ZEQ. With 225 kOhms for ZEQ and 1.5 kOhms for XL, the Q is 225\u20441.5, or Q = 150.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Because they divide VT equally, ZEQ is 225 kOhms, the same as R1. The amount of input voltage does not matter, as the voltage division determines the relative proportions between R1 and ZEQ. With 225 kOhms for ZEQ and 1.5 kOhms for XL, the Q is 225\u20441.5, or Q = 150.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.8, page no. 761"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Z = 17600 #Equivalent Impedence\n",
+ "L = 350e-6 # Value of Inductor (350-uH)\n",
+ "f = 200000 #Frequency (200 KHz)\n",
+ "p = 3.142 #Value of pi\n",
+ "\n",
+ "#Calculation\n",
+ "x = 2*p*f*L\n",
+ "Q = Z/x\n",
+ "\n",
+ "#Result\n",
+ "print \"Value of Quality factor is\", round(Q)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of Quality factor is 40.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.9, page no. 764"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Q = 100 #Quality Factor\n",
+ "fr = 2000000 # Resonant frequency (2000 KHz)\n",
+ "\n",
+ "#Calculation\n",
+ "f = fr/Q\n",
+ "f1 = fr-(f/2)\n",
+ "f2 = fr+(f/2)\n",
+ "\n",
+ "#Result\n",
+ "print \"The total Bandwidth is\",round(f),\"Hz\"\n",
+ "print \"The edge frequency f1 is\",round(f1),\"Hz\"\n",
+ "print \"The edge frequency f2 is\",round(f2),\"Hz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total Bandwidth is 20000.0 Hz\n",
+ "The edge frequency f1 is 1990000.0 Hz\n",
+ "The edge frequency f2 is 2010000.0 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.10, page no. 764"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Q = 100 #Quality Factor\n",
+ "fr = 6000000 # Resonant frequency (6000 KHz)\n",
+ "\n",
+ "#Calculation\n",
+ "f = fr/Q\n",
+ "f1 = fr-(f/2)\n",
+ "f2 = fr+(f/2)\n",
+ "\n",
+ "#Result\n",
+ "print \"The total Bandwidth is\",round(f),\"Hz\"\n",
+ "print \"The edge frequency f1 is\",round(f1),\"Hz\"\n",
+ "print \"The edge frequency f2 is\",round(f2),\"Hz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total Bandwidth is 60000.0 Hz\n",
+ "The edge frequency f1 is 5970000.0 Hz\n",
+ "The edge frequency f2 is 6030000.0 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/TestContribution/bilal_3.ipynb b/TestContribution/bilal_3.ipynb new file mode 100755 index 00000000..22d13091 --- /dev/null +++ b/TestContribution/bilal_3.ipynb @@ -0,0 +1,406 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:e19af2f3d200c02cdde989919b1864a16727820a7b37667c650dffdfc779957b"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 25: Resonance"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.1, page no. 754"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import numpy as np\n",
+ "\n",
+ "#Variable declaration\n",
+ "L = 8 # Value of Inductor (8-H)\n",
+ "C = 20e-6 #Value of Capacitor (20-uF)\n",
+ "p = 3.142 #Value of pi\n",
+ "\n",
+ "#Calculation\n",
+ "a = np.sqrt(L*C)\n",
+ "fr = 1/(2*p*a)\n",
+ "\n",
+ "#Result\n",
+ "print \"Resonant frequency is\",float(fr), \"Hz i.e 12.6 Hz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resonant frequency is 12.5806717862 Hz i.e 12.6 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.2, page no. 755"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import numpy as np\n",
+ "\n",
+ "#Variable declaration\n",
+ "L = 2e-6 # Value of Inductor (2-uH)\n",
+ "C = 3e-12 #Value of Capacitor (3-pF)\n",
+ "p = 3.142 #Value of pi\n",
+ "\n",
+ "#Calculation\n",
+ "a = np.sqrt(L*C)\n",
+ "fr = 1/(2*p*a)\n",
+ "\n",
+ "#Result\n",
+ "print \"Resonant frequency is\",float(fr), \"Hz i.e 65 MHz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resonant frequency is 64966309.7492 Hz i.e 65 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.3, page no. 756"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "L = 239e-6 # Value of Inductor (239-uH)\n",
+ "f = 1000*10^3 #Frequency (1000 KHz)\n",
+ "p = 3.142 #Value of pi\n",
+ "\n",
+ "#Calculation\n",
+ "a = p*p\n",
+ "b = f*f\n",
+ "C = 1/(4*a*b*L)\n",
+ "\n",
+ "#Result\n",
+ "print \"Value of Capacitor is\",float(C), \"F i.e 106 pF\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of Capacitor is 1.05893477038e-06 F i.e 106 pF\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.4, page no. 756"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "C = 106e-12 # Value of Capacitor (106-pF)\n",
+ "f = 1000000 #Frequency (1 MHz)\n",
+ "p = 3.142 #Value of pi\n",
+ "\n",
+ "#Calculation\n",
+ "a = 4*(p*p)\n",
+ "b = f*f\n",
+ "c = a*b*C\n",
+ "L = 1/(a*C*b)\n",
+ "\n",
+ "#Result\n",
+ "print \"Value of Inductor is\",float(L), \"H i.e 239 uH\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of Inductor is 0.000238903098251 H i.e 239 uH\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.5, page no. 759"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vo = 100e-3 #Output Voltage(100-mV)\n",
+ "Vi = 2e-3 #Input Voltage(2-mV)\n",
+ "\n",
+ "#Calculation\n",
+ "Q = Vo/Vi\n",
+ "\n",
+ "#Result\n",
+ "print \"Value of Q is\",round(Q),"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of Q is 50.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.6, page no. 759"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Q = 50 #Quality Factor\n",
+ "L = 250e-6 # Value of Inductor (250-uH)\n",
+ "f = 400000 #Frequency (400 KHz)\n",
+ "p = 3.142 #Value of pi\n",
+ "\n",
+ "#Calculation\n",
+ "x = 2*p*f*L\n",
+ "rs = x/Q\n",
+ "\n",
+ "#Result\n",
+ "print \"Value of AC resistance is\",float(rs),\"Ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of AC resistance is 12.568\n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.7, page no. 761"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print \"Because they divide VT equally, ZEQ is 225 kOhms, the same as R1. The amount of input voltage does not matter, as the voltage division determines the relative proportions between R1 and ZEQ. With 225 kOhms for ZEQ and 1.5 kOhms for XL, the Q is 225\u20441.5, or Q = 150.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Because they divide VT equally, ZEQ is 225 kOhms, the same as R1. The amount of input voltage does not matter, as the voltage division determines the relative proportions between R1 and ZEQ. With 225 kOhms for ZEQ and 1.5 kOhms for XL, the Q is 225\u20441.5, or Q = 150.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.8, page no. 761"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Z = 17600 #Equivalent Impedence\n",
+ "L = 350e-6 # Value of Inductor (350-uH)\n",
+ "f = 200000 #Frequency (200 KHz)\n",
+ "p = 3.142 #Value of pi\n",
+ "\n",
+ "#Calculation\n",
+ "x = 2*p*f*L\n",
+ "Q = Z/x\n",
+ "\n",
+ "#Result\n",
+ "print \"Value of Quality factor is\", round(Q)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of Quality factor is 40.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.9, page no. 764"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Q = 100 #Quality Factor\n",
+ "fr = 2000000 # Resonant frequency (2000 KHz)\n",
+ "\n",
+ "#Calculation\n",
+ "f = fr/Q\n",
+ "f1 = fr-(f/2)\n",
+ "f2 = fr+(f/2)\n",
+ "\n",
+ "#Result\n",
+ "print \"The total Bandwidth is\",round(f),\"Hz\"\n",
+ "print \"The edge frequency f1 is\",round(f1),\"Hz\"\n",
+ "print \"The edge frequency f2 is\",round(f2),\"Hz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total Bandwidth is 20000.0 Hz\n",
+ "The edge frequency f1 is 1990000.0 Hz\n",
+ "The edge frequency f2 is 2010000.0 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 25.10, page no. 764"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Q = 100 #Quality Factor\n",
+ "fr = 6000000 # Resonant frequency (6000 KHz)\n",
+ "\n",
+ "#Calculation\n",
+ "f = fr/Q\n",
+ "f1 = fr-(f/2)\n",
+ "f2 = fr+(f/2)\n",
+ "\n",
+ "#Result\n",
+ "print \"The total Bandwidth is\",round(f),\"Hz\"\n",
+ "print \"The edge frequency f1 is\",round(f1),\"Hz\"\n",
+ "print \"The edge frequency f2 is\",round(f2),\"Hz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total Bandwidth is 60000.0 Hz\n",
+ "The edge frequency f1 is 5970000.0 Hz\n",
+ "The edge frequency f2 is 6030000.0 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/TestContribution/ch3.ipynb b/TestContribution/ch3.ipynb new file mode 100755 index 00000000..8becd279 --- /dev/null +++ b/TestContribution/ch3.ipynb @@ -0,0 +1,941 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : The mechanical equivalent of heat" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 pageno : 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "m = 20;\t\t\t#calorimeter of water equivalent in gm\n", + "n = 1030;\t\t\t#weight of water in gm\n", + "p = 2;\t\t\t#no.of paddles\n", + "a = 10;\t\t\t#weight of each paddle in kg\n", + "s = 80;\t\t\t#dismath.tance between paddles in m\n", + "g = 980;\t\t\t#accelaration due to gravity in cm/sec**2\n", + "\n", + "# Calculations\n", + "E = (p*a*1000*g*s*100);\t\t\t#potential energy in dyne cm\n", + "T = (E)/(1050*4.18*10**7);\t\t\t#rise in temperature in deg.C\n", + "\n", + "# Result\n", + "print 'the rise in temperature of water is %3.2f deg.C'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rise in temperature of water is 3.57 deg.C\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 pageno : 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "cp = 0.1;\t\t\t#specific heat of copper in kj/kg-K\n", + "w = 120;\t\t\t#weight of copper calorimeter in gm\n", + "a = 1400;\t\t\t#weight of paraffin oil in gm\n", + "cp1 = 0.6;\t\t\t#specific of parafin oil in kj/kg-K\n", + "b = 10**8;\t\t\t#force to rotate the paddle in dynes\n", + "T = 16;\t\t\t#rise in temperature in deg.C\n", + "n = 900;\t\t\t#no.of revolutions stirred \n", + "pi = 3.14;\t\t\t#value of pi\n", + "\n", + "# Calculations\n", + "c = 2*pi*b;\t\t\t#work done by a rotating paddle per rotation in dyne cm per rotation\n", + "d = c*n;\t\t\t#total work done in dyne cm \n", + "hc = w*cp*16;\t\t\t#heat gained by calorimeter in calories\n", + "hp = a*cp1*16;\t\t\t#heat gaained by paraffin oil in calories \n", + "J = d/(hc+hp);\t\t\t#mecanical equivalent of heat in erg/cal\n", + "\n", + "# Result\n", + "print 'mecanical equivalent of heat is %.2e erg/cal'%(J)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mecanical equivalent of heat is 4.15e+07 erg/cal\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 pageno : 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables \n", + "cp = 0.12;\t\t\t#specific heat of iron in kj/kg-K\n", + "m = 25;\t\t\t#mass of iron in lb\n", + "h = 0.4;\t\t\t#horse power developed in 3 min\n", + "t = 3;\t\t\t#time taken to develop the horse power in min\n", + "T = 17;\t\t\t#raise in temp in deg.C\n", + "\n", + "# Calculations\n", + "w = h*33000*t;\t\t\t#total work done in ft-lb\n", + "H = m*cp*T;\t\t\t#aount of heat developed in B.Th.U\n", + "J = (w)/H;\t\t\t#the value of mechanical equivalent of heat\n", + "\n", + "# Result\n", + "print 'the mechanical equivalent of water is %3.1f ft-lb/B.Th.U'%(J)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the mechanical equivalent of water is 776.5 ft-lb/B.Th.U\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 pageno : 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables \n", + "n = 2.;\t\t\t#no.of lead blocks\n", + "m = 210.;\t\t\t#mass of each lead block in gm\n", + "v = 20000.;\t\t\t#velocity of block relative to earth in cm/sec\n", + "J = 4.2*10**7;\t\t\t#mechanical equivalent of heat in ergs/calorie\n", + "cp = 0.03;\t\t\t#specific heat of lead in kj/kg-K\n", + "\n", + "# Calculations\n", + "E = (m*v**2)/2;\t\t\t#kinetic energy of each block in ergs\n", + "E2 = n*E;\t\t\t#total kinetic energy in ergs\n", + "T = E2/(J*m*n*cp);\t\t\t#mean rise in temperature in T\n", + "\n", + "# Result\n", + "print 'the mean rise in temperature is %3.1f deg.C'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the mean rise in temperature is 158.7 deg.C\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 pageno : 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables \n", + "h = 150;\t\t\t#height froom which ball fallen in ft\n", + "cp = 0.03;\t\t\t#specific heat of lead in kj/kg-K\n", + "J = 778;\t\t\t#mechanical equivalent of heat in ft lb/B.Th.U\n", + "\n", + "# Calculations\n", + "#work done in falling is equal to heat absorbed by the ball\n", + "T = 160./(J*cp)*(5./9);\t\t\t#the raise in temperature in T\n", + "\n", + "# Result\n", + "print 'the raise in temperature is %3.1f deg.C'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the raise in temperature is 3.8 deg.C\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 pageno : 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "# Variables \n", + "w = 26.6;\t\t\t#work done one horse in to raise the temperature in lb\n", + "T1 = 32.;\t\t\t#temperature at initial in deg.F\n", + "T2 = 212.;\t\t\t#temperature at final in deg.F\n", + "t = 2.5;\t\t\t#time to raise the tmperature in hrs\n", + "p = 25.;\t\t\t#percentage of heat lossed \n", + "\n", + "# Calculations\n", + "#only 75% of heat is utillised\n", + "x = w*180.*100.*778./((100-p)*150);\t\t\t#the rate at which horse worked\n", + "\n", + "# Result\n", + "print 'the rate at which horse worked is %3.0f ft-lb wt/min'%(x)\n", + "print \"Note : Answer in book is rounded off, Please calculate manually. This answer is accurate.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rate at which horse worked is 33112 ft-lb wt/min\n", + "Note : Answer in book is rounded off, Please calculate manually. This answer is accurate.\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 pageno : 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables \n", + "l = 100.;\t\t\t#length of glass tube in cm\n", + "m = 500.;\t\t\t#mass of mercury in glass tube in gm\n", + "n = 20.;\t\t\t#number of times inverted i succession\n", + "cp = 0.03;\t\t\t#specific heat of mercury in cal/gm/deg.C\n", + "J = 4.2;\t\t\t#joule's equivalent in j/cal\n", + "g = 981.;\t\t\t#accelaration due to gravity in cm/s**2\n", + "\n", + "# Calculations\n", + "PE = m*g*l;\t\t\t#potential energy for each time in ergs\n", + "TE = PE*n;\t\t\t#total loss in ergs\n", + "T = TE/(m*cp*J*10**7);\t\t\t#rise in temperature in deg.C\n", + "#if T is the rise in temperature,then heat devoloped is m*cp*T\n", + "\n", + "# Result\n", + "print 'the rise in temperature is %3.2f deg.C'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rise in temperature is 1.56 deg.C\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8 page no : 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables \n", + "d = 0.02;\t\t\t#diameter of the copper wire in cm\n", + "i = 1;\t\t\t#current in amp\n", + "T = 100;\t\t\t#maximum steady temperature in deg.C\n", + "r = 2.1;\t\t\t#resistance of the wire in ohm cm\n", + "J = 4.2;\t\t\t#mechanical equivalent of heat in j/cal\n", + "a = 3.14*d**2/4;\t\t\t#area of the copper wire in sq.cm\n", + "a2 = 1;\t\t\t#area of the copper surface in sq.cm\n", + "\n", + "# Calculations \n", + "l = 1/(2*3.14*d/2);\t\t\t#length corresponding to the area in cm\n", + "R = r*l/a;\t\t\t#resistance of the copper wire in ohm\n", + "w = R*a2**2;\t\t\t#work done in joule\n", + "h = w/J;\t\t\t#heat devoleped in cal\n", + "\n", + "# Result\n", + "print 'the heat developed is %.f calories'%(round(h,-1))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the heat developed is 25360 calories\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9 pageno: 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "h = 10000;\t\t\t#vertical height of water fall in cm\n", + "v = 5;\t\t\t #volume disharged per sec in litres\n", + "J = 4.18;\t\t\t#joule's constant in j/cal\n", + "g = 981;\t\t\t#accelaration due to gravity in cm/sec**2\n", + "\n", + "# Calculations\n", + "m = v*1000;\t\t\t#mass of water disharged per sec in gm\n", + "w = m*h*g;\t\t\t#work done in falling through 100m in erg\n", + "H = (v*10**7 *g)/(J*10**7);\t#quantity of heat produced in cal\n", + "T = H/m;\t\t\t#rise in temperature in deg.C\n", + "\n", + "# Result\n", + "print 'the quantity of heat produced is %3f cal \\\n", + "\\nthe rise in temperature is %3.2f deg.C'%(H,T)\n", + "\n", + "print \"Note : Answer for part A in book is wrong. Please calculate manually.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the quantity of heat produced is 1173.444976 cal \n", + "the rise in temperature is 0.23 deg.C\n", + "Note : Answer for part A in book is wrong. Please calculate manually.\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10 page no : 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables \n", + "cp = 0.03;\t\t\t#specific heat of lead in kj/kg.k\n", + "v = 10000;\t\t\t#initial velocity of bullet in cm/sec\n", + "J = 4.2*10**7;\t\t\t#joules constant in ergs/cal\n", + "\n", + "# Calculations\n", + "ke = (v**2)/2;\t\t\t#kinetic energy of the bullet per unit mass in (cm/sec)**2\n", + "T = ke*95/(cp*J*100);\t\t\t#rise in temperature in deg.C\n", + "\n", + "# Result\n", + "print 'the rise in temperature is %3.1f deg.C'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rise in temperature is 37.7 deg.C\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.11 page no : 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables \n", + "h = 5000.;\t\t\t#height of the niagara falls in cm\n", + "J = 4.2*10**7;\t\t#joules constant in ergs per cal\n", + "g = 981;\t\t\t#accelaration due to gravity in cm/sec**2\n", + "\n", + "#CALCULATIONS\n", + "w = h*g;\t\t\t#work done per unit mass in ergs/gn\n", + "T = w/J;\t\t\t#rise in temperature in deg.C\n", + "\n", + "# Result\n", + "print 'the rise in temperature is %3.2f deg.C'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rise in temperature is 0.12 deg.C\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.12 page no : 48\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables \n", + "E1 = 3.75;\t\t\t#potential difference in v\n", + "E2 = 3.;\t\t\t#potential differnce in v\n", + "i1 = 2.5;\t\t\t#current in amp\n", + "i2 = 2;\t\t\t #current in amp\n", + "T = 2.7;\t\t\t#the rise in temperature of the water in deg.C\n", + "m1 = 48.;\t\t\t#water flow rate at 3 volts in gm/min\n", + "m2 = 30.;\t\t\t#water flow rate at 3.75volts in gm/min\n", + "s = 1;\t\t\t #specific heat of the water kj/kg-K\n", + "\n", + "# Calculations\n", + "J = (E1*i1-E2*i2)/(s*T*(m1-m2)/60);\t\t\t#the mechanical equivalent in j/cal\n", + "\n", + "# Result\n", + "print 'the mechanical equivalent is %3.3f j/cal'%(J)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the mechanical equivalent is 4.167 j/cal\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.13 page no : 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables \n", + "R = 64*10**7;\t\t\t#mean radius of the earth in cm\n", + "cp = 0.15;\t\t\t#specific heat of earth in kj/kg-K\n", + "J = 4.2*10**7;\t\t\t#joules consmath.tant in erg/cal\n", + "\n", + "# Calculations\n", + "i = 2./5*R**2;\t\t\t#moment of inertia of the earth per unit mass in joules\n", + "w = (2*3.14)/(24*60*60);\t\t\t#angular velocity of the earth in rad/sec\n", + "T = (i*w**2)/(2*J*cp);\t\t\t#rise in temperature in deg.C\n", + "\n", + "# Result\n", + "print 'the rise in the temperature is %.1f deg C'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rise in the temperature is 68.7 deg C\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.14 page no : 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables \n", + "cp = 1.25;\t\t\t#specific heat of helium inkj/kg-K\n", + "v = 1000;\t\t\t#volume of the gas in ml\n", + "w = 0.1785;\t\t\t#mass of the gas at N.T.P in gm\n", + "p = 76*13.6*981;\t#pressure of the gas at N.T.P in dynes\n", + "T = 273;\t\t\t#temperature at N.T.P in K\n", + "\n", + "# Calculations\n", + "V = 1000/w;\t\t\t#volume occupied by the 1gm of helium gas in cc\n", + "cv = cp/1.66;\t\t#specific heat at constant volume it is monatomuc gas kj/kg-K\n", + "r = p*V/T;\t\t\t#gas constant in cm**3.atm./K.mol\n", + "J = r/(cp-cv);\t\t#mechanical equivalent of heat in erg/cal\n", + "\n", + "# Result\n", + "print 'the mechanical equivalent of heat is %.2e ergs/calories'%(J)\n", + "print \"Note: answer slightly different because of rounding error.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the mechanical equivalent of heat is 4.19e+07 ergs/calories\n", + "Note: answer slightly different because of rounding error.\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Example 3.15 pageno : 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables \n", + "n = 1./273; \t\t\t#coefficent of expaaansion of air\n", + "a = 0.001293;\t \t\t#density of air in gm/cc\n", + "cp = 0.2389;\t\t \t#specific heat at consmath.tant pressure in kj/kg.K\n", + "p = 76*13.6*981;\t\t\t#pressure at 0 deg.C in dynes\n", + "\n", + "# Calculations\n", + "J = (p*n)/(a*(cp-(cp/1.405)));\t\t\t#mechanical equivalent of heat\n", + "\n", + "# Result\n", + "print 'mechanical equivalent of heat is %.2e ergs/cal'%(J)\n", + "print \"Note: answer slightly different because of rounding error.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mechanical equivalent of heat is 4.17e+07 ergs/cal\n", + "Note: answer slightly different because of rounding error.\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.16 pageno : 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "# Variables \n", + "r = 120./60;\t\t\t#rate of flow of water in gm/sec\n", + "T1 = 27.30;\t\t\t#temperature at initial in deg.C\n", + "T2 = 33.75;\t\t\t#temperature at final in deg.C\n", + "v = 12.64;\t\t\t#potential drop in volts\n", + "s = 1.; \t\t\t#specific heat of water in kj/kg-K\n", + "i = 4.35;\t\t\t#current through the heating element in amp\n", + "\n", + "# Calculations\n", + "J = (v*i)/(r*s*(T2-T1));\t\t\t#the mechanical equivalent of heat in joule/calorie\n", + "\n", + "# Result\n", + "print 'the mechanical equivalent of heat is %3.2f j/cal'%(J)\n", + "print \"Note: answer slightly different because of rounding error.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the mechanical equivalent of heat is 4.26 j/cal\n", + "Note: answer slightly different because of rounding error.\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17 page no : 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables \n", + "cp = 6.865;\t\t\t#molar specific heat of hydrogen at consmath.tant pressure in kj/kg-K\n", + "cv = 4.880;\t\t\t#molar specific heat of hydrogen at consmath.tant volume in kj/kg-K\n", + "p = 1.013*10**6;\t\t\t#atmospheric pressure in dynes/cm**2\n", + "v = 22.4*10**3;\t\t\t#gram molar volume in ml\n", + "T = 273;\t\t\t#temperature at N.T.P in kelvins\n", + "\n", + "# Calculations\n", + "J = (p*v)/(T*(cp-cv));\t\t\t#mechanical equivalent of heat\n", + "\n", + "# Result\n", + "print 'the mechanical equivalent of heat is %.2e ergs/cal'%(J)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the mechanical equivalent of heat is 4.19e+07 ergs/cal\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.18 page no : 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "# Variables\n", + "v = 1000.;\t\t\t#volume of hydrogen in ml\n", + "t = 273.;\t\t\t#tempature of hydrogen in kelvin\n", + "p = 76.;\t\t\t#pressure of hydrogen in mm of hg\n", + "w = 0.0896;\t\t\t#weigh of hydrogen in gm\n", + "cp = 3.409;\t\t\t#specific heat of hydogen in kj/kg-K\n", + "cv = 2.411;\t\t\t#specific heat of hydrogen in kj/kg-K\n", + "g = 981.;\t\t\t#accelaration due to gravity in cm/sec**2\n", + "a = 13.6;\t\t\t#density of mercury in gm/cm**2\n", + "\n", + "# Calculations\n", + "J = (p*v*g*a)/(w*t*(cp-cv));\t\t\t#mechanical equivalent of heat in ergs/cals\n", + "\n", + "# Result\n", + "print 'mechanical equivalent of heat is %.2e ergs/calorie'%(J)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mechanical equivalent of heat is 4.15e+07 ergs/calorie\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.19 page no : 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "cp = 0.23;\t\t\t#specific heat at constant pressure in kj/kg-K\n", + "a = 1.18;\t\t\t#density of air in gm/lit\n", + "J = 4.2*10**7;\t\t\t#mechanical equivalent of heat in ergs/cal\n", + "t = 300;\t\t\t#temperature of air in kelvin\n", + "p = 73*13.6*981;\t\t\t#pressure of air in dynes\n", + "\t\t\t#cp-cv = (r/J) = pv/(tj)\n", + "\n", + "#CALCULATON\n", + "cv = cp-(p*1000/(a*t*J));\t\t\t#specific heat at constant volume in calories\n", + "\n", + "# Result\n", + "print 'the specific heat at constant volume is %.4f calories'%(cv)\n", + "print \"Note: answer slightly different because of rounding error.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the specific heat at constant volume is 0.1645 calories\n", + "Note: answer slightly different because of rounding error.\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.20 pageno : 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "t1 = 0;\t\t\t#temperature of water in deg.C\n", + "t2 = 0;\t\t\t#temperature of ice in deg.C\n", + "J = 4.18*10**7;\t\t\t#the joules thomson coefficent in erg/cal\n", + "l = 80;\t\t\t#latent heat og fusion kj/kg\n", + "g = 981;\t\t\t#accelaration due to gravity in cm/sec**2\n", + " \n", + "# Calculations\n", + "h = l*J/(15*g);\t\t\t#height from which ice has fallen\n", + "\n", + "# Result\n", + "print 'the height from which ice has fallen is %.2e cm'%(h)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the height from which ice has fallen is 2.27e+05 cm\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.21 page no : 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "T = 80;\t\t\t#temperature of bullet in deg.C\n", + "cp = 0.03;\t\t\t#specific heat of lead in kj/kg-K\n", + "J = 4.2;\t\t\t#mechanical equivalent of heat in j/cal\n", + "\n", + "# Calculations\n", + "h = T*cp;\t\t\t#heat developed per unit mass in calorie\n", + "v = (J*10**7*h*2/0.9)**0.5;\t\t\t#velocity of bullet in cm/sec\n", + "\n", + "# Result\n", + "print 'the velocity of bullet is %.1e cm/sec'%(v)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the velocity of bullet is 1.5e+04 cm/sec\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.22 pageno : 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "w = 5.0;\t\t\t#weight of lead ball in lb\n", + "cp = 0.032;\t\t\t#specific heat of lead in Btu/lbdeg.F\n", + "h = 50;\t\t\t#height at which ball thrown in feets\n", + "v = 20;\t\t\t#vertical speed in ft/sec\n", + "g = 32;\t\t\t#accelararion due to gravity in ft/sec**2\n", + "\n", + "# Calculations\n", + "u = (v**2)+2*g*h\n", + "ke = (w/2*(u));\t\t\t#kinetic energy of the ball at ground\n", + "T = ke/(2*32*778*w*cp);\t\t\t#rise of temperature in deg.F\n", + "\n", + "# Result\n", + "print 'the rise in temperature is %.1f deg.F'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rise in temperature is 1.1 deg.F\n" + ] + } + ], + "prompt_number": 32 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/TestContribution/ch3_1.ipynb b/TestContribution/ch3_1.ipynb new file mode 100755 index 00000000..8becd279 --- /dev/null +++ b/TestContribution/ch3_1.ipynb @@ -0,0 +1,941 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : The mechanical equivalent of heat" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 pageno : 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "m = 20;\t\t\t#calorimeter of water equivalent in gm\n", + "n = 1030;\t\t\t#weight of water in gm\n", + "p = 2;\t\t\t#no.of paddles\n", + "a = 10;\t\t\t#weight of each paddle in kg\n", + "s = 80;\t\t\t#dismath.tance between paddles in m\n", + "g = 980;\t\t\t#accelaration due to gravity in cm/sec**2\n", + "\n", + "# Calculations\n", + "E = (p*a*1000*g*s*100);\t\t\t#potential energy in dyne cm\n", + "T = (E)/(1050*4.18*10**7);\t\t\t#rise in temperature in deg.C\n", + "\n", + "# Result\n", + "print 'the rise in temperature of water is %3.2f deg.C'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rise in temperature of water is 3.57 deg.C\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 pageno : 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "cp = 0.1;\t\t\t#specific heat of copper in kj/kg-K\n", + "w = 120;\t\t\t#weight of copper calorimeter in gm\n", + "a = 1400;\t\t\t#weight of paraffin oil in gm\n", + "cp1 = 0.6;\t\t\t#specific of parafin oil in kj/kg-K\n", + "b = 10**8;\t\t\t#force to rotate the paddle in dynes\n", + "T = 16;\t\t\t#rise in temperature in deg.C\n", + "n = 900;\t\t\t#no.of revolutions stirred \n", + "pi = 3.14;\t\t\t#value of pi\n", + "\n", + "# Calculations\n", + "c = 2*pi*b;\t\t\t#work done by a rotating paddle per rotation in dyne cm per rotation\n", + "d = c*n;\t\t\t#total work done in dyne cm \n", + "hc = w*cp*16;\t\t\t#heat gained by calorimeter in calories\n", + "hp = a*cp1*16;\t\t\t#heat gaained by paraffin oil in calories \n", + "J = d/(hc+hp);\t\t\t#mecanical equivalent of heat in erg/cal\n", + "\n", + "# Result\n", + "print 'mecanical equivalent of heat is %.2e erg/cal'%(J)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mecanical equivalent of heat is 4.15e+07 erg/cal\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 pageno : 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables \n", + "cp = 0.12;\t\t\t#specific heat of iron in kj/kg-K\n", + "m = 25;\t\t\t#mass of iron in lb\n", + "h = 0.4;\t\t\t#horse power developed in 3 min\n", + "t = 3;\t\t\t#time taken to develop the horse power in min\n", + "T = 17;\t\t\t#raise in temp in deg.C\n", + "\n", + "# Calculations\n", + "w = h*33000*t;\t\t\t#total work done in ft-lb\n", + "H = m*cp*T;\t\t\t#aount of heat developed in B.Th.U\n", + "J = (w)/H;\t\t\t#the value of mechanical equivalent of heat\n", + "\n", + "# Result\n", + "print 'the mechanical equivalent of water is %3.1f ft-lb/B.Th.U'%(J)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the mechanical equivalent of water is 776.5 ft-lb/B.Th.U\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 pageno : 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables \n", + "n = 2.;\t\t\t#no.of lead blocks\n", + "m = 210.;\t\t\t#mass of each lead block in gm\n", + "v = 20000.;\t\t\t#velocity of block relative to earth in cm/sec\n", + "J = 4.2*10**7;\t\t\t#mechanical equivalent of heat in ergs/calorie\n", + "cp = 0.03;\t\t\t#specific heat of lead in kj/kg-K\n", + "\n", + "# Calculations\n", + "E = (m*v**2)/2;\t\t\t#kinetic energy of each block in ergs\n", + "E2 = n*E;\t\t\t#total kinetic energy in ergs\n", + "T = E2/(J*m*n*cp);\t\t\t#mean rise in temperature in T\n", + "\n", + "# Result\n", + "print 'the mean rise in temperature is %3.1f deg.C'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the mean rise in temperature is 158.7 deg.C\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 pageno : 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables \n", + "h = 150;\t\t\t#height froom which ball fallen in ft\n", + "cp = 0.03;\t\t\t#specific heat of lead in kj/kg-K\n", + "J = 778;\t\t\t#mechanical equivalent of heat in ft lb/B.Th.U\n", + "\n", + "# Calculations\n", + "#work done in falling is equal to heat absorbed by the ball\n", + "T = 160./(J*cp)*(5./9);\t\t\t#the raise in temperature in T\n", + "\n", + "# Result\n", + "print 'the raise in temperature is %3.1f deg.C'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the raise in temperature is 3.8 deg.C\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 pageno : 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "# Variables \n", + "w = 26.6;\t\t\t#work done one horse in to raise the temperature in lb\n", + "T1 = 32.;\t\t\t#temperature at initial in deg.F\n", + "T2 = 212.;\t\t\t#temperature at final in deg.F\n", + "t = 2.5;\t\t\t#time to raise the tmperature in hrs\n", + "p = 25.;\t\t\t#percentage of heat lossed \n", + "\n", + "# Calculations\n", + "#only 75% of heat is utillised\n", + "x = w*180.*100.*778./((100-p)*150);\t\t\t#the rate at which horse worked\n", + "\n", + "# Result\n", + "print 'the rate at which horse worked is %3.0f ft-lb wt/min'%(x)\n", + "print \"Note : Answer in book is rounded off, Please calculate manually. This answer is accurate.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rate at which horse worked is 33112 ft-lb wt/min\n", + "Note : Answer in book is rounded off, Please calculate manually. This answer is accurate.\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 pageno : 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables \n", + "l = 100.;\t\t\t#length of glass tube in cm\n", + "m = 500.;\t\t\t#mass of mercury in glass tube in gm\n", + "n = 20.;\t\t\t#number of times inverted i succession\n", + "cp = 0.03;\t\t\t#specific heat of mercury in cal/gm/deg.C\n", + "J = 4.2;\t\t\t#joule's equivalent in j/cal\n", + "g = 981.;\t\t\t#accelaration due to gravity in cm/s**2\n", + "\n", + "# Calculations\n", + "PE = m*g*l;\t\t\t#potential energy for each time in ergs\n", + "TE = PE*n;\t\t\t#total loss in ergs\n", + "T = TE/(m*cp*J*10**7);\t\t\t#rise in temperature in deg.C\n", + "#if T is the rise in temperature,then heat devoloped is m*cp*T\n", + "\n", + "# Result\n", + "print 'the rise in temperature is %3.2f deg.C'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rise in temperature is 1.56 deg.C\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8 page no : 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables \n", + "d = 0.02;\t\t\t#diameter of the copper wire in cm\n", + "i = 1;\t\t\t#current in amp\n", + "T = 100;\t\t\t#maximum steady temperature in deg.C\n", + "r = 2.1;\t\t\t#resistance of the wire in ohm cm\n", + "J = 4.2;\t\t\t#mechanical equivalent of heat in j/cal\n", + "a = 3.14*d**2/4;\t\t\t#area of the copper wire in sq.cm\n", + "a2 = 1;\t\t\t#area of the copper surface in sq.cm\n", + "\n", + "# Calculations \n", + "l = 1/(2*3.14*d/2);\t\t\t#length corresponding to the area in cm\n", + "R = r*l/a;\t\t\t#resistance of the copper wire in ohm\n", + "w = R*a2**2;\t\t\t#work done in joule\n", + "h = w/J;\t\t\t#heat devoleped in cal\n", + "\n", + "# Result\n", + "print 'the heat developed is %.f calories'%(round(h,-1))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the heat developed is 25360 calories\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9 pageno: 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "h = 10000;\t\t\t#vertical height of water fall in cm\n", + "v = 5;\t\t\t #volume disharged per sec in litres\n", + "J = 4.18;\t\t\t#joule's constant in j/cal\n", + "g = 981;\t\t\t#accelaration due to gravity in cm/sec**2\n", + "\n", + "# Calculations\n", + "m = v*1000;\t\t\t#mass of water disharged per sec in gm\n", + "w = m*h*g;\t\t\t#work done in falling through 100m in erg\n", + "H = (v*10**7 *g)/(J*10**7);\t#quantity of heat produced in cal\n", + "T = H/m;\t\t\t#rise in temperature in deg.C\n", + "\n", + "# Result\n", + "print 'the quantity of heat produced is %3f cal \\\n", + "\\nthe rise in temperature is %3.2f deg.C'%(H,T)\n", + "\n", + "print \"Note : Answer for part A in book is wrong. Please calculate manually.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the quantity of heat produced is 1173.444976 cal \n", + "the rise in temperature is 0.23 deg.C\n", + "Note : Answer for part A in book is wrong. Please calculate manually.\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10 page no : 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables \n", + "cp = 0.03;\t\t\t#specific heat of lead in kj/kg.k\n", + "v = 10000;\t\t\t#initial velocity of bullet in cm/sec\n", + "J = 4.2*10**7;\t\t\t#joules constant in ergs/cal\n", + "\n", + "# Calculations\n", + "ke = (v**2)/2;\t\t\t#kinetic energy of the bullet per unit mass in (cm/sec)**2\n", + "T = ke*95/(cp*J*100);\t\t\t#rise in temperature in deg.C\n", + "\n", + "# Result\n", + "print 'the rise in temperature is %3.1f deg.C'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rise in temperature is 37.7 deg.C\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.11 page no : 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables \n", + "h = 5000.;\t\t\t#height of the niagara falls in cm\n", + "J = 4.2*10**7;\t\t#joules constant in ergs per cal\n", + "g = 981;\t\t\t#accelaration due to gravity in cm/sec**2\n", + "\n", + "#CALCULATIONS\n", + "w = h*g;\t\t\t#work done per unit mass in ergs/gn\n", + "T = w/J;\t\t\t#rise in temperature in deg.C\n", + "\n", + "# Result\n", + "print 'the rise in temperature is %3.2f deg.C'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rise in temperature is 0.12 deg.C\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.12 page no : 48\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables \n", + "E1 = 3.75;\t\t\t#potential difference in v\n", + "E2 = 3.;\t\t\t#potential differnce in v\n", + "i1 = 2.5;\t\t\t#current in amp\n", + "i2 = 2;\t\t\t #current in amp\n", + "T = 2.7;\t\t\t#the rise in temperature of the water in deg.C\n", + "m1 = 48.;\t\t\t#water flow rate at 3 volts in gm/min\n", + "m2 = 30.;\t\t\t#water flow rate at 3.75volts in gm/min\n", + "s = 1;\t\t\t #specific heat of the water kj/kg-K\n", + "\n", + "# Calculations\n", + "J = (E1*i1-E2*i2)/(s*T*(m1-m2)/60);\t\t\t#the mechanical equivalent in j/cal\n", + "\n", + "# Result\n", + "print 'the mechanical equivalent is %3.3f j/cal'%(J)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the mechanical equivalent is 4.167 j/cal\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.13 page no : 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables \n", + "R = 64*10**7;\t\t\t#mean radius of the earth in cm\n", + "cp = 0.15;\t\t\t#specific heat of earth in kj/kg-K\n", + "J = 4.2*10**7;\t\t\t#joules consmath.tant in erg/cal\n", + "\n", + "# Calculations\n", + "i = 2./5*R**2;\t\t\t#moment of inertia of the earth per unit mass in joules\n", + "w = (2*3.14)/(24*60*60);\t\t\t#angular velocity of the earth in rad/sec\n", + "T = (i*w**2)/(2*J*cp);\t\t\t#rise in temperature in deg.C\n", + "\n", + "# Result\n", + "print 'the rise in the temperature is %.1f deg C'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rise in the temperature is 68.7 deg C\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.14 page no : 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables \n", + "cp = 1.25;\t\t\t#specific heat of helium inkj/kg-K\n", + "v = 1000;\t\t\t#volume of the gas in ml\n", + "w = 0.1785;\t\t\t#mass of the gas at N.T.P in gm\n", + "p = 76*13.6*981;\t#pressure of the gas at N.T.P in dynes\n", + "T = 273;\t\t\t#temperature at N.T.P in K\n", + "\n", + "# Calculations\n", + "V = 1000/w;\t\t\t#volume occupied by the 1gm of helium gas in cc\n", + "cv = cp/1.66;\t\t#specific heat at constant volume it is monatomuc gas kj/kg-K\n", + "r = p*V/T;\t\t\t#gas constant in cm**3.atm./K.mol\n", + "J = r/(cp-cv);\t\t#mechanical equivalent of heat in erg/cal\n", + "\n", + "# Result\n", + "print 'the mechanical equivalent of heat is %.2e ergs/calories'%(J)\n", + "print \"Note: answer slightly different because of rounding error.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the mechanical equivalent of heat is 4.19e+07 ergs/calories\n", + "Note: answer slightly different because of rounding error.\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Example 3.15 pageno : 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables \n", + "n = 1./273; \t\t\t#coefficent of expaaansion of air\n", + "a = 0.001293;\t \t\t#density of air in gm/cc\n", + "cp = 0.2389;\t\t \t#specific heat at consmath.tant pressure in kj/kg.K\n", + "p = 76*13.6*981;\t\t\t#pressure at 0 deg.C in dynes\n", + "\n", + "# Calculations\n", + "J = (p*n)/(a*(cp-(cp/1.405)));\t\t\t#mechanical equivalent of heat\n", + "\n", + "# Result\n", + "print 'mechanical equivalent of heat is %.2e ergs/cal'%(J)\n", + "print \"Note: answer slightly different because of rounding error.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mechanical equivalent of heat is 4.17e+07 ergs/cal\n", + "Note: answer slightly different because of rounding error.\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.16 pageno : 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "# Variables \n", + "r = 120./60;\t\t\t#rate of flow of water in gm/sec\n", + "T1 = 27.30;\t\t\t#temperature at initial in deg.C\n", + "T2 = 33.75;\t\t\t#temperature at final in deg.C\n", + "v = 12.64;\t\t\t#potential drop in volts\n", + "s = 1.; \t\t\t#specific heat of water in kj/kg-K\n", + "i = 4.35;\t\t\t#current through the heating element in amp\n", + "\n", + "# Calculations\n", + "J = (v*i)/(r*s*(T2-T1));\t\t\t#the mechanical equivalent of heat in joule/calorie\n", + "\n", + "# Result\n", + "print 'the mechanical equivalent of heat is %3.2f j/cal'%(J)\n", + "print \"Note: answer slightly different because of rounding error.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the mechanical equivalent of heat is 4.26 j/cal\n", + "Note: answer slightly different because of rounding error.\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17 page no : 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables \n", + "cp = 6.865;\t\t\t#molar specific heat of hydrogen at consmath.tant pressure in kj/kg-K\n", + "cv = 4.880;\t\t\t#molar specific heat of hydrogen at consmath.tant volume in kj/kg-K\n", + "p = 1.013*10**6;\t\t\t#atmospheric pressure in dynes/cm**2\n", + "v = 22.4*10**3;\t\t\t#gram molar volume in ml\n", + "T = 273;\t\t\t#temperature at N.T.P in kelvins\n", + "\n", + "# Calculations\n", + "J = (p*v)/(T*(cp-cv));\t\t\t#mechanical equivalent of heat\n", + "\n", + "# Result\n", + "print 'the mechanical equivalent of heat is %.2e ergs/cal'%(J)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the mechanical equivalent of heat is 4.19e+07 ergs/cal\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.18 page no : 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "# Variables\n", + "v = 1000.;\t\t\t#volume of hydrogen in ml\n", + "t = 273.;\t\t\t#tempature of hydrogen in kelvin\n", + "p = 76.;\t\t\t#pressure of hydrogen in mm of hg\n", + "w = 0.0896;\t\t\t#weigh of hydrogen in gm\n", + "cp = 3.409;\t\t\t#specific heat of hydogen in kj/kg-K\n", + "cv = 2.411;\t\t\t#specific heat of hydrogen in kj/kg-K\n", + "g = 981.;\t\t\t#accelaration due to gravity in cm/sec**2\n", + "a = 13.6;\t\t\t#density of mercury in gm/cm**2\n", + "\n", + "# Calculations\n", + "J = (p*v*g*a)/(w*t*(cp-cv));\t\t\t#mechanical equivalent of heat in ergs/cals\n", + "\n", + "# Result\n", + "print 'mechanical equivalent of heat is %.2e ergs/calorie'%(J)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mechanical equivalent of heat is 4.15e+07 ergs/calorie\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.19 page no : 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "cp = 0.23;\t\t\t#specific heat at constant pressure in kj/kg-K\n", + "a = 1.18;\t\t\t#density of air in gm/lit\n", + "J = 4.2*10**7;\t\t\t#mechanical equivalent of heat in ergs/cal\n", + "t = 300;\t\t\t#temperature of air in kelvin\n", + "p = 73*13.6*981;\t\t\t#pressure of air in dynes\n", + "\t\t\t#cp-cv = (r/J) = pv/(tj)\n", + "\n", + "#CALCULATON\n", + "cv = cp-(p*1000/(a*t*J));\t\t\t#specific heat at constant volume in calories\n", + "\n", + "# Result\n", + "print 'the specific heat at constant volume is %.4f calories'%(cv)\n", + "print \"Note: answer slightly different because of rounding error.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the specific heat at constant volume is 0.1645 calories\n", + "Note: answer slightly different because of rounding error.\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.20 pageno : 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "t1 = 0;\t\t\t#temperature of water in deg.C\n", + "t2 = 0;\t\t\t#temperature of ice in deg.C\n", + "J = 4.18*10**7;\t\t\t#the joules thomson coefficent in erg/cal\n", + "l = 80;\t\t\t#latent heat og fusion kj/kg\n", + "g = 981;\t\t\t#accelaration due to gravity in cm/sec**2\n", + " \n", + "# Calculations\n", + "h = l*J/(15*g);\t\t\t#height from which ice has fallen\n", + "\n", + "# Result\n", + "print 'the height from which ice has fallen is %.2e cm'%(h)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the height from which ice has fallen is 2.27e+05 cm\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.21 page no : 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "T = 80;\t\t\t#temperature of bullet in deg.C\n", + "cp = 0.03;\t\t\t#specific heat of lead in kj/kg-K\n", + "J = 4.2;\t\t\t#mechanical equivalent of heat in j/cal\n", + "\n", + "# Calculations\n", + "h = T*cp;\t\t\t#heat developed per unit mass in calorie\n", + "v = (J*10**7*h*2/0.9)**0.5;\t\t\t#velocity of bullet in cm/sec\n", + "\n", + "# Result\n", + "print 'the velocity of bullet is %.1e cm/sec'%(v)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the velocity of bullet is 1.5e+04 cm/sec\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.22 pageno : 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "w = 5.0;\t\t\t#weight of lead ball in lb\n", + "cp = 0.032;\t\t\t#specific heat of lead in Btu/lbdeg.F\n", + "h = 50;\t\t\t#height at which ball thrown in feets\n", + "v = 20;\t\t\t#vertical speed in ft/sec\n", + "g = 32;\t\t\t#accelararion due to gravity in ft/sec**2\n", + "\n", + "# Calculations\n", + "u = (v**2)+2*g*h\n", + "ke = (w/2*(u));\t\t\t#kinetic energy of the ball at ground\n", + "T = ke/(2*32*778*w*cp);\t\t\t#rise of temperature in deg.F\n", + "\n", + "# Result\n", + "print 'the rise in temperature is %.1f deg.F'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rise in temperature is 1.1 deg.F\n" + ] + } + ], + "prompt_number": 32 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/TestContribution/ch3_2.ipynb b/TestContribution/ch3_2.ipynb new file mode 100755 index 00000000..8becd279 --- /dev/null +++ b/TestContribution/ch3_2.ipynb @@ -0,0 +1,941 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : The mechanical equivalent of heat" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 pageno : 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "m = 20;\t\t\t#calorimeter of water equivalent in gm\n", + "n = 1030;\t\t\t#weight of water in gm\n", + "p = 2;\t\t\t#no.of paddles\n", + "a = 10;\t\t\t#weight of each paddle in kg\n", + "s = 80;\t\t\t#dismath.tance between paddles in m\n", + "g = 980;\t\t\t#accelaration due to gravity in cm/sec**2\n", + "\n", + "# Calculations\n", + "E = (p*a*1000*g*s*100);\t\t\t#potential energy in dyne cm\n", + "T = (E)/(1050*4.18*10**7);\t\t\t#rise in temperature in deg.C\n", + "\n", + "# Result\n", + "print 'the rise in temperature of water is %3.2f deg.C'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rise in temperature of water is 3.57 deg.C\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 pageno : 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "cp = 0.1;\t\t\t#specific heat of copper in kj/kg-K\n", + "w = 120;\t\t\t#weight of copper calorimeter in gm\n", + "a = 1400;\t\t\t#weight of paraffin oil in gm\n", + "cp1 = 0.6;\t\t\t#specific of parafin oil in kj/kg-K\n", + "b = 10**8;\t\t\t#force to rotate the paddle in dynes\n", + "T = 16;\t\t\t#rise in temperature in deg.C\n", + "n = 900;\t\t\t#no.of revolutions stirred \n", + "pi = 3.14;\t\t\t#value of pi\n", + "\n", + "# Calculations\n", + "c = 2*pi*b;\t\t\t#work done by a rotating paddle per rotation in dyne cm per rotation\n", + "d = c*n;\t\t\t#total work done in dyne cm \n", + "hc = w*cp*16;\t\t\t#heat gained by calorimeter in calories\n", + "hp = a*cp1*16;\t\t\t#heat gaained by paraffin oil in calories \n", + "J = d/(hc+hp);\t\t\t#mecanical equivalent of heat in erg/cal\n", + "\n", + "# Result\n", + "print 'mecanical equivalent of heat is %.2e erg/cal'%(J)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mecanical equivalent of heat is 4.15e+07 erg/cal\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 pageno : 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables \n", + "cp = 0.12;\t\t\t#specific heat of iron in kj/kg-K\n", + "m = 25;\t\t\t#mass of iron in lb\n", + "h = 0.4;\t\t\t#horse power developed in 3 min\n", + "t = 3;\t\t\t#time taken to develop the horse power in min\n", + "T = 17;\t\t\t#raise in temp in deg.C\n", + "\n", + "# Calculations\n", + "w = h*33000*t;\t\t\t#total work done in ft-lb\n", + "H = m*cp*T;\t\t\t#aount of heat developed in B.Th.U\n", + "J = (w)/H;\t\t\t#the value of mechanical equivalent of heat\n", + "\n", + "# Result\n", + "print 'the mechanical equivalent of water is %3.1f ft-lb/B.Th.U'%(J)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the mechanical equivalent of water is 776.5 ft-lb/B.Th.U\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 pageno : 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables \n", + "n = 2.;\t\t\t#no.of lead blocks\n", + "m = 210.;\t\t\t#mass of each lead block in gm\n", + "v = 20000.;\t\t\t#velocity of block relative to earth in cm/sec\n", + "J = 4.2*10**7;\t\t\t#mechanical equivalent of heat in ergs/calorie\n", + "cp = 0.03;\t\t\t#specific heat of lead in kj/kg-K\n", + "\n", + "# Calculations\n", + "E = (m*v**2)/2;\t\t\t#kinetic energy of each block in ergs\n", + "E2 = n*E;\t\t\t#total kinetic energy in ergs\n", + "T = E2/(J*m*n*cp);\t\t\t#mean rise in temperature in T\n", + "\n", + "# Result\n", + "print 'the mean rise in temperature is %3.1f deg.C'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the mean rise in temperature is 158.7 deg.C\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 pageno : 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables \n", + "h = 150;\t\t\t#height froom which ball fallen in ft\n", + "cp = 0.03;\t\t\t#specific heat of lead in kj/kg-K\n", + "J = 778;\t\t\t#mechanical equivalent of heat in ft lb/B.Th.U\n", + "\n", + "# Calculations\n", + "#work done in falling is equal to heat absorbed by the ball\n", + "T = 160./(J*cp)*(5./9);\t\t\t#the raise in temperature in T\n", + "\n", + "# Result\n", + "print 'the raise in temperature is %3.1f deg.C'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the raise in temperature is 3.8 deg.C\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 pageno : 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "# Variables \n", + "w = 26.6;\t\t\t#work done one horse in to raise the temperature in lb\n", + "T1 = 32.;\t\t\t#temperature at initial in deg.F\n", + "T2 = 212.;\t\t\t#temperature at final in deg.F\n", + "t = 2.5;\t\t\t#time to raise the tmperature in hrs\n", + "p = 25.;\t\t\t#percentage of heat lossed \n", + "\n", + "# Calculations\n", + "#only 75% of heat is utillised\n", + "x = w*180.*100.*778./((100-p)*150);\t\t\t#the rate at which horse worked\n", + "\n", + "# Result\n", + "print 'the rate at which horse worked is %3.0f ft-lb wt/min'%(x)\n", + "print \"Note : Answer in book is rounded off, Please calculate manually. This answer is accurate.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rate at which horse worked is 33112 ft-lb wt/min\n", + "Note : Answer in book is rounded off, Please calculate manually. This answer is accurate.\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 pageno : 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables \n", + "l = 100.;\t\t\t#length of glass tube in cm\n", + "m = 500.;\t\t\t#mass of mercury in glass tube in gm\n", + "n = 20.;\t\t\t#number of times inverted i succession\n", + "cp = 0.03;\t\t\t#specific heat of mercury in cal/gm/deg.C\n", + "J = 4.2;\t\t\t#joule's equivalent in j/cal\n", + "g = 981.;\t\t\t#accelaration due to gravity in cm/s**2\n", + "\n", + "# Calculations\n", + "PE = m*g*l;\t\t\t#potential energy for each time in ergs\n", + "TE = PE*n;\t\t\t#total loss in ergs\n", + "T = TE/(m*cp*J*10**7);\t\t\t#rise in temperature in deg.C\n", + "#if T is the rise in temperature,then heat devoloped is m*cp*T\n", + "\n", + "# Result\n", + "print 'the rise in temperature is %3.2f deg.C'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rise in temperature is 1.56 deg.C\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8 page no : 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables \n", + "d = 0.02;\t\t\t#diameter of the copper wire in cm\n", + "i = 1;\t\t\t#current in amp\n", + "T = 100;\t\t\t#maximum steady temperature in deg.C\n", + "r = 2.1;\t\t\t#resistance of the wire in ohm cm\n", + "J = 4.2;\t\t\t#mechanical equivalent of heat in j/cal\n", + "a = 3.14*d**2/4;\t\t\t#area of the copper wire in sq.cm\n", + "a2 = 1;\t\t\t#area of the copper surface in sq.cm\n", + "\n", + "# Calculations \n", + "l = 1/(2*3.14*d/2);\t\t\t#length corresponding to the area in cm\n", + "R = r*l/a;\t\t\t#resistance of the copper wire in ohm\n", + "w = R*a2**2;\t\t\t#work done in joule\n", + "h = w/J;\t\t\t#heat devoleped in cal\n", + "\n", + "# Result\n", + "print 'the heat developed is %.f calories'%(round(h,-1))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the heat developed is 25360 calories\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9 pageno: 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables\n", + "h = 10000;\t\t\t#vertical height of water fall in cm\n", + "v = 5;\t\t\t #volume disharged per sec in litres\n", + "J = 4.18;\t\t\t#joule's constant in j/cal\n", + "g = 981;\t\t\t#accelaration due to gravity in cm/sec**2\n", + "\n", + "# Calculations\n", + "m = v*1000;\t\t\t#mass of water disharged per sec in gm\n", + "w = m*h*g;\t\t\t#work done in falling through 100m in erg\n", + "H = (v*10**7 *g)/(J*10**7);\t#quantity of heat produced in cal\n", + "T = H/m;\t\t\t#rise in temperature in deg.C\n", + "\n", + "# Result\n", + "print 'the quantity of heat produced is %3f cal \\\n", + "\\nthe rise in temperature is %3.2f deg.C'%(H,T)\n", + "\n", + "print \"Note : Answer for part A in book is wrong. Please calculate manually.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the quantity of heat produced is 1173.444976 cal \n", + "the rise in temperature is 0.23 deg.C\n", + "Note : Answer for part A in book is wrong. Please calculate manually.\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10 page no : 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables \n", + "cp = 0.03;\t\t\t#specific heat of lead in kj/kg.k\n", + "v = 10000;\t\t\t#initial velocity of bullet in cm/sec\n", + "J = 4.2*10**7;\t\t\t#joules constant in ergs/cal\n", + "\n", + "# Calculations\n", + "ke = (v**2)/2;\t\t\t#kinetic energy of the bullet per unit mass in (cm/sec)**2\n", + "T = ke*95/(cp*J*100);\t\t\t#rise in temperature in deg.C\n", + "\n", + "# Result\n", + "print 'the rise in temperature is %3.1f deg.C'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rise in temperature is 37.7 deg.C\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.11 page no : 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables \n", + "h = 5000.;\t\t\t#height of the niagara falls in cm\n", + "J = 4.2*10**7;\t\t#joules constant in ergs per cal\n", + "g = 981;\t\t\t#accelaration due to gravity in cm/sec**2\n", + "\n", + "#CALCULATIONS\n", + "w = h*g;\t\t\t#work done per unit mass in ergs/gn\n", + "T = w/J;\t\t\t#rise in temperature in deg.C\n", + "\n", + "# Result\n", + "print 'the rise in temperature is %3.2f deg.C'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rise in temperature is 0.12 deg.C\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.12 page no : 48\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "# Variables \n", + "E1 = 3.75;\t\t\t#potential difference in v\n", + "E2 = 3.;\t\t\t#potential differnce in v\n", + "i1 = 2.5;\t\t\t#current in amp\n", + "i2 = 2;\t\t\t #current in amp\n", + "T = 2.7;\t\t\t#the rise in temperature of the water in deg.C\n", + "m1 = 48.;\t\t\t#water flow rate at 3 volts in gm/min\n", + "m2 = 30.;\t\t\t#water flow rate at 3.75volts in gm/min\n", + "s = 1;\t\t\t #specific heat of the water kj/kg-K\n", + "\n", + "# Calculations\n", + "J = (E1*i1-E2*i2)/(s*T*(m1-m2)/60);\t\t\t#the mechanical equivalent in j/cal\n", + "\n", + "# Result\n", + "print 'the mechanical equivalent is %3.3f j/cal'%(J)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the mechanical equivalent is 4.167 j/cal\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.13 page no : 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables \n", + "R = 64*10**7;\t\t\t#mean radius of the earth in cm\n", + "cp = 0.15;\t\t\t#specific heat of earth in kj/kg-K\n", + "J = 4.2*10**7;\t\t\t#joules consmath.tant in erg/cal\n", + "\n", + "# Calculations\n", + "i = 2./5*R**2;\t\t\t#moment of inertia of the earth per unit mass in joules\n", + "w = (2*3.14)/(24*60*60);\t\t\t#angular velocity of the earth in rad/sec\n", + "T = (i*w**2)/(2*J*cp);\t\t\t#rise in temperature in deg.C\n", + "\n", + "# Result\n", + "print 'the rise in the temperature is %.1f deg C'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rise in the temperature is 68.7 deg C\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.14 page no : 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables \n", + "cp = 1.25;\t\t\t#specific heat of helium inkj/kg-K\n", + "v = 1000;\t\t\t#volume of the gas in ml\n", + "w = 0.1785;\t\t\t#mass of the gas at N.T.P in gm\n", + "p = 76*13.6*981;\t#pressure of the gas at N.T.P in dynes\n", + "T = 273;\t\t\t#temperature at N.T.P in K\n", + "\n", + "# Calculations\n", + "V = 1000/w;\t\t\t#volume occupied by the 1gm of helium gas in cc\n", + "cv = cp/1.66;\t\t#specific heat at constant volume it is monatomuc gas kj/kg-K\n", + "r = p*V/T;\t\t\t#gas constant in cm**3.atm./K.mol\n", + "J = r/(cp-cv);\t\t#mechanical equivalent of heat in erg/cal\n", + "\n", + "# Result\n", + "print 'the mechanical equivalent of heat is %.2e ergs/calories'%(J)\n", + "print \"Note: answer slightly different because of rounding error.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the mechanical equivalent of heat is 4.19e+07 ergs/calories\n", + "Note: answer slightly different because of rounding error.\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "\n", + "Example 3.15 pageno : 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables \n", + "n = 1./273; \t\t\t#coefficent of expaaansion of air\n", + "a = 0.001293;\t \t\t#density of air in gm/cc\n", + "cp = 0.2389;\t\t \t#specific heat at consmath.tant pressure in kj/kg.K\n", + "p = 76*13.6*981;\t\t\t#pressure at 0 deg.C in dynes\n", + "\n", + "# Calculations\n", + "J = (p*n)/(a*(cp-(cp/1.405)));\t\t\t#mechanical equivalent of heat\n", + "\n", + "# Result\n", + "print 'mechanical equivalent of heat is %.2e ergs/cal'%(J)\n", + "print \"Note: answer slightly different because of rounding error.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mechanical equivalent of heat is 4.17e+07 ergs/cal\n", + "Note: answer slightly different because of rounding error.\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.16 pageno : 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "# Variables \n", + "r = 120./60;\t\t\t#rate of flow of water in gm/sec\n", + "T1 = 27.30;\t\t\t#temperature at initial in deg.C\n", + "T2 = 33.75;\t\t\t#temperature at final in deg.C\n", + "v = 12.64;\t\t\t#potential drop in volts\n", + "s = 1.; \t\t\t#specific heat of water in kj/kg-K\n", + "i = 4.35;\t\t\t#current through the heating element in amp\n", + "\n", + "# Calculations\n", + "J = (v*i)/(r*s*(T2-T1));\t\t\t#the mechanical equivalent of heat in joule/calorie\n", + "\n", + "# Result\n", + "print 'the mechanical equivalent of heat is %3.2f j/cal'%(J)\n", + "print \"Note: answer slightly different because of rounding error.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the mechanical equivalent of heat is 4.26 j/cal\n", + "Note: answer slightly different because of rounding error.\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17 page no : 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables \n", + "cp = 6.865;\t\t\t#molar specific heat of hydrogen at consmath.tant pressure in kj/kg-K\n", + "cv = 4.880;\t\t\t#molar specific heat of hydrogen at consmath.tant volume in kj/kg-K\n", + "p = 1.013*10**6;\t\t\t#atmospheric pressure in dynes/cm**2\n", + "v = 22.4*10**3;\t\t\t#gram molar volume in ml\n", + "T = 273;\t\t\t#temperature at N.T.P in kelvins\n", + "\n", + "# Calculations\n", + "J = (p*v)/(T*(cp-cv));\t\t\t#mechanical equivalent of heat\n", + "\n", + "# Result\n", + "print 'the mechanical equivalent of heat is %.2e ergs/cal'%(J)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the mechanical equivalent of heat is 4.19e+07 ergs/cal\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.18 page no : 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "# Variables\n", + "v = 1000.;\t\t\t#volume of hydrogen in ml\n", + "t = 273.;\t\t\t#tempature of hydrogen in kelvin\n", + "p = 76.;\t\t\t#pressure of hydrogen in mm of hg\n", + "w = 0.0896;\t\t\t#weigh of hydrogen in gm\n", + "cp = 3.409;\t\t\t#specific heat of hydogen in kj/kg-K\n", + "cv = 2.411;\t\t\t#specific heat of hydrogen in kj/kg-K\n", + "g = 981.;\t\t\t#accelaration due to gravity in cm/sec**2\n", + "a = 13.6;\t\t\t#density of mercury in gm/cm**2\n", + "\n", + "# Calculations\n", + "J = (p*v*g*a)/(w*t*(cp-cv));\t\t\t#mechanical equivalent of heat in ergs/cals\n", + "\n", + "# Result\n", + "print 'mechanical equivalent of heat is %.2e ergs/calorie'%(J)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mechanical equivalent of heat is 4.15e+07 ergs/calorie\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.19 page no : 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "cp = 0.23;\t\t\t#specific heat at constant pressure in kj/kg-K\n", + "a = 1.18;\t\t\t#density of air in gm/lit\n", + "J = 4.2*10**7;\t\t\t#mechanical equivalent of heat in ergs/cal\n", + "t = 300;\t\t\t#temperature of air in kelvin\n", + "p = 73*13.6*981;\t\t\t#pressure of air in dynes\n", + "\t\t\t#cp-cv = (r/J) = pv/(tj)\n", + "\n", + "#CALCULATON\n", + "cv = cp-(p*1000/(a*t*J));\t\t\t#specific heat at constant volume in calories\n", + "\n", + "# Result\n", + "print 'the specific heat at constant volume is %.4f calories'%(cv)\n", + "print \"Note: answer slightly different because of rounding error.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the specific heat at constant volume is 0.1645 calories\n", + "Note: answer slightly different because of rounding error.\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.20 pageno : 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "t1 = 0;\t\t\t#temperature of water in deg.C\n", + "t2 = 0;\t\t\t#temperature of ice in deg.C\n", + "J = 4.18*10**7;\t\t\t#the joules thomson coefficent in erg/cal\n", + "l = 80;\t\t\t#latent heat og fusion kj/kg\n", + "g = 981;\t\t\t#accelaration due to gravity in cm/sec**2\n", + " \n", + "# Calculations\n", + "h = l*J/(15*g);\t\t\t#height from which ice has fallen\n", + "\n", + "# Result\n", + "print 'the height from which ice has fallen is %.2e cm'%(h)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the height from which ice has fallen is 2.27e+05 cm\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.21 page no : 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "# Variables\n", + "T = 80;\t\t\t#temperature of bullet in deg.C\n", + "cp = 0.03;\t\t\t#specific heat of lead in kj/kg-K\n", + "J = 4.2;\t\t\t#mechanical equivalent of heat in j/cal\n", + "\n", + "# Calculations\n", + "h = T*cp;\t\t\t#heat developed per unit mass in calorie\n", + "v = (J*10**7*h*2/0.9)**0.5;\t\t\t#velocity of bullet in cm/sec\n", + "\n", + "# Result\n", + "print 'the velocity of bullet is %.1e cm/sec'%(v)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the velocity of bullet is 1.5e+04 cm/sec\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.22 pageno : 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "w = 5.0;\t\t\t#weight of lead ball in lb\n", + "cp = 0.032;\t\t\t#specific heat of lead in Btu/lbdeg.F\n", + "h = 50;\t\t\t#height at which ball thrown in feets\n", + "v = 20;\t\t\t#vertical speed in ft/sec\n", + "g = 32;\t\t\t#accelararion due to gravity in ft/sec**2\n", + "\n", + "# Calculations\n", + "u = (v**2)+2*g*h\n", + "ke = (w/2*(u));\t\t\t#kinetic energy of the ball at ground\n", + "T = ke/(2*32*778*w*cp);\t\t\t#rise of temperature in deg.F\n", + "\n", + "# Result\n", + "print 'the rise in temperature is %.1f deg.F'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the rise in temperature is 1.1 deg.F\n" + ] + } + ], + "prompt_number": 32 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/TestContribution/chapterno1.ipynb b/TestContribution/chapterno1.ipynb new file mode 100755 index 00000000..5ff2285e --- /dev/null +++ b/TestContribution/chapterno1.ipynb @@ -0,0 +1,126 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:a1ed470be69235951f179c73fc3f7daca02bf5e071f528ddce3fb4f1444cb8ef"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1: INTRODUCTORY DIGITAL CONCEPTS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1-1,Page No-6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable Declaration\n",
+ "T=10*10**-3\n",
+ "tw=1*10**-3\n",
+ "\n",
+ "#Calculations\n",
+ "#Part A\n",
+ "f=1/T\n",
+ "\n",
+ "#Part C\n",
+ "Duty_Cycle=(tw/T)*100\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "print\"The Period is measured from the edge of the next pulse. In this case T is measured from leading edge to leading edge,as indicated.T equals 10*10^-3\"\n",
+ "print\"f=\",f,\"Hz\"\n",
+ "print\"Duty Cycle=\",Duty_Cycle,\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Period is measured from the edge of the next pulse. In this case T is measured from leading edge to leading edge,as indicated.T equals 10*10^-3\n",
+ "f= 100.0 Hz\n",
+ "Duty Cycle= 10.0 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1-2, Page No-8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable Declaration\n",
+ "f=100*10**-3\n",
+ "time=8\n",
+ "T=1/f\n",
+ "print\"Since the frequency of the clock is 100kHz,the period is\",T,\"usec\"\n",
+ "print\"It takes 10*10**-6to transfer each bit in the waveform.The total transfer time for 8 bits is time\"\n",
+ "print\"Time is\",time,\"usec\"\n",
+ "\n",
+ "print\"To detrmine the sequence of bits,examine the waveform during each bit time.If waveform A is HIGH during the bit time, a 1 is transferred. If waveform A is LOW during the bit time,a0 is transferred. The bit sequence is illustrated .The left mosst bit is the first to be transferred.\"\n",
+ "\n",
+ "print\"A parallel transfer would take 10*10**-6 for all eight bits.\"\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Since the frequency of the clock is 100kHz,the period is 10.0 usec\n",
+ "It takes 10*10**-6to transfer each bit in the waveform.The total transfer time for 8 bits is time\n",
+ "Time is 8 usec\n",
+ "To detrmine the sequence of bits,examine the waveform during each bit time.If waveform A is HIGH during the bit time, a 1 is transferred. If waveform A is LOW during the bit time,a0 is transferred. The bit sequence is illustrated .The left mosst bit is the first to be transferred.\n",
+ "A parallel transfer would take 10*10**-6 for all eight bits.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/TestContribution/exampleCount.py b/TestContribution/exampleCount.py new file mode 100755 index 00000000..f9c17511 --- /dev/null +++ b/TestContribution/exampleCount.py @@ -0,0 +1,27 @@ +import json +import os +import re + +class info: + notebook = '' + examples = [] +notebooks = os.listdir('.') +notebooks = sorted(notebooks) +print notebooks + +total = 0 + +for i in range(len(notebooks)): + ch_examples = 0 + if notebooks[i].endswith(".ipynb"): + f = open(notebooks[i],'r') + data = json.load(f) + for dic in data["worksheets"][0]["cells"][0:]: + if "level" in dic and dic["level"] == 2: + ch_examples += 1 + total += ch_examples + print i, " : " , ch_examples + + + +print "Total Examples : " , total diff --git a/TestContribution/screenshots/State_Direction.png b/TestContribution/screenshots/State_Direction.png Binary files differnew file mode 100755 index 00000000..145f4da6 --- /dev/null +++ b/TestContribution/screenshots/State_Direction.png diff --git a/TestContribution/screenshots/State_Direction_1.png b/TestContribution/screenshots/State_Direction_1.png Binary files differnew file mode 100755 index 00000000..145f4da6 --- /dev/null +++ b/TestContribution/screenshots/State_Direction_1.png diff --git a/TestContribution/screenshots/State_Direction_10.png b/TestContribution/screenshots/State_Direction_10.png Binary files differnew file mode 100755 index 00000000..145f4da6 --- /dev/null +++ b/TestContribution/screenshots/State_Direction_10.png diff --git a/TestContribution/screenshots/State_Direction_11.png b/TestContribution/screenshots/State_Direction_11.png Binary files differnew file mode 100755 index 00000000..145f4da6 --- /dev/null +++ b/TestContribution/screenshots/State_Direction_11.png diff --git a/TestContribution/screenshots/State_Direction_12.png b/TestContribution/screenshots/State_Direction_12.png Binary files differnew file mode 100755 index 00000000..145f4da6 --- /dev/null +++ b/TestContribution/screenshots/State_Direction_12.png diff --git a/TestContribution/screenshots/State_Direction_13.png b/TestContribution/screenshots/State_Direction_13.png Binary files differnew file mode 100755 index 00000000..145f4da6 --- /dev/null +++ b/TestContribution/screenshots/State_Direction_13.png diff --git a/TestContribution/screenshots/State_Direction_14.png b/TestContribution/screenshots/State_Direction_14.png Binary files differnew file mode 100755 index 00000000..145f4da6 --- /dev/null +++ b/TestContribution/screenshots/State_Direction_14.png diff --git a/TestContribution/screenshots/State_Direction_15.png b/TestContribution/screenshots/State_Direction_15.png Binary files differnew file mode 100755 index 00000000..145f4da6 --- /dev/null +++ b/TestContribution/screenshots/State_Direction_15.png diff --git a/TestContribution/screenshots/State_Direction_16.png b/TestContribution/screenshots/State_Direction_16.png Binary files differnew file mode 100755 index 00000000..145f4da6 --- /dev/null +++ b/TestContribution/screenshots/State_Direction_16.png diff --git a/TestContribution/screenshots/State_Direction_17.png b/TestContribution/screenshots/State_Direction_17.png Binary files differnew file mode 100755 index 00000000..145f4da6 --- /dev/null +++ b/TestContribution/screenshots/State_Direction_17.png diff --git a/TestContribution/screenshots/State_Direction_18.png b/TestContribution/screenshots/State_Direction_18.png Binary files differnew file mode 100755 index 00000000..145f4da6 --- /dev/null +++ b/TestContribution/screenshots/State_Direction_18.png diff --git a/TestContribution/screenshots/State_Direction_19.png b/TestContribution/screenshots/State_Direction_19.png Binary files differnew file mode 100755 index 00000000..145f4da6 --- /dev/null +++ b/TestContribution/screenshots/State_Direction_19.png diff --git a/TestContribution/screenshots/State_Direction_2.png b/TestContribution/screenshots/State_Direction_2.png Binary files differnew file mode 100755 index 00000000..145f4da6 --- /dev/null +++ b/TestContribution/screenshots/State_Direction_2.png diff --git a/TestContribution/screenshots/State_Direction_20.png b/TestContribution/screenshots/State_Direction_20.png Binary files differnew file mode 100755 index 00000000..145f4da6 --- /dev/null +++ b/TestContribution/screenshots/State_Direction_20.png diff --git a/TestContribution/screenshots/State_Direction_3.png b/TestContribution/screenshots/State_Direction_3.png Binary files differnew file mode 100755 index 00000000..145f4da6 --- /dev/null +++ b/TestContribution/screenshots/State_Direction_3.png diff --git a/TestContribution/screenshots/State_Direction_4.png b/TestContribution/screenshots/State_Direction_4.png Binary files differnew file mode 100755 index 00000000..145f4da6 --- /dev/null +++ b/TestContribution/screenshots/State_Direction_4.png diff --git a/TestContribution/screenshots/State_Direction_5.png b/TestContribution/screenshots/State_Direction_5.png Binary files differnew file mode 100755 index 00000000..145f4da6 --- /dev/null +++ b/TestContribution/screenshots/State_Direction_5.png diff --git a/TestContribution/screenshots/State_Direction_6.png b/TestContribution/screenshots/State_Direction_6.png Binary files differnew file mode 100755 index 00000000..145f4da6 --- /dev/null +++ b/TestContribution/screenshots/State_Direction_6.png diff --git a/TestContribution/screenshots/State_Direction_7.png b/TestContribution/screenshots/State_Direction_7.png Binary files differnew file mode 100755 index 00000000..145f4da6 --- /dev/null +++ b/TestContribution/screenshots/State_Direction_7.png diff --git a/TestContribution/screenshots/State_Direction_8.png b/TestContribution/screenshots/State_Direction_8.png Binary files differnew file mode 100755 index 00000000..145f4da6 --- /dev/null +++ b/TestContribution/screenshots/State_Direction_8.png diff --git a/TestContribution/screenshots/State_Direction_9.png b/TestContribution/screenshots/State_Direction_9.png Binary files differnew file mode 100755 index 00000000..145f4da6 --- /dev/null +++ b/TestContribution/screenshots/State_Direction_9.png |