Advertisement
Guest User

Untitled

a guest
Feb 19th, 2020
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. import numpy as np
  2.  
  3. theta=np.pi/4.0 # angle marked theta in Figure Q.2(a)
  4.  
  5. F = np.array([[-1.0,0,0,0,0,0,0,0], # sum of horizontal forces node 1
  6. [0,0,0,0,-1.0,0,0,0], # sum of vertical forces node 1
  7. [1.0,0,np.cos(theta),0,0,0,0,0], # sum of horizontal forces node 2
  8. [0,-1.0,-np.sin(theta),0,0,0,0,0], # sum of vertical forces node 2
  9. [0,0,0,1.0,0,0,0,0],
  10. [0,1.0,0,0,0,1.0,0,0],
  11. [0,0,-np.cos(theta),-1.0,0,0,0,1.0],
  12. [0,0,np.sin(theta),0,1.0,0,1.0,0]])
  13. E = np.array([-1000.0,0,0,0,0,0,0,0]) # sum of external loads
  14. x = np.linalg.inv(F).dot(E)
  15. print(x)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement