Demonstration FEA Codes

Satisfaction

 (MAPLE)


 
To download these files, right-click the link and Save As...
  1. FEM_1D_Static.mws Simple static analysis of a 1D bar subjected to axial body force
  2. FEM_1D_newmark.mws Simple dynamic analysis of a 1D bar subjected to axial body force, using Newmark time integration.
  3. FEM_1D_modal.mws  Simple dynamic analysis of a 1D bar subjected to axial body force, using modal time integration.
  4. FEM_conststrain.mws   Simple 2D FEA code with constant strain triangles.  Should be run with the input file FEM_conststrain.txtor (for a larger problem) FEM_conststrain_holeplate.txt
  5. The following files all solve 2D or 3D static linear elastic problems, but illustrate various refinements of the finite element method:FEM_2Dor3D_linelast_standard.mws 2D(plane strain/stress) or 3D static linear elasticity code with fully integrated elements. The code can be run with the following input files.
  1. FEM_shear_locking_demo.mws - Solves the beam bending problem discussed in Section 8.6.2, and compares the FEM solution with the exact solution to illustrate shear locking. This version of the code must be run withshear_locking_demo_linear.txt (solution with 4 noded quad elements).
  2. FEM_incompatible_modes.mws - Solves the beam bending problem discussed in Section 8.6.2 using incompatible mode elements, and compares the FEM solution with the exact solution to demonstrate that the elements avoid shear locking. This version of the code must be run with shear_locking_demo_linear.txt (solution with 4 noded quad elements).
  3. FEM_volumetric_locking_demo.mws - Solves the pressurized cylindrical cavity problem discussed in Section 8.6.2, and compares the FEM solution with the exact solution. This version of the code must be run withvolumetric_locking_demo_linear.txt (solution with 4 noded quad elements) orvolumetric_locking_demo_quadratic.txt (solution with 8 noded quadrilateral elements).
  4. FEM_hourglassing_demo.mws - Solves the pressurized cylindrical cavity problem discussed in Section 8.6.2 with reduced integration elements, demonstrating hourglassing. This version of the code must be run withvolumetric_locking_demo_linear.txt (solution with 4 noded quad elements).
  5. FEM_selective_reduced_integration.mws - Solves the pressurized cylindrical cavity problem discussed in Section 8.6.2 using selectively reduced integration, and compares the FEM solution with the exact solution. This version of the code must be run with volumetric_locking_demo_quadratic.txt (solution with 8 noded quadrilateral elements).
  6. FEM_hourglasscontrol.mws - illustrates use of hourglass control to eliminate hourglassing in 4 noded quadrilateral elements.  This version of the code must be run with volumetric_locking_demo_linear.txt (solution with 4 noded quad elements)
  7. FEM_Bbar.mws – Solves the pressurized cylinder problem discussed in Section 8.6.2 using the B-bar method, and compares the solution with the exact solution. This version of the code must be run withvolumetric_locking_demo_linear.txt or volumetric_locking_demo_quadratic.txt.
  8. FEM_hybrid.mws – Solves the pressurized cylinder problem discussed in Section 8.6.2 using hybrid elements, and compares the FEM solution with the exact solution. This version of the code must be run withvolumetric_locking_demo_linear.txt or volumetric_locking_demo_quadratic.txt.
  1. FEM_2Dor3D_linelast_dynamic.mws: Solves 2D or 3D dynamic linear elasticity problems, using Newmark time integration. The code can be run with the input file Linear_elastic_dynamic_beam.txt.
  2. FEM_2Dor3D_modeshapes.mws: Calculates mode shapes and natural frequencies for a linear elastic solid. The code can be run with the input file Linear_elastic_dynamic_beam.txt.
  3. FEM_2Dor3D_hypoelastic_static.mws: Solves 2D (plane strain only) or 3D static problems for a hypoelastic material, as discussed in Section 8.3.9. The input file is Hypoelastic_quad4.txt.
  4. FEM_2Dor3D_hyperelastic_static.mws: Solves 2D (plane strain only) or 3D static problems for a hyperelastic (Neo-Hookean) material. An input file is provided in Hyperelastic_quad4.txt.
  5. FEM_2Dor3D_viscoplastic_static.mws: Solves 2D (plane strain only) or 3D static problems for a small strain viscoplastic material. An input file is provided in Viscoplastic_quad4.txt

