{ "metadata": { "name": "", "signature": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 8, Vibrations of strings & membranes" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1, page 317" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "from numpy import sqrt\n", "# Speed\n", "#given data :\n", "m1=0.1 # in kg\n", "g=9.81 # in m/s**2\n", "T=m1*g # N\n", "A=10**-6 # in m**2\n", "p=9.81*10**3 # in kg/m**3\n", "m=A*p # in kg/m\n", "v=sqrt(T/m) \n", "print \"The speed of transverse waves, v = %0.f m/s \" %v" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The speed of transverse waves, v = 10 m/s \n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 2, page 318" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# tensile stress\n", "#given data :\n", "p=8000 # in kg/m**3\n", "v=340 # in m/s\n", "TbyA=v**2*p*10**-2 \n", "print \"Tensile stress = %0.2e N/m^2 \" %TbyA" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Tensile stress = 9.25e+06 N/m^2 \n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3, page 323" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Tension\n", "#given data :\n", "M=2*10**-3 # in kg\n", "l=35*10**-2 # in m\n", "n=500 # in Hz\n", "m=M/l # in kg/m\n", "T=4*n**2*l**2*m \n", "print \"Tension, T = %0.f N \" %T" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Tension, T = 700 N \n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 4, page 324" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Frequency\n", "#given data :\n", "T=625 # in N\n", "T1=100 # in N\n", "l=1/2 \n", "n=240 # in Hz\n", "n1=1/l*(sqrt(T1/T))*n \n", "print \"The frequency, n1 = %0.f Hz \" %n1" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The frequency, n1 = 192 Hz \n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 5, page 324" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# initial tension\n", "rt=2/3 #ratio\n", "mi=5 #kg wt\n", "M=((1/rt)**2)-1 #\n", "mo=mi/M #kg wt\n", "print \"Initial tension in string = %0.2f kg-wt \" % mo" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Initial tension in string = 4.00 kg-wt \n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 6, page 325" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# speed,stress and change in frequency\n", "n=175 #Hz\n", "l=1.5 #m\n", "v=2*n*l #m/s\n", "d=7.8*10**3 #kg/m**3\n", "st=v**2*d #N/m**2\n", "per=3 #% increament\n", "T=1 #assume\n", "td=(1+per/100)*T #\n", "x=(((1/2)*(per/100))) #\n", "td=x*100 #\n", "print \"Velocity = %0.2f m/s \" % v\n", "print \"Stress = %0.2e N/m^2 \" %st\n", "print \"Percentage change in frequency = %0.1f %% \" %td" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Velocity = 525.00 m/s \n", "Stress = 2.15e+09 N/m^2 \n", "Percentage change in frequency = 1.5 % \n" ] } ], "prompt_number": 10 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 7, page 326" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Frequency\n", "#given data :\n", "l=.50 # in m\n", "m1=25 # in kg\n", "m2=1.44*10**-3 # in kg\n", "g=9.81 # in m/s**2\n", "T=m1*g \n", "m=m2/l \n", "p=2 \n", "n=(p/(2*l))*sqrt(T/m) \n", "print \"The frequency, n = %0.1f \" %n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The frequency, n = 583.6 \n" ] } ], "prompt_number": 12 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 8, page 326" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# frequency\n", "l1=90 #cm\n", "d1=0.05 #cm\n", "d2=0.0625 #cm\n", "l2=60 #cm\n", "n1=200 #Hz\n", "n2=((l1*d1*n1)/(l2*d2)) #Hz\n", "print \"Frequency = %0.2f Hz \" % n2" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Frequency = 240.00 Hz \n" ] } ], "prompt_number": 13 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9, page 327" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# tension\n", "n21=3/2 #\n", "r21=3/4 #\n", "t1=2.048 #kg. wt\n", "t2=(n21*r21)**2*t1 #kg weight\n", "n31=9/4 #\n", "r31=2/4 #\n", "t3=(n31*r31)**2*t1 #kg-weight\n", "n41=27/8 #\n", "r41=1/4 #\n", "t4=(n41*r41)**2*t1 #kg-weight\n", "print \"Tension, T2 = %0.3f kg weight\"%t2\n", "print \"Tension, T3 = %0.3f kg weight\"%t3\n", "print \"Tension, T4 = %0.3f kg weight\"%t4" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Tension, T2 = 2.592 kg weight\n", "Tension, T3 = 2.592 kg weight\n", "Tension, T4 = 1.458 kg weight\n" ] } ], "prompt_number": 16 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 10, page 328" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from math import sqrt\n", "# velocity\n", "l1=20 #cm\n", "v1=600 #cm**-1\n", "n1=v1/4 #\n", "v1=2*n1*l1*10**-2 #m/sec\n", "v2=sqrt(2)*v1 #m/s\n", "print \"Velocity of the waves = %0.f m/s \" %v1\n", "print \"Velocity of waves when tension of the string is doubled = %.f m/s \" %round(v2)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Velocity of the waves = 60 m/s \n", "Velocity of waves when tension of the string is doubled = 85 m/s \n" ] } ], "prompt_number": 17 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 11, page 331" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# frequency\n", "nb=6 #beats\n", "l1=20 #cm\n", "l2=21 #cm\n", "x=l2/l1 #\n", "n=(x*nb+nb)/(x-1) #\n", "print \"Frequency = %0.f Hz \" %n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Frequency = 246 Hz \n" ] } ], "prompt_number": 18 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 12, page 331" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# frequency\n", "nb=4 #beats\n", "l1=70 #cm\n", "l2=70-1 #cm\n", "x=l2/l1 #\n", "n=(x*nb)/(1-x) #\n", "print \"Frequency = %0.f Hz \" %n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Frequency = 276 Hz \n" ] } ], "prompt_number": 19 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 13, page 332" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# length\n", "n123=1/3/15 #\n", "tl=105 #cm\n", "l123=15/5/1 #\n", "k=tl/21 #\n", "l1=15*k #cm\n", "l2=5*k #cm\n", "l3=k #cm\n", "print \"l1 length = %0.f cm\"%l1\n", "print \"l2 length = %0.f cm\"%l2\n", "print \"l3 length = %0.f cm\"%l3\n", "#length l2 is calculated wrong in the textbook" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "l1 length = 75 cm\n", "l2 length = 25 cm\n", "l3 length = 5 cm\n" ] } ], "prompt_number": 20 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 15, page 355" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from math import sqrt\n", "# frequency\n", "l=2.5 #m\n", "m1=0.001 #kg\n", "tn=4 #N\n", "m=m1/l #kg/m\n", "n=((1/(2*l))*sqrt(tn/m)) #Hz\n", "print \"Frequency = %0.2f Hz \" %n\n", "print \"Frequencies stopped are\",5*n,\"Hz, \",10*n,\"Hz, \",15*n,\"Hz\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Frequency = 20.00 Hz \n", "Frequencies stopped are 100.0 Hz, 200.0 Hz, 300.0 Hz\n" ] } ], "prompt_number": 22 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 16, page 356" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from math import pi\n", "# frequency\n", "l=1 #m\n", "m1=0.5 #kg\n", "tn=200 #N\n", "m=m1/l #kg/m\n", "n=((1/(2*l))*sqrt(tn/m)) #Hz\n", "print \"Frequency = %0.2f Hz \" %n\n", "w=2*pi*n #\n", "print \"Ratio of three frequencies is %0.1f:%0.1f:%0.1f\"%(w,2*w,3*w)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Frequency = 10.00 Hz \n", "Ratio of three frequencies is 62.8:125.7:188.5\n" ] } ], "prompt_number": 25 } ], "metadata": {} } ] }