Contents
Validation
Examples

Validation / 1 of 10

Axial bar in tension

A straight bar pulled along its axis is the simplest problem in solid mechanics, so it is the first thing a solver has to get right. The answer involves only the load, the length, the cross-section and Young's modulus. If a solver gets this one wrong, the fault is in its bookkeeping (units, material, supports or how the load reaches the nodes), not in the finite element approximation.

Axial bar in tension: displacement magnitude |u| on the deformed shape, displacements drawn 200 times enlarged
0.00 mm0.474 mm
Displacement magnitude |U|, deformed shape, displacements drawn 200 times enlarged. Drawn from the analysis file that Open in KoFEM loads.
Tip extension δ; reference δ = P·L / (E·A)
Reference KoFEM Difference
0.47619 mm 0.47358 mm −0.55 %
within ±2 %

Open in KoFEMOpens the solved model in the app.

The problem

𝑡 = 𝑃 / 𝐴 𝛿 𝐿 𝑥𝑦 𝑊 𝐻 section 𝐴 = 𝑊 𝐻
Prismatic bar of length L along x, W × H section. Sketch, not to scale; thin lines show the element mesh.
L1000 mm
W×H100 × 100 mm
E210 GPa
ν0.3
P1 MN
Supportsx = 0 face fixed (Ux, Uy, Uz).
LoadP in +x as a force on the x = L face.
MeasuredMean x-displacement of the x = L face.

Analytical solution

Cut the bar at a section x. Equilibrium of the part to the right of the cut needs an internal axial force N(x)=P, the same at every section, because nothing loads the bar between its ends. Assume that this force is carried by a normal stress that is uniform over the cross-section A=WH:

σ=NA=PA.

Hooke's law relates the stress to the axial strain, and the strain is the rate of change of the axial displacement u(x):

ε=σE,ε=dudx.

With the clamp, u(0)=0, the displacement grows linearly along the bar,

u(x)=PxEA,

and the loaded end moves by

δ=u(L)=PLEA.

With the inputs above, A=1.0000×104 mm2, the stress is σ=100 MPa and δ=0.47619 mm.

Two simplifications hide in this one-dimensional model. The stress is uniform over every section, and the lateral (Poisson) contraction is free everywhere. A 3-D solid meets neither exactly near its ends: the clamp prevents the contraction at x=0, and at the loaded face the stress follows however the load is applied. By Saint-Venant's principle these disturbances die out within about one section width, so in a bar ten times longer than it is wide they change δ only slightly.

Finite element model

Mesh20 × 4 × 4 grid: 320 linear 8-node hexahedra (P1)
Unknowns525 nodes, 1,575 degrees of freedom
MaterialLinear elastic, isotropic
SolverKoFEM engine (MFEM), the WebAssembly build the app runs: engine-5ceb743373dd

The force is applied the way the app applies a force to a face: as a uniform traction t=P/A, integrated over the 16 element faces of the end face. In the finite element method a traction enters through the work it does, so the force on node i is

fi=∫ΓNitdS,

where Ni is the shape function of that node. On linear quadrilateral faces of size h×h, a node collects th2/4 from each face it touches: an interior node of the end face gets th2, an edge node th2/2 and a corner node th2/4. The forces add up to tA=P. Splitting P equally over the nodes instead would get the total right but overload the edges and corners.

Results

Quantitytip extension δ
Referenceδ = P·L / (E·A) = 0.47619 mm (Gere & Goodno, Mechanics of Materials)
KoFEM0.47358 mm
Difference−0.55 % within ±2 %

Discussion

KoFEM's extension differs from PL/(EA) by −0.55 %. Linear elements represent a linearly varying displacement exactly, so the uniform state inside the bar carries no discretisation error. What remains is the clamp. The x = 0 face is fully fixed, so near it the bar cannot contract sideways. That material is in a multiaxial state and stiffer than the 1-D model assumes, so the end moves slightly less. It is a difference between the 3-D body and the 1-D theory, so a finer mesh does not remove it.

The same bar under an end pressure comes out −0.55 %: the pressure path builds the same load vector.

Reproduce

In the app: open the model, then Studies → Static 1 → Run static solve, select the result plot and set Field to Ux. The Result summary shows Max Ux 4.736e-1 mm.

From a clone (Node.js 20+, bash, curl), this solves the model with the same engine and prints its line:

git clone https://github.com/mkofler96/KoFEM.git && cd KoFEM
bash scripts/fetch-wasm-engine.sh
node examples/validation/run.mjs --case axial-bar
Case                                  Quantity                                  FE   Reference     Err%  Tol%  Status
Axial bar in tension                  tip extension δ                      0.47358     0.47619    -0.55     2  PASS

References

  1. J. M. Gere and B. J. Goodno, Mechanics of Materials, Cengage Learning: axially loaded members, torsion, deflections of beams.
  2. S. P. Timoshenko and J. N. Goodier, Theory of Elasticity, 3rd ed., McGraw-Hill, 1970.
  3. T. J. R. Hughes, The Finite Element Method: Linear Static and Dynamic Finite Element Analysis, Dover, 2000.

KoFEM is research software and is not certified for safety-critical design. It solves linear-static, linear-elastic problems. Check results that matter against your own references.