from __future__ import division
import math
D=4 #diameter of rivet(mm)
t_skin=2.5 #thickness of fuselage skin(mm)
t_strap=1.2 #thickness of straps (mm)
T=120 #shear stress (N/mm^2)
A=math.pi*D**2/4 #rivet area
Pfb=2*A*T
b=Pfb/t_skin/12.5/10+4
print "allowable rivet spacing = %2.1f mm \n"%(b)
from __future__ import division
import math
l1=20 #distace between A&D (mm)
l2=25 #distace between C&D (mm)
l3=75 #distace between C&force location (mm)
P=5 #external load(kN)
r=(l1**2+l2**2)**0.5
sum_r2=2*l1**2+4*r**2
#eqn 12.6 S=Pe*r/Sum(r2)
Pe=P*l3
S=Pe/sum_r2*r
print "Resultant shear force in the A and B = %2.2f kN\n"%(S)