Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Linear static analysis

solve.static computes the small-displacement equilibrium K u = f of a static step: the displacements and rotations, the reactions at the prescribed degrees of freedom and coupled reference points, and the stresses at the integration points and averaged at the nodes. It serves solids, 2D continua, shells, beams, trusses and discrete elements in one mesh. Constraints and prescribed values are eliminated by transformation, the reduced system is ordered by nested dissection and solved by a supernodal sparse Cholesky factorization, deterministic on any number of threads.

Commandssolve.static (and solve.run); solve.probe, results.contour, results.reactions, results.export.vtu, results.export.csv
Step procedure{"type": "static"}; {"type": "coupled_temperature_displacement"} is solved by the same command (Heat transfer)
Solvercrates/solver (CPU, f64)
Methodisoparametric displacement elements (Zienkiewicz, Taylor & Zhu 2013; Hughes 2000); master–slave elimination of constraints (Cook et al. 2002, §9.2); nested dissection (George 1973); supernodal Cholesky (Ng & Peyton 1993)
Verified bypatch tests, cantilever-*, lame-cylinder*, kirsch-plate*, rotating-*, NAFEMS LE1, LE2, LE3, LE5, LE6, LE7, LE10, scordelis-lo-roof-*, pinched-cylinder, tie-patch, tube-torsion-coupling, pure-bending-coupling; crates/solver/tests/{verification,plane,structural,one_d,couplings,inclined_symmetry}.rs

Synopsis

[
  {"command": "model.boundary_condition.create", "params": {"name": "clamp", "type": "fixed", "target": {"set": "root"}}},
  {"command": "model.load.create", "params": {"name": "push", "type": "pressure", "set": "top", "magnitude": 2}},
  {"command": "model.step.create", "params": {"name": "Load", "procedure": {"type": "static"},
    "boundary_conditions": ["clamp"], "loads": ["push"]}},
  {"command": "solve.static", "params": {"step": "Load"}},
  {"command": "solve.probe", "params": {"step": "Load", "set": "top"}}
]

Parameters

solve.static

FieldValueDefaultMeaning
stepstep namethe only static or coupled stepthe step to solve; with several such steps and none named: “name the step: the model has … steps …”
max_dofs1 to 6 000 0006 000 000cap on the model’s unknowns; may only be lowered
max_factor_entries1 to 2 000 000 000400 000 000cap on the factor’s entries (8 bytes each); may be raised for one solve (Linear solvers)
threads1 to 256the session’s (FIELDCRAFT_THREADS or the cores)changes the time, never the result

The step

FieldValueDefaultMeaning
procedure{"type": "static"}—
boundary_conditionsnamesnoneactive in this step; nothing carries over between steps
loadsnamesnoneactive in this step
outputdisplacement, reaction_force, stress, strainallwhat the step requests

Boundary conditions and loads that act

DefinitionFormActs as
fixedtargetevery degree of freedom of the target held at zero
displacementtarget, values [u1, u2, u3, ur1, ur2, ur3] (null free)prescribed values; rotations of solid nodes do not exist and are ignored
symmetrytarget, plane x, y, z or {"normal"}an axis plane holds global degrees of freedom; an inclined plane is the linear constraint n · u = 0 (and the rotations about its in-plane axes at nodes with rotations)
force, momenttarget, vector, distribution total (default) or per_nodetotal: split by the faces’ consistent nodal weights (area-weighted) over a set with faces, equally over a set of nodes; a reference point takes it whole. A moment needs rotations: shell or beam nodes, or a coupled reference point; in a 2D model a moment is [0, 0, M] on beam nodes
tractionset, vectorforce per area on the set’s faces, consistent nodal forces
pressureset, magnitudeuniform, positive pushing in, consistent nodal forces on the faces (2D models: on element edges)
gravityacceleration, set (optional)ρ a on the set’s elements (or the whole model, point masses included)
body_forceset, vectorforce per volume
pipe_pressureset, internal, externaluniform pressures inside and around the set’s pipes (beams with a pipe profile that has a bore): Lamé’s wall stresses, and the axial force pair (1 − 2ν) A A_w per element of the closed-end force and the wall’s Poisson strain (Element library)
centrifugalangular_velocity, point, axis, set (optional)ρ ω² r away from the axis; solid and 2D elements only
temperaturetarget, valuethermal strain α (T − T_ref) of the target’s nodes (Heat transfer)

In a 2D model loads lie in the XY plane: surface loads act on element edges, forces are totals over the thickness (or the circumference, axisymmetric), and a vector with a Z component is an error. Heat loads (surface_flux, convection, heat_source) have no effect in a static step.

