Anda di halaman 1dari 6

Discretization- Finite difference, Finite element methods

Q1.
Identify the natural and essential boundary conditions of the following differential
equation:
2 2
2 2
( ) ( ) 0
d d y
a x b x
dx dx
(
+ =
(

, for 0 ; x L < < subject to the following boundary conditions:
0 y = and 0 dy dx = at 0 x = ;
2
2
( )
x L
d y
a x A
dx
=
(
=
(

,
2
2
( ) 0
x L
d d y
a x
dx dx
=
( | |
=
( |
\
.
Solution

2 2
2 2
( ) ( ) 0
d d y
a x b x vdx
dx dx
(
+ =
` (
)

2 2
0 0 2 2
( ) ( ) 0
L L
d d y
a x vdx b x vdx
dx dx

+ =
`
)

2 2
0 0 2 2
0
( ) ( ) ( ) 0
L
L L
d d y dv d d y
v a x a x dx b x vdx
dx dx dx dx dx
(
+ =
` ` (
) )

2 2 2 2
0 0 2 2 2 2
0 0
( ) ( ) ( ) ( ) 0
L L
L L
d d y dv d y d v d y
v a x a x a x dx b x vdx
dx dx dx dx dx dx
( (
+ + =
` ( (
)

It is clear from the boundary terms that the primary variables are y and
dy
dx
and
secondary variables are
2
2
( )
d d y
a x
dx dx

`
)
and
2
2
( )
d y
a x
dx
respectively. Hence, essential
boundary conditions are 0 y = and 0 dy dx = at 0 x = and natural boundary conditions
are
2
2
( )
x L
d y
a x A
dx
=
(
=
(

,
2
2
( ) 0
x L
d d y
a x
dx dx
=
( | |
=
( |
\
.

Q2.
Consider the following differential equation on the domain
1 2
x x x
2 2
2 2
d d u d du
a b cu f
dx dx dx dx
| |
| |
+ =
| |
\
\
, where , , a b c are known functions of x ,
( ) ( ) ( ) , , 0 a x b x c x for all x .
(a) Develop the variational formulation for this differential equation in the form: Find u
such that ( ) ( ) , a u v L v = for all v
(b) Identify the function spaces that u and v should lie in, and the appropriate essential
and natural boundary conditions.
(c) Show that ( ) .,. a is symmetric and positive definite.
(d) Formulate the minimization problem corresponding to the above variational
formulation.
Solution
(a)
2 2 2 2
1 1 1 1
2 2
2 2
x x x x
x x x x
d d u d du
a vdx b vdx cuvdx fvdx
dx dx dx dx
| |
| |
+ =

| |
\
\

2
2
2 2 2 2
1 1 1 1
1
1
2 2
2 2
x
x
x x x x
x x x x
x
x
d d u d d u dv du du dv
v a a dx vb b dx cuvdx fvdx
dx dx dx dx dx dx dx dx
( | | | |
(
+ + =
( | |
(

\ \

2 2
2
2 2 2 2
1 1 1 1
1
1 1
2 2 2 2
2 2 2 2
x x
x
x x x x
x x x x
x
x x
d d u dv d u d u d v du du dv
v a a a dx vb b dx cuvdx fvdx
dx dx dx dx dx dx dx dx dx
( | | (
(
+ + + =
( | (
(

\
( ) ( ) , a u v L v =
( )
2 2 2
1 1 1
2 2
2 2
,
x x x
x x x
d u d v du dv
a u v a dx b dx cuvdx
dx dx dx dx
= + +


( )
2 2
2
2
1
1
1 1
2 2
2 2
x x
x
x
x
x
x x
d d u dv d u du
L v fvdx v a a vb
dx dx dx dx dx
( | | (
(
= + +
( | (
(

\


(b)
2
1
2
1
x
x
du
dx H
dx
| |
<
|
\


2
1
2
2
2
2
x
x
d u
dx H
dx
| |
<
|
\


2
1
2
1
x
x
dv
dx H
dx
| |
<
|
\


2
1
2
2
2
2
x
x
d v
dx H
dx
| |
<
|
\


(c) Possible boundary conditions are as follows
Essential boundary conditions Natural boundary conditions

(i) u specified
2
2
d d u
a
dx dx
| |
|
\
specified
(ii) u specified
2
2
d u
a
dx
specified
(iii) u specified
du
b
dx
specified
(c) ( ) ( ) , , a u v a v u =
It implies that a is symmetric.
( )
2 2 2
1 1 1
2
2
2
2
2
, 0
x x x
x x x
d v dv
a v v a dx b dx cv dx
dx dx
| |
| |
= + +
| |
\
\


Therefore, a is positive.
(d) ( ) ( )
1
,
2
a u u L u =
2 2 2
1 1 1
2 2
2
2
1
1
1 1
2
2
2
2
2
2 2
2 2
1
2
x x x
x x x
x x
x
x
x
x
x x
d u du
a dx b dx cu dx
dx dx
d d u du d u du
fudx u a a ub
dx dx dx dx dx
(
| |
| |
= + + (
| |
\ ( \

( | | (
(
+ +
( | (
(

\


Q3.
Consider the following heat conduction problem( ) 0 1 x :
0
d dT
k S
dx dx
| |
+ =
|
\

The boundary conditions specified are as follows: ( ) 1 2 T = ,
0
0
x
dT
dx
=
| |
=
|
\

(i) Is cos( ) sec( )
4
x
T x

= + a valid trial function? Explain.
(ii) Is ( ) sin( ) cos T x ec x = + a valid weighting function? Explain.
Solution
(i)
cos( ) sec( )
4
x
T x

= +
( ) 1 cos( ) sec( ) 1 2
4
T

= + = +
It violates the given essential boundary condition ( )
( )
1 2 T = . Hence
cos( ) sec( )
4
x
T x

= + is not a valid trial function.
(ii)
0
d dT
k S
dx dx
| |
+ =
|
\

0
d dT
k S vdx
dx dx
( | |
+ =

| (
\

where v is the variation in T which is taken as weighting function ( w).
w T =
Since T is given at 1 x = , 0 T = at 1 x = .
Now, ( ) sin( ) cos w x ec x = +
( ) ( ) 1 sin( ) cos w ec = + =undefined
Hence ( ) sin( ) cos T x ec x = + is not a valid weighting function.

Q4.
One-dimensional steady fully developed fluid flow takes place between two parallel
plates (this effectively implies that the transient and advection terms in the momentum
equation turn out to be identically zero) with zero pressure gradient. However, the flow is
subjected to other body forces dependent on the position and velocity, so that the
corresponding governing equation for velocity in a non-dimensional form becomes
2
2
0
d u
u x
dx
+ + = , with (0) (1) 0 u u = = .
Considering a trial function of sin u a x = , determine the value of the parameter a by
following the least square method, the point collocation method ( considering a single
collocation point as the mid point of the domain) , Galerkins Method and Rayleigh Ritz
Method
Solution

( ) ( )
2
2
0
0 1 0
d u
u x
dx
u u
+ + =
= =

Trial function is given as sin
approx
u a x =
Differentiating the trial function with respect to x twice, we get
cos
approx
du
a x
dx
=
2
2
2
sin
approx
d u
a x
dx
=
The residual becomes

2
2
2
sin sin
approx
approx
d u
R u x
dx
a x a x x
= + +
= + +

or,
( )
2
sin 1 R x a x = +

i) Least Square Method.
1
2
0
0 R dx
a



1
0
0
R
R dx
a


( ) { } ( ) { }
1
2 2
0
sin 1 1 sin 0 x a x x dx + =


( ) { }
1
2
0
sin 1 sin 0 x a x x dx + =


( )
1 1
2 2
0 0
sin 1 sin 0 x xdx a xdx + =


( )
1 1
2
2
0 0
cos sin 1
1 0
2
x x x
a


( ( | |
+ + =
|
( (
\

( )
2
1
1 0
2
a

+ =
( )
2
2
1
a

=


( )
2
2
sin
1
u x

=



ii) Point collocation Method :
0.5
0
x
R
=
=
( )
2
1
sin 1 0
2 2
R a x

= + =
2
1
1
a


2
1
sin
1
u x




iii) Galerkins Method

According to Galerkins Method, weighting function is equal to trial function. Therefore,
Weighting function sin w x =
( ) { }
1
2
0
sin 1 sin x a x xdx +


( )
1 1
2 2
0 0
1 sin sin 0 a x x xdx + =


( )
1
0
1
2 2
0
sin
1 sin
x xdx
a
x


( )
2
2
1
=



( )
2
2
sin
1
u x

=



iv) Rayleigh Ritz Method
1 2
2
0
0
u
u x vdx
dx
| |
+ + =
|
\


1 1 1 2
2
0 0 0
0
u
vdx uvdx vxdx
dx

+ + =


1 1 1 1
0 0 0 0
0
du dv du
v dx uvdx vxdx
dx dx dx
(
+ =
(



1 1
0 0
du dv
uv dx vxdx
dx dx
| |
=
|
\


( ) ( ) , a u v l v =
( ) ( )
1
,
2
a u u l u =
2
1 1
2
0 0
1
2
du
u dx uxdx
dx
| |
| |
= |
|
|
\
\


( )
1 1
2 2 2 2 2
0 0
1
cos sin sin
2
a x a x dx xa xdx =


2 2 2
1 1
2 2 2 2
a a a

=
0
a

=


2
2
0
4 2
a a a

=
( )
2
2
1
a

=


( )
2
2
sin
1
u x

=

Anda mungkin juga menyukai