Question: Flat truss to solve python E = 2 1 0 8 k N m 2 I want you to add the following explicitly step by

Flat truss to solve python
E=2108kNm2
I want you to add the following explicitly step by step, indicating the equation that was used to solve in comments. It is to solve the exercise using the stiffness method of a truss in Python and the instructions to solve are a) print on the screen the system of equations in local coordinates of each element using Python.
b) print on the screen the system of equations of each element in global coordinates in python.
c) Print on the screen in python the Calculation of local displacements indicating node 1 local displacement in x is:
node 1 local displacement in y is:
d) prints on the screen the displacement in global coordinates of each bar. indicating the 1 x global node is:
node 1 and global is:
e) Print the reactions on the screen indicating the restricted degree of freedom in python.
f) Print on the screen the calculation of axial forces in each element per bar in local coordinates indicating the axial forces of bar number 1 is: .
g) Print on the screen the calculation of axial forces in each element per bar in global coordinates indicating the axial forces of bar number 1 in global x is:
axial force of bar 1 in y global is:
h) Plot the axial force of the complete structure
The python code in which you must explicitly add the instructions is:
import numpx as np
import matplotlib as mall
import matplotlik, pxplot as plt,
'Code to solve 2D trusses'
'Units are consistent and depend on the user'
#%% Geometry of the structure
#Input nodes and coordinates#
#Initializing node names matrix
ID =[1,2,3,4,5]
#Enter the coordinates
CogrdinatesX ==[0,5,15,5,15]
CogrdinatesY =[0,8.5,8.5,0,0]
#%% Input supports
U_X =[1,0,0,0,0] #####X Restriction
U_Y =[1,0,0,0,1]#####Y Restriction
#%% Input connectivity
Node.i =[1,2,2,2,1,4,3]
Node_i =[2,3,5,4,4,5,5]
#%% Input properties
E}=[21\mp@subsup{0}{}{}11,21\mp@subsup{0}{}{}11,2*1\mp@subsup{0}{}{**}11
#%% Input nodal loads
Fxk =[4250,4250,10000,0,0]
Fy =[-2500,-3333.333,-1666.67,-20000,0]
#%% Scale factor for deformations
esc =10000
#%%
########################## Function definitions ###############################
#%% Plot function
def Plot(Nodej, Node.j, ID, CorrdingtesX, CqordinatesY):
fig = plt,fisure()
for i in range(len(Ngde.i)):
ni = Nodei[i]
nf}=\mathrm{ Nodej[i]
XX}=[
YY =[]
for j in range(len(ID)):
if ni == ID[j]:
XX append(CordinatesX[j])
YY saprend(CgerdinatesY[b])
if nf == ID[j]: pltwelot:(XX, YY, marker='o', color='black')
pltashowx
Flat truss to solve python E = 2 1 0 8 k N m 2 I

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!