Initial fields

A model can carry named initial fields: a temperature or a stress (xx, yy, zz, xy, xz, yz) per node label, usually mapped from another analysis (a moulding, casting or thermal simulation, or another mesh of the part) to solve the warpage and stress after ejection. Static and coupled temperature–displacement steps start from them; other procedures leave them out with a warning.

  • An initial temperature T₀ is where thermal strain is measured from, ε_th = α (T − T₀) (nodes without one start at the material’s reference temperature), so a part cooled to a uniform temperature warps by its own temperature field.
  • An initial stress σ₀ adds to the stress, σ = D (ε − ε_th) + σ₀, and loads the solid elements with −∫ Bᵀ σ₀ dV (Solid::initial_stress_load): whatever part of it the supports do not hold is released into deformation; a self-equilibrated σ₀ held by the supports moves nothing.

model.initial_field.map fills a field from a solved step (a heat transfer step’s frame or a coupled step’s temperatures, a static step’s stresses) of this model or of another .fieldcraft file on another mesh. fieldcraft_fem::transfer::Locator finds the source’s solid element holding each target node by a bucket grid and Newton’s method on the isoparametric map, and interpolates by that element’s shape functions (consistent interpolation; de Boer, van Zuijlen & Bijl 2007), which reproduces uniform and linear fields exactly on any two meshes. A node outside the source by at most the tolerance (a quarter of the source’s mean element size by default) takes the value at the closest point; nodes farther out get none and are counted in the reply. model.initial_field.delete removes a field.

Theory

The principle of virtual work with the isoparametric elements of the Element library gives K u = f, K = Σₑ ∫ Bᵀ D B dV assembled over the elements, f the consistent loads (∫ Nᵀ t dA for tractions and pressures, ∫ Nᵀ b dV for body forces and gravity, ∫ Bᵀ D ε_th dV for thermal strain).

Constraints. Every degree of freedom is free, prescribed (a boundary condition), dependent (a coupling, tie or inclined symmetry plane), or inactive (a reference point direction no coupling ties). The constraint rows are eliminated one at a time in a fixed order (boundary conditions, then couplings by name, nodes by label), each dependent unknown chosen as the row’s intended one or else the largest coefficient (Abel & Shephard 1979), until every unknown is a combination of the free ones q and the prescribed values u_p:

u = T_f q + T_p u_p
(T_fᵀ K T_f) q = T_fᵀ (f − K T_p u_p)
r = T_pᵀ (K u − f)

No penalty numbers and no Lagrange multipliers enter, so the reduced matrix stays symmetric positive definite; without couplings T_f is the identity on the free unknowns. A redundant row is dropped when the prescribed values satisfy it and refused as contradictory otherwise. The coupling, tie and spring formulations are in Constraints and connectors.

Stress recovery. Each element evaluates σ = D (ε − ε_th) at its integration points and extrapolates to its nodes with its linear corner functions fitted by least squares (mid-side nodes take the mean of their edge’s corners; Hinton & Campbell 1974). The nodal stress is the plain average over the elements sharing the node; a shell contributes its top surface (the side its normal points to). The von Mises stress is that of the averaged tensor.

Algorithm

  1. Select and check. The step named, or the only static or coupled step. A model with contact is refused: “contact (name) in linear static steps: a model’s contacts apply to all its steps, so solve its nonlinear static or explicit dynamic steps, or remove the contacts to solve this one”.
  2. Mesh (system::Mesh::new): sections to elements with their D and formulation, trusses, shells, beams, point masses, springs; refused section kinds and formulations are named. More than max_dofs unknowns: “the model has N degrees of freedom; the limit is M”.
  3. Temperatures. A coupled step solves its steady heat conduction first; a static step takes its temperature loads (nodes they do not reach stay at their material’s reference temperature).
  4. Pattern and order. The node graph of all elements; the nested dissection order of its nodes (Linear solvers); reference point equations follow the mesh nodes.
  5. Reduction. Symmetry, coupling and tie rows and the prescribed values build the transformation; its memory is checked against the factor budget before it is allocated. Every unknown prescribed: “every degree of freedom is prescribed; there is nothing to solve”.
  6. Loads and assembly. f from the step’s loads (and the thermal loads); K assembled in rounds of 4096 elements in parallel, added in label order.
  7. Factor and solve. K_ff = T_fᵀ K T_f is factored by Cholesky against max_factor_entries; a pivot at or below 10⁻¹⁰ of its diagonal is reported as “the stiffness is singular at node N in direction: the model can move without straining (missing or insufficient boundary conditions, a part not connected to the rest, or a reference point direction nothing holds)”. A non-finite solution is refused as ill-conditioned.
  8. Recover. Reactions, element stresses (in parallel, collected in label order), shell section forces and stresses, beam end forces with their body-force loads, nodal averages.
  9. Balance. The applied and reaction totals per direction (the forces of springs to the ground included); a difference above 10⁻⁶ of the largest load or reaction is a warning naming it.

