import math
from numpy.linalg import norm
# Calculations and Results
#Determination of B
#At equillibrium +sum(M_A) = 0
#B*1.5m-(9.81kN)(2 m)-(23.5 kN)(6 m) = 0, B assumed to be in +ve X direction
B = (9.81*2+23.5*6)/1.5 #kN
print "B = %.2f kN +ve sign shows reaction is directed as assumed "%(B);
#Determination of Ax
#Sum Fx = 0
#Ax+B = 0
Ax = -B; #kN
print "Ax = %.2f kN"%(Ax);
#Determination of Ay
#Sum Fy = 0
#Ay-9.81 kN-23.5kN = 0
Ay = 9.81+23.5; #kN
print "Ay = %.2f kN"%(Ay);
A = [Ax,Ay]; #kN Adding component
A = norm(A); #Magnitude of force A
theta = math.atan(Ay/Ax); #radians
theta = theta*180/math.pi; #degrees, conversion into degrees
print "Reaction at A is A = %.2f kN making angle %.2f degrees with + ve x axis "%(A,theta);
#Slight variation in the answer because of roundoff error
import math
# Given Data
#At equillibrium equations are +-> sum Fx = 0, +sum(M_A) = 0, +sum(M_B) = 0
#Sum Fx = 0 gives
Bx = 0; #kN
# Calculations and Results
print "Bx = %.0f kN "%(Bx);
#+sum(M_A) = 0 gives -(70kN)(0.9m)+By(2.7m)-(27kN)(3.3m)-(27kN)(3.9m) = 0, B assumed to be in +ve Y direction
By = (70*0.9+27*3.3+27*3.9)/2.7 #kN
print "By = %.2f kN +ve sign shows reaction is directed as assumed "%(By);
#+sum(M_B) = 0 gives -A(2.7m)+(70kN)(1.8m)-(27kN)(0.6m)-(27kN)(1.2m) = 0, A assumed to be in +ve Y direction
A = (70*1.8-27*0.6-27*1.2)/2.7 #kN
print "A = %.2f kN +ve sign shows reaction is directed as assumed "%(A);
#Answer print layed in KN
import math
# Given Data
#Take x axis parallel to track and Y axis perpendicular to track
W = 25.; #kN
# Resolving weight
Wx = W*math.cos(25*math.pi/180); #kN
Wy = -W*math.sin(25*math.pi/180); #kN
#At equillibrium equations are +-> sum Fx = 0, +sum(M_A) = 0, +sum(M_B) = 0
# Calculations and Results
#+sum(M_A) = 0 gives -(10.5kN)(625 mm)-(22.65 kN)(150 mm)+ R2(1250 mm) = 0, R2 assumed to be in +ve Y direction
R2 = (10.5*625+22.65*150.)/1250; #kN
print "R2 = %.0f kN +ve sign shows reaction is directed as assumed "%(R2);
#+sum(M_B) = 0 gives (10.5kN)(625 mm)-(22.65 kN)(150 mm)+ R1(1250 mm) = 0, R1 assumed to be in +ve Y direction
R1 = (10.5*625-22.65*150)/1250; #kN
print "R1 = %.1f kN +ve sign shows reaction is directed as assumed "%(R1);
#Sum Fx = 0 gives, 22.65 N-T = 0
T = 22.65; #kN
print "T = %.2f kN +ve sign shows reaction is directed as assumed "%(T);
import math
# Given Data
Ax = 4.5 #in m
Ay = 6. #in m
# Calculations and Results
DF = math.sqrt((Ax**2)+(Ay**2))
F = 150. #in KN
Ex = -(Ax/DF)*F
print "Ex = %.2f kN "%(Ex);
Ey = ((Ay/DF)*F)+(4*20)
print "Ey = %.2f kN "%(Ey);
M_E = -((20*7.2)+(20*5.4)+(20*3.6)+(20*1.8)-((Ay/DF)*F*Ax))
print "M_E = %.0f kN +ve sign shows reaction is directed as assumed "%(M_E);
import math
from numpy import arange
# Given Data
#At equillibrium +sum(Mo) = 0,
#s = r*theta;
#F = k*s = k*r*theta;
k = 45.; #N/mm
r = 75.; #mm
W = 1800.; #N
l = 200.; #mm
# Calculations and Results
# trial and error
print "Probable answers by trial and error method are ";
for i in arange(0,0.1+math.pi/2,.1): # from 0 to 90 degrees
difference = (math.sin(i)-k*r**2*(i)/(W*l));
if difference<0.01: # Approximation
theta = i;
theta = theta*180/math.pi; #Degrees , conversion into degrees
print "Theta = %.2f degrees"%(theta);
import math
# Given Data
m = 10.; #kg mass of joist
g = 9.81; #m/s**2 gravitational acceleration
W = m*g; #N
AB = 4.; #m
# Calculations
# Three force body
BF = AB*math.cos(45*math.pi/180); #m
AF = BF; #m
AE = 1./2*AF; #m
EF = AE; #m
CD = AE; #m
BD = CD/math.tan((45.+25)*math.pi/180); #m
DF = BF-BD; #m
CE = DF; #m
alpha = math.atan(CE/AE); #radians
alpha = alpha*180/math.pi; #degrees
#From geometry
G = 90-alpha; #degrees
B = alpha-(90-(45+25)); #degrees
C = 180-(G+B); #Degrees
#Force triangle
#T/math.sin(G) = R/math.sin(C) = W/math.sin(B)..... math.sine law
T = W/math.sin(B*math.pi/180)*math.sin(G*math.pi/180); #N
R = W/math.sin(B*math.pi/180)*math.sin(C*math.pi/180); #N
# Results
print "Tension in cable T = %.1f N \
\nReaction At A is R = %.1f N with angle alpha = %.1f degrees with +ve X axis"%(T,R,alpha);
import math
# Given Data
m1 = 80.; #kg mass of man
m2 = 20.; #kg, mass of ladder
m = m1+m2; #kg
g = 9.81; #m/s**2 gravitational acceleration
W = -m*g; #N, j
# Calculations and Results
C = -0.6*W/3; #N
Bz = -0.6*C/1.2; #N
By = -0.9*W/1.2; #N
print " Reaction At B is B = %.0f) N j +%.1f N)k"%(By,Bz);
print " Reaction At C is C = %.2f) N k"%(C);
Ay = -W-By; #N
Az = -C-Bz; #N
print " Reaction At A is A = %.0f) N j +%.1f N)k "%(Ay,Az);
import math
from numpy.linalg import solve
# Given Data
W = -1200.; #N,j Weight
BD = [-2.4,1.2,-2.4]; #m, Vector BD
EC = [-1.8,0.9,0.6]; #m, Vector EC
#T_BD = norm(T_BD)*BD/norm(BD); # m, vector of tension in BD
#T_EC = norm(T_EC)*EC/norm(EC); # m, vector of tension in EC
# Applying equillibrium conditions we get
# Sum_F = 0, and Sum(M_A) = 0 and setting co-efficient equal to zero
A = [[0.8,0.771],[1.6,-0.514]]; #MAtrix of co-efficient
b = [[-1440],[0]]; #matrix b
# Calculations and Results
x = solve(A,b); # solution matrix
T_BD = x[0]; # N,Tension in BD
T_EC = x[1]; #N, Tension in EC
print "T_BD = %.0f N and T_EC = %.0f N "%(x[0],x[1]);
Ax = 2./3*T_BD+6./7*T_EC; #N, x component of reaction at A
Ay = -(1./3*T_BD+3./7*T_EC+W); #N, Y component of rection at A
Az = 2./3*T_BD-2./7*T_EC; #N, z component of reaction at A
print "Reaction at A is A = %.0f N)i +%.0f N)j +%.1f N)k "%(Ax,Ay,Az);
#Answe in Newton instead of lbs
#1lbs = 4.44N
import math
from numpy.linalg import norm
from numpy import array
# Given Data
#Free body diagram
m = 30. #in kg
g = 9.81 #in m/s2
w = -m*g #in J
# Calculations and Results
DC = array([-480, 240, -160]) #in mm
X = norm(DC)
T = DC/X
print ("Tension in the vector form = ")
print (T)
#Equilibrium equations
#From equation 2, setting unit vector = 0
Ax = 49 #in N
Ay = 73.5 #in N
A = [Ax, Ay]
y = norm(A)
print ("Tension in the vector form in N = ")
print (y)
import math
from numpy import array
#page 197
# Given Data
Tmin = 300. #lb
AC = array([12, 12, 0])
w = array([[0],[-450],[0]])
x1 = AC*w
print (x1)
x = x1#array([0, 0, x1])
# Calculations
lambda1 = array([2./3, 2./3, -1./3])*-x1#array([[0],[0],[-x1]])
y = x*lambda1
print (y)
#Location of G
#EG and Tmin are having same direction, so their component should be in proportion
x = -1.8/Tmin*Tmin+1.8; #m, X co-ordinate of G
y = -1.8/Tmin*Tmin+3.6; #m, Y co-ordinate of G
# Results
print "Co-ordinates of G are x = %.0f m and y = %.1f m"%(x,y);