Finite Element

© All Rights Reserved

3 views

Finite Element

© All Rights Reserved

- Quadrilateral (1)
- Introduction to Finite Element Method-University of Colorado at Boulder
- Lecture 01 - Intro to FEM
- Finite Element 3D Magnetic Field Computation
- What is the Difference Between First and Third Angle Projection
- R and Octave
- Using a Computer Algebra System to Teach the Finite Element Method
- Chapter 1
- Hp 48gII User's Guide English
- Fem Dentistry
- Apple iPhone 6 Plastic Deformation Analysis
- soil structure.pdf
- Ch1_IntroFEA[2].pdf
- Finite Element Analysis
- Further Maths Matrices SAC 2010
- Visualizing structural matrices in ANSYS using APDL
- Bhargava&Sharma(2012)
- ABS-G-Guidance on Spectral-Based Fatigue Analysis for Vessels-Jan-2012
- Assignment 1
- anchorage zone in post tension member

You are on page 1of 6

We look in detail at the solution of the following boundary value problem (Textbook ex5.9.1): Let D

its closure, and D = {(x, y) : x = 0, 5, 0

be the rectangle D = {(x, y) : 0 < x < 5, 0 < y < 10}, D

R, u V = C(D)

C 2 (D)

y = 10, y = 0, 10, 0 x 5} its boundary. Find the function u : D

(i.e., u continuous on D with continuous second partial derivatives in D) satisfying the differential

equation

2u 2u

+ 2 = 0 (x, y) D,

x2

y

and the following boundary conditions: On the portion D1 of D, u is required to satisfy: u(x, 0) =

0, u(x, 10) = 100 sin(x/10), 0 x 5, and on the portion D2 of the boundary u(0, y) =

0, u(5, y)/x = 0, 0 y 10. (Of course, D = D1 D2 . )

Let V = {u V : u satisfies the given boundary conditions on D1 }, and V0 = {u V : u =

0 on D1 }. The weak form of this problem is: Find the function u V such that

Z

(v u) dA = 0

D

PN

for all v V0 . Using (linear) interpolation on triangular elements, we take u = j=1 j uj , where

j is the tent function which takes value 1 at node j and drops to zero at all adjacent nodes in the

triangularization of D, uj is the value of the solution at node j (uj are given at nodes on D1 , and

must be determined at all other nodes), and N is the number of nodes in the triangularization of D.

The admissible test functions v are those tent functions i corresponding to nodes i which do not

lie on D1 . Thus, if N2 is the number of nodes not on D1 , there are N2 unknown nodal values uj ,

and N2 equations obtained by selecting the admissible i .

It is necessary

to use integration by parts in forming the weak formulation, because the trial function

P

u = j uj j and the various test functions i that we choose in our implementation of the finite

element method do not really belong to the required subspaces of V (V and V0 respectively). In order

that the weak form make sense for our chosen method of interpolation, we cannot allow derivatives

higher than the first order. Just as in the 1D case, the justification for relaxation of the original

smoothness requirements is beyond the scope of our course.

function ex591a(nx,ny)

%---------------------------------------------------------------------------% modified version of EX5.9.1.m

% to solve the two-dimensional Laplaces equation given as

%

u,xx + u,yy =0, 0 < x < 5, 0 < y < 10

%

u(x,0) = 0, u(x,10) = 100sin(pi*x/10), u(0,y) = 0, (essential bcs)

%

u,x(5,y) = 0 (natural bc -- can ignore since specified value is 0)

% using linear triangular elements

%

% Variable descriptions

%

k = element matrix

%

f = element vector

%

kk = system matrix

%

ff = system vector

%

gcoord = coordinate values of each node

%

nodes = nodal connectivity of each element

1

%

index = a vector containing system dofs associated with each element

%

bcdof = a vector containing dofs associated with boundary conditions

%

bcval = a vector containing boundary condition values associated with

%

the dofs in bcdof

%---------------------------------------------------------------------------%-----------------------------------% input data for control parameters

%------------------------------------

nel=2*nx*ny;

% number of elements

nnel=3;

% number of nodes per element

ndof=1;

% number of dofs per node

nx1=nx+1; ny1=ny+1;

nnode=nx1*ny1;

% total number of nodes in system

sdof=nnode*ndof;

% total system dofs

xl=0; xr=5;

yb=0; yt=10;

%--------------------------------------------% input data for nodal coordinate values

% gcoord(i,j) where i->node no. and j->x or y

% and data for nodal connectivity for each element

% nodes(i,j) where i-> element no. and j-> connected nodes

%--------------------------------------------[gcoord, nodes]= gridgen([xl,yb], [xr,yt],nx,ny,2);

gridplot(nx,ny,gcoord,nodes,2);

%------------------------------------% input data for boundary conditions

%------------------------------------bcdof=[1:nx1,...

nx1+1:nx1:nx1*(ny1-2)+1,...

nx1*(ny1-1)+1:nx1*ny1];

sz=size(bcdof);

nbn=sz(2);

bcval=zeros(1,nbn); xx=linspace(xl,xr,nx1);

bcval(nbn-nx1+1:nbn)=100*sin(pi*(xx-xl)/10);

%----------------------------------------ff=zeros(sdof,1);

kk=zeros(sdof,sdof);

% initialization of system matrix

index=zeros(nnel*ndof,1);

%----------------------------------------------------------------for iel=1:nel

% loop for the total number of elements

nd=nodes(iel,:); % 1 by 3 matrix of global node numbers

ndpts=gcoord(nd,:); % coordinates of element nodes

x=ndpts(:,1); y=ndpts(:,2);

index=feeldof(nd,nnel,ndof);% extract system dofs associated with element

k=felp2dt3(x(1),y(1),x(2),y(2),x(3),y(3)); % compute element matrix

kk=feasmbl1(kk,k,index); % assemble element matrices

end

%----------------------------%

apply boundary conditions

%----------------------------[kk,ff]=feaplyc2(kk,ff,bcdof,bcval);

%---------------------------% solve the matrix equation

%---------------------------fsol=kk\ff;

%--------------------% analytical solution

%--------------------dx=xr-xl; dy=yt-yb;

for i=1:nnode

x=gcoord(i,1); y=gcoord(i,2);

esol(i)=100*sinh(pi*(y-yb)/dy)*sin(pi*(x-xl)/(2*dx))/sinh(pi);

end

%-----------------------------------% print both exact and fem solutions

%-----------------------------------num=1:sdof;

fprintf(%10s %10s %10s\n,node, fem soln, exact);

fprintf(%10.0f %10.3f %10.3f\n, [num; fsol; esol]);

%================================================================

% Textbook supplied functions

%================================================================

function [index]=feeldof(nd,nnel,ndof)

%---------------------------------------------------------% Purpose:

%

Compute system dofs associated with each element

%

% Synopsis:

%

[index]=feeldof(nd,nnel,ndof)

%

% Variable Description:

%

index - system dof vector associated with element "iel"

%

iel - element number whose system dofs are to be determined

%

nnel - number of nodes per element

%

ndof - number of dofs per node

%----------------------------------------------------------edof = nnel*ndof;

k=0;

for i=1:nnel

start = (nd(i)-1)*ndof;

for j=1:ndof

k=k+1;

index(k)=start+j;

end

end

%===================================================================

function [k]=felp2dt3(x1,y1,x2,y2,x3,y3)

%------------------------------------------------------------------% Purpose:

%

element matrix for two-dimensional Laplaces equation

%

using three-node linear triangular element

%

% Synopsis:

%

[k]=felp2dt3(x1,y1,x2,y2,x3,y3)

%

% Variable Description:

%

k - element stiffness matrix (size of 3x3)

%

x1, y1 - x and y coordinate values of the first node of element

%

x2, y2 - x and y coordinate values of the second node of element

%

x3, y3 - x and y coordinate values of the third node of element

%------------------------------------------------------------------% element matrix

A=0.5*(x2*y3+x1*y2+x3*y1-x2*y1-x1*y3-x3*y2); % area of the triangule

k(1,1)=((x3-x2)^2+(y2-y3)^2)/(4*A);

k(1,2)=((x3-x2)*(x1-x3)+(y2-y3)*(y3-y1))/(4*A);

