Homework 1 with Problems - Finite Element Analysis | AE 420, Assignments of Aerospace Engineering

Material Type: Assignment; Class: Finite Element Analysis; Subject: Aerospace Engineering; University: University of Illinois - Urbana-Champaign; Term: Spring 2009;

Typology: Assignments

Pre 2010

Uploaded on 03/16/2009

koofers-user-oel
koofers-user-oel 🇺🇸

10 documents

1 / 11

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
AE420/ME471 – Homework assignment #1
Wednesday January 28, 2009
Due Wednesday February 11, 2009
Topic: Rayleigh-Ritz Method
Problem 1: Axially loaded bar
Consider the axially loaded bar shown below. The bar stiffness is E, its length is L and the cross-
section is A. The distributed axial load f(x) is given by
The exact solution for the maximum axial displacement measured in the middle of the bar as
The expression of the total potential energy for this structural system is
Using the simplest polynomial basis function, determine an approximate solution for the axial
displacement. Compare approximate and exact maximum axial displacements, i.e., compute the
relative error (in %).
Solution:
The governing differential equation is
This axial bar is constrained at both ends and hence the boundary conditions are
Both the b.c’s are essential boundary conditions and the choice of the basis function should
satisfy both the b.c’s.
The simplest polynomial basis function which satisfies both b.c’s is thus .
Thus the approximate solution to the problem using the Ritz method is
Substituting the approximate displacement into the expression of the potential energy yields:
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Homework 1 with Problems - Finite Element Analysis | AE 420 and more Assignments Aerospace Engineering in PDF only on Docsity!

AE420/ME471 – Homework assignment

Wednesday January 28, 2009

Due Wednesday February 11, 2009

Topic : Rayleigh-Ritz Method

Problem 1: Axially loaded bar

Consider the axially loaded bar shown below. The bar stiffness is E , its length is L and the cross-

section is A. The distributed axial load f(x) is given by

The exact solution for the maximum axial displacement measured in the middle of the bar as

The expression of the total potential energy for this structural system is

Using the simplest polynomial basis function, determine an approximate solution for the axial

displacement. Compare approximate and exact maximum axial displacements, i.e., compute the

relative error (in %).

Solution:

The governing differential equation is

This axial bar is constrained at both ends and hence the boundary conditions are

Both the b.c’s are essential boundary conditions and the choice of the basis function should

satisfy both the b.c’s.

The simplest polynomial basis function which satisfies both b.c’s is thus.

Thus the approximate solution to the problem using the Ritz method is

Substituting the approximate displacement into the expression of the potential energy yields:

Using the PMPE, we determine the value for the generalized coordinate by minimizing the

potential energy of the system:

Thus the approximate displacement solution is

The maximum displacement is found at the middle of the beam ( x=l/2 ) as

The analytical maximum displacement is. The numerical maximum

displacement is. Thus the relative error % is

Note: The problem can also be solved for the deflection of the whole beam and not just for the

axial displacement at the center. The analytical solution can be found by integrating the

governing differential equation twice.

num(i)=(eta(i)(1-eta(i)))/10;%Num soln end plot(eta,exact); hold; plot(eta,num); plot(eta,exact,'b-',eta,num,'go','linewidth',2) % plot 2 solutions xlabel 'eta-x/L' ylabel 'EAu(x)/(PoL^2)' title 'Rayleigh-Ritz method' legend('exact','numerical')

Problem 2: Beam bending

Consider the simple beam bending problem consisting of a linearly elastic cantilever beam

stiffness E , with a length L and a constant cross-section (moment of inertia I ) subjected to a

uniformly distributed downward transverse load po applied over its second half ( L/2≤x≤L).

1) Obtain the exact solution for the deflection w(x) of the beam. Put it in a nondimensional

form.

2) Solve the problem using the RRM with polynomial basis functions written as

Write the expression of the linear system that yields the unknown coefficients qi.

3) Write a (well commented) Matlab code that solves this problem for a user-defined

number N of basis functions. Compare graphically the approximate and numerical

solutions for a few values of N and comment on your solution.

4) Write a second (also well commented) Matlab code to perform a convergence

study on the value of the deflection at the end of the beam as a function of N. Plot

on a semi-log plot the error on the end deflection (i.e., w(L) ) as a function of N.

Comment on your solution.

Solution

The schematic of the loading situation is shown below.

The distributed loading on the second half of the beam can be treated using a step function. The

governing differential equation can be written as

. Note the negative sign on the loading term since the load acts

downwards.

l/2 Po l

The boundary conditions are

w(0)=0, w’(0)=0, EIw’’(L)=0, EIw’’’(L)=0.

