You are on page 1of 5

FEM Code Development

Using T3 & Q4 elements


Finite Element Methods











School of Aeronautics
Northwestern Polytechnical University, Xian, China

Submitted To:
Dr. Yijun Liu
Prepared By:

Objective
In this report technique is described to develop a FEM code using Quadrilateral 4-Node
(Q4) and Triangular 3-Node (T3) elements. Code is written using MATLAB programing
language. Two separate codes are written for Q4 and T3 elements using different
methodology.
Formulation and Scheme
Following are the schemes used for Q4 and T3 elements.
T3 Element:
Instead of using isoperimetric elements, direct approach is used.
Q4 Element:
Isoperimetric elements are used. Numerical integration is used to compute the stiffness
matrix. 2 point gauss quadrature is used. Stress values are calculated on integration
points.
Detailed code scheme is presented with in code in comments form.
Code Design
Following is the structure of code
Input parameters: Material properties (Modulus, Poisson ratio)
Defining geometry (Lx, Ly, Nodes, Elements)
Defining Load vector
Mesh generation (Node Coordinates)
Defining Connectivity (Elements arrangements)
Defining Boundary Conditions

Program flow: Read in data
Declaring the arrays and matrices to be used
Computation of element stiffness matrices
Assembly of the global FE equations
Applying the Boundary conditions

Solution: Solution of the FE equations to obtain the displacement at all
nodes
Computation of stress/strain on each element
Output the results
Test Cases:
Two simple examples and a patch test is used to validate the code. Results are compared
with the ANSYS. Material properties used for test cases are:
Modulus E=210000, Poisson ratio= 0.3,
Case-1:


Case-2:

Case-3: (Patch Test)


Results
Detailed results (tables and graphs) are attached with report.
Case-1:
Code Max Displacement Max Stress
T3 Code 0.0114 1200
T3 ANSYS 0.011429 1200
Q4 Code 0.0114 1200
Q4 ANSYS 0.0114 1200

Case-2:
Code Max Displacement Max Stress
T3 Code 0.3890 6278
T3 ANSYS 0.38895 6278
Q4 Code 1.2787 14334
Q4 ANSYS 1.2787 24828

Case-3: (Patch Test)
Code Max Displacement Max Stress
T3 Code 3 x 10-5 1
T3 ANSYS 3.024 x 10-5 1
Q4 Code 3 x 10-5 1
Q4 ANSYS 3 x 10-5 1

Conclusion:
1. Displacements are in very good agreement with ANSYS for both T3 and Q4 codes.
2. Stresses are very close to ANSYS results in T3 code. It is due to use of direct stiffness
approach used for calculation of stiffness matrix. In ANSYS reduced integration technique is
used for solution of problems involving triangular elements.
3. Stress results of Q4 code are good for patch test but difference between ANSYS and code is
much more for other problems.
4. This is due to the reason that in Q4 code stresses are computed on integration points. But
ANSYS shows stresses at node points by averaging it.

You might also like