Finite Element Analysis (FEA): Steps, Shape Functions, Solved Examples & MCQs

Quick answer: Finite element analysis (FEA) is a computer method that predicts how a part behaves under loads, heat or vibration by splitting it into many small elements joined at nodes, solving simple equations for each element, and combining them into one large system {F} = [K]{u}. It gives displacement, stress, temperature and natural frequencies without building a physical prototype.

This page explains FEA from the basics: what it is, the steps of an analysis, element types, stiffness matrices, shape functions, meshing and boundary conditions. It then works through three solved examples, shows how to solve an FEA problem in Python, and ends with a 10-question quiz and FAQs. Prepared by Engineers R World, guiding engineering students since 2013.

Contents

What is finite element analysis?

Most real parts – a connecting rod, a bracket, a pressure vessel, a turbine blade – have shapes and loads that are too complex for textbook formulas. FEA solves this by dividing the part into a large number of small, simple pieces called finite elements. Each element is connected to its neighbours at points called nodes. The behaviour of one element is easy to describe with a small set of equations. When all the element equations are assembled, they describe the whole part, and a computer solves them for the unknown values at every node.

The finite element method (FEM) is the mathematical technique; finite element analysis (FEA) is its practical use to study a design. Engineers use FEA to check whether a part is strong and stiff enough, to find where stress is highest, to reduce weight, and to compare materials before anything is manufactured. It is used in mechanical, aerospace, automobile, civil and biomedical engineering.

TermMeaning
ElementA small piece of the model (line, triangle, quadrilateral, tetrahedron, hexahedron)
NodeA point where elements connect; unknowns are calculated here
Degree of freedom (DOF)An independent unknown at a node, such as displacement in x, y or z, or temperature
MeshThe full set of elements and nodes covering the part
Stiffness matrix [K]Relates nodal forces to nodal displacements
Boundary conditionsSupports, fixed edges, symmetry, known temperatures

Steps of FEA

Every FEA problem, whether solved by hand or in software, follows the same three stages: pre-processing, solution and post-processing.

  1. Define the problem – decide what you need: maximum stress, deflection, temperature or natural frequency.
  2. Create or simplify the geometry – remove small fillets, holes and logos that do not affect the result.
  3. Assign material properties – Young’s modulus, Poisson’s ratio and density for structural work; conductivity and specific heat for thermal work.
  4. Mesh the model – choose the element type and size, with a finer mesh where stress changes quickly.
  5. Apply boundary conditions and loads – fixed supports, forces, pressure, temperature or heat flux.
  6. Solve – the software assembles the global equations and solves for nodal unknowns.
  7. Post-process – view deformation, von Mises stress, temperature contours or mode shapes.
  8. Verify – check reaction forces, compare with a hand calculation and run a mesh convergence study.

Types of elements

The element type should match the shape of the part and the result you need. Using the simplest element that captures the physics keeps the model fast and accurate.

ElementDimensionTypical nodesUsed for
Spring / bar (truss)1D2Trusses, axial members, springs
Beam1D2Frames, shafts, beams with bending
Triangle (CST) / quadrilateral2D3 / 4 (6 / 8 for quadratic)Plane stress, plane strain, axisymmetric parts
Shell2D surface3–8Thin sheet metal, tanks, car body panels
Tetrahedron3D4 / 10Complex solid parts, automatic meshing
Hexahedron (brick)3D8 / 20Regular solids where accuracy matters

Linear elements have nodes only at corners; quadratic elements add mid-side nodes and capture bending and curved edges far better. For 3D stress work, 10-node tetrahedra are a common safe choice.

Stiffness matrix and the FEA equation

For a linear static problem, every element obeys a force–displacement relation, just like a spring obeys F = kx. For the whole model this becomes a matrix equation.

Global FEA equation

{F} = [K] {u}

{F} = nodal force vector (N), [K] = global stiffness matrix, {u} = nodal displacement vector (m or mm).

Spring and bar element stiffness

[k] = k · [ 1 −1 ; −1 1 ],   with k = AE / L for a bar

