The Chartership Forum

The Finite Element Method: First Principles / One-dimensional finite elements

Constraints, reactions and convergence

Assemble two elements and partition displacement constraints. Recover reactions and stress; quantify interpolation and energy error.

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

Prescribed movement and reactions

Separate free and constrained degrees of freedom. For an imposed displacement uc, the correct free right-hand side is ff−Kfc uc. Setting a displacement without transferring this term changes the problem. Once the free solution is known, reactions follow from all rows of the original matrix. An external force applied directly to a prescribed node must be subtracted when recovering its support reaction.

Kffuf=ff−Kfcuc,r=Ku−f\mathbf K_{ff}\mathbf u_f=\mathbf f_f-\mathbf K_{fc}\mathbf u_c,\qquad \mathbf r=\mathbf K\mathbf u-\mathbf f

What it calculates: Partitioned solve and full residual. Free-node residuals should be numerically small.

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.

Independent mesh and energy checks

For constant EA and uniform element size h=L/n, the exact displacement is quadratic and its derivative is linear. The FEM derivative equals the average exact derivative on each element. Subtract that average, square the linear difference and integrate. Summing the element contributions gives an energy-norm error proportional to h. The missing strain energy is proportional to h².

∥u−uh∥a2=q2L312EAn2,U−Uh=q2L324EAn2\|u-u_h\|_a^2=\frac{q^2L^3}{12EA n^2},\qquad U-U_h=\frac{q^2L^3}{24EA n^2}

What it calculates: Independent closed-form convergence check for this uniform, fixed-left, end-force-loaded problem.

U=P2L+PqL2+q2L3/32EAU=\frac{P^2L+PqL^2+q^2L^3/3}{2EA}

What it calculates: Integrate N(x)²/(2EA) over the bar to obtain the continuous strain energy.

For the worked example, the missing energies at n = 1, 2 and 4 are 0.4166667, 0.1041667 and 0.0260417 J. Doubling n divides this difference by four. That behaviour is established for this problem; it is not a universal rate for stress concentrations, singularities or distorted two-dimensional meshes. The largest displacement interpolation error in each element is |q|h²/(8EA). At n=2 it is 0.015625 mm even though all nodal values are exact.

An energy check also needs the support convention. With non-zero prescribed displacements, external work includes reactions through those moving supports. Comparing strain energy with only uᵀf/2 would omit that contribution.

Numerical implementation

The original TypeScript solver returns the element matrices, full and reduced stiffness matrices, consistent load vector, displacement, reactions, element stresses and strain energy. It uses dense elimination with partial pivoting so the algorithm remains inspectable. Production sparse solvers and robust condition estimation are separate topics.

Read solveBar in this order: validate geometry and material data; assemble each 2 × 2 element into K; assemble qh/2 at each endpoint; partition prescribed displacements; solve Kff; recover the full residual and element stress. The matrix is never explicitly inverted. The pivot threshold is a numerical safeguard, not a proof of adequate conditioning. Very large stiffness contrasts require additional diagnostics.

Regression checks compare uniform members with the integrated continuous equation, unequal elements with series compliance, imposed movement with a separately derived quadratic solution, and energy with the closed-form integral. They also reject an unrestrained model. These comparisons are independent of the assembly implementation.

References and further study

Klaus-Jürgen Bathe, Finite Element Procedures, Prentice Hall, 1996, ISBN 0-13-301458-4, section 3.3.4, pages 124–127, explains the differential, variational and Galerkin formulations used as the theoretical reference here. Peter Debney, Computational engineering, IStructE, version 1.3, July 2022, sections 7.8–7.9, pages 150–153, discuss model validity and independent checking. The supplied books are private references; no textbook example or figure is reproduced here.

MIT OpenCourseWare: Bathe, Analysis of continuous systems introduces the virtual-displacement formulation. The displacement-based finite element method continues to discrete equations. These are further-learning links, not a claim that MIT verified this implementation.

The calculations in this lesson were derived independently and checked against force integration, compliance and strain-energy identities. Verification applies to the stated axial model and test cases. It does not establish suitability for a real structure.