For many years I used general purpose finite element programs such as ANSYS. Then I decided to try and learn how to write finite element programs in Fortran. In addition to the books referenced below I also needed a Fortran compiler. Fortunately a free one was available at

In order to view a plot of the elements, a plotting program would be useful. One such program is available from The documentation for this program discusses a type of file called a VTK file. This is an ASCII file that can be built with a text editor and then the results are viewed using the program VISIT.

Rigid-Jointed Frame

(1) Programming the Finite Element Method by I. M. Smith and D. V. Griffiths, Third Edition, 1998.
(2) A Practical Introduction to Finite Element Analysis by Y. K. Cheung and M. F. Yeo, 1979.

One of the first interesting problems in Reference (1) is the rigid-jointed frame on page 134. The Fortran code given for solving the problem can be used on 2-d or 3-d configurations.

The loads on the beam frame have been redefined to avoid the "fixed end" calculation. See page 125 of Reference (1). Instead of eliminating the equations at points 1, 3 and 5, the restrained degrees of freedom have been set to zero. This is done in the last eight lines of the input file. The advantage of doing this is to make it easier to calculate the reaction loads at the restrained points. This methodology is discussed on page 60 of Reference (2).

The Fortran code for P44 has been modified to generate the VTK file. The VTK file is read by the program VISIT and the element plot is produced.

The reaction loads are calculated as the product of the displacement and -1.e20.
Point 1
x-displacement = 0.3060E-18
y-displacement = - 0.3065E-18
x reaction = -30.6
y reaction =30.65
Point 3
x-displacement = -0.3900E-18
y-displacement = -0.2334E-17
x reaction = 39
y reaction = 233.4
Point 5
x-displacement = 0.8400E-19
y-displacement = -0.1260E-17
x reaction = -8.4
y reaction = 126.0

For further information, please contact :

George Montgomery, PE

Home Page of George A. Montgomery, PE