0% found this document useful (0 votes)
10 views

Assignment4 Solution

Uploaded by

RAHUL KUMAR
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)
10 views

Assignment4 Solution

Uploaded by

RAHUL KUMAR
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/ 11

SOLUTIONS OF SELECTED PROBLEMS OF EXERCISE 4

ANS 4.7

d2y dy
Differential equation: 5  7y  0
dx 2
dx
Galerkin method:
Let w be an arbitrary weight function:

 w(
d2y dy
h
 5  7 y )dx=0
0
dx 2
dx
Integrating by parts:

 dx+5 w dx+7  wydx=0


dy dw dy dy
h h h h
w
dx 0 0 dx dx 0
dx 0

 dx-5 w dx-7  wydx=w


dw dy dy dy
h h h h

0
dx dx 0
dx 0
dx 0

Aproximating y and w by shape fun.:


y   N   y ne  w   wne   N 

 x
1  h 
Where N    h=element length
x 
 h 

On putting these values, we get:


 dy 
 dx 
0  w   N, x   N, x  dx  y   50  w   N   N, x  dx  y   7 0  w   N   N  dx  y    w   dy 
ne  0
h h h
 ne
 ne
 ne
 ne
 ne
 ne
 
 
 dx h 

 dy 
 dx 
   N , x   N , x  dx  5  N   N , x  dx  7   N   N  dx   y   
 h h h
 ne  0

0 0 0   dy 
 dx h 
……………since nodal values of weights are arbitrary

1
 dy 

  1 1 7  2 1  5  1 1   y1   dx 0 
On integrating : 2           
  1 1  12 1 2  2  1 1   y2   dy 
 dx h 
……… see 4.31&4.32 from lecture notes(8-10 )

 dy 
 
1  40 61   y1   dx 0 
     …………………element equation
12  1 20   y2   dy 
 dx h 

For 2 elements:

 dy 
 
 40 61 0   y1   dx 0 
1     
 1 20 61   y2   0 
12   
 0 1 20  y3  dy 
 
 dx 1 
Using boundary conditions
y=0 at x=0
y’=0 at x=1

1  20 61   y2  0 
  
12  1 20   y3  0 

y2  0
y3  0
For given differential equation and boundary conditions we will get zero nodal
displacements, no matter how many elements we take.

Exact solution:
3
y  e ( A cos  x  B sin  x) where   2.5 ,  
2

On putting boundary conditions, we get A=0 B=0

i.e. y=0

2
ANS 4.8

Solution:

Since the given equation is in variational form. Therefore we can directly proceed, before
that we have to first convert 10 u(1) into a function by using the property of deriac delta
function.
Therefore we can rewrite the above equation as:

I   5( ) dx  10  uδ(1  x )dx
du 2
1 1

0
dx 0
Now putting
u  u ne   N 

We will get

I   5 u ne   N , x   N , x  u ne  dx  10 u ne   N  δ(1  x )dx


1 1

0 0

1  x / h 
Putting N    & solving, we get
x / h 

 u   10 
 1 1 ne 1  x / h  ne
I  5 / h u ne    u 
 1 1   x / h 1

I
Now finding =0
 u ne 

 u   10   =0
I  1 1 ne 0 
 10 / h 
 u   1 1  1 
ne

 u   10   -----------------------------(1)
 1 1 ne 0 
10 / h 
 1 1  1 

1. Now discretizing the whole domain into 1 element:

Putting h=1,

3
We have,
 1 1 u1  0 
10      10  
 1 1  u2  1 

Also we have, u1 =0,


Therefore, on solving above equation we get

u2 =1

2. Now discretizing the whole domain into 2 elements:

We already know that the assembled matrix will be

 1 1 0  u1  0 
    
10 / h  1 2 1 u2   0 
 0 1 1  u  10 
  3  

Putting h=0.5, & u1 =0 we will get,


u2 =0.5 & u3 =1

3. Now discretizing the whole domain into 3 elements:

For three elements the resulting assembled matrix will be

 1 1 0 0  u1  0 
  
 1 2 1 0  u2  0 
10 / h   
 0 1 2 1 u3  0 
 
 0 0 1 1  u4  10 

Putting h=1/3 & u1 =0, we will get,

u2 =0.333, u3 =0.667 & u4 =1.000

Since u(1), is always coming out to be 1.000,and hence the solution is converging.

4
ANS 4.9
Variational form is given

 du  2 
I 
1

   (5  u )  dx
0  dx  

Derivative in variational form is first order


So minimum C0 continuity in displacement

Take two noded element


u  N 1u 1  N 2u 2

Shape functions of the linear element


N1  1 x
N2  x
N1
N    
 N 2

U can be written in matrix form as

u  une   N 
Element displacement matrix = u ne

u1 
T

une    
u 2 

Substitute this in variational form

5
I    une   N , x  N , x  une   5  une   N   dx
1

According to Ritz method derive I by element


0

displacement matrix u  ne

d une  0 
  N , x  N , x  une   5   N   dx
