{ "metadata": { "name": "", "signature": "sha256:3f5941b661a8515cae38219efa7050e771c862dd351401d57b16c57806506e2a" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "4: Acoustics" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example number 4.1, Page number 24" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "import numpy as np\n", "\n", "#Variable declaration\n", "I1=10**-12; #intensity(W/m**2)\n", "I2=0.1; #intensity of sound(W/m**2)\n", "\n", "#Calculation\n", "beta=10*np.log10(I2/I1); #intensity level(dB) \n", "\n", "#Result\n", "print \"intensity level is\",beta,\"dB\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "intensity level is 110.0 dB\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example number 4.2, Page number 24" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "import numpy as np\n", "\n", "#Variable declaration\n", "I1=10**-12; #intensity(W/m**2)\n", "I2=10**-4; #intensity of sound(W/m**2)\n", "\n", "#Calculation\n", "beta=10*np.log10(I2/I1); #relative sound intensity(dB) \n", "\n", "#Result\n", "print \"relative sound intensity is\",beta,\"dB\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "relative sound intensity is 80.0 dB\n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example number 4.3, Page number 25" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "import numpy as np\n", "\n", "#Variable declaration\n", "I2byI1=2; #intensity ratio\n", "\n", "#Calculation\n", "beta=10*np.log10(I2byI1); #increase in sound intensity level(dB) \n", "\n", "#Result\n", "print \"increase in sound intensity level is\",round(beta,2),\"dB\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "increase in sound intensity level is 3.01 dB\n" ] } ], "prompt_number": 10 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example number 4.4, Page number 25" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "import numpy as np\n", "\n", "#Variable declaration\n", "P=3.14; #power radiated(W)\n", "r=10; #radius(m)\n", "I11=100; #intensity(W/m**2)\n", "I12=1; #intensity(W/m**2)\n", "I13=10**-12; #intensity(W/m**2)\n", "\n", "#Calculation\n", "I2=P/(4*math.pi*r**2); #intensity of sound(W/m**2)\n", "beta1=10*np.log10(I2/I11); #relative intensity(dB) \n", "beta2=10*np.log10(I2/I12); #relative intensity(dB) \n", "beta3=10*np.log10(I2/I13); #relative intensity(dB) \n", "\n", "#Result\n", "print \"relative intensity with respect to 100W/m**2 is\",round(beta1,4),\"dB\"\n", "print \"relative intensity with respect to 1W/m**2 is\",round(beta2,4),\"dB\"\n", "print \"relative intensity with respect to 10**-12W/m**2 is\",round(beta3,3),\"dB\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "relative intensity with respect to 100W/m**2 is -46.0228 dB\n", "relative intensity with respect to 1W/m**2 is -26.0228 dB\n", "relative intensity with respect to 10**-12W/m**2 is 93.977 dB\n" ] } ], "prompt_number": 13 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example number 4.5, Page number 26" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "import numpy as np\n", "\n", "#Variable declaration\n", "P=1.5; #power radiated(J/s)\n", "r=20; #radius(m)\n", "I1=10**-12; #intensity level of sound(W/m**2)\n", "\n", "#Calculation\n", "I2=P/(4*math.pi*r**2); #intensity of sound(W/m**2)\n", "beta=10*np.log10(I2/I1); #intensity level(dB) \n", "\n", "#Result\n", "print \"intensity level of sound is\",round(beta,1),\"dB\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "intensity level of sound is 84.7 dB\n" ] } ], "prompt_number": 15 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example number 4.6, Page number 27" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "beta1=80; #intensity level of sound(dB)\n", "\n", "#Calculation\n", "\n", "\n", "#Result\n", "print \" \"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " \n" ] } ], "prompt_number": 16 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example number 4.7, Page number 28" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "V=1500; #volume of hall(m**3)\n", "sigma_a1s=100; #absorption of sound by hall(sabine)\n", "sigma_a2s=100; #absorption of sound by audience(sabine)\n", "\n", "#Calculation\n", "A=sigma_a1s+sigma_a2s; #total absorption(sabine)\n", "t1=0.16*V/sigma_a1s; #reverberation time of hall when room is empty(s)\n", "t2=0.16*V/(sigma_a1s+sigma_a2s); #reverberation time of hall when room is filled(s)\n", "t=t1-t2; #change in reverberation time(s)\n", "\n", "#Result\n", "print \"when the room is filled, reverberation time is reduced to\",t,\"s\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "when the room is filled, reverberation time is reduced to 1.2 s\n" ] } ], "prompt_number": 17 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example number 4.8, Page number 28" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "V=1000; #volume of hall(m**3)\n", "T=2; #reverberation time(s)\n", "s=350; #area of sound absorbing surface(m**2)\n", "\n", "#Calculation\n", "alpha=0.16*V/(T*s); #average absorption coefficient\n", "\n", "#Result\n", "print \"average absorption coefficient is\",round(alpha,5)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "average absorption coefficient is 0.22857\n" ] } ], "prompt_number": 19 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example number 4.9, Page number 29" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "V=2400; #volume of hall(m**3)\n", "a1=500; #area of plaster ceiling(m**2)\n", "s1=0.02; #coefficient of absorption of plaster ceiling\n", "a2=600; #area of plaster walls(m**2)\n", "s2=0.03; #coefficient of absorption of plaster walls\n", "a3=500; #area of wood floor(m**2)\n", "s3=0.06; #coefficient of absorption of wood floor\n", "a4=20; #area of wood doors(m**2)\n", "s4=0.06; #coefficient of absorption of wood doors\n", "a5=400; #area of cushion seats(m**2)\n", "s5=0.01; #coefficient of absorption of cushion seats\n", "a6=200; #area of cane seats(m**2)\n", "s6=0.01; #coefficient of absorption of cane seats \n", "s=0.45; #absorption of each member(sabine)\n", "\n", "#Calculation\n", "sigma_asE=(a1*s1)+(a2*s2)+(a3*s3)+(a4*s4)+(a5*s5)+(a6*s6); #total absorption when hall is empty(sabine)\n", "TE=0.16*V/sigma_asE; #reverberation time when hall is empty(s)\n", "sigma_asF=(a1*s1)+(a2*s2)+(a3*s3)+(a4*s4)+(a5*s)+(a6*s); #total absorption when hall is filled(sabine)\n", "TF=0.16*V/sigma_asF; #reverberation time when hall is filled(s)\n", "\n", "#Result\n", "print \"reverberation time when hall is empty is\",round(TE,4),\"s\"\n", "print \"reverberation time when hall is filled is\",round(TF,3),\"s\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "reverberation time when hall is empty is 5.8896 s\n", "reverberation time when hall is filled is 1.166 s\n" ] } ], "prompt_number": 23 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example number 4.10, Page number 30" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "import numpy as np\n", "\n", "#Variable declaration\n", "I1=10**-12; #intensity(W/m**2)\n", "I2=100; #intensity of sound(W/m**2)\n", "\n", "#Calculation\n", "beta=10*np.log10(I2/I1); #intensity level of jet plane(dB) \n", "\n", "#Result\n", "print \"intensity level of jet plane is\",beta,\"dB\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "intensity level of jet plane is 140.0 dB\n" ] } ], "prompt_number": 25 } ], "metadata": {} } ] }