ch4

Share Embed Donate


Short Description

ch4...

Description

Sem II 14/15

BEE 31602

CHAPTER 4  –  ORDINARY  ORDINARY AND PARTIAL DIFFERENTIAL EQUATION

ORDINARY DIFFERENTIAL EQUATION (ODE)

4.1

INITIAL-VALUE PROBLEM (IVP)

Q1

Consider the following initial-value problem (IVP)

dy dx Solve the IVP for

Q2

3 x2 y, y(0) 1. 

0   x  0.6 and h  0.2  by

using Euler’s method and method and RK4 method.

Consider the following initial-value problem (IVP)

(1   x2 ) Solve the IVP for

Q3



dy dx



xy  0, y(2)  5.

2   x  2.3 and h  0.1  by

using Euler’s Euler’s method and method and RK4 method.

Solve the following ordinary differential equation dy dx

with uniform step size

h





 y

0.1  over

 x ,

 2

 y (0)

1

 

interval [0, 0.3] by using Euler’s method and RK4

method.

Q4

Given an initial-value problem (IVP) as follows

dy dx

 1.2 y 

7e  0.3 x , y(0)  3.

Solve the IVP by using Euler’s method at

 x  0 (0.5) 2.

Sem II 14/15

BEE 31602

Q5

The concentration of a chemical in a batch reactor can be modeled by the following differential equation dC 

k1C 



1  k2C

dt

,

 

(0)  0.8. C (0

Find a numerical solution for this problem at h

Q6



0.5  by

with

k1



1, k 2



0.3  and step length,

using Euler’s method and classical and classical fourth-order Runge-kutta method.

Velocity of a falling object can be modeled mod eled as the following initial-value problem (IVP)

dv dt where

v



was at t  



cd  m

v2



g

, v(0)  20

 velocity of the falling object (m/s),

gravity (9.81 m/s2),

Q7

t   1  s

v  20  m/s

m



with

 mass (kg) and

cd 



0.225 .

cd 



t    time

(s),

 g 



 acceleration due to

 drag coefficient (kg/m). Initially, the object

Calculate the velocity for a falling 5-kg 5-k g object at

method. 0 ( 0.1) 0.1) 0.5 s by using Euler’s method.

A voltage source,  E (t )  is supplied to an electrical circuit with inductance  L  and a resistance  R . If the switch is closed at t   0  s, the current  I (t )  will satisfy the following initial-value problem (IVP)  L

d  dt 

I (t )  RI (t )  E (t ) ,

I (0)  0.

Parameter values are given as  L 50  H,  R  20   and  E (t )  10  V. Estimate the value of the current at t   0 (1) 5 s by using Euler’s method. 

Sem II 14/15

BEE 31602

4.2

BOUNDARY-VALUE PROBLEM (BVP)

Q8

Given the boundary-value problem (BVP)  x  4 x  sin t  , 0  t   1

with conditions  x(0) 0  and  by taking t  h  0.25 . 

Q9

(1)

 x



0 . Solve the BVP by using finite difference method

Given the boundary-value problem (BVP) (BVP)

d2y dx 2 with conditions  y (0)  by taking  x  0.5.

Q10

dy dx

  x 

0,

0 x 2

0  and  y (2) 1.  Solve the BVP by using finite-difference method 

Solve the boundary-value problem (BVP),  y  xy  3 y  11x  with conditions and  y (1) 2  where h 0.25 by using finite-difference method. 

Q11



4

 y(0)



1



The boundary-value problem (BVP) for the steady-state temperature in a rod of length 2 m is represented as follows 2

d T  dx

2



0.1T



0,

T (0)



20 200 0 C,

T ( 2)

Approximate the temperature, T    throughout the rod for difference method.



100 0 C .

 

  x  h  0.5   by

using finite-

Sem II 14/15

BEE 31602

Q12

A heated rod with a uniform heat source can be modeled with the Poisson equation,

d 2T   

