Theory contents

Axial-bar verification

On this page

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 0≤​x≤​1000 mm with a 100 mm × 100 mm section. It is homogeneous, isotropic, static and small-strain elastic. There is no body force. All translations on x=​0 are zero; the x=​1000 mm face carries a total force in +x. The other faces are traction-free.

A straight bar of length L, Young's modulus E and cross-sectional area A, clamped at its left end and pulled to the right by a force P. Its free end moves by the extension delta.
The one-dimensional reference model: a bar of length L, modulus E and area A, clamped at one end and pulled by P.
Coherent N–mm–MPa inputs
InputValueUnit
L1000mm
W×H100 × 100mm
E210000MPa
ν0.3dimensionless
P1000000N

L is length, W,H are section dimensions, E is Young’s modulus, ν is Poisson’s ratio, and P is total force. The area A=​WH=​10000 mm2. The reference assumes uniform uniaxial tension and free lateral contraction:

δ=PLEA,σxx=PA,σvm=|σxx|.

The references are δ=​0.476190476 mm and σvm=​100 MPa. 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

  1. 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.)
  2. The app-model adapter selects the loaded boundary quads and sends a face-force group. Boundary assembly divides force by selected area and integrates fai=​∫ΓNNatidS. Thus the traction is 100 MPa and nodal contributions sum to 1000000 N. See loads and constraints.
  3. The solid solve builds the Rust model, assembles isotropic elasticity and eliminates the fixed end. The weak form and assembly page explain these steps.
  4. Conjugate gradients with AMG multigrid, the app’s default solver, stops when |r|2/|b|2≤​10−6, with an initial 5000-iteration budget. This small study does not request continuation. See which residual is tested.
  5. 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 ux on the loaded face, matching the public case’s measure. Stress is unsmoothed centre von Mises in the fixed physical region 400≤​x≤​600 mm, 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.

Executed WebAssembly solves; stress error is the worst sample in the middle region
GridOrderDOFsExtension
(mm)
Error
(%)
Mean von Mises
(MPa)
Worst stress
error (%)
10 × 2 × 212970.4717635-0.9297100.001090.003512
20 × 4 × 4
baseline
115750.4735772-0.548899.9999920.00005298
40 × 8 × 8199630.4743261-0.39151000.00001409
10 × 2 × 22
diagnostic
15750.47954950.705499.9999610.0001871

Displacement error is 100(δh−δ)/δ; 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.

Axial bar: displacement magnitude on the solved model, coloured from blue (low) to red (high).
Displacement magnitude of the public axial-bar case. The extension grows linearly along the bar; near the clamp, the suppressed lateral contraction disturbs the uniform state. Displacements enlarged 200×. Axial bar example · Open in KoFEM

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

Open the axial bar 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.