|
Calculus Without TearsThe Wave EquationIntroductionIn the CWT texts we analyze motion problems using Newton's Second Law, and electrical circuits using the differential equations that characterize electrical components along with the relevant circuit laws. In this page we will see how the techniques we have studied can be applied to analyze wave motion. The basic physics/engineering paradigm is: start by analyzing the system and writing the differential equations that characterize it, then solve the differential equations, so that's what we'll do. We'll see that the wave equation can be derived from physical principles we've already studied plus the ideal gas law. In the traditional curriculum we would then proceed to solve the differential equation analytically. However, we don't want to get bogged down with difficult to solve DEs, but we do want to see how the wave equation works. So, we will solve it numerically with a FREEMAT program, as is shown below. Duck soup! Calculus with Multiple VariablesFor simplicities sake, CWT only deals with functions of one variable. We can't represent a wave whose amplitude changes with position and time with a function of just one variable, as we need variables to represent both position and time. Waves occur in 3-dimensional space, and it takes 3 numbers to represent a position in 3-dimensional space, so we can represent an acoustic wave with a function p(x,y,z,t) where x,y, and z are spatial coordinates and t is time, and p(x,y,z,t) is the displacement in the equilibrium pressure at the point x, y, z at time t. By considering one dimensional waves we will be able to limit ourselves to functions of two variables in what follows. Below we will use a two variable function p(x,t) where x is a location variable and t is time. When we have functions of more than one variable, derivatives are called 'partial derivatives'. For example the function v below is a function of two variables, x and t,
By considering x to be a constant the function becomes a polynomial with one variable, t, and we can differentiate it wrt t, and the result is called the partial derivative of v wrt t and is denoted by We can take 2nd order partial derivatives
Also, note that The Wave EquationThe wave equation characterizes wave motion in gas, liquids, and solids, as well as electromagnetic waves. We'll examine the acoustic case, this equation describes how sound waves propagate in air. We will show one derivation of the wave equation in this section, and another in the section on Maxwell's equations. There is also a different and very concise derivation at Wave equation - Wikipedia, the free encyclopedia, this derivation uses springs and masses. A Derivation of the Acoustic Wave EquationThe Ideal Gas LawWe will need the ideal gas law from chemistry which is P · V = m · R · T, where
The ideal gas law says that (at a fixed temperature) the pressure of the gas in a fixed volume is directly proportional to the mass of the gas, that is, as the mass increases the pressure increases, and as the mass decreases the pressure decreases. As you pump air into the tire the pressure increases, as you let air out it decreases. No big surprise. A One Dimensional Physical ModelWe'll keep the number of spatial dimensions to 1 by assuming that we have a very small straight hollow tube filled with air, and that the air moves only in the direction of the tube. We will study the motion and the pressure of air in the tube. The constant P will represent the equilibrium pressure, that is, atmospheric pressure. The function p(x,t) will represent the displacement from the equilibrium pressure due to an acoustic wave at location x at time t. The function v(x,t) will represent the velocity of the air in the tube at location x at time t. When no wave is present v(x,t) = 0 for all x. The Acceleration of Air in the TubeThe image below represents a thin hollow tube filled with air. The x variable measures position along the length of the tube.
From Newton's 2nd Law of Motion F = m ·Acceleration, so, the acceleration of the air between x and x+h is given by F / m, that is,
That is, a spatial pressure 'differential' causes the air in the tube to accelerate. The Time Derivative of PressureAir flows into the left side of the segment at x to x+h at the rate v(x,t)·A and flows out the right side at the rate v(x+h,t)·A. Thus
the total rate of the the air flowing into the segment is
This will produce a change in the pressure in the segment. First we convert the volume rate to a mass rate. From the ideal gas law the density of the
air is m / V = P / R·T , so the mass rate into the segment is
Now we will convert the mass rate into a pressure rate. From the ideal gas law, the ratio of pressure to mass in the segment is R·T / Vs, so we have
Note that A / Vs is 1/h. As h -> 0, the above equation becomes
That is, a spatial velocity 'differential' causes pressure to increase or decrease. The Second Time Derivative of PressureTaking the second partial derivative of pressure wrt time gives
Taking the partial derivative of acceleration wrt x gives
Noting that OK, Let's See What This Wave Equation Can DoWith the wave equation in hand, we can study the propagation of sound in air. We will stay with our 1-dimensional model of a thin hollow tube. Since the
differential equation for p is a second order equation, we'll need to specify initial values of p and We will generate a disturbance the left end of the tube (x = 0) by specifying p(0, t) as time progresses. We will use the method we used in CWT Vol. 2 Ch. 2 to compute the solution to the wave equation. We'll divide the length of the tube into short segments of length h, and
divide time into short interval of duration dt. Since the differential equation for p is second order we'll first calculate an estimate of All but three lines of this FREEMAT progam are programming details, but, we can't avoid them. We'll need arrays to store the values of p(0, h, 2h, 3h, .......) and dpdt(0, h, 2h, 3h, .......), so we have
The plot of p below represents the air pressure displacement from equilibrium in the tube after running the simulation for 0.25 seconds.
|