Trapezoidal load problem

Forum for asking and answering questions related to use of the OpenSeesPy module

Moderators: silvia, selimgunay, Moderators

Post Reply
Prafullamalla
Posts: 160
Joined: Mon Feb 02, 2015 6:32 pm

Trapezoidal load problem

Post by Prafullamalla » Thu Jul 08, 2021 9:11 pm

I followed trapezoidal load from link but it gives the result of uniformly distributed load
https://portwooddigital.com/2021/05/05/ ... eam-loads/

Code: Select all

import openseespy.opensees as ops

import numpy as np
import matplotlib.pyplot as plt
from math import asin, sqrt

# Create ModelBuilder (with two-dimensions and 3 DOF/node)
model('basic', '-ndm', 2, '-ndf', 3)
L=10.0;
wipe()						       # clear opensees model
# Create nodes
node(1, 0.0, 0.0)
node(2, L, 0.0)

# Fix supports at base of columns
fix(1, 1, 1, 1)

# define materials
E = 1.0;I=1.0;A=1.0;
geomTag = 1
# Geometry of column elements
#                tag
geomTransf('Linear', geomTag)

eleType = 'elasticBeamColumn'
element(eleType, 1, 1, 2,A, E, I, geomTag)

(wya,wxa,aOverL,bOverL,wyb,wxb) = (3.0, 0.0, 0.0, 1.0,0.0, 0.0)

ops.timeSeries('Constant', 1)
ops.pattern('Plain', 1, 1)

#ops.load(2, 0.0, 1000.0, 0.0)
ops.eleLoad('-ele',1,'-type','beamUniform',wya,wxa,aOverL,bOverL,wyb,wxb)
#ops.eleLoad('-ele',1,'-type','beamUniform',3,0,0,1,0,0)
#ops.eleLoad('-ele',1,'-type', '-beamUniform', 3.0, 0.0, 0.0)

# Start of analysis generation

# Create the system of equation, a sparse solver with partial pivoting
(Tol, MaxIter) = (1.0e-12, 10)      # Tolerance and Maximum iteration
(controlNode, controlDOF) =(2, 2)   # Control node and control DOF
system      ('BandGeneral')
constraints ('Plain')
numberer    ('RCM')
test        ('NormDispIncr', Tol, 10, 3)
algorithm   ('Newton')
integrator  ('LoadControl', 1.0)
algorithm   ('Linear')
analysis    ('Static')
analyze     (1)

currentDisp = nodeDisp(controlNode, controlDOF)
print('Displacement at node 2',currentDisp)
print('Displacement at node 1',nodeDisp(1, controlDOF))

reactions('-dynamic', '-rayleigh')
print("Reaction at node 1",nodeReaction(1))
print("Reaction at node 2",nodeReaction(2))

print("Element force",eleForce(1))
Prafulla Malla, Nepal
Praf_malla@hotmail.com

mhscott
Posts: 868
Joined: Tue Jul 06, 2004 3:38 pm
Location: Corvallis, Oregon USA
Contact:

Re: Trapezoidal load problem

Post by mhscott » Fri Jul 09, 2021 8:29 am

When I run the script, I get the correct reactions for triangular load on a cantilever
vertical reaction - 15
moment reaction - 50

Prafullamalla
Posts: 160
Joined: Mon Feb 02, 2015 6:32 pm

Re: Trapezoidal load problem

Post by Prafullamalla » Sun Jul 11, 2021 2:46 am

When you replied you got correct result. Then, I thought the only problem might be my older version 3.2. I upgraded to version 3.3. and got the correct result.
Prafulla Malla, Nepal
Praf_malla@hotmail.com

Post Reply