Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Plotting FEM contour using matlab

463 views
Skip to first unread message

Ali Afzali-Kushaa

unread,
Jun 21, 1995, 3:00:00 AM6/21/95
to
I would like to use matlab to plot contours of potential obtained from a
finite element method (FEM). Not only the mesh is not uniform, but also for
any given x-point, there are different y-points, which reflects the level of
accuracy that we are interested for a specific region. Please knidly let me
know if there is a way I can do that.

Thanks,

Ali Afzali-Kushaa

Kirill Pankratov

unread,
Jun 22, 1995, 3:00:00 AM6/22/95
to

Hello,

A variety of programs to interpolate and visualize
spatial irregular data is contained in my package SaGA -

Spatial and Geometrical Analysis toolbox.
------------------------------------------

It can triangulate data and plot a triangulated
"patchwork" surface or grid it by other methods, such
as objective mapping, kriging, inverse distance, etc.

SaGA is shareware.
See License file for registration information.

SaGA is available on the web under URL:
homepage:
http://puddle.mit.edu/~kirill/PUB/MATLAB/SAGAHTML/saga.html
directory:
http://puddle.mit.edu/~kirill/PUB/MATLAB/SAGA
archives:
http://puddle.mit.edu/~kirill/PUB/MATLAB/SAGA_Z

Concerning errors and confidence limits,
there are several ways to deal with it. Objective
mapping, for example, allows to take relative error
level into account intrinsically, while performing the
interpolation. Another way is to separately map
the mean and variance at each point.

Let me know if you have further questions or have any
difficulties getting to the SaGA web site.

Regards, Kirill

``````````````````````````````````````````````````````````
Kirill Pankratov, Ph.D.

54-1523, Dept. of Earth, Atmos. & Planetary Sci.
Massachusetts Institute of Technology
Cambridge, MA, 02139

kir...@plume.mit.edu
Office (617)-253-5938
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

Sandeep

unread,
Jun 23, 1995, 3:00:00 AM6/23/95
to afz...@dip.eecs.umich.edu
afz...@dip.eecs.umich.edu (Ali Afzali-Kushaa) wrote:
>I would like to use matlab to plot contours of potential obtained from a
>finite element method (FEM). Not only the mesh is not uniform, but also for
>any given x-point, there are different y-points, which reflects the level of
>accuracy that we are interested for a specific region. Please knidly let me
>know if there is a way I can do that.
>

This should be fairly easy to do..

Assuming the element connectivity matrix IX and the node coords XY are known ,
that is

%IX(i,:) = nodes of element i
%XY(j,1),XY(j,2) = x and y coordinates of node j
numnp= num. of node points
%numel= num. of elements
%npe = nodes per element (works for 3 and 4 nodes elelments only!!)
%dof1,dof2,dof3... represent the degrees of freedom...

x1 = reshape(XY(IX,1),numell,npe)';
y1 = reshape(XY(IX,2),numel,npe)';
dof1 = reshape(dof1(IX),numel,npe)';
%dof2 = etc...

p = patch(x1,y1,dof1,dof2,dof3);

This does a patch plot of the 2-D surface. If you want a false colormap or
want to get rid of the outlines for the mesh:

shading interp

colormap (prism) will give an approximate contour map..


Hope this helps

Sandeeep


0 new messages