k(1,3)=((x3-x2)*(x2-x1)+(y2-y3)*(y1-y2))/(4*A);

k(2,1)=k(1,2);

k(2,2)=((x1-x3)^2+(y3-y1)^2)/(4*A);

k(2,3)=((x1-x3)*(x2-x1)+(y3-y1)*(y1-y2))/(4*A);

k(3,1)=k(1,3);

k(3,2)=k(2,3);

k(3,3)=((x2-x1)^2+(y1-y2)^2)/(4*A);

%======================================================================

function [kk]=feasmbl1(kk,k,index)

%---------------------------------------------------------% Purpose:

%

Assembly of element matrices into the system matrix

%

% Synopsis:

%

[kk]=feasmbl1(kk,k,index)

%

% Variable Description:

%

kk - system matrix

%

k - element matri

%

index - d.o.f. vector associated with an element

%-----------------------------------------------------------

edof = length(index);

for i=1:edof

ii=index(i);

for j=1:edof

jj=index(j);

kk(ii,jj)=kk(ii,jj)+k(i,j);

end

end

%=============================================================

function [kk,ff]=feaplyc2(kk,ff,bcdof,bcval)

%---------------------------------------------------------% Purpose:

%

Apply constraints to matrix equation [kk]{x}={ff}

%

% Synopsis:

%

[kk,ff]=feaplybc(kk,ff,bcdof,bcval)

%

% Variable Description:

%

kk - system matrix before applying constraints

%

ff - system vector before applying constraints

%

bcdof - a vector containging constrained d.o.f

%

bcval - a vector containing contained value

%

%

For example, there are constraints at d.o.f=2 and 10

%

and their constrained values are 0.0 and 2.5,

%

respectively. Then, bcdof(1)=2 and bcdof(2)=10; and

%

bcval(1)=1.0 and bcval(2)=2.5.

%----------------------------------------------------------n=length(bcdof);

sdof=size(kk);

for i=1:n

c=bcdof(i);

for j=1:sdof

kk(c,j)=0;

end

kk(c,c)=1;

ff(c)=bcval(i);

end

%=============================================================

- Quadrilateral (1)Uploaded byTHRESNA
- Introduction to Finite Element Method-University of Colorado at BoulderUploaded byfankenstain
- Lecture 01 - Intro to FEMUploaded byVadym S. Kiyashko
- Finite Element 3D Magnetic Field ComputationUploaded byant7dotcom
- What is the Difference Between First and Third Angle ProjectionUploaded byVenkat R Vijay
- R and OctaveUploaded byHugoAlexanderTorresMantilla
- Using a Computer Algebra System to Teach the Finite Element MethodUploaded byyesullen
- Chapter 1Uploaded byUsama Perwez
- Hp 48gII User's Guide EnglishUploaded byFabio Di Fusco
- Fem DentistryUploaded byTarn Kappe
- Apple iPhone 6 Plastic Deformation AnalysisUploaded bydevoncates
- soil structure.pdfUploaded byAshok Mache
- Ch1_IntroFEA[2].pdfUploaded bySiva Koneru
- Finite Element AnalysisUploaded byBalaji Balu
- Further Maths Matrices SAC 2010Uploaded byJainam11
- Visualizing structural matrices in ANSYS using APDLUploaded byVivaCharles
- Bhargava&Sharma(2012)Uploaded byElizabeth Santiago
- ABS-G-Guidance on Spectral-Based Fatigue Analysis for Vessels-Jan-2012Uploaded byAlicia Johnson
- Assignment 1Uploaded byShyam Bhat
- anchorage zone in post tension memberUploaded byManan Patel
- o1662Uploaded byRatulKumarMajumdar
- AJAY REPORTUploaded byAjayChouhan
- S3Uploaded byPraveen Sreedharan
- 001-006_for_webUploaded byLungani Sibindi
- Chapter 3Uploaded byEmre Uysal
- Representing Data in RUploaded byMySchizoBuddy1
- Matrix RotationUploaded byjoymage21
- 760352204_ftp_2Uploaded byIbrahimFikry
- Frequency responses for sampled-data systemsUploaded byrcloudt
- SE130B-HW1Uploaded byYannis Koutromanos