dx 2

 f ( x) .

Given the heat source,  f ( x) 25   and the boundary conditions, T ( x 0) 40 40   and T ( x 10) 200 .  Solve for the temperature distribution with h   x  2.5  by using finitedifference method. 



Q13







The position of a falling object is governed by the following boundary-value problem (BVP) 2

d x dt 2



c dx

  g 

m dt  

0

,

for 0  t   12 ,

where boundary conditions are  x ( 0 ) 0  and  x (12) (12) 500.  Given that the parameter values are c  a first-order drag coefficient (12.5 kg/s), m  mass of the falling object 







(50 kg)   and  g   gravitational acceleration ( 9.81 m/s2 ).  Approximate the position of the falling object,  x (m)  for h  3  by using finite-difference method. 

Q14

A thin rod of length, l   is moving in the  xy-plane. The rod is fixed with a pin on one end and a mass at the other end. This system is represented in the form of boundary-value  problem (BVP) as follows  (t ) 

 g  l 

 (t )  0 ,

for

0  t   0.4 ,

where boundary conditions are   (0)  0  and   (0.4 (0.4))  1 . The parameter values gravitation tional al force force (9.81 m/s2 )  and l   0.9  m. Approximate the angle are given as  g  gravita (in radian) for h 0.1  by using finite-difference method. 



 

Sem II 14/15

BEE 31602

PARTIAL DIFFERENTIAL EQUATION (PDE)

4.3

Heat equation (explicit finite-difference method)

Q15

Given the heat equation u t

2

 0.9

 u x

2

, 0   x  1,

with the boundary conditions, u(0, t )



t  

u (1, t )   1   for 

( ,0) e (1 )   for 0   x  1 . Find u( x, 0.01 0.01))   and difference method with  x  h  0.2. u x

Q16

x



0

x



t   0 ,

and the initial condition,

( , 0.02 0.02))   by using explicit finite-

u x

Given the heat equation u( x, t )

2



t 

2

 u( x, t )  x

2

, 0   x  2,





0,

with the boundary conditions u (0, t )



u (2, t )



0,

and the initial condition ( ,0)

u  x



sin(  x).

Find u ( x, 0.3 0.3)  by using explicit finite-difference method with

 x  0.5  and t   0.3.

Sem II 14/15

BEE 31602

Q17

Consider the heat conduction equation  t

where

 

T ( x, t )   

 is thermal diffusity





2

x

2

T ( x, t ),

10,  since

0  x  10,

 

c



2

t   0 ,

.

Given the boundary conditions, T (0, t )



0,

T (10, t )  



100

and initial condition, T ( x,0)



x

2

.

By using explicit finite-difference method, find intervals on the  x coordinate.

Q18

T ( x, 0.05 0.055) 5)   and

