| THEORY & FORMULAE |
Consider a simply-supported slender bar, subject to arbitrary number of a) concentrated forces, b)concentrated couples and c) uniformly distributed loads, acting in any order but all acting simultaneously at known points along the beam. The implementation here only considers combinations of 0 to 2 concentrated forces, 0 to 2 couples, and 0 or 1 distributed force.
The following equations describe the deflections arising from a single case for each of the three load types:
    
where
     D = deflection
     Dp = deflection due to concentrated force
     Dc = deflection due to concentrated couple
     Dw = deflection due to distributed force
     P = concentrated point load
     C = concentrated couple (moment)
     w = intensity of uniformly distributed force
     L = distance between supports
     x = distance from left end of beam
     ξ = location of concentrated load
     ξ1 = location of left end of distributed load
     ξ2 = location of right end of distributed load
     E = modulus of elasticity of beam material
     I = area moment of inertia of cross-sectional area about axis through centroid
The pointed bracket
in the equations is a special function called the Singularity Function. It takes the value zero when the quanity within it is zero or negative.
To aggregate the single cases above to the multiple loading scenario, the Principle of Superposition is applied. It simply states that if the total load can be split into partial loads with known deflections, the total deflection is calculated by summing up the partial deflections.
The slope of deflection can be obtained by differentiating the defelection equations with respect to x, and ultimately using the arc tan function to convert to angle.
The implementation here is essentially a modern-day enhancement of the Fortran program in Problem 13.12 by Nash.
◊ Use link
EXAMPLE Of Input/Output
to demo data entry expectations and results; you may edit & use it as starting point