(MATLAB)
To download these files, right-click the link and Save As...
  1. FEM_1D_Static.m Simple static analysis of a 1D bar subjected to axial body force
  2. FEM_1D_newmark.m Simple dynamic analysis of a 1D bar subjected to axial body force, using Newmark time integration.
  3. FEM_1D_modal.m  Simple dynamic analysis of a 1D bar subjected to axial body force, using modal time integration.
  4. FEM_conststrain.m   Simple 2D FEA code with constant strain triangles.  Should be run with the input file FEM_conststrain.txt or (for a larger problem) FEM_conststrain_holeplate.txt
  5. The following files all solve 2D or 3D static linear elastic problems, but illustrate various refinements of the finite element method:
    1. FEM_2Dor3D_linelast_standard.m 2D(plane strain/stress) or 3D static linear elasticity code with fully integrated elements. The code can be run with the following input files.
  1. FEM_shear_locking_demo.m - Solves the beam bending problem discussed in Section 8.6.2, and compares the FEM solution with the exact solution to illustrate shear locking. This version of the code must be run withshear_locking_demo_linear.txt (solution with 4 noded quad elements).
  2. FEM_incompatible_modes.m - Solves the beam bending problem discussed in Section 8.6.2 using incompatible mode elements, and compares the FEM solution with the exact solution to demonstrate that the elements avoid shear locking. This version of the code must be run with shear_locking_demo_linear.txt (solution with 4 noded quad elements).
  3. FEM_volumetric_locking_demo.m - Solves the pressurized cylindrical cavity problem discussed in Section 8.6.2, and compares the FEM solution with the exact solution. This version of the code must be run withvolumetric_locking_demo_linear.txt (solution with 4 noded quad elements) orvolumetric_locking_demo_quadratic.txt (solution with 8 noded quadrilateral elements).
  4. FEM_hourglassing_demo.m - Solves the pressurized cylindrical cavity problem discussed in Section 8.6.2 with reduced integration elements, demonstrating hourglassing. This version of the code must be run withvolumetric_locking_demo_linear.txt (solution with 4 noded quad elements).
  5. FEM_selective_reduced_integration.m - Solves the pressurized cylindrical cavity problem discussed in Section 8.6.2 using selectively reduced integration, and compares the FEM solution with the exact solution. This version of the code must be run with volumetric_locking_demo_quadratic.txt (solution with 8 noded quadrilateral elements).
  6. FEM_hourglasscontrol.m - illustrates use of hourglass control to eliminate hourglassing in 4 noded quadrilateral elements.  This version of the code must be run with volumetric_locking_demo_linear.txt (solution with 4 noded quad elements)
  7. FEM_Bbar.m – Solves the pressurized cylinder problem discussed in Section 8.6.2 using the B-bar method, and compares the solution with the exact solution. This version of the code must be run withvolumetric_locking_demo_linear.txt or volumetric_locking_demo_quadratic.txt.
  8. FEM_hybrid.m – Solves the pressurized cylinder problem discussed in Section 8.6.2 using hybrid elements, and compares the FEM solution with the exact solution. This version of the code must be run withvolumetric_locking_demo_linear.txt or volumetric_locking_demo_quadratic.txt.
  1. FEM_2Dor3D_linelast_dynamic.m: Solves 2D or 3D dynamic linear elasticity problems, using Newmark time integration. The code can be run with the input file Linear_elastic_dynamic_beam.txt.
  2. FEM_2Dor3D_modeshapes.m: Calculates mode shapes and natural frequencies for a linear elastic solid. The code can be run with the input file Linear_elastic_dynamic_beam.txt.
  3. FEM_2Dor3D_hypoelastic_static.m: Solves 2D (plane strain only) or 3D static problems for a hypoelastic material, as discussed in Section 8.3.9. The input file is Hypoelastic_quad4.txt.
  4. FEM_2Dor3D_hyperelastic_static.m: Solves 2D (plane strain only) or 3D static problems for a hyperelastic (Neo-Hookean) material. An input file is provided in Hyperelastic_quad4.txt.
  5. FEM_2Dor3D_viscoplastic_static.m: Solves 2D (plane strain only) or 3D static problems for a small strain viscoplastic material. An input file is provided in Viscoplastic_quad4.txt


(FORTRAN)
A basic set of FORTRAN finite element subroutines can be downloaded here (zip folder) >> 
These are intended for advanced readers who are interested in developing their own code.  The code is intended for educational purposes only - it contains bugs.
The code includes:
    1. Basic utilities to read and parse an ASCII input file.  Four simple example input files are provided.
    2. Linear, nonlinear and explicit dynamic solution procedures;
    3. Routines to assemble and solve both symmetric and unsymmetric FEA equation systems,
        using the conjugate gradient method or LU decomposition.  A bandwidth minimizer is also included.
    4. Subroutines containing basic element level operations - integration points, shape functions
         and their derivatives for most standard 2D and 3D elements;
    5. An implementation of fully integrated 3D linear elastic elements, which can be used as a template for
        developing your own elements; 
    6. Routines to print the solution to a file that can be read by TECPLOT (tecplot focus is best).
To run the code, you will need to:
1. Download the compressed folder
2. Uncompress the archive -e.g. using zipgenius
3. Compile the code.  If you are developing your own code a visual development environment such as PGI Visual Fortran or Intel Visual Fortran will work best.  The code will compile with free gfortran, however.

A developer project workspace is provided for Intel Visual Fortran in the directory FEACHEAP/IVFEACHEAP - you should be able to open these and see all the files.  The main program is stored in fecheap.f90.
A developer project workspace is provided for PGI Visual Fortran in the directory FEACHEAP/PVFEACHEAP - you should be able to open this and see all the files.  The main program is stored in feacheap.f90.
If you are using gfortran, you should first download and install gfortran (the mingw build seems to work fine on a Vista machine).  To compile the code (again, on a Windows environment), open
a console window, go to the directory called Code/src, and type build_feacheap.   This will compile the code and create an executable file in the directory called Code/input_files.   You can run the code from the directory Code/input_files by typing feacheap in the console window.  Enter Linear_elastic_3d.in for the input file, and anything you like for the output file.

The input files can be edited with a standard text editor.  There are four example input files:
  • Linear_elastic_3d.in - simple elastostatic example with two 8 noded brick elements
  • Linear_elastic_3d_dynamic.in - simple elastodynamic example with two 8 noded bricks
  • Holeplate_3d.in - calculates solution for a 3D elastic plate with a hole - 4000 nodes.
  • Holeplate_3d_dynamic.in  - calculates dynamic solution for a 3d elastic plate with a hole.

Source : www.solidmechanics.org 
Tags