0.11)) with 5 grid T ( x, 0.11

The temperature distribution u( x, t )  of one dimensional silver rod is governed by the heat equation u

2

  

t

with

 

2

2

 u x

2

 is thermal diffusity diffusity =1.71. =1.71.

Given the initial condition, 0   x  2,  x, 4   x, 2   x  4.

( ,0)  

u  x

and boundary conditions, u (0 , t )



t,

u (4, t )



t

2



Find the temperature distribution of the rod with 0  t   0.4  by using explicit finite-difference method.

 x  h  1  

and

t  k   0.2  

for

Sem II 14/15

BEE 31602

4.4

Wave equation (finite-difference method)

Q19

Let u ( x, t )  be the displacement of uniform wire which is fixed at both ends along at time t   . The distribution distribution of u( x, t )  is given by the wave equation 2

 u t 

2

( , 0)



sin    x ,

u t 

4

 x

2

,

( x, 0)  0  for

0   x  1 , 0  t   0.5



0

u (1, t ) x

 by using finite-difference method with

Q20

-axis

2

 u

with the boundary conditions u(0, t ) u  x

 x

1.



0  and the initial conditions

Solve the wave equation up to level

t   0.2

 x  h  0.25  and t   k   0.1

Let  y ( x, t )  denotes displacement of a vibrating string. If T   is the tension of the string,    is the weight per unit length and  g   is acceleration due to gravity, then  y  satisfies the equation

 2 y  Tg   2 y    t 2      x 2

,

0   x  2 , t   0 .

Suppose a particular string with 2 m long is fixed at both ends. By taking T  1.5 N, 2   0.01   kg/m and  g  10 m/s , use finite-difference method to solve for  y   up to second level. 





The initial conditions are

 0.5 x , 0  x  1   1 0 . 5 , 1 2  x x    

 y ( x , 0 )   

Perform all calculations with

h   x  0.5  m

and

and

 y  t 

( x , 0 )  x 2  2 x .

k   t   0.01  s.

Sem II 14/15

BEE 31602

Q21

The air pressure

u ( x, t )

in an organ pipe is governed by the wave equation 2

 u t

2

2



1  u  

2

x

2

0   x  l ,

,

t   0,

where l   is the length of the pipe and    is a physical constant. If the pipe is closed at the end where  x l  , the boundary conditions are 

u (0, t )  0.9

Assume that

 



and

u(l, t)  0.9

for

0  t  0. 2.

1, l  0.5 and the initial conditions are

u ( x, 0)



 0.9

u

cos (2   x) an and

t 

( x, 0)  0

for

0

x

 0.5.

Approximate the pressure for the closed-pipe by using finite-difference method with h   x  0.1  and k   t   0.1.

Q22

The longitudinal vibration of a bar with the length of l   m is governed by c

2



2



 x

with

c

 E  

, where 



2





2

  2

t 

  ( x, t )  is the axial displacement,

 E 

is Young’s modulus and

       is

the mass density of the bar. The boundary conditions and the initial conditions are given as follows,

 (0, t )    (l , t )  0  for  ( x,0)  0   and

 ( x,0) t 

0  t   0.04

  x  

for 0  x  20.

Determine the variation of the axial displacement of the bar by using finite-difference method with the following data: 6  E     30  10 ,     0.264 , l   20  m,  x  h  5  and

t   k   0.02.

BEE 31602

PARTIAL DIFFERENTIAL EQUATION (PDE)

4.3

Heat equation (explicit finite-difference method)

Q15

Refer to class note

Q16

Sem II 14/15

Sem II 14/15

BEE 31602

Q17 t 0.11

0.055

T 0,2 0,2

T 1,2 1,2

T 2,2 2,2

T 3,2 3,2

T 4,2 4,2

T 5,2 5,2

T 0,1 0,1

T 1,1 1,1

T 2,1 2,1

T 3,1 3,1

T 4,1 4,1

T 5,1 5,1

T 2,0 2,0

T 3,0 3,0

T 4,0 4,0

T 5,0 5,0

T 0,0 0,0 T 1,0 1,0

2

0  t

T ( x, t )   

T t

Ti , j 1  Ti, j k Ti , j 1  Ti, j 0.055

Ti , j 1  Ti, j



 x 4



 10

 10

T ( x, t ),

2



0  x  10,



x

2

Ti1, j  2Ti, j  Ti1,  j h2 Ti1, j  2Ti, j  Ti1,  j 2

 0.138

T

i 1, j

2



 2Ti, j  Ti1, j 

0.138Ti



1 

0.138Ti





0.138Ti

1,



0.138 A  0.724B  0.138C 



Ti , j

1

t   0

2



Ti, j

10

8

2

x

 10

6



0.276Ti, j



0.138T i 1, j

1, j 

0.276Ti , j



0.138Ti

j 

0.724Ti, j



0.138Ti

1, j



1, j 



1,

j

Ti , j

 

 

1 = T i,j+1 i,j+1

0.138 (A)

0.724 T i-1,j i-1,j

(B)

0.138 T i,j i,j

(C)

T i+1,j i+1,j

Sem II 14/15

BEE 31602

t

T 0,2

T 1,2

T 2,2

T 3,2

6.056

18.208

38.208

66.056

100

T 2,1

T 3,1 3,1

T 4,1

T 5,1 5,1

5.104

17.104

37.104

65.104

100

T 1,0

T 2,0

T 3,0

T 4,2

T 5,2

0.11 0

T   1,1 1,1

T 0,1

0.055 0 T 0,0

0

2 0

Q18

4 4

6 16

T 4,0

8 36

T 5,0

10 64

100

 x

Sem II 14/15

BEE 31602

4.4

Wave equation (finite-difference method)

Q19

Refer to class note 

Q20

2

2

 y



2

Tg    y

t  2

 1500

2

 x 1 



2 yi , j (k )

1 









1.5 ,  



0.01  and  g 



10 .

1 



2

 yi ,  j

1



2

2 yi , j



(0.01)  yi ,  j

0   x  2 , t   0  where

,

  y

t 

 y i , j

2

2

  y

 y i , j

 x

 

 yi ,  j

1



2

2 yi ,  j





1500



1500

 yi

 yi



1 

0.6( yi



1 

0.6 yi

 yi ,  j



 yi ,  j



1,  j 



 yi



2 yi , j



yi



1,  j

1,  j

2

1,  j 

2 yi ,  j



yi



1,  j 

2 yi ,  j



 yi



1,  j 





2

(0.5)

0.6( yi



2 yi , j ( h)

1 

 yi ,  j

1,  j 



0.8 yi ,  j



1, j

)

1,  j

)   yi ,  j

0.6 yi

1,  j 



1 

2 yi ,  j

yi ,  j

1





------ (1)

1 = yi,j+1

0.8

0.6 (A)

(B)

yi-1,j

0.6  yi,j

-1 (D)  yi,j-1

 yi , j

1 



 yi , j

1



2k   yi ,  j

1 



 yi ,  j



 x( x  2)

1 

0.02 x( x  2)

1 

 yi ,  j



 yi ,  j



1 



0.02 x( x  2)

------ (2)

(C)  yi+1,j

Sem II 14/15

BEE 31602

Substitute eqn. (2) into eqn. (1):  yi ,  j

1 

0.6 yi



0.6 yi

1 

0.6 yi

1 

0.3 yi



2 yi ,  j



 yi ,  j



1,  j 



1, j 



0.8 yi ,  j

0.8 yi , j

 

0.6 yi

0.6 yi

1, j 



1,  j 

0.8 yi ,  j



0.6 yi

1,  j 

0.4 yi ,  j



0.3 yi





1,  j 



yi ,  j

( yi , j

1



1



0.02x (x  2) 2))

