LikeLike

]]>i’m working with an array of nodes and coordinates and my code is kinda like this

import numpy as np

nodos= np.loadtxt(“valle_aburra.pts”)

print (nodos)

con= np.loadtxt(“triangulos.tri”)

x= nodos[:,0]

y=nodos[:,1]

z=nodos[:,2]

v=[]

areatotal=[]

nf,nc= np.shape(nodos)

for i in range (0,nf):

l=nodos[i]

x1=(x[l[0]])

y1=float(y[l[0]])

x2=float(x[l[1]])

y2=float(y[l[1]])

d=((x1-x1)**2+(y1-y2)**2)**(1/2)

v.append(d)

x1=float(x[l[1]])

y1=float(y[l[1]])

x2=float(x[l[2]])

y2=float(y[l[2]])

d=((x1-x1)**2+(y1-y2)**2)**(1/2)

v.append(d)

x1=float(x[l[2]])

y1=float(y[l[2]])

x2=float(x[l[0]])

y2=float(y[l[0]])

d=((x1-x1)**2+(y1-y2)**2)**(1/2)

v.append(d)

s=(v[0]+v[2]+v[3])/2 #formula de herón para las áreas de un triangulo

area=(s(s-v[0])(s-v[1])(s-v[2]))**(1/2)

areatotal=areatotal+area

but it gives me an error that says

x1=(x[l[0]])

IndexError: only integers, slices (`:`), ellipsis (`…`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

i’m new in python so it’s causing me some trouble to do this, i’ll aprecciate if u could help me.

thanks.

LikeLike

]]>LikeLike

]]>https://newtonexcelbach.com/2012/08/09/uls-analysis-of-concrete-beams-now-with-added-units/

will do an interaction diagram for a circular section (or any other shape) by dividing the cross section into trapezoidal layers.

The RC Design Functions spreadsheet has a function for elastic analysis of circular sections (Circe), but not yet anything for ULS capacity of circular sections.

LikeLike

]]>Do you have a function even for the ineraction diagram of circular sections?

LikeLike

]]>Any problems or questions, please let me know.

LikeLike

]]>LikeLike

]]>LikeLike

]]>I’ll have a look and see how they compare with my function.

LikeLike

]]>Bob J.

LikeLike

]]>