Hello Sampad / Jason,
I managed to solve the classic fixed beam problem in 3 steps as described
in the listing below.
Hope it is useful for whoever tries to implement it in the beam module.
At present the beam module cannot handle statically indeterminate beams.
Fixed beam is indeterminate of order 2.
> """
>
> Fixed Beam of length L with concentrated load at center.
>
> Slopes at both ends = 0
>
> Deflections at both ends = 0
>
> Due to indeterminacy of 2, the problem is split up in two parts
>
> Step 1 : beam b1 is defined with far end free and concentrated load in the
> centre
>
> Step 2 : beam b2 is defined with far end free and unit load and unit
> moment applied at the far end.
>
> Step 3 : the two solutions are solved as a system of two equations in two
> unknowns.
>
> Step 4 : beam b3 is the final solution in which M3 and M4 (fixed end
> moments) are input from the calculated values
>
> """
>
> from sympy.physics.continuum_mechanics.beam import Beam
>
> from sympy import symbols, linsolve, plot
>
> from sympy import SingularityFunction
>
> E, I, x = symbols('E, I, x')
>
> R1, R2, R3, R4 = symbols('R1, R2 R3 R4')
>
> M1, M2 = symbols('M1, M2')
>
> P, L = 6.,4.
>
> uR1, uM1 = symbols('uR1, uM1')
>
>
> w_unit, m_unit = symbols('w_unit m_unit')
>
>
> # Step 1
>
> b1 = Beam(L, E, I)
>
> b1.apply_load(R1, 0, -1)
>
> b1.apply_load(P, L*.5, -1)
>
> b1.apply_load(M1, 0, -2)
>
> b1.bc_deflection = [(0, 0)]
>
> b1.bc_slope = [(0, 0)]
>
> b1.solve_for_reaction_loads(R1, M1)
>
>
> # Step 2
>
> b2 = Beam(L, E, I)
>
> b2.apply_load(uR1, 0, -1)
>
> b2.apply_load(uM1, 0, -2)
>
> b2.apply_load(w_unit, L, -1)
>
> b2.apply_load(m_unit, L, -2)
>
> b2.bc_deflection = [(0, 0)]
>
> b2.bc_slope = [(0, 0)]
>
> b2.solve_for_reaction_loads(uR1, uM1)
>
>
> # Step 3
>
> slope_constraint =
> b1.slope().subs({E:1,I:1,x:L})-b2.slope().subs({E:1,I:1,x:L})
>
> deflection_constraint =
> b1.deflection().subs({E:1,I:1,x:L})-b2.deflection().subs({E:1,I:1,x:L})
>
> constraints = [slope_constraint,deflection_constraint]
>
> soln = linsolve(constraints,[w_unit,m_unit])
>
> w_u, m_u = soln.args[0]
>
> M4 = -m_u
>
> mtot = b1.reaction_loads[M1] - b2.reaction_loads[uM1]
>
> M3 = mtot.subs({m_unit : m_u,w_unit:w_u})
>
>
> # Step 4
>
> b3 = Beam(L, E, I)
>
> b3.apply_load(R3, 0, -1)
>
> b3.apply_load(R4, L, -1)
>
> b3.apply_load(P, L*.5, -1)
>
> b3.apply_load(M3, 0, -2)
>
> b3.apply_load(M4, L, -2)
>
> b3.bc_deflection = [(0, 0),(L,0)]
>
> b3.solve_for_reaction_loads(R3, R4)
>
>
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/337536b1-b4fd-468c-aa6c-5b1b18614179%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.