1,  j 

0.02 x( x  2)

1,  j 

0.01 x( x  2)





1 = yi,j+1

0.3 (A)

0.4 yi-1,j

(B)

0.01 x ( x -2) -2)

0.3 (C)  yi+1,j

yi,j

t

 y1,2

 y2,2

0.148

0.064

 y1,1 1,1

0  y0,0

 y0,2

 y3,2

 y4,2

0.148

0

 y2,1

 y3,1

 y4,1

0.243

0.340

0.243

 y1,0

 y2,0

 y3,0

0.02 0  y0,1

0.01

0

0.5 0

1.0 0.25

1.5 0.5

0

 y4,0 2.0

0.25 0.2 5

0

 x

Sem II 14/15

BEE 31602

2

 u

Q21

t

ui , j

1 





2

2ui , j

(0.1) 1 

2ui , j

1 

ui

ui , j



ui , j



2

1

 u

 2

x

ui, j



2

1



ui, j

1, j 



ui

, where where    1 ui



2 

2



ui

1, j 

u i, j

1 



(0.1)

2

2u i, j



1, j 





t

2u i, j  u i

1, j 



 u 2

2



 u x

2

1, j



ui

1, j



formula) A  B  C (Calculator  

1 



Representation in molecule graph (calculating level 2):

1 = u ,j+1

1

1

(A)

(B) ui+1,j

ui-1,j  –  1  1

(C) ui,j-1 Given

ut  ( x, 0) 0)  0

ui , j

1 



ui , j

1





2(0.1) ui , j

1 



0 ui , j

Substitute (1) into ui , j ui , j

2ui , j

ui , j



1



1



1



ui





1, j



ui



1, j





ui

1, j



1, j



0.5ui

ui



------------------ --- (1) (1)

1





ui



1



ui, j

1, j





ui

1, j





ui, j 1 : 

1



1, j



0.5ui

1, j





0.5 A  0. 0.5B (Calculator formula)

Representation in molecule graph (calculating level 1):

1 = ui,j+1

0.5 (A)

0.5 ui-1,j

(B) ui+1,j

Sem II 14/15

BEE 31602

Thus, pressure of the closed pipe is given as follows:

u

0.2



u

0.1 0

Q22

0.9



0.397

u

1,1

0.9



0.589

u

1,0

0.9



0.729

Given

c

2





 x





2



u

u

u

0.589



u

u

u

0.278

t

2





t

2

c



2

2



x

2



1





2i , j



i , j

1



k2 i , j

1





2i , j



i , j

1



2

0.02

 i ,  j



 i ,  j



 i ,  j

113.63 113.636 6 10



113.63 113.636 6 10

1 

2 i ,  j

1 

1818 .182 182 i



6



1 



6

1,818 818.182 182( i

1,  j 



i

1, j





2i , j

0.9



 

0  x  20 , t  0   with  

,

c

i , j

0.9



5,0

 

2



4,0

0.728

 

0.9



5,1

 

2



4,1

 

3,0

0.278

2

 

0.225

2,0

5, 2

 

3,1

0.225

u

4,2

0.397

0.086

2,1



u

3,2

0.086



u

u

2,2



u

0, 0



u

1,2

0,1



u

u

0, 2



 i 1, 1, j

2

113 .636 636  10  113

c

 E  

  

6

 

h2 i

1, j





2i , j



i

1, 1, j



 

2

5 1,  j 



3634.364 364 i ,  j



2 i ,  j



 i

1, j



1818.182 182 i

) 1,  j 



 i ,  j

1



------ (1)

182 A  3634 .364 364 B  1818.182 182C    D  1818.182

1 ϕ i,j+1 =

1,818.182 (A)

-3,634.364 ϕ i-1,j

(B)

ϕ i,j

-1 (D) ϕ i,j-1

1,818.182 (C)

ϕ i+1,j

Sem II 14/15

BEE 31602

 ( x,0)

  x

t 

i , j

1



i , j

1



2k 

i , j



1





 x

 i , j



i , j

1



i , j 1   



2(0.02) 

1

0.04 x

x

------ (2)

Substitute eqn. (2) into eqn. (1): 1 

1818.182 182 i

1 

909 909.091 091 i

 i ,  j



 i ,  j





1,  j 



1,  j 



3634 .364 364 i ,  j

1817.182 182 i ,  j





1818.182 182 i

909 909.091 091 i

1,  j 



1,  j 



( i ,  j

1 



0.04x)

0.02 x

909 909 .091 091 A  1817 .182 182 B  909 909.091 091 C   0.02 x

1 =

909.091 (A)

ϕ i-1,j

ϕ i,j+1

-1,817.182 (B)

ϕ i,j

0.02 x

909.091 (C)

ϕ i+1,j

Sem II 14/15

BEE 31602

t

 0,2

 1,2

 2, 2

 3,2

 4, 2

0.04 0

0.2

0.4

0.6

0

 0,1

 1,1 1,1

 2,1

 3,1

 4,1

0

0.1

0. 2

0.3

0

 2,0

 3,0

 4,0

0.02

 0,0 0

 1,0 5

0

10 0

0

15 0

0

 x

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF