Repository navigation
Conversation
Imposed displacements and rotations of supports (support settlement): SystemElements.imposed_displacement(node_id, ux, uy, phi_z), also available in LoadCase and LoadCombination. A positive uy acts in the +y direction like a positive Fy, so a settlement is a negative uy. The displacement is applied in process_supports() and enters the reactions and the element forces. Thermal loads on elements: SystemElements.thermal_load(element_id, delta_t, alpha, delta_t_gradient, h), also available in LoadCase and LoadCombination. A uniform temperature change gives an equivalent axial force, a linear gradient over the section depth h an equivalent end moment. Includes the user documentation (docs/source/loads.rst, supports.rst), the examples ex_27 to ex_29 and tests against analytical solutions. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nges Hinges and rotational springs at element ends: a hinge is condensed exactly (an element with one hinge has 3EI/l instead of 4EI/l) and a finite spring k acts in series with the element, instead of giving wrong values or NaN. discretize() and the detection of internal hinges are reworked: the result no longer depends on the order in which the elements are added, and the hinges of the discretized elements are drawn by the plotter. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…tions * solve(geometrical_non_linear=True) now agrees with the Euler buckling loads (the buckling factor follows from K0 x = -lambda Kg x). * The sign of the thermal gradient is corrected: a positive gradient means the face to the left of node1 -> node2 is warmer. * Loads on inclined (rotated) rollers are handled in the support directions. * Plastic hinges are taken into account in the second order analysis. * A LoadCombination is one calculation with all of its loads. * A displacement imposed in a direction that no support restrains now gives a clear notice instead of being silently ignored. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Plastic hinges (mp=) are modelled as a rotational spring in series with the element and iterated with a secant method. Unloading returns to the elastic stiffness, a mechanism raises a FEMException, and every solve() starts from the elastic state. * Node ids may have gaps after remove_element(): dof indices come from dof_index() and new ids are max(id) + 1; remove_node_id() cleans up the supports, springs and displacement loads of the node. * LoadCase.dead_load works, and the dead load of the system counts once in a LoadCombination. * validate() works before the first solve() and a displacement above 1e6 raises a StabilityError. * A zero-length element and a spring with k=inf raise a FEMException. * Vertex coordinates are float64, rounded to 12 significant digits. * Loads with invert_y_loads=False: x/parallel keep their direction, the others are reversed, and an explicit rotation is mirrored consistently. * The spring and mp dictionaries given to add_element() are never modified. * The examples ex_27 to ex_29 print each result next to its analytical value and assert that they agree. The expected solutions of two tests in tests/test_e2e.py change, because the stiffness of element end hinges is now exact. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Hi @mgrubisic, just a heads-up that there's some overlap here. I ran into the geometrical non-linear bugs separately and opened two small PRs for them:
We ended up with pretty much the same approach for both, so whichever gets merged first, the other should rebase without much trouble. Happy to help with that either way. |
brookshsmith
left a comment
There was a problem hiding this comment.
Hi @mgrubisic -
Thank you for your prompting on the several points in here. However, this is a very large and sprawling set of changes that is rather difficult to review adequately. Can you please split this pull request up into fixes for individual bugs, and additions of individual features?
I do want to be clear that I am not against AI (I use Claude to assist my coding too), but I've also seen first-hand how AI-generated code easily makes mistakes in engineering software, especially in edge cases, and I want to ensure that any updates that come into anaStruct are fully read and understood by a human - which means keeping changes small and focused.
Thank you!
This PR adds support for imposed support displacements and rotations and thermal loads, including uniform temperature changes and temperature gradients. Both load types are available through
SystemElements,LoadCase, andLoadCombination, with documentation, examples, and tests against analytical solutions.It also improves key aspects of the structural analysis:
The changes include expanded documentation, three new examples, and broad test coverage for these features and related regressions.