A = cross-section area, E = Young’s modulus, L = element length. Each element matrix is 2 × 2 because the element has two nodes with one axial DOF each.

Assembly: each element matrix is added into the global matrix at the rows and columns of its own nodes. Where two elements share a node, their stiffness terms add up. Before supports are applied, [K] is singular (the part could move as a rigid body). Applying boundary conditions removes the fixed DOF, and the reduced system can be solved. Once displacements are known, strain = Δu/L and stress = E × strain for each element.

Shape functions

FEA calculates values only at the nodes. A shape function (also called an interpolation function) gives the value anywhere inside an element from the nodal values. For a 1D linear element of length L, with local coordinate x measured from node 1:

Linear 1D shape functions

N1 = 1 − x/L,    N2 = x/L,    u(x) = N1u1 + N2u2

At node 1 (x = 0): N1 = 1, N2 = 0. At node 2 (x = L): N1 = 0, N2 = 1.

Shape functions have two key properties: each one equals 1 at its own node and 0 at all other nodes, and together they always add up to 1 at any point inside the element. Quadratic elements use second-order shape functions, which is why they follow curved deformation better. Exam questions often ask you to write shape functions and use them to interpolate a value – see Example 3 below.

Meshing and boundary conditions

Meshing has the biggest effect on accuracy. A coarse mesh is fast but under-predicts peak stress; a very fine mesh is accurate but slow. The practical approach is a mesh convergence study: solve with a coarse mesh, refine it, and repeat until the result of interest changes by less than about 2–5%.

  • h-refinement – smaller elements; p-refinement – higher-order elements.
  • Refine locally near holes, fillets, contact areas and load points, where stress changes quickly.
  • Check element quality: avoid very long, thin (high aspect ratio) or badly skewed elements.

Boundary conditions must represent how the part is really held. Over-constraining (fixing faces that can actually move) makes the part too stiff; under-constraining leaves rigid-body motion and the solver fails. Point loads and sharp re-entrant corners create artificial stress peaks called singularities: the stress keeps rising as the mesh is refined, so spread loads over a realistic area and read stress a little away from such points.

Types of FEA

AnalysisWhat it findsTypical example
Static structuralDeformation, stress, factor of safety under steady loadsBracket, chassis, leaf spring
ModalNatural frequencies and mode shapesShaft, turbine blade, gearbox casing
HarmonicResponse to sinusoidal loads at different frequenciesEngine mount, machine base
TransientResponse that changes with timeImpact, sudden load, drop test
Thermal (steady / transient)Temperature distribution and heat flowEngine fins, heat sink, brake disc
BucklingCritical load at which slender parts collapseColumns, thin-walled tubes
FatigueLife under repeated loadingCrankshaft, connecting rod, springs

FEA is mainly used for solids and structures. Fluid flow problems are usually solved with CFD (computational fluid dynamics), which is based on the finite volume method. Many real projects combine both, for example using CFD temperatures as loads in a thermal-structural FEA.

Solved examples

Example 1: Two springs in series

Problem: Two springs are connected in series. Spring 1 (k1 = 100 N/mm) joins nodes 1 and 2; spring 2 (k2 = 200 N/mm) joins nodes 2 and 3. Node 1 is fixed and a force of 600 N acts at node 3. Find the nodal displacements and the reaction.

Solution: Assemble the global stiffness matrix:

[K] = [ 100 −100 0 ; −100 300 −200 ; 0 −200 200 ] N/mm

Apply u1 = 0 and remove row and column 1: 300u2 − 200u3 = 0 and −200u2 + 200u3 = 600. From the first equation u2 = (2/3)u3. Substituting: (200/3)u3 = 600, so u3 = 9 mm and u2 = 6 mm.

Reaction at node 1: R1 = −100 × 6 = −600 N (equal and opposite to the applied load). Check: spring 1 force = 100 × 6 = 600 N and spring 2 force = 200 × (9 − 6) = 600 N, as expected for springs in series.

Example 2: Stepped steel bar under axial load