dI
1

By solveing above equation


 1 1 u1  1/ 2 0 
 1 1  u 2  5 1/ 2   0 
      

u1 is already known so eliminate first row and column

u2=2.5.

--------------------------------------------------------------

%Matlab program for solveing the problem


clear all
clc
n=input('enter upto how many elements :');
a=zeros(2,2);
a(1,1)=1;
a(2,1)=-1;
a(1,2)=-1;
a(2,2)=1;
m=1
for i=1:n
b=a;
c=zeros(i+1,i+1);

6
c(1,1)=a(1,1);
c(2,1)=a(2,1);
c(1,2)=a(1,2);
c(2,2)=a(2,2);

for k=2:m

c(k,k)=c(k,k)+b(1,1);
c(k,k+1)=c(k,k+1)+b(1,2);
c(k+1,k)=c(k+1,k)+b(2,1);
c(k+1,k+1)=c(k+1,k+1)+b(2,2);
end

ANS 4.10
N1=0.1, N2=N3=0.2.
Using N1  N 2  N 3  N 4  1 , we get N4=0.5.

ANS 4.11
Given problem in variational form is,

  du  2 
I       5u dx
1

 dx  
0  
Lagrangian shape functions are

7
By substituting we get,

N1  1  3 x  2 x 2
N2  4x  4 x2
N3   x  2 x 2

Let u e be the approximation inside n-noded element

u e  u ne   N 

Putting this value in I we get,

I   u ne   N , x   N , x  u ne  dx  5 u ne   N  dx
1 1

0 0

For extremizing the condition,


I
0
 u ne 

8
  N   N  u  dx  5  N  dx  0
1 1
ne
,x ,x
0 0

This is the element equation.


For 3-noded element ,
 7 8 1   u1  1 
1    5 
8 16 8 u2    4 
3 6
 1 8 7  u3  1 

Applying boundary condition u  0   0 and solving 2 by 2 matrix we get,

u2  1.875
u3  2.5

ANS 4.12
d2 y
he given differential equation is  5 ( x  0.5)  0
dx 2
By Ritz method,
Variational form of above differential equation is

d 2 y
h
 I n e
 (  5  ( x  0 .5 )) y ) d x  0
0
d x 2

It is for any general element of range (0 to h)

 ) d x  5  (  ( x  0 .5 )  y ) d x
dy dy dy
h h h
 I ne =  y  ( 
dx 0 0
dx dx 0

1
Using the variational property, u u   u 2
2

 I =  y    ( ) 2 dx  5 ( ( x  0.5) y)dx
dy 1 dy
h h h
ne

dx 0 2 0 dx 0

 I   y    ( ) 2 dx   5 y ( x  0.5)dx
dy 1 dy
h h h
ne

dx 0 2 0 dx 0

 I ne  0

y   ( )2 dx   5 y ( x  0.5)dx
dy 1 dy
h h h
I 
ne

dx 0 2 0 dx 0

9
 dy 
  dx  h
1
  
 y ne   N , x  N , x  y ne ne  h
   5  N   y   ( x  0.5)dx
h
I  dx   y   ne
ne

20  dy  0
 dx 0 

dI
ne

0
d  y ne 
 dy 
  dx  h
  N , x  N , x   y     5  N  ( x  0.5) dx
 h
h
ne
dx  
0  dy  0
 dx 0 

Using Dirac delta property…….. 0


1
 ( x  a ) f (t )  f (a)
…we get,

 dy 
  dx 
  N , x  N , x   y    5 N  0.5  …………….(1)
 h
h
ne
dx  
0  dy 
 dx 0 
Where,
0 
 N  0.5   
1 
 x x 
 N   (1  ) ( ) 
 h h 
 x 
(1  h ) 
N    
 ( x) 
 h 
1
 N , x    1 1
h
1 1
 N , x   
h1 
So now for first element the range of element is (0 to 0.5)
 dy 
  dx  0
1 1 1  y1   
0 h  1  h  1 1  y2  dx   dy   5
 1
0.5

 
 dx 2 

10
For first element on integration of equation between limits (0 to 0.5) we get,
 dy 
 
 1 1  y1   dx 1  0 
2     
 1 1   y2   dy  5 
 dx 2 
For second element range is (0.5 to 1)
 dy 
  dx 
1 1 1  y1 
0.5 h  1  h  1 1  y2  dx   dy 
 2
1

 
 dx 3 
For second element on integration of equation between limits (0.5 to 1) we get,

 dy 
 
 1 1  y2   dx 2 
2    
 1 1   y3   dy 
 dx 3 
On assembling the two elements and applying given boundary conditions
y=0, at x  0 …………..(1)
dy
 0, at x  1 ………….(2)
dx
We get,
 dy 
 
 1 1 0   y1   dx 1 
   
2  1 2 1  y2    5 
 0 1 1   y3   0 
 
 
 2 1 5
2  
 1 1   0 
On Solving we get,
y2  y3  2.5
y1  0

11

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