Repository navigation
Add tied contact, node on facet, as an anchored-point term - #114
Merged
Merged
Conversation
A rigid body with a component that no condition holds was refused. It is the most common reason a suite input does not run, and the last stage of the published clip procedure needs it (Handoff K, thread K1). Such a body now has two entries in the field table, its translation and its rotation vector, and its nodes are dependent entries that the system eliminates. The orientation is a quaternion updated as FEBio's rigid solver updates it; rigid_force and rigid_moment are read with load_type LOAD. Static steps only: the mass and inertia of a body are not built yet, and a contact surface on such a body is refused until its stiffness is carried to the body. Suite inputs ri01, ri03, ri07 and co42 as published take FEBio's time steps and iterations on CPU and on a Tesla P100. Three generated inputs with a released component agree with FEBio 4.13.0 to 4e-12, and a moved body gives the same result on the old path and the new. A body with no open component stays on the old path. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Matthew Jolley <12954190+mattjolley@users.noreply.github.com>
A body with unknowns was refused in a dynamic step. This adds its mass and inertia from the density, 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. Three things of FEBio's rigid solver are followed because its iterations depend on them: the stiffness of a time step is formed before its first residual, with the angular momentum of the last state; a symmetric stiffness keeps the upper triangle of the rotational mass block, which is not symmetric; and the initial angular acceleration is scaled by beta dt^2. Two generated cases of a body spun up by moments agree with FEBio 4.13.0 to 3e-12 with its iterations in every time step, and suite input dy05 takes FEBio's counts, on CPU and on a Tesla P100. A dynamic step after a static one, and initial velocities, are refused. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Matthew Jolley <12954190+mattjolley@users.noreply.github.com>
FEBio's sticky, tied-node-on-facet, tied-elastic and the stick state of sliding-elastic are one force: a spring of stiffness penalty times area between a point of the primary surface and a material point of the secondary surface that is held once chosen (valve_workflow.md, decision W3). Sticky was that term with its settings fixed in its code. The kernels and the attachment state of sticky move to contact/anchored.py unchanged, with what was constant as arguments, and FEBio's tied-node-on-facet in its penalty form is a second setting of it (contact/tied.py): anchors chosen at activation and never released, max_distance, special, offset_shells, a penalty on a load curve, also declared in a step. No behavior of sticky changes: on CPU its seven small cases and co42 with held components give the same numbers bit for bit, with the same iterations. co26 of FEBio's test suite takes the stored 10 steps and 30 iterations and the norm to 2.6e-13, on CPU and on a Tesla P100, and six generated cases agree with FEBio 4.13.0 to 3e-12 with FEBio's iterations. node_reloc 1 is refused: FEBio moves the reference position of the tied nodes after its solid elements have stored their reference gradients, so its result is that of the mesh as written (question 27). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Matthew Jolley <12954190+mattjolley@users.noreply.github.com>
3 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request sits on #113 and is to be merged after it. Until that one is merged, the diff here also shows its commits; the one commit of this pull request is the last.
What does this change, and why?
A suture line, an edge-to-edge stitch and a sewn-in patch are ties, and FEBio's suite has one input,
co26, that misses onlytied-node-on-facet. FEBio'ssticky,tied-node-on-facet,tied-elasticand the stick state ofsliding-elasticare one force: a spring of stiffness penalty times area between a point of the primary surface and a material point of the secondary surface that is held once chosen (decision W3 of valve_workflow.md, section 4.1).stickyonmainwas that term with its settings fixed in its code. Design note: docs/design/contact.md, sections "The anchored-point term" and "Tied contact, node on facet".What is built, to FEBio 4.13.0 at
e4df3f8:contact/anchored.py, the anchored-point term. The kernels and the attachment state ofstickymoved here unchanged; what was constant became arguments (when the anchor is chosen, whether the projection handles its special cases, a largest distance, a shell offset per point).contact/sticky.pykeeps the description of FEBio's interface, its coverage andSticky, now one setting of the term.contact/tied.py,tied-node-on-facetin its penalty form (FETiedInterface): every primary node with a projection on the secondary surface is tied when the interface is activated and never released;max_distance,special,offset_shells, a penalty on a load curve, also declared in a step.state.restart.terms[name]withfacetandwhereper primary point, the same layout for every setting.No behavior of
stickychanges. Measured before the rebase, on CPU: the displacements of every state of its seven small cases and ofco42with held components are the same numbers bit for bit before and after the move, with the same iterations.tests/test_sticky.pyis not edited by this pull request.What is refused, and why:
node_reloc1FESolidElement::m_J0i). In a run of FEBio 4.13.0 the positions that result are those of the run withoutnode_relocto 1e-5: the elements stay strained against the mesh as written. Following that would take elements with the reference gradients of one mesh and the weights of another; a mesh that is simply moved is not FEBio's result. Question 27laugonAUGLAG and LAGMULTadjoint_readyFalse and the adjoint refuses it, as forstickyonmainQuestion 27 (
docs/design/open_questions.mdanddeviations.md), for Steve: is the behavior ofnode_relocabove intended, or is the mesh meant to start at rest with the moved nodes?Validation
All of the following with Warp 1.20.0, on CPU and on a Tesla P100 (cuDSS; the versions of the
gpuextra), at this branch's tip0ff0f03.Tests added or changed:
tests/test_tied.py, new (20 tests): agreement with FEBio onco26and six small inputs, forces and stiffness of the term, the anchors kept and in the restart record, coverage and every refusal above.tests/test_febio_suite.py:co26added toFEBIO_STRATEGY(full tier).FEBio reference (input file, quantity compared, tolerance, FEBio version), or N/A: FEBio 4.13.0 at
e4df3f8.co26FEBIO_4_13ti_blocksti_blocks_max_distancemax_distance: 8 of 16 nodes tiedti_blocks_in_stepti_ridge,ti_ridge_not_specialspecial1 and 0ti_shell_on_blockoffset_shellsThe six small inputs are written by
references/small_problems/generate_tied.py; their references are from the pinned build (skyline solver). The tests hold them to 1e-9 of the largest value.co26needs a checkout of the FEBio test suite (FEBIO_TEST_SUITE) and is skipped without one, so CI does not run it; it ran here.ti_ridgeis also the first comparison with FEBio of a special case of the closest point projection, whichstickyshares.Devices the full tier ran on (CPU, and the GPU model if CUDA; say so clearly if no GPU was used):
test_tied.py(20 tests),test_sticky.py(25) and the documentation links, on CPU: none failed. At the tip of segment C, row 14 (bce0a0b), which holds this change: quick tier of the whole repository, CPU 1,246 tests, none failed (95 skipped); Tesla P100 (cuda:5) 1,246 tests, one failure (86 skipped), the known one onmainnamed below. Full tier oftest_tied,test_sticky,test_sliding_pair,test_sliding_elastic,test_tied_elasticandtest_febio_suite: CPU 104 tests, none failed; Tesla P100 (cuda:4) 104 tests, none failed.maindf58f1e(tip413bdba), Warp 1.20.0: the full tier of the whole repository, CPU 1,079 tests, none failed (26 skipped); Tesla P100 1,079 tests, none failed (13 skipped).mainat25b5aacon a P100, not of this pull request:tests/test_history_adjoint.py,ForwardSweep.test_the_jacobian_of_a_static_run_goes_through_the_steps(from History in the forward sweep #101; it passes on CPU). It showed in the quick tier at the tip of segment C on the P100 (cuda:5), as the only failure, and in no run on CPU.Checklist
uvx pre-commit run --all-filespasses. (Run on the files of this change: passes.)FEBIO_WARP_TEST_LEVEL=full uv run -m unittest discover -s tests, and withFEBIO_WARP_TEST_DEVICE=cuda:0for code that runs on the device. (Not run in full at this tip; see Validation.)git commit -s).🤖 Generated with Claude Code