0% found this document useful (0 votes)
67 views28 pages

Unit VI

This document provides an overview of partial differential equations (PDEs) and numerical methods for solving them. It discusses how PDEs describe problems with multiple independent variables and relate to various fields like fluid dynamics and heat transfer. It focuses on second-order linear PDEs and categorizes them as elliptic, parabolic, or hyperbolic based on a characteristic equation. Examples are given to classify PDEs. The document also introduces finite difference approximations to derive discrete equations for partial derivatives on a rectangular grid, which can be solved numerically.

Uploaded by

Vikas Rathod
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)
67 views28 pages

Unit VI

This document provides an overview of partial differential equations (PDEs) and numerical methods for solving them. It discusses how PDEs describe problems with multiple independent variables and relate to various fields like fluid dynamics and heat transfer. It focuses on second-order linear PDEs and categorizes them as elliptic, parabolic, or hyperbolic based on a characteristic equation. Examples are given to classify PDEs. The document also introduces finite difference approximations to derive discrete equations for partial derivatives on a rectangular grid, which can be solved numerically.

Uploaded by

Vikas Rathod
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/ 28

Partial Differential Equations

Numerical Methods

Prashant R. Anerao
[email protected]
Department of Mechanical Engineering
Prepared by: P. R. Anerao

BRACT’S, Vishwakarma Institute of Information Technology, Pune-48


(An Autonomous Institute affiliated to Savitribai Phule Pune University)
(NBA and NAAC accredited, ISO 9001:2015 certified)
Partial Differential Equations

• ODEs: 𝑑𝑦 1 independent variable


= 𝑓(𝑥, 𝑦) 𝑦 = 𝜙(𝑥)
𝑑𝑥 1 or more dependant variables

The rate of change of a function involving more than one variable

• PDEs: 𝜕𝑢 𝜕𝑢 𝜕2𝑢
𝑜𝑟 𝑜𝑟 = 𝑓(𝑥, 𝑦, 𝑢)
𝜕𝑥 𝜕𝑦 𝜕𝑥𝜕𝑦
Prepared by: P. R. Anerao

𝑢 = 𝜙(𝑥, 𝑦)

2 or more Independent variable


1 or more dependant variables
Department of Mechanical Engineering, VIIT,Pune-48 2
PDEs and Engineering & Science
Heat conduction equation Determine the temperature distributions induced by heat
conduction in solids, either by heat generation by the solids or by
heat from external sources.
Law of conservation of energy:
Prepared by: P. R. Anerao

Each of these 4 derivative is called “partial derivative” of the function 𝑇(𝑥, 𝑦, 𝑧, 𝑡) because each derivative as
we will express mathematically can only represent “part” (not whole) of the derivative for this function that
involves multi-variables.
Department of Mechanical Engineering, VIIT,Pune-48 3
PDEs and Engineering & Science

• Fluid Dynamics,
• Heat Transfer,
• Boundary Layer Flow,
• Elasticity,
(a) Temperature distribution on a heated plate, (b) seepage of water under a
• Quantum Mechanics, dam, and (c) the electric fi eld near the point of a conductor.

• Electromagnetic Theory, and etc.


Prepared by: P. R. Anerao

A long, thin rod that is insulated everywhere but at its end.

A taut string vibrating at a low amplitude


Department of Mechanical Engineering, VIIT,Pune-48 4
2nd Order Linear PDE’s
• Because of widespread application in engineering, our treatment of PDEs will focus
on linear, second-order equations.
• For two independent variables, such equations can be expressed in the following
general form:
 2u  2u  2u
A 2 +B +C 2 + D = 0
x xy y
𝜕𝑢 𝜕𝑢
where A, B, and C are functions of x and y and D is a function of x, y, u, 𝜕𝑥 , and 𝜕𝑦
Prepared by: P. R. Anerao

• Eq. can be classified into one of three categories.


• Based on the method of characteristics
• Useful because each category relates to specific and distinct engineering problem
contexts that demand special solution techniques.
Department of Mechanical Engineering, VIIT,Pune-48 5
2nd Order Linear PDE’s
 2u  2u  2u
A 2 +B +C 2 + D = 0
x xy y
Prepared by: P. R. Anerao

Department of Mechanical Engineering, VIIT,Pune-48 6


2nd Order Linear PDE’s
Example: Classify the equation-

Solution: Compare the given equation with general form


 2u  2u  2u
A 2 +B +C 2 + D = 0
x xy y
𝐴 = 1, 𝐵 = 4 & 𝐶 = 4
Prepared by: P. R. Anerao

𝐵2 − 4𝐴𝐶 = 42 − 4 × 1 × 4 = 0

So the equation is parabolic

Department of Mechanical Engineering, VIIT,Pune-48 7


2nd Order Linear PDE’s
Example: Classify the equation-

https://forms.gle/mMQ8Qs
Solution: NNGjjqiQtT9
Compare the given equation with general form

 2u  2u  2u
A 2 +B +C 2 + D = 0
x xy y
𝐴 = 1 + 𝑥 2 , 𝐵 = 5 + 2𝑥 2 & 𝐶 = 4 + 𝑥 2
Prepared by: P. R. Anerao

𝐵2 − 4𝐴𝐶 = 5 + 2𝑥 2 2 − 4 × (1 + 𝑥 2 ) × (4 + 𝑥 2 ) = 9

So the equation is hyperbolic


Department of Mechanical Engineering, VIIT,Pune-48 8
2nd Order Linear PDE’s
Example: Classify the equation-

Solution: Compare the given equation with general form

 2u  2u  2u
A 2 +B +C 2 + D = 0
x xy y
Prepared by: P. R. Anerao

So the equation is elliptic


Department of Mechanical Engineering, VIIT,Pune-48 9
Finite Difference Approximations to Partial Derivatives
• To uniquely specify a solution to the PDE, a set of boundary conditions are needed.
• To make use of the nature of the equations, different methods are used to solve
different classes of PDEs.
• The methods discussed here are based on the finite difference technique.

• Consider a rectangular region R in the x,


y plane
• Divide this region into a rectangular
Prepared by: P. R. Anerao

network of sides x = h and y = k as


shown in Figure.
• The points of intersection of the
dividing lines are called mesh points,
nodal points, or grid points
Department of Mechanical Engineering, VIIT,Pune-48 10
Elliptic Equations: Solution of Laplace’s Equation
• Examples of elliptic partial differential equations
𝜕2 𝑢 𝜕2 𝑢
1. Poisson’s equation 𝜕𝑥 2 + 𝜕𝑦 2 = 𝑓 𝑥, 𝑦
𝝏𝟐 𝒖 𝝏𝟐 𝒖
2. Laplace equation 𝝏𝒙𝟐 + 𝝏𝒚𝟐 = 𝟎

• Replacing the derivatives in above eq. by


their difference approximations, we have
Prepared by: P. R. Anerao

Department of Mechanical Engineering, VIIT,Pune-48 11


Solution of Laplace’s Equation
Standard 5-point formula Diagonal 5-point formula

𝑢1 𝒖𝟐 𝑢3 𝒖𝟏 𝑢2 𝒖𝟑

𝒖𝟓 𝒖𝟓
𝒖𝟒 𝒖𝟔 𝑢4 𝑢6

𝑢7 𝒖𝟖 𝑢9 𝒖𝟕 𝑢8 𝒖𝟗
Prepared by: P. R. Anerao

1 1
𝑢5 = (𝑢2 + 𝑢4 + 𝑢6 + 𝑢8 ) 𝑢5 = (𝑢1 + 𝑢3 + 𝑢7 + 𝑢9 )
4 4

Diagonal 5-point formula is less accurate than Standard 5-point formula yet it serves as a
reasonably good approximation for obtaining the starting values at the mesh points.
Department of Mechanical Engineering, VIIT,Pune-48 12
Solution of Laplace’s Equation
Example: Given the values of u(x, y) on the boundary of the square in the Figure, evaluate
𝝏𝟐 𝒖 𝝏𝟐 𝒖
the function u(x, y) satisfying the Laplace equation 𝝏𝒙𝟐 + 𝝏𝒚𝟐 = 𝟎 at the pivotal
points of this figure by Gauss-Seidal method.

Solution: To get the initial values of 𝑢1 , 𝑢2 , 𝑢3 & 𝑢4 , we


assume that 𝑢4 = 0. Then
Prepared by: P. R. Anerao

Department of Mechanical Engineering, VIIT,Pune-48 13


Solution of Laplace’s Equation
To get the initial values of 𝑢1 , 𝑢2 , 𝑢3 & 𝑢4 , we assume that 𝑢4 = 0. Then

1
(Diag. formula) 𝑢1 = 1000 + 0 + 1000 + 2000 = 𝟏𝟎𝟎𝟎
4
1
(Std. formula) 𝑢2 = 𝟏𝟎𝟎𝟎 + 500 + 1000 + 0 = 𝟔𝟐𝟓
4
1
(Std. formula) 𝑢3 = 𝟏𝟎𝟎𝟎 + 500 + 2000 + 0 = 𝟖𝟕𝟓
4
Prepared by: P. R. Anerao

1
(Std. formula) 𝑢4 = 𝟖𝟕𝟓 + 0 + 𝟔𝟐𝟓 + 0 = 𝟑𝟕𝟓
4

Department of Mechanical Engineering, VIIT,Pune-48 14


Solution of Laplace’s Equation
Carry out the successive iterations, using Gauss-Seidal formulae:

Iteration 1:
1
𝑢1 = 2000 + 625 + 1000 + 875 = 1125
4
1
𝑢2 = 1125 + 500 + 1000 + 375 = 750
4
1
𝑢3 = 2000 + 375 + 1125 + 500 = 1000
Prepared by: P. R. Anerao

4
1
𝑢4 = 1000 + 0 + 750 + 0 = 437.5
4

Department of Mechanical Engineering, VIIT,Pune-48 15


Solution of Laplace’s Equation

Iteration 2:
1
𝑢1 = 2000 + 750 + 1000 + 1000 = 𝟏𝟏𝟖𝟕. 𝟓
4
1
𝑢2 = 1187.5 + 500 + 1000 + 437.5 = 𝟕𝟖𝟏. 𝟐𝟓
4
1
𝑢3 = 2000 + 437.5 + 1187.5 + 500 = 𝟏𝟎𝟑𝟏. 𝟐𝟓
Prepared by: P. R. Anerao

4
1
𝑢4 = 1031.25 + 0 + 781.25 + 0 = 𝟒𝟓𝟑. 𝟏𝟐𝟓
4

Department of Mechanical Engineering, VIIT,Pune-48 16


Solution of Laplace’s Equation
Example: Solve the equation uxx + uyy = 0 for the square mesh with the boundary values
as shown in Figure
Prepared by: P. R. Anerao

Department of Mechanical Engineering, VIIT,Pune-48 17


Solution of Laplace’s Equation
Example: Solve the equation uxx + uyy = 0 for the square mesh with the boundary values
as shown in Figure

Solution:
Prepared by: P. R. Anerao

Department of Mechanical Engineering, VIIT,Pune-48 18


Solution of Laplace’s Equation

(Std. formula)

(Diag. formula)
Prepared by: P. R. Anerao

(Std. formula)

Department of Mechanical Engineering, VIIT,Pune-48 19


Solution of Laplace’s Equation
Prepared by: P. R. Anerao

Department of Mechanical Engineering, VIIT,Pune-48 20


Parabolic Equations
• Conservation of heat can be used to develop a heat balance for the differential
element in the long, thin insulated rod shown in Fig.
• However, rather than examine the steady-state case, the present balance also
considers the amount of heat stored in the element over a unit time period ∆𝑡.
• Thus, the balance is in the form, inputs - outputs = storage, or
Prepared by: P. R. Anerao

• The one-dimensional heat conduction equation


𝜕𝑢 2
𝜕2𝑢
=𝑐
𝜕𝑡 𝜕𝑥 2
where C2 is the diffusivity of the substance
Department of Mechanical Engineering, VIIT,Pune-48 21
The Crank-Nicolson Method
Prepared by: P. R. Anerao

Department of Mechanical Engineering, VIIT,Pune-48 22


The Crank-Nicolson Method
𝑢 𝑇𝐿 𝑢 𝑇𝐶 𝑢 𝑇𝑅
x

𝑢𝐵𝐿 𝑢𝐵𝐶 𝑢𝐵𝑅

t
Prepared by: P. R. Anerao

−𝛼 𝑢𝐵𝐿 + 𝑢𝐵𝑅 + 2 + 2𝛼 𝑢𝐵𝐶 = 𝛼 𝑢 𝑇𝐿 + 𝑢 𝑇𝑅 + (2 − 2𝛼)𝑢 𝑇𝐶

Department of Mechanical Engineering, VIIT,Pune-48 23


Solution of One Dimensional Heat Equation
Example:

Solution:
Prepared by: P. R. Anerao

Department of Mechanical Engineering, VIIT,Pune-48 24


Solution of One Dimensional Heat Equation

−𝛼 𝑢𝐵𝐿 + 𝑢𝐵𝑅 + 2 + 2𝛼 𝑢𝐵𝐶 = 𝛼 𝑢 𝑇𝐿 + 𝑢 𝑇𝑅 + (2 − 2𝛼)𝑢 𝑇𝐶

𝑝𝑢𝑡 𝛼 = 1, 𝑤𝑒 𝑔𝑒𝑡
Prepared by: P. R. Anerao

−1 𝑢𝐵𝐿 + 𝑢𝐵𝑅 + 2 + 2 𝑢𝐵𝐶 = 1 𝑢 𝑇𝐿 + 𝑢 𝑇𝑅 + (2 − 2)𝑢 𝑇𝐶

4𝑢𝐵𝐶 = 𝑢 𝑇𝐿 + 𝑢 𝑇𝑅 +𝑢𝐵𝐿 +𝑢𝐵𝑅

Department of Mechanical Engineering, VIIT,Pune-48 25


Solution of One Dimensional Heat Equation

4𝑢𝐵𝐶 = 𝑢 𝑇𝐿 + 𝑢 𝑇𝑅 +𝑢𝐵𝐿 +𝑢𝐵𝑅


Prepared by: P. R. Anerao

Department of Mechanical Engineering, VIIT,Pune-48 26


Solution of One Dimensional Heat Equation
Prepared by: P. R. Anerao

Department of Mechanical Engineering, VIIT,Pune-48 27


-
Prepared by: P. R. Anerao

Thank you
Department of Mechanical Engineering, VIIT,Pune-48 28

You might also like