- Structural MechanicsUploaded byDirkPons
- 1305635132_538742Uploaded byHasen Bebba
- What Plumbing Designers Need to Know About Valves, Part 2.pdfUploaded byHasen Bebba
- Basic Operation and Function Of_ControlValvesUploaded byAndrew Bailey
- Grease processingUploaded byRishikesh Awale
- me471s03_syUploaded byHasen Bebba
- ABB Control ValveUploaded byHafzi
- Advantages of Globe ValvesUploaded byJohn Rey Tumala
- Brainstorming (1)Uploaded byAli M. Chehadeh
- CDC UP Project Management Plan TemplateUploaded byMими Кољушкова
- me471s03_q2_ansUploaded byHasen Bebba
- me471s03_q1_ansUploaded byHasen Bebba
- me471s03_lec11aUploaded byHasen Bebba
- me471s03_lec10Uploaded byHasen Bebba
- me471s03_lec09Uploaded byHasen Bebba
- me471s03_lec08Uploaded byHasen Bebba
- me471s03_lec07Uploaded byHasen Bebba
- me471s03_lec06Uploaded byHasen Bebba
- me471s03_lec05Uploaded byHasen Bebba
- me471s03_lec04Uploaded byHasen Bebba
- me471_prob5_8Uploaded byHasen Bebba
- me471_lec03Uploaded byHasen Bebba
- me471_lec02Uploaded byHasen Bebba
- me471_lec01Uploaded byHasen Bebba
- me471_lec00Uploaded byHasen Bebba
- me471_hwk06ansUploaded byHasen Bebba
- me471_hwk05ansUploaded byHasen Bebba
- me471_hwk04ansUploaded byHasen Bebba

- chenqUploaded bySiwakorn Sangworn
- A General Cuboidal Element for Three-Dimensional Thermal ModellingUploaded byAlejandro Antonio Ferrada Jara
- VEEM Propeller BrochureUploaded byMaurizio Bernasconi
- FEKO Example GuideUploaded byFilip Angelovski
- DocumentUploaded byWilliam Thomas
- Stress SimulationUploaded byapi-3857201
- Modeling High Rate Ballistic Impact With Abq Explicit 13Uploaded byDmitry Grenishen
- Concrete Pavements - Journal PaperUploaded byElango Paulchamy
- 2.Thermal Analysis of AnUploaded byrk
- Elementos finitosUploaded byJorge Llimpe Rojas
- Practical-Design-of-Concrete-Shells.pdfUploaded byAndrija
- 10-Triwong-GagnoudUploaded bysakthistory1922
- Safety of Hystorical Stone Arch BridgesUploaded byOlivera Vušović Čolović
- FLUID FLOW IN POROUS MEDIA MAGIC09_Poster.pdfUploaded byManuelPérez
- FEA Impotent Unit IIUploaded bybalusharma1212
- Integrity_Evaluation_of_Small_Bore_Connections_(Branch_Connections).pdfUploaded byHendra Yudistira
- Ratna Maya Rai-15 ReportUploaded byMishal Limbu
- 001_openfoam ¹ßÇ¥ÀÚ·áUploaded byAntonio Martín Alcántara
- Li Et Al-2018-The Structural Design of Tall and Special BuildingsUploaded byscri_kk
- Slope Paper 229Uploaded bygipale31
- PlaxisUploaded bytrannguyenviet
- A SIMPLE AND EFFICIENT FINITE ELEMENT FOR GENERAL SHELL ANALYSISUploaded bynargissuhail
- jnUploaded byshaikh85
- Computer Aided Modeling and Analysis LaboratoryUploaded byDheeraj Jha
- Rdso Guide Lines Fr BridgesUploaded byUtpal Kant
- SPH 2Uploaded byAaniya Cyril
- gmyrek2010.pdfUploaded bySuda Krishnarjunarao
- IFEM.ch06.SlidesUploaded byAbdi Mehdi
- 6 Modal Frequency Response AnalysisUploaded byvijaykumarb1987
- Criteria 3 -21.11.2018 2.30pm.pdfUploaded byshivakees