文档介绍:Programing the Finite Element Method with
Matlab
Jack Chessa∗
3rd October 2002
1 Introduction
The goal of this document is to give a very brief overview and direction
in the writing of finite element code using Matlab. It is assumed that the
reader has a basic familiarity with the theory of the finite element method,
and our attention will be mostly on the implementation. An example finite
element code for analyzing static linear elastic problems written in Matlab
is presented to illustrate how to program the finite element method. The
example program and supporting files are available at
/
Notation
For clarity we adopt the following notation in this paper; the bold italics font
v denotes a vector quantity of dimension equal to the spacial dimension of the
problem . the displacement or velocity at a point, the bold non-italicized
font d denotes a vector or matrix which is of dimension of the number of
unknowns in the discrete system . a system matrix like the stiffness matrix,
an uppercase subscript denotes a node number whereas a lowercase subscript
in general denotes a ponent along a Cartesian unit vector. So, if d
is the system vector of nodal unknowns, uI is a displacement vector of node I
and uIi is ponent of the displacement at node I in the i direction, or
uI · ei. Often Matlab syntax will be intermixed with mathematical notation
∗Graduate Research Assistant, Northwestern University (j-******@)
1
which hopefully adds clarity to the explanation. The typewriter font, font,
is used to indicate that Matlab syntax is being employed.
2 A Few Words on Writing Matlab Programs
The Matlab programming language is useful in illustrating how to program
the finite element method due to the fact it allows one to very quickly code
numerical methods and has a vast predefined mathematical library. This is
also due to the fact that matrix (sparse and dense), vector and many linear
algebra tools are a