In [1]:
# uses frame sign convention, not beam sign convention
class TVMSegment(object):
def __init__(self,l,t0,v0,m0,w0,w1=None,p0=0.,p1=0.):
self.l = l # length of segment
self.t0 = t0 # thrust at start of segment
self.v0 = v0 # shear at start of segment
self.m0 = m0 # moment at start of segment
self.w0 = w0 # transverse distributed load intenstity at start of segment
self.w1 = w1 if w1 is not None else w0 # at end of segment
self.p0 = p0 # parallel distributed load at start
self.p1 = p1 # parallel distributed load at end
@property
def t1(self):
return -self.t0 - (self.p0+self.p1)*self.l/2.
@property
def v1(self):
return -self.v0 - (self.w0+self.w1)*self.l/2.
@property
def m1(self):
return -self.m0 + self.v0*self.l + (self.w0*self.l*self.l/2.) + ((self.w1-self.w0)*self.l*self.l/6.)
In [2]:
class TVMPoint(object):
def __init__(self,t0,v0,m0,N=0.,P=0.,M=0.):
self.l = 0.
self.t0 = t0 # thust before the point
self.v0 = v0 # shear before the point
self.m0 = m0 # moment before the point
self.N = N # applied normal force
self.P = P # applied transverse force
self.M = M # applied moment
@property
def t1(self):
return -self.t0 - self.T
@property
def v1(self):
return -self.v0 - self.P
def m1(self):
return -self.m0 - self.M
Now need a class to represent end-to-end lists of these things, with operations:
In [ ]: