{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "#1: Acoustics" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##Example number 1.1, Page number 2" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The sound intensity level is imcreased by 13.01 dB when the intensity is doubled\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "i=20; #the intensity of a source is increased 20 times\n", "\n", "#Calculation\n", "I=(10*(math.log10(i))); #intensity of sound(dB)\n", "\n", "#Result\n", "print \"The sound intensity level is imcreased by\",round(I,2),\"dB when the intensity is doubled\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##Example number 1.2, Page number 2" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The sound intensity level is increased by 6 dB\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "i=4; #the intensity of a source is increased 4 times\n", "\n", "#Calculation\n", "I=(10*(math.log10(i))); #intensity of sound(dB)\n", "\n", "#Result\n", "print \"The sound intensity level is increased by\",int(I),\"dB\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##Example number 1.3, Page number 2" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The intensity level of a plane just leaving the runway is 150.0 dB\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "I=1000; #sound intensity of plane leaving the runway(Wm**-2)\n", "Io=10**-12; #threshold intensity of sound(Wm**-2)\n", "\n", "#Calculation\n", "IL=(10*math.log10(I/Io)); #The intensity level of a plane just leaving the runway(dB)\n", "\n", "#Result\n", "print \"The intensity level of a plane just leaving the runway is\",IL,\"dB\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##Example number 1.4, Page number 2" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The intensity level is 60.0 dB\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "I=10**-6; #intensity of sound during heavy traffic(Wm**-2)\n", "Io=10**-12; #threshold intensity of sound(Wm**-2)\n", "\n", "#Calculation\n", "IL=(10*math.log10(I/Io)); #The intensity level(dB)\n", "\n", "#Result\n", "print \"The intensity level is\",IL,\"dB\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##Example number 1.5, Page number 3" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The intensity level is -48.9994 dB\n", "answer varies due to rounding off errors\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "Q=3.56; #rate of energy radiates(W)\n", "r=15; #distance of intensity level(m)\n", "Io=100; #reference intensity(Wm^-2)\n", "\n", "#Calculation\n", "A=4*math.pi*r**2; #Area(m^2)\n", "I=(Q/A); #sound intensity(Wm^-2)\n", "IL=(10*math.log10(I/Io)); #The intensity level(dB)\n", "\n", "#Result\n", "print \"The intensity level is\",round(IL,4),\"dB\"\n", "print \"answer varies due to rounding off errors\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##Example number 1.6, Page number 3" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The resultant sound level is 80.41 dB\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "Il1=70; #sound(dB)\n", "Il2=80; #sound(dB)\n", "\n", "#Calculation\n", "I1=10**(Il1/10); #ratio of intensity\n", "I2=10**(Il2/10); #ratio of intensity\n", "I=I1+I2; #intensity of sound(dB)\n", "Il=10*math.log10(I); #resultant intensity(dB)\n", "\n", "#Result\n", "print \"The resultant sound level is\",round(Il,2),\"dB\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##Example number 1.7, Page number 4" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The noise level at the point when 4 such drills are working at the same distance away is 101.02 dB\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "i=4; #the intensity of a source\n", "I1=95; #The noise level of sound from a drill(dB)\n", "\n", "#Calculation\n", "I2=(10*(math.log10(i))); #intensity of source(dB)\n", "IL=I1+I2; #The noise level at this point(dB)\n", "\n", "#Result\n", "print \"The noise level at the point when 4 such drills are working at the same distance away is\",round(IL,2),\"dB\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##Example number 1.8, Page number 4" ] }, { "cell_type": "code", "execution_count": 17, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The flow of energy across 1m^2 per second is 6.638 *10**4 Wm**-2\n", "answer varies due to rounding off errors\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "f=426; #frequency of sound(Hz)\n", "a=0.65*10**-2; #amplitude of sound wave(m)\n", "A=1; #area(m^2)\n", "v=340; #velocity of sound in air(ms^-1)\n", "d=1.29; #density of air(Kgm^-3)\n", "\n", "#Calculation\n", "I=(2*math.pi**2*f**2*a**2*d*v); #The flow of energy across 1m^2 per second(Wm^-2*10^4)\n", "\n", "#Result\n", "print \"The flow of energy across 1m^2 per second is\",round(I/10**4,3),\"*10**4 Wm**-2\"\n", "print \"answer varies due to rounding off errors\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##Example number 1.9, Page number 12" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The reverberation time of the hall is 2.087 sec\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "V=1000; #volume of hall(m^3)\n", "S=400; #sound absorbing surface of area(m^2)\n", "a=0.2; #average absorption coefficient(sabine)\n", "\n", "#Calculation\n", "T=(0.167*V)/(a*S); #The reverberation time of the hall(sec)\n", "\n", "#Result\n", "print \"The reverberation time of the hall is\",round(T,3),\"sec\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##Example number 1.10, Page number 12" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The average absorbtion coefficient is 0.2374 O.W.U\n", "Total sound absorbtion of the room is 128.2 O.W.U m^2\n", "answer varies due to rounding off errors\n", "The reverberation time is 1.954 sec\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "V=1500; #volume of room(m^3)\n", "a1=0.03; #average sound coefficient for wall(sabine)\n", "a2=0.06; #average sound coefficient for the ceiling(sabine)\n", "a3=0.8; #average sound coefficient for the floor(sabine)\n", "S1=260; #The wall area of the room(m^2)\n", "S2=140; #The floor area of the room(m^2)\n", "S3=140; #The ceiling area of the room(m^2)\n", "\n", "#Calculation\n", "a=((a1*S1)+(a2*S2)+(a3*S3))/(S1+S2+S3); #The average absorbtion coefficient(O.W.U)\n", "TS=S1+S2+S3; #total area of the room(m^2)\n", "x=(a*TS); #Total sound absorbtion of the room(O.W.U m^2)\n", "T=((0.167*V)/x); #The reverberation time(sec)\n", "\n", "#Result\n", "print \"The average absorbtion coefficient is\",round(a,4),\"O.W.U\"\n", "print \"Total sound absorbtion of the room is\",x,\"O.W.U m^2\"\n", "print \"answer varies due to rounding off errors\"\n", "print \"The reverberation time is\",round(T,3),\"sec\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##Example number 1.11, Page number 13" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The area of interior surfaces is 3340.0 m**2\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "V=12000; #volume of auditorium(m^3)\n", "T=1.5; #The reverberation time of the auditorium(sec)\n", "a=0.4; #average absorption coefficient(sabine)\n", "\n", "#Calculation\n", "S=(0.167*V)/(a*T); #area of interior surfaces(m^2)\n", "\n", "#Result\n", "print \"The area of interior surfaces is\",S,\"m**2\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##Example number 1.12, Page number 13" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The total absorbtion in the hall is 835.0 sabine m^2\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "V=7500; #volume of cinema hall(m^3)\n", "T=1.5; #The reverberation time of the cinema hall(sec)\n", "\n", "#Calculation\n", "TaS=(0.167*V)/(T); #The total absorbtion in the hall(sabine m^2)\n", "\n", "#Result\n", "print \"The total absorbtion in the hall is\",TaS,\"sabine m^2\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##Example number 1.13, Page number 13" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The new reverberation time after placing the cushioned chairs is 1.3115 sec\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "V=12500; #volume of hall(m^3)\n", "T1=1.5; #The reverberation time of the hall(sec)\n", "a2S2=200; #The number of cushioned chairs are additionally placed in the hall(sabine-m^2)\n", "\n", "#Calculation\n", "Ta1S1=(0.167*V)/T1; #The reverberation time before placed cushioned chairs(sabine m^2)\n", "T2=(0.167*V)/(Ta1S1+a2S2); #The new reverberation time after placing the cushioned chairs(sec)\n", "\n", "#Result\n", "print \"The new reverberation time after placing the cushioned chairs is\",round(T2,4),\"sec\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##Example number 1.14, Page number 14" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The reverberation time for the hall is 1.2794 sec\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "V=475; #volume of hall(m^3)\n", "a1=0.025; #absorbtion coefficient for wall(O.W.U)\n", "a2=0.02; #absorbtion coefficient for the ceiling(O.W.U)\n", "a3=0.55; #absorbtion coefficient for the floor(O.W.U)\n", "S1=200; #The wall area of the room(m^2)\n", "S2=100; #The floor area of the room(m^2)\n", "S3=100; #The ceiling area of the room(m^2)\n", "\n", "#Calculation\n", "TaS=((a1*S1)+(a2*S2)+(a3*S3)); #The average absorbtion coefficient(O.W.U-m^2)\n", "T=((0.167*V)/TaS); #The reverberation time(sec)\n", "\n", "#Result\n", "print \"The reverberation time for the hall is\",round(T,4),\"sec\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##Example number 1.15, Page number 14" ] }, { "cell_type": "code", "execution_count": 16, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The reverberation time in the hall without audience is 3.9879 sec\n", "The reverberation time in the hall with audience is 1.99396 sec\n", "Thus,the reverberation reduces to half of its initial value when the audience fill the hall\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "V=2265; #volume of hall(m^3)\n", "Ta1S1=94.85; #The total absorbtion coefficient(m^2)\n", "\n", "#Calculation\n", "T1=((0.167*V)/Ta1S1); #The reverberation time in the hall without audience(sec)\n", "Ta2S2=2*Ta1S1; #The new absorbtion coefficient(m^2)\n", "T2=((0.167*V)/Ta2S2); #The reverberation time in the hall with audience(sec)\n", "\n", "#Result\n", "print \"The reverberation time in the hall without audience is\",round(T1,4),\"sec\"\n", "print \"The reverberation time in the hall with audience is\",round(T2,5),\"sec\"\n", "print \"Thus,the reverberation reduces to half of its initial value when the audience fill the hall\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##Example number 1.16, Page number 14" ] }, { "cell_type": "code", "execution_count": 18, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The average absorbing power of the surface is 0.48789 sabine\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "V=120000; #Volume of the hall(m^3)\n", "T=1.55; #The reverberation time(sec)\n", "S=26500; #The total absorbing surface(m^2)\n", "\n", "#Calculation\n", "TaS=(0.167*V)/T; #The average absorbtion coefficient(sabine-m^2)\n", "a=(TaS/S); #The average absorbing power of the surface(sabine)\n", "\n", "#Result\n", "print \"The average absorbing power of the surface is\",round(a,5),\"sabine\"" ] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.9" } }, "nbformat": 4, "nbformat_minor": 0 }