- •Preface
- •Objectives of the Book
- •Style
- •Prerequisites
- •The Big Picture
- •Contents
- •1.1 Review of Complex Numbers
- •1.2 Complex Numbers in Polar Form
- •1.3 Four Equivalent Forms to Represent Harmonic Waves
- •1.4 Mathematical Identity
- •1.5 Derivation of Four Equivalent Forms
- •1.5.1 Obtain Form 2 from Form 1
- •1.5.2 Obtain Form 3 from Form 2
- •1.5.3 Obtain Form 4 from Form 3
- •1.6 Visualization and Numerical Validation of Form 1 and Form 2
- •1.8 Homework Exercises
- •1.9 References of Trigonometric Identities
- •1.9.1 Trigonometric Identities of a Single Angle
- •1.9.2 Trigonometric Identities of Two Angles
- •1.10 A MATLAB Code for Visualization of Form 1 and Form 2
- •2.2 Equation of Continuity
- •2.3 Equation of State
- •2.3.1 Energy Increase due to Work Done
- •2.3.2 Pressure due to Colliding of Gases
- •2.3.3 Derivation of Equation of State
- •2.4 Derivation of Acoustic Wave Equation
- •2.5 Formulas for the Speed of Sound
- •2.5.1 Formula Using Pressure
- •2.5.2 Formula Using Bulk Modulus
- •2.5.3 Formula Using Temperature
- •2.5.4 Formula Using Colliding Speed
- •2.6 Homework Exercises
- •3.1 Review of Partial Differential Equations
- •3.1.1 Complex Solutions of a Partial Differential Equation
- •3.1.2 Trigonometric Solutions of a Partial Differential Equation
- •3.2 Four Basic Complex Solutions
- •3.3 Four Basic Traveling Waves
- •3.4 Four Basic Standing Waves
- •3.5 Conversion Between Traveling and Standing Waves
- •3.6 Wavenumber, Angular Frequency, and Wave Speed
- •3.7 Visualization of Acoustic Waves
- •3.7.1 Plotting Traveling Wave
- •3.7.2 Plotting Standing Wave
- •3.8 Homework Exercises
- •4.2 RMS Pressure
- •4.2.1 RMS Pressure of BTW
- •4.2.2 RMS Pressure of BSW
- •4.3 Acoustic Intensity
- •4.3.1 Acoustic Intensity of BTW
- •4.3.2 Acoustic Intensity of BSW
- •4.5.1 Issues with Real Impedance
- •4.6 Computer Program
- •4.7 Homework Exercises
- •4.8 References
- •4.8.1 Derivatives of Trigonometric and Complex Exponential Functions
- •4.8.2 Trigonometric Integrals
- •5.1 Spherical Coordinate System
- •5.2 Wave Equation in Spherical Coordinate System
- •5.3 Pressure Solutions of Wave Equation in Spherical Coordinate System
- •5.4 Flow Velocity
- •5.4.1 Flow Velocity in Real Format
- •5.4.2 Flow Velocity in Complex Format
- •5.5 RMS Pressure and Acoustic Intensity
- •5.7 Homework Exercises
- •6.1 Review of Pressure and Velocity Formulas for Spherical Waves
- •6.2 Acoustic Waves from a Pulsating Sphere
- •6.3 Acoustic Waves from a Small Pulsating Sphere
- •6.4 Acoustic Waves from a Point Source
- •6.4.1 Point Sources Formulated with Source Strength
- •6.4.2 Flow Rate as Source Strength
- •6.5 Acoustic Intensity and Sound Power
- •6.6 Computer Program
- •6.7 Project
- •6.8 Objective
- •6.9 Homework Exercises
- •7.1 1D Standing Waves Between Two Walls
- •7.2 Natural Frequencies and Mode Shapes in a Pipe
- •7.3 2D Boundary Conditions Between Four Walls
- •7.3.1 2D Standing Wave Solutions of the Wave Equation
- •7.3.2 2D Nature Frequencies Between Four Walls
- •7.3.3 2D Mode Shapes Between Four Walls
- •7.4 3D Boundary Conditions of Rectangular Cavities
- •7.4.1 3D Standing Wave Solutions of the Wave Equation
- •7.4.2 3D Natural Frequencies and Mode Shapes
- •7.5 Homework Exercises
- •8.1 2D Traveling Wave Solutions
- •8.1.2 Wavenumber Vectors in 2D Traveling Wave Solutions
- •8.2 Wavenumber Vectors in Resonant Cavities
- •8.3 Traveling Waves in Resonant Cavities
- •8.4 Wavenumber Vectors in Acoustic Waveguides
- •8.5 Traveling Waves in Acoustic Waveguides
- •8.6 Homework Exercises
- •9.1 Decibel Scale
- •9.1.1 Review of Logarithm Rules
- •9.1.2 Levels and Decibel Scale
- •9.1.3 Decibel Arithmetic
- •9.2 Sound Pressure Levels
- •9.2.2 Sound Power Levels and Decibel Scale
- •9.2.3 Sound Pressure Levels and Decibel Scale
- •9.2.4 Sound Pressure Levels Calculated in Time Domain
- •9.2.5 Sound Pressure Level Calculated in Frequency Domain
- •9.3 Octave Bands
- •9.3.1 Center Frequencies and Upper and Lower Bounds of Octave Bands
- •9.3.2 Lower and Upper Bounds of Octave Band and 1/3 Octave Band
- •9.3.3 Preferred Speech Interference Level (PSIL)
- •9.4 Weighted Sound Pressure Level
- •9.4.1 Logarithm of Weighting
- •9.5 Homework Exercises
- •10.1 Sound Power, Acoustic Intensity, and Energy Density
- •10.2.2 Room Constant
- •10.2.3 Reverberation Time
- •10.3 Room Acoustics
- •10.3.1 Energy Density due to an Acoustic Source
- •10.3.2 Sound Pressure Level due to an Acoustic Source
- •10.4 Transmission Loss due to Acoustical Partitions
- •10.4.2 Transmission Loss (TL)
- •10.5 Noise Reduction due to Acoustical Partitions
- •10.5.1 Energy Density due to a Partition Wall
- •10.5.2 Sound Pressure Level due to a Partition Wall
- •10.5.3 Noise Reduction (NR)
- •10.6 Homework Exercises
- •11.1 Complex Amplitude of Pressure and Acoustic Impedance
- •11.1.3 Transfer Pressure
- •11.2 Complex Acoustic Impedance
- •11.3 Balancing Pressure and Conservation of Mass
- •11.4 Transformation of Pressures
- •11.5 Transformation of Acoustic Impedance
- •11.7 Numerical Method for Molding of Pipelines
- •11.8 Computer Program
- •11.9 Project
- •11.10 Homework Exercises
- •12.1.1 Equivalent Acoustic Impedance of a One-to-Two Pipe
- •12.2 Power Transmission of a One-to-Two Pipe
- •12.3 Low-Pass Filters
- •12.4 High-Pass Filters
- •12.5 Band-Stop Resonator
- •12.6 Numerical Method for Modeling of Pipelines with Side Branches
- •12.7 Project
- •12.8 Homework Exercises
- •Nomenclature
- •Appendices
- •Appendix 1: Discrete Fourier Transform
- •Discrete Fourier Transform
- •Fourier Series for Periodical Time Function
- •Formulas of Discrete Fourier Series
- •Appendix 2: Power Spectral Density
- •Power Spectral Density
- •Accumulated Sound Pressure Square
- •Sound Pressure Level in Each Band
- •References
- •Index
4.6 Computer Program |
105 |
Complex specific acoustic impedance for plane waves associated with e2jωt
(e jωt) |
p (x, t); u (x, t) |
|
|
|
|
|
|
|
|
|
|
|
|
z (x) ¼ p /u |
|
|
|
||||||||
p +p |
p : [(A+c |
|
jA+s)e jkx |
+ (A |
|
c |
|
|
jA s)e jkx]e jωt |
|
A c |
|
jA s ejkx |
A c |
|
jA s e jkx |
|||||||||
þ |
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
ρoc |
ð þ |
þ Þ þð |
Þ |
|||||||
|
|
1 |
|
|
|
jkx |
|
|
jkx |
jωt |
A c |
|
jA s ejkx |
A c |
|
jA s e jkx |
|||||||||
u |
+u |
u : |
[(A+c |
|
jA+s)e |
|
|
(A |
|
c |
|
jA |
|
s)e |
]e |
|
ð þ |
|
þ Þ ð |
|
Þ |
||||
|
|
|
|||||||||||||||||||||||
þ |
2 |
|
ρo c |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Terms associated with e jωt are the conjugates of the terms associated with e jωt. Usually, the analysis of sound transmission in pipes only needs to compute for one part associated with e jωt. The results of p* and u* associated with e jωt are just
the conjugates of the resulting p and u using the complex z associated with e jωt. The final real solutions p and u will be the summation of the pair of the complex
solution.
4.6Computer Program
Plotting Traveling and Standing Waves
A standing wave, ps(t, x), is the addition of a forward wave, p+(t, x), and a backward wave, p (t, x), as shown below:
p+(t, x) ¼ Ac cos (ωt kx) As sin (ωt kx) ¼ A cos (ωt kx + ϕ)
p (t, x) ¼ Ac cos (ωt + kx) As sin (ωt + kx) ¼ A cos (ωt + kx + ϕ)
ps(t, x) ¼ p+ + p
¼ 2A cos (ωt + ϕ) cos (kx)
(Form 1:RIP) (Form 2:REP) (Form 1:RIP) (Form 2:REP)
See Exercise 3.4
Use MATLAB to plot the pressure and velocity of a forward traveling wave (Part A), a backward traveling wave (Part B), and a standing wave (Part C) of three wavelengths using the following parameters:
Ac ¼ 0 ½m&; As ¼ 2 ½m&; ω ¼ 2π |
s |
; k ¼ 2π |
m |
||
|
|
rad |
|
|
rad |
Plot eight subplots to capture the wave motion with a time increment of T divided by eight. For calculating the velocity, assume ρoc ¼ 1.s
Part A:
•Study and understand the provided MATLAB code.
•Complete the function “getForwardWave ” which calculates the pressure and velocity from A, w, k, Time, and XDir.
•Run the code to plot the following eight subplots representing the forward wave motion during a period T:
pþðt, xÞ ¼ A cos ðωt kx þ ϕÞ
106 |
4 Acoustic Intensity and Specific Acoustic Impedance |
Sound Pressure |
Molecular Flow Velocity |
Part B:
•Complete the function “getBackwardWave” which calculates the pressure and velocity from A, w, k, Time, and XDir.
•Run the code to plot the following eight subplots representing the backward wave motion during a period T:
p ðt, xÞ ¼ A cos ðωt þ kx þ ϕÞ
Sound Pressure Molecular Flow Velocity
4.6 Computer Program |
107 |
Part C:
•Complete the function “getStandingWave ” which calculates the pressure and velocity from A, w, k, Time, and XDir.
•Run the code to plot the following eight subplots representing the standing wave motion during a period T:
psðt, xÞ ¼ pþ þ p
|
¼ 2A cos ðωt þ ϕÞ cos ðkxÞ |
Sound Pressure |
Molecular Flow Velocity |
MATLAB Code:
function ANC_PRJ021_TravelingAndStandingWaves |
|
|
clear all % removes all variables |
|
|
close all % deletes all figures |
|
|
%---------------------------------------- |
–-------- |
–% |
% Section 1: Define the Variables and Parameters |
|
|
%------------------------------------------------- |
|
–% |
%A standing wave,ps(t,x),is the addition of a forward wave, p+(t,x),
%and a backward wave, p-(t,x) as shown below
% p+(t,x)=Ac cos(wt-kx)+As sin(wt-kx) |
(Form 1) |
|
% |
=A cos(wt-kx+phi) |
(Form 2) |
% p-(t,x)=Ac cos(wt+kx)+As sin(wt+kx) |
(Form 1) |
|
% |
=A cos(wt+kx+phi) |
(Form 2) |
% ps(t,x)=P+(t,x)+p-(t,x) |
|
108 |
4 Acoustic Intensity and Specific Acoustic Impedance |
|
% |
=A cos(wt-kx+phi)+A cos(wt+kx+phi) |
(Form 2) |
% |
=2A cos(wt+phi)*cos(kx) --- see the Homework Eroblem 3.4 |
|
%note that the p+ and p- have the same amplitude A
%define the parameters of the wave function iCase=1;
if iCase == 1 % phase phi = 0
Ac=0;% the coefficient of the cosine function in Form 1 As=2;% the coefficient of the sine funciton in Form 1 elseif iCase == 2
Ac=3^(1/2); % the coefficient of the cosine function in Form 1 As=-1; % the coefficient of the sine funciton in Form 1
end
w=2*pi/1; |
% the angular frequency [rad/sec] in Form 1 and Form 2 |
|
k=2*pi/1; |
% the wave number [rad/m] in Form 1 and Form 2 |
|
% define the number of times to take a snapshot |
||
nTimePerPeriod=8; |
% the number of data per period (T) |
%plot only one period since it repeats every period
%define the parameters for plotting [space related]
nDataPerWaveLength=8; |
% the number of data per period (T) |
||
nWaveLength=3; |
% the number of periods for plotting |
||
%----------------------------------------------------- |
|
|
–% |
% Section 2: Setup |
|
|
|
%---------------------------------------------------------- |
|
|
–% |
% get the period (T) and a time array |
|
||
T =2*pi/w; |
|
% the period of the wave [sec] |
|
TimeIncrement=T/nTimePerPeriod; |
% [sec] |
||
nTime=nTimePerPeriod; |
% the number of time data |
TimeArray=(0:1:nTime-1)'*TimeIncrement; % [sec]
%get the data array of the location in the X-direction L=2*pi/k; % [m] , note that k=2*pi/L XDataIncrement=L/nDataPerWaveLength; % [m]
nXData=nDataPerWaveLength*nWaveLength; % the number of space data XDataArray=(0:1:nXData-1)'*XDataIncrement; % [m]
%get the data array of the location in the Y-direction
%(Y-direction is a dummy direction and does not exist) YDataIncrementDummy=XDataIncrement*0.15; % [m] a dummy value nYDataDummy=5; % a dummy number(to adjust the arrow size) YDataArrayDummy=(0:1:nYDataDummy-1)'*YDataIncrementDummy; % [m]
%get A and phi in Form 2 from From Ac and As in Form 1
[A,phi]=get_A_and_phi(Ac, As); % the same as PROJECT 1.9.1 |
|
%-------------------------------------------------------------- |
–% |
% Section 3: Calculation |
|
%-------------------------------------------------------------- |
–% |
% Index of Cases |
|
% iCaseWaveDirection = 1; % Forward Traveling Wave |
|
% iCaseWaveDirection = 2; % Backward Traveling Wave |
|
% iCaseWaveDirection = 3; % Standing Wave |
|
for iCaseWaveDirection=1:1:3 |
|
% calculate the cosine function |
|
for kTime=1:1:nTimePerPeriod |
|
for kXData=1:1:nXData |
|
% extract the scalars from the arrays |
|
% scalars are used temporally in the for-loop |
|
4.6 Computer Program |
109 |
TimeTemp=TimeArray(kTime,1);
XDataTemp=XDataArray(kXData,1);
if iCaseWaveDirection == 1 % forward wave
% get the pressure from A and phi |
(Form 2) |
[pressTemp,velocTemp]=... |
|
getForwardWave(A,w,k,TimeTemp,XDataTemp,phi); |
|
% put the pressure and velocity in the matrices pressColMatrix(1,kXData)=pressTemp; % pressure veloXColMatrix(1,kXData)=velocTemp; % velocity veloYColMatrix(1,kXData)=0; % dummy value % adjust the arrow size in the figures
arrow_scale_factor=1/20; % adjust the arrows size elseif iCaseWaveDirection == 2 % backward wave
[pressTemp,velocTemp]=...
getBackwardWave(A,w,k,TimeTemp,XDataTemp,phi); % put the pressure and velocity in the matrices pressColMatrix(1,kXData)=pressTemp; % pressure veloXColMatrix(1,kXData)=velocTemp; % velocity
veloYColMatrix(1,kXData)=0; |
% dummy value |
% adjust the arrow size in figure |
|
arrow_scale_factor=1/20; |
|
elseif iCaseWaveDirection == 3 % standing wave |
|
[pressTemp,velocTemp]=... |
|
getStandingWave(A,w,k,TimeTemp,XDataTemp,phi); |
|
pressColMatrix(1,kXData)=pressTemp; % pressure |
|
veloXColMatrix(1,kXData)=velocTemp; % velocity |
|
veloYColMatrix(1,kXData)=0; |
% dummy value |
% adjust the arrow size in the figures |
|
arrow_scale_factor=1/40; |
|
end |
|
end |
|
%------------------------------------------------------------ |
% |
% Section 4: Plotting |
|
%------------------------------------------------------------ |
% |
%the meshed data of the pressure for the surface plots onesRowMatrix=ones(nYDataDummy,1); pressGrid=onesRowMatrix*pressColMatrix; veloXGrid=onesRowMatrix*veloXColMatrix; veloYGrid=onesRowMatrix*veloYColMatrix;
%figures setup
figure(210+iCaseWaveDirection); set(gcf,'Position',[100 100 1000 600]) subplot(8,2,kTime*2-1) plot(XDataArray,pressColMatrix,'lineWidth',2) xlim([0 3])
xticks([0 0.5 1 1.5 2 2.5 3]) xticklabels({'0','\lambda/2','\lambda','3\lambda/2',...
'2\lambda','5\lambda/2','3\lambda'}) ylim([-4 4])
yticks([-4 0 4]) str=strcat('(',num2str(kTime-1),'/8)T'); ylabel(str)
% plot the pressure colormap
110 |
4 Acoustic Intensity and Specific Acoustic Impedance |
|
subplot(8,2,kTime*2-0) |
|
pcolor(XDataArray,YDataArrayDummy,pressGrid); shading interp; |
|
xlim([0 3]) |
|
xticks([0 0.5 1 1.5 2 2.5 3]) |
|
xticklabels({'0','\lambda/2','\lambda','3\lambda/2',... |
|
'2\lambda','5\lambda/2','3\lambda'}) |
|
set(gca,'YTick',[]) |
|
cb=colorbar('location','eastoutside'); |
|
set(cb,'position',[.92 .125 .01 .795]) |
|
caxis([-4 4]) |
|
hold on |
|
% plot the velocity vectors |
|
subplot(8,2,kTime*2-0) |
|
h=quiver(XDataArray,YDataArrayDummy,... |
|
veloXGrid.*arrow_scale_factor,... |
|
veloYGrid.*arrow_scale_factor); |
|
xlim([0 3]) |
|
ylim([0 max(max(YDataArrayDummy))]) |
|
set(gca,'YTick',[]) |
|
set(h,'AutoScale','off') |
|
set(h,'LineWidth',1) |
|
set(h,'color','w') |
|
hold off |
end |
|
% save the figure |
if iCaseWaveDirection == 1 % forward wave |
|
saveas(gcf,strcat('Figure_ANC_PRJ021_ForwardWaves'),'emf') |
|
elseif iCaseWaveDirection == 2 % backward wave |
|
saveas(gcf,strcat('Figure_ANC_PRJ021_BackwardWaves'),'emf') |
|
elseif iCaseWaveDirection == 3 % standing wave |
|
saveas(gcf,strcat('Figure_ANC_PRJ021_StandingWaves'),'emf') |
|
end |
|
end |
|
end |
|
%-------------------------------------------------------------- |
–% |
% Section 5: Functions |
|
%-------------------------------------------------------------- |
–% |
function [pressure,velocity]=getForwardWave(A,w,k,Time,XDir,phi)
% p+(t,x)=Ac cos(wt-kx)+As sin(wt-kx) |
(Form 1) |
|
% |
=A cos(wt-kx+phi) |
(Form 2) |
%modify the following two lines for the pressure and velocity
%assume loc=0
pressure=A*cos(w*Time-k*XDir+phi); % pressure of a forward wave
velocity=pressure; |
% velocity of a forward wave |
end |
|
function [pressure,velocity]=getBackwardWave(A,w,k,Time,XDir,phi)
% p-(t,x)=Ac cos(wt+kx)+As sin(wt+kx) |
(Form 1) |
|
% |
=A cos(wt+kx+phi) |
(Form 2) |
%modify the following two lines for the pressure and velocity
%assume loc=0
pressure=0; % pressure of a backward wave velocity=0; % velocity of a backward wave end