Skip to content

Preserve nodal loads when merging duplicate nodes - #371

Open
Tonylo-lab wants to merge 1 commit into
JWock82:mainfrom
Tonylo-lab:fix/merge-duplicate-node-loads
Open

Tonylo-lab wants to merge 1 commit into
JWock82:mainfrom
Tonylo-lab:fix/merge-duplicate-node-loads

Conversation

@Tonylo-lab

Copy link
Copy Markdown

merge_duplicate_nodes() redirects connected elements and merges support conditions, but discards loads on removed nodes. In a one-unit cantilever, coincident tip nodes carrying FY=-10 and FY=-20 produce a support reaction of 10 after merging instead of 30; a moment on the removed node is also lost.

Append the removed node's loads to the surviving node before deletion. Add two focused tests to the existing node-merge tests: preserving loads across a multi-node merge (including identical loads, different cases, an unrelated node and a repeated merge), and checking actual cantilever force/moment reactions for two load combinations. Add one short changelog entry.

The analysis regression uses exactly coincident nodes. This change preserves load records; it does not add a coordinate-offset moment correction for nodes merged within a nonzero tolerance.

Validation on Windows / Python 3.12.15:

  • New tests on unmodified production code: 2 failed.
  • pytest Testing/test_node_merge.py Testing/test_mesh_regeneration.py Testing/test_delete_mesh.py Testing/test_loads.py Testing/test_reactions.py Testing/test_reanalysis.py -q: 28 passed, 2 subtests passed.
  • Ruff 0.14.9 on the changed Python files and git diff --check: passed.

Not run: the full test suite, graphical visualization validation, or other platforms/Python versions.

AI assistance: OpenAI Codex assisted with investigation, the patch and regression tests. The concrete diff and validation results were presented for approval before submission.

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.

1 participant