Tue 13.4. 1999

L8.html

FEM, triangle coordinates, quadr. shape functions

Handouts

Scanned transparencies

page 1 page 2 page 3 page 4

Maple ws (download) femtri.mws

Matlab-session (right below)


Recall from lecture 7.

Some more ideas

Suppose we exported the p,e,t and there are 9 nodes. Here's a nice way of seeing the basis (pyramid) functions:
for i=1:9;Id=eye(9,9);pdesurf(p,t,Id(:,i)); view(30,20);grid;pause;end;
(Just make a surface plot of the 9-dimensional coordinate unit vectors placed on the mesh points.)

Continue with lecture nr. 8, Apr 13

Shape functions , start with linear

See (download) also Maple ws femtri.mws

x=[0 1 1];y=[0 0 1];

fill(x,y,'g')   % Triangle with vertices at (x(i),y(i))

z=[1 0 0];fill3(x,y,z,'b');grid;hold on;fill(x,y,'g')

>> view(-30,20)
z=[0 1 0];fill3(x,y,z,'r')
z=[0 0 1];fill3(x,y,z,'y')

% Try various views

>> view(45,0) 
>> view(45,80)
>> view(130,70)

x1=[0 1 0.5];x2=[1 1 0.5];x3=[.5 1 0];x4=[0 .5 0];
y1=[0 0 .5];y2=[0 1 .5];y3=[.5 1 1];y4=[0 .5 1];

>> fill(x1,y1,'y',x2,y2,'b',x3,y3,'g',x4,y4,'r')

z1=[0 0 1];z2=[0 0 1];
fill3(x1,y1,z1,'y',x2,y2,z2,'b');grid
view(30,60) 

Quadratic shape functions:

x=[0  1  2 1.5 1 .5 0];
y=[0 0   0 .5 1 .5 0];
>> fill(x,y,'g')

Well, one idea is to build the p,t,e of pdetool and use pdesurf. That's worth trying (get aquanted with pdetool structures and tools also).