{
 "metadata": {
  "name": "Chapter1(s)"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": "Chapter 1: Ultrasonics"
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 1, Page No:1.29"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n# variable declaration\nP           = 1;            # for fundamental mode\nt           = 0.1*10**-2;    # thickness of piezo electric crystal\nE           = 80*10**9       # young's modulus\np           = 2654          # density in kg/m^3\n\n# Calculations\n\nf           = (P/(2*t))*math.sqrt(E/p);      # frequency of the oscillator circuit\n\n# Result\nprint 'The Frequency of the oscillator circuit %3.4g' %f,'Hz';",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "The Frequency of the oscillator circuit 2.745e+06 Hz\n"
      }
     ],
     "prompt_number": 20
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 2, Page No:1.29"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n# variable declaration\nP           = 1;             # for fundamental mode\nt           = 0.1*10**-2;    # thickness of piezo electric crystal\nE           = 7.9*10**10     # young's modulus\np           = 2650           # density in kg/m^3\n\n# Calculations\n\nf           = (P/(2*t))*math.sqrt(E/p);      # frequency of the oscillator circuit\n\n#Result\nprint 'The Frequency of the vibrating crystal %0.2f'%(f/(10**6)),'MHz';\n",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "The Frequency of the vibrating crystal 2.73 MHz\n"
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 3, Page No:1.30"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n# variable Declaration\nf       = 1.5*10**6;         # frequency of ultrasonics in Hz\nd6      = 2.75*10**-3;       # distance between 6 consecutive nodes\n\n# Calculations\nd       = d6/5;             # distance b/w two nodes\nlamda   = 2*d;              #  wavelength in m\nv       = f*lamda;          # velocity of ultrasonics\n\n# Result\nprint 'Velocity of ultrasonics ' ,v,'m/sec';\n",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Velocity of ultrasonics  1650.0 m/sec\n"
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Add_example 1, Page No: 1.31"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n# Variable Declaration\nP           = 1;            # for fundamental mode\nt           = 1.5*10**-3;    # thickness of quartz crystal\nE           = 7.9*10**10     # young's modulus in N/m^2\np           = 2650          # density in kg/m^3\n\n# Calculations\n\nf           = (P/(2*t))*math.sqrt(E/p);      # frequency of the oscillator circuit\n\n# Result\nprint 'The Fundamental Frequency of the Quartz crystal %3.2f'%(f/10**6), 'MHz';\n",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "The Fundamental Frequency of the Quartz crystal 1.82 MHz\n"
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Add_example 2, Page No: 1.31"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n# Variable Declaration\nv       = 5000;         # velocity of ultrasonics in m/s\ndf      = 60*10**3;      # difference b/w two adjacent harmonic freq. in Hz\n\n# Calculations\n\nd       = (float(v)/(2*df))  ;       # thickness of steel plate\n\n# Result\nprint 'The thickness of steel plate %3.4f'%(d),'m';",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "The thickness of steel plate 0.0417 m\n"
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Add_example 3, Page No: 1.32"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n# Variable Declaration\nv       = 1440;         # velocity of ultrasonics in  sea water in m/s\nt       = 0.33          # time taken b/w tx and rx in sec\n\n# Calculations\n\nd       = v*t;          # distance travelled by ultrasonics\nD       = d/2;          # depth of submerged submarine in m\n\n# Result\nprint 'Depth of submerged submarine',D,'m';\n",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Depth of submerged submarine 237.6 m\n"
      }
     ],
     "prompt_number": 29
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Add_example 4, Page No: 1.33"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n# Variable Declaration\nd           = 0.55*10**-3;        #  distance b/w two antinodes\nf           = 1.5*10**6;         # freq of the crystal\n\n# Calculations\n\nlamda       = 2*d;              # wavelength\nv           = f*lamda;          # velocity of ultronics\n\n# Result\nprint 'Velocity of waves in sea water',v,'m/s';",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Velocity of waves in sea water 1650.0 m/s\n"
      }
     ],
     "prompt_number": 30
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Add_example 5, Page No: 1.33\n"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n# Variable Declaration\nP           = 1;            # for fundamental mode\np           = 2660          # density of quartz in kg/m^3\nf           = 1300*10**3     # freq of quartz plate for sub division ii\nk           = 2.87*10**3\n\n#f1        = (k)/t  # freq for sub division i\n\n# Calculations\n\n#f           = (P/(2*t))*sqrt(E/p);  \nE             = p*4*(k)**2;      # Youngs modulus in N/m^2\nt           = (float(P)/(2*f))*math.sqrt(E/p);       \n\n\n# Result\nprint 'Youngs modulus of quartz plate %3.5g'%E,'Nm^-2'\nprint 'Thickness of the crystal %.4e'%t,'m';",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Youngs modulus of quartz plate 8.7641e+10 Nm^-2\nThickness of the crystal 2.2077e-03 m\n"
      }
     ],
     "prompt_number": 15
    }
   ],
   "metadata": {}
  }
 ]
}