from __future__ import division
from sympy import solve, symbols
import math
G=20000 #shear modulus (N/mm^2)
E=G/0.36 #young's modulus
tau=20 #torque (Nm/mm)
t=1
b=200
a=500
L=2500
A=800
#torque at each support
T=20*5000/2
mu=math.sqrt(8*G*t/(A*E*(b+a)))
z=2500
F=-1.95/mu*math.cosh(mu*z)+1.75*z**2
z=0 # at mid-span z=0
theta=10**(-8)*(1.95/mu*math.cosh(mu*z)-1.75*z**2+F)
print "twist at mid-span = %1.3f rad = %1.2f degree"%(theta,theta*180/math.pi)