ENGR 590: FINITE ELEMENT ANALYSIS I
MATLAB PROGRAN FILES
Instructor: Dr. Chris Mullen 
(http://www.olemiss.edu/~cvchris)
(Last Update: 3-23-01)



 

Select Matlab program by m-file name given below:

1-:   e31.m;   
2-:
(Mainroutine):BV1D.m;BV1Da.m;
(Subroutines):addstf.m;bc.m;disbc.m;disptr.m;el1d1.m;lcoord.m;ldisbc.m;loads.m;local.m;lpress.m;
3-:(Mainroutine-replaces BV1D.M) BV2D.m;
(Subroutine-replaces el1d1.m):  RectHeat.m;
4-:Gauss2.m

The discussion below provides sample output files obtained by executing the above input files, along with a brief description of the problem solved.



Download files presented in class on date shown next to hypertext above. All files are text files, hence the "*.txt" extension.
You may execute them on a PC containing the Matlab software (see below), but you must first rename the files so that they have the form "filename.m" without the quotation marks.
Double clicking the mouse on the Matlab icon initiates the Matlab session.
At the prompt, type "filename" without any extension and the "m-file" will be executed.
f you do this successfully, you will obtain the results given in the output file, "filename.out", which was created by first typing the command, "diary filename.out", at the Matlab prompt before executing the m-file.
To close the output file, type "diary off".
These steps are spelled out in the Matlab User's Guide (see below).

You may access Matlab on PC's in the Civil Engineering Computer Graphics Lab (CECGL), Room 213 on the second floor of Carrier Hall, either the Windows 2000 version or through XWin32 login to your Sweetgum class account. A user's guide is available in the CECGL, but an on-line manual is available by typing "help" at the Matlab prompt.

Running on the PC's requires a student account for the CECGL obtained by contacting the instructor.


In class, the m-file,e31.m , was used to solve a simple 3-DOF spring-cart system using particle equilibrium and the direct stiffness method. Diary files of the solutions are given in the text file, e31.out .


In class, the m-file, BV1D.m, was presented to solve the model 1d boundary value problem given in in class. The computed output file is, BV1D.out. An example of a solution involving nonzero homogeneous and particular contributions is given in the input file,BV1Da.m , with output file, BV1Da.out.  The main routine calls a number of subroutines (called functions in Matlab): addstf.m,bc.m,disbc.m,disptr.m,el1d1.m,lcoord.m,ldisbc.m,loads.m,local.m,lpress.m.


In class, the m-file, BV2D.m, was presented to solve the model 2d boundary value problem for the heat equation given in in class. BV2D calls all the same subroutines as BV1D except that the element matrices are formed in the file, RectHeat.m, instead of el1d1. The computed output file is, BV2D.out