{ "metadata": { "name": "", "signature": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 14, Ultrasonics" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1, page 510" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "# Fundamental frequency\n", "#given data :\n", "t=1.6*10**-3 # in m\n", "lamda=2*t # in m\n", "v=5760 # in m/s\n", "n1=v*10**-6/lamda \n", "print \"Fundamental frequency, n1 = %0.2f MHz \" %n1" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Fundamental frequency, n1 = 1.80 MHz \n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 2, page 510" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# distance\n", "#given data :\n", "th=40 #cm\n", "t1=30 #micro-seconds\n", "t2=80 #micro seconds\n", "x=((2*th*10**-2*t1*10**-6)/(2*t2*10**-6))*100 #cm\n", "print \"Distance %0.2f cm \" %x" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Distance 15.00 cm \n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3, page 510" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Thickness\n", "#given data :\n", "v=5000 # in m/s\n", "N=50000 # in Hz\n", "t=v/(2*N) \n", "print \"Thickness of steel plate, t = %0.2f m \" %t" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Thickness of steel plate, t = 0.05 m \n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 4, page " ] }, { "cell_type": "code", "collapsed": false, "input": [ "from math import pi\n", "# Capacitance\n", "#given data :\n", "L=1 # in H\n", "n=10**6 # in Hz\n", "C=1*10**12/(4*pi**2*n**2*L) \n", "print \"The capacitance, C = %0.3f micro-F \" %C" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The capacitance, C = 0.025 micro-F \n" ] } ], "prompt_number": 6 } ], "metadata": {} } ] }