summaryrefslogtreecommitdiff
path: root/Engineering_Physics/Chapter1_1.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Engineering_Physics/Chapter1_1.ipynb')
-rwxr-xr-xEngineering_Physics/Chapter1_1.ipynb453
1 files changed, 170 insertions, 283 deletions
diff --git a/Engineering_Physics/Chapter1_1.ipynb b/Engineering_Physics/Chapter1_1.ipynb
index 9c835441..a3614569 100755
--- a/Engineering_Physics/Chapter1_1.ipynb
+++ b/Engineering_Physics/Chapter1_1.ipynb
@@ -1,7 +1,7 @@
{
"metadata": {
- "name": "",
- "signature": "sha256:078983e30b4c728fb3bac2d9363145a8f1fffb1522bc3df76d2595e630af4298"
+ "name": "Chapter1",
+ "signature": "sha256:e55f587b2da98ead68f73bb2b4d29bef91aa67eb577c460fb9dcaab92acc4339"
},
"nbformat": 3,
"nbformat_minor": 0,
@@ -12,51 +12,46 @@
"cell_type": "heading",
"level": 1,
"metadata": {},
- "source": [
- "1: Oscillations and Waves"
- ]
+ "source": "1: Ultrasonics"
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": [
- "Example number 1.1, Page number 23"
- ]
+ "source": "Example number 1.1, Page number 20"
},
{
"cell_type": "code",
"collapsed": false,
- "input": [
- " \n",
- "#import modules\n",
- "import math\n",
- "\n",
- "#Variable declaration\n",
- "S=4; #SHM described by a particle(cm)\n",
- "x=0; #mean position\n",
- "v=12; #velocity at mean position(cm/s)\n",
- "\n",
- "#Calculation\n",
- "A=S/2; #amplitude of motion(cm)\n",
- "omega=v/A; #angular frequency(sec-1)\n",
- "T=(2*math.pi)/omega; #time period(sec)\n",
- "T=math.ceil(T*10**3)/10**3; #rounding off to 3 decimals\n",
- "\n",
- "#Result\n",
- "print \"time period of motion is\",T, \"sec\"\n",
- "print \"time period of motion is pi/3 sec\""
+ "input": "#Variable declaration\nv = 1440; #velocity of ultrasonic waves(m/s)\nt = 0.33; #time elapsed(s)\n\n#Calculation\nd = v*t; #distance travelled(m)\nd1 = d/2; #depth of submarine(m)\n\n#Result\nprint \"depth of the submerged submarine is\",d1, \"m\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "depth of the submerged submarine is 237.6 m\n"
+ }
],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 1.2, Page number 21"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#importing modules\nimport math\n\n#Variable declaration\nl = 40; #length of iron rod(mm)\nE = 115*10**9; #Young's modulus(N/m**2)\nrho = 7.25*10**3; #density of pure iron(kg/m**3)\n\n#Calculation\nl = l*10**-3; #length of iron rod(m)\nnew = (1/(2*l))*math.sqrt(E/rho); #natural frequency of the rod(Hz)\nnew = new*10**-3; #natural frequency of the rod(kHz)\nnew=math.ceil(new*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint \"depth of the submerged submarine is\",new, \"kHz\"",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": [
- "time period of motion is 1.048 sec\n",
- "time period of motion is pi/3 sec\n"
- ]
+ "text": "depth of the submerged submarine is 49.785 kHz\n"
}
],
"prompt_number": 2
@@ -65,47 +60,19 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": [
- "Example number 1.2, Page number 23"
- ]
+ "source": "Example number 1.3, Page number 21"
},
{
"cell_type": "code",
"collapsed": false,
- "input": [
- " \n",
- "#import modules\n",
- "import math\n",
- "\n",
- "#Variable declaration\n",
- "T=0.1; #time period(sec)\n",
- "A=4; #amplitude of motion(cm)\n",
- "x=0.2; #distance from mean position(cm)\n",
- "\n",
- "#Calculation\n",
- "omega=(2*math.pi)/T; #angular frequency(sec-1)\n",
- "a=(omega**2)*x; #acceleration(cm/sec^2)\n",
- "a=math.ceil(a*10**2)/10**2; #rounding off to 2 decimals\n",
- "#maximum velocity is when particle is in the mean position\n",
- "v_max=omega*A; #maximum velocity(cm/sec)\n",
- "v_max=math.ceil(v_max*10**2)/10**2; #rounding off to 2 decimals\n",
- "\n",
- "#Result\n",
- "print \"acceleration is\",a, \"cm/sec^2\"\n",
- "print \"maximum velocity is\",v_max, \"cm/sec\"\n",
- "\n",
- "#answers given in the book are wrong"
- ],
+ "input": "#importing modules\nimport math\n\n#Variable declaration\nl = 1; #length of quartz crystal(mm)\nE = 7.9*10**10; #Young's modulus(N/m**2)\nrho = 2650; #density(kg/m**3)\n\n#Calculation\nl = l*10**-3; #length of iron rod(m)\nnew = (1/(2*l))*math.sqrt(E/rho); #natural frequency of the rod(Hz)\nnew = new*10**-6; \nnew=math.ceil(new*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint \"fundamental frequency of crystal is\",new, \"*10**6 Hz\"",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": [
- "acceleration is 789.57 cm/sec^2\n",
- "maximum velocity is 251.33 cm/sec\n"
- ]
+ "text": "fundamental frequency of crystal is 2.73 *10**6 Hz\n"
}
],
"prompt_number": 3
@@ -114,146 +81,82 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": [
- "Example number 1.3, Page number 24"
- ]
+ "source": "Example number 1.4, Page number 22"
},
{
"cell_type": "code",
"collapsed": false,
- "input": [
- " \n",
- "#import modules\n",
- "import math\n",
- "import numpy as np\n",
- "\n",
- "#Variable declaration\n",
- "A1 = 40; #First amplitude of oscillation(cm)\n",
- "An_plus_1 = 4; #Amplitude after 100 oscillations(cm)\n",
- "n = 100; #Number of oscillations\n",
- "T = 2.5; #Time period of oscillations(s)\n",
- "\n",
- "#Calculation\n",
- "t = T/4; #Time taken to reach the first amplitude from the mean position(s)\n",
- "#Now A1 = x0*math.exp(-lambda*t) and An_plus_1 = x0*math.exp(-lambda*(t+nT))\n",
- "#A1/An_plus_1 = math.exp(n*lambda*T)\n",
- "x=A1/An_plus_1;\n",
- "lamda=np.log(x)/(n*T); #Damping constant(per sec)\n",
- "lamda=lamda*10**2;\n",
- "lamda=math.ceil(lamda*10**3)/10**3; #rounding off to 3 decimals\n",
- "\n",
- "#Result\n",
- "print \"Damping constant is\",lamda,\"*10**-2 per sec\""
- ],
+ "input": "#importing modules\nimport math\n\n#Variable declaration\nd = 0.55; #distance between 2 constructive antinodes(mm)\nnew = 1.5; #frequency of crystal(MHz)\n \n#Calculation\nnew = new*10**6; #frequency of crystal(Hz)\nd = d*10**-3; #distance between 2 constructive antinodes(m)\n#distance between 2 antinodes is given by lamda/2\nlamda = 2*d; #wavelength of ultrasonic waves(m)\nv = new*lamda; #velocity of waves(m/s)\n\n#Result\nprint \"velocity of waves is\",int(v), \"m/s\"",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": [
- "Damping constant is 0.922 *10**-2 per sec\n"
- ]
+ "text": "velocity of waves is 1650 m/s\n"
}
],
- "prompt_number": 6
+ "prompt_number": 4
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": [
- "Example number 1.4, Page number 24"
- ]
+ "source": "Example number 1.5, Page number 22"
},
{
"cell_type": "code",
"collapsed": false,
- "input": [
- " \n",
- "#import modules\n",
- "import math\n",
- "\n",
- "#Variable declaration\n",
- "x1 = 3; #First position of the particle(cm)\n",
- "x2 = 4; #Second position of the particle(cm)\n",
- "v1 = 16; #Velocity of particle executing SHM at 1st position(cm/s)\n",
- "v2 = 12; #Velocity of particle executing SHM at 2nd position (cm/s)\n",
- "\n",
- "#Calculation\n",
- "#As v = omega*sqrt(A**2 - x**2) so\n",
- "#(v1/v2)**2=(A**2 - x1**2)/(A**2 - x2**2)\n",
- "#RHS gives (A**2-9)/(A**2-16)\n",
- "#(v2**2)*(A**2 - x1**2)=(v1**2)*(A**2 - x2**2), on solving we get\n",
- "A=math.sqrt((((v1**2)*(x2**2))-((v2**2)*(x1**2)))/((v1**2)-(v2**2))); #amplitude in cm\n",
- "omega=v1/math.sqrt(A**2-x1**2); #Angular speed of the particle(per sec)\n",
- "T=2*math.pi/omega; #Time period of oscillation(sec)\n",
- "T=math.ceil(T*10**3)/10**3; #rounding off to 3 decimals\n",
- "\n",
- "#Result\n",
- "print \"The amplitude of SHM is\",A, \"cm\"\n",
- "print \"The time period of oscillation is\",T, \"sec\""
- ],
+ "input": "#importing modules\nimport math\n\n#Variable declaration\nl = 50; #length of rod(mm)\nE = 11.5*10**10; #Young's modulus(N/m**2)\nrho = 7250; #density(kg/m**3)\n\n#Calculation\nl = l*10**-3; #length of iron rod(m)\nnew = (1/(2*l))*math.sqrt(E/rho); #natural frequency of the rod(Hz)\nnew = new*10**-3; #natural frequency of the rod(kHz)\nnew = math.ceil(new*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint \"natural frequency of rod is\",new, \"kHz\"",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": [
- "The amplitude of SHM is 5.0 cm\n",
- "The time period of oscillation is 1.571 sec\n"
- ]
+ "text": "natural frequency of rod is 39.83 kHz\n"
}
],
- "prompt_number": 7
+ "prompt_number": 5
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": [
- "Example number 1.5, Page number 25"
- ]
+ "source": "Example number 1.6, Page number 22"
},
{
"cell_type": "code",
"collapsed": false,
- "input": [
- " \n",
- "#import modules\n",
- "import math\n",
- "\n",
- "#Variable declaration\n",
- "m = 0.3; #Mass attached to the string(kg)\n",
- "g = 9.8; #Acceleration due to gravity(m/sec**2)\n",
- "x = 0.15; #Stretchness produced in the spring(m)\n",
- "s = 0.1; #spring is stretched and released(m)\n",
- "\n",
- "#Calculation\n",
- "F = m*g; #Restoring force acting on the mass(N)\n",
- "k = F/x; #Spring constant(N/m)\n",
- "A = s; #amplitude equals to the spring stretched and released\n",
- "omega = math.sqrt(k/m); #Angular frequency of oscillation(rad per sec)\n",
- "v0 = omega*A; #Maximum velocity during the oscillations(m/s)\n",
- "v0=math.ceil(v0*100)/100; #rounding off to 2 decimals\n",
- "\n",
- "#Result\n",
- "print \"The spring constant is\",k, \"N/m\"\n",
- "print \"The amplitude of oscillation is\",A, \"m\"\n",
- "print \"The maximum velocity during oscillations is\",v0, \"m/s\""
+ "input": "#importing modules\nimport math\n\n#Variable declaration\nl = 2; #length of crystal(mm)\nE = 7.9*10**10; #Young's modulus(N/m**2)\nrho = 2650; #density(kg/m**3)\n\n#Calculation\nl = l*10**-3; #length of iron rod(m)\nnew = (1/(2*l))*math.sqrt(E/rho); #natural frequency of the rod(Hz)\nnew = new*10**-6; #natural frequency of the rod(MHz)\nnew=math.ceil(new*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint \"frequency of crystal is\",new, \"MHz\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "frequency of crystal is 1.365 MHz\n"
+ }
],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 1.7, Page number 23"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#importing modules\nimport math\n\n#Variable declaration\nl = 3; #length of crystal(mm)\nE = 8*10**10; #Young's modulus(N/m**2)\nrho = 2500; #density(kg/m**3)\n\n#Calculation\nl = l*10**-3; #length of iron rod(m)\nnew = (1/(2*l))*math.sqrt(E/rho); #natural frequency of the rod(Hz)\nnew = new*10**-3; #natural frequency of the rod(kHz) \nnew=math.ceil(new*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint \"frequency of crystal is\",new, \"kHz\"",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": [
- "The spring constant is 19.6 N/m\n",
- "The amplitude of oscillation is 0.1 m\n",
- "The maximum velocity during oscillations is 0.81 m/s\n"
- ]
+ "text": "frequency of crystal is 942.81 kHz\n"
}
],
"prompt_number": 8
@@ -262,96 +165,61 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": [
- "Example number 1.6, Page number 25"
- ]
+ "source": "Example number 1.8, Page number 23"
},
{
"cell_type": "code",
"collapsed": false,
- "input": [
- " \n",
- "#import modules\n",
- "import math\n",
- "\n",
- "#Variable declaration\n",
- "lambda1 = 400; #Lower limit of wavelength of visible region(nm)\n",
- "lambda2 = 700; #Upper limit of wavelength of visible region(nm)\n",
- "c = 3*10**8; #Speed of light in vacuum(m/s)\n",
- "\n",
- "#Calculation\n",
- "lambda1 = lambda1*10**-9 #Lower limit of wavelength(m) \n",
- "lambda2 = lambda2*10**-9 #upper limit of wavelength(m) \n",
- "new_1 = c/lambda1; #Upper limit of frequency of visible region(m)\n",
- "new_2 = c/lambda2; #Lower limit of frequency of visible region(m)\n",
- "\n",
- "#Result\n",
- "print \"The frequency equivalent of 400 nm is\",new_1, \"Hz\"\n",
- "print \"The frequency equivalent of 700 nm is\",new_2, \"Hz\"\n"
- ],
+ "input": "#importing modules\nimport math\n\n#Variable declaration\nl = 1.5; #length of crystal(mm)\nE = 7.9*10**10; #Young's modulus(N/m**2)\nrho = 2650; #density(kg/m**3)\n\n#Calculation\nl = l*10**-3; #length of iron rod(m)\nnew = (1/(2*l))*math.sqrt(E/rho); #natural frequency of the rod(Hz)\nnew = new*10**-6; #natural frequency of the rod(MHz) \nnew=math.ceil(new*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint \"frequency of crystal is\",new, \"MHz\"",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": [
- "The frequency equivalent of 400 nm is 7.5e+14 Hz\n",
- "The frequency equivalent of 700 nm is 4.28571428571e+14 Hz\n"
- ]
+ "text": "frequency of crystal is 1.82 MHz\n"
}
],
- "prompt_number": 9
+ "prompt_number": 10
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": [
- "Example number 1.7, Page number 26"
- ]
+ "source": "Example number 1.9, Page number 24"
},
{
"cell_type": "code",
"collapsed": false,
- "input": [
- " \n",
- "#import modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "#Comparing the standard equation u(x,t) = A*sin(2*%pi(x/lambda-t/T)) with the given equation, we get\n",
- "A = 1.5*10**-3; #Amplitude of the sound wave(m)\n",
- "lamda = 8; #Wavelength of the sound wave(m)\n",
- "T = 1/40; #Time period of the sound wave(s)\n",
- "\n",
- "#Calculation\n",
- "A = A*10**3;\n",
- "new = 1/T; #Frequency of the sound wave(Hz)\n",
- "v = new*lamda; #Velocity of the sound wave(m/s)\n",
- "T=math.ceil(T*100)/100; #rounding off to 2 decimals\n",
- "\n",
- "#Result\n",
- "print \"The amplitude of the sound wave is\",A,\"*10**-3 m\"\n",
- "print \"The wavelength of the sound wave is\",lamda, \"m\"\n",
- "print \"The time period of the sound wave is\",T, \"s\"\n",
- "print \"The frequency of the sound wave is\",new, \"Hz\"\n",
- "print \"The velocity of the sound wave is\",v, \"m/s\""
+ "input": "#Variable declaration\nv = 1440; #velocity of ultrasonic waves(m/s)\nt = 0.95; #time elapsed(s)\n\n#Calculation\nd = v*t; #distance travelled(m)\nd1 = d/2; #depth of sea(m)\n\n#Result\nprint \"depth of the submerged submarine is\",int(d1), \"m\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "depth of the submerged submarine is 684 m\n"
+ }
],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 1.10, Page number 24"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nv = 1440; #velocity of ultrasonic waves(m/s)\nt = 0.83; #time elapsed(s)\n\n#Calculation\nd = v*t; #distance travelled(m)\nd1 = d/2; #depth of submarine(m)\n\n#Result\nprint \"depth of the submerged submarine is\",d1, \"m\"",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": [
- "The amplitude of the sound wave is 1.5 *10**-3 m\n",
- "The wavelength of the sound wave is 8 m\n",
- "The time period of the sound wave is 0.03 s\n",
- "The frequency of the sound wave is 40.0 Hz\n",
- "The velocity of the sound wave is 320.0 m/s\n"
- ]
+ "text": "depth of the submerged submarine is 597.6 m\n"
}
],
"prompt_number": 12
@@ -360,47 +228,19 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": [
- "Example number 1.8, Page number 26"
- ]
+ "source": "Example number 1.11, Page number 24"
},
{
"cell_type": "code",
"collapsed": false,
- "input": [
- "\n",
- "\n",
- "#import modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "A = 2; #Amplitude of the wave(cm)\n",
- "T = 0.5; #Time period of the wave(sec)\n",
- "v = 200; #Wave velocity(cm/s)\n",
- "\n",
- "#Calculation\n",
- "f = 1/T; #Frequency of the wave(Hz)\n",
- "lamda = v/f; #Wavelength of the wave(cm)\n",
- "\n",
- "#Result\n",
- "print \"frequency of wave is\",f, \"Hz\"\n",
- "print \"wavelength of wave is\",lamda, \"cm\"\n",
- "print \"The Equation of the wave moving along X-axis :\"\n",
- "print \"u = \",A,\"*sin*2*math.pi*(x/\",lamda,\"- t/\",T,\")\" #x and y are in cm and t is in sec"
- ],
+ "input": "#importing modules\nimport math\n\n#Variable declaration\naS = 1050; #total absorption inside hall(Sabine)\nV = 9000; #volume of cinema hall(m**3)\n\n#Calculation\nT = 0.165*V/aS; #reverberation time of hall(s)\nT = math.ceil(T*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint \"reverberation time of the hall is\",T, \"s\"",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": [
- "frequency of wave is 2.0 Hz\n",
- "wavelength of wave is 100.0 cm\n",
- "The Equation of the wave moving along X-axis :\n",
- "u = 2 *sin*2*math.pi*(x/ 100.0 - t/ 0.5 )\n"
- ]
+ "text": "reverberation time of the hall is 1.4143 s\n"
}
],
"prompt_number": 13
@@ -409,59 +249,106 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": [
- "Example number 1.9, Page number 27"
- ]
+ "source": "Example number 1.12, Page number 25"
},
{
"cell_type": "code",
"collapsed": false,
- "input": [
- " \n",
- "#import modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "T = 1000; #Tension in the wire(N)\n",
- "M=15; #mass of the wire(kg)\n",
- "l=300; #length of the wire(m)\n",
- "lamda = 0.30; #Wavelength of wave along wire(m)\n",
- "\n",
- "#Calculation\n",
- "m = M/l; #Mass per unit length of the wire(kg/m)\n",
- "v = math.sqrt(T/m); #Velocity of wave through wire(m/s)\n",
- "v=math.ceil(v*100)/100; #rounding off to 2 decimals\n",
- "new = v/lamda; #Frequency of wave through string(Hz)\n",
- "new=math.ceil(new*100)/100; #rounding off to 2 decimals\n",
- "\n",
- "#Result\n",
- "print \"The velocity of the wave through wire is\",v, \"m/s\"\n",
- "print \"The frequency of the wave through wire is\",new, \"Hz\"\n",
- "\n",
- "#answer for frequency of the wave is wrong in the textbook"
+ "input": "#importing modules\nimport math\n\n#Variable declaration\na = 0.65; #average absorption coefficient(Sabine/m**2)\nV = 13500; #volume of auditorium(m**3)\nT = 1.2; #reverberation time of hall(s)\n\n#Calculation\nS = 0.165*V/(a*T); #reverberation time of hall(s)\nS = math.ceil(S*10)/10; #rounding off to 1 decimal\n\n#Result\nprint \"total area of interior surface is\",S, \"m**2\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "total area of interior surface is 2855.8 m**2\n"
+ }
],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 1.13, Page number 25"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#importing modules\nimport math\n\n#Variable declaration\nV = 15000; #volume of cinema hall(m**3)\nT1 = 1.3; #initial reverberation time of hall(s)\na1S1 = 300; #number of chairs placed\n\n#Calculation\naS = 0.165*V/T1; #total absorption of hall\nT2 = (0.165*V)/(aS+a1S1); #reverberation time of hall after adding chairs(s)\nT2 = math.ceil(T2*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint \"reverberation time of the hall after adding chairs is\",T2, \"s\"",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": [
- "The velocity of the wave through wire is 141.43 m/s\n",
- "The frequency of the wave through wire is 471.44 Hz\n"
- ]
+ "text": "reverberation time of the hall after adding chairs is 1.1231 s\n"
}
],
"prompt_number": 15
},
{
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 1.14, Page number 26"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#Variable declaration\nv = 1440; #velocity of ultrasonic waves(m/s)\nt = 0.5; #time elapsed(s)\n\n#Calculation\nd = v*t; #distance travelled(m)\nd1 = d/2; #depth of submarine(m)\n\n#Result\nprint \"depth of the submerged submarine is\",int(d1), \"m\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "depth of the submerged submarine is 360 m\n"
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 1.15, Page number 26"
+ },
+ {
"cell_type": "code",
"collapsed": false,
- "input": [],
+ "input": "#importing modules\nimport math\n\n#Variable declaration\nd = 0.4; #distance between 2 constructive antinodes(mm)\nnew = 1.5; #frequency of crystal(MHz)\n \n#Calculation\nnew = new*10**6; #frequency of crystal(Hz)\nd = d*10**-3; #distance between 2 constructive antinodes(m)\n#distance between 2 antinodes is given by lamda/2\nlamda = 2*d; #wavelength of ultrasonic waves(m)\nv = new*lamda; #velocity of waves(m/s)\n\n#Result\nprint \"velocity of waves is\",int(v), \"m/s\"",
"language": "python",
"metadata": {},
- "outputs": []
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "velocity of waves is 1200 m/s\n"
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 1.16, Page number 26"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#importing modules\nimport math\n\n#Variable declaration\nl = 40; #length of iron rod(mm)\nE = 11.5*10**10; #Young's modulus(N/m**2)\nrho = 7250; #density of pure iron(kg/m**3)\n\n#Calculation\nl = l*10**-3; #length of iron rod(m)\nnew = (1/(2*l))*math.sqrt(E/rho); #natural frequency of the rod(Hz)\nnew = new*10**-3; #natural frequency of the rod(kHz)\nnew=math.ceil(new*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint \"depth of the submerged submarine is\",new, \"kHz\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "depth of the submerged submarine is 49.785 kHz\n"
+ }
+ ],
+ "prompt_number": 18
}
],
"metadata": {}