You are on page 1of 24

ACOUSTIC OSCILLATION IN A TWO-DIMENSIONAL PRESSURE FIELD VIA

THE FINITE ELEMENT METHOD WITH TRIANGULAR ELEMENTS Revision B

By Tom Irvine
Email: tomirvine@aol.com

October 19, 2009


_______________________________________________________________________

Introduction
The purpose of this tutorial is to derive for a method for analyzing the acoustic pressure
oscillation in a two-dimensional pressure field using the finite element method. The
method is based on Reference 1.

Let p(x, y, t) represent the pressure in the field as a function of space and time.

The free, transverse vibration of the pressure field is governed by the equation:

  2 2   2
c2  p ( x , y, t )  p ( x , y, t )   p ( x , y, t ) (1)
  x 2  y2   t 2

Equation (1) is independent of the boundary conditions, which are applied as constraint
equations.
Assume that the solution of equation (1) is separable in time and space.

p( x, y, t )  P( x, y) f ( t ) (2)

  2 2  2
c2  P( x , y) f ( t )  P( x , y) f ( t )   P ( x , y)f ( t ) (3)
  x 2  y2   t2

 2 2   2 f (t)
c2 f (t )    P( x , y)  P ( x , y) (4)
2  y2   t2
  x 

The equation may be restated as

1  2 2  1 d 2 f (t )
c2    P ( x , y)  (5)
P ( x , y)   x 2  y 2  f (t ) d t 2
 

1
The left-hand side of equation (5) depends on space only. The right hand side depends
on time only. Both space and time are independent variables. Thus equation (5) only has
a solution if both sides are constant. Let  2 be the constant.

1  2 2  1 d 2 f (t )
c2    P( x , y)    2 (6)
P ( x , y)   x 2  y 2  f (t) d t 2
 

Equation (6) yields two independent equations.

 2 2  2
   P ( x , y)  P( x , y)  0 (7)
2  y2  c2
  x 

d2
f ( t )  2 f ( t )  0 (8)
d t2

Equation (7) is a homogeneous, second order, partial differential equation.

The weighted residual method is applied to equation (7). This method is suitable for
boundary value problems. An alternative method would be the energy method.

There are numerous techniques for applying the weighted residual method. Specifically,
the Galerkin approach is used in this tutorial.

The differential equation (7) is multiplied by a test function ( x, y) . Note that the test
function ( x , y) must satisfy the homogeneous essential boundary conditions. The
essential boundary conditions are the prescribed values of p and its first derivative.

The test function is not required to satisfy the differential equation, however.

The product of the test function and the differential equation is integrated over the area
domain. The integral is set equation to zero.

  2 2  2 
 
A (x, y)   2  2  P( x , y)  P( x , y)  dA  0 (9)
   x  y  c 2 

The test function ( x, y) can be regarded as a virtual pressure. The differential equation
in the brackets represents an internal force. This term is also regarded as the residual.

2
Thus, the integral represents virtual work, which should vanish at the equilibrium
condition.

Use the product rule for differentiation

  P   P 2 P
      (10)
x  x  x x  2x

2 P   P   P
     (11)
 2x  x   x  x x

Similarly

2 P   P  P
     (12)
 2y  y   y  y y

    P     P    P  P 
A   
 
 

 

 dA   
A
 dA
 x x y y 
 
x x  y  y 

 2 
 
 c 2  A
( x, y) P( x, y)dA  0
 
(13)

Green’s theorem

    P   P
A   
 
 dA     cos  d
  x 
(14)
 
x x 

    P   P
A     dA     sin  d

(15)
 y   y   y 

3
where

 = element boundary

  angle relative to the normal vector that passes the through the element centroid

  P   P 
   cos     sin  d
  x   y  

  P  P   2 
 
 A   x  x  y  y 
  dA 
 c 2  A
( x , y) P( x, y)dA  0
 
(16)

The essence of the Galerkin method is that the test function is chosen as

( x, y)  P( x, y) (17)

Thus
  P   P 
 P    cos     sin  d
  x   y  

   P   P    P   P    2 
 A           dA   
 c 2  A
P( x, y) 2 dA  0
  x  x   y  y    
(18)

The boundary condition for an open boundary is that

P=0 (19)

The boundary condition for a closed boundary is that

