The Chartership Forum

The Finite Element Method: First Principles / Element assembly

Energy, numbering and assembly checks

Derive global stiffness and loading from virtual work. Check assembly through equilibrium, energy and permutation invariance.

Lesson review: expert verification remains open

This lesson has received a full-context editorial review and a check of its technical explanations. Selected arithmetic has been checked separately. This is not independent engineering sign-off.

Checks needed for project use

  • Independent FEM/continuum reviewer to check derivations, pedagogical completeness, constraint conventions and the limits of the recorded benchmarks. Actual 125%, 150% and 200% browser zoom remains unqualified.

These are educational models and exercises. Check their assumptions before using the results. The full technical content and every diagram have not yet been independently verified.

Concrete and steel calculations retain their stated first-generation Eurocode teaching basis. Use the standards and amendments specified for your project; do not mix generations without an appropriate design basis.

Read the lesson register and outstanding review notes

What you should already know

Energy and work checks

Compute element energy as ½ke(db−da)² and add over the network. The sum must equal ½dᵀKd because both describe the same compatible displacement field. For this load case it also equals ½P3d3=9.642857 J. These identities are distinct checks: the first tests assembly consistency for any d, while the last additionally uses equilibrium and the zero prescribed movement.

Row sums are zero for this unconstrained axial network because a uniform translation strains no element. After reducing the system, row sums need not be zero. A disconnected subnetwork can have an additional rigid mode. Correct indexing and a successful solve do not establish that the intended physical connection was represented.

Sparse storage and numbering

A typical mesh connects each node to only a small fraction of all other nodes. Assemble non-zero contributions as row, column, value triplets, then sum repeated row-column pairs before compressing the storage. Repeated diagonal entries are expected contributions, not duplicate-data errors. Symmetric storage can save memory, provided the solver and assembly agree about which triangle is stored.

Renumbering nodes changes the matrix pattern but not the physical solution. If d=P d̂ for a permutation matrix P, then K̂=PᵀKP and f̂=Pᵀf. After solving, map back with P. Compare displacements, element forces and reactions using physical node identities. Bandwidth reduction and sparse reordering change computational cost; they must not change the mathematical model.

K^=PTKP,f^=PTf,d=Pd^\widehat{\mathbf K}=\mathbf P^T\mathbf K\mathbf P,\qquad\widehat{\mathbf f}=\mathbf P^T\mathbf f,\qquad\mathbf d=\mathbf P\widehat{\mathbf d}

What it calculates: Permutation invariance under consistent relabelling of all coordinates and constraints.

Numerical implementation

In the axial solver, inspect the two loops over local rows and columns. Each adds Ke[i][j] to K[connectivity[i]][connectivity[j]]. To reproduce this network, use E=200 GPa and areas 200,400,200 mm² for A, B and C respectively. Their lengths are 1,1,2 m. Keep the original full matrix to recover reactions.

The current teaching solver uses a dense matrix for inspectability. The triplet/compressed sparse scheme described above is an implementation exercise, not an additional solver claimed to exist. Before switching storage, compare both implementations on the same small matrices and permutations.

Axial displacement along the bar
Solid blue: FEM interpolationDashed orange: continuous solution

Vertical range: ±0.75 mm. Positive displacement is towards the right.

0 mPosition x2 m
Right-end displacement
0.75 mm
Left reaction
-40 kN
Strain energy
11.56 J
Free-node residual
0 N

Reactions act on the bar. Positive force points right. The end load at a prescribed right node changes that support reaction, not the prescribed displacement. Stress is the constant strain-recovery value in each linear element.

Displacements, reactions and element stresses
Nodal results in SI-derived display units
Nodex (m)u (mm)Reaction (kN)
100-40
210.4375Free node
320.75Free node
Constant element stress
ElementStress (MPa)
187.5
262.5
Element and global stiffness, loads and constraints

Each element has k = EA / h = 8.000e+7 N/m, with the 2 × 2 pattern [1, −1; −1, 1]. The assembled matrix below includes restrained nodes. The reduced solve uses only free nodes and transfers prescribed-displacement terms to its right-hand side.

Global stiffness K (N/m) and consistent load f (N)
RowK·1K·2K·3f
18.00e+7-8.00e+705,000
2-8.00e+71.60e+8-8.00e+710,000
30-8.00e+78.00e+725,000

Small axial strain, linear elasticity, constant area and modulus, uniform axial line load. No bending, buckling, thermal strain or material nonlinearity. The plotted curve is displacement against position, not the deformed physical outline.

References and further study

Bathe, Finite Element Procedures (1996), §4.2.1 opening on p.153 and §3.3.4, pp.124–127, were inspected for the displacement formulation and assembly context. The network, equivalent-stiffness comparison and node-permutation checks are original. The calculations and exercises here are original. The numerical checks cover the stated assumptions; independent specialist review remains open.