Вы находитесь на странице: 1из 14

Solving ODE-BVP through Galerkins Method

FEM: Introduction
Suddhasheel Ghosh, PhD
Department of Civil Engineering
Jawaharlal Nehru Engineering College
N-6 CIDCO, 431003

Series on Advanced Numerical Methods

shudh (JNEC)

Concepts

MEStru2k1617

1 / 14

DiffEq1

Introduction to terminology

Given a differential equation





d2 y dy
, , y, x = 0,

dx2 dx

and the initial conditions,

dy
F1
, y, x = a = 0
dx

F2

(1)

dy
, y, x = b = 0
dx

So, given the points a and b, it is desired to find the solution of the
differential equation using the Galerkins Method.

shudh (JNEC)

Concepts

MEStru2k1617

2 / 14

DiffEq1

A second-order Boundary Value Problem

A boundary value problem is given as follows:


d2 y
dx
+ P(x) + Q(x)y = R(x)
2
dx
dy
along with the conditions
y(x = a) = A,

shudh (JNEC)

y(x = b) = B

Concepts

MEStru2k1617

3 / 14

GM

Concept of Linear Independence


In Vector Algebra, n vectors, namely v1 , v2 , . . . , vn are linearly independent,
when
n
X
ai vi = 0 ai = 0, i = 1, . . . , n
i=1

Linear independence means that no vector can be expressed as a linear


combination of other vectors.
This concept of linear independence is not only limited to vectors, but has
also been extended to the area of functions and various algebraic
polynomials.

shudh (JNEC)

Concepts

MEStru2k1617

4 / 14

GM

Galerkins method I
Formulation

The Galerkins Method is a weighted-residual method. We will try to


solve the following differential equation:
d2 y
dy
+ P(x) + Q(x)y = R(x)
2
dx
dx
with the following boundary conditions y(x = a) = A and y(x = b) = B.
Let us assume that the solution is in the form
2

y = 0 + 1 x + 2 x + + n x =

n
X

i xi

i=0

shudh (JNEC)

Concepts

MEStru2k1617

5 / 14

GM

Galerkins method II
Formulation

Differentiating the above form, with respect to x, we have:


n

dy X
=
ii xi1
dx i=0

(2)

d2 y X
=
i(i 1)i xi2
dx2
i=0

(3)

Substituting, these into the differential equation we have:


n
X



i i(i 1)xi2 + iP(x)xi1 + Q(x)xi = R(x)

(4)

i=0

shudh (JNEC)

Concepts

MEStru2k1617

6 / 14

GM

Galerkins method III


Formulation

From the boundary conditions, we have


n
X
i=0
n
X

i ai = A,

(5)

i bi = B

(6)

i=0

We work out the residual function as follows:


R(x) =

n
X



i i(i 1)xi2 + iP(x)xi1 + Q(x)xi R(x)

(7)

i=0

If there are n 1 unknowns, then there should be n 1 linearly


independent polynomials chosen to be multiplied as weights to the
shudh (JNEC)

Concepts

MEStru2k1617

7 / 14

GM

Galerkins method IV
Formulation

residual function. Therefore, for each j = 1, . . . , n 1, we should have


n 1 equations
Zb
Nj (x) R(x) dx = 0

(8)

where Nj (x) denotes the jth polynomial.


These equations are solved using linear algebra to obtain the values of
i , i = 0, . . . , n

shudh (JNEC)

Concepts

MEStru2k1617

8 / 14

GM

Example I
Galerkins Method

Problem: Use the Galerkins method to solve the following differential


equation:
d2 y
y=x
dx2
Use the boundary conditions y(x = 0) = 0 and y(x = 1) = 0. (Desai, Eldho,
Shah)
Solution: Let us assume that the solution to the given differential
equation is in the following form, where there are four unknowns:
y = 0 + 1 x + 2 x2 + 3 x3

shudh (JNEC)

Concepts

MEStru2k1617

9 / 14

GM

Example II
Galerkins Method

From the boundary conditions given, we have


0 + 1 (0) + 2 (02 ) + 3 (03 ) = 0
2

0 + 1 (1) + 2 (1 ) + 3 (1 ) = 0

= 0 = 0
= 1 + 2 + 3 = 0(or)3 = (1 + 2

We calculate the derivatives as follows:


dy
= 1 + 22 x + 33 x2
dx
d2 y
= 22 + 63 x
dx2
Substituting these into the differential equation, we have the following:
1 x + 2 (2 x2 ) + 3 (6x x3 ) = x
shudh (JNEC)

Concepts

MEStru2k1617

10 / 14

GM

Example III
Galerkins Method

Since 3 = (1 + 2 ), we will have


1 x + 2 (2 x2 ) + (1 + 2 )(x3 6x) = x
= 1 (x3 7x) + 2 (x3 x2 6x + 2) = x

(9)

We can therefore formulate


R(x) = 1 (x3 7x) + 2 (x3 x2 6x + 2) x

shudh (JNEC)

Concepts

(10)

MEStru2k1617

11 / 14

GM

Example IV
Galerkins Method

Since there are two unknown parameters here, we will consider two
functions N1 (x) = x x2 , and N2 (x) = x2 x3 , as weighting functions.
Therefore,
Z

0
Z1

N1 (x)R(x)dx = 0 = 0.55001 0.18332 = 0.0833


N2 (x)R(x)dx = 0 = 0.32621 0.14292 = 0.0500

We will have this system




  
0.0833
0.5500 0.1833 1
=
03262 0.1429 2
0.0500
shudh (JNEC)

Concepts

(11)

MEStru2k1617

12 / 14

GM

Example V
Galerkins Method

Using this, the relations 3 = (1 + 2 ), and 0 = 0, we have


0 = 0, 1 = 0.1456, 2 = 0.01743, 3 = 0.1631
Therefore, we can say that for our differential equation, we have the
following solution:
y = 0.1456x 0.01743x2 + 0.1631x3

shudh (JNEC)

Concepts

MEStru2k1617

13 / 14

GM

Thank you!

shudh (JNEC)

Concepts

MEStru2k1617

14 / 14

Вам также может понравиться