P
=0 (20)
n
In either case,

  P   P  
P    cos     sin   0 (21)
  x   y  

4
Thus

   P   P    P   P    2 
 A           dA  


  P(x, y) 2 dA  0
  x  x   y  y  
2
c 
A

(22)

Develop interpolation functions for a triangular element as shown in Figure 1.

The interpolation polynomial is

 ( x , y)  1   2 x   3 y (23)

The nodal conditions are

 (X i , Y i )   i (24)

 (X j , Y j )   j (25)

 (X k , Y k )   k (26)
By substitution,

 i  1   2 X i   3 Y i (27)

 j  1   2 X j   3 Y j (28)

 k  1   2 X k   3 Y k (29)

The coefficients can be calculated via the following equation in matrix form.

1 X i Y i   1    i 
 
1 X j Y j   2     j 
1 X k Y k   3   k 

(30)

5

i
 ( x , y)  1   2 x   3 y

y k

x
 j

(Xi,Yi)
k

(Xk,Yk)

(Xj,Yj)

Figure 1.

6
1 X i Yi 

d e t 1 X j

    
Y j   X jY k  X k Y j  X i Y k  X k Y i  X i Y j  X jY i 
1 X Y k 
 k
(31)

    
2 A  X jY k  X k Y j  X i Y k  X k Y i  X i Y j  X jY i 
(32)

1 X i Yi 
 
d e t 1 X j Y j   2A
1 X Y k 
 k
(33)

where A is the area of the triangle.

 i Xi Yi
 1   
1    det   j Xj Y j
 2A   k Xk Y k 

(34)

1 

 1 
  
  i X j Y k  X k Y j   j X kY i  X i Y k    k  X i Y j  X j Y i  
 2A 

(35)

7
1  i Yi
 1   
 2    det 1  j Y j
 2A  1  k Y k 

(36)

 1 
 2       j Y k   k Y j     i Y k   k Y i     i Y j  jY i  
 2A 
(37)

 1 
 2       
 i Y j Y k   j  Y k  Y i    k Y i  Y j 
 2A 
(38)

1 X i i
 1   
 3    det 1 X j  j
 2A  1 X k  k 

(39)

 1 
 3      X j k  X k  j    X k  i  X i  k    X i  j  X j i  
 2A 
(40)

 1 
 3     
i XkX j    jX i  X k    k  X j  X i  
 2A 
(41)

8
 ( x , y)

 1 
     i  X jY k  X k Y j    j  X kY i  X iY k    k  X i Y j  X j Y i  
 2 A  

 1 
 x    
 i Y j Y k    j  Y k  Y i    k  Y i  Y j  
 2 A  

 1 
 y    
 i Xk X j  
 jXi  Xk   k  X j  X i  
  2 A  

(42)

 ( x , y) 

 1 
 i      X j Y k  X k Y j   x  Y j Y k   y X k  X j   
  2A  
 1 
  j      X k Y i  X i Y k   x  Y k  Y i   y X i  X k   
  2A  
 1 
  k      X i Y j  X j Y i   x  X i Y j  X j Y i   y  X j  X i   
  2A  
(43)

 ( x , y)  N i  i  N j j  N k  k (44)

where

 1 
N i       X j Y k  X k Y j   x  Y j Y k   y X k  X j    (45a)
  2A  

 1 
N j       X k Y i  X i Y k   x  Y k  Y i   y X i  X k    (45b)
  2A  
 1 
N k       X i Y j  X j Y i   x  X i Y j  X j Y i   y  X j  X i    (45c)
  2A  

9
k

L3 = 1

L2 L1

j
i L3

L3 = 0

L2 = 1 L1 = 0
L2 = 0 L1 = 1

b
h
L1

B s

j
i

Figure 2.

A natural coordinate system is formed by defining three length ratios L1, L2, and L3 , as
shown in Figure 2.

10
Furthermore, each coordinate is the ratio of a perpendicular distance from one side s to
the altitude h of that same side, as shown in Figure 2. Furthermore, each coordinate
varies from zero to 1.

b
h
A2
A1
B

A3
j
i
s

y Formatted: Font: 14 pt

x Formatted: Font: 14 pt

0 Formatted: Font: 14 pt

Figure 3.

