0% found this document useful (0 votes)
238 views7 pages

FEM Ritz Method

The document describes the Rayleigh-Ritz method for solving boundary value problems. It outlines the procedure, which involves finding the weak form, defining operators, selecting approximation functions, computing matrix and vector terms, and solving the resulting algebraic problem. It then provides an example MATLAB program that implements the Rayleigh-Ritz method to solve a 1D boundary value problem on the domain from 0 to 1 using polynomial basis functions. The program is used to demonstrate convergence as the number of basis functions increases.

Uploaded by

wiesler
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)
238 views7 pages

FEM Ritz Method

The document describes the Rayleigh-Ritz method for solving boundary value problems. It outlines the procedure, which involves finding the weak form, defining operators, selecting approximation functions, computing matrix and vector terms, and solving the resulting algebraic problem. It then provides an example MATLAB program that implements the Rayleigh-Ritz method to solve a 1D boundary value problem on the domain from 0 to 1 using polynomial basis functions. The program is used to demonstrate convergence as the number of basis functions increases.

Uploaded by

wiesler
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/ 7

Rayleigh‐Ritz


Method

Example
2.4


“Introduc=on
to
the
Finite
Element

Method”
–
JN
Reddy


Massimo Ruzzene
School of Aerospace Engineering
massimo.ruzzene@ae.gatech.edu
AE 6104 – Computational Mechanics Ph: (404) 894 3078
Procedure


•  Find
weak
form

•  Define
B(w,u)
and
l(w)
operator

•  Select
approxima=on
func=ons

•  Compute
B
and
f
terms

•  Solve
resul=ng
algebraic
problem


Massimo Ruzzene
School of Aerospace Engineering
massimo.ruzzene@ae.gatech.edu
AE 6104 – Computational Mechanics Ph: (404) 894 3078
A
simple
Matlab
program

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%Rayleigh‐Ritz
Method%AE6104
‐
Computa=onal
Mechanics
(Spring
2009)

%Example
2.4
Introduc=on
to
the
Finite
Element
Method

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

clear,
close
all,
clc


%Computa=onal
domain

x=linspace(0,1,100);
 %Calculate unknown coefficients
c=inv(B)*f;

%Order
of
approxima=on

%Compute response
n=1;
 u=zeros(size(x));

%Exact
solu=on

u_N=1/sin(1)*(sin(x)+2*sin(1‐x))+x.^2‐2;
 for i=1:n
Phi=(x.^(i)).*(1-x); u=u+c(i)*Phi;
end

for
i=1:n








%Approxima=on
func=ons
and
their
first
deriva=ve


 %Plot result agaisnt exact solution


Phi=(x.^(i)).*(1‐x);



Phi_x=i*x.^(i‐1)‐(i+1)*x.^i;



figure(1)





for
j=1:n




 plot(x,u,'o','linewidth',2), hold on




Phj=(x.^(j)).*(1‐x);







Phj_x=j*x.^(j‐1)‐(j+1)*x.^j;





 plot(x,u_ex,'r','linewidth',2)






%B
matrix






 xlabel('x','fontweight','bold','fontsize',12)
ylabel('u','fontweight','bold','fontsize',12)


B(i,j)=trapz(x,Phi_x.*Phj_x‐Phi.*Phj);





end





%f
vector





f(i,1)=‐trapz(x,(x.^2).*Phi);

end



Massimo Ruzzene
School of Aerospace Engineering
massimo.ruzzene@ae.gatech.edu
AE 6104 – Computational Mechanics Ph: (404) 894 3078
N=1


Massimo Ruzzene
School of Aerospace Engineering
massimo.ruzzene@ae.gatech.edu
AE 6104 – Computational Mechanics Ph: (404) 894 3078
N=2


Massimo Ruzzene
School of Aerospace Engineering
massimo.ruzzene@ae.gatech.edu
AE 6104 – Computational Mechanics Ph: (404) 894 3078
N=3


Massimo Ruzzene
School of Aerospace Engineering
massimo.ruzzene@ae.gatech.edu
AE 6104 – Computational Mechanics Ph: (404) 894 3078
Error


Massimo Ruzzene
School of Aerospace Engineering
massimo.ruzzene@ae.gatech.edu
AE 6104 – Computational Mechanics Ph: (404) 894 3078

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