The boundary conditions w(0)=0 and w’(0)=0 are essential boundary conditions while the other

two are natural boundary conditions.

1) The exact solution is found by direct integration of the GDE, remembering that the integration

of a step function is given by

Thus the exact solution is obtained as follows:

Using b.c’s w(0)=0 and w’(0)=0 , we find that the constants are 0.

Applying the other b.c., EIw’’’(L)=0 , we get

Applying the final b.c., EIw’’(L)=0, we get

Thus the exact solution is given by

2) The second part of the problem is to solve the problem using the RRM using basis functions

of the following nature

% The bar stiffness is E % The BC are w(0)=0, w'(0)=0, EIw''(L)=0 and EIw'''(L)=0. % The basis functions are of the form: fi(x)=x^(i+1) % u(x)={f} % The code builds the linear system % Kq=R % where % Kij=integral_from_0_to_L(EAf''if''j)dx % q is the vector with the unknown qi coefficients % Ri=-Pointegral_from_L/2_to_L(fi dx) format long e; % increase the precision of numbers clc % clears the command window of matlab clear % clears the defined variables in the workspace % First initialize the geometrical and material parameters E=1; % bar stiffness (in Pa) - can be set to 1 as we need to plot the dimensionless values L=1; % bar length (in m) - can be set to 1 as we need to plot the dimensionless values Po=1; % distributed load (in N/m) - can be set to 1 as we need to plot the dimensionless values I=1; % moment of inertia (in m^4) - can be set to 1 as we need to plot the dimensionless values N=input(' enter the number of polynomial basis functions') % initialize the solution matrix and vectors K=zeros(N,N); R=zeros(N,1); q=zeros(N,1); % Build the matrix K and RHS vector R for i=1:N % loop over rows for j=1:N % loop over columns K(i,j)=EIij(i+1)(j+1)((L^(i+j-1))/(i+j-1)); end R(i)=(-Po/(i+2))((L^(i+2))-((L/2)^(i+2))); end % Solve linear system q=inv(K)R; % Post-processing qaux=zeros(N+1,1); % create auxiliary vector with polynomial % coefficients to use command 'polyval' below for j=1:N qaux(j)=q(N+1-j); end x=linspace(0,1,100); % create x/L vector for plotting for i=1:1: yex(i)=(((-1/24)((x(i)-0.5)^4)heaviside(x(i)-0.5))+((1/12)(x(i)^3))- ((3/16)(x(i)^2)))((PoL^4)/(EI)); % exact solution E=I=Po=L= ynum(i)=(polyval(qaux,((x(i)L)))(x(i)))((PoL^4)/EI); % numerical soln end plot(x,yex,'b-',x,ynum,'go','linewidth',2) % plot 2 solutions xlabel 'x/L' ylabel 'EIu(x)/(Po*L^4)' title 'Rayleigh-Ritz method' legend('exact','numerical')

A graphical comparison between the numerical and approximate solutions for different values of

N is given below

  • N=
  • N=

% Solve linear system q=inv(K)R; % Post-processing qaux=zeros(N+1,1); % create auxiliary vector with polynomial % coefficients to use command 'polyval' below for j=1:N qaux(j)=q(N+1-j); end x=linspace(0,1,100); % create x/L vector for plotting %eta=P/(qoL); % non-dimensional parameter for i=1:1: yex(i)=(((-1/24)((x(i)-0.5)^4)heaviside(x(i)-0.5))+((1/12)(x(i)^3))- ((3/16)(x(i)^2)))((PoL^4)/(EI)); % exact solution E=I=Po=L= ynum(i)=(polyval(qaux,((x(i)L)))(x(i)))((PoL^4)/EI); % numerical soln end beam_tip_ex(N)=yex(100); beam_tip_num(N)=ynum(100); error(N)=abs(beam_tip_ex(N)-beam_tip_num(N)); Ni(N)=N;%variable just used for plotting purposes end semilogy(Ni,error) %Plot the semilog error plot xlabel 'N(1 to 10)' ylabel 'Abs Error (Exact-Num)' title 'Error in defl. at x=L' figure; % new figure plot(Ni,beam_tip_num) % plot beam defl. at x=L as a fn of N xlabel 'N(1 to 10)' ylabel 'Num Defl. at x=L' title 'Num Defl. at x=L'

The deflection at the end of the beam as a function of N is shown below.

The absolute error of the numerical solution as a function of N is given below

As apparent on this last plot, as N increases, the error on the end deflection drops very rapidly,

reaching about 10^(-16) for N=2. As N increases further, however, the numerical solution starts

to degrade due to the numerical error associated with the solution of the linear system with an

increasingly ill-conditioned matrix K.