Problem: A stepped steel bar (E = 200 GPa) is fixed at the left end. Section 1 has A1 = 200 mm² and L1 = 500 mm; section 2 has A2 = 100 mm² and L2 = 400 mm. A load P = 20 kN acts at the free end. Find the displacements and stresses using two bar elements.

Solution: Element stiffnesses (E = 200,000 N/mm²): k1 = A1E/L1 = 200 × 200,000 / 500 = 80,000 N/mm and k2 = 100 × 200,000 / 400 = 50,000 N/mm.

The full load passes through both elements, so u2 = P/k1 = 20,000 / 80,000 = 0.25 mm and u3 = u2 + P/k2 = 0.25 + 0.40 = 0.65 mm.

Stresses: σ1 = P/A1 = 20,000/200 = 100 MPa and σ2 = 20,000/100 = 200 MPa. The same answers come from the matrix method and from the Python code below.

Example 3: Interpolation with shape functions

Problem: A 1D linear element runs from x = 2 m (node 1, T1 = 100 °C) to x = 6 m (node 2, T2 = 60 °C). Find the temperature at x = 3 m.

Solution: Element length L = 4 m, local position = 3 − 2 = 1 m. N1 = 1 − 1/4 = 0.75 and N2 = 1/4 = 0.25 (they add up to 1). T = 0.75 × 100 + 0.25 × 60 = 90 °C.

FEA in Python: solve the stepped bar

The same steps a commercial solver follows – assemble, apply supports, solve, post-process – can be written in a few lines of Python with NumPy. This script solves Example 2 and can be extended to any number of bar elements by adding values to the lists.

import numpy as np

E = 200_000.0          # Young's modulus of steel, N/mm^2 (200 GPa)
A = [200.0, 100.0]     # cross-section area of each element, mm^2
L = [500.0, 400.0]     # length of each element, mm
P = 20_000.0           # axial load at the free end, N

n_el = len(A)
n_nodes = n_el + 1

# 1. Assemble the global stiffness matrix
K = np.zeros((n_nodes, n_nodes))
for e in range(n_el):
    k = A[e] * E / L[e]                      # element stiffness, N/mm
    K[e:e+2, e:e+2] += k * np.array([[1, -1], [-1, 1]])

# 2. Load vector
F = np.zeros(n_nodes)
F[-1] = P

# 3. Apply the boundary condition (node 0 is fixed) and solve
free = np.arange(1, n_nodes)
u = np.zeros(n_nodes)
u[free] = np.linalg.solve(K[np.ix_(free, free)], F[free])

# 4. Post-processing: stress in each element and reaction force
stress = [E * (u[e+1] - u[e]) / L[e] for e in range(n_el)]
reaction = K[0] @ u

print("Displacements (mm):", u.round(4))
print("Stresses (MPa):", np.round(stress, 1))
print("Reaction at fixed end (N):", round(reaction, 1))

Output: displacements 0, 0.25 and 0.65 mm; stresses 100 and 200 MPa; reaction −20,000 N. Next, learn to plot FEA results with Python Matplotlib or try beam deflection in Python.

Advantages and limitations of FEA

AdvantagesLimitations
Handles complex shapes, loads and materialsResults are only as good as the inputs and boundary conditions
Reduces prototypes, testing time and costGives approximate answers that depend on the mesh
Shows full stress and temperature fields, not just one valueLarge 3D and non-linear models need time and computing power
Makes it easy to compare designs and materialsNeeds engineering judgement to spot wrong results

Common FEA mistakes students make

  • Using inconsistent units (mixing mm with m, or MPa with Pa).
  • Fixing the whole part or a load face, which over-constrains the model.
  • Reading maximum stress at a point load or sharp corner (a singularity).
  • Skipping the mesh convergence study and trusting the first mesh.
  • Never checking results with a simple hand calculation.

FEA quiz: 10 MCQs with answers

Try it as a quiz: tap an option to answer. You will see right or wrong at once, and your score is shown at the bottom-left of the screen.

Q1. In FEA, the region being analysed is divided into small parts called:

  1. Nodes
  2. Elements
  3. Loads
  4. Boundaries
Show answer

B. Elements The domain is split into elements; elements meet at nodes.

Q2. The basic FEA equation for a linear static problem is:

  1. [M]{a} = {F}
  2. {F} = [K]{u}
  3. {u} = [K]{F}
  4. [C]{v} = {F}
Show answer

B. {F} = [K]{u} Force vector = global stiffness matrix × displacement vector.

Q3. The stiffness of a bar element of area A, length L and modulus E is:

  1. EL/A
  2. AL/E
  3. AE/L
  4. E/(AL)
Show answer

C. AE/L k = AE/L, the same as the axial stiffness of a bar from strength of materials.

Q4. The sum of all shape functions at any point inside an element equals:

  1. 0
  2. 0.5
  3. Number of nodes
  4. 1
Show answer

D. 1 Shape functions must add up to 1 so that a rigid-body movement is represented exactly.

Q5. A 1D bar element with two nodes and one axial displacement per node has how many degrees of freedom?

  1. 2
  2. 1
  3. 4
  4. 6
Show answer

A. 2 2 nodes × 1 DOF per node = 2 DOF.

Q6. The global stiffness matrix of a correctly built model is:

  1. Always diagonal
  2. Symmetric
  3. Skew-symmetric
  4. Always singular after supports are applied
Show answer

B. Symmetric [K] is symmetric. Before supports are applied it is singular; after enough supports it can be solved.

Q7. Refining the mesh by using more, smaller elements is called:

  1. p-refinement
  2. r-refinement
  3. h-refinement
  4. Sub-structuring
Show answer

C. h-refinement h-refinement reduces element size h. p-refinement raises the polynomial order of the element.

Q8. Which analysis gives the natural frequencies and mode shapes of a part?

  1. Static structural
  2. Steady-state thermal
  3. Buckling
  4. Modal analysis
Show answer

D. Modal analysis Modal analysis solves an eigenvalue problem for natural frequencies and mode shapes.

Q9. A mesh convergence study is done to:

  1. Check that results stop changing as the mesh is refined
  2. Reduce the number of loads
  3. Change the material
  4. Remove boundary conditions
Show answer

A. Check that results stop changing as the mesh is refined When stress or displacement changes by only a few percent with a finer mesh, the mesh is good enough.

Q10. Which element type is best for a thin sheet-metal part?

  1. 1D beam element
  2. 2D shell element
  3. Point mass
  4. Spring element
Show answer

B. 2D shell element Shell elements model thin walls efficiently; thickness is entered as a property.

Frequently asked questions

What is the difference between FEM and FEA?

FEM (finite element method) is the mathematical method: splitting a problem into elements and solving the equations. FEA (finite element analysis) is the practical use of that method to study a real part, such as finding stress in a bracket.

Is FEA difficult to learn?

The basics are not difficult if you know strength of materials and simple matrices. Start with spring and bar elements by hand, then move to 2D and 3D models in software, and always check results with a hand calculation.

How do I know if my FEA results are correct?

Run a mesh convergence study, check that reaction forces balance the applied loads, compare one result with a hand calculation, and look for unrealistic stress at sharp corners or point loads.

What is a shape function in FEA?

A shape function is an interpolation function that gives the value of a field, such as displacement or temperature, anywhere inside an element from its values at the nodes.

Can I do FEA in Python?

Yes. Simple bar, beam and truss problems can be assembled and solved with NumPy in a few lines, as shown on this page. Larger 2D and 3D problems use dedicated FEA libraries or commercial solvers.

Projects and further practice

See FEA applied in our machine design projects, mechanical design and analysis projects and CFD projects, or browse all projects. Related notes: Strength of Materials, Machine Design and Heat Transfer.

Want to learn FEA step by step?

We teach FEA, CFD and Python for engineers through live 1-to-1 screen-share classes or recorded videos – you build and solve every model on your own computer while we guide you. Message us on WhatsApp, email engineersrworld@gmail.com, or use the enquiry form.

Scroll to Top