This study thoroughly explains the process of implementing Adaptive Mesh Refinement into a Finite Element Analysis program. Using the error norm, a routine for improving an original mesh for an arbitrary 2D structural problem has been developed. By utilizing user-defined relative global error, an optimal mesh for a given level of approximation can be obtained in an iterative manner. The routine (called AMG v1.0) runs with the pre-/postprocessor GiD and the calculation module Calsef, but can easily be tailored to work with other FEA programs. AMG operates with two mesh optimality criteria, which have proven to refine the mesh in a non-oscillatory manner. The open structure, along with the Graphical User Interface, makes AMG suitable for educational and experimental purposes. For validation, six examples within the field of structural engineering have been solved, four of which have been compared favorably with analytical solutions.
The mesh optimality routines used are general, why AMG can be extended to handle more types of elements, 3D analysis, and to be applicable to other types of engineering problems. Above all AMG serves as a first step of implementing Adaptive Mesh Refinement procedures into GiD.