import math
##Example 11.1
##calculation of total absorption and average absorption coefficient
##given values
V=20*15*5.;##volume of hall in m**3
t=3.5;##reverberation time of empty hall in sec
##calculation
a1=.161*V/t;##total absorption of empty hall
k=a1/(2.*(20*15+15*5+20*5.));
print'%s %.2f %s'%('the average absorption coefficient is',k,'');
import math
##Example 11.2
##calculation of average absorption coefficient
##given values
V=10*8.*6.;##volume of hall in m**3
t=1.5;##reverberation time of empty hall in sec
A=20.;##area of curtain cloth in m**2
t1=1.;##new reverberation time in sec
##calculation
a1=.161*V/t;##total absorption of empty hall
a2=.161*V/t1;##total absorption after a curtain cloth is suspended
k=(a2-a1)/(2.*20.);
print'%s %.2f %s'%('the average absorption coefficient is',k,'');
import math
##Example 11.3
##calculation of average absorption coefficient and area
##given values
V=20*15*10.;##volume of hall in m**3
t=3.5;##reverberation time of empty hall in sec
t1=2.5;##reduced reverberation time
k2=.5;##absorption coefficient of curtain cloth
##calculation
a1=.161*V/t;##total absorption of empty hall
k1=a1/(2*(20*15+15*10+20*10));
print'%s %.2f %s'%('the average absorption coefficient is',k1,'');
a2=.161*V/t1;##total absorption when wall is covered with curtain
a=t1*(a2-a1)/(t1*k2);
print'%s %.2f %s'%('area of wall to be covered with curtain(in m^2)is:',a,'')