Biomedical Engineering Reference
In-Depth Information
Shape functions The shape functions and their derivatives are needed at the integration
points ( ξ i )and d / d ξ . The shape function values are stored in the array n such that
at the i -th integration point
T (
ξ i )
= n(i,:) .
Using these shape functions the coordinate x (
ξ i ) within element e can be computed at
the i -th integration point:
T (
x (
ξ
i )
=
ξ
i ) e = n(i,:) * nodcoord .
Similarly, the value of the solution at the i -th integration point of element e is
obtained via
T (
ξ i )
=
ξ i ) e = n(i,:) * nodu .
u (
In a similar fashion the shape function derivatives with respect to the local coordinate
ξ
arestoredinanarray,called dndxi .
Structure of the Finite Element code Typically the structure of a finite element
programme is as follows.
(i) Pre-processing: mesh generation, boundary condition specification and parame-
ter declaration. This should provide the topology array top , the coordinate array
coord and a number of auxiliary arrays containing boundary conditions and
material parameters.
(ii) Based on the mesh and element types used, the index array pos can be computed.
(iii) Assembly of the coefficient matrix q =
K and the element array rhs =
f
.Let
qe = K e and rhse = f
e , then the assembly process in a MATLAB environment
would look like
% nelem: the number of elements
for ielem = 1:nelem
% compute qe and rhse
[qe,rhse]=<elementfunction>(ielem,coord,top,.....)
% get the location of the degrees of freedom
% in the solution array
ii = nonzeros(pos(ielem,:));
% add the element coefficient matrix
% and the element right-hand side array
 
Search WWH ::




Custom Search