Every step is bounded: the work is fixed by the model size, and the only caps are max_dofs and max_factor_entries.

Output

The reply (in the display units):

KeyMeaning
step, dofs, equations, factor_entriesthe step, its unknowns, the free ones solved for, the factor’s entries
max_displacement{node, value}: the largest displacement magnitude
max_von_mises{node, value}: the largest nodal von Mises stress
applied_total, reaction_totalforce sums along X, Y, Z (moments excluded); a component below 10⁻⁹ of the sum of the terms’ magnitudes is set to 0
reference_pointsper coupled reference point: name, label, displacement (3 translations, 3 rotations), reaction (forces, moments)
max_temperaturecoupled steps: {node, value}
warningswhat was ignored or left out (dashpots, plasticity, shells under temperature, balance)

The stored result has per node (label order) the displacement, rotation (zero at solid and truss nodes), reaction, reaction moment, averaged stress (xx, yy, zz, xy, xz, yz) and von Mises stress; per element the integration-point and nodal stresses; per shell section forces and surface stresses; per beam end forces. solve.probe reads them at nodes (nodes, set or the nearest nodes to points at) with the principal stresses, and with elements per element. results.contour draws displacement, displacement_x/y/z, von_mises, max/mid/min_principal and stress_xx … stress_yz; results.reactions sums reaction forces and moments over sets about a point; results.export.vtu writes displacement, rotation, reaction, stress and von Mises for ParaView.

Worked example

The bracket-hex sample: the filleted steel L-bracket meshed all-hex in 30 mapped blocks, clamped at the end of its upright and loaded with 1 kN at the end of its foot. It shows a linear static solve with its reply, a probe at the loaded end, the stress peak and the balance of loads and reactions.

Geometrytests/corpus/filleted-bracket-blocks: 8 mm thick L-bracket, foot 60 mm along x, upright 50 mm along y, 40 mm along z, R6 fillet, an 8 mm hole through each leg; 30 cells
Meshmesh.hex.blocks, hex20 of 3 mm: 5 778 elements, 27 708 nodes, all valid, scaled Jacobian min 0.705, mean 0.940 (mesh.quality)
Materialsteel: E = 210 GPa, ν = 0.3, ρ = 7 850 kg/m³
Boundary conditionsClamp: set top (the upright’s end face in every cell that has it) fixed
LoadPush: force [0, −1000, 0] N, total, on set tip (the foot’s end face)
StepLoad, static
Unitsmm, t, s, N, MPa
[
  {"command": "file.sample", "params": {"name": "bracket-hex"}},
  {"command": "solve.static", "params": {"step": "Load"}},
  {"command": "solve.probe", "params": {"step": "Load", "at": [[60, 4, 20]]}},
  {"command": "solve.probe", "params": {"step": "Load", "nodes": [428]}},
  {"command": "results.reactions", "params": {"step": "Load"}},
  {"command": "results.deformed", "params": {"step": "Load", "show": true, "scale": "auto"}},
  {"command": "results.contour", "params": {"step": "Load", "field": "von_mises"}}
]

Results from the solve.static reply, solve.probe and results.reactions. The solve took 6.1 to 11.3 s wall time on 14 threads in separate runs (Apple M4 Max, CPU, with other jobs running on the machine). The reference deflection is the 48 016-element tet10 solution of the unpartitioned part held by the_hex_bracket_bends_like_the_fine_tet_solution (crates/engine/src/sample.rs, from crates/testkit/tests/bracket_blocks.rs).

QuantityFieldCraftReferenceDifference
dofs, equations83 124, 82 065
factor_entries91 826 205
u_y at the foot’s end, node 27196 at (60, 4, 20)−0.5086 mm (u_x −0.1698 mm)−0.5093 mm−0.13 %
max_displacement0.5511 mm, node 27053
max_von_mises295.10 MPa, node 428 (σ_yy 290.7 MPa, σ₁ 296.1 MPa)
applied_total y−999.999999999999 N
reaction_total y999.999999981553 N1 000 N1.8 × 10⁻¹¹
Reaction moment about the origin, set top(−20 000.0, 0.0, 60 000.0) N·mm−(r × F) of the load at x = 60, z = 20: (−20 000, 0, 60 000) N·mm< 10⁻¹⁰

What to look at. The deformed shape (scale 15.9) bends both legs about the fillet. The stress runs round the fillet and peaks at the edge of the upright’s hole, 295 MPa, where the hole interrupts the upright’s bending stress; the peak is a nodal average of the elements’ stresses extrapolated from their integration points. The reactions at the clamp carry the whole 1 kN and its moment about the origin to rounding, the balance check of step 9 of the algorithm, and the probe at the foot’s end lies within 0.13 % of the fine tet10 solution.

Verification

CaseReferenceErrorToleranceTest
Patch test, every solid and 2D elementtheory< 10⁻¹² (3D), < 10⁻¹⁵ (2D)exactpatch-*, patch_test_every_element, patch_test_every_element_and_theory
Uniaxial tension by pressure, distorted block, every solidtheoryσxx = p, balance to 10⁻⁹exactuniaxial_tension_by_pressure
Gravity and body force totalstheory: ρ g V10⁻⁹exactgravity_and_body_force_totals
Cantilever, Timoshenko deflectiontheoryhex20 0.013 %, hex8 incompatible 0.16 %, tet10 0.018 %; reactions < 10⁻⁴ %0.5 %cantilever-hex20, cantilever-hex8-incompatible, cantilever-tet10
Cantilever convergence: hex8, tet4, wedge6theorymonotone, rate > 1.5; < 4 %, 12 %, 4 % at 40 × 8 × 8as statedcantilever_tip_deflection_and_convergence (heavy)
Lamé thick cylinder, plane strain (3D quarter, 2D plane strain, axisymmetric)theoryu_r ≤ 0.00042 %, σ_θ −0.18 % to −0.41 %, σ_z +0.42 %0.1 %, 1 %lame-cylinder, lame-cylinder-plane-strain, lame-cylinder-axisymmetric
Kirsch plate, K_t = 3 at the holetheory+0.40 % (3D), +0.096 % (plane stress)2 %kirsch-plate, kirsch-plate-plane-stress
Rotating disc (plane stress) and cylinder (axisymmetric)theory≤ 0.2 %1 %rotating-disc-plane-stress, rotating-cylinder-axisymmetric
NAFEMS LE1 elliptic membranebenchmark+0.18 % (hex20 layer), −0.056 % (plane stress)1 %nafems-le1, nafems-le1-plane-stress
NAFEMS LE10 thick platebenchmark+0.86 %2 %nafems-le10
NAFEMS LE5 Z-section cantileverbenchmark−1.35 %2 %nafems-le5
NAFEMS LE7 axisymmetric cylinder/spherebenchmark−2.23 % against the thin-shell target (known failure: no axisymmetric shell); +0.05 % against the converged solid1 %nafems-le7
NAFEMS LE2, LE3, LE6; Scordelis–Lo; pinched cylinder (shells)benchmarksee Element library
Scordelis–Lo roof with solidsbenchmark0.33 %2 %scordelis-lo-roof-solid
Tie patch test, non-matching meshestheory< 10⁻⁴ %10⁻⁹ rel.tie-patch
Tube torsion through a kinematic couplingtheoryrotation 0.0006 %, shear stress 0.29 %0.5 %, 1 %tube-torsion-coupling
Pure bending through a distributing couplingtheorystress < 10⁻⁴ %; rotation < 10⁻⁴ % (the coupling is the L2 fit over the end face’s element faces, Zienkiewicz, Taylor & Zhu 2013, §6.6)0.5 %, 1 %pure-bending-coupling
Uniform tension through a distributing coupling on the end facetheorydisplacement and stress < 10⁻⁴ %10⁻⁸ rel.tension-coupling
Inclined symmetry plane against the axis-aligned image and the whole parttheory (frame indifference)displacements < 10⁻⁹, stresses < 10⁻⁸; balance < 10⁻⁸as statedcrates/solver/tests/inclined_symmetry.rs
Filleted bracket, peak fillet stress (mesh-converged reference)theory (convergence study)within 3 % (fine), 5 % (coarse); reaction exact3 %, 5 %filleted-bracket-fillet-stress, -coarse
A buckling preload equals the static solution, 1 and 3 threadsdeterminismbit for bitexactbuckling_preloads_match_static_with_loads_motion_and_temperature
Field transfer of uniform and linear fields, tet4, tet10, wedge6, pyramid5, hex8, hex20theory< 10⁻¹²exactcrates/fem/src/transfer.rs tests
Initial stress held by the supports; linear residual stress and linear initial temperature released in a free beam (w″ = 2 s / (E H), w″ = α g)theory (Timoshenko & Goodier §150)< 10⁻⁸10⁻⁸crates/solver/tests/initial.rs, initial-temperature-beam, initial-stress-beam
Linear temperature and uniform stress mapped from hex20 onto tet10 of other divisions, then heldtheory10⁻⁹ K, 10⁻⁷ rel.; solved stress 10⁻⁶ rel.as statedcmd::initial::tests
Errors and capssingular model names a node; max_dofs, max_factor_entries refuse with the byte estimate——errors_name_the_problem

Limitations

  • Small displacements and linear elasticity: plasticity, damage and erosion are left out with a warning; hyperelastic materials take their small-strain linear limit. For large deformation, plasticity or contact use Nonlinear static.
  • Contact is refused; ties are linear constraints.
  • Shells and beams take no thermal strain (a warning says so); centrifugal loads on trusses, shells, beams and point masses are refused.
  • Dashpots are ignored with a warning.
  • A rotation boundary condition on a solid node has no effect (solid nodes have no rotations).
  • Couplings and shells are refused in 2D models.
  • Initial fields: mapped from static, heat transfer and coupled steps only, onto and from solid elements only (an initial stress in 2D or hybrid elements is refused, shells, beams and trusses leave it out with a warning); they are keyed by node label, so a remeshed part needs them mapped again. The deck writers refuse them by name.
  • tet10 integrates the initial-stress load −∫ Bᵀ σ₀ dV only approximately once σ₀ varies more than linearly across an element: its four-point rule is exact to degree 2, and the integrand is cubic for a quadratic σ₀. A self-equilibrated σ₀ then gives a spurious load. In crates/solver/tests/initial.rs, σ_xx = s (1 − 12 ζ²) through a beam held at its ends (the exact solution moves nothing) moves a tet10 mesh of 8 × 2 × 2 cells by 3·10⁻³ of s L / E and changes the stress by 0.7 % of s (the reactions still balance), where hex8 and hex20, whose product rules integrate this load exactly on undistorted elements, give zero to rounding. The error falls with the mesh size (16 × 4 × 4 cells: 2.3·10⁻⁴ and 0.18 %); where a residual stress varies sharply, use hex20 or a finer tet10 mesh.

Implementation

FileContents
crates/engine/src/cmd/solve.rsSTATIC spec, run_static, limits, FACTOR_ENTRY_CEILING, solve.probe
crates/solver/src/analysis.rssolve_static, static_on, assemble, pattern, reduction, factor_error, StaticResult
crates/solver/src/system.rsMesh::new, loads, prescribed, temperature_loads, add_thermal_loads, inelastic_warnings, BALANCE_TOLERANCE
crates/solver/src/constraints.rsReduction, coupling_rows, symmetry_rows
crates/solver/src/tie.rs, discrete.rstie rows; point masses, springs
crates/solver/src/sparse.rs, ordering.rs, cholesky.rsassembly, ordering, factorization (Linear solvers)
crates/fem/src/element.rs, face.rselement kernels, stress extrapolation, pressure loads

References

  • O. C. Zienkiewicz, R. L. Taylor, J. Z. Zhu. The Finite Element Method: Its Basis and Fundamentals, 7th ed. Butterworth-Heinemann, 2013.
  • T. J. R. Hughes. The Finite Element Method. Dover, 2000.
  • R. D. Cook, D. S. Malkus, M. E. Plesha, R. J. Witt. Concepts and Applications of Finite Element Analysis, 4th ed. Wiley, 2002.
  • J. F. Abel, M. S. Shephard. An algorithm for multipoint constraints in finite element analysis. IJNME 14(3):464–467, 1979.
  • E. Hinton, J. S. Campbell. Local and global smoothing of discontinuous finite element functions using a least squares method. IJNME 8(3):461–480, 1974.
  • A. George. Nested dissection of a regular finite element mesh. SIAM J. Numer. Anal. 10(2):345–363, 1973.
  • E. Ng, B. W. Peyton. Block sparse Cholesky algorithms on advanced uniprocessor computers. SIAM J. Sci. Comput. 14(5):1034–1056, 1993.
  • NAFEMS. The Standard NAFEMS Benchmarks, TNSB Rev. 3, October 1990.
  • R. H. MacNeal, R. L. Harder. A proposed standard set of problems to test finite element accuracy. Finite Elements in Analysis and Design 1(1):3–20, 1985.
  • S. P. Timoshenko, J. N. Goodier. Theory of Elasticity, 3rd ed. McGraw-Hill, 1970.