Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- theta=np.pi/4.0 # angle marked theta in Figure Q.2(a)
- F = np.array([[-1.0,0,0,0,0,0,0,0], # sum of horizontal forces node 1
- [0,0,0,0,-1.0,0,0,0], # sum of vertical forces node 1
- [1.0,0,np.cos(theta),0,0,0,0,0], # sum of horizontal forces node 2
- [0,-1.0,-np.sin(theta),0,0,0,0,0], # sum of vertical forces node 2
- [0,0,0,1.0,0,0,0,0],
- [0,1.0,0,0,0,1.0,0,0],
- [0,0,-np.cos(theta),-1.0,0,0,0,1.0],
- [0,0,np.sin(theta),0,1.0,0,1.0,0]])
- E = np.array([-1000.0,0,0,0,0,0,0,0]) # sum of external loads
- x = np.linalg.inv(F).dot(E)
- print(x)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement