import numpy as np
import sympy
theta = np.pi/2
s2 = 50
s3 = np.sqrt(5)*25
P = 3000
Ixx = 110336.067372
R = 25
angle = np.pi/2
val = -2 * (1-np.pi/2-4+5/6-5/2-3*np.sqrt(5))/(4+np.pi+2*np.sqrt(5))
print(val)
q_s_o = (P*(R**2)/Ixx) * val
q_s_o
def q_s_12(sy, ixx, r, theta):
coeff = sy/ixx * r**2
return(coeff*(np.cos(theta)-1) + coeff*val)
q1 = q_s_12(P, Ixx, R, 0)
print(q1)
q2 = q_s_12(P, Ixx, R, angle)
print(q2)
def q_s_23(sy, ixx, r, s2):
coeff = sy/ixx * r
return(-coeff*s2 - coeff*r + coeff*r*val)
q2_new = q_s_23(P, Ixx, R, 0)
print(q2_new)
q3 = q_s_23(P, Ixx, R, 2*R)
print(q3)
def q_s_34(sy, ixx, r, s3):
coeff = sy/ixx
term1 = -1/(2*np.sqrt(5)) * s3**2 + r*s3 + 3*r**2
term2 = r**2 * val
return(-coeff*term1 + coeff*term2)
q3_new = q_s_34(P, Ixx, R, 0)
print(q3_new)
q4 = q_s_34(P, Ixx, R, np.sqrt(5)*R)
print(q4)
theta = np.linspace(0, np.pi/2, 1000)
qs12 = q_s_12(P, Ixx, R, theta)
s2 = np.linspace(0, 2*R, 1000)
qs23 = q_s_23(P, Ixx, R, s2)
s3 = np.linspace(0, np.sqrt(5)*R, 1000)
qs34 = q_s_34(P, Ixx, R, s3)
bending = (P*1000*R)/Ixx
print(bending)
t = sympy.symbols('t')
sympy.solve((3*(q1/t)**2)**(1/2) - 200, t)
sympy.solve(((bending/t)**2 + 3 * (q2/t)**2)**(1/2) - 200, t)