-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
41b38c4
commit 4b8f6a2
Showing
22 changed files
with
904 additions
and
273 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,165 @@ | ||
# ===----------------------------------------------------------------------===// | ||
# | ||
# OpenSees - Open System for Earthquake Engineering Simulation | ||
# Structural Artificial Intelligence Laboratory | ||
# | ||
# ===----------------------------------------------------------------------===// | ||
|
||
# Moment-Curvature Example 2.1 | ||
# ---------------------------- | ||
# Zero length element with fiber section | ||
# Single Nodal Load, Static Analysis | ||
# | ||
# Example Objectives | ||
# ------------------ | ||
# Moment-Curvature Analysis in OpenSees | ||
# | ||
# Written: Andreas Schellenberg ([email protected]) | ||
# Date: June 2017 | ||
# | ||
# import the OpenSees Python module | ||
import opensees.openseespy as ops | ||
|
||
def moment_curvature(model, secTag, axialLoad, maxK, numIncr): | ||
""" | ||
A procedure for performing section analysis (only does | ||
moment-curvature, but can be easily modified to do any mode | ||
of section response. | ||
Arguments | ||
secTag -- tag identifying section to be analyzed | ||
axialLoad -- axial load applied to section (negative is compression) | ||
maxK -- maximum curvature reached during analysis | ||
numIncr -- number of increments used to reach maxK (default 100) | ||
Sets up a recorder which writes moment-curvature results to file | ||
section$secTag.out ... the moment is in column 1, and curvature in column 2 | ||
Written: Andreas Schellenberg ([email protected]) | ||
Date: June 2017 | ||
""" | ||
|
||
# Define two nodes at (0,0) | ||
model.node(1, 0.0, 0.0) | ||
model.node(2, 0.0, 0.0) | ||
|
||
# Fix all degrees of freedom except axial and bending | ||
model.fix(1, 1, 1, 1) | ||
model.fix(2, 0, 1, 0) | ||
|
||
# Define element | ||
# tag ndI ndJ secTag | ||
model.element("zeroLengthSection", 1, 1, 2, secTag) | ||
|
||
# Create recorder | ||
model.recorder("Node", "disp", "-file", "section"+str(secTag)+".out", "-time", "-node", 2, "-dof", 3) | ||
|
||
# Define constant axial load | ||
model.pattern("Plain", 1, "Constant", loads={2: [axialLoad, 0.0, 0.0]}) | ||
|
||
# Define analysis parameters | ||
model.system("BandGeneral") | ||
model.numberer("Plain") | ||
model.constraints("Plain") | ||
model.test("NormUnbalance", 1.0E-9, 10) | ||
model.algorithm("Newton") | ||
model.integrator("LoadControl", 0.0) | ||
model.analysis("Static") | ||
|
||
# Do one analysis for constant axial load | ||
model.analyze(1) | ||
|
||
# Define reference moment | ||
model.pattern("Plain", 2, "Linear") | ||
model.load(2, 0.0, 0.0, 1.0) | ||
|
||
# Compute curvature increment | ||
dK = maxK/numIncr | ||
|
||
# Use displacement control at node 2 for section analysis | ||
model.integrator("DisplacementControl", 2, 3, dK, 1, dK, dK) | ||
|
||
# Do the section analysis | ||
model.analyze(numIncr) | ||
|
||
def create_section(): | ||
# ------------------------------ | ||
# Start of model generation | ||
# ------------------------------ | ||
|
||
# Create a model (with two-dimensions and 3 DOF/node) | ||
model = ops.Model(ndm=2, ndf=3) | ||
|
||
# Define materials for nonlinear columns | ||
# ------------------------------------------ | ||
# CONCRETE tag f'c ec0 f'cu ecu | ||
# Core concrete (confined) | ||
model.uniaxialMaterial("Concrete01", 1, -6.0, -0.004, -5.0, -0.014) | ||
# Cover concrete (unconfined) | ||
model.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 | ||
model.uniaxialMaterial("Steel01", 3, fy, E, 0.01) | ||
|
||
# Define cross-section for nonlinear columns | ||
# ------------------------------------------ | ||
# set some parameters | ||
width = 15.0 | ||
depth = 24.0 | ||
cover = 1.5 | ||
As = 0.60; # area of no. 7 bars | ||
|
||
# some variables derived from the parameters | ||
y1 = depth/2.0 | ||
z1 = width/2.0 | ||
|
||
model.section("Fiber", 1) | ||
# Create the concrete core fibers | ||
model.patch("rect", 1, 10, 1, cover-y1, cover-z1, y1-cover, z1-cover, section=1) | ||
# Create the concrete cover fibers (top, bottom, left, right, section=1) | ||
model.patch("rect", 2, 10, 1, -y1, z1-cover, y1, z1, section=1) | ||
model.patch("rect", 2, 10, 1, -y1, -z1, y1, cover-z1, section=1) | ||
model.patch("rect", 2, 2, 1, -y1, cover-z1, cover-y1, z1-cover, section=1) | ||
model.patch("rect", 2, 2, 1, y1-cover, cover-z1, y1, z1-cover, section=1) | ||
# Create the reinforcing fibers (left, middle, right, section=1) | ||
model.layer("straight", 3, 3, As, y1-cover, z1-cover, y1-cover, cover-z1, section=1) | ||
model.layer("straight", 3, 2, As, 0.0, z1-cover, 0.0, cover-z1, section=1) | ||
model.layer("straight", 3, 3, As, cover-y1, z1-cover, cover-y1, cover-z1, section=1) | ||
|
||
# Estimate yield curvature | ||
# (Assuming no axial load and only top and bottom steel) | ||
d = depth - cover # d -- from cover to rebar | ||
epsy = fy/E # steel yield strain | ||
Ky = epsy/(0.7*d) | ||
return model, Ky | ||
|
||
|
||
if __name__ == "__main__": | ||
|
||
model, Ky = create_section() | ||
|
||
P = -180.0 # Axial load | ||
mu = 15.0 # Target ductility for analysis | ||
numIncr = 100 # Number of analysis increments | ||
|
||
|
||
print("Estimated yield curvature: ", Ky) | ||
|
||
# Call the section analysis procedure | ||
moment_curvature(model, 1, P, Ky*mu, numIncr) | ||
|
||
|
||
u = model.nodeDisp(2,3) | ||
if abs(u-0.00190476190476190541) < 1e-12: | ||
print('PASSED : MomentCurvature.py\n') | ||
print("Passed!") | ||
else: | ||
print('FAILED : MomentCurvature.py\n') | ||
print("Failed!") | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# ===----------------------------------------------------------------------===// | ||
# | ||
# OpenSees - Open System for Earthquake Engineering Simulation | ||
# Structural Artificial Intelligence Laboratory | ||
# | ||
# ===----------------------------------------------------------------------===// | ||
# | ||
# Define model builder | ||
# -------------------- | ||
model basic -ndm 2 -ndf 3 | ||
|
||
# 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 | ||
set fy 60.0; # Yield stress | ||
set E 30000.0; # Young's modulus | ||
# tag fy E0 b | ||
uniaxialMaterial Steel01 3 $fy $E 0.01 | ||
|
||
# Define cross-section for nonlinear columns | ||
# ------------------------------------------ | ||
|
||
# set some parameters | ||
set colWidth 15 | ||
set colDepth 24 | ||
|
||
set cover 1.5 | ||
set As 0.60; # area of no. 7 bars | ||
|
||
# some variables derived from the parameters | ||
set y1 [expr $colDepth/2.0] | ||
set z1 [expr $colWidth/2.0] | ||
|
||
section Fiber 1 { | ||
|
||
# Create the concrete core fibers | ||
patch rect 1 10 1 [expr $cover-$y1] [expr $cover-$z1] [expr $y1-$cover] [expr $z1-$cover] | ||
|
||
# Create the concrete cover fibers (top, bottom, left, right) | ||
patch rect 2 10 1 [expr -$y1] [expr $z1-$cover] $y1 $z1 | ||
patch rect 2 10 1 [expr -$y1] [expr -$z1] $y1 [expr $cover-$z1] | ||
patch rect 2 2 1 [expr -$y1] [expr $cover-$z1] [expr $cover-$y1] [expr $z1-$cover] | ||
patch rect 2 2 1 [expr $y1-$cover] [expr $cover-$z1] $y1 [expr $z1-$cover] | ||
|
||
# Create the reinforcing fibers (left, middle, right) | ||
layer straight 3 3 $As [expr $y1-$cover] [expr $z1-$cover] [expr $y1-$cover] [expr $cover-$z1] | ||
layer straight 3 2 $As 0.0 [expr $z1-$cover] 0.0 [expr $cover-$z1] | ||
layer straight 3 3 $As [expr $cover-$y1] [expr $z1-$cover] [expr $cover-$y1] [expr $cover-$z1] | ||
} | ||
|
||
# Estimate yield curvature | ||
# (Assuming no axial load and only top and bottom steel) | ||
set d [expr $colDepth-$cover] ;# d -- from cover to rebar | ||
set epsy [expr $fy/$E] ;# steel yield strain | ||
set Ky [expr $epsy/(0.7*$d)] | ||
|
||
# Print estimate to standard output | ||
puts "Estimated yield curvature: $Ky" | ||
|
||
# Set axial load | ||
set P -180 | ||
|
||
set mu 15; # Target ductility for analysis | ||
set numIncr 100; # Number of analysis increments | ||
|
||
# Call the section analysis procedure | ||
source MomentCurvature.tcl | ||
MomentCurvature 1 $P [expr $Ky*$mu] $numIncr | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.