Search found 6 matches

by jazzieman
Sun May 23, 2021 7:13 pm
Forum: OpenSeesPy
Topic: Problems with eleLoad
Replies: 5
Views: 4785

Re: Problems with eleLoad

Thanks professor, that worked!! I'm still having problems with my 3D RC frame model, but they are related to another topic. Again, thanks!!
by jazzieman
Sat May 22, 2021 8:06 pm
Forum: OpenSeesPy
Topic: Problems with eleLoad
Replies: 5
Views: 4785

Re: Problems with eleLoad

Professor, thanks for the reply. I tried a simply supported beam (in 3D) and still getting zero response.

Code: Select all

from openseespy.opensees import *
import openseespy.postprocessing.Get_Rendering as opsplt
wipe()


# Create ModelBuilder (with 3 dimensions and 6 DOF/node)
model('basic', '-ndm', 3, '-ndf', 6)

# Set parameters for overall model geometry
width = 360.0


# Create nodes
#    tag, X, Y, Z
node(1, 0.0, 0.0, 0.0)
node(2, width, 0.0, 0.0)


# Boundary Conditions
fix(1, 1, 1, 1, 0, 0, 0)
fix(2, 0, 1, 0, 0, 0, 0)

# Define materials for nonlinear columns
# ------------------------------------------
# CONCRETE                   tag  f'c    ec0    f'cu   ecu
# Core concrete (confined)
uniaxialMaterial('Concrete01', 1, -6.0, -0.004, -5.0, -0.014)

# Cover concrete (unconfined)
uniaxialMaterial('Concrete01', 2, -5.0, -0.002, 0.0, -0.006)

# STEEL
# Reinforcing steel
fy = 60.0;  # Yield stress
E = 30000.0;  # Young's modulus
#                         tag  fy E0    b
uniaxialMaterial('Steel01', 3, fy, E, 0.01)

# Define cross-section
# ------------------------------------------

#  some parameters
colWidth = 15
colDepth = 24

cover = 1.5
As = 0.60  # area of no. 7 bars

# some variables derived from the parameters
y1 = colDepth / 2.0
z1 = colWidth / 2.0

section('Fiber', 1, '-GJ', 1e10)

# Create the concrete core fibers
patch('rect', 1, 10, 1, cover - y1, cover - z1, y1 - cover, z1 - cover)

# Create the concrete cover fibers (top, bottom, left, right)
patch('rect', 2, 10, 1, -y1, z1 - cover, y1, z1)
patch('rect', 2, 10, 1, -y1, -z1, y1, cover - z1)
patch('rect', 2, 2, 1, -y1, cover - z1, cover - y1, z1 - cover)
patch('rect', 2, 2, 1, y1 - cover, cover - z1, y1, z1 - cover)

# Create the reinforcing fibers (left, middle, right)
layer('straight', 3, 3, As, y1 - cover, z1 - cover, y1 - cover, cover - z1)
layer('straight', 3, 2, As, 0.0, z1 - cover, 0.0, cover - z1)
layer('straight', 3, 3, As, cover - y1, z1 - cover, cover - y1, cover - z1)

# Transformation:
geomTransf('Linear', 1, *[0,0,1])

# Distributed load:
W = 180.0/width;

# Create the beam element                       
#                           tag, ndI, ndJ, A,     E,      G,     J,    Iy,   Iz,   transfTag
element('elasticBeamColumn', 1,   1,   2, 360.0, 4030.0, 1733, 1e10, 8640, 8640.0, 1)


# Create a Plain load pattern with a Linear TimeSeries
timeSeries('Linear', 1)
pattern('Plain', 1, 1)

# Define gravity loads
# --------------------
eleLoad('ele', 1, '-type', '-beamUniform', W, 0.)


# ------------------------------
# End of model generation
# ------------------------------


# ------------------------------
# Start of analysis generation
# ------------------------------

# Create the system of equation, a sparse solver with partial pivoting
system('BandGeneral')

# Create the constraint handler, the transformation method
constraints('Transformation')

# Create the DOF numberer, the reverse Cuthill-McKee algorithm
numberer('RCM')

# Create the convergence test, the norm of the residual with a tolerance of
# 1e-12 and a max number of iterations of 10
test('NormDispIncr', 1.0e-12, 10, 3)

# Create the solution algorithm, a Newton-Raphson algorithm
algorithm('Newton')

# Create the integration scheme, the LoadControl scheme using steps of 0.1
integrator('LoadControl', 0.1)

# Create the analysis object
analysis('Static')

