diff options
Diffstat (limited to 'Engineering_Physics_Marikani/Chapter_1.ipynb')
-rw-r--r-- | Engineering_Physics_Marikani/Chapter_1.ipynb | 133 |
1 files changed, 133 insertions, 0 deletions
diff --git a/Engineering_Physics_Marikani/Chapter_1.ipynb b/Engineering_Physics_Marikani/Chapter_1.ipynb new file mode 100644 index 00000000..4392ba50 --- /dev/null +++ b/Engineering_Physics_Marikani/Chapter_1.ipynb @@ -0,0 +1,133 @@ +{ + "metadata": { + "name": "Chapter 1" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Ultrasonics" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example number 1.1, Page number 28 " + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#To calculate the fundamental frequency of vibration\n\n#importing modules\nimport math\n\n#Variable declaration\nt=0.15*10**-2; #thickness of the quartz crystal in m\nY=7.9*10**10; #young's modulus of quartz in N/m^2\nrho=2650; #density of quartz in kg/m^3\n\n#Calculation\nx=math.sqrt(Y/rho);\nf=x/(2*t);\nf=f*10**-6; #converting f from Hz to MHz\nf=math.ceil(f*10**6)/10**6; #rounding off to 6 decimals\n\n#Result\nprint(\"fundamental frequency of vibration in MHz is\",f);\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "('fundamental frequency of vibration in MHz is', 1.819992)\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example number 1.2, Page number 28 " + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#To calculate the fundamental frequency and the first overtone\n\n#importing modules\nimport math\n\n#Variable declaration\nt=1e-03; #thickness of the quartz crystal in m\nY=7.9*10**10; #young's modulus of quartz in N/m^2\nrho=2650; #density of quartz in kg/m^3\n\n#Calculation\nx=math.sqrt(Y/rho);\np1=1; #for fundamental frequency p=1\nf1=(p1*x)/(2*t);\nF1=f1/10**6;\nF1=math.ceil(F1*10**5)/10**5; #rounding off to 5 decimals\nf_1=f1*10**-6; #converting f1 from Hz to MHz\nf_1=math.ceil(f_1*10**5)/10**5; #rounding off to 5 decimals\np2=2; #for first overtone p=2\nf2=(p2*x)/(2*t);\nF2=f2/10**6;\nF2=math.ceil(F2*10**5)/10**5; #rounding off to 5 decimals\nf_2=f2*10**-6; #converting f2 from Hz to MHz\nf_2=math.ceil(f_2*10**5)/10**5; #rounding off to 5 decimals\n\n#Result\nprint(\"fundamental frequency in Hz is\",F1,\"*10**6\");\nprint(\"fundamental frequency in MHz is\",f_1);\nprint(\"frequency of the first overtone in Hz is\",F2,\"*10**6\");\nprint(\"frequency of the first overtone in MHz is\",f_2);\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "('fundamental frequency in Hz is', 2.72999, '*10**6')\n('fundamental frequency in MHz is', 2.72999)\n('frequency of the first overtone in Hz is', 5.45998, '*10**6')\n('frequency of the first overtone in MHz is', 5.45998)\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example number 1.3, Page number 29 " + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#To calculate the velocity of ultrasonic wave\n\n#importing modules\nimport math\n\n#Variable declaration\nlamda=589.3*10**-9; #wavelength of light in m\nf=100*10**6; #frequency of ultrasonic transducer in Hz\nn=1; #order of diffraction\ntheta=2.25; #angle of diffraction in degrees\ntheta=theta*0.0174532925; #converting degrees to radians\n\n#Calculation\nd=(n*lamda)/(2*math.sin(theta));\nd1=d*10**6; #converting d from m to micro m\nlamda1=2*d;\nv=f*lamda1;\nv=math.ceil(v*100)/100; #rounding off to 2 decimals\n\n#Result\nprint(\"wavelength of ultrasonic wave in m is\",lamda1);\nprint(\"velocity of ultrasonic wave in m/sec\",int(v));", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "('wavelength of ultrasonic wave in m is', 1.5010258944908707e-05)\n('velocity of ultrasonic wave in m/sec', 1501)\n" + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example number 1.4, Page number 29 " + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#To calculate the Doppler shifted frequency\n\n#importing modules\nimport math\n\n#Variable declaration\nf=2*10**6; #frequency of transducer in MHz\nv=3; #speed of blood in m/s\nc=800; #velocity of ultrasonic wave in m/s\ntheta=30; #angle of inclination in degrees\ntheta=theta*0.0174532925; #converting degrees to radians\n\n#Calculation\ndeltaf=(2*f*v*math.cos(theta))/c;\ndeltaf=deltaf*10**-6; #converting deltaf from Hz to MHz\ndeltaf=math.ceil(deltaf*10**6)/10**6; #rounding off to 6 decimals\n\n#Result\nprint(\"doppler shifted frequency in MHz is\",deltaf);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "('doppler shifted frequency in MHz is', 0.012991)\n" + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example number 1.5, Page number 30 " + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#To calculate the velocity of ultrasonic wave\n\n#importing modules\nimport math\n\n#Variable declaration\nY=7.9*10**10; #young's modulus of quartz in N/m^2\nrho=2650; #density of quartz in kg/m^3\n\n#Calculation\nv=math.sqrt(Y/rho);\nv=math.ceil(v*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"velocity of ultrasonic waves in m/s is\",v);\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "('velocity of ultrasonic waves in m/s is', 5459.975)\n" + } + ], + "prompt_number": 21 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "", + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file |