SOM WRITE-UP
Name:- Rupali Pandey
Roll Number:- 16014323052
Batch:- A3
Q.1] Write a code for calculation of Shear force and Bending
Moment for the following question:
Ans: (The problem has been solved by using python
language)
Code:
import sympy as sp
# Define variables for reactions at A and B
RA, RB = sp.symbols('RA RB')
# Given values
M_C = 20 # Moment at C in kNm
L = 4 # Total length in meters (2m each side of C)
LC = L / 2 # Distance from A to C or C to B (2 meters)
# Write the equilibrium equations
# 1. Sum of vertical forces (∑Fy = 0)
eq1 = sp.Eq(RA + RB, 0)
# 2. Sum of moments about point A (∑MA = 0)
eq2 = sp.Eq(RB * L - M_C, 0)
# Solve the system of equations
solution = sp.solve([eq1, eq2], [RA, RB])
# Extract the values of RA and RB
RA_val = solution[RA]
RB_val = solution[RB]
# Shear forces calculations
# Shear force just right of A (S.FA JR) and left of A (S.FA JL)
V_A_right = RA_val # Shear force just right of A
V_A_left = 0 # Shear force just left of A
# Shear force just right of B (S.FB JR) and left of B (S.FB JL)
V_B_right = 0 # Shear force just right of B
V_B_left = RA_val # Shear force just left of B
# Bending moment calculations
# Bending moment at A (B.MA), B (B.MB), and C
M_A = 0 # Moment at A (fixed support)
M_B = 0 # Moment at B (roller support)
M_C_right = RB_val * LC # Moment just right of C
M_C_left = M_C_right - M_C # Moment just left of C
# Output the results
print(f"Reaction at A (RA): {RA_val} kN")
print(f"Reaction at B (RB): {RB_val} kN")
# Output shear forces
print(f"Shear force just right of A: {V_A_right} kN")
print(f"Shear force just left of A: {V_A_left} kN")
print(f"Shear force just right of B: {V_B_right} kN")
print(f"Shear force just left of B: {V_B_left} kN")
# Output bending moments
print(f"Bending moment at A: {M_A} kNm")
print(f"Bending moment at B: {M_B} kNm")
print(f"Bending moment just right of C: {M_C_right} kNm")
print(f"Bending moment just left of C: {M_C_left} kNm")
Output: