0% found this document useful (0 votes)
38 views49 pages

30 Partial Differential Equations 02-11-2022

Uploaded by

Omkar Dake
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)
38 views49 pages

30 Partial Differential Equations 02-11-2022

Uploaded by

Omkar Dake
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/ 49

BCHE201L: Computational Methods in Chemical Engineering

Dr. Shishir Kumar Behera


School of Chemical Engineering (SCHEME)
VIT Vellore
Partial Differential Equations

𝑑𝑢 𝑢(𝑥 + ∆𝑥) − 𝑢(𝑥)


= lim Ordinary derivative
𝑑𝑥 ∆𝑥→0 ∆𝑥

If the function u depends on both x and y, then the partial derivative of u with
respect to x at an arbitrary point (x, y) is defined as:

Dr. S. K. Behera BCHE201L Computational Methods in Chemical Engineering


Partial Differential Equation

A partial differential equation (PDE) is an


equation that involves an unknown function
and its partial derivatives.
Example :
 u ( x, t )  u ( x, t )
2
 uxx- ut = 0
x 2
t
PDE involves two or more independen t variable s
(in the example x and t are independen t variable s)
3
Notation

 2 u ( x, t )
u xx 
x 2
 2 u ( x, t )
u xt 
x t
Order of the PDE  order of the highest order derivative .

4
Partial Differential Equations

Dr. S. K. Behera BCHE201L Computational Methods in Chemical Engineering 3


Linear PDE - Classification

A PDE is linear if it is linear in the unknown


function and its derivative s
Example of linear PDE :
2 uxx  1 uxt  3 utt  4 ux  cos(2t )  0
2 uxx  3 ut  4 ux  0
Examples of Nonlinear PDE
2 uxx  uxt 2  3 utt  0
uxx  2 uxt  3 ut  0
2 uxx  2 uxt ut  3 ut  0
6
Representing the Solution of a PDE
(Two Independent Variables)

• Three main ways to represent the solution

T ( x1 , t1 ) T=5.2

t1 T=3.5

x1
Different curves are used Three dimensional plot The axis represent the
for different values of of the function T(x,t) independent variables. The
one of the independent value of the function is
variable
displayed at grid points

7
Examples of PDEs

PDEs are used to model many systems in many different fields of


science and engineering.

Important Examples:
– Laplace Equation

– Heat Equation

– Wave Equation

8
Laplace Equation

 2u ( x , y , z )  2u ( x , y , z )  2u ( x , y , z )
  0
x 2
y 2
z 2

• Used to describe the steady state distribution of heat in a body.

• Also used to describe the steady state distribution of electrical


charge in a body.

9
Heat Equation

 u( x, y , z, t )   2u  2u  2u 
   2  2  2 

t  x y z 

The function u(x,y,z,t) is used to represent the temperature


at time t in a body at a point with coordinates (x,y,z).
 is the thermal diffusivity. It is sufficient to consider the case
 = 1.

10
Wave Equation

 2u ( x , y , z , t )   2
u  2
u  2
u 
 c  2  2  2
2


t 2
 x y z 
• The function u(x,y,z,t) is used to represent the
displacement at time t of a particle whose position
at rest is (x,y,z).
• The constant ‘c’ represents the propagation speed
of the wave.

11
Classification of PDEs

Linear second order PDEs are important sets of equations


that are used to model many systems in many different fields
of science and engineering.

Classification is important because:


– Each category relates to specific engineering problems.

– Different approaches are used to solve these categories.

12
Classification of 2nd order partial differential equations in two variables
Linear Second Order PDEs
Classification

A second order linear PD E (2 - independen t variable s)


A u xx  B u xy  C u yy  D  0,
A, B, and C are functions of x and y
D is a function of x, y , u, u x , and u y
is classified based on (B 2  4 AC) as follows :
B 2  4 AC  0 Elliptic
B 2  4 AC  0 Parabolic
B 2  4 AC  0 Hyperbolic

15
Linear Second Order PDE
Examples (Classification)

16
Linear Second Order PDE
Examples (Classification)
 2u ( x , t )  u ( x , t )
Heat Equation   0
x 2
t
A   , B  0, C  0  B 2  4 AC  0
 Heat Equation is Parabolic
______________________________________
 2
u ( x , t )  2
u ( x, t )
Wave Equation c 2
 0
x 2
t 2

A  c 2  0, B  0, C  1  B 2  4 AC  0
 Wave Equation is Hyperbolic
17
Boundary Conditions for PDEs

• To uniquely specify a solution to the PDE, a set of boundary


conditions are needed.
• Both regular and irregular boundaries are possible.
t
 2u( x, t ) u( x, t )
Heat Equation :   0
x 2
t region of
interest
u(0, t )  0
u(1, t )  0
x
u( x,0)  sin( x ) 1

18
Solution Methods for PDEs

• Analytic solutions are possible for simple cases only.

• To make use of the nature of the equations, different


methods are used to solve different classes of PDEs.

• Finite element method


• Finite difference method
• Finite volume method

• Finite difference method has become popular than others.

19
Finite element method

• The finite element method (FEM) is a numerical technique for


finding approximate solutions of PDE as well as of integral
equations.

• The solution approach is based either on eliminating the


differential equation completely (steady state problems), or
rendering the PDE into an approximating system of ordinary
differential equations.

• Equations are then numerically integrated using standard


techniques such as Euler's method, Runge–Kutta, etc.

Dr. S. K. Behera BCHE201L Computational Methods in Chemical Engineering


Finite difference method
• Finite-difference methods are numerical methods for approximating
the solutions to differential equations using finite difference
equations to approximate the derivatives.

Finite volume method


• Similar to the finite difference method or finite element method,
values are calculated at discrete places on a meshed geometry.
• Finite volume refers to the small volume surrounding each node
point on a mesh.
• In the finite volume method, surface integrals in a partial
differential equation that contain a divergence term are converted
to volume integrals, using the divergence theorem.
Dr. S. K. Behera BCHE201L Computational Methods in Chemical Engineering
Elliptic Equations
A second order linear PDE (2 - independen t variable s x , y )
A u xx  B u xy  C u yy  D  0,
A, B, and C are functions of x and y
D is a function of x, y , u, u x , and u y

is Elliptic if B 2  4 AC  0

22
Laplace Equation
Laplace equation appears in several engineering problems
such as:
– Studying the steady state distribution of heat in a body.
– Studying the steady state distribution of electrical charge
in a body.

 T ( x, y )  T ( x, y )
2 2
  f ( x, y )
x 2
y 2

T : steady state temperatu re at point (x, y)


f ( x, y ) : heat source (or heat sink)
23
Laplace Equation
 2 T ( x, y )  2 T ( x, y )
  f ( x, y )
x 2
y 2

A  1, B  0, C  1
B 2  4 AC  4  0 Elliptic

• Temperature is a function of the position (x and y)


• When no heat source is available f(x,y)=0

24
Solution Technique
• A grid is used to divide the region of interest.

• Since the PDE is satisfied at each point in the area, it must be


satisfied at each point of the grid.

• A finite difference approximation is obtained at each grid


point.

 2 T ( x, y ) Ti 1, j  2Ti , j  Ti 1, j  2 T ( x, y ) Ti , j 1  2Ti , j  Ti , j 1


 , 
x 2
x  2
y 2
y 2

25
Finite Difference Methods

• Divide the interval x into sub-intervals, each of width ∆x


• Divide the interval y into sub-intervals, each of width ∆y
• A grid of points is used for
y
the finite difference solution
• Ti,j represents T(xi, yj)
• Replace the derivates by
finite-difference formulas

26
Solution Technique
 2 T ( x, y ) Ti 1, j  2Ti , j  Ti 1, j
 ,
x 2
x  2

 2 T ( x, y ) Ti , j 1  2Ti , j  Ti , j 1

y 2
y  2

 2 T ( x, y )  2 T ( x, y )
  0
x 2
y 2

is approximated by :
Ti 1, j  2Ti , j  Ti 1, j Ti , j 1  2Ti , j  Ti , j 1
 0
x  2
y  2

27
Solution Technique
Ti 1, j  2Ti , j  Ti 1, j Ti , j 1  2Ti , j  Ti , j 1
 0
x  2
y  2

( Laplacian Difference Equation)


Assume : x  y  h
 Ti 1, j  Ti 1, j  Ti , j 1  Ti , j 1  4Ti , j  0
• Holds good for all interior points on the plate, and is referred to as
the Laplacian difference equation.
• In addition, boundary conditions along the edges of the
plate must be specified to obtain a unique solution.

• The simplest case is where the temperature at the boundary is set at a


fixed value. This is called a Dirichlet boundary condition.
28
Solution Technique
Ti , j 1

Ti 1, j Ti , j Ti 1, j

Ti , j 1

Ti 1, j  Ti 1, j  Ti , j 1  Ti , j 1  4Ti , j  0

29
Example
Determine the steady state temperature at all points of a
heated sheet of metal. The edges of the sheet are kept at a
constant temperature: 100°C, 50°C, 0°C, and 75°C.
100

75 50

The sheet is divided to 5×5 grids.

30
Known
To be determined

T1, 4  100 T2, 4  100 T3, 4  100

T1,3 T2,3 T3,3


T0,3  75 T4,3  50

T1, 2 T2, 2 T3, 2


T0, 2  75 T4, 2  50

T1,1 T2,1 T3,1


T0,1  75 T4,1  50

T1,0  0 T2,0  0 T3,0  0

31
First Equation
Known
T1, 4  100 T2, 4  100 To be determined

T1,3 T2,3
T0,3  75

T1, 2 T2, 2
T0, 2  75

T0,3  T1, 4  T1, 2  T2,3  4T1,3  0


75  100  T1, 2  T2,3  4T1,3  0

Ti 1, j  Ti 1, j  Ti , j 1  Ti , j 1  4Ti , j  0 32


Another Equation Known
To be determined

T1, 4  100 T2, 4  100 T3, 4  100


T1,3 T2,3 T3,3

T1, 2 T2, 2 T3, 2

T1,3  T2,4  T3,3  T2, 2  4T2,3  0


T1,3  100  T3,3  T2, 2  4T2,3  0

33
Write down balance at each node

Maximum of five unknown terms per line


The Rest of the Equations

 4 1 0 1   T1,1   75 
    
1 4 1 0 1   T2,1   0 
 0 1 4 0 0 1   T   50 
   3,1   
1 0 0 4 1 0 1   T1,2   75 
 1 0 1 4 1 0 1  T    0 
   2, 2   
 1 0 1 4 0 0  1  T3,2   50 
  1 0 0 4  1 0   T  175 
   1,3   
  1 0  1 4  1  T2,3  100 
    
  1 0  1 4   3,3  
T 150 
T11 T21 T31 T12 T22 T32 T13 T23 T33
0 0 0 1 0 0 -4 1 0
0 0 0 0 1 0 1 -4 1 35
Fill the temperature at each grid point
Practice Problem: Use Laplacian Difference Equation to solve for the
temperature of the heated plate as given in the figure below:
120 C

1,2 2,2

50 C 70 C

1,1 2,1

0 C
The Liebmann Method

• Most numerical solutions of the Laplace equation involve


systems that are very large, e.g. 10-by-10 grid involves 100 linear
algebraic equations.

• Notice that there are a maximum of five unknown terms per line in
Eqns. For larger-sized grids, this means that a significant number of the
terms will be zero. When applied to such sparse systems, full-matrix
elimination methods waste great amounts of computer memory storing
these zeros.

• For this reason, approximate methods provide a viable approach for


obtaining solutions for elliptical equations.

• The most commonly employed approach is Gauss-Seidel, which


when applied to PDEs is also referred to as Liebmann’s method.

Dr. S. K. Behera BCHE201L Computational Methods in Chemical Engineering


Ti 1, j  Ti 1, j  Ti , j 1  Ti , j 1  4Ti , j  0

• Solved iteratively for i = 1 to m and j =1 to n

• Diagonally dominant, this procedure will eventually converge on a stable


solution.

• Over relaxation is sometimes employed to accelerate the rate of


convergence by applying the following formula after each iteration:

• The percent relative errors

Dr. S. K. Behera BCHE201L Computational Methods in Chemical Engineering


