• Keine Ergebnisse gefunden

Finite Elements: 1D acoustic wave equation

N/A
N/A
Protected

Academic year: 2021

Aktie "Finite Elements: 1D acoustic wave equation"

Copied!
11
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Finite Elements: 1D acoustic wave equation

 Helmholtz (wave) equation (time-dependent)

 Regular grid

 Irregular grid

 Explicit time integration

 Implicit time integraton

 Numerical Examples

Scope: Understand the basic concept of the finite element

method applied to the 1D acoustic wave equation.

(2)

Acoustic wave equation in 1D

How do we solve a time-dependent problem such as the acoustic wave equation?

where v is the wave speed.

using the same ideas as before we multiply this equation with

an arbitrary function and integrate over the whole domain, e.g. [0,1], and after partial integration

f u

v

t

u   

2 2

dx f

dx u

v dx

u

j j j

t

 

1

0 1

0 2 1

0

2

  

.. we now introduce an approximation for u using our previous basis functions...

(3)

Weak form of wave equation

) ( )

~ (

1

x t

c u

u

N i

i

i

together we obtain

) ( )

~ (

1 2 2

2

u u

N

c t

i

x

i

i t

t

t

 

note that now our coefficients are time-dependent!

... and ...

  

 

 

  

 

 

 

1

0 1

0 2

1

0 2

j j

i

i i

j i

i i

t

c   dx v c   dx f

which we can write as ...

(4)

Time extrapolation

  

 

 

  

 

 

 

1

0 1

0 2

1

0 2

j j

i

i i

j i

i i

t

c   dx v c   dx f

... in Matrix form ...

g c

A v c

M

T

 

2 T

M A b

... remember the coefficients c correspond to the

actual values of u at the grid points for the right choice of basis functions ...

How can we solve this time-dependent problem?

stiffness matrix mass matrix

(5)

Time extrapolation

... let us use a finite-difference approximation for the time derivative ...

g c

A v c

M

T

 

2 T

... leading to the solution at time tk+1:

g c

A dt v

c c

M

T

c

k k

 

T k

 

 

2

2

1

1

2

 

1

2 2

1

1

( )

( ) 2

T

T k

k

k

k

M g v A c dt c c

c

we already know how to calculate the matrix A but how can we calculate matrix M?

(6)

Mass matrix

  

 

 

  

 

 

 

1

0 1

0 2

1

0 2

j j

i

i i

j i

i i

t

c   dx v c   dx f

... let’s recall the definition of our basis functions ...

1

0

dx M

ij

i

j

i i

i

i i

i

x x x

elsewhere h x h for

x

x h

h for x

x  

 

 

, ~

0

0 ~ 1 ~

~ 0

~ 1

~ ) (

1 1

i=1 2 3 4 5 6 7 + + + + + + + h

1

h

2

h

3

h

4

h

5

h

6

... let us calculate some element of M ...

(7)

Mass matrix – some elements

3 3

1

1

0

2

0

2

1 1

0

1

i i

h

i h

i i

i ii

h h

h dx dx x

h dx x

M

i i

 

 

 

 

 

 

elsewhere h x h for

x

x h h for

x

x i

i

i i

i

0

0 ~ 1 ~

~ 0

~ 1

~) (

1 1

i=1 2 3 4 5 6 7 + + + + + + + h

1

h

2

h

3

h

4

h

5

h

6

Diagonal elements: Mii, i=2,n-1

hi xi ji

hi-1

(8)

Matrix assembly

% assemble matrix Mij

M=zeros(nx);

for i=2:nx-1, for j=2:nx-1, if i==j,

M(i,j)=h(i-1)/3+h(i)/3;

elseif j==i+1 M(i,j)=h(i)/6;

elseif j==i-1 M(i,j)=h(i)/6;

else

M(i,j)=0;

end end end

% assemble matrix Aij

A=zeros(nx);

for i=2:nx-1, for j=2:nx-1, if i==j,

A(i,j)=1/h(i-1)+1/h(i);

elseif i==j+1

A(i,j)=-1/h(i-1);

elseif i+1==j

A(i,j)=-1/h(i);

else

A(i,j)=0;

end end end

Mij Aij

(9)

Numerical example

(10)

Implicit time integration

... let us use an implicit finite-difference approximation for the time derivative ...

g c

A v c

M

T

 

2 T

... leading to the solution at time tk+1:

g c

A dt v

c c

M

T

c

k k

 

T k

 

  

1 2

2

1

1

2

2 2

1

2

1

1

2

T

T

T

k

k

M v dt A gdt M c c

c

How do the numerical solutions compare?

(11)

Summary

The time-dependent problem (wave equation) leads to the introduction of the mass matrix.

The numerical solution requires the inversion of a system matrix (it may be sparse).

Both explicit or implicit formulations of the time-dependent part are possible.

The time-dependent problem (wave equation) leads to the introduction of the mass matrix.

The numerical solution requires the inversion of a system matrix (it may be sparse).

Both explicit or implicit formulations of the time-dependent part are possible.

Referenzen

ÄHNLICHE DOKUMENTE

We study an adaptive finite element method for the p-Laplacian like PDE’s using piecewise linear, continuous functions.. The error is measured by means of the quasi-norm of Barrett

Indeed, it even coincides with the solution trajectory corresponding to an optimization horizon of length 2L/c = 2 which is needed in order to show finite time controllability..

this is the geometrical spreading for spherical waves, the amplitude decays proportional to 1/r.. If we had looked at cylindrical waves the result would have been that the

Scope: Understand the basic concept of the finite element method applied to the 1D acoustic wave equation.... Acoustic wave equation

5) Computational seismology: You want to simulate wave propagation on a discrete regular grid with physical dimensions (1000km) 3 with a dominant period of 10s.. The maximum

These are the reflection coefficients for a plane P wave incident on a free surface, and reflected P and SV waves.. SH example

Some methods for evaluating the characteristic exponents in connection with Newton's iteration are applied for solving the eigenvalue problem related to the