Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ settled design. What is still open, and who is asked, is on one page:
| Contact | `contact/` | FEBio's `contact potential`, on its own and in a run: pair search on the device, force, tangent, gradients. FEBio's form by default, and a smooth form that the contact type `smooth contact potential` (FEBio-Warp only) or a run (`--preset febio_warp`) asks for. FEBio's `edge-to-surface contact potential` (an edge against a surface). Smooth contact measures for objectives. Count of intersecting facet pairs. FEBio's `sliding-elastic` with tension against a fixed rigid target (shape enforcement). FEBio's `sticky` in its penalty form, with `snap_tol` and release by `max_traction`, with its primary on a deformable body or on a rigid body the input moves (a clip arm on a leaflet) | Element-pair `w_tol`; step cut on a facet crossing; gradients in the radii and the exponent of the potential (`kc` has one); sticky contact in augmented Lagrangian form, and its gradients (not planned); tied contact; sliding contact with friction; a contact potential against a moving rigid body compared with FEBio; activation by step for `sliding-elastic` (a `contact potential` of a step is built) | [Contact](docs/design/contact.md) ([diagram](docs/design/contact.md#at-a-glance), [decisions](docs/design/contact.md#decision-points)), [contact in a run](docs/design/contact_in_run.md) ([diagram](docs/design/contact_in_run.md#2-where-contact-sits-in-one-iteration)), [shape enforcement](docs/design/shape_enforcement.md) ([diagram](docs/design/shape_enforcement.md#2-from-the-input-to-terms)) |
| Elements | `elements/` | hex8, penta6 and tet4 solids on dedicated kernels (hex8 and tet4 also through `warp.fem`, as a cross-check); FEBio's three-field solid on hex8 and penta6 for uncoupled materials, in its penalty form; quad4 and tri3 shells; two-node trusses (regular, tension-only and smooth tension-only); springs; FEBio's beam (`linear-beam`, line2 and line3, static and dynamic). Mass for hex8, tet4 (FEBio's one-point rule), quad4 shell and truss | rigid bodies with unknowns; the augmented Lagrangian of the three-field solid | [Trusses and springs](docs/design/trusses_and_springs.md) ([diagram](docs/design/trusses_and_springs.md#2-from-the-input-to-a-term)), [elements](docs/design/elements.md) ([diagram](docs/design/elements.md#3-selection)) |
| Unknowns and assembly | `discretization/`, `assembly/` | Unknowns by (node, variable); full assembly of residual and tangent into a block sparse matrix with a fixed pattern | How a new term enters the system ([open question](docs/design/open_questions.md#4-decisions-for-reviewers)); timing on a GPU at application size | [Run path](docs/design/run_path.md) ([diagram](docs/design/run_path.md#2-the-path), [decisions](docs/design/run_path.md#12-decision-points)), [assembly](docs/design/assembly.md) |
| Loads and constraints | `loads/`, `constraints/` | Follower pressure; nodal loads; mass damping; a constant body force (`const`, `body force`); load curves on mass damping `C` and on contact `kc`; FEBio's four extend modes of a load curve; body loads on an element set, applied as FEBio applies them; fixed and prescribed displacements, also one value per node from a map; `normal displacement` on a surface, with `relative`; `prescribed deformation` of a node set; the `slide-line` constraint; the `linear constraint` set and `node distance` of the `Constraints` section, by penalty or augmented Lagrangian, also declared in a step; a rigid body that is fixed or moved by the input (`rigid_fixed`, `rigid_displacement`, `rigid_rotation`, a revolute joint with a prescribed rotation), as geometry; the rigid wall (`rigid_wall`, a plane) in its penalty form | A body force that varies in space; rigid bodies that respond to load, their loads and other connectors; the rigid wall with augmented Lagrangian; the `linear constraint` boundary condition (by elimination); Lagrange multipliers as unknowns (`LAGMULT`) | [Dynamics](docs/design/dynamics.md), [constraints](docs/design/constraints.md) ([diagram](docs/design/constraints.md#2-how-a-constrained-component-is-handled)) |
| Loads and constraints | `loads/`, `constraints/` | Follower pressure; nodal loads; mass damping; a constant body force (`const`, `body force`); load curves on mass damping `C` and on contact `kc`; FEBio's four extend modes of a load curve; body loads on an element set, applied as FEBio applies them; fixed and prescribed displacements, also one value per node from a map; `normal displacement` on a surface, with `relative`; `prescribed deformation` of a node set; the `slide-line` constraint; the `linear constraint` set and `node distance` of the `Constraints` section, by penalty or augmented Lagrangian, also declared in a step; a rigid body that is fixed or moved by the input (`rigid_fixed`, `rigid_displacement`, `rigid_rotation`, a revolute joint with a prescribed rotation), as geometry; a rigid body with open components, solved for as FEBio does, static and dynamic (two entries per body, its nodes eliminated; mass and inertia; `rigid_force` and `rigid_moment` with `LOAD`; a body force on a rigid part; nodes tied by `rigid`); the rigid wall (`rigid_wall`, a plane) in its penalty form | A body force that varies in space; for rigid bodies with open components: initial velocities, static and dynamic steps in one run, `alpha_f` below 1, the other load types, connectors under load, clamped shell nodes; the rigid wall with augmented Lagrangian; the `linear constraint` boundary condition (by elimination); Lagrange multipliers as unknowns (`LAGMULT`) | [Dynamics](docs/design/dynamics.md), [constraints](docs/design/constraints.md) ([diagram](docs/design/constraints.md#2-how-a-constrained-component-is-handled)) |
| Solvers | `solvers/` | The Newton strategy the input asks for, as FEBio runs it (BFGS, Broyden, full or modified Newton), with FEBio's line search; a material's `tangent_scale` applied where the input states it; full Newton whatever the input asks and the exact material tangent as options; CG, BiCGSTAB and GMRES on the device; sparse LU on the host; cuDSS on the device (the `gpu` extra; the default on a GPU), also with a pattern that only grows and factors reused across solves | Preconditioning for shells; transpose solve from cuDSS factors | [Run path](docs/design/run_path.md) ([one Newton iteration](docs/design/run_path.md#3-one-newton-iteration)), [linear solve](docs/design/linear_solve.md) ([diagram](docs/design/linear_solve.md#2-choosing-a-method)) |
| Analysis | `analysis/` | Static and implicit dynamic steps with FEBio's automatic time stepper, for every alpha_f FEBio's `rhoi` and `alpha` give (below 1: domains at the interpolated configuration, and at 1/2 FEBio's energy-conserving stress). Several steps in sequence, as FEBio runs them, a static step after a dynamic one included: each with its own `Control`, and with the conditions, loads and interfaces declared in it acting while it runs. `inspect` reports which records act in which step | Rigid and initial conditions by step; gradients through a step at alpha_f = 1/2 or through a static step after a dynamic one | [Run path](docs/design/run_path.md), [dynamics](docs/design/dynamics.md) ([one dynamic step](docs/design/dynamics.md#2-one-dynamic-step)), [several steps](docs/design/steps.md) ([diagram](docs/design/steps.md#2-a-run-over-steps), [decisions](docs/design/steps.md#7-decision-points)) |
| Sensitivity | `sensitivity/` | Adjoint gradients through one equilibrium solve and through the steps of a dynamic run, also with self-contact, across the boundary between analysis steps and through the history of a material; forward sensitivities of every displacement to chosen parameter directions, with the right-hand sides of all directions solved together, also through history | The radii and the exponent of the contact potential; the mass; transpose solve on cuDSS factors | [Sensitivity](docs/design/sensitivity.md) ([diagram](docs/design/sensitivity.md#2-forward-run-and-reverse-sweep)) |
Expand Down
2 changes: 2 additions & 0 deletions docs/design/constraints.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ First template for discussion, November 26, 2026 (v0.2). Design only: there is n

**Status, December 2, 2026 (rigid wall).** FEBio's `rigid_wall` constraint is built in its penalty form (`constraints/rigid_wall.py`): the nodes of a surface are held on one side of a plane by a force of penalty times gap times the nodal area, along the constant normal, with FEBio's stiffness in Newton and the derivative for the adjoint. `penalty` and `offset` may follow a load curve, so the wall can move. It is a term on node entries and has nothing to do with rigid bodies. Read from `FERigidWallInterface.cpp` at `e4df3f8`; one point is easy to miss: the facets are integrated at their nodes (the base class asks for it), which differs from a Gauss rule on a curved quad4 surface. Suite inputs `co08`, `co10`, `tu03` (static) and `dy03` (a ball falling on a wall, dynamic) take FEBio's time steps and iterations on CPU and on a Tesla P100, with the solution norm within 4e-9, 4e-13, 3e-12 and 2e-11 (`tests/test_rigid_wall.py`). The gradient with respect to `penalty` agrees with central differences. Refused: augmented Lagrangian (not built for the wall), facets other than quad4 and tri3, and a wall declared in a step. The `Constraints` section is otherwise as before.

**Status, December 2, 2026 (rigid bodies with unknowns).** Route A of section 7 is built for rigid bodies, in static steps, as [rigid_bodies.md](rigid_bodies.md) proposes (decisions R1 to R3). A rigid body with a component the input leaves open in some step has two entries in the field table after those of the nodes, its translation and its rotation vector, each component free, fixed or prescribed per step. Its nodes are dependent entries: the system carries their residual and their stiffness blocks to the body after the terms have assembled (`assembly/reduction.py`, checked against the dense product in `tests/test_reduction.py`; the mechanism linear constraints will share). The orientation is a quaternion updated by FEBio's composition of rotation increments through the Cayley transform (`constraints/rigid_system.py`), `rigid_force` and `rigid_moment` are read with `load_type` `LOAD`, and the boundary condition `rigid` ties nodes to such a body. A body with no open component stays on the path of November 29, and a test runs `bk_rigid_lid_moved` and `bk_rigid_lid_top_level` on both paths: the same displacements to round-off. Suite inputs `ri01`, `ri03`, `ri07` and `co42` (the peel input of the sticky contact as published, with its body free) take FEBio's time steps and iterations on CPU and on a Tesla P100, with the solution norm within 2e-12 (`tests/test_rigid_unknowns.py`). In the table of section 6, a body with an open component is no longer refused in a static step. Dynamic steps are built the same day: the mass and inertia of a body from its density (FEBio's rules: one integration point for a tet4, a given `center_of_mass` used as it is), FEBio's update of the angular velocity and acceleration, the inertial force and moment, the rotational mass block, a body force on a rigid part, and the initial accelerations. Two generated cases of a skewed body spun up by moments, `rb_spin` and `rb_spin_from_zero`, agree with FEBio 4.13.0 to 3e-12 with FEBio's iterations in every time step, and suite input `dy05` takes FEBio's counts (`tests/test_rigid_dynamics.py`). Three things of FEBio that are easy to miss are followed, since the iterations depend on them: the stiffness of a time step is formed before its first residual, when the angular momentum is still that of the last state; where the input asks for a symmetric stiffness, the solve sees the upper triangle of the rotational mass block, which is not symmetric, mirrored; and the initial angular acceleration is beta dt^2 times the one the moments give. Refused, with the reason: static and dynamic steps in one run with such a body (FEBio gives a rigid body velocities in a static step, which are not built, in either order), such a body in a dynamic step with `alpha_f` below 1 (FEBio takes the arm of the residual and the connector forces at the interpolated configuration, which is not built for a body), initial velocities of a body, a prescribed rotation beside an open one (an error in FEBio), `FOLLOW`, `TARGET` and `relative` loads, connectors under load, a contact interface with a surface on such a body (its stiffness is not carried to the body yet), nodes of a shell part tied to a body, a rigid shell part, and gradients through a system with such a body.

**Scope.** The one boundary condition the open TPVR input needs that the run path does not have, `normal displacement`, and a statement of how the masking approach would extend to the constraint types that are reserved.

## 1. Summary
Expand Down
9 changes: 8 additions & 1 deletion references/small_problems/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Small FEBio inputs and their FEBio references

One hundred and forty small FEBio 4.0 input files for features the FEBio test suite
One hundred and forty-five small FEBio 4.0 input files for features the FEBio test suite
covers thinly for the valve and device applications, with the FEBio results
for each. Each input mirrors or extends a suite problem. All geometry is
generated; nothing here is patient data. See
Expand Down Expand Up @@ -96,6 +96,13 @@ of the model beside those of steps, through a dynamic step, and by a revolute jo
prescribed rotation, `bk_rigid_lid_moved`, `bk_rigid_lid_top_level`, `bk_rigid_lid_dynamic` and
`bk_rigid_lid_joint`, and nodes of an elastic block tied to such a body, `bk_rigid_tied_nodes`
(`tests/test_rigid_moved.py`, same build);
three of these with one rigid condition taken out, so that a component of the body is open and
the body has unknowns: `bk_rigid_lid_released` (a translation open in one step of four),
`bk_rigid_lid_reopened` (a rotation that FEBio opens when a condition of a step ends) and
`bk_rigid_tied_free` (tied nodes and a free rotation) (`tests/test_rigid_unknowns.py`, same build);
a rigid body alone, spun up by moments in a dynamic step, `rb_spin` and `rb_spin_from_zero`
(`tests/test_rigid_dynamics.py`; the second has a non-symmetric stiffness, which FEBio's skyline
solver does not take, so its reference is of the build with MKL Pardiso at the same commit);
seven inputs with sticky contact, a rigid arm that turns into a shell patch and holds it
(`st_grasp_tri3`, `st_grasp_quad4`, and `st_grasp_in_step` with the interface declared in
a second step) and an elastic block held to an elastic slab, without release (`st_block_on_slab`) and with
Expand Down
51 changes: 51 additions & 0 deletions references/small_problems/cases.json
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,57 @@
"rigid_rotation"
]
},
{
"case": "bk_rigid_lid_released",
"tier": 2,
"tags": [
"rigid body",
"unknowns",
"release",
"several steps"
]
},
{
"case": "bk_rigid_lid_reopened",
"tier": 2,
"tags": [
"rigid body",
"unknowns",
"release",
"several steps"
]
},
{
"case": "rb_spin",
"tier": 2,
"tags": [
"rigid body",
"unknowns",
"DYNAMIC",
"rigid_moment",
"rigid_force"
]
},
{
"case": "rb_spin_from_zero",
"tier": 2,
"tags": [
"rigid body",
"unknowns",
"DYNAMIC",
"initial accelerations",
"non-symmetric"
]
},
{
"case": "bk_rigid_tied_free",
"tier": 2,
"tags": [
"rigid body",
"unknowns",
"rigid node set"
]
},
{
"case": "ch_truss_rest_length",
"tier": 2,
Expand Down
1 change: 1 addition & 0 deletions references/small_problems/febio/bk_rigid_lid_released.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions references/small_problems/febio/bk_rigid_lid_reopened.json

Large diffs are not rendered by default.

Loading