Axial-bar verification
Does the complete KoFEM path reproduce a bar in tension?
The connected reading path leads here from assumptions to results. This study solves the bar of the public axial-bar example on structured hexahedral meshes with the app’s own solid solver, compiled to WebAssembly. It checks end extension and stress away from the support, with separate limits for each claim.
The model and the reference
The bar occupies with a 100 mm × 100 mm section. It is homogeneous, isotropic, static and small-strain elastic. There is no body force. All translations on are zero; the face carries a total force in +x. The other faces are traction-free.

| Input | Value | Unit |
|---|---|---|
| 1000 | mm | |
| 100 × 100 | mm | |
| 210000 | MPa | |
| 0.3 | dimensionless | |
| 1000000 | N |
is length, are section dimensions, is Young’s modulus, is Poisson’s ratio, and is total force. The area . The reference assumes uniform uniaxial tension and free lateral contraction:
The references are and . The implied axial strain is about 0.000476, within the small-strain assumption. A material name alone supplies no yield strength, so this is an elastic verification problem rather than a strength assessment.
Trace the complete solve
- The study’s model builder takes the public case’s inputs and makes a structured hex volume mesh, material, support and end-force group. The baseline is order 1 on a 20 × 4 × 4 grid: 320 elements, 525 vertices and 1575 displacement DOFs before elimination. (The public example is now built from its STEP file, meshed by Netgen with tetrahedra, as a user builds it in the app.)
- The app-model adapter selects the loaded boundary quads and sends a face-force group. Boundary assembly divides force by selected area and integrates . Thus the traction is 100 MPa and nodal contributions sum to 1000000 N. See loads and constraints.
- The solid solve builds the Rust model, assembles isotropic elasticity and eliminates the fixed end. The weak form and assembly page explain these steps.
- Conjugate gradients with AMG multigrid, the app’s default solver, stops when , with an initial 5000-iteration budget. This small study does not request continuation. See which residual is tested.
- Recovery returns vertex translations and one von Mises sample per element centre. The study measures those arrays directly, before the app’s nodal averaging.
Measured displacement and stress
Extension is the arithmetic mean of vertex on the loaded face, matching the public case’s measure. Stress is unsmoothed centre von Mises in the fixed physical region , four section widths or more from either end. Each grid has equal-volume cells, so the arithmetic stress mean is also a volume-weighted mean of these samples. The JSON records their minimum, maximum and count.
| Grid | Order | DOFs | Extension (mm) | Error (%) | Mean von Mises (MPa) | Worst stress error (%) |
|---|---|---|---|---|---|---|
| 10 × 2 × 2 | 1 | 297 | 0.4717635 | -0.9297 | 100.00109 | 0.003512 |
| 20 × 4 × 4 baseline | 1 | 1575 | 0.4735772 | -0.5488 | 99.999992 | 0.00005298 |
| 40 × 8 × 8 | 1 | 9963 | 0.4743261 | -0.3915 | 100 | 0.00001409 |
| 10 × 2 × 2 | 2 diagnostic | 1575 | 0.4795495 | 0.7054 | 99.999961 | 0.0001871 |
Displacement error is ; stress error is the largest absolute percentage difference from 100 MPa among the selected centres. The existing 2% extension band allows the 3D clamp disturbance absent from the 1D reference. The 0.5% interior stress band requires a nearly uniform tension state far from that disturbance; it applies to every selected sample, not just the mean. These regression tolerances are chosen for this benchmark, not for a design’s safety margin.
Drag to rotate · scroll to zoom
What the comparison establishes
The three order-1 meshes halve the cell size in each direction. Their extensions approach the reference from below, with a smaller change on the second refinement. The fully fixed end suppresses Poisson contraction and differs from the analytical bar, so refinement alone need not remove the remaining discrepancy. These three levels do not establish an asymptotic rate or a continuum error bound.
The order-2 hex row is diagnostic. Currently, Dirichlet extension constrains vertices and edge nodes but leaves Q2 face-centre nodes free. That support differs from a fully clamped face. Its extension therefore cannot establish order convergence for the same boundary-value problem, even though both readouts fall inside the stated bands. The app’s tetrahedral meshes do not have Q2 face-centre DOFs.
The middle-region agreement checks a uniform stress invariant. It does not verify stress sign, individual tensor components, clamp peaks, material interfaces, curved geometry, bending, shells or coupling. The number of samples grows while the physical region stays fixed. One centre sample per element does not bound the stress everywhere. The verification strategy separates these checks from physical validation.
Open the study in KoFEM
The example page also offers the saved
analysis. Solve at order 1 and select Ux: the public case’s maximum
readout is 4.739e-1 mm. Its reference comparison uses the mean
end displacement. The middle-region stress statistic uses the
unsmoothed element samples; the app’s global smoothed maximum is a
different quantity.
KoFEM’s automated tests rerun all four mesh/order solves with the WebAssembly solver, check the bands and compare the results with the published record.
Run record and sources
Download inputs, solver settings and full-precision results of the four solves.
Study and measurement source reuses the public case’s inputs and the solver wrapper. See also app averaging and extrema and the complete reading path.
- Gere and Goodno, Mechanics of Materials, axially loaded members.
- Timoshenko and Goodier, Theory of Elasticity, third edition (1970), Saint-Venant’s principle and end effects.
- Hughes, The Finite Element Method (2000), displacement-based elasticity.