# ------------------------------
# End of analysis generation
# ------------------------------


# ------------------------------
# Finally perform the analysis
# ------------------------------

# perform the gravity load analysis, requires 10 steps to reach the load level
analyze(10)

# Obtain reactions:
reactions()


# Display the active model with node tags only
opsplt.plot_model('nodes','elements')
by jazzieman
Sat May 22, 2021 11:17 am
Forum: OpenSeesPy
Topic: Problems with eleLoad
Replies: 5
Views: 4785

Problems with eleLoad

I'm currently working on a 3D RC frame model on openseespy. I'm having several problems which I've managed to resolve some of them. Now, while trying correct and error I became aware that when I use the command eleLoad to apply a load to a beam or column (with type 'beamUniform' for example) I get zeros on the nodes/elements responses. For the sake of verifying if the error is within my code, I used the example code 5 in of the structural examples (14.1.5. Reinforced Concrete Frame Gravity Analysis, https://openseespydoc.readthedocs.io/en ... avity.html) and changed the loads applied the nodes for a 'beamUniform' on it works. Now, if I change the 2D model to a 3D one, I get zero reactions or forces at nodes/elements.

Code: Select all

print("==========================")

from openseespy.opensees import *
import openseespy.postprocessing.Get_Rendering as opsplt
wipe()
print("Starting RCFrameGravity example")

# Create ModelBuilder (with two-dimensions and 3 DOF/node)
model('basic', '-ndm', 3, '-ndf', 6)

# Create nodes
# ------------

# Set parameters for overall model geometry
width = 360.0
height = 144.0

# Create nodes
#    tag, X, Y
node(1, 0.0, 0.0, 0.0)
node(2, width, 0.0, 0.0)
node(3, 0.0, height, 0.0)
node(4, width, height, 0.0)

# Fix supports at base of columns
#   tag, DX, DY, RZ
fix(1, 1, 1, 1, 1, 1, 1)
fix(2, 1, 1, 1, 1, 1, 1)

# Define materials for nonlinear columns
# ------------------------------------------
# CONCRETE                   tag  f'c    ec0    f'cu   ecu
# Core concrete (confined)
uniaxialMaterial('Concrete01', 1, -6.0, -0.004, -5.0, -0.014)

# Cover concrete (unconfined)
uniaxialMaterial('Concrete01', 2, -5.0, -0.002, 0.0, -0.006)

# STEEL
# Reinforcing steel
fy = 60.0;  # Yield stress
E = 30000.0;  # Young's modulus
#                         tag  fy E0    b
uniaxialMaterial('Steel01', 3, fy, E, 0.01)

# Define cross-section for nonlinear columns
# ------------------------------------------

#  some parameters
colWidth = 15
colDepth = 24

cover = 1.5
As = 0.60  # area of no. 7 bars

# some variables derived from the parameters
y1 = colDepth / 2.0
z1 = colWidth / 2.0

section('Fiber', 1, '-GJ', 1e100)

# Create the concrete core fibers
patch('rect', 1, 10, 1, cover - y1, cover - z1, y1 - cover, z1 - cover)

# Create the concrete cover fibers (top, bottom, left, right)
patch('rect', 2, 10, 1, -y1, z1 - cover, y1, z1)
patch('rect', 2, 10, 1, -y1, -z1, y1, cover - z1)
patch('rect', 2, 2, 1, -y1, cover - z1, cover - y1, z1 - cover)
patch('rect', 2, 2, 1, y1 - cover, cover - z1, y1, z1 - cover)

# Create the reinforcing fibers (left, middle, right)
layer('straight', 3, 3, As, y1 - cover, z1 - cover, y1 - cover, cover - z1)
layer('straight', 3, 2, As, 0.0, z1 - cover, 0.0, cover - z1)
layer('straight', 3, 3, As, cover - y1, z1 - cover, cover - y1, cover - z1)

# Define column elements
# ----------------------

# Geometry of column elements
#                tag

geomTransf('PDelta', 1, *[0,0,1])

# Number of integration points along length of element
np = 5

# Lobatto integratoin
beamIntegration('Lobatto', 1, 1, np)

# Create the coulumns using Beam-column elements
#               e            tag ndI ndJ transfTag integrationTag
eleType = 'forceBeamColumn'
element(eleType, 1, 1, 3, 1, 1)
element(eleType, 2, 2, 4, 1, 1)

# Define beam elment
# -----------------------------

# Geometry of column elements
#                tag
geomTransf('Linear', 2, *[0,0,1])


