naarad icon indicating copy to clipboard operation
naarad copied to clipboard

I have modeled a simply supported beam but its giving the following error:

Open Sadia328 opened this issue 4 years ago • 1 comments

UserWarning: Attempting to set identical bottom == top == 0.0 results in singular transformations; automatically expanding. ax.set_ylim(viewCenter[1] - viewDelta[1]/2, viewCenter[1] + viewDelta[1]/2) Node::addunbalLoad - load to add of incorrect size 2 should be 3 Node::addunbalLoad - load to add of incorrect size 2 should be 3 Node::addunbalLoad - load to add of incorrect size 2 should be 3

Sadia328 avatar Nov 05 '20 03:11 Sadia328

##Beam x-section model import openseespy.opensees as op import openseespy.postprocessing.Get_Rendering as opp import numpy as np m = 1 mm = 0.001m Pa = 1. MPa = 10**6Pa GPa = 10**9*Pa

def getSections():
op.model('Basic', '-ndm', 2, '-ndf', 2)

# Get material prorpeties
Esteel = 200.*GPa
Eflex = 1.
Erigid = 100.*10**12  
E=16000000
# define materials
op.uniaxialMaterial('Elastic', 1, Esteel)
op.uniaxialMaterial('Elastic', 10, Eflex)
op.uniaxialMaterial('Elastic', 20, Erigid)
# Define Steel Material
Fy = 350.*MPa
E0 = 200.*GPa
b = 0.0005  
#  uniaxialMaterial('Steel02', matTag, Fy, E0, b)    
op.uniaxialMaterial('Steel02', 2, Fy, E0, b)       
fpc = -30.*10**6
fpcu = fpc*0.1
epsc0 = -0.002
epsU = epsc0*8
lam = 0.2
ft = -fpc/30
Ets = 2*fpc / (epsc0 * 20)
print("2")

# Define Concrete Material
#  uniaxialMaterial('Concrete02', matTag, fpc, epsc0, fpcu, epsU, lambda, ft, Ets)    
op.uniaxialMaterial('Concrete02', 3, fpc, epsc0, fpcu, epsU, lam, ft, Ets)    

# Geometry preprocessing   
# Get Verticies
h = 400*mm
w = 600*mm
A=h*w
vertices = np.array([-h/2, w/2, -h/2, -w/2, h/2, -w/2, h/2, w/2])

# Define Rebar Info
rebarY = np.array([-150, 0, 150])*mm
rebarZ = np.array([150, 225])*mm
Abar = np.pi*(30*mm/2)**2

Nbar = len(rebarZ)*len(rebarY)
rebarYZ = np.zeros([Nbar,2])

for ii, Y in enumerate(rebarY):
    for jj, Z in enumerate(rebarZ):
        rebarYZ[ii*len(rebarZ) + jj, :] = [Y, Z]
print("3")  
NfibeY = 1
NfibeZ = 50         
        
# Define Sections
#  section('Fiber', secTag)
op.section('Fiber', 1)

#  patch('quad', matTag, numSubdivIJ, numSubdivJK, *crdsI, *crdsJ, *crdsK, *crdsL)
op.patch('quad', 1, NfibeZ, NfibeY, *vertices)

for YZ in rebarYZ:       
    #  fiber(yloc, zloc, A, matTag)
    op.fiber(*YZ, Abar, 1)
# Define transform and integration
op.geomTransf('Linear', 1)
op.geomTransf('PDelta', 2) 
#  beamIntegration('Lobatto', tag, secTag, N)
op.beamIntegration('Lobatto', 1, 1, 3)
op.beamIntegration('Lobatto', 2, 1, 3)
return rebarYZ

print("4") def buildModel():
print("5") x1 = 0. y1 = 0. x2 = 10. y2 = 2. x3 = 20. y3 = 2. op.node(1, x1, y1) op.node(2, x2, y2) op.node(3, x3, y3) # Assign boundary constraints op.fix(1,1,1) op.fix(3,0,1)
# define Element # element('forceBeamColumn', eleTag, eleNodes, transfTag, integrationTag, '-iter', maxIter=10, tol=1e-12, '-mass', mass=0.0) # tag, ndI, ndJ, A, E, Iz, transfTag print("5") op.element('elasticBeamColumn', 1, 1, 2, 24000.0mmmm, 16.0mm, 11.0mm, 1) op.element('elasticBeamColumn', 1, 2, 3, 24000.0mmmm, 16.0mm, 11.0*mm, 1) print("7") #op.element('forceBeamColumn', 1, *[1,2], 1, 2, '-iter', 30, 1e-12) #op.element('forceBeamColumn', 2, *[2,3], 1, 2, '-iter', 30, 1e-12) opp.plot_model() pass print("8")

the analysis of model file stops at print 4, it seems like its not computing for model function. Kindly help

Analysis file:

-- coding: utf-8 --

""" Created on Wed Oct 28 14:07:17 2020

@author:Sadia """ import openseespy.opensees as op import numpy as np import matplotlib.pyplot as plt from openseespy.postprocessing.Get_Rendering import*

import ModelFunctions as mf op.wipe() #=======================================================================

Units

=============================================================================

#m, N/m2,

=============================================================================

Input Variables

=============================================================================

print("1") Px=0 Py =-25000 #u=(P*(L^3)/(48EI)=0.05m #max allowed def. span L / 250 = 80mm

===================================================================

OpenSees Analysis

=============================================================================

op.wipe()

set modelbuilder

#calling functions from model file mf.getSections()

mf.buildModel() print("6")

create TimeSeries

op.timeSeries("Linear", 1)

create a plain load pattern

op.pattern("Plain", 1, 1)

Create the nodal load - command: load nodeID xForce yForce

op.load(2, Px, Py,)

Record Results

op.recorder('Node', '-file', "NodeDisp.out", '-time', '-node', 2, '-dof', 1,2,'disp') op.recorder('Node', '-file', "Reaction.out", '-time', '-node', 1,2,3, '-dof', 1,2,'reaction') op.recorder('Element', '-file', "Elements.out",'-time','-ele', 1,2, 'forces') print("7")

create SOE

op.system("BandSPD")

create DOF number

op.numberer("RCM")

create constraint handler

op.constraints("Transformation")

create integrator

op.integrator("LoadControl", 1.0)

create algorithm

op.algorithm("Newton")

create analysis object

op.analysis("Static")

perform the analysis

op.initialize() ok = op.analyze(1) uy2 = op.nodeDisp(2,2) print("8")

print("Results")

print("Nodal Displacements")

print("uy2") print(uy2)
plot_model()

op.wipe()

Sadia328 avatar Nov 05 '20 03:11 Sadia328