18
COMPUTATIONAL MODELING FOR ENGINEERING MECN 6040 Professor: Dr. Omar E. Meza Castillo [email protected] http://facultad.bayamon.inter.edu/omeza Department of Mechanical Engineering

Computational Modeling for Engineering MECN 6040

  • Upload
    tansy

  • View
    28

  • Download
    0

Embed Size (px)

DESCRIPTION

Computational Modeling for Engineering MECN 6040. Professor: Dr. Omar E. Meza Castillo [email protected] http://facultad.bayamon.inter.edu/omeza Department of Mechanical Engineering. Finite difference Methods for Hyperbolic problems. Wave Equation. Partial Differential Equations. - PowerPoint PPT Presentation

Citation preview

Page 1: Computational Modeling for Engineering MECN 6040

COMPUTATIONAL MODELING FOR ENGINEERINGMECN 6040

Professor: Dr. Omar E. Meza [email protected]

http://facultad.bayamon.inter.edu/omezaDepartment of Mechanical Engineering

Page 2: Computational Modeling for Engineering MECN 6040

FINITE DIFFERENCE METHODS FOR HYPERBOLIC PROBLEMS

Wave Equation

Page 3: Computational Modeling for Engineering MECN 6040

PARTIAL DIFFERENTIAL

EQUATIONS▪ Our study of PDE’s is focused on linear,

second-order equations

▪ The following general form will be evaluated for B2 - 4AC (Variables – x and y/t)

A2ux 2

B2uxy

C2uy 2

D0

Page 4: Computational Modeling for Engineering MECN 6040

B2-4AC Category Example

< 0 Elliptic Laplace equation (steady state with 2 spatial dimensions)

= 0 Parabolic Heat conduction equation (time variablewith one spatial dimension)

>0 Hyperbolic Wave equation (time-variable with onespatial dimension)

2u t 2

c 22ux 2

2ux 2

2uy 2

0

ut

2ux 2

PARTIAL DIFFERENTIAL

EQUATIONS

Page 5: Computational Modeling for Engineering MECN 6040

WAVE EQUATION

Mechanical vibrations of a guitar string, or in the membrane of a drum, or a cantilever beam are governed by a partial differential equation, called the Wave Equation.

To derive the wave equation we consider an elastic string vibrating in a plane, as the string on a guitar. Assume u(x,t) is the displacement of the string away from its equilibrium position u=0.

Page 6: Computational Modeling for Engineering MECN 6040

u(x,t)

x

u

T(x+Dx,t)

T(x,t)

x x+Dx

a

b

WAVE EQUATION

Page 7: Computational Modeling for Engineering MECN 6040

Newton’s Law: F=ma

Vertical:

where ρ is the mass density function of the string

Horizontal:

As we assume there is only vertical motion of the string

T(x+Dx,t)

T(x,t)

a

b

FVert T(x x)sin T(x,t)sin

ma x2ut 2

FHoriz T(x x)cos T(x, t)cos 0

WAVE EQUATION

Page 8: Computational Modeling for Engineering MECN 6040

Let

Then,

So, Fvert = ma implies, from the previous slide, that

Or,

T T(x x)cos T(x,t)cos

T(x x) T

cos, T(x, t)

T

cos

T

cossin

T

cossin x

2ut 2

T(tan tan) x2ut 2

WAVE EQUATION

Page 9: Computational Modeling for Engineering MECN 6040

Now, tan β is just the slope of the

string at x+Δx and tan a is the

slope at x.

Thus,

So,

T(x+Dx,t)

T(x,t)

a

b

tan ux xx

and tan ux x

T(ux xx

ux x

) x2ut 2

1

x(ux xx

ux x

) T

2ut 2

WAVE EQUATION

Page 10: Computational Modeling for Engineering MECN 6040

Now, take the limit as Δx -> 0, to get

This the Wave Equation in one dimension (x)

1

x(ux xx

ux x

) T

2ut 2

2ut 2

c 22ux 2

WAVE EQUATION

Page 11: Computational Modeling for Engineering MECN 6040

WAVE EQUATIONBOUNDARY CONDITIONS

Since the wave equation is second order in space and time, we need two boundary conditions for each variable. We will assume the string x parameter varies from 0 to L.

Typical set-up is to give boundary conditions at the ends of the string in time:

u(0,t) = 0 u(1,t) = 0

and space initial conditions for the displacement and velocity:

u(x,0) = f(x) ut(x,0)=g(x)

Page 12: Computational Modeling for Engineering MECN 6040

00=

)()0,(

)()0,(

0),(

0),0(

02

xgxu

xfxu

tLu

tu

tLxucu

t

xxtt

WAVE EQUATIONBOUNDARY CONDITIONS

Page 13: Computational Modeling for Engineering MECN 6040

ONE DIMENSIONALWAVE EQUATION

▪ We will solve this equation for x and t values on a grid in x-t space:

t

x00 x ix

nxh /1

jt

00 t

mTtk /

mtT

1nx

Approximatesolution

uij=u(xi, tj) at grid points

Page 14: Computational Modeling for Engineering MECN 6040

FINITE DIFFERENCE APPROXIMATION

▪ To approximate the solution we use the finite difference approximation for the two derivatives in the wave equation. We use the centered-difference formula for the space and time derivatives:

),(),(2),(),(

),(),(2),(1

),(

112

22

112

jijijijixx

jijijijitt

txutxutxuh

ctxuc

txutxutxuk

txu

Page 15: Computational Modeling for Engineering MECN 6040

FINITE DIFFERENCE APPROXIMATION

▪ Then the wave equation (utt =c2 uxx ) can be approximated as

Or,

Let p = (ck/h) Solving for ui,j+1 we get:

1

k 2ui, j 1 2ui, j ui, j1 c

2

h2ui 1, j 2ui, j ui1, j

ui, j 1 p2ui1, j 2(1 p2)uij p

2ui1, j ui, j 1

ui, j 1 2ui, j ui, j1 k2c 2

h2ui 1, j 2ui, j ui1, j

Page 16: Computational Modeling for Engineering MECN 6040

ONE DIMENSIONAL WAVE EQUATION

▪ Note that this formula uses info from the j-th and (j-1)st time steps to approximate the (j+1)-st time step:

t

x

1ix ix 1ix

1jt

jt

mtT

00 t

00 x 1nx

Page 17: Computational Modeling for Engineering MECN 6040

ONE DIMENSIONAL WAVE EQUATION

▪ The solution is known for t=0 (j=0) but the formula uses values for j-1 , which are unknown. So, we use the initial condition ut(x,0)=g(x) and the centered difference approximation for ut to get

▪ At the first time step, we then get

)(22

)()0,( 1,1,1,1,

iiiii

iit xkguuk

uuxgxu

))(2()1(2 1,0,12

02

0,12

1, iiiiii xkguupupupu

Page 18: Computational Modeling for Engineering MECN 6040

ONE DIMENSIONAL WAVE EQUATION

▪ Simplifying, we get

▪ So,

)(5.0)1(5.0 0,12

02

0,12

1, iiiii xkgupupupu

1,,1

22,1

21,

0,12

02

0,12

1,

)1(2

)(5.0)1(5.0

jijiijjiji

iiiii

uupupupu

xkgupupupu