Note that
L1 = s / h (46)

The area of the complete triangle is A and is given by

A=bh/2 (47)

11
The area of triangle A1 is

A1 = b s / 2 (48)

The following ratio can be formed.

A1 s
 (49)
A h

A1
 L1 (50)
A
Similarly,
A2
 L2 (51)
A

A3
 L3 (52)
A

Note that
A1  A 2  A 3  A (53)

1
A1  A 2  A 3   1 (54)
A

Thus
L1  L 2  L 3  1 (55)

The three coordinates are not independent. Thus the location of a point can be specified
using two of the coordinates.

2 A1
L1  (56)
2A

2A 1  2 A L 1 (57)

 b h  s 
2A 1  2    (58)
 2  h 

12
2A 1  b s (59)

Recall

  
2 A  X jY k  X k Y j  X i Y k  X k Y i  X i Y j  X jY i   (60)

Thus


2 A1  X j Y k X kY j   x Y k  X k y  x Y j  X j y (61)

2 A1  X j Y  k  X kY j   x Y j  Y k   y X k  X j  (62)

Thus

L1 
1
2A
 X j Y k  X k Y j   x Y j  Y k   y X k  X j   (63)

Recall

 1 
N i       X j Y k  X k Y j   x  Y j  Y k   y X k  X j    (64)
  2A  

Thus
L1 = N1 (65)

Similarly,
L2 = N2 (66)

L3 = N3 (67)

The area coordinates are identical to the shape functions.

The shape functions may be evaluated using a formula from Eisenberg and Malvern.

13
a b c a ! b! c!
A L1 L 2 L 3 dA 
a  b  c  2!
2A (68)

Recall

   P   P    P   P    2 
 A           dA  


  P(x, y) 2 dA  0 (69)
  x  x   y  y  
2
c 
A

Let
P ( x , y)  L T p (70)

 A





 x
  
L T p  
  x
  
L T p   
  y
 
 
L T p  
  y
 
L T p  dA

  

 2 
 
 c 2  A
LT  
p LT 
p dA  0
 
(71)

 pT A




 x
L     x L T     y  L    y L T   dA p
 

 2 
  pT
 c2  A L  LT  dA p  0
 
(72)

14
 A




     x L T     y L
 x
L    y L T   dA
 

 2 
 
 c 2  A
L  LT  dA  0
 
(73)

  2  
det  K   M 0 (74)
  2  
c 

where

K A





 x
L     x L T     y L    y L T   dA
 
(75)

M A L LT  dA (76)

 L1  L1 L 2 L3 
L 
M  A  
2 dA (77)
 L3 

L 2 L1L 2 L1L3 
 1 
M   
A 
L2 2 L 2L3  dA

(78)

 L3 2 

Note that the matrix in equation (78) is represented in upper triangular form since it is
symmetric.

15
A L1
1 1 1! 1! 0!
L 2 dA  2A (79)
4!

A L1
1 1 A
L 2 dA  (80)
12

A L1
2 2! 0! 0!
dA  2A (81)
4!

A L1
2 2A
dA  (82)
12

2 1 1 
A 
M  2 1  (83)
12 
 2


Ni  
 1 
    X j Y k  X k Y j   x  Y j  Y k   y X k  X j    (84)
  2A  


x
 1 
N i     
 Y j  Y k   (85)
  2A  


y

Ni  
 1 
  
 X k  X j   (86)
  2A  

 1 
N j       X k Y i  X i Y k   x  Y k  Y i   y X i  X k    (87)
  2A  

16
   1  
Nj   Y k  Y i   (88)
x   2A  


y

Nj
 1 
  
 X i  X k   (89)
  2A  


Nk  
 1 
    X i Y j  X j Y i   x  Y i  Y j   y  X j  X i    (90)
  2A  

 

x
Nk  
 1 
 
 Y i  Y j   (91)
  2A  

 

y
Nk 
 1 
 
 X j  X i   (92)
  2A  

        
K A    x N  
 x
N T    N
  y
  N T   dA
 y 
(93)

         
K A    x N  
 x
N T   dA 


A  
 y
N  
 y
N T   dA


(94)

       
K  
 x
N  
 x
N T 
 A

dA  
 y
N  
 y
N T 
 A
