Euler–Bernoulli beam
Verification of eulerBernoulliBeam against closed-form solutions. All
results are from FEAScript-core 0.4.0.
Cantilever beam
A cantilever of length , , with a tip load , on a single element.
The exact tip deflection and rotation are
which the cubic Hermite element reproduces.
| Quantity | Exact | FEAScript | Absolute error | Relative error |
|---|---|---|---|---|
| Tip deflection w(L) | (−0.213333…) | −0.2133333333333334 | 6.9e-17 | 3.2e-16 |
| Tip rotation θ(L) | (−0.08) | −0.08000000000000004 | 4.3e-17 | 5.4e-16 |
| Clamped end w(0) | 0 | 0 | 0 | – |
| Clamped end θ(0) | 0 | 0 | 0 | – |
The FEAScript values are printed in full, as the shortest decimals that identify each double precision number. The errors are measured against the exact fractions. The relative errors are 3 and 5 times the unit round-off of double precision, the number format of JavaScript, : the element is exact, and only the arithmetic rounds. The clamped values are exactly 0 because they are prescribed.
The test requires each value to match within 1e-9.
Element stiffness matrix
The test also compares the assembled stiffness matrix of a single element, entry by entry, with the textbook Hermite beam matrix, whose entries scale with , and . It does this for two combinations of and , so that both scalings are checked.
| Largest entry () | Largest difference | Relative to largest entry | ||
|---|---|---|---|---|
| 5 | 2.3e-10 | 1.5e-16 | ||
| 2.5 | 2.9e-11 | 2.4e-16 |
The test requires every entry to match within 1e-6:
eulerBernoulliBeam1DCantilever.