Example: Use Liebmann’s method to solve for the temperature of the heated
plate in the figure. Employ over relaxation with a value of 1.5 for the
weighting factor and iterate to s  1%

Dr. S. K. Behera BCHE201L Computational Methods in Chemical Engineering


Solution: Write the balance at each node

At node (1,1):
T21+T01+T12+T10- 4T11=0
At node (2,1): Ti 1, j  Ti 1, j  Ti , j 1  Ti , j 1  4Ti , j  0
T31+T11+T22+T20-4T21=0
At node(3,1):
T41+T21+T32 +T30 - 4T31=0

At node (1,2):
T22+T02+T13+T11-4T12=0
At node (2,2):
T32+T12+T23+T21-4T22=0
At node (3,2):
At node (1,3):
T42+T22+T33+T31-4T32=0
T23+T03+T14+T12-4T13
At node (2,3):
T33+T13+T24+T22-4T23=0
At node (3,3):
T43+T23+T34+T32-4T33=0

Dr. S. K. Behera BCHE201L Computational Methods in Chemical Engineering


T01=75; T02=75; T03=75
T10=0; T20=0; T30=0
T41=50; T42=50; T43=50
T14=100; T24=100; T34=100
At node (1,1):
T21+T01+T12+T10-4T11= 0  4T11-T21-T12-T10-T01= 0 4T11-T21-T12-0-75 = 0
At node (2,1):
T31+T11+T22+T20-4T21= 0 -T11+4T21-T31-T22-T20 = 0 -T11+4T21-T31-T22-0 = 0
At node(3,1):
T41+T21+T32+T30-4T31= 0-T21+4T31-T32-T30-T41 = 0 -T21+4T31-T32-0-50 = 0
At node (1,2):
T22+T02+T13+T11-4T12=0-T11-T02-T13+4T12-T22=0-T11-75-T13+4T12-T22=0
At node (2,2):
T32+T12+T23+T21-4T22=0-T21-T12+4T22-T32-T23=0
At node (3,2):
T42+T22+T33+T31-4T32=0-T42-T31-T22+4T32-T33=0-50-T31-T22+4T32-T33=0

At node (1,3):
T23+T03+T14+T12-4T13=0-T12+4T13-T23-T03-T14 = 0-T12+4T13-T23-75-100=0
At node (2,3):
T33+T13+T24+T22-4T23=0-T22-T13+4T23-T33-T24 = 0-T22-T13+4T23-T33-100=0
At node (3,3):
T43+T23+T34+T32-4T33=0-T32-T23+4T33-T34-T43 = 0-T32-T23+4T33-100-50=0
Write down balance at each node

Dr. S. K. Behera BCHE201L Computational Methods in Chemical Engineering


Ti 1, j  Ti 1, j  Ti , j 1  Ti , j 1  4Ti , j  0

For i = 1, j = 1,

Dr. S. K. Behera BCHE201L Computational Methods in Chemical Engineering


Dr. S. K. Behera BCHE201L Computational Methods in Chemical Engineering
Practice Problem 1: Use Liebmann’s method to solve
for the temperature of the heated plate for the square region shown in the
figure. Use successive over relaxation with weighting factor 1.5 and determine
the temperatures at the internal mesh points up to 3rd iteration. Give an
estimate of the percent error in the value of u22.

Dr. S. K. Behera BCHE201L Computational Methods in Chemical Engineering


Solution:

Dr. S. K. Behera BCHE201L Computational Methods in Chemical Engineering


Practice Problem 2: Use Liebmann’s method to solve for the temperature of
the square heated plate shown in the figure, but with the upper boundary
condition increased to 150°C and the left boundary decreased to 50°C. Use a

relaxation factor of 1.2 and and iterate to Ɛs  1%.

Dr. S. K. Behera BCHE201L Computational Methods in Chemical Engineering


Practice Problem 3: Use Liebmann’s method to solve for the temperature of
the square heated plate shown in the figure, but with the upper boundary
condition increased to 175°C and the left boundary insulated. Use a relaxation

factor of 1.2 and iterate to Ɛs  1%.

Dr. S. K. Behera BCHE201L Computational Methods in Chemical Engineering

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy