You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At this moment the beam module is unable to calculate Influence Line Diagrams (I.L.D.) for beams with hinges. The problem occurs when trying to calculate the I.L.D. reaction forces. Take the following code for example:
from sympy.physics.continuum_mechanics.beam import Beam
from sympy import Symbol, symbols
E = Symbol('E')
I = Symbol('I')
F = Symbol('F')
b = Beam(10, E, I)
r0, m0 = b.apply_support(0, type="fixed")
r10 = b.apply_support(10, type="pin")
b.apply_hinge(5)
b.solve_for_ild_reactions(F, r0, m0, r10)
print(b.ild_reactions)
The symbol for the unknown rotation jump P_5 (that occurs at the hinge) is still in the equation. When looking at the code this isn't surprising, because the code does not create equations to solve this unknown. The code is given here.
def solve_for_ild_reactions(self, value, *reactions):
"""
Determines the Influence Line Diagram equations for reaction
forces under the effect of a moving load.
Parameters
==========
value : Integer
Magnitude of moving load
reactions :
The reaction forces applied on the beam.
Examples
========
There is a beam of length 10 meters. There are two simple supports
below the beam, one at the starting point and another at the ending
point of the beam. Calculate the I.L.D. equations for reaction forces
under the effect of a moving load of magnitude 1kN.
Using the sign convention of downwards forces being positive.
.. plot::
:context: close-figs
:format: doctest
:include-source: True
>>> from sympy import symbols
>>> from sympy.physics.continuum_mechanics.beam import Beam
>>> E, I = symbols('E, I')
>>> R_0, R_10 = symbols('R_0, R_10')
>>> b = Beam(10, E, I)
>>> p0 = b.apply_support(0, 'roller')
>>> p10 = b.apply_support(10, 'roller')
>>> b.solve_for_ild_reactions(1,R_0,R_10)
>>> b.ild_reactions
{R_0: x/10 - 1, R_10: -x/10}
"""
shear_force, bending_moment = self._solve_for_ild_equations()
x = self.variable
l = self.length
C3 = Symbol('C3')
C4 = Symbol('C4')
shear_curve = limit(shear_force, x, l) - value
moment_curve = limit(bending_moment, x, l) - value*(l-x)
slope_eqs = []
deflection_eqs = []
slope_curve = integrate(bending_moment, x) + C3
for position, value in self._boundary_conditions['slope']:
eqs = slope_curve.subs(x, position) - value
slope_eqs.append(eqs)
deflection_curve = integrate(slope_curve, x) + C4
for position, value in self._boundary_conditions['deflection']:
eqs = deflection_curve.subs(x, position) - value
deflection_eqs.append(eqs)
solution = list((linsolve([shear_curve, moment_curve] + slope_eqs
+ deflection_eqs, (C3, C4) + reactions).args)[0])
solution = solution[2:]
# Determining the equations and solving them.
self._ild_reactions = dict(zip(reactions, solution))
This can be fixed by adding equations to solve the unknown rotation jump. Right now I am working on adding these equations to solve_for_reaction_loads in PR #26594. A similar approach can probably give solve_for_ild_reactions the possibility to calculate beams with hinges.
At this moment the beam module is unable to calculate Influence Line Diagrams (I.L.D.) for beams with hinges. The problem occurs when trying to calculate the I.L.D. reaction forces. Take the following code for example:
This outputs: {R_0: 3Fx/20 - 3F/2 + 3P_5/200, M_0: -Fx/2 + 5F - 3P_5/20, R_10: -3Fx/20 + F/2 - 3P_5/200}
The symbol for the unknown rotation jump P_5 (that occurs at the hinge) is still in the equation. When looking at the code this isn't surprising, because the code does not create equations to solve this unknown. The code is given here.
This can be fixed by adding equations to solve the unknown rotation jump. Right now I am working on adding these equations to
solve_for_reaction_loads
in PR #26594. A similar approach can probably givesolve_for_ild_reactions
the possibility to calculate beams with hinges.As this is a school project I will tag my supervisors so they stay up-to-date: @Tom-van-Woudenberg @moorepants
The text was updated successfully, but these errors were encountered: