Skip to content

Make internal hinge detection independent of element order - #492

Open
mitchell-tesch wants to merge 1 commit into
anastruct:masterfrom
mitchell-tesch:fix/464-order-dependent-hinges
Open

mitchell-tesch wants to merge 1 commit into
anastruct:masterfrom
mitchell-tesch:fix/464-order-dependent-hinges

Conversation

@mitchell-tesch

Copy link
Copy Markdown

Fixes #464.

Since 102cb38, check_internal_hinges() runs on every add_element() so hinges show before solve(). It released the remaining elements of a node as soon as the elements added so far met the hinge criteria, and never undid this. In #464, node 3 connects beam 2, beam 3 (released at node 3) and column 7. Beam 3 is added before column 7, so node 3 became a hinge and beam 2 and column 7 were released too.

Change

  • check_internal_hinges() records the releases it adds and undoes them before re-evaluating a node. The hinge criteria are unchanged.
  • Internal hinges are matched by node id, because the post-processing replaces the Node objects. Before, every solve() appended the node again.
  • add_element() copies the spring dict, so a dict shared by several elements isn't modified.

Result (#464 model, dead load, moment at node 3)

Beam 2 Beam 3 (released) Column 7
1.7.x 0.00 0.00 0.00
this PR, and before 102cb38 -4.75 0.00 4.75

The new test builds the joint in three element orders; it fails on master. pytest, pylint, mypy and black pass.

Related: #482 also fixes this, with a different hinge model (springs are never modified). I'm happy to close this PR if #482 is merged first. This PR merges cleanly with #487, #490 and #491.

Since 102cb38, check_internal_hinges() runs on every add_element(). It
released the remaining elements of a node as soon as the elements added
so far met the hinge criteria, and never undid this. A joint where only
one of three elements is released became a hinge if the released element
was added before the third one (anastruct#464).

check_internal_hinges() now records the releases it adds and undoes them
before re-evaluating a node. Internal hinges are matched by node id, as
the post-processing replaces the node objects, and add_element() copies
the spring dict, as it may be shared by several elements.

Fixes anastruct#464

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Strange behaviour of release - Forces all elements at node to be released

1 participant