Basic question on linear FEM

Please don't post Bullet support questions here, use the above forums instead.
mobeen
Posts: 122
Joined: Thu May 05, 2011 11:47 am

Basic question on linear FEM

Post by mobeen »

Hi all,
I am trying to do a basic linear FEM using this paper however there is something I am having difficulty to understand.

After obtaining the tetrahedra for the triangle mesh, the first thing we need to do is calculate the shape functions (H matrix (3x12) in the paper in eq. 1). Now from what I have read shape functions are nothing but the barycentric coordinates (b.c.) in a 3x3 diagonal matrix so we have 4 such matrices N0, N1, N2 and N3 containing the corresponding b.c. in them i.e. w0, w1, w2, w3. So it is like this,

Code: Select all

//w0, w1, w2, w3 are the barycentric coordinates
N0=[w0 0 0
    0 w0 0
    0  0 w0] 
N1=[w1 0 0
    0 w1 0
    0  0 w1] 
N2=[w2 0 0
    0 w2 0
    0  0 w2] 
N3=[w3 0 0
    0 w3 0
    0  0 w3] 
H=[N0 N1 N2 N3]
Now the barycentric coordinates are obtain with reference to a point. My question is which point do I use? Any ideas?
dneckels
Posts: 39
Joined: Mon Oct 12, 2009 6:23 pm

Re: Basic question on linear FEM

Post by dneckels »

Well, maybe I can help. I know very little about finite element for soft body but was once quite expert in implementing finite element for flow, heat, etc...

Each of the four nodes in the tet has a shape function (we're talking linear fem here). The function corresponding to a given node will be 1 at the node and 0 at all the other nodes. So, as you have noticed this somehow relates to barycentric coordinates. So, the shape function for node 0 at any point in the triangle will be the barycentric coordinate that corresponds to node0. Similar for node1, node2, etc...
So at a point in the tet your should have a value for each shape function, i.e. four values:
shape func 0 = w0, shape func 1 = w1, ..., shape func 3 = w3

As far as what to do with these?
Usually you end up evaluating the shape function values and the shape function gradient values (your will have three values per shape function) at some set of quadrature points within your tetrahedron, forming a stiffness/mass/rhs matrix, etc... doing a linear solve, etc....

Have you tried the fem wiki page? It will take some work, but it is quite good. It walks through the poisson problem (hear transfer) and would be well worth the time. Likely your elasticity problem will have similar operators for the stress tensor, although the multidimension aspects of the problem can get very confusing.

You also might look at the dealii project (www.dealii.org) as it has many problems solved (including deformation type problems).