#  a parameter for the axial load
P = 180.0;  # 10% of axial capacity of columns  

# Create the beam element                       
#                           tag, ndI, ndJ, A,     E,      G,     J,    Iy,   Iz,   transfTag
element('elasticBeamColumn', 3,   3,   4, 360.0, 4030.0, 1733, 1e100, 8640, 8640.0, 2)


# Define gravity loads
# --------------------


# Create a Plain load pattern with a Linear TimeSeries
timeSeries('Linear', 1)
pattern('Plain', 1, 1)

eleLoad('ele', 3, '-type', '-beamUniform', 2*P/width, 0.)
# Create nodal loads at nodes 3 & 4
#    nd  FX,  FY, MZ
# load(3, 0.0, -P, 0.0)
# load(4, 0.0, -P, 0.0)

# ------------------------------
# End of model generation
# ------------------------------


# ------------------------------
# Start of analysis generation
# ------------------------------

# Create the system of equation, a sparse solver with partial pivoting
system('BandGeneral')

# Create the constraint handler, the transformation method
constraints('Transformation')

# Create the DOF numberer, the reverse Cuthill-McKee algorithm
numberer('RCM')

# Create the convergence test, the norm of the residual with a tolerance of
# 1e-12 and a max number of iterations of 10
test('NormDispIncr', 1.0e-12, 10, 3)

# Create the solution algorithm, a Newton-Raphson algorithm
algorithm('Newton')

# Create the integration scheme, the LoadControl scheme using steps of 0.1
integrator('LoadControl', 0.1)

# Create the analysis object
analysis('Static')

# ------------------------------
# End of analysis generation
# ------------------------------


# ------------------------------
# Finally perform the analysis
# ------------------------------

# perform the gravity load analysis, requires 10 steps to reach the load level
analyze(10)

# Print out the state of nodes 3 and 4
# print node 3 4

# Print out the state of element 1
# print ele 1
reactions()
u3 = nodeDisp(3, 2)
u4 = nodeDisp(4, 2)

results = open('results.out', 'a+')

if abs(u3 + 0.0183736) < 1e-6 and abs(u4 + 0.0183736) < 1e-6:
    results.write('PASSED : RCFrameGravity.py\n')
    print("Passed!")
else:
    results.write('FAILED : RCFrameGravity.py\n')
    print("Failed!")

results.close()

print("==========================")

# Display the active model with node tags only
opsplt.plot_model('nodes','elements')
Now, for the code to run (for the 3D version) I had to eliminate the hyphen before 'ele' at the eleLoad command, otherwise I get a singular matrix error (viewtopic.php?f=12&t=67585&p=116955#p116955). Don't know what I'm doing wrong. Any help would be appreciated.
by jazzieman
Sat May 22, 2021 7:34 am
Forum: OpenSees.exe Users
Topic: "eleLoad" command not working with "forceBeamColumn" element
Replies: 7
Views: 7445

Re: "eleLoad" command not working with "forceBeamColumn" element

I'm currently working on a 3d frame on openseespy and I'm having the same problem. I'm getting zeros in forces/reaction after applying 'beamUniform' load to a forcebeamcolumn.
by jazzieman
Thu Sep 24, 2020 11:58 am
Forum: OpenSeesPy
Topic: Converting a model from 2d to 3d
Replies: 2
Views: 4312

Re: Converting a model from 2d to 3d

Professor Scott,

I tried 'section' (without the '-'), and it worked!!! That definitely solved the problem. I would have never figured it out by myself. Thanks a lot!!
by jazzieman
Wed Sep 23, 2020 9:40 am
Forum: OpenSeesPy
Topic: Converting a model from 2d to 3d
Replies: 2
Views: 4312

Converting a model from 2d to 3d

I'm currently working in a simple model of a RC circular contilever column (fibers). I performed gravity, pushover, and dynamic anlysis for calibration on the 2d model with no problems. I'm now trying to create a 3d model of the column. I changed the -ndm and -ndf as required, but when the model is built (without error messages) when I ask for the strainStress, don't get any. Don't know what I'm doing wrong (I'm new to openseespy been working only a couple of months and is my first try to build a 3d model). This is part of the code (2d first):

Code: Select all

# =============================================================================
# III. MATERIAL DEFINITIONS
# =============================================================================

# Materials -----
     # 1: Cover Concrete (Unconfined)
ops.uniaxialMaterial('Concrete01', 1, -fpcu*1e6, -epsc0, 0, -epsU)  

     # 2: Core Concrete (Confined)
ops.uniaxialMaterial('Concrete01', 2, -fpcc*1e6, -eps_cc, -fcu*1e6, -ecu)

     # 3: Reinforcing Steel
ops.uniaxialMaterial('ReinforcingSteel', 3, fyBars*1e6, fuBars*1e6, Es*1e6, 
                     Esh*1e6, eps_sh, eps_ult, '-CMFatigue', cf, alpha,
                     cd,'-MPCurveParams', R1, R2, R3)

print('Materials and Element Properties Done!'); print('\n')


# =============================================================================
# IV. DOF AND NODES
# =============================================================================

# Model Bulder -----
ops.model("basic","-ndm", 2,"-ndf", 3)

# Create Nodes -----
ops.node(1, 0.0, 0.0)
ops.node(2, 0.0, LCol/1000) 

# Add Mass -----
mass = SS_W*1000/(g/1000)
ops.mass(2, *[mass, mass, 0])

# Constraints -----
ops.fix(1,*[1,1,1])

print('Nodal Coords., Boundary Cond., and Mass Done!'); print('\n')


# =============================================================================
# V. SECTION AND ELEMENTS
# =============================================================================

# Section Definition -----
ops.section('Fiber', 1)

    # 1: Patches
        # A: Cover Concrete
ops.patch('circ', 1, 3, 40, *[0 , 0], *[Ds/(2*1000), DCol/(2*1000)], *[0, 360]) 

        # B: Core Concrete
ops.patch('circ', 2, 20, 40, *[0 , 0], *[0 ,     Ds/(2*1000)], *[0, 360]) 
        
        # C: Reinforcing Steel (using layer)
rBars   = Ds/2-0.5*DHoops-0.5*DBars                 # Radius to center of long rebar
theta   = 360.0/NumBars                             # Angle increments to long rebar
ops.layer('circ', 3, NumBars, ABars/1000**2, *[0.0 ,0.0], rBars/1000, *[10, 350])

# Coordinates of rebars ----
xBar = np.zeros([NumBars])                          # array with x-coord of rebars
yBar = np.zeros([NumBars])                          # array with y-coord of rebars         

for i in range(NumBars):
    xBar[i], yBar[i] = [rBars/1000*np.cos((10+i*theta)*np.pi/180),rBars/1000*np.sin((10+i*theta)*np.pi/180)]
       
# Geometric Transformation ----
ops.geomTransf('PDelta', 1)

# Beam Integration -----
ops.beamIntegration('HingeRadau', 1, 1, (Lp/1000), 1, 0, 1)

# Element Definition
ops.element('forceBeamColumn', 1, *[1, 2], 1, 1)

print('Section and Element Generation Done!'); print('\n')

# =============================================================================
# VI. GRAVITY ANALYSIS
# =============================================================================

# Define Gravity ----
ops.timeSeries('Linear', 1)
ops.pattern('Plain', 1, 1)
ops.load(2, *[0, -SS_W*1000, 0])

# Parameters (Load Controlled Static Analysis)
ops.constraints('Plain')
ops.numberer('Plain')
ops.system('BandGeneral')
ops.test('NormDispIncr',1e-10, 6)
ops.algorithm("Newton")
ops.integrator('LoadControl', 1/10)
ops.analysis("Static")
ops.analyze(10)
ops.loadConst('-time', 0.0)
ops.wipeAnalysis()

print('Gravity Analysis Done!'); print('\n'); 
print('Model Built!'); print('\n'); print('\n');
when I use the command (for the cover concrete fiber): ops.eleResponse(1, '-section','1', '-fiber','-.6095','0','1','stressStrain')
I get these: [-2756711.363215994, -8.805447541750114e-05]

Now when I try the 3d...

Code: Select all

# =============================================================================
# III. MATERIAL DEFINITIONS
# =============================================================================

# Materials -----
     # 1: Cover Concrete (Unconfined)
ops.uniaxialMaterial('Concrete01', 1, -fpcu*1e6, -epsc0, 0, -epsU)  

     # 2: Core Concrete (Confined)
ops.uniaxialMaterial('Concrete01', 2, -fpcc*1e6, -eps_cc, -fcu*1e6, -ecu)

     # 3: Reinforcing Steel
ops.uniaxialMaterial('ReinforcingSteel', 3, fyBars*1e6, fuBars*1e6, Es*1e6, 
                     Esh*1e6, eps_sh, eps_ult, '-CMFatigue', cf, alpha,
                     cd,'-MPCurveParams', R1, R2, R3)

print('Materials and Element Properties Done!'); print('\n')


# =============================================================================
# IV. DOF AND NODES
# =============================================================================

# Model Bulder -----
ops.model("basic","-ndm", 3,"-ndf", 6)

# Create Nodes -----
ops.node(1, 0.0, 0.0, 0.0)
ops.node(2, 0.0, LCol/1000, 0.0) 

# Add Mass -----
mass = SS_W*1000/(g/1000)
ops.mass(2, *[mass, 0.0, mass])

# Constraints -----
ops.fix(1,*[1,1,1,1,1,1])

print('Nodal Coords., Boundary Cond., and Mass Done!'); print('\n')


# =============================================================================
# V. SECTION AND ELEMENTS
# =============================================================================

# Section Definition -----
ops.section('Fiber', 1, '-GJ', 1e100)

    # 1: Patches
        # A: Cover Concrete
ops.patch('circ', 1, 3, 40, *[0 , 0], *[Ds/(2*1000), DCol/(2*1000)], *[0, 360]) 

        # B: Core Concrete
ops.patch('circ', 2, 20, 40, *[0 , 0], *[0 ,     Ds/(2*1000)], *[0, 360]) 
        
        # C: Reinforcing Steel
rBars   = Ds/2-0.5*DHoops-0.5*DBars                 # Radius to center of long. rebar
theta   = 360.0/NumBars                             # Angle increments to long. rebar
ops.layer('circ', 3, NumBars, ABars/1000**2, *[0.0 ,0.0], rBars/1000, *[10, 350])

# Coordinates of rebars (for later use) ----
xBar = np.zeros([NumBars])                          # array with x-coord of rebars
yBar = np.zeros([NumBars])                          # array with y-coord of rebars         

for i in range(NumBars):
    xBar[i], yBar[i] = [rBars/1000*np.cos((10+i*theta)*np.pi/180),
                        rBars/1000*np.sin((10+i*theta)*np.pi/180)]
    
       
# Geometric Transformation ----
ops.geomTransf('PDelta', 1, *[0, 0 , 1])

# Beam Integration -----
ops.beamIntegration('HingeRadau', 1, 1, (Lp/1000), 1, 0, 1)

# Element Definition
ops.element('forceBeamColumn', 1, *[1, 2], 1, 1)

print('Section and Element Generation Done!'); print('\n')


# =============================================================================
# VI. GRAVITY ANALYSIS
# =============================================================================

# Define Gravity ----
ops.timeSeries('Linear', 1)
ops.pattern('Plain', 1, 1)
ops.load(2, *[0.0, -SS_W*1000, 0.0, 0.0, 0.0, 0.0])

# Parameters (Load Controlled Static Analysis)
ops.constraints('Plain')
ops.numberer('Plain')
ops.system('BandGeneral')
ops.test('NormDispIncr',1e-10, 6)
ops.algorithm("Newton")
ops.integrator('LoadControl', 1/10)
ops.analysis("Static")
ops.analyze(10)
ops.loadConst('-time', 0.0)
ops.wipeAnalysis()

print('Gravity Analysis Done!'); print('\n'); 
print('Model Built!'); print('\n'); print('\n');

# Beam Integration -----
ops.beamIntegration('HingeRadau', 1, 1, (Lp/1000), 1, 0, 1)

# Element Definition
ops.element('forceBeamColumn', 1, *[1, 2], 1, 1)

print('Section and Element Generation Done!'); print('\n')

ops.recorder('Element', '-file', 'ForcaeColSec12.out','-time', '-ele', 1, 'section', 1, 'force')

# =============================================================================
# VI. GRAVITY ANALYSIS
# =============================================================================

# Define Gravity ----
ops.timeSeries('Linear', 1)
ops.pattern('Plain', 1, 1)
ops.load(2, *[0.0, -SS_W*1000, 0.0, 0.0, 0.0, 0.0])

# Parameters (Load Controlled Static Analysis)
ops.constraints('Plain')
ops.numberer('Plain')
ops.system('BandGeneral')
ops.test('NormDispIncr',1e-10, 6)
ops.algorithm("Newton")
ops.integrator('LoadControl', 1/10)
ops.analysis("Static")
ops.analyze(10)
ops.loadConst('-time', 0.0)
ops.wipeAnalysis()

print('Gravity Analysis Done!'); print('\n'); 
print('Model Built!'); print('\n'); print('\n');
annd use command: (to get stressStrain of concrete cover) I get nothing.
ops.eleResponse(1, '-section','1', '-fiber','-.6095','0','1','stressStrain')