diff options
author | hardythe1 | 2015-04-07 15:58:05 +0530 |
---|---|---|
committer | hardythe1 | 2015-04-07 15:58:05 +0530 |
commit | 92cca121f959c6616e3da431c1e2d23c4fa5e886 (patch) | |
tree | 205e68d0ce598ac5caca7de839a2934d746cce86 /Engineering_Physics_/Chapter4.ipynb | |
parent | b14c13fcc6bb6d01c468805d612acb353ec168ac (diff) | |
download | Python-Textbook-Companions-92cca121f959c6616e3da431c1e2d23c4fa5e886.tar.gz Python-Textbook-Companions-92cca121f959c6616e3da431c1e2d23c4fa5e886.tar.bz2 Python-Textbook-Companions-92cca121f959c6616e3da431c1e2d23c4fa5e886.zip |
added books
Diffstat (limited to 'Engineering_Physics_/Chapter4.ipynb')
-rwxr-xr-x | Engineering_Physics_/Chapter4.ipynb | 153 |
1 files changed, 153 insertions, 0 deletions
diff --git a/Engineering_Physics_/Chapter4.ipynb b/Engineering_Physics_/Chapter4.ipynb new file mode 100755 index 00000000..ee675097 --- /dev/null +++ b/Engineering_Physics_/Chapter4.ipynb @@ -0,0 +1,153 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:e2b842be083bc61cf1d1d9ada89de2502dedfb3d340e5f3b6d0b51d6c790688a"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "4: Ultrasonic"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 4.1, Page number 84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V1=343; #velocity of air(m/s)\n",
+ "V2=1372; #velocity f water(m/s)\n",
+ "dt=3; #time difference(s)\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "S=((V1*V2)*(dt))/(V2-V1); #distance between two ships(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"distance between two ships is\",S,\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "distance between two ships is 1372.0 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 4.2, Page number 84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V=1700; #velocity of sound(m/s)\n",
+ "t=0.65; #time(s)\n",
+ "n=0.07*10**6; #frequency of source(Hz)\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "d=(V*t)/2; #depth of sea(m)\n",
+ "lamda=V/n; #wavelength of pulse(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"depth of sea is\",d,\"m\"\n",
+ "print \"wavelength of pulse is\",round(lamda,4),\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "depth of sea is 552.5 m\n",
+ "wavelength of pulse is 0.0243 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 4.3, Page number 84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "P=1; \n",
+ "l=40*10**-3; #length of pure rod(m)\n",
+ "E=115*10**9; #Young's modulus(N/m**2)\n",
+ "D=7.25*10**3; #density of pure iron(kg/m**3)\n",
+ "\n",
+ "#Calculation\n",
+ "n=(P/(2*l))*math.sqrt(E/D); #natural frequency of pure rod(Hz) \n",
+ "\n",
+ "#Result\n",
+ "print \"natural frequency of pure rod is\",round(n/10**3,1),\"kHz\"\n",
+ "print \"answer given in the book is wrong\"\n",
+ "print \"frequency of rod is more than audible range, rod can be used in magnetostriction oscillator\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "natural frequency of pure rod is 49.8 kHz\n",
+ "answer given in the book is wrong\n",
+ "frequency of rod is more than audible range, rod can be used in magnetostriction oscillator\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |