0% found this document useful (0 votes)
9 views5 pages

Lec10 Hyperbolic

The document discusses the wave equation as a model for the vibration of a string or rod, presenting a second-order linear differential equation. It outlines a numerical solution approach using an explicit scheme and provides a program for solving the hyperbolic PDE problem through discretization. The document emphasizes the importance of boundary conditions and initial values in the context of the wave equation.

Uploaded by

nadanasri007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views5 pages

Lec10 Hyperbolic

The document discusses the wave equation as a model for the vibration of a string or rod, presenting a second-order linear differential equation. It outlines a numerical solution approach using an explicit scheme and provides a program for solving the hyperbolic PDE problem through discretization. The document emphasizes the importance of boundary conditions and initial values in the context of the wave equation.

Uploaded by

nadanasri007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Continuation) Use the symbolic manipulation capabilities in Maple or Mathematica

o verify the general analytical solution of (1). Hint: See Problem 15.1.3.
Wave Equation (Hyperbolic Equation)
olic Problems @ 2
u
2
ve Equation Model Problem r u= 2
@t
wave equation with one space variable

∂ 2u ∂ 2u
Model problem in2one= dimension (1)
∂t ∂x2

ns the8vibration
2
of a string (transverse
2
vibration in a plane) or the vibration in a rod
@ @
>
tudinal
> vibration).
2 u(x,It t)
is an example
= @t2ofu(x,a second-order
t) linear differential equation of the
bolic>
@x
>
<type. If Equation (1) is used to model the vibrating string, then u(x, t) represents 1
flection at time t of a point on the string whose coordinate is x when theu(x, stringt)is = 2 [f (x + t) + f (x t)]
.
u(0, t) = u(1, t) = 0
>
>
>
o pose
: a definite model problem, we suppose that the points on the string have
>
inates x in theu(x, 0) 0 !=x ! 1f(see
interval (x)Figure 15.7). Let us suppose that at time t = 0,
flections satisfy equations u(x, 0) = f (x) and u t (x, 0) = 0. Assume also that the
of the string remain fixed. Then u(0, t) = u(1, t) = 0. A fully defined boundary-value

u 1
ut (x, 0) = 2 [f 0 (x) f 0 (x)] = 0

u(x, t)
x
0 x 1

Thursday, 6 February 20
Numerical Solution

@2 @2
@x2 u(x, t) = @t2 u(x, t) 15.2 Hyperbolic Pro

Explicit scheme: We can build up solutions in steps of time k, from t=0.


Here,
1 1 k 2
[u(x + h, t) 2u(x, t) + u(x h, t)] = 2 [u(x, t + k) 2u(x, t) + u(x,
ρ= t k)]
h2 k h2
Figure 15.10 shows the point (x, t + k) and the nearby points that enter into
u(x, t + k) = ⇢u(x + h, t) + 2(1 ⇢)u(x, t) + ⇢u(x h, t) u(x, t k) (x, t ! k)
k2
⇢= 2
h
(x " h, t) (x, t) (x ! h, t)

FIGURE 15.10
Wave equation:
Problem: when Explicit
t=0, how stencil last
to manage term on RHS (x, t " k)

Thursday, 6 February 20
The boundary conditions in Problem (2) can be written as
Problem: when t=0, how to manage last term on RHS ?

u(x, t + k) = ⇢u(x + h, t) + 2(1 ⇢)u(x, t) + ⇢u(x h, t) u(x, t k)


k2
⇢= 2
h

Solution: At t=0,

u(x, k) = ⇢u(x + h, 0) + 2(1 ⇢)u(x, 0) + ⇢u(x h, 0) u(x, k)

And, at t=0, the derivative u_t=0. Hence

1
[u(x, k) u(x, k)] = 0
2k

Eliminating u(x,-k),
1 (because u(x, 0) = f (x))
u(x, k) = ⇢ [f (x + h) + f (x h)] + (1 ⇢)f (x)
2

Thursday, 6 February 20
! Hyperbolic pde problem solved by discretization (f)

program hyperbolic
integer, parameter :: n = 10, m = 20
real, parameter :: h = 0.1, k = 0.05
real, dimension(0:n) ! :: u,v,w
integer! ! ! ! :: i,j
real! ! ! ! ! :: t, rho, x

u(0)=0.0; v(0)=0.0; w(0)=0.0; u(n)=0.0; v(n)=0.0; w(n)=0.0


rho = (k/h)**2
do i = 1,n-1
x = real(i)*h
w(i) = f(x)
v(i) = 0.5*( rho*(f(x-h) + f(x+h)) + 2.0*(1.0- rho)*f(x) )
end do
print*, " print j and u(i)"
do j = 2,m
do i = 1,n-1
u(i) = rho*(v(i+1) + v(i-1)) + 2.0*(1.0-rho)*v(i) - w(i)
end do
print "(I5,11F8.3)",j,(u(i),i = 0,n) function f(x)
do i = 1, n-1 real, intent(in):: x
w(i) = v(i) real :: pi
v(i) = u(i) pi = 4.0*atan(1.0)
end do f = sin(pi*x)
end do end function f
end program hyperbolic
Thursday, 6 February 20
Thursday, 6 February 20

You might also like