dA (95)

       
K  A  N   N T   A  N   N T  (96)
 x  x   y  y 

17
K

     
 Ni        Ni      
 x    x i   y    y i
N Nj Nk  N Nj Nk 
x x  y y 
 
A N  A N 
 x j   y j 
   
 Nk   Nk 
  x    y 

(97)

      
 Ni Ni Ni Nj Ni Nk 
 x x x x x x 
   
KA Nj Nj Nj Nk 
 x x x x 
   
 Nk Nk 
 x x 

      
 Ni Ni Ni Nj Ni Nk 
y y y y y y 
   
A  Nj Nj Nj Nk 
 y y y y 
   
 Nk Nk 
 y y 
(98)

The global matrices can thus be assembled from equations (98) and (83).

References

1. L. Segerlind, Applied Finite Element Analysis, Wiley, New York, 1984.

2. K. Bathe, Finite Element Procedures in Engineering Analysis, Prentice-Hall, New


Jersey, 1982.

18
APPENDIX A

Example 1

4 3

1 2

Figure A-1. FE Model

The two-dimensional enclosure has closed boundaries. The dimensions are 20 inch x 10
inch. The model consists of four triangular elements with five nodes.

The global mass matrix is

16.667 4.167 0 4.167 8.333 


 16.667 4.167 0 8.333 

M 16.667 4.167 8.333 
 
 16.667 8.333 
 33.333

19
The global stiffness matrix is

1.25 0.375 0  0.375  1.25


 1.25  0.375 0  1.25

K 1.25 0.375  1.25
 
 1.25  1.25
 5.00 

Each matrix is shown in upper triangular form due to symmetry.

The mass matrix carries a unit of inch^2. The stiffness matrix is non-dimensional.

The generalized eigenvalue problem is

det K   M  0 (xx)

where

 
 2 (xx)
 c

c = speed of sound

c = 13504 in/sec

  2f

The eigenvalues and eigenvectors are found using the Jacobi method in Reference 2.

The natural frequency results are given in Table A-1. The pressure mode shapes are
given in Table A-2.

20
Table A-1. Enclosure 20 inch x 10 inch, FE Results, Four Element Model
FE Model Theoretical
Mode  / c fn(Hz) fn(Hz)
Error

1 0.000 0.000 0 0 0

2 0.030 0.173 372 336 10.7 %

3 0.120 0.346 745 672 10.9 %

4 0.150 0.387 832 672 23.8 %

5 0.450 0.671 1442 751 92.0 %

Note that the error calculation is made with respect to the theoretical value.

Table A-2. Normalized Pressure Mode Shapes, FE Model

Node Mode 1 Mode 2 Mode 3 Mode 4 Mode 4

1 0.447 -0.500 -0.500 -0.500 -0.354

2 0.447 0.500 -0.500 0.500 -0.354

3 0.447 0.500 0.500 -0.500 -0.354

4 0.447 -0.500 0.500 0.500 -0.354

5 0.447 0.000 0.000 0.000 0.707

The FE model mode shapes for the second and third modes are plotted in Figures A-2 and
A-4, respectively. The theoretical mode shapes would have a cosine waveform.

21
Figure A-2.

Figure A-3.

22
APPENDIX B

Example 2

The 20 inch by 10 inch space is analyzed again, with 64 elements and 45 nodes. The
model is shown in Figure B-1. The first, ten natural frequencies are shown in Table B-1.
The agreement with the respective theoretical values is very good. The fifth mode is
shown in Figure B-2.

Table B-1. Enclosure 20 inch x 10 inch, FE Results, 64 Element Model

Mode FE Model FE Model FE Model Theoretical Error


 . / c fn (Hz) fn (Hz)
1 0.000 0.000 0 0 0
2 0.025 0.158 340 336 1.2 %
3 0.104 0.322 692 672 3.0 %
4 0.104 0.322 692 672 3.0 %
5 0.134 0.366 785 751 4.5 %
6 0.226 0.475 1021 950 7.5 %
7 0.249 0.499 1071 1008 6.3 %
8 0.391 0.625 1344 1211 11.0 %
9 0.476 0.690 1483 1344 10.3 %
10 0.478 0.691 1485 1344 10.5 %

23
Figure B-1.

Figure B-2.

24

You might also like