open sees examples primer

149
Printed on 14 June, 2006 Open System for Earthquake Engineering Simulation (OpenSees) OpenSees Examples Primer Silvia Mazzoni, Frank McKenna, Michael H. Scott, Gregory L. Fenves, Boris Jeremic

Upload: adrianpoter

Post on 01-Jan-2016

158 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Open Sees Examples Primer

Printed on 14 June, 2006

Open System for Earthquake Engineering Simulation (OpenSees)

OpenSees Examples Primer

Silvia Mazzoni, Frank McKenna, Michael H. Scott, Gregory L. Fenves, Boris Jeremic

Page 2: Open Sees Examples Primer
Page 3: Open Sees Examples Primer

iii

Contents

Introduction 5

EXAMPLE 1 - Truss Example 7

EXAMPLE 2 - Moment-Curvature Analysis of a Reinforced Concrete Section 12

EXAMPLE 3 - Portal Frame Examples 19 Example 3.1 .................................................................................................................................20 Example 3.2 .................................................................................................................................26 Example 3.3 .................................................................................................................................29

EXAMPLE 4 - Multibay Two Story Frame 35

EXAMPLE 5 - Three-Dimensional Rigid Frame 43

EXAMPLE 6 - Simply Supported Beam 52

EXAMPLE 7 - Dynamic Shell Analysis 57

EXAMPLE 8 - Cantilever Beam 61

Reinforced Concrete Plane Frame Examples 65 Example3.1.tcl....................................................................................................................65 Example3.2.tcl....................................................................................................................68 Example3.3.tcl....................................................................................................................71 PortalFrame.tcl...................................................................................................................73 Example4.1.tcl....................................................................................................................78 RCFrame1.tcl .....................................................................................................................83 RCFrame2.tcl .....................................................................................................................86 RCFrame3.tcl .....................................................................................................................90 RCFrame4.tcl .....................................................................................................................92 RCFrame5.tcl .....................................................................................................................95

Page 4: Open Sees Examples Primer

Contents iv

Steel Plane Frame Examples 100 SteelFrame1.tcl ......................................................................................................................... 100 SteelFrame2.tcl ......................................................................................................................... 103 SteelFrame3.tcl ......................................................................................................................... 105

Rigid Floor Diaphragm Example 109 RigidFrame3D.tcl....................................................................................................................... 109

Zero Length Element Examples 114 ZeroLength1.tcl ......................................................................................................................... 114 ZeroLength2.tcl ......................................................................................................................... 115 ZeroLength3.tcl ......................................................................................................................... 116 ZeroLength4.tcl ......................................................................................................................... 117 ZeroLength5.tcl ......................................................................................................................... 118

Section Analysis Example 120 Example2.1.tcl........................................................................................................................... 120

Quad Examples 122

Brick Examples 123 solid01.tcl .................................................................................................................................. 123

Reliability Examples 125

Script Utilities Library 126 genPlaneFrame.tcl .................................................................................................................... 126 matTest.tcl................................................................................................................................. 128 MomentCurvature.tcl ................................................................................................................. 130 RCcircSection.tcl ....................................................................................................................... 131 RCcircSectionFEDEAS.tcl ........................................................................................................ 133 RCFrameDisplay.tcl .................................................................................................................. 135 RCsection.tcl ............................................................................................................................. 135 RCsectionFEDEAS.tcl............................................................................................................... 138 ReadSMDFile.tcl ....................................................................................................................... 142 RotSpring2D.............................................................................................................................. 144 StFramePZLdisplay.tcl .............................................................................................................. 145 Wsection.tcl ............................................................................................................................... 145 RigidFrame3Ddisplay.tcl ........................................................................................................... 146

Index 149

Page 5: Open Sees Examples Primer

5

The objective of this primer is to provide new users of OpenSees (Open System for Earthquake Engineering Simulation) familiar structural engineering examples as a convenient method for learning how to use the software. OpenSees is an object-oriented framework for building models of structural and geotechnical systems, performing nonlinear analysis with the model, and processing the response results. The goal for OpenSees is to support a wide range of simulation applications in earthquake engineering. The details, however, on how OpenSees accomplishes this goal are not particularly important for new users, who are primarily interested in how to solve problems.

This primer examines a few typical examples. Most users will conduct a simulation with a scripting language that has been extended to incorporate the features of OpenSees. As new features are developed, such as material models, elements, solution methods, etc., the scripting language can be extended to include them. The scripting language is named Tcl/Tk, and it has many features for dealing with variables, expressions, loops, data structures, input/output, that are useful for doing a simulation. Some of the basic features of Tcl will be illustrated in the examples.

Although users do not need to understand the object-oriented principles in the OpenSees framework, some terminology helps in the description of the examples. We talk about commands creating objects, which may be a specific material, element, analysis procedure, etc.

To conduct a simulation, the user creates objects for three main purposes:

Modeling: The user first creates a ModelBuilder object which defines the type of model, and commands available for building the model. With a ModelBuilder defined, the user then creates the Element, Node, LoadPattern and Constraint objects that define the model. In this primer, the use of a basic ModelBuilder will be demonstrated.

Analysis: After defined the model, the next step is to create the Analysis object for analyzing the model. This may be a simple static linear analysis or a transient non-linear analysis. In OpenSees, an Analysis object is composed of several component objects, which define how the analysis is performed. The component objects consist of the following: {SolutionAlgorithm}, {Integrator}, { ConstraintHandler}, { DOF\_Numberer}, { SystemOfEqn}, { Solver}, and { AnalysisModel}. This approach provides a great deal of flexibility in how an analysis is conducted.

Output Specification: Once the model and analysis have been defined, the user has the option of specifying what is to be monitored during the analysis. This, for example, could be the displacement history at a node or internal state of an element in a transient analysis or the entire state of the model at each step in the solution procedure. Several Recorder objects are created to store what the user wants to examine.

C H A P T E R 1

Introduction

Page 6: Open Sees Examples Primer

Chapter 1 错误!未定义样式。 6

In the examples, Tcl scripts are used to create a model, analysis, and output specification. The examples are (1) simple truss structure, (2) reinforced concrete portal frame, (3) two-story multi-bay reinforced concrete frame, and (4) a three-dimensional frame. The examples are not meant to be completely realistic, but they are representative of typical structures. The analyses performed on these models consist of simple static analysis, pushover analysis and transient analysis. An example of moment-curvature analysis is also performed on a reinforced concrete section.

Page 7: Open Sees Examples Primer

7

The first example is a simple truss structure. The purpose of this example is to show that model generation in OpenSees can resemble typical finite element analysis programs with the definition of nodes, materials, elements, loads and constraints. The example also demonstrates how an analysis object is 'built' from component objects.

This example is of a linear-elastic three bar truss, as shown in the figure (page 7), subject to static loads.

Files Required Example1.1.tcl

Model

The model consists of four nodes, three truss elements, a single load pattern with a nodal load acting at node 4, and constraints at the three support nodes. Since the truss elements have the same elastic material, a single Elastic material object is created.

Analysis

C H A P T E R 2

EXAMPLE 1 - Truss Example

Figure 1: Example 1.1 Truss

Page 8: Open Sees Examples Primer

Chapter 2 错误!未定义样式。 8

The model is linear, so we use a solution Algorithm of type Linear. Even though the solution is linear, we have to select a procedure for applying the load, which is called an Integrator. For this problem, a LoadControl integrator advances the solution. The equations are formed using a banded system, so the System is BandSPD (banded, symmetric positive definite). This is a good choice for most moderate size models. The equations have to be numbered, so typically an RCM numberer object is used (for Reverse Cuthill-McKee). The constraints are most easily represented with a Plain constraint handler.

Once all the components of an analysis are defined, the Analysis object itself is created. For this problem a Static Analysis object is used.

Output Specification

When the analysis is complete the state of node 4 and all three elements will be printed to the screen. Nothing is recorded for later use.

OpenSees Script

The Tcl script for the example is shown below. A comment is indicated by a \# symbol. In the comments below, the syntax for important commands are given.

# OpenSees Example 1.1

# OpenSees Primer

#

# Units: kips, in, sec

# ------------------------------

# Start of model generation

# ------------------------------

# Create ModelBuilder (with two-dimensions and 2 DOF/node)

model BasicBuilder -ndm 2 -ndf 2

# Create nodes & add to Domain - command: node nodeId xCrd yCrd

node 1 0.0 0.0

node 2 144.0 0.0

node 3 168.0 0.0

node 4 72.0 96.0

# Set the boundary conditions - command: fix nodeID xResrnt? yRestrnt?

fix 1 1 1

fix 2 1 1

fix 3 1 1

# Define materials for truss elements

# -----------------------------------

# Create Elastic material prototype - command: uniaxialMaterial Elastic matID E

Page 9: Open Sees Examples Primer

Chapter 2 错误!未定义样式。 9

uniaxialMaterial Elastic 1 3000

# Define elements

# ---------------

# Create truss elements - command: element truss trussID node1 node2 A matID

element truss 1 1 4 10.0 1

element truss 2 2 4 5.0 1

element truss 3 3 4 5.0 1

# Define loads

# ------------

# Create a Plain load pattern with a linear TimeSeries

pattern Plain 1 "Linear" {

# Create the nodal load - command: load nodeID xForce yForce

load 4 100 -50

}

# ------------------------------

# End of model generation

# ------------------------------

# ------------------------------

# Start of analysis generation

# ------------------------------

# Create the system of equation, a SPD using a band storage scheme

system BandSPD

# Create the DOF numberer, the reverse Cuthill-McKee algorithm

numberer RCM

# Create the constraint handler, a Plain handler is used as homo constraints

constraints Plain

# Create the integration scheme, the LoadControl scheme using steps of 1.0

integrator LoadControl 1.0

# Create the solution algorithm, a Linear algorithm is created

algorithm Linear

# create the analysis object

analysis Static

# ------------------------------

# End of analysis generation

# ------------------------------

# ------------------------------

# Start of recorder generation

# ------------------------------

Page 10: Open Sees Examples Primer

Chapter 2 错误!未定义样式。 10

# create a Recorder object for the nodal displacements at node 4

recorder Node -file example.out -load -node 4 -dof 1 2 disp

# --------------------------------

# End of recorder generation

# ---------------------------------

# ------------------------------

# Finally perform the analysis

# ------------------------------

# Perform the analysis

analyze 1

# Print the current state at node 4 and at all elements

print node 4

print ele

Results

Node: 4

Coordinates : 72 96

commitDisps: 0.530093 -0.177894

unbalanced Load: 100 -50

Element: 1 type: Truss iNode: 1 jNode: 4 Area: 10 Total Mass: 0

strain: 0.00146451 axial load: 43.9352

unbalanced load: -26.3611 -35.1482 26.3611 35.1482

Material: Elastic tag: 1

E: 3000 eta: 0

Element: 2 type: Truss iNode: 2 jNode: 4 Area: 5 Total Mass: 0

strain: -0.00383642 axial load: -57.5463

unbalanced load: -34.5278 46.0371 34.5278 -46.0371

Material: Elastic tag: 1

E: 3000 eta: 0

Element: 3 type: Truss iNode: 3 jNode: 4 Area: 5 Total Mass: 0

strain: -0.00368743 axial load: -55.3114

unbalanced load: -39.1111 39.1111 39.1111 -39.1111

Material: Elastic tag: 1

E: 3000 eta: 0

Page 11: Open Sees Examples Primer

Chapter 2 错误!未定义样式。 11

For the node, displacements and loads are given. For the truss elements, the axial strain and force are provided along with the resisting forces in the global coordinate system.

The file example.out, specified in the recorder command, provides the nodal displacements for the x and y directions of node 4. The file consists of a single line of code:

Results 1.0 0.530093 -0.177894

The 1.0 corresponds to the load factor (pseudo time) in the model at which point the recorder was invoked. The 0.530093 and -0.177894 correspond to the response at node 4 for the 1 and 2 degree-of-freedom. Note that if more analysis steps had been peformed, the line would contain a line for every analysis step that completed successfully.

Page 12: Open Sees Examples Primer

12

This next example covers the moment-curvature analysis of a reinforced concrete section. The zero-length element with a fiber discretization of the cross section is used in the model. In addition, Tcl language features such as variable and command substitution, expression evaluation, and procedures are demonstrated.

In this example, a moment-curvature analysis of the fiber section is undertaken. Figure~\ref{rcsection4} shows the fiber discretization for the section.

Files Required Example2.1.tcl (see http://peer.berkeley.edu/~silvia/OpenSees/TCLfiles/Example2.1.tcl") MomentCurvature.tcl (see

http://peer.berkeley.edu/~silvia/OpenSees/TCLfiles/MomentCurvature.tcl")

Model

The model consists of two nodes and a ZeroLengthSection element. A depiction of the element geometry is shown in the figure (page 13) . The drawing on the left of the figure (page 13) shows an edge view of the element where the local z-axis, as seen on the right side of the figure and in figure~\ref{rcsection0}, is coming out of the page. Node 1 is completely restrained, while the applied loads act on node 2. A compressive axial load, P, of 180 kips is applied to the section during the moment-curvature analysis.

C H A P T E R 3

EXAMPLE 2 - Moment-Curvature Analysis of a Reinforced Concrete Section

Page 13: Open Sees Examples Primer

Chapter 3 错误!未定义样式。 13

For the zero length element, a section discretized by concrete and steel is created to represent the resultant behavior. UniaxialMaterial objects are created to define the fiber stress-strain relationships: confined concrete in the column core, unconfined concrete in the column cover, and reinforcing steel.

The dimensions of the fiber section are shown in the figure (page 14). The section depth is 24 inches, the width is 15 inches, and there are 1.5 inches of cover around the entire section. Strong axis bending is about the section z-axis. In fact, the section z-axis is the strong axis of bending for all fiber sections in planar problems. The section is separated into confined and unconfined concrete regions, for which separate fiber discretizations will be generated. Reinforcing steel bars will be placed around the boundary of the confined and unconfined regions. The fiber discretization for the section is shown in the figure (page 14).

Figure 2: Geometry of Zero-Length Element

Page 14: Open Sees Examples Primer

Chapter 3 错误!未定义样式。 14

Analysis

The section analysis is performed by the Tcl procedure MomentCurvature defined in the file MomentCurvature.tcl. The arguments to the procedure are the tag of the section to be analyzed, the axial load applied to the section, the maximum curvature, and the number of displacement increments to reach the maximum curvature.

Output Specification

The output for the moment-curvature analysis will be the section forces and deformations, stored in the file section1.out. In addition, an estimate of the section yield curvature is printed to the screen.

OpenSees Script

Figure 3: Dimensions of RC Section

Figure 4: Fiber-Section Discretization

Page 15: Open Sees Examples Primer

Chapter 3 错误!未定义样式。 15

In the script below variables, are set and can then be used with the syntax of \$variable. Expressions can be evaluated, although the Tcl syntax at first appears cumbersome. An expression is given by an expr command enclosed in square brackets []'s. Typically, the result of an expression is then set to another variable. A simple example to add 2.0 to a parameter is shown below:

set v 3.0

set sum [expr $v + 2.0]

puts $sum; # print the sum

Comments with # can appear on the same line as a command, as long as the command is terminated with a semi-colon.

# OpenSees Example 2.1

# OpenSees Primer

#

# Units: kips, in, sec

# Define model builder

# --------------------

model BasicBuilder -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

Page 16: Open Sees Examples Primer

Chapter 3 错误!未定义样式。 16

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

Page 17: Open Sees Examples Primer

Chapter 3 错误!未定义样式。 17

The Tcl procedure to perform the moment-curvature analysis follows. In this procedure, the nodes are defined to be at the same geometric location and the ZeroLengthSection element is used. A single load step is performed for the axial load, then the integrator is changed to DisplacementControl to impose nodal displacements, which map directly to section deformations. A reference moment of 1.0 is defined in a Linear time series. For this reference moment, the DisplacementControl integrator will determine the load factor needed to apply the imposed displacement. A node recorder is defined to track the moment-curvature results. The load factor is the moment, and the nodal rotation is in fact the curvature of the element with zero thickness.

# proc MomentCurvature

# 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

proc MomentCurvature {secTag axialLoad maxK {numIncr 100} } {

# Define two nodes at (0,0)

node 1 0.0 0.0

node 2 0.0 0.0

# Fix all degrees of freedom except axial and bending at node 2

fix 1 1 1 1

fix 2 0 1 0

# Define element

# tag ndI ndJ secTag

element zeroLengthSection 1 1 2 $secTag

# Create recorder

recorder Node -file section$secTag.out -time -node 2 -dof 3 disp

# Define constant axial load

pattern Plain 1 "Constant" {

load 2 $axialLoad 0.0 0.0

}

# Define analysis parameters

integrator LoadControl 0 1 0 0

system SparseGeneral -piv;

test NormUnbalance 1.0e-9 10

Page 18: Open Sees Examples Primer

Chapter 3 错误!未定义样式。 18

numberer Plain

constraints Plain

algorithm Newton

analysis Static

# Do one analysis for constant axial load

analyze 1

# Define reference moment

pattern Plain 2 "Linear" {

load 2 0.0 0.0 1.0

}

# Compute curvature increment

set dK [expr $maxK/$numIncr]

# Use displacement control at node 2 for section analysis

integrator DisplacementControl 2 3 $dK 1 $dK $dK

# Do the section analysis

analyze $numIncr

}

Results

Estimated yield curvature: 0.000126984126984

The file section1.out contains for each committed state a line with the load factor and the rotation at node 3. This can be used to plot the moment-curvature relationship as shown in figure~\ref{momcurv}.

FIGURE HERE

Page 19: Open Sees Examples Primer

19

This next set of examples covers the nonlinear analysis of a reinforced concrete frame. The nonlinear beam column element with a fiber discretization of the cross section is used in the model. In addition, Tcl language features such as variable and command substitution, expression evaluation, the if-then-else control structure, and procedures are demonstrated in several elaborations of the example.

In This Chapter Example 3.1 .............................................................. 20 Example 3.2 .............................................................. 26 Example 3.3 .............................................................. 29

C H A P T E R 4

EXAMPLE 3 - Portal Frame Examples

Page 20: Open Sees Examples Primer

Chapter 4 错误!未定义样式。 20 Example 3.1 This example is of a reinforced concrete portal frame, as shown in figure~\ref{example3}, subject to gravity loads.

Files Required Example3.1.tcl (see http://peer.berkeley.edu/~silvia/OpenSees/TCLfiles/Example3.1.tcl")

Model

A nonlinear model of the portal frame shown in the figure (page 21) is created. The model consists of four nodes, two nonlinear beam-column elements, 1 and 2, to model the columns and an elastic beam element, 3, to model the beam. For the column elements a section, identical to the section used in Example 2, is created using steel and concrete fibers.

Page 21: Open Sees Examples Primer

Chapter 4 错误!未定义样式。 21

A single load pattern with a linear time series, two vertical nodal loads acting at nodes 3 and 4, and single point constraints to constrain nodes 1 and 2 are created.

Analysis

The model contains material non-linearities, so a solution Algorithm of type Newton is used. The solution algorithm uses a ConvergenceTest which tests convergence of the equilibrium solution with the norm of the displacement increment vector. For this nonlinear problem, the gravity loads are applied incrementally until the full load is applied. To achieve this, a LoadControl integrator which advances the solution with an increment of 0.1 at each load step is used. The equations are formed using a banded storage scheme, so the System is BandGeneral. The equations are numbered using an RCM (reverse Cuthill-McKee) numberer. The constraints are enforced with a Plain constraint handler.

Once all the components of an analysis are defined, the Analysis object itself is created. For this problem a Static Analysis object is used. To achieve the full gravity load, 10 load steps are performed.

Output Specification

At end of analysis, the state at nodes 3 and 4 is output. The state of element 1 is also output.

OpenSees Script # OpenSees Example 3.1

# OpenSees Primer

#

# Units: kips, in, sec

# ------------------------------

# Start of model generation

# ------------------------------

# Create ModelBuilder (with two-dimensions and 3 DOF/node)

model basic -ndm 2 -ndf 3

# Create nodes

# ------------

# Set parameters for overall model geometry

set width 360

set height 144

# Create nodes

# tag X Y

node 1 0.0 0.0

node 2 $width 0.0

Figure 5: Example 3.1 Portal Frame

Page 22: Open Sees Examples Primer

Chapter 4 错误!未定义样式。 22

node 3 0.0 $height

node 4 $width $height

# Fix supports at base of columns

# tag DX DY RZ

fix 1 1 1 1

fix 2 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

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 paramaters

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)

Page 23: Open Sees Examples Primer

Chapter 4 错误!未定义样式。 23

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]

}

# Define column elements

# ----------------------

# Geometry of column elements

# tag

geomTransf Linear 1

# Number of integration points along length of element

set np 5

# Create the coulumns using Beam-column elements

# tag ndI ndJ nsecs secID transfTag

element nonlinearBeamColumn 1 1 3 $np 1 1

element nonlinearBeamColumn 2 2 4 $np 1 1

# Define beam elment

# -----------------------------

# Geometry of column elements

# tag

geomTransf Linear 2

# Create the beam element

# tag ndI ndJ A E Iz transfTag

element elasticBeamColumn 3 3 4 360 4030 8640 2

# Define gravity loads

# --------------------

# Set a parameter for the axial load

set P 180; # 10% of axial capacity of columns

# Create a Plain load pattern with a Linear TimeSeries

pattern Plain 1 "Linear" {

# Create nodal loads at nodes 3 & 4

# nd FX FY MZ

load 3 0.0 [expr -$P] 0.0

load 4 0.0 [expr -$P] 0.0

}

# ------------------------------

# End of model generation

# ------------------------------

# ------------------------------

Page 24: Open Sees Examples Primer

Chapter 4 错误!未定义样式。 24

# 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

# initialize in case we need to do an initial stiffness iteration

initialize

# ------------------------------

# End of analysis generation

# ------------------------------

# ------------------------------

# Start of recorder generation

# ------------------------------

# Create a recorder to monitor nodal displacements

recorder Node -file nodeGravity.out -time -node 3 4 -dof 1 2 3 disp

# --------------------------------

# End of recorder 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

Page 25: Open Sees Examples Primer

Chapter 4 错误!未定义样式。 25

print ele 1 2

Results

Node: 3

Coordinates : 0 144

commitDisps: 1.7109e-18 -0.0183736 -2.81893e-20

unbalanced Load: 0 -180 0

ID : 3 4 5

Node: 4

Coordinates : 360 144

commitDisps: 1.71095e-18 -0.0183736 -2.79765e-20

unbalanced Load: 0 -180 0

ID : 0 1 2

Element: 1 Type: NLBeamColumn2d Connected Nodes: 1 3

Number of Sections: 5 Mass density: 0

End 1 Forces (P V M): 180 7.0121e-31 -8.88178e-16

End 2 Forces (P V M): -180 -7.0121e-31 8.88178e-16

Element: 2 Type: NLBeamColumn2d Connected Nodes: 2 4

Number of Sections: 5 Mass density: 0

End 1 Forces (P V M): 180 0 -8.88178e-16

End 2 Forces (P V M): -180 0 8.88178e-16

For the two nodes, displacements and loads are given. For the beam-column elements, the element end forces in the local system are provided.

The nodeGravity.out file contains ten lines, each line containing 7 entries. The first entry is time in the domain at end of the load step. The next 3 entries are the displacements at node 3, and the final 3 entries the displacements at node 4.

Page 26: Open Sees Examples Primer

Chapter 4 错误!未定义样式。 26

Example 3.2 In this example the nonlinear reinforced concrete portal frame which has undergone the gravity load analysis of Example 3.1 is now subjected to a pushover analysis.

Files Required Example3.2.tcl (see http://peer.berkeley.edu/~silvia/OpenSees/TCLfiles/Example3.2.tcl") Example3.1.tcl (see http://peer.berkeley.edu/~silvia/OpenSees/TCLfiles/Example3.1.tcl")

Model

After performing the gravity load analysis on the model, the time in the domain is reset to 0.0 and the current value of all loads acting are held constant. A new load pattern with a linear time series and horizontal loads acting at nodes 3 and 4 is then added to the model.

Analysis

The static analysis used to perform the gravity load analysis is modified to take a new DisplacementControl integrator. At each new step in the analysis the integrator will determine the load increment necessary to increment the horizontal displacement at node 3 by 0.1 in. 60 analysis steps are performed in this new analysis.

Output Specification

For this analysis the nodal displacements at nodes 3 and 4 will be stored in the file nodePushover.out for post-processing. In addition, the end forces in the local coordinate system for elements 1 and 2 will be stored in the file elePushover.out. At the end of the analysis, the state of node 3 is printed to the screen.

OpenSees Script # OpenSees Example 3.2

# OpenSees Primer

#

# Units: kips, in, sec

# ----------------------------------------------------

# Start of Model Generation & Initial Gravity Analysis

# ----------------------------------------------------

# Do operations of Example3.1 by sourcing in the tcl file

source Example3.1.tcl

puts ``Gravity load analysis completed''

Page 27: Open Sees Examples Primer

Chapter 4 错误!未定义样式。 27

# Set the gravity loads to be constant & reset the time in the domain

loadConst -time 0.0

# ----------------------------------------------------

# End of Model Generation & Initial Gravity Analysis

# ----------------------------------------------------

# ----------------------------------------------------

# Start of additional modeling for lateral loads

# ----------------------------------------------------

# Define lateral loads

# --------------------

# Set some parameters

set H 10.0; # Reference lateral load

# Set lateral load pattern with a Linear TimeSeries

pattern Plain 2 "Linear" {

# Create nodal loads at nodes 3 & 4

# nd FX FY MZ

load 3 $H 0.0 0.0

load 4 $H 0.0 0.0

}

# ----------------------------------------------------

# End of additional modeling for lateral loads

# ----------------------------------------------------

# ----------------------------------------------------

# Start of modifications to analysis for push over

# ----------------------------------------------------

# Set some parameters

set dU 0.1; # Displacement increment

# Change the integration scheme to be displacement control

# node dof init Jd min max

integrator DisplacementControl 3 1 $dU 1 $dU $dU

# ----------------------------------------------------

# End of modifications to analysis for push over

# ----------------------------------------------------

# ------------------------------

# Start of recorder generation

# ------------------------------

# Create a recorder to monitor nodal displacements

recorder Node -file node32.out -time -node 3 4 -dof 1 2 3 disp

Page 28: Open Sees Examples Primer

Chapter 4 错误!未定义样式。 28

# Create a recorder to monitor element forces in columns

recorder Element -file ele32.out -time -ele 1 2 localForce

# --------------------------------

# End of recorder generation

# ---------------------------------

# ------------------------------

# Finally perform the analysis

# ------------------------------

# Set some parameters

set maxU 6.0; # Max displacement

set numSteps [expr int($maxU/$dU)]

# Perform the analysis

analyze $numSteps

puts ``Pushover analysis completed''

# Print the state at node 3

print node 3

Results Gravity load analysis completed

Setting time in domain to be : 0.0

Pushover analysis completed

Node: 3

Coordinates : 0 144

commitDisps: 6 0.488625 -0.00851377

unbalanced Load: 71.8819 -180 0

In addition to what is displayed on the screen, the file node32.out and ele32.out have been created by the script. Each line of node32.out contains the time, DX, DY and RZ for node 3 and DX, DY and RZ for node 4 at the end of an iteration. Each line of eleForce.out contains the time, and the element end forces in the local coordinate system. A plot of the load-displacement relationship at node 3 is shown in figure~\ref{lateral32}.

FIGURE HERE

Page 29: Open Sees Examples Primer

Chapter 4 错误!未定义样式。 29

Example 3.3 In this example the reinforced concrete portal frame which has undergone the gravity load analysis of Example 3.1 is now subjected to a uniform earthquake excitation.

Files Required Example3.3.tcl (see http://peer.berkeley.edu/~silvia/OpenSees/TCLfiles/Example3.3.tcl") Example3.1.tcl (see http://peer.berkeley.edu/~silvia/OpenSees/TCLfiles/Example3.1.tcl") ReadSMDFile.tcl (see http://peer.berkeley.edu/~silvia/OpenSees/TCLfiles/ReadSMDFile.tcl")

Model

After performing the gravity load analysis, the time in the domain is reset to 0.0 and the current value of all active loads is set to constant. Mass terms are added to nodes 3 and 4. A new uniform excitation load pattern is created. The excitation acts in the horizontal direction and reads the acceleration record and time interval from the file ARL360.g3. The file ARL360.g3 is created from the PEER Strong Motion Database (http://peer.berkeley.edu/smcat/) record ARL360.at2 using the Tcl procedure ReadSMDFile contained in the file ReadSMDFile.tcl.

Analysis

The static analysis object and its components are first deleted so that a new transient analysis object can be created.

A new solution Algorithm of type Newton is then created. The solution algorithm uses a ConvergenceTest which tests convergence on the norm of the displacement increment vector. The integrator for this analysis will be of type Newmark with a $\gamma$ of 0.25 and a $\beta$ of 0.5. The integrator will add some stiffness proportional damping to the system, the damping term will be based on the last committed stifness of the elements, i.e. $C = a_c K_{commit}$ with $a_c = 0.000625$. The equations are formed using a banded storage scheme, so the System is BandGeneral. The equations are numbered using an RCM (reverse Cuthill-McKee) numberer. The constraints are enforced with a Plain constraint handler.

Once all the components of an analysis are defined, the Analysis object itself is created. For this problem a Transient Analysis object is used. 2000 time steps are performed with a time step of 0.01.

In addition to the transient analysis, two eigenvalue analysis are performed on the model. The first is performed after the gravity analysis and the second after the transient analysis.

Output Specification

Page 30: Open Sees Examples Primer

Chapter 4 错误!未定义样式。 30

For this analysis the nodal displacenments at Nodes 3 and 4 will be stored in the file nodeTransient.out for post-processing. In addition the section forces and deformations for the section at the base of column 1 will also be stored in two seperate files. The results of the eigenvalue analysis will be displayed on the screen.

OpenSees Script # OpenSees Example 3.3

# OpenSees Primer

#

# Units: kips, in, sec

# ----------------------------------------------------

# Start of Model Generation & Initial Gravity Analysis

# ----------------------------------------------------

# Do operations of Example3.1 by sourcing in the tcl file

source Example3.1.tcl

puts ``Gravity load analysis completed''

# Set the gravity loads to be constant & reset the time in the domain

loadConst -time 0.0

# ----------------------------------------------------

# End of Model Generation & Initial Gravity Analysis

# ----------------------------------------------------

# ----------------------------------------------------

# Start of additional modeling for dynamic loads

# ----------------------------------------------------

# Define nodal mass in terms of axial load on columns

set g 386.4

set m [expr $P/$g]; # expr command to evaluate an expression

# tag MX MY RZ

mass 3 $m $m 0

mass 4 $m $m 0

# Define dynamic loads

# --------------------

# Set some parameters

set outFile ARL360.g3

set accelSeries "Path -filePath $outFile -dt $dt -factor $g"

# Source in TCL proc to read a PEER Strong Motion Database record

source ReadSMDFile.tcl

# Perform the conversion from SMD record to OpenSees record and obtain dt

Page 31: Open Sees Examples Primer

Chapter 4 错误!未定义样式。 31

# inFile outFile dt

ReadSMDFile ARL360.at2 $outFile dt

# Create UniformExcitation load pattern

# tag dir

pattern UniformExcitation 2 1 -accel $accelSeries

# set the rayleigh damping factors for nodes & elements

rayleigh 0.0 0.0 0.0 0.000625

# ----------------------------------------------------

# End of additional modeling for dynamic loads

# ----------------------------------------------------

# ---------------------------------------------------------

# Start of modifications to analysis for transient analysis

# ---------------------------------------------------------

# Delete the old analysis and all its component objects

wipeAnalysis

# 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

# Create the solution algorithm, a Newton-Raphson algorithm

algorithm Newton

# Create the integration scheme, Newmark with gamma = 0.5 and beta = 0.25

integrator Newmark 0.5 0.25

# Create the system of equation, a banded general storage scheme

system BandGeneral

# Create the constraint handler, a plain handler as homogeneous boundary conditions

constraints Plain

# Create the DOF numberer, the reverse Cuthill-McKee algorithm

numberer RCM

# Create the analysis object

analysis Transient

# ---------------------------------------------------------

# End of modifications to analysis for transient analysis

# ---------------------------------------------------------

# ------------------------------

# Start of recorder generation

# ------------------------------

# Create a recorder to monitor nodal displacements

recorder Node -time -file node33.out -node 3 4 -dof 1 2 3 disp

Page 32: Open Sees Examples Primer

Chapter 4 错误!未定义样式。 32

# Create recorders to monitor section forces and deformations

# at the base of the left column

recorder Element -time -file ele1secForce.out -ele 1 section 1 force

recorder Element -time -file ele1secDef.out -ele 1 section 1 deformation

# --------------------------------

# End of recorder generation

# ---------------------------------

# ------------------------------

# Finally perform the analysis

# ------------------------------

# Perform an eigenvalue analysis

puts "eigen values at start of transient: [eigen 2]"

# set some variables

set tFinal [expr 2000 * 0.01]

set tCurrent [getTime]

set ok 0

# Perform the transient analysis

while {$ok == 0 && $tCurrent < $tFinal} {

set ok [analyze 1 .01]

# if the analysis fails try initial tangent iteration

if {$ok != 0} {

puts "regular newton failed .. lets try an initail stiffness for this step"

test NormDispIncr 1.0e-12 100 0

algorithm ModifiedNewton -initial

set ok [analyze 1 .01]

if {$ok == 0} {puts "that worked .. back to regular newton"}

test NormDispIncr 1.0e-12 10

algorithm Newton

}

set tCurrent [getTime]

}

# Print a message to indicate if analysis succesfull or not

if {$ok == 0} {

puts "Transient analysis completed SUCCESSFULLY";

} else {

Page 33: Open Sees Examples Primer

Chapter 4 错误!未定义样式。 33

puts "Transient analysis completed FAILED";

}

# Perform an eigenvalue analysis

puts "eigen values at end of transient: [eigen 2]"

# Print state of node 3

print node 3

Results Gravity load analysis completed

eigen values at start of transient: 2.695422e+02 1.750711e+04

Transient analysis completed SUCCESSFULLY

eigen values at start of transient: 1.578616e+02 1.658481e+04

Node: 3

Coordinates : 0 144

commitDisps: -0.0464287 -0.0246641 0.000196066

Velocities : -0.733071 1.86329e-05 0.00467983

commitAccels: -9.13525 0.277302 38.2972

unbalanced Load: -3.9475 -180 0

Mass :

0.465839 0 0

0 0.465839 0

0 0 0

Eigenvectors:

-1.03587 -0.0482103

-0.00179081 0.00612275

0.00663473 3.21404e-05

Page 34: Open Sees Examples Primer

Chapter 4 错误!未定义样式。 34

The two eigenvalues for the eigenvalue analysis are printed to the screen. The state of node 3 at the end of the analysis is also printed.

The information contains the last committed displacements, velocities and accelerations at the node, the unbalanced nodal forces and the nodal masses. In addition, the eigenvector components of the eigenvector pertaining to the node 3 is also displayed.

In addition to the contents displayed on the screen, three files have been created. Each line of nodeTransient.out contains the domain time, and DX, DY and RZ for node 3. Plotting the first and second columns of this file the lateral displacement versus time for node 3 can be obtained as shown in figure~\ref{lateral33}. Each line of the files ele1secForce.out and ele1secDef.out contain the domain time and the forces and deformations for section 1 (the base section) of element 1. These can be used to generate the moment-curvature time history of the base section of column 1 as shown in figure~\ref{element1MK}.

FIGURE HERE

FIGURE HERE

Page 35: Open Sees Examples Primer

35

In this next example the use of variable substitution and the Tcl loop control structure for building models is demonstrated.

This example is of a reinforced concrete multibay two story frame, as shown in the figure (page 35), subject to gravity loads.

Files Required Example4.1.tcl (see http://peer.berkeley.edu/~silvia/OpenSees/TCLfiles/Example4.1.tcl")

Model

A model of the frame shown in the figure (page 35) is created. The number of objects in the model is dependent on the parameter numBay. The $($ numBay $+1)*3)$ nodes are created, one column line at a time, with the node at the base of the columns fixed in all directions. Three materials are constructed, one for the concrete core, one for the concrete cover and one for the reinforcement steel. Three fiber discretized sections are then built, one for the exterior columns, one for the interior columns and one for the girders. Each of the members in the frame is modelled using nonlinear beam-column elements with 4 (nP) integration points and a linear geometric transformation object.

C H A P T E R 5

EXAMPLE 4 - Multibay Two Story Frame

Figure 6: Example 4.1 Multibay Two Story Frame

Page 36: Open Sees Examples Primer

Chapter 5 错误!未定义样式。 36

For gravity loads, a single load pattern with a linear time series and two vertical nodal loads acting at the first and second floor nodes of each column line is used. The load at the lower level is twice that of the upper level and the load on the interior columns is twice that of the exterior columns.

For the lateral load analysis, a second load pattern with a linear time series is introduced after the gravity load analysis. Associated with this load pattern are two nodal loads acting on nodes 2 and 3, with the load level at node 3 twice that acting at node 2.

Analysis

A solution Algorithm of type Newton is created. The solution algorithm uses a ConvergenceTest based on the norm of the displacement increment vector. The integrator for the analysis will be LoadControl with a load step increment of 0.1. The storage for the system of equations is BandGeneral. The equations are numbered using an RCM (reverse Cuthill-McKee) numberer. The constraints are enforced with a Plain constraint handler. Once the components of the analysis have been defined, the analysis object is then created. For this problem a Static analysis object is used and 10 steps are performed to load the model with the desired gravity load.

After the gravity load analysis has been performed, the gravity loads are set to constant and the time in the domain is reset to 0.0. A new LoadControl integrator is now added. The new LoadControl integrator has an initial load step of 1.0, but this can vary between 0.02 and 2.0 depending on the number of iterations required to achieve convergence at each load step. 100 steps are then performed.

Output Specification

For the pushover analysis the lateral displacements at nodes 2 and 3 will be stored in the file Node41.out for post-processing. In addition, if the variable displayMode is set to ``displayON'' the load-displacement curve for horizontal displacements at node 3 will be displayed in a window on the user's terminal.

OpenSees Script # OpenSees Example 4.1

# OpenSees Primer

#

# Units: kips, in, sec

# Parameter identifying the number of bays

set numBay 3

# ------------------------------

# Start of model generation

# ------------------------------

# Create ModelBuilder (with two-dimensions and 3 DOF/node)

Page 37: Open Sees Examples Primer

Chapter 5 错误!未定义样式。 37

model BasicBuilder -ndm 2 -ndf 3

# Create nodes

# ------------

# Set parameters for overall model geometry

set bayWidth 288

set nodeID 1

# Define nodes

for {set i 0} {$i <= $numBay} {incr i 1} {

set xDim [expr $i * $bayWidth]

# tag X Y

node $nodeID $xDim 0

node [expr $nodeID+1] $xDim 180

node [expr $nodeID+2] $xDim 324

incr nodeID 3

}

# Fix supports at base of columns

for {set i 0} {$i <= $numBay} {incr i 1} {

# node DX DY RZ

fix [expr $i*3+1] 1 1 1

}

# Define materials for nonlinear columns

# ------------------------------------------

# CONCRETE

# Cover concrete

# tag -f'c -epsco -f'cu -epscu

uniaxialMaterial Concrete01 1 -4.00 -0.002 0.0 -0.006

# Core concrete

uniaxialMaterial Concrete01 2 -5.20 -0.005 -4.70 -0.02

# STEEL

# Reinforcing steel

# tag fy E0 b

uniaxialMaterial Steel01 3 60 30000 0.02

# Define cross-section for nonlinear columns

# ------------------------------------------

# Interior column section - Section A

section Fiber 1 {

# mat nfIJ nfJK yI zI yJ zJ yK zK yL zL

patch quadr 2 1 12 -11.5 10 -11.5 -10 11.5 -10 11.5 10

Page 38: Open Sees Examples Primer

Chapter 5 错误!未定义样式。 38

patch quadr 1 1 14 -13.5 -10 -13.5 -12 13.5 -12 13.5 -10

patch quadr 1 1 14 -13.5 12 -13.5 10 13.5 10 13.5 12

patch quadr 1 1 2 -13.5 10 -13.5 -10 -11.5 -10 -11.5 10

patch quadr 1 1 2 11.5 10 11.5 -10 13.5 -10 13.5 10

# mat nBars area yI zI yF zF

layer straight 3 6 1.56 -10.5 9 -10.5 -9

layer straight 3 6 1.56 10.5 9 10.5 -9

}

# Exterior column section - Section B

section Fiber 2 {

patch quadr 2 1 10 -10 10 -10 -10 10 -10 10 10

patch quadr 1 1 12 -12 -10 -12 -12 12 -12 12 -10

patch quadr 1 1 12 -12 12 -12 10 12 10 12 12

patch quadr 1 1 2 -12 10 -12 -10 -10 -10 -10 10

patch quadr 1 1 2 10 10 10 -10 12 -10 12 10

layer straight 3 6 0.79 -9 9 -9 -9

layer straight 3 6 0.79 9 9 9 -9

}

# Girder section - Section C

section Fiber 3 {

patch quadr 1 1 12 -12 9 -12 -9 12 -9 12 9

layer straight 3 4 1.00 -9 9 -9 -9

layer straight 3 4 1.00 9 9 9 -9

}

# Define column elements

# ----------------------

# Number of integration points

set nP 4

# Geometric transformation

geomTransf Linear 1

set beamID 1

# Define elements

for {set i 0} {$i <= $numBay} {incr i 1} {

# set some parameters

set iNode [expr $i*3 + 1]

set jNode [expr $i*3 + 2]

for {set j 1} {$j < 3} {incr j 1} {

# add the column element (secId == 2 if external, 1 if internal column)

Page 39: Open Sees Examples Primer

Chapter 5 错误!未定义样式。 39

if {$i == 0} {

element nonlinearBeamColumn $beamID $iNode $jNode $nP 2 1

} elseif {$i == $numBay} {

element nonlinearBeamColumn $beamID $iNode $jNode $nP 2 1

} else {

element nonlinearBeamColumn $beamID $iNode $jNode $nP 1 1

}

# increment the parameters

incr iNode 1

incr jNode 1

incr beamID 1

}

}

# Define beam elements

# ----------------------

# Number of integration points

set nP 4

# Geometric transformation

geomTransf Linear 2

# Define elements

for {set j 1} {$j < 3} {incr j 1} {

# set some parameters

set iNode [expr $j + 1]

set jNode [expr $iNode + 3]

for {set i 1} {$i <= $numBay} {incr i 1} {

element nonlinearBeamColumn $beamID $iNode $jNode $nP 3 2

# increment the parameters

incr iNode 3

incr jNode 3

incr beamID 1

}

}

# Define gravity loads

# --------------------

# Constant gravity load

set P -192

# Create a Plain load pattern with a Linear TimeSeries

pattern Plain 1 Linear {

Page 40: Open Sees Examples Primer

Chapter 5 错误!未定义样式。 40

# Create nodal loads at nodes

for {set i 0} {$i <= $numBay} {incr i 1} {

# set some parameters

set node1 [expr $i*3 + 2]

set node2 [expr $node1 + 1]

if {$i == 0} {

load $node1 0.0 $P 0.0

load $node2 0.0 [expr $P/2.0] 0.0

} elseif {$i == $numBay} {

load $node1 0.0 $P 0.0

load $node2 0.0 [expr $P/2.0] 0.0

} else {

load $node1 0.0 [expr 2.0*$P] 0.0

load $node2 0.0 $P 0.0

}

}

}

# ------------------------------

# End of model generation

# ------------------------------

# ------------------------------------------------

# Start of analysis generation for gravity analysis

# -------------------------------------------------

# 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-8 10 0

# 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 1 0.1 0.1

# Create the system of equation, a SPD using a profile storage scheme

system BandGeneral

# Create the DOF numberer, the reverse Cuthill-McKee algorithm

numberer RCM

# Create the constraint handler, the transformation method

constraints Plain

# Create the analysis object

analysis Static

Page 41: Open Sees Examples Primer

Chapter 5 错误!未定义样式。 41

# ------------------------------------------------

# End of analysis generation for gravity analysis

# -------------------------------------------------

# ------------------------------

# Perform gravity load analysis

# ------------------------------

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

analyze 10

# set gravity loads to be const and set pseudo time to be 0.0

# for start of lateral load analysis

loadConst -time 0.0

# ------------------------------

# Add lateral loads

# ------------------------------

# Reference lateral load for pushover analysis

set H 10

# Reference lateral loads

# Create a Plain load pattern with a Linear TimeSeries

pattern Plain 2 Linear {

load 2 [expr $H/2.0] 0.0 0.0

load 3 $H 0.0 0.0

}

# ------------------------------

# Start of recorder generation

# ------------------------------

# Create a recorder which writes to Node.out and prints

# the current load factor (pseudo-time) and dof 1 displacements at node 2 & 3

recorder Node -file Node41.out -time -node 2 3 -dof 1 disp

# Source in some commands to display the model

# comment out one of lines

set displayMode "displayON"

#set displayMode "displayOFF"

if {$displayMode == "displayON"} {

# a window to plot the nodal displacements versus load for node 3

recorder plot Node41.out Node_3_Xdisp 10 340 300 300 -columns 3 1 -dT 0.1

}

# ------------------------------

# End of recorder generation

Page 42: Open Sees Examples Primer

Chapter 5 错误!未定义样式。 42

# ------------------------------

# ------------------------------

# Start of lateral load analysis

# ------------------------------

# Change the integrator to take a min and max load increment

integrator LoadControl 1.0 4 0.02 2.0

# Perform the analysis

# Perform the pushover analysis

# Set some parameters

set maxU 10.0; # Max displacement

set controlDisp 0.0;

set ok 0;

while {$controlDisp < $maxU && $ok == 0} {

set ok [analyze 1]

set controlDisp [nodeDisp 3 1]

if {$ok != 0} {

puts "... trying an initial tangent iteration with Newton"

test NormDispIncr 1.0e-8 4000 0

algorithm ModifiedNewton -initial

set ok [analyze 1]

test NormDispIncr 1.0e-8 10 0

algorithm Newton

}

}

if {$ok != 0} {

puts "Pushover analysis FAILED"

} else {

puts "Pushover analysis completed SUCCESSFULLY"

}

Results

The output consists of the file Node41.out containing a line for each step of the lateral load analysis. Each line contains the load factor, the lateral displacements at nodes 2 and 3. A plot of the load-displacement curve for the frame is given in figure~\ref{twostory}.

FIGURE HERE

Page 43: Open Sees Examples Primer

43

This example is of a three-dimensional reinforced concrete rigid frame, as shown in the figure (page 44), subjected to bi-directional earthquake ground motion.

Files Required Example5.1.tcl (see http://peer.berkeley.edu/~silvia/OpenSees/TCLfiles/Example5.1.tcl") RCsection.tcl (see http://peer.berkeley.edu/~silvia/OpenSees/TCLfiles/RCsection.tcl") tabasFN.txt (see http://peer.berkeley.edu/~silvia/OpenSees/TCLfiles/tabasFN.txt") tabasFP.txt (see http://peer.berkeley.edu/~silvia/OpenSees/TCLfiles/tabasFP.txt")

Model

A model of the rigid frame shown in the figure (page 44) is created. The model consists of three stories and one bay in each direction. Rigid diaphragm multi-point constraints are used to enforce the rigid in-plane stiffness assumption for the floors. Gravity loads are applied to the structure and the 1978 Tabas acceleration records are the uniform earthquake excitations.

Nonlinear beam column elements are used for all members in the structure. The beam sections are elastic while the column sections are discretized by fibers of concrete and steel. Elastic beam column elements may have been used for the beam members; but, it is useful to see that section models other than fiber sections may be used in the nonlinear beam column element.

C H A P T E R 6

EXAMPLE 5 - Three-Dimensional Rigid Frame

Page 44: Open Sees Examples Primer

Chapter 6 错误!未定义样式。 44

Analysis

A solution Algorithm of type Newton is used for the nonlinear problem. The solution algorithm uses a ConvergenceTest which tests convergence on the norm of the energy increment vector. The integrator for this analysis will be of type Newmark with a $\gamma$ of 0.25 and a $\beta$ of 0.5. Due to the presence of the multi-point constraints, a Transformation constraint handler is used. The equations are formed using a sparse storage scheme which will perform pivoting during the equation solving, so the System is SparseGeneral. As SparseGeneral will perform it's own internal numbering of the equations, a Plain numberer is used which simply assigns equation numbers to the degrees-of-freedom.

Once all the components of an analysis are defined, the Analysis object itself is created. For this problem a Transient Analysis object is used. 2000 steps are performed with a time step of 0.01.

Figure 7: Example 5.1 Three-Dimensional Rigid Frame

Page 45: Open Sees Examples Primer

Chapter 6 错误!未定义样式。 45

Output Specification

The nodal displacements at nodes 9, 14, and 19 (the master nodes for the rigid diaphragms) will be stored in the file node51.out for post-processing.

OpenSees Script # OpenSees Example 5.1

# OpenSees Primer

#

# Units: kips, in, sec

# ----------------------------

# Start of model generation

# ----------------------------

# Create ModelBuilder with 3 dimensions and 6 DOF/node

model BasicBuilder -ndm 3 -ndf 6

# Define geometry

# ---------------

# Set parameters for model geometry

set h 144.0; # Story height

set by 240.0; # Bay width in Y-direction

set bx 240.0; # Bay width in X-direction

# Create nodes

# tag X Y Z

node 1 [expr -$bx/2] [expr $by/2] 0

node 2 [expr $bx/2] [expr $by/2] 0

node 3 [expr $bx/2] [expr -$by/2] 0

node 4 [expr -$bx/2] [expr -$by/2] 0

node 5 [expr -$bx/2] [expr $by/2] $h

node 6 [expr $bx/2] [expr $by/2] $h

node 7 [expr $bx/2] [expr -$by/2] $h

node 8 [expr -$bx/2] [expr -$by/2] $h

node 10 [expr -$bx/2] [expr $by/2] [expr 2*$h]

node 11 [expr $bx/2] [expr $by/2] [expr 2*$h]

node 12 [expr $bx/2] [expr -$by/2] [expr 2*$h]

node 13 [expr -$bx/2] [expr -$by/2] [expr 2*$h]

node 15 [expr -$bx/2] [expr $by/2] [expr 3*$h]

node 16 [expr $bx/2] [expr $by/2] [expr 3*$h]

node 17 [expr $bx/2] [expr -$by/2] [expr 3*$h]

Page 46: Open Sees Examples Primer

Chapter 6 错误!未定义样式。 46

node 18 [expr -$bx/2] [expr -$by/2] [expr 3*$h]

# Master nodes for rigid diaphragm

# tag X Y Z

node 9 0 0 $h

node 14 0 0 [expr 2*$h]

node 19 0 0 [expr 3*$h]

# Set base constraints

# tag DX DY DZ RX RY RZ

fix 1 1 1 1 1 1 1

fix 2 1 1 1 1 1 1

fix 3 1 1 1 1 1 1

fix 4 1 1 1 1 1 1

# Define rigid diaphragm multi-point constraints

# normalDir master slaves

rigidDiaphragm 3 9 5 6 7 8

rigidDiaphragm 3 14 10 11 12 13

rigidDiaphragm 3 19 15 16 17 18

# Constraints for rigid diaphragm master nodes

# tag DX DY DZ RX RY RZ

fix 9 0 0 1 1 1 0

fix 14 0 0 1 1 1 0

fix 19 0 0 1 1 1 0

# Define materials for nonlinear columns

# --------------------------------------

# CONCRETE

# Core concrete (confined)

# tag f'c epsc0 f'cu epscu

uniaxialMaterial Concrete01 1 -5.0 -0.005 -3.5 -0.02

# Cover concrete (unconfined)

set fc 4.0

uniaxialMaterial Concrete01 2 -$fc -0.002 0.0 -0.006

# STEEL

# Reinforcing steel

# tag fy E b

uniaxialMaterial Steel01 3 60 30000 0.02

# Column width

set d 18.0

# Source in a procedure for generating an RC fiber section

Page 47: Open Sees Examples Primer

Chapter 6 错误!未定义样式。 47

source RCsection.tcl

# Call the procedure to generate the column section

# id h b cover core cover steel nBars area nfCoreY nfCoreZ nfCoverY nfCoverZ

RCsection 1 $d $d 2.5 1 2 3 3 0.79 8 8 10 10

# Concrete elastic stiffness

set E [expr 57000.0*sqrt($fc*1000)/1000];

# Column torsional stiffness

set GJ 1.0e10;

# Linear elastic torsion for the column

uniaxialMaterial Elastic 10 $GJ

# Attach torsion to the RC column section

# tag uniTag uniCode secTag

section Aggregator 2 10 T -section 1

set colSec 2

# Define column elements

# ----------------------

#set PDelta "ON"

set PDelta "OFF"

# Geometric transformation for columns

if {$PDelta == "ON"} {

# tag vecxz

geomTransf LinearWithPDelta 1 1 0 0

} else {

geomTransf Linear 1 1 0 0

}

# Number of column integration points (sections)

set np 4

# Create the nonlinear column elements

# tag ndI ndJ nPts secID transf

element nonlinearBeamColumn 1 1 5 $np $colSec 1

element nonlinearBeamColumn 2 2 6 $np $colSec 1

element nonlinearBeamColumn 3 3 7 $np $colSec 1

element nonlinearBeamColumn 4 4 8 $np $colSec 1

element nonlinearBeamColumn 5 5 10 $np $colSec 1

element nonlinearBeamColumn 6 6 11 $np $colSec 1

element nonlinearBeamColumn 7 7 12 $np $colSec 1

element nonlinearBeamColumn 8 8 13 $np $colSec 1

element nonlinearBeamColumn 9 10 15 $np $colSec 1

Page 48: Open Sees Examples Primer

Chapter 6 错误!未定义样式。 48

element nonlinearBeamColumn 10 11 16 $np $colSec 1

element nonlinearBeamColumn 11 12 17 $np $colSec 1

element nonlinearBeamColumn 12 13 18 $np $colSec 1

# Define beam elements

# --------------------

# Define material properties for elastic beams

# Using beam depth of 24 and width of 18

# --------------------------------------------

set Abeam [expr 18*24];

# "Cracked" second moments of area

set Ibeamzz [expr 0.5*1.0/12*18*pow(24,3)];

set Ibeamyy [expr 0.5*1.0/12*24*pow(18,3)];

# Define elastic section for beams

# tag E A Iz Iy G J

section Elastic 3 $E $Abeam $Ibeamzz $Ibeamyy $GJ 1.0

set beamSec 3

# Geometric transformation for beams

# tag vecxz

geomTransf Linear 2 1 1 0

# Number of beam integration points (sections)

set np 3

# Create the beam elements

# tag ndI ndJ nPts secID transf

element nonlinearBeamColumn 13 5 6 $np $beamSec 2

element nonlinearBeamColumn 14 6 7 $np $beamSec 2

element nonlinearBeamColumn 15 7 8 $np $beamSec 2

element nonlinearBeamColumn 16 8 5 $np $beamSec 2

element nonlinearBeamColumn 17 10 11 $np $beamSec 2

element nonlinearBeamColumn 18 11 12 $np $beamSec 2

element nonlinearBeamColumn 19 12 13 $np $beamSec 2

element nonlinearBeamColumn 20 13 10 $np $beamSec 2

element nonlinearBeamColumn 21 15 16 $np $beamSec 2

element nonlinearBeamColumn 22 16 17 $np $beamSec 2

element nonlinearBeamColumn 23 17 18 $np $beamSec 2

element nonlinearBeamColumn 24 18 15 $np $beamSec 2

# Define gravity loads

# --------------------

# Gravity load applied at each corner node

Page 49: Open Sees Examples Primer

Chapter 6 错误!未定义样式。 49

# 10% of column capacity

set p [expr 0.1*$fc*$h*$h]

# Mass lumped at master nodes

set g 386.4; # Gravitational constant

set m [expr (4*$p)/$g]

# Rotary inertia of floor about master node

set i [expr $m*($bx*$bx+$by*$by)/12.0]

# Set mass at the master nodes

# tag MX MY MZ RX RY RZ

mass 9 $m $m 0 0 0 $i

mass 14 $m $m 0 0 0 $i

mass 19 $m $m 0 0 0 $i

# Define gravity loads

pattern Plain 1 Constant {

foreach node {5 6 7 8 10 11 12 13 15 16 17 18} {

load $node 0.0 0.0 -$p 0.0 0.0 0.0

}

}

# Define earthquake excitation

# ----------------------------

# Set up the acceleration records for Tabas fault normal and fault parallel

set tabasFN "Path -filePath tabasFN.txt -dt 0.02 -factor $g"

set tabasFP "Path -filePath tabasFP.txt -dt 0.02 -factor $g"

# Define the excitation using the Tabas ground motion records

# tag dir accel series args

pattern UniformExcitation 2 1 -accel $tabasFN

pattern UniformExcitation 3 2 -accel $tabasFP

# -----------------------

# End of model generation

# -----------------------

# ----------------------------

# Start of analysis generation

# ----------------------------

# Create the convergence test

# tol maxIter printFlag

test EnergyIncr 1.0e-8 20 3

# Create the solution algorithm

algorithm Newton

Page 50: Open Sees Examples Primer

Chapter 6 错误!未定义样式。 50

# Create the system of equation storage and solver

system SparseGeneral -piv

# Create the constraint handler

constraints Transformation

# Create the time integration scheme

# gamma beta

integrator Newmark 0.5 0.25

# Create the DOF numberer

numberer RCM

# Create the transient analysis

analysis Transient

# --------------------------

# End of analysis generation

# --------------------------

# ----------------------------

# Start of recorder generation

# ----------------------------

# Record DOF 1 and 2 displacements at nodes 9, 14, and 19

recorder Node -file node51.out -time -node 9 14 19 -dof 1 2 disp

# --------------------------

# End of recorder generation

# --------------------------

# --------------------

# Perform the analysis

# --------------------

# Analysis duration of 20 seconds

# numSteps dt

analyze 2000 0.01

Page 51: Open Sees Examples Primer

Chapter 6 错误!未定义样式。 51

Results

The results consist of the file node.out, which contains a line for every time step. Each line contains the time and the horizontal and vertical displacements at the diaphragm master nodes (9, 14 and 19) i.e. time Dx9 Dy9 Dx14 Dy14 Dx19 Dy19. The horizontal displacement time history of the first floor diaphragm node 9 is shown in figure~\ref{example4disp}. Notice the increase in period after about 10 seconds of earthquake excitation, when the large pulse in the ground motion propogates through the structure. The displacement profile over the three stories shows a soft-story mechanism has formed in the first floor columns. The numerical solution converges even though the drift is $\approx 20 \%$. The inclusion of P-Delta effects shows structural collapse under such large drifts.

FIGURE HERE

Page 52: Open Sees Examples Primer

52

In this example a simple problem in solid dynamics is considered. The structure is a simply supported beam modelled with two dimensional solid elements.

Files Required Example6.1.tcl (see http://peer.berkeley.edu/~silvia/OpenSees/TCLfiles/Example6.1.tcl")

Model

For two dimensional analysis, a typical solid element is defined as a volume in two dimensional space. Each node of the analysis has two displacement degrees of freedom. Thus the model is defined with $ndm := 2$ and $ndf := 2$.

For this model, a mesh is generated using the ``block2D'' command. The number of nodes in the local x-direction of the block is $nx$ and the number of nodes in the local y-direction of the block is $ny$. The block2D generation nodes \{1,2,3,4\} are prescribed to define the two dimensional domain of the beam, which is of size $40\times10$.

Three possible quadrilateral elements can be used for the analysis.

These may be created using the terms

``bbarQuad,''

``enhancedQuad'' or

``quad.'' This is a plane strain problem.

An elastic isotropic material is used.

For initial gravity load analysis, a single load pattern with a linear time series and two vertical nodal loads are used.

Analysis

A solution algorithm of type Newton is used for the problem. The solution algorithm uses a ConvergenceTest which tests convergence on the norm of the energy increment vector. Ten static load steps are performed.

C H A P T E R 7

EXAMPLE 6 - Simply Supported Beam

Page 53: Open Sees Examples Primer

Chapter 7 错误!未定义样式。 53

Subsequent to the static analysis, the wipeAnalysis and remove loadPatern commands are used to remove the nodal loads and create a new analysis. The nodal displacements have not changed. However, with the external loads removed the structure is no longer in static equilibrium.

The integrator for the dynamic analysis if of type GeneralizedMidpoint with $\alpha := 0.5$. This choice is uconditionally stable and energy conserving for linear problems. Additionally, this integrator conserves linear and angular momentum for both linear and non-linear problems. The dynamic analysis is performed using $100$ time increments with a time step $\Delta t := 0.50$.

OpenSees Script # OpenSees Example 6.1

# OpenSees Primer

#

# Units: kips, in, sec

# ----------------------------

# Start of model generation

# ----------------------------

# Create ModelBuilder with 3 dimensions and 6 DOF/node

model basic -ndm 2 -ndf 2

# create the material

nDMaterial ElasticIsotropic 1 1000 0.25 6.75

# Define geometry

# ---------------

# define some parameters

set Quad quad

set Quad bbarQuad

set Quad enhancedQuad

if {$Quad == "enhancedQuad" } {

set eleArgs "PlaneStrain2D 1"

}

if {$Quad == "quad" } {

set eleArgs "1 PlaneStrain2D 1"

}

if {$Quad == "bbarQuad" } {

set eleArgs "1"

}

set nx 8; # NOTE: nx MUST BE EVEN FOR THIS EXAMPLE

set ny 2

Page 54: Open Sees Examples Primer

Chapter 7 错误!未定义样式。 54

set bn [expr $nx + 1 ]

set l1 [expr $nx/2 + 1 ]

set l2 [expr $l1 + $ny*($nx+1) ]

# now create the nodes and elements using the block2D command

block2D $nx $ny 1 1 $Quad $eleArgs {

1 0 0

2 40 0

3 40 10

4 0 10

}

# Single point constraints

# node u1 u2

fix 1 1 1

fix $bn 0 1

# Gravity loads

pattern Plain 1 Linear {

load $l1 0.0 -1.0

load $l2 0.0 -1.0

}

# --------------------------------------------------------------------

# Start of static analysis (creation of the analysis & analysis itself)

# --------------------------------------------------------------------

# Load control with variable load steps

# init Jd min max

integrator LoadControl 1.0 1 1.0 10.0

# Convergence test

# tolerance maxIter displayCode

test EnergyIncr 1.0e-12 10 0

# Solution algorithm

algorithm Newton

# DOF numberer

numberer RCM

# Cosntraint handler

constraints Plain

# System of equations solver

system ProfileSPD

# Analysis for gravity load

analysis Static

Page 55: Open Sees Examples Primer

Chapter 7 错误!未定义样式。 55

# Perform the analysis

analyze 10

# --------------------------

# End of static analysis

# --------------------------

# ----------------------------

# Start of recorder generation

# ----------------------------

recorder Node -file Node.out -time -node $l1 -dof 2 disp

recorder plot Node.out CenterNodeDisp 625 10 625 450 -columns 1 2

# create the display

recorder display SimplySupportedBaam 10 10 800 200 -wipe

prp 20 5.0 100.0

vup 0 1 0

viewWindow -30 30 -10 10

display 10 0 5

# --------------------------

# End of recorder generation

# --------------------------

# ---------------------------------------

# Create and Perform the dynamic analysis

# ---------------------------------------

# Remove the static analysis & reset the time to 0.0

wipeAnalysis

setTime 0.0

# Now remove the loads and let the beam vibrate

remove loadPattern 1

# Create the transient analysis

test EnergyIncr 1.0e-12 10 0

algorithm Newton

numberer RCM

constraints Plain

integrator Newmark 0.5 0.25

analysis Transient

# Perform the transient analysis (50 sec)

# numSteps dt

analyze 100 0.5

Page 56: Open Sees Examples Primer

Chapter 7 错误!未定义样式。 56

Results

The results consist of the file Node.out, which contains a line for very time step. Each line contains the time and the vertical displacement at the bottom center of the beam.

The time history is shown in figure~\ref{beamdisp}.

FIGURE HERE

Page 57: Open Sees Examples Primer

57

In this example a simple problem in shell dynamics is considered. The structure is a curved hoop shell structure that looks like the roof of a Safeway.

Files Required Example7.1.tcl (see http://peer.berkeley.edu/~silvia/OpenSees/TCLfiles/Example7.1.tcl")

Model

For shell analysis, a typical shell element is defined as a surface in three dimensional space. Each node of a shell analysis has six degrees of freedom, three displacements and three rotations. Thus the model is defined with $ndm := 3$ and $ndf := 6$.

For this model, a mesh is generated using the ``block2D'' command. The number of nodes in the local x-direction of the block is $nx$ and the number of nodes in the local y-direction of the block is $ny$. The block2D generation nodes \{1,2,3,4, 5,7,9\} are defined such that the structure is curved in three dimensional space.

The OpenSees shell element is constructed using the command ``ShellMITC4''.

An elastic membrane-plate material section model, appropriate for shell analysis, is constructed using the ``ElasticMembranePlateSection'' command. In this case, the elastic modulus $E := 3.0e3$, Poisson's ratio $\nu := 0.25$, the thickness $h := 1.175$ and the mass density per unit volume $\rho := 1.27$ For initial gravity load analysis, a single load pattern with a linear time series and three vertical nodal loads are used. Boundary conditions are applied using the fixZ command. In this case, all the nodes whose z-coordiate is $0.0$ have the boundary condition \{1,1,1, 0,1,1\}. All degrees-of-freedom are fixed except rotation about the x-axis, which is free. The same boundary conditions are applied where the z-coordinate is $40.0$.

Analysis

A solution algorithm of type Newton is used for the problem. The solution algorithm uses a ConvergenceTest which tests convergence on the norm of the energy increment vector. Five static load steps are performed.

Subsequent to the static analysis, the wipeAnalysis and remove loadPatern commands are used to remove the nodal loads and create a new analysis. The nodal displacements have not changed. However, with the external loads removed the structure is no longer in static equilibrium.

C H A P T E R 8

EXAMPLE 7 - Dynamic Shell Analysis

Page 58: Open Sees Examples Primer

Chapter 8 错误!未定义样式。 58

The integrator for the dynamic analysis if of type GeneralizedMidpoint with $\alpha := 0.5$. This choice is uconditionally stable and energy conserving for linear problems. Additionally, this integrator conserves linear and angular momentum for both linear and non-linear problems. The dynamic analysis is performed using $250$ time increments with a time step $\Delta t := 0.50$.

OpenSees Script # OpenSees Example 7.1

# OpenSees Primer

#

# Units: kips, in, sec

# ----------------------------

# Start of model generation

# ----------------------------

model basic -ndm 3 -ndf 6

# create the material

section ElasticMembranePlateSection 1 3.0e3 0.25 1.175 1.27

# set some parameters for node and element generation

set Plate ShellMITC4

set eleArgs "1"

#these should both be even

set nx 8

set ny 2

#loaded nodes

set mid [expr ( ($nx+1)*($ny+1)+1 ) / 2 ]

set side1 [expr ($nx + 2)/2 ]

set side2 [expr ($nx+1)*($ny+1) - $side1 + 1 ]

# generate the nodes and elements

block2D $nx $ny 1 1 $Plate $eleArgs {

1 -20 0 0

2 -20 0 40

3 20 0 40

4 20 0 0

5 -10 10 20

7 10 10 20

9 0 10 20

}

# add some loads

pattern Plain 1 Linear {

Page 59: Open Sees Examples Primer

Chapter 8 错误!未定义样式。 59

load $mid 0.0 -0.5 0.0 0.0 0.0 0.0

load $side1 0.0 -0.25 0.0 0.0 0.0 0.0

load $side2 0.0 -0.25 0.0 0.0 0.0 0.0

}

# define the boundary conditions

# rotation free about x-axis (remember right-hand-rule)

fixZ 0.0 1 1 1 0 1 1

fixZ 40.0 1 1 1 0 1 1

# Load control with variable load steps

# init Jd min max

integrator LoadControl 1.0 1 1.0 10.0

# Convergence test

# tolerance maxIter displayCode

test EnergyIncr 1.0e-10 20 1

# Solution algorithm

algorithm Newton

# DOF numberer

numberer RCM

# Cosntraint handler

constraints Plain

# System of equations solver

system SparseGeneral -piv

#system ProfileSPD

# Analysis for gravity load

#analysis Transient

analysis Static

# Perform the gravity load analysis

analyze 5

# --------------------------

# End of static analysis

# --------------------------

# ----------------------------

# Start of recorder generation

# ----------------------------

recorder Node -file Node.out -time -node $mid -dof 2 disp

recorder plot Node.out CenterNodeDisp 625 10 625 450 -columns 1 2

recorder display shellDynamics 10 10 600 600 -wipe

prp -100 20 30

Page 60: Open Sees Examples Primer

Chapter 8 错误!未定义样式。 60

vup 0 1 0

display 1 0 100

# --------------------------

# End of recorder generation

# --------------------------

# ---------------------------------------

# Create and Perform the dynamic analysis

# ---------------------------------------

# Remove the static analysis & reset the time to 0.0

wipeAnalysis

setTime 0.0

# Now remove the loads and let the beam vibrate

remove loadPattern 1

# Create the transient analysis

test EnergyIncr 1.0e-10 20 1

algorithm Newton

numberer RCM

constraints Plain

#integrator GeneralizedMidpoint 0.50

integrator Newmark 0.50 0.25

analysis Transient

# Perform the transient analysis

analyze 250 0.5

Results

The results consist of the file Node.out, which contains a line for every time step. Each line contains the time and the vertical displacement at the upper center of the hoop structure. The time history is shown in figure~\ref{shelldisp}.

FIGURE HERE

Page 61: Open Sees Examples Primer

61

In this example a simple problem in solid dynamics is considered. The structure is a cantilever beam modelled with three dimensional solid elements.

Files Required Example8.1.tcl (see http://peer.berkeley.edu/~silvia/OpenSees/TCLfiles/Example8.1.tcl")

Model

For three dimensional analysis, a typical solid element is defined as a volume in three dimensional space. Each node of the analysis has three displacement degrees of freedom. Thus the model is defined with $ndm := 3$ and $ndf := 3$.

For this model, a mesh is generated using the ``block3D'' command. The number of nodes in the local x-direction of the block is $nx$, the number of nodes in the local y-direction of the block is $ny$ and the number of nodes in the local z-direction of the block is $nz$. The block3D generation nodes \{1,2,3,4,5,6,7,8\} are prescribed to define the three dimensional domain of the beam, which is of size $2\times2\times10$.

Two possible brick elements can be used for the analysis. These may be created using the terms ``stdBrick'' or ``bbarBrick.'' An elastic isotropic material is used.

For initial gravity load analysis, a single load pattern with a linear time series and a single nodal loads is used.

Boundary conditions are applied using the fixZ command. In this case, all the nodes whose z-coordiate is $0.0$ have the boundary condition \{1,1,1\}, fully fixed.

Analysis

A solution algorithm of type Newton is used for the problem. The solution algorithm uses a ConvergenceTest which tests convergence on the norm of the energy increment vector. Five static load steps are performed.

Subsequent to the static analysis, the wipeAnalysis and remove loadPatern commands are used to remove the nodal loads and create a new analysis. The nodal displacements have not changed. However, with the external loads removed the structure is no longer in static equilibrium.

The integrator for the dynamic analysis if of type GeneralizedMidpoint with $\alpha := 0.5$. This choice is uconditionally stable and energy conserving for linear problems. Additionally, this integrator conserves linear and angular momentum for both linear and non-linear problems. The dynamic analysis is performed using $100$ time increments with a time step $\Delta t := 2.0$.

C H A P T E R 9

EXAMPLE 8 - Cantilever Beam

Page 62: Open Sees Examples Primer

Chapter 9 错误!未定义样式。 62

OpenSees Script # OpenSees Example 8.1

# OpenSees Primer

#

# Units: kips, in, sec

# ----------------------------

# Start of model generation

# ----------------------------

# Create ModelBuilder with 3 dimensions and 6 DOF/node

model basic -ndm 3 -ndf 3

# create the material

nDMaterial ElasticIsotropic 1 100 0.25 1.27

# Define geometry

# ---------------

# define some parameters

set eleArgs "1"

set element stdBrick

#set element BbarBrick

set nz 6

set nx 2

set ny 2

set nn [expr ($nz+1)*($nx+1)*($ny+1) ]

# mesh generation

block3D $nx $ny $nz 1 1 $element $eleArgs {

1 -1 -1 0

2 1 -1 0

3 1 1 0

4 -1 1 0

5 -1 -1 10

6 1 -1 10

7 1 1 10

8 -1 1 10

}

set load 0.10

# Constant point load

pattern Plain 1 Linear {

load $nn $load $load 0.0

Page 63: Open Sees Examples Primer

Chapter 9 错误!未定义样式。 63

}

# boundary conditions

fixZ 0.0 1 1 1

# --------------------------------------------------------------------

# Start of static analysis (creation of the analysis & analysis itself)

# --------------------------------------------------------------------

# Load control with variable load steps

# init Jd min max

integrator LoadControl 1.0 1 1.0 10.0

# Convergence test

# tolerance maxIter displayCode

test NormUnbalance 1.0e-10 20 1

# Solution algorithm

algorithm Newton

# DOF numberer

numberer RCM

# Cosntraint handler

constraints Plain

# System of equations solver

system ProfileSPD

# Analysis for gravity load

analysis Static

# Perform the analysis

analyze 5

# --------------------------

# End of static analysis

# --------------------------

# ----------------------------

# Start of recorder generation

# ----------------------------

recorder Node -file Node.out -time -node $nn -dof 1 disp

recorder plot Node.out CenterNodeDisp 625 10 625 450 -columns 1 2

recorder display ShakingBeam 0 0 300 300 -wipe

prp -100 100 120.5

vup 0 1 0

display 1 0 1

# --------------------------

# End of recorder generation

Page 64: Open Sees Examples Primer

Chapter 9 错误!未定义样式。 64

# --------------------------

# ---------------------------------------

# Create and Perform the dynamic analysis

# ---------------------------------------

# Remove the static analysis & reset the time to 0.0

wipeAnalysis

setTime 0.0

# Now remove the loads and let the beam vibrate

remove loadPattern 1

# add some mass proportional damping

rayleigh 0.01 0.0 0.0 0.0

# Create the transient analysis

test EnergyIncr 1.0e-10 20 1

algorithm Newton

numberer RCM

constraints Plain

integrator Newmark 0.5 0.25

analysis Transient

# Perform the transient analysis (20 sec)

# numSteps dt

analyze 100 2.0

Results

The results consist of the file cantilever.out, which contains a line for every time step. Each line contains the time and the horizontal displacement at the upper right corner the beam. The time history is as plotted on the screen.

FIGURE HERE

Page 65: Open Sees Examples Primer

65

Example3.1.tcl # Reinforced concrete one-bay, one-story frame # Distributed vertical load on

girder # # Example Objectives # ----------------- # Nonlinear beam-column elements # Gravity load analysis and eigenvalue analysis # # # Units: kips, in, sec # # Written: GLF/MHS/fmk # Date: January 2001 # ------------------------------ # Start of model generation # ------------------------------ # Create ModelBuilder (with two-dimensions and 3 DOF/node) model basic -ndm 2 -ndf 3 # Create nodes # ------------ # Set parameters for overall model geometry set width 360 set height 144 # Create nodes # tag X Y node 1 0.0 0.0 node 2 $width 0.0 node 3 0.0 $height node 4 $width $height # Fix supports at base of columns # tag DX DY RZ fix 1 1 1 1 fix 2 1 1 1 # Define materials for nonlinear columns # ------------------------------------------

C H A P T E R 1 0

Reinforced Concrete Plane Frame Examples

Page 66: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 66

# 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 paramaters 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] } # Define column elements # ---------------------- # Geometry of column elements # tag geomTransf Linear 1 # Number of integration points along length of element set np 5 # Create the coulumns using Beam-column elements # tag ndI ndJ nsecs secID transfTag element nonlinearBeamColumn 1 1 3 $np 1 1

Page 67: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 67

element nonlinearBeamColumn 2 2 4 $np 1 1 # Define beam elment # ----------------------------- # Geometry of column elements # tag geomTransf Linear 2 # Create the beam element # tag ndI ndJ A E Iz transfTag element elasticBeamColumn 3 3 4 360 4030 8640 2 # Define gravity loads # -------------------- # Set a parameter for the axial load set P 180; # 10% of axial capacity of columns # Create a Plain load pattern with a Linear TimeSeries pattern Plain 1 "Linear" { # Create nodal loads at nodes 3 & 4 # nd FX FY MZ load 3 0.0 [expr -$P] 0.0 load 4 0.0 [expr -$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 1 0.1 0.1 # Create the analysis object

Page 68: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 68

analysis Static # ------------------------------ # End of analysis generation # ------------------------------ # ------------------------------ # Start of recorder generation # ------------------------------ # Create a recorder to monitor nodal displacements recorder Node nodeGravity.out disp -time -node 3 4 -dof 1 2 3 # -------------------------------- # End of recorder generation # --------------------------------- # ------------------------------ # Finally perform the analysis # ------------------------------ # initialize in case we need to do an initial stiffness iteration initialize # 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

Example3.2.tcl # Reinforced concrete one-bay, one-story frame # Distributed vertical load on

girder # Lateral Load at top of frame # # Example Objectives # ----------------- # Nonlinear pushover analysis using Portal Frame Example 1 as starting point # # Units: kips, in, sec # # Written: GLF/MHS/fmk # Date: January 2001 # ---------------------------------------------------- # Start of Model Generation & Initial Gravity Analysis # ----------------------------------------------------

Page 69: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 69

# Do operations of Example3.1 by sourcing in the tcl file source Example3.1.tcl puts "Gravity load analysis completed"; # Set the gravity loads to be constant & reset the time in the domain loadConst -time 0.0 # ---------------------------------------------------- # End of Model Generation & Initial Gravity Analysis # ---------------------------------------------------- # ---------------------------------------------------- # Start of additional modelling for lateral loads # ---------------------------------------------------- # Define lateral loads # -------------------- # Set some parameters set H 10.0; # Reference lateral load # Set lateral load pattern with a Linear TimeSeries pattern Plain 2 "Linear" { # Create nodal loads at nodes 3 & 4 # nd FX FY MZ load 3 $H 0.0 0.0 load 4 $H 0.0 0.0 } # ---------------------------------------------------- # End of additional modelling for lateral loads # ---------------------------------------------------- # ---------------------------------------------------- # Start of modifications to analysis for push over # ---------------------------------------------------- # Set some parameters set dU 0.1; # Displacement increment # Change the integration scheme to be displacement control # node dof init Jd min max integrator DisplacementControl 3 1 $dU 1 $dU $dU # ---------------------------------------------------- # End of modifications to analysis for push over # ---------------------------------------------------- # ------------------------------ # Start of recorder generation # ------------------------------ # Stop the old recorders by destroying them # remove recorders

Page 70: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 70

# Create a recorder to monitor nodal displacements recorder Node node32.out disp -time -node 3 4 -dof 1 2 3 #recorder plot node32.out hi 10 10 300 300 -columns 2 1 # Create a recorder to monitor element forces in columns recorder Element 1 2 -time -file ele32.out force # -------------------------------- # End of recorder generation # --------------------------------- # ------------------------------ # Finally perform the analysis # ------------------------------ # Set some parameters set maxU 15.0; # Max displacement set numSteps [expr int($maxU/$dU)] # Perform the analysis set ok [analyze $numSteps] if {$ok != 0} { set currentDisp [nodeDisp 3 1] set ok 0 while {$ok == 0 && $currentDisp < $maxU} { set ok [analyze 1] # if the analysis fails try initial tangent iteration if {$ok != 0} { puts "regular newton failed .. lets try an initail stiffness for this step" test NormDispIncr 1.0e-12 1000 0 algorithm Newton -initial set ok [analyze 1] if {$ok == 0} {puts "that worked .. back to regular newton"} test NormDispIncr 1.0e-12 10 algorithm Newton } set currentDisp [nodeDisp 3 1] } } if {$ok == 0} { puts "Pushover analysis completed succesfully"; } else { puts "Pushover analysis failed to complete"; } # Print the state at node 3 print node 3

Page 71: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 71

Example3.3.tcl # Reinforced concrete one-bay, one-story frame # Distributed vertical load

on girder # Uniform excitation acting at fixed nodes in horizontal direction # # Example Objectives # ----------------- # Nonlinear dynamic analyis using Portal Frame Example 1 as staring point # Using Tcl Procedures # # # Units: kips, in, sec # # Written: GLF/MHS/fmk # Date: January 2001 # ---------------------------------------------------- # Start of Model Generation & Initial Gravity Analysis # ---------------------------------------------------- # Do operations of Example3.1 by sourcing in the tcl file source Example3.1.tcl puts "Gravity load analysis completed" # Set the gravity loads to be constant & reset the time in the domain loadConst -time 0.0 # ---------------------------------------------------- # End of Model Generation & Initial Gravity Analysis # ---------------------------------------------------- # ---------------------------------------------------- # Start of additional modelling for dynamic loads # ---------------------------------------------------- # Define nodal mass in terms of axial load on columns set g 386.4 set m [expr $P/$g]; # expr command to evaluate an expression # tag MX MY RZ mass 3 $m $m 0 mass 4 $m $m 0 # Define dynamic loads # -------------------- # Set some parameters set outFile ARL360.g3 # Source in TCL proc to read PEER SMD record source ReadSMDFile.tcl # Permform the conversion from SMD record to OpenSees record

Page 72: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 72

# inFile outFile dt ReadSMDFile ARL360.at2 $outFile dt # Set time series to be passed to uniform excitation set accelSeries "Path -filePath $outFile -dt $dt -factor $g" # Create UniformExcitation load pattern # tag dir pattern UniformExcitation 2 1 -accel $accelSeries # ---------------------------------------------------- # End of additional modelling for dynamic loads # ---------------------------------------------------- # --------------------------------------------------------- # Start of modifications to analysis for transient analysis # --------------------------------------------------------- # Delete the old analysis and all it's component objects wipeAnalysis # Create the system of equation, a banded general storage scheme system BandGeneral # Create the constraint handler, a plain handler as homogeneous boundary constraints Plain # 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 # Create the solution algorithm, a Newton-Raphson algorithm algorithm Newton # Create the DOF numberer, the reverse Cuthill-McKee algorithm numberer RCM # Create the integration scheme, the Newmark with alpha =0.5 and beta =.25 integrator Newmark 0.5 0.25 0.0 0.0 0.0 0.000625 # Create the analysis object analysis Transient # --------------------------------------------------------- # End of modifications to analysis for transient analysis # --------------------------------------------------------- # ------------------------------ # Start of recorder generation # ------------------------------ # Create a recorder to monitor nodal displacements recorder Node node33.out disp -time -node 3 4 -dof 1 2 3 # Create recorders to monitor section forces and deformations # at the base of the left column recorder Element 1 -time -file ele1secForce.out section 1 force

Page 73: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 73

recorder Element 1 -time -file ele1secDef.out section 1 deformation # -------------------------------- # End of recorder generation # --------------------------------- # ------------------------------ # Finally perform the analysis # ------------------------------ # Perform an eigenvalue analysis puts [eigen 2] # Perform the transient analysis # N dt set ok [analyze 2000 0.01] if {$ok != 0} { set tFinal [expr 2000 * 0.01] set tCurrent [getTime] set ok 0 while {$ok == 0 && $tCurrent < $tFinal} { set ok [analyze 1 .01] # if the analysis fails try initial tangent iteration if {$ok != 0} { puts "regular newton failed .. lets try an initail stiffness for this step" test NormDispIncr 1.0e-12 100 1 algorithm Newton -initial set ok [analyze 1 .01] if {$ok == 0} {puts "that worked .. back to regular newton"} test NormDispIncr 1.0e-12 10 algorithm Newton } set tCurrent [getTime] } } if {$ok == 0} { puts "Transient analysis completed succesfully"; } else { puts "Transient analysis completed failed"; } # Perform an eigenvalue analysis puts [eigen 2] # Print state of node 3 print node 3

PortalFrame.tcl # PortalFrame: Reinforced concrete one bay frame # Distributed vertical load

on girder # Horizontal load at girder # Linear girder, non-linear columns #

Page 74: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 74

# Units: kips, in, sec # # Written: MHS # Date: 3 August 1999 set ANALYSIS Static #set ANALYSIS Dynamic set PUSHOVER LoadControl #set PUSHOVER DispControl # Create ModelBuilder model basic -ndm 3 -ndf 6 # ----- set PI [expr 2*asin(1.0)] set g 386.4 set hCol 72.0; # Column diameter set colAspect 4; # Column aspect ratio set blTocl 1; # Beam length to column length ratio set biToci 1; # Beam Ig to column Ig ratio set v 0.05; # Column axial load --> P = v*f'c*Ag set hBeam 96.0; # Beam depth set lenCol [expr $hCol*2*$colAspect]; # Column length set lenBeam [expr $lenCol*$blTocl]; # Beam length set fc -5.5; # Concrete compressive strength set Ec [expr 57000*sqrt(-$fc*1000)]; # Elastic concrete modulus (psi) set Ec [expr $Ec/1000]; # Elastic concrete modulus (ksi) set colArea [expr $PI*pow($hCol,2)/4]; # Column cross-section area set P [expr $v*$fc*$colArea]; # Column axial load set m [expr -$P/$g]; # Beam nodal mass set cover [expr $hCol/15]; # Column cover set rhoCol 0.015; # Column r/f ratio set numBars 20; # Number of r/f bars in columns set barArea [expr $rhoCol*$colArea/$numBars]; # r/f bar area set beamArea $colArea; # Beam cross-section area set Icol [expr $PI*pow($hCol,4)/64]; # Column gross second moment of area set Ibeam [expr $Icol*$biToci]; # Beam gross second moment of area set GJ 1.0e12; # Torsional stiffness # Define uniaxial materials # CONCRETE tag f'c ec0 f'cu ecu # Core concrete (confined) uniaxialMaterial Concrete01 1 [expr 1.26394*$fc] -0.004639 [expr 1.002753*$fc] -0.013667 # Cover concrete (unconfined) uniaxialMaterial Concrete01 2 $fc -0.003 [expr 0.1*$fc] -0.006 # STEEL # Reinforcing steel # tag fy E0 b uniaxialMaterial Steel01 3 60 30000 0.05 # ----- set lp [expr $lenCol/3]; # Plastic hinge length # Define nodes

Page 75: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 75

# tag X Y Z node 1 0.0 0.0 0.0 node 2 $lenBeam 0.0 0.0 node 3 0.0 $lp 0.0 node 4 $lenBeam $lp 0.0 node 5 0.0 [expr $lenCol-$lp] 0.0 node 6 $lenBeam [expr $lenCol-$lp] 0.0 node 7 0.0 $lenCol 0.0 node 8 $lenBeam $lenCol 0.0 # Nodal mass # node MX MY MZ RX RY RZ mass 7 $m $m $m 0.0 0.0 0.0 mass 8 $m $m $m 0.0 0.0 0.0 # ----- # Boundary conditions # node DX DY DZ RX RY RZ fix 1 1 1 1 1 1 1 fix 2 1 1 1 1 1 1 fix 3 0 0 1 1 1 0 fix 4 0 0 1 1 1 0 fix 5 0 0 1 1 1 0 fix 6 0 0 1 1 1 0 fix 7 0 0 1 1 1 0 fix 8 0 0 1 1 1 0 # ----- # Define column section set rCol [expr $hCol/2.0]; # Column radius # Source in procedure to define circular fiber section source RCcircSection.tcl # tag ri ro cover coreID coverID steelID num area nfCoreR nfCoreT nfCoverR nfCoverT RCcircSection 2 0.0 $rCol $cover 1 2 3 $numBars $barArea 8 16 2 10 # Define torsional stiffness and attach it to RC section uniaxialMaterial Elastic 10 $GJ # tag uniTag uniCode secTag section Aggregator 1 10 T -section 2 # ----- set np 4; # Number of integration points # Define column elements # tag vecxz geomTransf Linear 1 0 0 1 # Plastic region # tag ndI ndJ nsecs secID transfTag element nonlinearBeamColumn 1 1 3 $np 1 1 element nonlinearBeamColumn 2 2 4 $np 1 1 element nonlinearBeamColumn 5 5 7 $np 1 1 element nonlinearBeamColumn 6 6 8 $np 1 1 # Elastic region

Page 76: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 76

# tag ndI ndJ A E G J Iy Iz transfTag element elasticBeamColumn 3 3 5 $colArea $Ec $GJ 1.0 $Icol $Icol 1 element elasticBeamColumn 4 4 6 $colArea $Ec $GJ 1.0 $Icol $Icol 1 # Define beam element # tag vecxz geomTransf Linear 2 0 0 1 # tag ndI ndJ A E G J Iy Iz transfTag element elasticBeamColumn 7 7 8 $beamArea $Ec $GJ 1.0 $Ibeam $Ibeam 2 # ----- # Record nodal displacements recorder Node nodeDisp.out disp -time -node 7 8 -dof 1 # Record element forces recorder Element 1 -time -file ele1Force.out force recorder Element 2 -time -file ele2Force.out force # Record section forces and deformations recorder Element 1 -time -file ele1sec1Force.out section 1 forces recorder Element 1 -time -file ele1sec1Def.out section 1 deformations # ----- # Constant gravity load pattern Plain 1 Constant { # FX FY FZ MX MY MZ load 7 0.0 $P 0.0 0.0 0.0 0.0 load 8 0.0 $P 0.0 0.0 0.0 0.0 } system ProfileSPD constraints Plain numberer Plain # tol max dispCode test NormUnbalance 1.0e-5 20 algorithm Newton # Integrator with zero time step for initial gravity analysis integrator LoadControl 0 1 0 0 analysis Static analyze 1 # ----- if {$ANALYSIS == "Static"} { set H 28.0; # Reference lateral load # Set lateral load pattern pattern Plain 2 Linear { load 7 $H 0.0 0.0 0.0 0.0 0.0 load 8 $H 0.0 0.0 0.0 0.0 0.0 } if {$PUSHOVER == "LoadControl"} { # init Jd min max

Page 77: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 77

integrator LoadControl 0.2 4 0.1 2.0 set numSteps 20 analysis Static analyze $numSteps } elseif {$PUSHOVER == "DispControl"} { set dU 0.1; # Displacement increment set maxU 12.0; # Max displacement # node dof init Jd min max integrator DisplacementControl 7 1 $dU 1 $dU $dU set numSteps [expr int($maxU/$dU)] analysis Static analyze $numSteps } else { puts stderr "Invalid PUSHOVER option" } } elseif {$ANALYSIS == "Dynamic"} { wipeAnalysis system BandGeneral constraints Plain test NormUnbalance 1.0e-5 20 algorithm Newton numberer RCM # gamma beta integrator Newmark 0.5 0.25 analysis Transient # Source in TCL proc to read PEER SMD record source ReadSMDFile.tcl set outFile A-e06230.g3 # inFile outFile dt ReadSMDFile A-e06230.at2 $outFile dt # Create EQ load pattern # tag dir factor file dt pattern UniformExcitation 2 1 $g -accel $outFile $dt # N dt analyze 2000 0.01 } else { puts stderr "Invalid ANALYSIS option" }

Page 78: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 78

Example4.1.tcl # Reinforced concrete multi-bay, two-story frame # Distributed vertical load

on girder # # Example Objectives # ----------------- # Nonlinear beam-column elements # Gravity load analysis followed by pushover analysis # Demonstrate scripting for the algorithmic level # # # Units: kips, in, sec # # Written: GLF/MHS/fmk # Date: January 2001 # Parameter identifying the number of bays set numBay 3 # ------------------------------ # Start of model generation # ------------------------------ # Create ModelBuilder (with two-dimensions and 3 DOF/node) model basic -ndm 2 -ndf 3 # Create nodes # ------------ # Set parameters for overall model geometry set bayWidth 288 set nodeID 1 # Define nodes for {set i 0} {$i <= $numBay} {incr i 1} { set xDim [expr $i * $bayWidth] # tag X Y node $nodeID $xDim 0 node [expr $nodeID+1] $xDim 180 node [expr $nodeID+2] $xDim 324 incr nodeID 3 } # Fix supports at base of columns for {set i 0} {$i <= $numBay} {incr i 1} { # node DX DY RZ fix [expr $i*3+1] 1 1 1 } # Define materials for nonlinear columns # ------------------------------------------

Page 79: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 79

# CONCRETE # Cover concrete # tag -f'c -epsco -f'cu -epscu # 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 # tag fy E0 b uniaxialMaterial Steel01 3 60 30000 0.015 # Define cross-section for nonlinear columns # ------------------------------------------ # Interior column section section Fiber 1 { # mat nfIJ nfJK yI zI yK zK # mat nfIJ nfJK yI zI yJ zJ yK zK yL zL patch quadr 2 1 12 -11.5 10 -11.5 -10 11.5 -10 11.5 10 patch quadr 1 1 14 -13.5 -10 -13.5 -12 13.5 -12 13.5 -10 patch quadr 1 1 14 -13.5 12 -13.5 10 13.5 10 13.5 12 patch quadr 1 1 2 -13.5 10 -13.5 -10 -11.5 -10 -11.5 10 patch quadr 1 1 2 11.5 10 11.5 -10 13.5 -10 13.5 10 # mat nBars area yI zI yF zF layer straight 3 6 1.56 -10.5 9 -10.5 -9 layer straight 3 6 1.56 10.5 9 10.5 -9 } # Exterior column section section Fiber 2 { patch quadr 2 1 10 -10 10 -10 -10 10 -10 10 10 patch quadr 1 1 12 -12 -10 -12 -12 12 -12 12 -10 patch quadr 1 1 12 -12 12 -12 10 12 10 12 12 patch quadr 1 1 2 -12 10 -12 -10 -10 -10 -10 10 patch quadr 1 1 2 10 10 10 -10 12 -10 12 10 layer straight 3 6 0.79 -9 9 -9 -9 layer straight 3 6 0.79 9 9 9 -9 } # Girder section section Fiber 3 { patch quadr 1 1 12 -12 9 -12 -9 12 -9 12 9 layer straight 3 4 1.00 -9 9 -9 -9 layer straight 3 4 1.00 9 9 9 -9 } # Define column elements # ---------------------- # Number of integration points set nP 4

Page 80: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 80

# Geometric transformation geomTransf Linear 1 set beamID 1 # Define elements for {set i 0} {$i <= $numBay} {incr i 1} { # set some parameters set iNode [expr $i*3 + 1] set jNode [expr $i*3 + 2] for {set j 1} {$j < 3} {incr j 1} { # add the column element (secId == 2 if external, 1 if internal column) if {$i == 0} { element nonlinearBeamColumn $beamID $iNode $jNode $nP 2 1 } elseif {$i == $numBay} { element nonlinearBeamColumn $beamID $iNode $jNode $nP 2 1 } else { element nonlinearBeamColumn $beamID $iNode $jNode $nP 1 1 } # increment the parameters incr iNode 1 incr jNode 1 incr beamID 1 } } # Define beam elements # ---------------------- # Number of integration points set nP 4 # Geometric transformation geomTransf Linear 2 # Define elements for {set j 1} {$j < 3} {incr j 1} { # set some parameters set iNode [expr $j + 1] set jNode [expr $iNode + 3] for {set i 1} {$i <= $numBay} {incr i 1} { element nonlinearBeamColumn $beamID $iNode $jNode $nP 3 2 # increment the parameters incr iNode 3 incr jNode 3 incr beamID 1 } } # Define gravity loads # --------------------

Page 81: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 81

# Constant gravity load set P -192 # Create a Plain load pattern with a Linear TimeSeries pattern Plain 1 Linear { # Create nodal loads at nodes for {set i 0} {$i <= $numBay} {incr i 1} { # set some parameters set node1 [expr $i*3 + 2] set node2 [expr $node1 + 1] if {$i == 0} { load $node1 0.0 $P 0.0 load $node2 0.0 [expr $P/2.0] 0.0 } elseif {$i == $numBay} { load $node1 0.0 $P 0.0 load $node2 0.0 [expr $P/2.0] 0.0 } else { load $node1 0.0 [expr 2.0*$P] 0.0 load $node2 0.0 $P 0.0 } } } # ------------------------------ # End of model generation # ------------------------------ # ------------------------------------------------ # Start of analysis generation for gravity analysis # ------------------------------------------------- # 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-8 10 0 # 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 1 0.1 0.1 # Create the system of equation, a SPD using a profile storage scheme system BandGeneral # Create the DOF numberer, the reverse Cuthill-McKee algorithm numberer RCM # Create the constraint handler, the transformation method constraints Plain # Create the analysis object analysis Static # ------------------------------------------------ # End of analysis generation for gravity analysis

Page 82: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 82

# ------------------------------------------------- # ------------------------------ # Perform gravity load analysis # ------------------------------ # initialize the model, done to set initial tangent initialize # perform the gravity load analysis, requires 10 steps to reach the load level analyze 10 # set gravity loads to be const and set pseudo time to be 0.0 # for start of lateral load analysis loadConst -time 0.0 # ------------------------------ # Add lateral loads # ------------------------------ # Reference lateral load for pushover analysis set H 10 # Reference lateral loads # Create a Plain load pattern with a Linear TimeSeries pattern Plain 2 Linear { load 2 [expr $H/2.0] 0.0 0.0 load 3 $H 0.0 0.0 } # ------------------------------ # Start of recorder generation # ------------------------------ # Create a recorder which writes to Node.out and prints # the current load factor (pseudo-time) and dof 1 displacements at node 2 & 3 recorder Node Node41.out disp -time -node 2 3 -dof 1 # Source in some commands to display the model # comment out one of lines set displayMode "displayON" #set displayMode "displayOFF" if {$displayMode == "displayON"} { # a window to plot the nodal displacements versus load for node 3 recorder plot Node41.out Node3Xdisp 10 340 300 300 -columns 3 1 } # ------------------------------ # End of recorder generation # ------------------------------ # ------------------------------

Page 83: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 83

# Start of lateral load analysis # ------------------------------ # Change the integrator to take a min and max load increment integrator LoadControl 1.0 4 0.02 2.0 # Perform the analysis # Perform the pushover analysis # Set some parameters set maxU 10.0; # Max displacement set controlDisp 0.0; set ok 0; while {$controlDisp < $maxU && $ok == 0} { set ok [analyze 1] set controlDisp [nodeDisp 3 1] if {$ok != 0} { puts "... trying an initial tangent iteration" test NormDispIncr 1.0e-8 4000 0 algorithm Newton -initial set ok [analyze 1] test NormDispIncr 1.0e-8 10 0 algorithm Newton } } if {$ok != 0} { puts "Pushover analysis FAILED" } else { puts "Pushover analysis completed SUCCESSFULLY" }

RCFrame1.tcl # R/C two story, two bay frame # Pushover analysis # No TCL constructs

# Units: kip, in # MHS, Sept 1999 # email: [email protected] # # # # _________________________ _ # | | | # | | | 12' # | | | # |____________|____________| _ # | | | # | | | # | | | 15' # | | | # | | | _ # === === === # | 24' | 24' | # # # NOTE: to RUN this example, run the g3 interpreter and

Page 84: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 84

# type the command: source RCFrame1.tcl # # $Revision: 1.3 $ # $Date: 2000/12/19 03:57:15 $ # $Source: /usr/local/cvs/OpenSees/EXAMPLES/ExampleScripts/RCFrame1.tcl,v $ # comment out one of lines #set displayMode "displayON" set displayMode "displayOFF" # Define the model builder model BasicBuilder -ndm 2 -ndf 3 # Define nodes # tag X Y node 1 0 0 node 2 0 180 node 3 0 324 node 4 288 0 node 5 288 180 node 6 288 324 node 7 576 0 node 8 576 180 node 9 576 324 # Single point constraints # node DX DY RZ fix 1 1 1 1 fix 4 1 1 1 fix 7 1 1 1 # Define materials # Cover concrete # tag -f'c -epsco -f'cu -epscu uniaxialMaterial Concrete01 1 -4.00 -0.002 0.0 -0.006 # Core concrete uniaxialMaterial Concrete01 2 -5.20 -0.005 -4.70 -0.02 # Steel model # tag fy E b uniaxialMaterial Steel01 3 60 30000 0.02 # Interior column section section fiberSec 1 { # mat nfIJ nfJK yI zI yJ zJ yK zK yL zL patch quadr 2 1 12 -11.5 10 -11.5 -10 11.5 -10 11.5 10 patch quadr 1 1 14 -13.5 -10 -13.5 -12 13.5 -12 13.5 -10 patch quadr 1 1 14 -13.5 12 -13.5 10 13.5 10 13.5 12 patch quadr 1 1 2 -13.5 10 -13.5 -10 -11.5 -10 -11.5 10 patch quadr 1 1 2 11.5 10 11.5 -10 13.5 -10 13.5 10 # mat nBars area yI zI yF zF layer straight 3 6 1.56 -10.5 9 -10.5 -9 layer straight 3 6 1.56 10.5 9 10.5 -9 } # Exterior column section section fiberSec 2 { patch quadr 2 1 10 -10 10 -10 -10 10 -10 10 10 patch quadr 1 1 12 -12 -10 -12 -12 12 -12 12 -10

Page 85: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 85

patch quadr 1 1 12 -12 12 -12 10 12 10 12 12 patch quadr 1 1 2 -12 10 -12 -10 -10 -10 -10 10 patch quadr 1 1 2 10 10 10 -10 12 -10 12 10 layer straight 3 6 0.79 -9 9 -9 -9 layer straight 3 6 0.79 9 9 9 -9 } # Girder section section fiberSec 3 { patch quadr 1 1 12 -12 9 -12 -9 12 -9 12 9 layer straight 3 4 1.00 -9 9 -9 -9 layer straight 3 4 1.00 9 9 9 -9 } # Number of integration points set nP 4 # Geometric transformation geomTransf Linear 1 # Define elements # Columns # tag ndI ndJ nPts secID transf element nonlinearBeamColumn 1 1 2 $nP 2 1 element nonlinearBeamColumn 2 2 3 $nP 2 1 element nonlinearBeamColumn 3 4 5 $nP 1 1 element nonlinearBeamColumn 4 5 6 $nP 1 1 element nonlinearBeamColumn 5 7 8 $nP 2 1 element nonlinearBeamColumn 6 8 9 $nP 2 1 # Beams element nonlinearBeamColumn 7 2 5 $nP 3 1 element nonlinearBeamColumn 8 5 8 $nP 3 1 element nonlinearBeamColumn 9 3 6 $nP 3 1 element nonlinearBeamColumn 10 6 9 $nP 3 1 # Constant gravity loads pattern Plain 1 Linear { # node FX FY MZ load 2 0.0 -192.0 0.0 -const load 5 0.0 -384.0 0.0 -const load 8 0.0 -192.0 0.0 -const load 3 0.0 -96.0 0.0 -const load 6 0.0 -192.0 0.0 -const load 9 0.0 -96.0 0.0 -const } # Load control with variable load steps # init Jd min max integrator LoadControl 1 3 .2 1 # Convergence test # tolerance maxIter displayCode test NormDispIncr 1.0e-06 10 1 # Solution algorithm algorithm Newton # DOF numberer numberer RCM

Page 86: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 86

# Cosntraint handler constraints Transformation # System of equations solver system SparseGeneral -piv # Analysis for gravity load analysis Static # Perform the gravity load analysis analyze 1 # Reference lateral loads pattern Plain 2 Linear { # node FX FY MZ load 2 10.0 0.0 0.0 load 3 10.0 0.0 0.0 } # Create a recorder which writes to Node.out and prints # the current load factor (pseudo-time) and dof 1 displacements at node 2 & 3 recorder Node Node.out disp -time -node 2 3 -dof 1 # Create another recorder which writes to Element.out and prints # the section deformations at the base of the columns (elements 1,3,5) recorder Element 1 3 5 -file Element.out section 1 deformations # Source in some g3 commands to display the model if {$displayMode == "displayON"} { # a window to plot the nodal displacements versus load for node 3 recorder plot Node.out Node3Xdisp 10 340 300 300 -columns 3 1 # a window to show the displayed shape source RCFrameDisplay.tcl } # Create an analysis object analysis Static # Perform 40 analysis steps analyze 40 # Switch integrator to displacement control integrator DisplacementControl 3 1 .001 3 .001 1.0 # perform 25 analysis steps analyze 25

RCFrame2.tcl # R/C two story, two bay frame # Pushover analysis # Simple TCL procedure

for analysis # Units: kip, in # MHS, Sept 1999 # email: [email protected]

Page 87: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 87

# # _________________________ _ # | | | # | | | 12' # | | | # |____________|____________| _ # | | | # | | | # | | | 15' # | | | # | | | _ # === === === # | 24' | 24' | # # # NOTE: to RUN this example, run the g3 interpreter and # type the command: source RCFrame2.tcl # # $Revision: 1.2 $ # $Date: 2000/12/19 03:57:15 $ # $Source: /usr/local/cvs/OpenSees/EXAMPLES/ExampleScripts/RCFrame2.tcl,v $ # comment out one of lines #set displayMode "displayON" set displayMode "displayOFF" # Define the model builder model BasicBuilder -ndm 2 -ndf 3 # Define nodes # tag X Y node 1 0 0 node 2 0 180 node 3 0 324 node 4 288 0 node 5 288 180 node 6 288 324 node 7 576 0 node 8 576 180 node 9 576 324 # Single point constraints # node DX DY RZ fix 1 1 1 1 fix 4 1 1 1 fix 7 1 1 1 # Define materials # Cover concrete # tag -f'c -epsco -f'cu -epscu uniaxialMaterial Concrete01 1 -4.00 -0.002 0.0 -0.006 # Core concrete uniaxialMaterial Concrete01 2 -5.20 -0.005 -4.70 -0.02 # Steel model # tag fy E b uniaxialMaterial Steel01 3 60 30000 0.02 # Interior column section section fiberSec 1 {

Page 88: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 88

# mat nfIJ nfJK yI zI yJ zJ yK zK yL zL patch quadr 2 1 12 -11.5 10 -11.5 -10 11.5 -10 11.5 10 patch quadr 1 1 14 -13.5 -10 -13.5 -12 13.5 -12 13.5 -10 patch quadr 1 1 14 -13.5 12 -13.5 10 13.5 10 13.5 12 patch quadr 1 1 2 -13.5 10 -13.5 -10 -11.5 -10 -11.5 10 patch quadr 1 1 2 11.5 10 11.5 -10 13.5 -10 13.5 10 # mat nBars area yI zI yF zF layer straight 3 6 1.56 -10.5 9 -10.5 -9 layer straight 3 6 1.56 10.5 9 10.5 -9 } # Exterior column section section fiberSec 2 { patch quadr 2 1 10 -10 10 -10 -10 10 -10 10 10 patch quadr 1 1 12 -12 -10 -12 -12 12 -12 12 -10 patch quadr 1 1 12 -12 12 -12 10 12 10 12 12 patch quadr 1 1 2 -12 10 -12 -10 -10 -10 -10 10 patch quadr 1 1 2 10 10 10 -10 12 -10 12 10 layer straight 3 6 0.79 -9 9 -9 -9 layer straight 3 6 0.79 9 9 9 -9 } # Girder section section fiberSec 3 { patch quadr 1 1 12 -12 9 -12 -9 12 -9 12 9 layer straight 3 4 1.00 -9 9 -9 -9 layer straight 3 4 1.00 9 9 9 -9 } # Number of integration points set nP 4 # Geometric transformation geomTransf Linear 1 # Define elements # Columns # tag ndI ndJ nPts secID transf element nonlinearBeamColumn 1 1 2 $nP 2 1 element nonlinearBeamColumn 2 2 3 $nP 2 1 element nonlinearBeamColumn 3 4 5 $nP 1 1 element nonlinearBeamColumn 4 5 6 $nP 1 1 element nonlinearBeamColumn 5 7 8 $nP 2 1 element nonlinearBeamColumn 6 8 9 $nP 2 1 # Beams element nonlinearBeamColumn 7 2 5 $nP 3 1 element nonlinearBeamColumn 8 5 8 $nP 3 1 element nonlinearBeamColumn 9 3 6 $nP 3 1 element nonlinearBeamColumn 10 6 9 $nP 3 1 # Constant gravity load set P -192 pattern Plain 1 Linear { # node FX FY MZ

Page 89: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 89

load 2 0.0 $P 0.0 -const load 5 0.0 [expr $P*2] 0.0 -const load 8 0.0 $P 0.0 -const load 3 0.0 [expr $P/2] 0.0 -const load 6 0.0 $P 0.0 -const load 9 0.0 [expr $P/2] 0.0 -const } # Create a recorder which writes to Node.out and prints # the current load factor (pseudo-time) and dof 1 displacements at node 2 & 3 recorder Node Node.out disp -time -node 2 3 -dof 1 # This is not necessary, but is here to prevent warning message for # "no integrator" when analysis object is created ... will get overridden # when the runLoadControl procedure is called integrator LoadControl 1 1 1 1 # Convergence test # tolerance maxIter displayCode test NormDispIncr 1.0e-06 10 1 # Solution algorithm algorithm Newton # DOF numberer numberer RCM # Cosntraint handler constraints Plain # System of equations solver system SparseGeneral -piv # Analysis for gravity load analysis Static # Perform the gravity load analysis analyze 1 # Reference lateral load for pushover analysis set H 10 # Reference lateral loads pattern Plain 2 Linear { # node FX FY MZ load 2 $H 0.0 0.0 load 3 $H 0.0 0.0 } # Source in some g3 commands to display the model if {$displayMode == "displayON"} { # a window to plot the nodal displacements versus load for node 3 recorder plot Node.out Node3Xdisp 10 340 300 300 -columns 3 1 # a window to show the displayed shape source RCFrameDisplay.tcl }

Page 90: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 90

# Define a simple procedure to iterate at a constant load increment, # 'loadStep', over 'times' iterations proc runLoadControl {times initialLoadStep Jd minLoadStep maxLoadStep} { integrator LoadControl $initialLoadStep $Jd $minLoadStep $maxLoadStep for {set i 1} {$i <= $times} {incr i 1} { analyze 1 } } set nSteps 100 set initialLoadStep 1 set Jd 3 set minLoadStep 0.02 set maxLoadStep 2.0 runLoadControl $nSteps $initialLoadStep $Jd $minLoadStep $maxLoadStep

RCFrame3.tcl # R/C two story, two bay frame # Elastic analysis for comparison with

pushover curve # Units: kip, in # MHS, Sept 1999 # email: [email protected] # # # _________________________ _ # | | | # | | | 12' # | | | # |____________|____________| _ # | | | # | | | # | | | 15' # | | | # | | | _ # === === === # | 24' | 24' | # # NOTE: to RUN this example, run the g3 interpreter and # type the command: source RCFrame3.tcl # # $Revision: 1.1 $ # $Date: 2000/09/15 08:23:09 $ # $Source: /usr/local/cvs/OpenSees/EXAMPLES/ExampleScripts/RCFrame3.tcl,v $ model BasicBuilder -ndm 2 -ndf 3 # tag X Y node 1 0 0 node 2 0 180 node 3 0 324 node 4 288 0 node 5 288 180

Page 91: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 91

node 6 288 324 node 7 576 0 node 8 576 180 node 9 576 324 # node DX DY RZ fix 1 1 1 1 fix 4 1 1 1 fix 7 1 1 1 # "Cracked" second moments of area set IcolInt [expr 0.7*1/12*24*pow(27,3)] set IcolExt [expr 0.7*1/12*24*pow(24,3)] set Igir [expr 0.5*1/12*18*pow(24,3)] # Cross-sectional area of members set AcolInt [expr 24*27] set AcolExt [expr 24*24] set Agir [expr 18*24] # Concrete elastic modulus set E 4000 # Geometric transformation geomTransf Linear 1 # tag ndI ndJ A E I transf element elasticBeamColumn 1 1 2 $AcolExt $E $IcolExt 1 element elasticBeamColumn 2 2 3 $AcolExt $E $IcolExt 1 element elasticBeamColumn 3 4 5 $AcolInt $E $IcolInt 1 element elasticBeamColumn 4 5 6 $AcolInt $E $IcolInt 1 element elasticBeamColumn 5 7 8 $AcolExt $E $IcolExt 1 element elasticBeamColumn 6 8 9 $AcolExt $E $IcolExt 1 element elasticBeamColumn 7 2 5 $Agir $E $Igir 1 element elasticBeamColumn 8 5 8 $Agir $E $Igir 1 element elasticBeamColumn 9 3 6 $Agir $E $Igir 1 element elasticBeamColumn 10 6 9 $Agir $E $Igir 1 # Gravity load set P -192 # Lateral load set H 240 pattern Plain 1 Linear { # node FX FY MZ load 2 $H $P 0.0 load 5 0.0 [expr $P*2] 0.0 load 8 0.0 $P 0.0 load 3 $H [expr $P/2] 0.0 load 6 0.0 $P 0.0 load 9 0.0 [expr $P/2] 0.0 } algorithm Linear numberer RCM constraints Plain integrator LoadControl 1 1 1 1 system BandSPD analysis Static

Page 92: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 92

# Perform the linear analysis analyze 1 # Get the roof displacement print node 3

RCFrame4.tcl # R/C two story, two bay frame # Linear and Non-linear EQ analysis

# Units: kip, in # MHS, Sept 1999 # email: [email protected] # # # _________________________ _ # | | | # | | | 12' # | | | # |____________|____________| _ # | | | # | | | # | | | 15' # | | | # | | | _ # === === === # | 24' | 24' | # # # NOTE: to RUN this example, run the g3 interpreter and # type the command: source RCFrame4.tcl # # $Revision: 1.4 $ # $Date: 2001/01/19 07:13:45 $ # $Source: /usr/local/cvs/OpenSees/EXAMPLES/ExampleScripts/RCFrame4.tcl,v $ model BasicBuilder -ndm 2 -ndf 3 #set analysis "LINEAR" set analysis "NONLINEAR" #set displayMode "displayON" set displayMode "displayOFF" set g 386.4 set P 192 set m [expr $P/$g] set mR 0 # tag X Y massX massY rotZ node 1 0 0 node 2 0 180 -mass $m $m $mR node 3 0 324 -mass [expr $m/2] [expr $m/2] $mR node 4 288 0 node 5 288 180 -mass [expr $m/2] [expr $m/2] $mR node 6 288 324 -mass $m $m $mR

Page 93: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 93

node 7 576 0 node 8 576 180 -mass $m $m $mR node 9 576 324 -mass [expr $m/2] [expr $m/2] $mR # node DX DY RZ fix 1 1 1 1 fix 4 1 1 1 fix 7 1 1 1 if {$analysis == "NONLINEAR"} { # tag -f'c -epsco -f'cu -epscu uniaxialMaterial Concrete01 1 -4.00 -0.002 0.0 -0.006 uniaxialMaterial Concrete01 2 -5.20 -0.005 -4.70 -0.02 # Steel model # tag fy E b uniaxialMaterial Steel01 3 60 30000 0.02 # Interior column section section fiberSec 1 { # mat nfIJ nfJK yI zI yJ zJ yK zK yL zL patch quadr 2 1 12 -11.5 10 -11.5 -10 11.5 -10 11.5 10 patch quadr 1 1 14 -13.5 -10 -13.5 -12 13.5 -12 13.5 -10 patch quadr 1 1 14 -13.5 12 -13.5 10 13.5 10 13.5 12 patch quadr 1 1 2 -13.5 10 -13.5 -10 -11.5 -10 -11.5 10 patch quadr 1 1 2 11.5 10 11.5 -10 13.5 -10 13.5 10 # mat nBars area yI zI yF zF layer straight 3 6 1.56 -10.5 9 -10.5 -9 layer straight 3 6 1.56 10.5 9 10.5 -9 } # Exterior column section section fiberSec 2 { patch quadr 2 1 10 -10 10 -10 -10 10 -10 10 10 patch quadr 1 1 12 -12 -10 -12 -12 12 -12 12 -10 patch quadr 1 1 12 -12 12 -12 10 12 10 12 12 patch quadr 1 1 2 -12 10 -12 -10 -10 -10 -10 10 patch quadr 1 1 2 10 10 10 -10 12 -10 12 10 layer straight 3 6 0.79 -9 9 -9 -9 layer straight 3 6 0.79 9 9 9 -9 } # Girder section section fiberSec 3 { patch quadr 1 1 12 -12 9 -12 -9 12 -9 12 9 layer straight 3 4 1.00 -9 9 -9 -9 layer straight 3 4 1.00 9 9 9 -9 } set np 4 # Geometric transformation geomTransf Linear 1 # Define elements # tag ndI ndJ nPts secID transf element nonlinearBeamColumn 1 1 2 $np 2 1 element nonlinearBeamColumn 2 2 3 $np 2 1

Page 94: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 94

element nonlinearBeamColumn 3 4 5 $np 1 1 element nonlinearBeamColumn 4 5 6 $np 1 1 element nonlinearBeamColumn 5 7 8 $np 2 1 element nonlinearBeamColumn 6 8 9 $np 2 1 element nonlinearBeamColumn 7 2 5 $np 3 1 element nonlinearBeamColumn 8 5 8 $np 3 1 element nonlinearBeamColumn 9 3 6 $np 3 1 element nonlinearBeamColumn 10 6 9 $np 3 1 test NormUnbalance 1.0e-06 10 0 algorithm Newton system SparseGeneral -piv } if {$analysis == "LINEAR"} { # "Cracked" second moments of area set IcolInt [expr 0.7*1/12*24*pow(27,3)] set IcolExt [expr 0.7*1/12*24*pow(24,3)] set Igir [expr 0.5*1/12*18*pow(24,3)] set AcolInt [expr 24*27] set AcolExt [expr 24*24] set Agir [expr 18*24] set E 4000 # Geometric transformation geomTransf Linear 1 # tag ndI ndJ A E I transf element elasticBeamColumn 1 1 2 $AcolExt $E $IcolExt 1 element elasticBeamColumn 2 2 3 $AcolExt $E $IcolExt 1 element elasticBeamColumn 3 4 5 $AcolInt $E $IcolInt 1 element elasticBeamColumn 4 5 6 $AcolInt $E $IcolInt 1 element elasticBeamColumn 5 7 8 $AcolExt $E $IcolExt 1 element elasticBeamColumn 6 8 9 $AcolExt $E $IcolExt 1 element elasticBeamColumn 7 2 5 $Agir $E $Igir 1 element elasticBeamColumn 8 5 8 $Agir $E $Igir 1 element elasticBeamColumn 9 3 6 $Agir $E $Igir 1 element elasticBeamColumn 10 6 9 $Agir $E $Igir 1 algorithm Linear system BandSPD } set Series "Path -filePath tabasFN.txt -dt 0.02 -factor $g" # tag dir accel series pattern UniformExcitation 1 1 -accel $Series # Create a recorder which writes to Node.out and prints # the current time and all dof displacement at node 3 and 2 recorder Node Node.out disp -time -node 3 2 -dof 1 2 3 # Source in some g3 commands to display the model if {$displayMode == "displayON"} { # a window to show the displayed shape source RCFrameDisplay.tcl

Page 95: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 95

} # gamma beta integrator Newmark 0.5 0.25 numberer RCM constraints Plain # spit out the 1'st 4 eigen values eigen 4 # create the analysis object analysis Transient #type "Starting Tansient Analysis .. hang on" # numSteps dt analyze 1000 0.01 # spit out the 1'st 4 eigen values eigen 4

RCFrame5.tcl # R/C two story, two bay frame subject to sinusoidal pulse GMotion # Linear

and Non-linear EQ analysis # Units: kip, in # MHS, Sept 1999 # email: [email protected] # # # _________________________ _ # | | | # | | | 12' # | | | # |____________|____________| _ # | | | # | | | # | | | 15' # | | | # | | | _ # === === === # | 24' | 24' | # # # NOTE: to RUN this example, run the g3 interpreter and # type the command: source RCFrame5.tcl # # $Revision: 1.2 $ # $Date: 2000/12/19 03:57:15 $ # $Source: /usr/local/cvs/OpenSees/EXAMPLES/ExampleScripts/RCFrame5.tcl,v $ model BasicBuilder -ndm 2 -ndf 3 set analysis "LINEAR" #set analysis "NONLINEAR"

Page 96: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 96

set patternType "UniformExcitation" #set patternType "MultipleSupport" #set displayMode "displayON" set displayMode "displayOFF" set g 386.4 set P 192 set m [expr $P/$g] set mR 1.0e6 set PI [expr 2.0 * asin(1.0)] set period 2.5; set mag 5.0; set w [expr 2.0 * $PI / $period] #inital velocity condition for uniform exciation = -udotg set vel0 [expr -1.0 * $mag * $w] # ground motion set dispSeries "Sine 0 20.0 $period -factor $mag" set accelSeries "Sine 0 20.0 $period -factor [expr -1.0 * $w * $w * $mag]" # tag X Y massX massY rotZ node 1 0 0 node 2 0 180 -mass $m $m $mR node 3 0 324 -mass [expr $m/2] [expr $m/2] $mR node 4 288 0 node 5 288 180 -mass [expr $m/2] [expr $m/2] $mR node 6 288 324 -mass $m $m $mR node 7 576 0 node 8 576 180 -mass $m $m $mR node 9 576 324 -mass [expr $m/2] [expr $m/2] $mR # node DX DY RZ fix 1 1 1 1 fix 4 1 1 1 fix 7 1 1 1 if {$analysis == "NONLINEAR"} { # tag -f'c -epsco -f'cu -epscu uniaxialMaterial Concrete01 1 -4.00 -0.002 0.0 -0.006 uniaxialMaterial Concrete01 2 -5.20 -0.005 -4.70 -0.02 # Steel model # tag fy E b uniaxialMaterial Steel01 3 60 30000 0.02 # Interior column section section fiberSec 1 { # mat nfIJ nfJK yI zI yJ zJ yK zK yL zL patch quadr 2 1 12 -11.5 10 -11.5 -10 11.5 -10 11.5 10 patch quadr 1 1 14 -13.5 -10 -13.5 -12 13.5 -12 13.5 -10 patch quadr 1 1 14 -13.5 12 -13.5 10 13.5 10 13.5 12 patch quadr 1 1 2 -13.5 10 -13.5 -10 -11.5 -10 -11.5 10 patch quadr 1 1 2 11.5 10 11.5 -10 13.5 -10 13.5 10 # mat nBars area yI zI yF zF layer straight 3 6 1.56 -10.5 9 -10.5 -9 layer straight 3 6 1.56 10.5 9 10.5 -9

Page 97: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 97

} # Exterior column section section fiberSec 2 { patch quadr 2 1 10 -10 10 -10 -10 10 -10 10 10 patch quadr 1 1 12 -12 -10 -12 -12 12 -12 12 -10 patch quadr 1 1 12 -12 12 -12 10 12 10 12 12 patch quadr 1 1 2 -12 10 -12 -10 -10 -10 -10 10 patch quadr 1 1 2 10 10 10 -10 12 -10 12 10 layer straight 3 6 0.79 -9 9 -9 -9 layer straight 3 6 0.79 9 9 9 -9 } # Girder section section fiberSec 3 { patch quadr 1 1 12 -12 9 -12 -9 12 -9 12 9 layer straight 3 4 1.00 -9 9 -9 -9 layer straight 3 4 1.00 9 9 9 -9 } set np 4 # Geometric transformation geomTransf Linear 1 # Define elements # tag ndI ndJ nPts secID transf element nonlinearBeamColumn 1 1 2 $np 2 1 element nonlinearBeamColumn 2 2 3 $np 2 1 element nonlinearBeamColumn 3 4 5 $np 1 1 element nonlinearBeamColumn 4 5 6 $np 1 1 element nonlinearBeamColumn 5 7 8 $np 2 1 element nonlinearBeamColumn 6 8 9 $np 2 1 element nonlinearBeamColumn 7 2 5 $np 3 1 element nonlinearBeamColumn 8 5 8 $np 3 1 element nonlinearBeamColumn 9 3 6 $np 3 1 element nonlinearBeamColumn 10 6 9 $np 3 1 test NormUnbalance 1.0e-06 10 0 algorithm Newton system SparseGeneral -piv } if {$analysis == "LINEAR"} { # "Cracked" second moments of area set IcolInt [expr 0.7*1/12*24*pow(27,3)] set IcolExt [expr 0.7*1/12*24*pow(24,3)] set Igir [expr 0.5*1/12*18*pow(24,3)] set AcolInt [expr 24*27] set AcolExt [expr 24*24] set Agir [expr 18*24] set E 4000 # Geometric transformation geomTransf Linear 1 # tag ndI ndJ A E I transf

Page 98: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 98

element elasticBeamColumn 1 1 2 $AcolExt $E $IcolExt 1 element elasticBeamColumn 2 2 3 $AcolExt $E $IcolExt 1 element elasticBeamColumn 3 4 5 $AcolInt $E $IcolInt 1 element elasticBeamColumn 4 5 6 $AcolInt $E $IcolInt 1 element elasticBeamColumn 5 7 8 $AcolExt $E $IcolExt 1 element elasticBeamColumn 6 8 9 $AcolExt $E $IcolExt 1 element elasticBeamColumn 7 2 5 $Agir $E $Igir 1 element elasticBeamColumn 8 5 8 $Agir $E $Igir 1 element elasticBeamColumn 9 3 6 $Agir $E $Igir 1 element elasticBeamColumn 10 6 9 $Agir $E $Igir 1 algorithm Linear system BandSPD } if {$patternType == "MultipleSupport"} { pattern MultipleSupport 1 { groundMotion 1 Series -disp $dispSeries imposedSupportMotion 1 1 1 imposedSupportMotion 4 1 1 imposedSupportMotion 7 1 1 } # Create a recorder which writes to Node.out and prints # the current time and all dof displacement at node 3 and 2 recorder Node MultiNodeDisp1.out disp -time -node 3 2 1 -dof 1 2 3 } if {$patternType == "UniformExcitation"} { pattern UniformExcitation 1 1 -accel $accelSeries -vel0 $vel0 recorder Node UniformNodeDisp1.out disp -time -node 3 2 1 -dof 1 2 3 } # Source in some g3 commands to display the model if {$displayMode == "displayON"} { # a window to show the displayed shape source RCFrameDisplay.tcl (page 135) } # gamma beta integrator Newmark 0.5 0.25 numberer RCM constraints Plain # spit out the 1'st 4 eigen values eigen 4 # create the analysis object analysis Transient #type "Starting Tansient Analysis .. hang on" # numSteps dt analyze 1000 0.01

Page 99: Open Sees Examples Primer

Chapter 10 错误!未定义样式。 99

# spit out the 1'st 4 eigen values eigen 4

Page 100: Open Sees Examples Primer

100

In This Chapter SteelFrame1.tcl ......................................................... 100 SteelFrame2.tcl ......................................................... 103 SteelFrame3.tcl ......................................................... 105

SteelFrame1.tcl # Steel two story, two bay frame # Static pushover analysis with zero length

elements # Pinned column bases # Rotational springs w/EPP behavior # Units: kip, in # # # @__________@_@__________@ _ # | | | # | | | 54" # | | | # |@__________@|@__________@| _ # | | | # | | | # | | | 54" # | | | _ # ^ ^ ^ # | 108" | 108" | # comment out one of lines if wish to see graphics or not #set displayMode "displayON" set displayMode "displayOFF" model BasicBuilder -ndm 2 -ndf 3 # tag X Y node 1 0 0 node 2 0 54 node 3 0 54 node 4 0 108 node 5 0 108 node 6 108 0 node 7 108 54 node 8 108 54 node 9 108 54 node 10 108 108 node 11 108 108

C H A P T E R 1 1

Steel Plane Frame Examples

Page 101: Open Sees Examples Primer

Chapter 11 错误!未定义样式。 101

node 12 108 108 node 13 216 0 node 14 216 54 node 15 216 54 node 16 216 108 node 17 216 108 # node DX DY RZ fix 1 1 1 0 fix 6 1 1 0 fix 13 1 1 0 # Define beam and column property variables set E 29000 # Columns W6x12: set Acol 3.55 set Icol 22.1 # Beams S4x7.7: set Agir 2.26 set Igir 6.08 # Define moment-rotation relationship for spring - EPP # E ep uniaxialMaterial ElasticPP 1 26290 0.005 # Source in proc to define rotational zero-length element source rotSpring2D.tcl # id ndR ndC matID rotSpring2D 1 2 3 1 rotSpring2D 2 4 5 1 rotSpring2D 3 7 8 1 rotSpring2D 4 8 9 1 rotSpring2D 5 10 11 1 rotSpring2D 6 11 12 1 rotSpring2D 7 14 15 1 rotSpring2D 8 16 17 1 # Coordinate transformation geomTransf Linear 1 # id ndI ndJ A E I transfTag element elasticBeamColumn 9 1 2 $Acol $E $Icol 1 element elasticBeamColumn 10 2 4 $Acol $E $Icol 1 element elasticBeamColumn 11 6 8 $Acol $E $Icol 1 element elasticBeamColumn 12 8 11 $Acol $E $Icol 1 element elasticBeamColumn 13 13 15 $Acol $E $Icol 1 element elasticBeamColumn 14 15 17 $Acol $E $Icol 1 element elasticBeamColumn 15 3 7 $Agir $E $Igir 1 element elasticBeamColumn 16 5 10 $Agir $E $Igir 1 element elasticBeamColumn 17 9 14 $Agir $E $Igir 1 element elasticBeamColumn 18 12 16 $Agir $E $Igir 1 # Constant gravity loads pattern Plain 1 Constant { # node FX FY MZ load 2 0.0 -1.0 0.0 load 8 0.0 -4.0 0.0 load 15 0.0 -1.0 0.0 load 4 0.0 -2.0 0.0

Page 102: Open Sees Examples Primer

Chapter 11 错误!未定义样式。 102

load 11 0.0 -6.0 0.0 load 17 0.0 -2.0 0.0 } # Lateral load set H 0.2 pattern Plain 2 Linear { # node FX FY MZ load 2 $H 0.0 0.0 load 3 $H 0.0 0.0 } # Record displacements at 1st floor and roof recorder Node StFrPZL1.out disp -time -node 2 4 8 10 -dof 1 # Record spring forces recorder Element 1 -file StFrPZL1el1.out -time forces recorder Element 2 -file StFrPZL1el2.out -time forces recorder Element 3 -file StFrPZL1el3.out -time forces recorder Element 4 -file StFrPZL1el4.out -time forces recorder Element 5 -file StFrPZL1el5.out -time forces recorder Element 6 -file StFrPZL1el6.out -time forces recorder Element 7 -file StFrPZL1el7.out -time forces recorder Element 8 -file StFrPZL1el8.out -time forces # Record beam & column forces recorder Element 9 -file StFrPZL1el9.out -time forces recorder Element 10 -file StFrPZL1el10.out -time forces recorder Element 11 -file StFrPZL1el11.out -time forces recorder Element 12 -file StFrPZL1el12.out -time forces recorder Element 13 -file StFrPZL1el13.out -time forces recorder Element 14 -file StFrPZL1el14.out -time forces recorder Element 15 -file StFrPZL1el15.out -time forces recorder Element 16 -file StFrPZL1el16.out -time forces recorder Element 17 -file StFrPZL1el17.out -time forces recorder Element 18 -file StFrPZL1el18.out -time forces # Source in some commands to display the model if {$displayMode == "displayON"} { source StFramePZLdisplay.tcl } integrator LoadControl 1 3 0.2 1 test EnergyIncr 1.0e-6 10 1 algorithm Newton numberer Plain constraints Transformation 1.0 system SparseGeneral analysis Static # Perform the pushover analysis analyze 30 # Switch to displacement control integrator DisplacementControl 4 1 .001 3 .001 1.0 # Continue the pushover analysis analyze 20

Page 103: Open Sees Examples Primer

Chapter 11 错误!未定义样式。 103

# Get the roof displacement print node 2 3 4 5

SteelFrame2.tcl # Steel two story, two bay frame # Static pushover analysis with hinged

element # Fiber hinge # Units: kip, in # # # @__________@_@__________@ _ # | | | # | | | 54" # | | | # |@__________@|@__________@| _ # | | | # | | | # | | | 54" # | | | _ # === === === # | 108" | 108" | # comment out one of lines if wish to see graphics or not #set displayMode "displayON" set displayMode "displayOFF" model BasicBuilder -ndm 2 -ndf 3 # tag X Y node 1 0 0 node 2 0 54 node 3 0 108 node 4 108 0 node 5 108 54 node 6 108 108 node 7 216 0 node 8 216 54 node 9 216 108 # node DX DY RZ fix 1 1 1 1 fix 4 1 1 1 fix 7 1 1 1 # Define beam and column property variables set E 29000.0 set fy 60.0 # tag E fy Hiso Hkin uniaxialMaterial Hardening 1 $E $fy 0 1000

Page 104: Open Sees Examples Primer

Chapter 11 错误!未定义样式。 104

# Columns W6x12: set Acol 3.55 set Icol 22.1 # Beams S4x7.7: set Agir 2.26 set Igir 6.08 source Wsection.tcl # Beam hinge section ... S4x7.7 # tag matID d tw bf tf nfdw nftw nfbf nftf Wsection 1 1 4.00 0.193 2.663 0.293 10 1 1 2 # Coordinate transformation geomTransf Linear 1 # tag ndI ndJ A E I transfTag element elasticBeamColumn 9 1 2 $Acol $E $Icol 1 element elasticBeamColumn 10 2 3 $Acol $E $Icol 1 element elasticBeamColumn 11 4 5 $Acol $E $Icol 1 element elasticBeamColumn 12 5 6 $Acol $E $Icol 1 element elasticBeamColumn 13 7 8 $Acol $E $Icol 1 element elasticBeamColumn 14 8 9 $Acol $E $Icol 1 # tag ndI ndJ secI lenI secJ lenJ E A I transfTag element beamWithHinges 15 2 5 1 0.1 1 0.1 $E $Agir $Igir 1 element beamWithHinges 16 3 6 1 0.1 1 0.1 $E $Agir $Igir 1 element beamWithHinges 17 5 8 1 0.1 1 0.1 $E $Agir $Igir 1 element beamWithHinges 18 6 9 1 0.1 1 0.1 $E $Agir $Igir 1 # Constant gravity loads pattern Plain 1 Constant { # node FX FY MZ load 2 0.0 -1.0 0.0 load 5 0.0 -4.0 0.0 load 8 0.0 -1.0 0.0 load 3 0.0 -2.0 0.0 load 6 0.0 -6.0 0.0 load 9 0.0 -2.0 0.0 } # Lateral load set H 0.2 pattern Plain 2 Linear { # node FX FY MZ load 2 $H 0.0 0.0 load 3 $H 0.0 0.0 } # Record displacements at 1st floor and roof recorder Node StFrPZL3.out disp -time -node 2 3 5 6 -dof 1 # Record section forces recorder Element 15 -file StFrPZL3el1.out -time section 1 force recorder Element 15 -file StFrPZL3el2.out -time section 2 force recorder Element 16 -file StFrPZL3el3.out -time section 1 force recorder Element 16 -file StFrPZL3el4.out -time section 2 force recorder Element 17 -file StFrPZL3el5.out -time section 1 force

Page 105: Open Sees Examples Primer

Chapter 11 错误!未定义样式。 105

recorder Element 17 -file StFrPZL3el6.out -time section 2 force recorder Element 18 -file StFrPZL3el7.out -time section 1 force recorder Element 18 -file StFrPZL3el8.out -time section 2 force # Record beam & column forces recorder Element 9 -file StFrPZL3el9.out -time forces recorder Element 10 -file StFrPZL3el10.out -time forces recorder Element 11 -file StFrPZL3el11.out -time forces recorder Element 12 -file StFrPZL3el12.out -time forces recorder Element 13 -file StFrPZL3el13.out -time forces recorder Element 14 -file StFrPZL3el14.out -time forces recorder Element 15 -file StFrPZL3el15.out -time forces recorder Element 16 -file StFrPZL3el16.out -time forces recorder Element 17 -file StFrPZL3el17.out -time forces recorder Element 18 -file StFrPZL3el18.out -time forces # Source in some commands to display the model if {$displayMode == "displayON"} { source StFramePZLdisplay.tcl } integrator LoadControl 1 3 0.2 1 test EnergyIncr 1.0e-6 10 1 algorithm Newton numberer Plain constraints Plain system SparseGeneral analysis Static # Perform the pushover analysis analyze 20 # Switch to displacement control integrator DisplacementControl 3 1 .001 3 .001 1.0 # Continue the pushover analysis #analyze 20 # Get the roof displacement print node 2 3 5 6

SteelFrame3.tcl # Steel two story, two bay frame # Static pushover analysis with hinged

element # Fiber hinge # Units: kip, in # # # @__________@_@__________@ _ # | | | # | | | 54" # | | | # |@__________@|@__________@| _

Page 106: Open Sees Examples Primer

Chapter 11 错误!未定义样式。 106

# | | | # | | | # | | | 54" # | | | _ # === === === # | 108" | 108" | # comment out one of lines if wish to see graphics or not #set displayMode "displayON" set displayMode "displayOFF" model BasicBuilder -ndm 2 -ndf 3 # tag X Y node 1 0 0 node 2 0 54 node 3 0 108 node 4 108 0 node 5 108 54 node 6 108 108 node 7 216 0 node 8 216 54 node 9 216 108 # node DX DY RZ fix 1 1 1 1 fix 4 1 1 1 fix 7 1 1 1 # Define beam and column property variables set E 29000.0 set fy 60.0 # tag E fy Hiso Hkin uniaxialMaterial Hardening 1 $E $fy 0 1000 # Columns W6x12: set Acol 3.55 set Icol 22.1 # Beams S4x7.7: set Agir 2.26 set Igir 6.08 source Wsection.tcl # Beam hinge section ... S4x7.7 # tag matID d tw bf tf nfdw nftw nfbf nftf Wsection 1 1 4.00 0.193 2.663 0.293 10 1 1 2 # Coordinate transformation geomTransf Linear 1 # tag ndI ndJ A E I transfTag element elasticBeamColumn 9 1 2 $Acol $E $Icol 1 element elasticBeamColumn 10 2 3 $Acol $E $Icol 1 element elasticBeamColumn 11 4 5 $Acol $E $Icol 1 element elasticBeamColumn 12 5 6 $Acol $E $Icol 1 element elasticBeamColumn 13 7 8 $Acol $E $Icol 1 element elasticBeamColumn 14 8 9 $Acol $E $Icol 1

Page 107: Open Sees Examples Primer

Chapter 11 错误!未定义样式。 107

# tag ndI ndJ secI lenI secJ lenJ E A I transfTag element beamWithHinges 15 2 5 1 0.1 1 0.1 $E $Agir $Igir 1 element beamWithHinges 16 3 6 1 0.1 1 0.1 $E $Agir $Igir 1 element beamWithHinges 17 5 8 1 0.1 1 0.1 $E $Agir $Igir 1 element beamWithHinges 18 6 9 1 0.1 1 0.1 $E $Agir $Igir 1 # Constant gravity loads pattern Plain 1 Constant { # node FX FY MZ load 2 0.0 -1.0 0.0 load 5 0.0 -4.0 0.0 load 8 0.0 -1.0 0.0 load 3 0.0 -2.0 0.0 load 6 0.0 -6.0 0.0 load 9 0.0 -2.0 0.0 } # Lateral load set H 0.2 pattern Plain 2 Linear { # node FX FY MZ load 2 $H 0.0 0.0 load 3 $H 0.0 0.0 } # Record displacements at 1st floor and roof recorder Node StFrPZL3.out disp -time -node 2 3 5 6 -dof 1 # Record section forces recorder Element 15 -file StFrPZL3el1.out -time section 1 force recorder Element 15 -file StFrPZL3el2.out -time section 2 force recorder Element 16 -file StFrPZL3el3.out -time section 1 force recorder Element 16 -file StFrPZL3el4.out -time section 2 force recorder Element 17 -file StFrPZL3el5.out -time section 1 force recorder Element 17 -file StFrPZL3el6.out -time section 2 force recorder Element 18 -file StFrPZL3el7.out -time section 1 force recorder Element 18 -file StFrPZL3el8.out -time section 2 force # Record beam & column forces recorder Element 9 -file StFrPZL3el9.out -time forces recorder Element 10 -file StFrPZL3el10.out -time forces recorder Element 11 -file StFrPZL3el11.out -time forces recorder Element 12 -file StFrPZL3el12.out -time forces recorder Element 13 -file StFrPZL3el13.out -time forces recorder Element 14 -file StFrPZL3el14.out -time forces recorder Element 15 -file StFrPZL3el15.out -time forces recorder Element 16 -file StFrPZL3el16.out -time forces recorder Element 17 -file StFrPZL3el17.out -time forces recorder Element 18 -file StFrPZL3el18.out -time forces # Source in some commands to display the model if {$displayMode == "displayON"} { source StFramePZLdisplay.tcl } integrator LoadControl 1 3 0.2 1 test EnergyIncr 1.0e-6 10 1 algorithm Newton

Page 108: Open Sees Examples Primer

Chapter 11 错误!未定义样式。 108

numberer Plain constraints Plain system SparseGeneral analysis Static # Perform the pushover analysis analyze 20 # Switch to displacement control integrator DisplacementControl 3 1 .001 3 .001 1.0 # Continue the pushover analysis #analyze 20 # Get the roof displacement print node 2 3 5 6

Page 109: Open Sees Examples Primer

109

In This Chapter RigidFrame3D.tcl....................................................... 109

RigidFrame3D.tcl # 3-D model of rigid floor diaphragm # Three stories # Elastic RC columns #

Nonlinear RC beams # Non-linear dynamic analysis # Written: MHS # email: [email protected] # Date: 3 Dec 1999 # # Units: kip, in # # NOTE: to RUN this example, run the g3 interpreter and # type the command: source RigidFrame3D.tcl # Define the model builder model BasicBuilder -ndm 3 -ndf 6 # Gravitational constant set g 386.4 # Story height set h 144 # Width in Y direction set by 240 # Width in X direction set bx 240 # Dead Load (ksi) set dl [expr 0.3/144] # Live Load (ksi) set ll [expr 0.2/144] # Define nodes # X Y Z node 1 [expr -$by/2] [expr $bx/2] 0 node 2 [expr $by/2] [expr $bx/2] 0 node 3 [expr $by/2] [expr -$bx/2] 0 node 4 [expr -$by/2] [expr -$bx/2] 0

C H A P T E R 1 2

Rigid Floor Diaphragm Example

Page 110: Open Sees Examples Primer

Chapter 12 错误!未定义样式。 110

node 5 [expr -$by/2] [expr $bx/2] $h node 6 [expr $by/2] [expr $bx/2] $h node 7 [expr $by/2] [expr -$bx/2] $h node 8 [expr -$by/2] [expr -$bx/2] $h node 10 [expr -$by/2] [expr $bx/2] [expr 2*$h] node 11 [expr $by/2] [expr $bx/2] [expr 2*$h] node 12 [expr $by/2] [expr -$bx/2] [expr 2*$h] node 13 [expr -$by/2] [expr -$bx/2] [expr 2*$h] node 15 [expr -$by/2] [expr $bx/2] [expr 3*$h] node 16 [expr $by/2] [expr $bx/2] [expr 3*$h] node 17 [expr $by/2] [expr -$bx/2] [expr 3*$h] node 18 [expr -$by/2] [expr -$bx/2] [expr 3*$h] # Set base constraints # DX DY DZ RX RY RZ fix 1 1 1 1 1 1 1 fix 2 1 1 1 1 1 1 fix 3 1 1 1 1 1 1 fix 4 1 1 1 1 1 1 # Mass lumped at master node set m [expr ($dl+$ll)*$bx*$by/$g] # Rotary inertia of floor about master node set i [expr $m*($bx^2+$by^2)/12.0] # Master nodes for rigid diaphragm node 9 0 0 $h -mass $m $m 0 0 0 $i node 14 0 0 [expr 2*$h] -mass $m $m 0 0 0 $i node 19 0 0 [expr 3*$h] -mass $m $m 0 0 0 $i # Define rigid diaphragm constraints # normalDir master slaves rigidDiaphragm 3 9 5 6 7 8 rigidDiaphragm 3 14 10 11 12 13 rigidDiaphragm 3 19 15 16 17 18 # Constraints for rigid diaphragm master nodes fix 9 0 0 1 1 1 0 fix 14 0 0 1 1 1 0 fix 19 0 0 1 1 1 0 # Define materials # Core concrete # tag -f'c -epsc0 -f'cu -epscu uniaxialMaterial Concrete01 1 -5.0 -0.005 -3.5 -0.02 # Cover concrete uniaxialMaterial Concrete01 2 -4.0 -0.002 0.0 -0.006 # Steel model # tag fy E b uniaxialMaterial Steel01 3 60 30000 0.02 # Torsional stiffness set G 2000

Page 111: Open Sees Examples Primer

Chapter 12 错误!未定义样式。 111

# Column polar moment of inertia set Jcol 5000 # Column cross-sectional area set Acol 576 # Column moment of inertia set Icol 28000 # Elastic modulus of concrete set E 4000 # Geometric transformation # tag vecxz geomTransf Linear 1 1 0 0 # Define elements # COLUMNS # tag ndI ndJ A E G Jx Iy Iz transf element elasticBeamColumn 1 1 5 $Acol $E $G $Jcol $Icol $Icol 1 element elasticBeamColumn 2 2 6 $Acol $E $G $Jcol $Icol $Icol 1 element elasticBeamColumn 3 3 7 $Acol $E $G $Jcol $Icol $Icol 1 element elasticBeamColumn 4 4 8 $Acol $E $G $Jcol $Icol $Icol 1 element elasticBeamColumn 5 5 10 $Acol $E $G $Jcol $Icol $Icol 1 element elasticBeamColumn 6 6 11 $Acol $E $G $Jcol $Icol $Icol 1 element elasticBeamColumn 7 7 12 $Acol $E $G $Jcol $Icol $Icol 1 element elasticBeamColumn 8 8 13 $Acol $E $G $Jcol $Icol $Icol 1 element elasticBeamColumn 9 10 15 $Acol $E $G $Jcol $Icol $Icol 1 element elasticBeamColumn 10 11 16 $Acol $E $G $Jcol $Icol $Icol 1 element elasticBeamColumn 11 12 17 $Acol $E $G $Jcol $Icol $Icol 1 element elasticBeamColumn 12 13 18 $Acol $E $G $Jcol $Icol $Icol 1 # Number of Lobatto integration points set np 4 # Beam polar moment of inertia set Jbeam 4000 # Torsional stiffness set GJ [expr $G*$Jbeam] # Source in the procedure definition for generating an RC section source RCsection.tcl # Call the procedure to generate a column section # id h b cover core cover steel nBars barArea nfCoreY nfCoreZ nfCoverY nfCoverZ RCsection 1 18 15 2.5 1 2 3 3 0.79 8 8 10 10 # Linear elastic torion uniaxialMaterial Elastic 10 $GJ # Attach torsion to the RC section # tag uniTag uniCode secTag section Aggregator 2 10 T -section 1 # Geometric transformation # tag vecxz geomTransf Linear 2 0 0 1

Page 112: Open Sees Examples Primer

Chapter 12 错误!未定义样式。 112

# BEAMS # tag ndI ndJ nPts secID transf element nonlinearBeamColumn 13 5 6 $np 2 2 element nonlinearBeamColumn 14 6 7 $np 2 2 element nonlinearBeamColumn 15 7 8 $np 2 2 element nonlinearBeamColumn 16 8 5 $np 2 2 element nonlinearBeamColumn 17 10 11 $np 2 2 element nonlinearBeamColumn 18 11 12 $np 2 2 element nonlinearBeamColumn 19 12 13 $np 2 2 element nonlinearBeamColumn 20 13 10 $np 2 2 element nonlinearBeamColumn 21 15 16 $np 2 2 element nonlinearBeamColumn 22 16 17 $np 2 2 element nonlinearBeamColumn 23 17 18 $np 2 2 element nonlinearBeamColumn 24 18 15 $np 2 2 # Gravity load applied at each corner node set p [expr -$m*$g/4] # Define gravity loads pattern Plain 1 Linear { load 5 0.0 0.0 $p 0.0 0.0 0.0 -const load 6 0.0 0.0 $p 0.0 0.0 0.0 -const load 7 0.0 0.0 $p 0.0 0.0 0.0 -const load 8 0.0 0.0 $p 0.0 0.0 0.0 -const load 10 0.0 0.0 $p 0.0 0.0 0.0 -const load 11 0.0 0.0 $p 0.0 0.0 0.0 -const load 12 0.0 0.0 $p 0.0 0.0 0.0 -const load 13 0.0 0.0 $p 0.0 0.0 0.0 -const load 15 0.0 0.0 $p 0.0 0.0 0.0 -const load 16 0.0 0.0 $p 0.0 0.0 0.0 -const load 17 0.0 0.0 $p 0.0 0.0 0.0 -const load 18 0.0 0.0 $p 0.0 0.0 0.0 -const } set accelSeries "Path -filePath tabasFN.txt -dt 0.02 -factor $g" # Define the ground motion excitation using Tabas fault parallel and fault normal records # tag dir accel series args pattern UniformExcitation 2 1 -accel $accelSeries pattern UniformExcitation 3 2 -accel $accelSeries # Record DOF 1 and 2 displacements at nodes 9, 14, and 19 recorder Node RigidFrame3D.out disp -time -node 9 14 19 -dof 1 2 # Source in commands to display the structure source RigidFrame3Ddisplay.tcl # Convergence test # tol maxIter printFlag test EnergyIncr 1.0e-8 20 1 # Solution algorithm algorithm Newton # System of equations solver

Page 113: Open Sees Examples Primer

Chapter 12 错误!未定义样式。 113

system SparseGeneral -piv # Transient integrator # gamma beta integrator Newmark 0.5 0.25 # DOF numberer numberer RCM # Constraint handler # aSP aMP #constraints Lagrange 1.0e6 1.0e6 constraints Transformation # Transient analysis # dt T analysis Transient # Perform the analysis analyze 1000 0.01

Page 114: Open Sees Examples Primer

114

In This Chapter ZeroLength1.tcl ......................................................... 114 ZeroLength2.tcl ......................................................... 115 ZeroLength3.tcl ......................................................... 116 ZeroLength4.tcl ......................................................... 117 ZeroLength5.tcl ......................................................... 118

ZeroLength1.tcl # Translational spring # Static analysis

# # Written: MHS # Date: Feb 2000 # Units: kip, in # Define the model builder model BasicBuilder -ndm 2 -ndf 3 # Set some variables set L 120 set A 20 set E 30000 set I 1400 # Define nodes node 1 0.0 0.0 node 2 0.0 0.0 node 3 $L 0.0 # Define single point constraints fix 1 1 1 1 fix 3 1 1 1 # ndR ndC dofs equalDOF 1 2 1 3 # Define force-deformation relationship for spring uniaxialMaterial ElasticPP 2 1050 0.02 uniaxialMaterial Elastic 3 -50 uniaxialMaterial Parallel 1 2 3 # id ndI ndJ mat dir element zeroLength 1 1 2 -mat 1 -dir 2

C H A P T E R 1 3

Zero Length Element Examples

Page 115: Open Sees Examples Primer

Chapter 13 错误!未定义样式。 115

# Geometric transformation geomTransf Linear 1 # id ndI ndJ A E I transf element elasticBeamColumn 2 2 3 $A $E $I 1 pattern Plain 1 Linear { load 2 0.0 10.0 0.0 } recorder Node ZeroLength1.out disp -time -node 2 -dof 2 integrator LoadControl 1 1 1 1 test EnergyIncr 1.0e-6 10 1 algorithm Newton numberer Plain constraints Transformation 1.0 system SparseGeneral -piv analysis Static analyze 5

ZeroLength2.tcl # Translational spring at 45 degree angle # Static analysis

# # Written: MHS # Date: Feb 2000 # Units: kip, in # Define the model builder model BasicBuilder -ndm 2 -ndf 3 # Set some variables set L 120 set A 20 set E 30000 set I 1400 # Define nodes node 1 0.0 0.0 node 2 0.0 0.0 node 3 $L 0.0 # Define single point constraints fix 1 1 1 1 fix 3 1 1 1 # ndR ndC dof equalDOF 1 2 3 # Define force-deformation relationship for spring uniaxialMaterial ElasticPP 2 1050 0.02

Page 116: Open Sees Examples Primer

Chapter 13 错误!未定义样式。 116

uniaxialMaterial Elastic 3 -50 uniaxialMaterial Parallel 1 2 3 # id ndI ndJ mat dir x y' element zeroLength 1 1 2 -mat 1 -dir 1 -orient 1 1 0 -1 1 0 # Geometric transformation geomTransf Linear 1 # id ndI ndJ A E I transf element elasticBeamColumn 2 2 3 $A $E $I 1 pattern Plain 1 Linear { load 2 0.0 10.0 0.0 } recorder Node ZeroLength2.out disp -time -node 2 -dof 2 integrator LoadControl 1 1 1 1 test EnergyIncr 1.0e-6 10 1 algorithm Newton numberer Plain constraints Transformation 1.0 system SparseGeneral analysis Static analyze 5

ZeroLength3.tcl # Rotational spring # Static analysis

# # Written: MHS # Date: Feb 2000 # Units: kip, in # Define the model builder model BasicBuilder -ndm 2 -ndf 3 # Set some variables set L 120 set A 20 set E 30000 set I 1400 # Define nodes node 1 0.0 0.0 node 2 0.0 0.0 node 3 $L 0.0 # Define single point constraints fix 1 1 1 1 fix 3 1 1 1

Page 117: Open Sees Examples Primer

Chapter 13 错误!未定义样式。 117

# Define moment-rotation relationship for spring uniaxialMaterial ElasticPP 2 5100000 0.0005 uniaxialMaterial Elastic 3 -100000 uniaxialMaterial Parallel 1 2 3 source rotSpring2D.tcl # id ndR ndC matID rotSpring2D 1 1 2 1 # Geometric transformation geomTransf Linear 1 # id ndI ndJ A E I transf element elasticBeamColumn 2 2 3 $A $E $I 1 pattern Plain 1 Linear { load 2 0.0 0.0 1000.0 } recorder Node ZeroLength3.out disp -time -node 2 -dof 3 integrator LoadControl 1 1 1 1 test EnergyIncr 1.0e-6 10 1 algorithm Newton numberer Plain constraints Transformation 1.0 system SparseGeneral analysis Static analyze 5

ZeroLength4.tcl # Two translational springs # Transient EQ analysis

# # Written: MHS # Date: Feb 2000 # Units: kip, in # Define the model builder model BasicBuilder -ndm 2 -ndf 3 set g 386.4 # Set some variables set L 120 set A 20 set E 30000 set I 1400 set M 0.02588 # Define nodes node 1 0.0 0.0

Page 118: Open Sees Examples Primer

Chapter 13 错误!未定义样式。 118

node 2 0.0 0.0 -mass $M $M 0 node 3 $L 0.0 # Define single point constraints fix 1 1 1 1 fix 3 1 1 1 # Define force-deformation relationship for spring uniaxialMaterial ElasticPP 3 1050 0.02 uniaxialMaterial Elastic 4 -50 uniaxialMaterial Parallel 1 3 4 # id ndI ndJ mats dirs element zeroLength 1 1 2 -mat 1 1 -dir 1 2 # Geometric transformation geomTransf Linear 1 # id ndI ndJ A E I transf element elasticBeamColumn 2 2 3 $A $E $I 1 # tag dir factor fileName deltaT pattern UniformExcitation 1 1 $g -accel tabasFN.txt 0.02 pattern UniformExcitation 2 2 $g -accel tabasFP.txt 0.02 recorder Node ZeroLength4.out disp -time -node 2 -dof 1 2 integrator Newmark 0.5 0.25 test EnergyIncr 1.0e-6 10 1 algorithm Newton numberer Plain constraints Transformation 1.0 system SparseGeneral analysis Transient analyze 1500 0.02

ZeroLength5.tcl # CE 221 Spring 1999 Midterm Problem #1

# # Written: MHS # Date: Jan 2000 # # |A B # |@--------@------------ # | 4 6 ^ # Define the model builder model BasicBuilder -ndm 2 -ndf 3 # Define nodes node 1 0.0 0.0 node 2 0.0 0.0

Page 119: Open Sees Examples Primer

Chapter 13 错误!未定义样式。 119

node 3 4.0 0.0 node 4 4.0 0.0 node 5 10.0 0.0 # Define single point constraints fix 1 1 1 1 fix 5 1 1 0 # Define moment-rotation relationship for spring A uniaxialMaterial ElasticPP 1 10 0.8 # Define moment-rotation relationship for spring B uniaxialMaterial ElasticPP 3 6 1.0 uniaxialMaterial Elastic 4 4 uniaxialMaterial Parallel 2 3 4 # Geometric transformation geomTransf Linear 1 # Define beam elements element elasticBeamColumn 3 2 3 100 1000 1000 1 element elasticBeamColumn 4 4 5 100 1000 1000 1 source rotSpring2D.tcl # eleID nodeR nodeC matID rotSpring2D 1 1 2 1 rotSpring2D 2 3 4 2 pattern Plain 1 Linear { load 3 0.0 10.0 0.0 } integrator LoadControl 1 1 1 1 test NormDispIncr 1.0e-6 10 1 algorithm Newton numberer Plain constraints Transformation 1.0 system SparseGeneral analysis Static analyze 1

Page 120: Open Sees Examples Primer

120

In This Chapter Example2.1.tcl........................................................... 120

Example2.1.tcl # Example of Section Analysis

# 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 paramaters 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]

C H A P T E R 1 4

Section Analysis Example

Page 121: Open Sees Examples Primer

Chapter 14 错误!未定义样式。 121

# 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 Copyright Contact Us

Page 122: Open Sees Examples Primer

122

C H A P T E R 1 5

Quad Examples

Page 123: Open Sees Examples Primer

123

In This Chapter solid01.tcl .................................................................. 123

solid01.tcl # tcl version of main_T3Dep_1_dy.cpp # for solid models, 8 node brick

# [email protected] # [email protected] # 23jan2001 # ################################ # create the modelbuilder # ################################# model BasicBuilder -ndm 3 -ndf 3 set displayMode "displayON" #set displayMode "displayOFF" set g 9.81 # ################################ # build the model # ################################# node 1 1.0 1.0 0.0 node 2 0.0 1.0 0.0 node 3 0.0 0.0 0.0 node 4 1.0 0.0 0.0 node 5 1.0 1.0 1.0 node 6 0.0 1.0 1.0 node 7 0.0 0.0 1.0 node 8 1.0 0.0 1.0 fix 1 1 1 1 fix 2 1 1 1 fix 3 1 1 1 fix 4 1 1 1 fix 5 1 0 1 fix 6 1 0 1 fix 7 1 0 1 fix 8 1 0 1 equalDOF 5 8 2 equalDOF 6 7 2 # elastic material

C H A P T E R 1 6

Brick Examples

Page 124: Open Sees Examples Primer

Chapter 16 错误!未定义样式。 124

nDMaterial ElasticIsotropic3D 1 70000 0.3 # the template material of yours #sset YS {DruckerPrager } #set PS {DruckerPrager 0.05} # #set startstress {50 0.001 0.0} #set otherstress {0 0 0} #set scalars {0.05 0 0.85} #set tensors {0.0 0.0 0.0} #set NOS 3 #set NOT 3 #set EPS {3000.0 3000.0 0.3 1.8 $startstress $otherstrain $otherstrain # $otherstrain $otherstrain $NOS $scalars $NOT $tensors} # #nDMaterial Template 1 -YS $YS -PS $PS -EPS $EPS ...... # tag 8 nodes matID bforce1 bforce2 bforce3 massDensity element brick 1 5 6 7 8 1 2 3 4 1 0.0 0.0 -9.81 1.8 set Series "Path -filePath tabasFN.txt -dt 0.02 -factor $g" pattern UniformExcitation 1 2 -accel $Series # create the recorder #recorder Node Node.out disp -time -node 1 2 3 4 5 6 7 8 -dof 1 2 3 recorder Node node.out disp -time -node 5 -dof 1 2 3 recorder plot node.out HelloJoey 10 10 300 300 -columns 2 1 recorder plot node.out HelloJoey 10 10 300 300 -columns 3 1 # ################################ # create the analysis # ################################# integrator Newmark 0.5 0.25 numberer Plain #constraints Plain constraints Penalty 1e12 1e12 #constraints Transformation test NormDispIncr 1.0e-12 10 0 #constraints Lagrange 1.0 1.0 #test NormDispIncr 1.0e-10 10 1 algorithm Newton numberer RCM system UmfPack analysis Transient # ################################ # perform the analysis # ################################# analyze 1000 0.02

Page 125: Open Sees Examples Primer

125

Are found elsewhere (see http://www.ce.berkeley.edu/~haukaas/OpenSees-Reliability/opensees-reliability.html").

C H A P T E R 1 7

Reliability Examples

Page 126: Open Sees Examples Primer

126

A library of Tcl Procedures is included in this chapter. The user sould modify the procedures to meet the needs of the analysis.

In This Chapter genPlaneFrame.tcl .................................................... 126 matTest.tcl................................................................. 128 MomentCurvature.tcl ................................................. 130 RCcircSection.tcl ....................................................... 131 RCcircSectionFEDEAS.tcl......................................... 133 RCFrameDisplay.tcl .................................................. 135 RCsection.tcl ............................................................. 135 RCsectionFEDEAS.tcl............................................... 138 ReadSMDFile.tcl ....................................................... 142 RotSpring2D.............................................................. 144 StFramePZLdisplay.tcl .............................................. 145 Wsection.tcl ............................................................... 145 RigidFrame3Ddisplay.tcl ........................................... 146

genPlaneFrame.tcl # Define a procedure which will generate nodes and elements for a plane

frame having absolute column line locations in the list #'columnLine', absolute girder line locations in the list 'girderLine',

# section IDs for the columns and girders, 'columnID' and 'girderID', and

# 'nIntPt' integration points along every member.

#

# Notes: automatically fixes the base nodes

# only geneartes nonlinearBeamColumn elements

# allows columns and girders to be spaced arbitrarily

# does not add nodal masses or loads, but can be extended to do so

# starts node numbering at 1

#

# Formal arguments

# columnLine - a list of column line locations

C H A P T E R 1 8

Script Utilities Library

Page 127: Open Sees Examples Primer

Chapter 18 错误!未定义样式。 127

# The actual argument would be defined as so, set columns {0 120 240 360}

# girderLine - a list of grider line locations

# The actual argument would be defined as so, set girders {180 300 420}

# columnID - an integer representing the section ID (tag) for the columns in the frame

# girderID - an integer representing the section ID (tag) for the girders in the frame

# nIntPt - an integer representing the number of integration points along each member in the frame

proc genPlaneFrame {columnLine girderLine columnID girderID nIntPt} {

set n 1; # Node number counter

geomTransf Linear 1; # Geometric transformation for all elements

# For each column line

foreach xLoc $columnLine {

node $n $xLoc 0

# Fix the base node

fix $n 1 1 1

incr n 1

# For each girder line

foreach yLoc $girderLine {

node $n $xLoc $yLoc

incr n 1

}

}

# Useful variables

set numCol [llength $columnLine]

set numGir [llength $girderLine]

set e 1; # Element number counter

# For each column line

for {set i 1} {$i <= $numCol} {incr i 1} {

# Node number at the base of this column line

set bottom [expr ($i-1)*$numGir + $i]

# Node number at the top of this column line

set top [expr $i*$numGir + $i]

# Travel up this column line creating elements

for {set j $bottom} {$j <= [expr $top-1]} {incr j 1} {

element nonlinearBeamColumn $e $j [expr $j+1] $nIntPt $columnID 1

incr e 1

Page 128: Open Sees Examples Primer

Chapter 18 错误!未定义样式。 128

}

}

# Difference in node numbers I and J for any girder in the frame

set delta [expr $numGir+1]

# For each girder line

for {set j 1} {$j <= $numGir} {incr j 1} {

# Node number at the left end of this girder line

set left [expr $j+1]

# Node number at the right end of this girder line

set right [expr ($numCol-1)*$numGir + $numCol + $j]

# Travel across this girder line creating elements

for {set k $left} {$k < $right} {incr k $delta} {

element nonlinearBeamColumn $e $k [expr $k+$delta] $nIntPt $columnID 1

incr e 1

}

}

}; #end proc

matTest.tcl A script for testing uniaxial materials with a single DOF truss.

This script requires an additional file (see http://opensees.berkeley.edu/OpenSees/examples/pattern1.txt").

# matTest.tcl: SDOF truss to test uniaxial material models

# Units: kip, in

# MHS, Sept 1999

# email: [email protected]

model BasicBuilder -ndm 1 -ndf 1

# Define nodes

node 1 0.0

node 2 1.0

# Fix node 1

fix 1 1

Page 129: Open Sees Examples Primer

Chapter 18 错误!未定义样式。 129

# Define uniaxialMaterial

# tag f'c epsc f'cu epscu

uniaxialMaterial Concrete01 1 -5.0 -0.002 -1.0 -0.004

# Define truss element with unit area

# tag ndI ndJ A matTag

element truss 1 1 2 1.0 1

set dt 1.0 ;# Increment between data points

set filename pattern1.txt ;# Filename containing data points

set factor 0.006 ;# Factor applied to data values

# Read displacement pattern from file

# Note, any pattern type can be used here: Linear, Path, Sine, etc.

pattern Plain 1 "Series -dt $dt -filePath $filename -factor $factor" {

# Set reference displacement value

# node dof value

sp 2 1 1.0

}

# Impose monotonic displacements

#pattern Plain 2 "Linear -factor $factor" {

# sp 2 1 1.0

#}

# Record nodal displacements (same as strains since truss length is 1.0)

recorder Node truss.out disp -load -node 2 -dof 1

# Record truss force (same as stress since truss area is 1.0)

recorder Element 1 -time -file force.out force

system UmfPack

constraints Penalty 1.0e12 1.0e12

# Set increment in load factor used for integration

# Does not have to be the same as dt used to read in displacement pattern

set dl $dt

integrator LoadControl $dl 1 $dl $dl

test NormDispIncr 1.0e-6 10

algorithm Newton

numberer RCM

analysis Static

analyze 10000

Page 130: Open Sees Examples Primer

Chapter 18 错误!未定义样式。 130

MomentCurvature.tcl # A procedure for performing section analysis (only does moment-curvature,

but can be easily modified to do any mode of section reponse. # MHS

# October 2000

#

# 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

proc MomentCurvature {secTag axialLoad maxK {numIncr 100} } {

# Define two nodes at (0,0)

node 1 0.0 0.0

node 2 0.0 0.0

# Fix all degrees of freedom except axial and bending

fix 1 1 1 1

fix 2 0 1 0

# Define element

# tag ndI ndJ secTag

element zeroLengthSection 1 1 2 $secTag

# Create recorder

recorder Node section$secTag.out disp -time -node 2 -dof 3

# Define constant axial load

pattern Plain 1 "Constant" {

load 2 $axialLoad 0.0 0.0

}

Page 131: Open Sees Examples Primer

Chapter 18 错误!未定义样式。 131

# Define analysis parameters

integrator LoadControl 0 1 0 0

system SparseGeneral -piv; # Overkill, but may need the pivoting!

test NormUnbalance 1.0e-9 10

numberer Plain

constraints Plain

algorithm Newton

analysis Static

# Do one analysis for constant axial load

analyze 1

# Define reference moment

pattern Plain 2 "Linear" {

load 2 0.0 0.0 1.0

}

# Compute curvature increment

set dK [expr $maxK/$numIncr]

# Use displacement control at node 2 for section analysis

integrator DisplacementControl 2 3 $dK 1 $dK $dK

# Do the section analysis

analyze $numIncr

}

RCcircSection.tcl # Define a procedure which generates a circular reinforced concrete section #

with one layer of steel evenly distributed around the perimeter and a confined core.

# Formal arguments

# id - tag for the section that is generated by this procedure

# ri - inner radius of the section

# ro - overall (outer) radius of the section

# cover - cover thickness

Page 132: Open Sees Examples Primer

Chapter 18 错误!未定义样式。 132

# coreID - material tag for the core patch

# coverID - material tag for the cover patches

# steelID - material tag for the reinforcing steel

# numBars - number of reinforcing bars around the section perimeter

# barArea - cross-sectional area of each reinforcing bar

# nfCoreR - number of radial divisions in the core (number of "rings")

# nfCoreT - number of theta divisions in the core (number of "wedges")

# nfCoverR - number of radial divisions in the cover

# nfCoverT - number of theta divisions in the cover

#

# Notes

# The center of the reinforcing bars are placed at the inner radius

# The core concrete ends at the inner radius (same as reinforcing bars)

# The reinforcing bars are all the same size

# The center of the section is at (0,0) in the local axis system

# Zero degrees is along section y-axis

#

proc RCcircSection {id ri ro cover coreID coverID steelID numBars barArea nfCoreR nfCoreT nfCoverR nfCoverT} {

# Define the fiber section

section fiberSec $id {

# Core radius

set rc [expr $ro-$cover]

# Define the core patch

patch circ $coreID $nfCoreT $nfCoreR 0 0 $ri $rc 0 360

# Define the cover patch

patch circ $coverID $nfCoverT $nfCoverR 0 0 $rc $ro 0 360

if {$numBars <= 0} {

return

}

# Determine angle increment between bars

set theta [expr 360.0/$numBars]

# Define the reinforcing layer

layer circ $steelID $numBars $barArea 0 0 $rc $theta 360

}

}

Page 133: Open Sees Examples Primer

Chapter 18 错误!未定义样式。 133

RCcircSectionFEDEAS.tcl # Define a procedure which generates a circular reinforced concrete section #

with one layer of steel evenly distributed around the perimeter and a confined core.

# Writes section information in FEDEAS format to the TCL file stream fedeas

#

# Formal arguments

# id - tag for the section that is generated by this procedure

# ri - inner radius of the section

# ro - overall (outer) radius of the section

# cover - cover thickness

# coreID - material tag for the core patch

# coverID - material tag for the cover patches

# steelID - material tag for the reinforcing steel

# numBars - number of reinforcing bars around the section perimeter

# barArea - cross-sectional area of each reinforcing bar

# nfCoreR - number of radial divisions in the core (number of "rings")

# nfCoreT - number of theta divisions in the core (number of "wedges")

# nfCoverR - number of radial divisions in the cover

# nfCoverT - number of theta divisions in the cover

# fedeas - file stream to which FEDEAS information is written

# Calling procedure should define a TCL file stream, e.g.

# set fedeas [open fedeas.out w]

#

# Notes

# The center of the reinforcing bars are placed at the inner radius

# The core concrete ends at the inner radius (same as reinforcing bars)

# The reinforcing bars are all the same size

# The center of the section is at (0,0) in the local axis system

# Zero degrees is along section y-axis

# Assumes G3 material tags and FEDEAS material tags are consistent

#

proc RCcircSectionFEDEAS {id ri ro cover coreID coverID steelID numBars barArea nfCoreR nfCoreT nfCoverR nfCoverT fedeas} {

# Define the fiber section

Page 134: Open Sees Examples Primer

Chapter 18 错误!未定义样式。 134

section fiberSec $id {

puts $fedeas fsection; # FEDEAS fsection command

puts $fedeas $id; # fsection id

puts $fedeas 2,0; # 2 patches, reference axis is geometric centroid

# Core radius

set rc [expr $ro-$cover]

# Define the core patch

patch circ $coreID $nfCoreT $nfCoreR 0 0 $ri $rc 0 360

puts $fedeas $coreID,2,$nfCoreR,$nfCoreT,1,1; # matID,circular,nfRad,nfAng,propIJ,propJK

puts $fedeas 0,0; # (y,z) center of patch

puts $fedeas $ri,$rc; # R1,R2

puts $fedeas 0,360; # theta1,theta2

puts $fedeas 0,0; # NOT USED

# Define the cover patch

patch circ $coverID $nfCoverT $nfCoverR 0 0 $rc $ro 0 360

puts $fedeas $coverID,2,$nfCoverR,$nfCoverT,1,1

puts $fedeas 0,0

puts $fedeas $rc,$ro

puts $fedeas 0,360

puts $fedeas 0,0

if {$numBars <= 0} {

puts $fedeas 0

puts $fedeas ""

return

}

# Determine angle increment between bars

set theta [expr 360.0/$numBars]

puts $fedeas 1; # Number of layers

# Define the reinforcing layer

layer circ $steelID $numBars $barArea 0 0 $rc $theta 360

puts $fedeas $steelID,2,$numBars,,$barArea; # matID,circular,numBars,<barSize>,barArea

puts $fedeas 0,0; # (y,z) center of arc

puts $fedeas $rc; # RL

puts $fedeas $theta,360; # theta1,theta2

puts $fedeas ""

}

}

Page 135: Open Sees Examples Primer

Chapter 18 错误!未定义样式。 135

RCFrameDisplay.tcl # a window showing the displaced shape

recorder display g3 10 10 300 300 -wipe

# next three commmands define viewing system, all values in global coords

vrp 288.0 150.0 0 # point on the view plane in global coord, center of local viewing system

vup 0 1 0 # dirn defining up direction of view plane

vpn 0 0 1 # direction of outward normal to view plane

# next three commands define view, all values in local coord system

prp 0 0 100 # eye location in local coord sys defined by viewing system

viewWindow -400 400 -400 400 # view bounds uMin, uMax, vMin, vMax in local coords

plane 0 150 # distance to front and back clipping planes from eye

projection 0 # projection mode

port -1 1 -1 1 # area of window that will be drawn into

fill 1 # fill mode

display 1 0 10

RCsection.tcl # Define a procedure which generates a rectangular reinforced concrete

section with one layer of steel evenly distributed around the perimeter and a confined core.

# y

# |

# |

# |

# ---------------------

# |\ /|

# | \---------------/ |

# | | | |

# | | | |

# z ---------| | | | h

Page 136: Open Sees Examples Primer

Chapter 18 错误!未定义样式。 136

# | | | |

# | | | |

# | /---------------\ |

# |/ \|

# ---------------------

# b

#

# Formal arguments

# id - tag for the section that is generated by this procedure

# h - overall height of the section (see above)

# b - overall width of the section (see above)

# cover - thickness of the cover patches

# coreID - material tag for the core patch

# coverID - material tag for the cover patches

# steelID - material tag for the reinforcing steel

# numBars - number of reinforcing bars on any given side of the section

# barArea - cross-sectional area of each reinforcing bar

# nfCoreY - number of fibers in the core patch in the y direction

# nfCoreZ - number of fibers in the core patch in the z direction

# nfCoverY - number of fibers in the cover patches with long sides in the y direction

# nfCoverZ - number of fibers in the cover patches with long sides in the z direction

#

# Notes

# The thickness of cover concrete is constant on all sides of the core.

# The number of bars is the same on any given side of the section.

# The reinforcing bars are all the same size.

# The number of fibers in the short direction of the cover patches is set to 1.

#

proc RCsection {id h b cover coreID coverID steelID numBars barArea nfCoreY nfCoreZ nfCoverY nfCoverZ} {

# The distance from the section z-axis to the edge of the cover concrete

# in the positive y direction

set coverY [expr $h/2.0]

# The distance from the section y-axis to the edge of the cover concrete

# in the positive z direction

set coverZ [expr $b/2.0]

Page 137: Open Sees Examples Primer

Chapter 18 错误!未定义样式。 137

# The negative values of the two above

set ncoverY [expr -$coverY]

set ncoverZ [expr -$coverZ]

# Determine the corresponding values from the respective axes to the

# edge of the core concrete

set coreY [expr $coverY-$cover]

set coreZ [expr $coverZ-$cover]

set ncoreY [expr -$coreY]

set ncoreZ [expr -$coreZ]

# Define the fiber section

section fiberSec $id {

# Define the core patch

patch quadr $coreID $nfCoreZ $nfCoreY $ncoreY $coreZ $ncoreY $ncoreZ $coreY $ncoreZ $coreY $coreZ

# Define the four cover patches

patch quadr $coverID 1 $nfCoverY $ncoverY $coverZ $ncoreY $coreZ $coreY $coreZ $coverY $coverZ

patch quadr $coverID 1 $nfCoverY $ncoreY $ncoreZ $ncoverY $ncoverZ $coverY $ncoverZ $coreY $ncoreZ

patch quadr $coverID $nfCoverZ 1 $ncoverY $coverZ $ncoverY $ncoverZ $ncoreY $ncoreZ $ncoreY $coreZ

patch quadr $coverID $nfCoverZ 1 $coreY $coreZ $coreY $ncoreZ $coverY $ncoverZ $coverY $coverZ

# Define the steel along constant values of y (in the z direction)

layer straight $steelID $numBars $barArea $ncoreY $coreZ $ncoreY $ncoreZ

layer straight $steelID $numBars $barArea $coreY $coreZ $coreY $ncoreZ

# Determine the spacing for the remaining bars in the y direction

set spacingY [expr ($coreY-$ncoreY)/($numBars-1)]

# Avoid double counting bars

set numBars [expr $numBars-2]

# Define remaining steel in the y direction

layer straight $steelID $numBars $barArea [expr $coreY-$spacingY] $coreZ [expr $ncoreY+$spacingY] $coreZ

layer straight $steelID $numBars $barArea [expr $coreY-$spacingY] $ncoreZ [expr $ncoreY+$spacingY] $ncoreZ

}

Page 138: Open Sees Examples Primer

Chapter 18 错误!未定义样式。 138

}

RCsectionFEDEAS.tcl # Define a procedure which generates a rectangular reinforced concrete

section # with one layer of steel evenly distributed around the perimeter and a confined core.

# Writes section information in FEDEAS format to the TCL file stream fedeas

#

# y

# |

# |

# |

# L --------------------- K

# |\ /|

# | \---------------/ |

# | | | |

# | | | |

# z ---------| | | | h

# | | | |

# | | | |

# | /---------------\ |

# |/ \|

# I --------------------- J

# b

#

# Formal arguments

# id - tag for the section that is generated by this procedure

# h - overall height of the section (see above) ... distance from J to K

# b - overall width of the section (see above) ... distance from I to J

# cover - thickness of the cover patches

# coreID - material tag for the core patch

# coverID - material tag for the cover patches

# steelID - material tag for the reinforcing steel

# numBars - number of reinforcing bars on any given side of the section

# barArea - cross-sectional area of each reinforcing bar

# nfCoreY - number of fibers in the core patch in the y direction ... from J to K

Page 139: Open Sees Examples Primer

Chapter 18 错误!未定义样式。 139

# nfCoreZ - number of fibers in the core patch in the z direction ... from I to J

# nfCoverY - number of fibers in the cover patches with long sides in the y direction ... from J to K

# nfCoverZ - number of fibers in the cover patches with long sides in the z direction ... from I to J

# nfCoverS - number of fibers along the short dimension of each cover patch

# fedeas - file stream to which FEDEAS information is written

# Calling procedure should define a TCL file stream, e.g.

# set fedeas [open fedeas.out w]

#

# Notes

# The thickness of cover concrete is constant on all sides of the core.

# The number of bars is the same on any given side of the section.

# The reinforcing bars are all the same size.

# Assumes G3 material tags and FEDEAS material tags are consistent

#

proc RCsectionFEDEAS {id h b cover coreID coverID steelID numBars barArea nfCoreY nfCoreZ nfCoverY nfCoverZ nfCoverS fedeas} {

# The distance from the section z-axis to the edge of the cover concrete

# in the positive y direction

set coverY [expr $h/2.0]

# The distance from the section y-axis to the edge of the cover concrete

# in the positive z direction

set coverZ [expr $b/2.0]

# The negative values of the two above

set ncoverY [expr -$coverY]

set ncoverZ [expr -$coverZ]

# Determine the corresponding values from the respective axes to the

# edge of the core concrete

set coreY [expr $coverY-$cover]

set coreZ [expr $coverZ-$cover]

set ncoreY [expr -$coreY]

set ncoreZ [expr -$coreZ]

# Define the fiber section

section fiberSec $id {

Page 140: Open Sees Examples Primer

Chapter 18 错误!未定义样式。 140

puts $fedeas fsection; # FEDEAS fsection command

puts $fedeas $id; # fsection id

puts $fedeas 5,0; # 5 patches, reference axis is geometric centroid

# Define the core patch

patch quadr $coreID $nfCoreZ $nfCoreY $ncoreY $coreZ $ncoreY $ncoreZ $coreY $ncoreZ $coreY $coreZ

puts $fedeas $coreID,1,$nfCoreZ,$nfCoreY,1,1; # matID,rectangular,nfIJ,nfJK,propIJ,propJK

puts $fedeas $ncoreY,$coreZ; # yI,zI

puts $fedeas $ncoreY,$ncoreZ; # yJ,zJ

puts $fedeas $coreY,$ncoreZ; # yK,zK

puts $fedeas $coreY,$coreZ; # yL,zL

# Define the four cover patches

patch quadr $coverID $nfCoverS $nfCoverY $ncoverY $coverZ $ncoreY $coreZ $coreY $coreZ $coverY $coverZ

puts $fedeas $coverID,1,$nfCoverS,$nfCoverY,1,1

puts $fedeas $ncoverY,$coverZ

puts $fedeas $ncoreY,$coreZ

puts $fedeas $coreY,$coreZ

puts $fedeas $coverY,$coverZ

patch quadr $coverID $nfCoverS $nfCoverY $ncoreY $ncoreZ $ncoverY $ncoverZ $coverY $ncoverZ $coreY $ncoreZ

puts $fedeas $coverID,1,$nfCoverS,$nfCoverY,1,1

puts $fedeas $ncoreY,$ncoreZ

puts $fedeas $ncoverY,$ncoverZ

puts $fedeas $coverY,$ncoverZ

puts $fedeas $coreY,$ncoreZ

patch quadr $coverID $nfCoverZ $nfCoverS $ncoverY $coverZ $ncoverY $ncoverZ $ncoreY $ncoreZ $ncoreY $coreZ

puts $fedeas $coverID,1,$nfCoverZ,$nfCoverS,1,1

puts $fedeas $ncoverY,$coverZ

puts $fedeas $ncoverY,$ncoverZ

puts $fedeas $ncoreY,$ncoreZ

puts $fedeas $ncoreY,$coreZ

Page 141: Open Sees Examples Primer

Chapter 18 错误!未定义样式。 141

patch quadr $coverID $nfCoverZ $nfCoverS $coreY $coreZ $coreY $ncoreZ $coverY $ncoverZ $coverY $coverZ

puts $fedeas $coverID,1,$nfCoverZ,$nfCoverS,1,1

puts $fedeas $coreY,$coreZ

puts $fedeas $coreY,$ncoreZ

puts $fedeas $coverY,$ncoverZ

puts $fedeas $coverY,$coverZ

# Number of reinforcing layers

if {$numBars > 2} {

puts $fedeas 4

} else {

puts $fedeas 2

}

# Define the steel along constant values of y (in the z direction)

layer straight $steelID $numBars $barArea $ncoreY $coreZ $ncoreY $ncoreZ

puts $fedeas $steelID,1,$numBars,,$barArea; # matID,straight,numBars,<barSize>,barArea

puts $fedeas $ncoreY,$coreZ; # y1,z1

puts $fedeas $ncoreY,$ncoreZ; # y2,z2

puts $fedeas ""

layer straight $steelID $numBars $barArea $coreY $coreZ $coreY $ncoreZ

puts $fedeas $steelID,1,$numBars,,$barArea

puts $fedeas $coreY,$coreZ

puts $fedeas $coreY,$ncoreZ

puts $fedeas ""

if {$numBars > 2} {

# Determine the spacing for the remaining bars in the y direction

set spacingY [expr ($coreY-$ncoreY)/($numBars-1)]

# Avoid double counting bars

set numBars [expr $numBars-2]

# Define remaining steel in the y direction

layer straight $steelID $numBars $barArea [expr $coreY-$spacingY] $coreZ [expr $ncoreY+$spacingY] $coreZ

puts $fedeas $steelID,1,$numBars,,$barArea

puts $fedeas [expr $coreY-$spacingY],$coreZ

Page 142: Open Sees Examples Primer

Chapter 18 错误!未定义样式。 142

puts $fedeas [expr $ncoreY+$spacingY],$coreZ

puts $fedeas ""

layer straight $steelID $numBars $barArea [expr $coreY-$spacingY] $ncoreZ [expr $ncoreY+$spacingY] $ncoreZ

puts $fedeas $steelID,1,$numBars,,$barArea

puts $fedeas [expr $coreY-$spacingY],$ncoreZ

puts $fedeas [expr $ncoreY+$spacingY],$ncoreZ

puts $fedeas ""

}

}

}

ReadSMDFile.tcl A procedure which converts a PEER strong motion database (see

http://peer.berkeley.edu/smcat/") file to OpenSees format #

# -------READSDMFILE.TCL------------------------------------------------read gm input format

#

# Written: MHS

# Date: July 2000

#

# A procedure which parses a ground motion record from the PEER

# strong motion database by finding dt in the record header, then

# echoing data values to the output file.

#

# Formal arguments

# inFilename -- file which contains PEER strong motion record

# outFilename -- file to be written in format G3 can read

# dt -- time step determined from file header

#

# Assumptions

# The header in the PEER record is, e.g., formatted as follows:

# PACIFIC ENGINEERING AND ANALYSIS STRONG-MOTION DATA

# IMPERIAL VALLEY 10/15/79 2319, EL CENTRO ARRAY 6, 230

# ACCELERATION TIME HISTORY IN UNITS OF G

# NPTS= 3930, DT= .00500 SEC

Page 143: Open Sees Examples Primer

Chapter 18 错误!未定义样式。 143

proc ReadSMDFile {inFilename outFilename dt} {

# Pass dt by reference

upvar $dt DT

# Open the input file and catch the error if it can't be read

if [catch {open $inFilename r} inFileID] {

puts stderr "Cannot open $inFilename for reading"

} else {

# Open output file for writing

set outFileID [open $outFilename w]

# Flag indicating dt is found and that ground motion

# values should be read -- ASSUMES dt is on last line

# of header!!!

set flag 0

# Look at each line in the file

foreach line [split [read $inFileID] \n] {

if {[llength $line] == 0} {

# Blank line --> do nothing

continue

} elseif {$flag == 1} {

# Echo ground motion values to output file

puts $outFileID $line

} else {

# Search header lines for dt

foreach word [split $line] {

# Read in the time step

if {$flag == 1} {

set DT $word

break

}

# Find the desired token and set the flag

if {[string match $word "DT="] == 1} {

set flag 1

}

}

Page 144: Open Sees Examples Primer

Chapter 18 错误!未定义样式。 144

}

}

# Close the output file

close $outFileID

# Close the input file

close $inFileID

}

}

RotSpring2D # Procedure which creates a rotational spring for a planar problem

# rotSpring2D.tcl

# SETS A MULTIPOINT CONSTRAINT ON THE TRANSLATIONAL DEGREES OF FREEDOM,

# SO DO NOT USE THIS PROCEDURE IF THERE ARE TRANSLATIONAL ZEROLENGTH

# ELEMENTS ALSO BEING USED BETWEEN THESE TWO NODES

#

# Written: MHS

# Date: Jan 2000

#

# Formal arguments

# eleID - unique element ID for this zero length rotational spring

# nodeR - node ID which will be retained by the multi-point constraint

# nodeC - node ID which will be constrained by the multi-point constraint

# matID - material ID which represents the moment-rotation relationship

# for the spring

proc rotSpring2D {eleID nodeR nodeC matID} {

# Create the zero length element

element zeroLength $eleID $nodeR $nodeC -mat $matID -dir 6

# Constrain the translational DOF with a multi-point constraint

# retained constrained DOF_1 DOF_2 ... DOF_n

equalDOF $nodeR $nodeC 1 2

}

Page 145: Open Sees Examples Primer

Chapter 18 错误!未定义样式。 145

StFramePZLdisplay.tcl # a window to plot the nodal displacements versus load

if {$displayMode == "displayON"} { recorder plot StFramePZL1.out Node4Xdisp 10 400 300 300 -columns 3 1 # a window showing the displaced shape recorder display g3 10 10 300 300 -wipe prp 288.0 150.0 100.0 vrp 288.0 150.0 0 vup 0 1 0 vpn 0 0 1 viewWindow -400 400 -400 400 plane 0 150 port -1 1 -1 1 projection 0 fill 1 display 2 0 10 }

Wsection.tcl Procedure for creating a wide flange steel fiber section

# Wsection.tcl: tcl procedure for creating a wide flange steel fiber section

# written: Remo M. de Souza

# date: 06/99

# modified: 08/99 (according to the new general modelbuilder)

# input parameters

# secID - section ID number

# matID - material ID number

# d = nominal depth

# tw = web thickness

# bf = flange width

# tf = flange thickness

# nfdw = number of fibers along web depth

# nftw = number of fibers along web thickness

# nfbf = number of fibers along flange width

# nftf = number of fibers along flange thickness

proc Wsection { secID matID d tw bf tf nfdw nftw nfbf nftf} {

Page 146: Open Sees Examples Primer

Chapter 18 错误!未定义样式。 146

set dw [expr $d - 2 * $tf]

set y1 [expr -$d/2]

set y2 [expr -$dw/2]

set y3 [expr $dw/2]

set y4 [expr $d/2]

set z1 [expr -$bf/2]

set z2 [expr -$tw/2]

set z3 [expr $tw/2]

set z4 [expr $bf/2]

#

section fiberSec $secID {

# nfIJ nfJK yI zI yJ zJ yK zK yL zL

patch quadr $matID $nfbf $nftf $y1 $z4 $y1 $z1 $y2 $z1 $y2 $z4

patch quadr $matID $nftw $nfdw $y2 $z3 $y2 $z2 $y3 $z2 $y3 $z3

patch quadr $matID $nfbf $nftf $y3 $z4 $y3 $z1 $y4 $z1 $y4 $z4

}

}

RigidFrame3Ddisplay.tcl # a window showing the displaced shape

set displayType "PLAN"

#set displayType "PERSPECTIVE"

# a window showing the displaced shape

recorder display g3 10 10 300 300 -wipe

if {$displayType == "PERSPECTIVE"} {

prp -7500 -5000 50000

vrp 0 -500 250

vup 0 0 1

vpn 0 -1 0

viewWindow -200 400 -300 300

}

if {$displayType == "PLAN"} {

prp 0 0 1000

Page 147: Open Sees Examples Primer

Chapter 18 错误!未定义样式。 147

vrp 0 0 0

vup 0 -1 0

vpn 0 0 -1

viewWindow -200 200 -200 200

}

plane 0 1e12

port -1 1 -1 1

projection 1

fill 0

display 1 0 10

Page 148: Open Sees Examples Primer
Page 149: Open Sees Examples Primer

149

B Brick Examples • 125

E EXAMPLE 1 - Truss Example • 7 EXAMPLE 2 - Moment-Curvature Analysis

of a Reinforced Concrete Section • 12 EXAMPLE 3 - Portal Frame Examples • 21 Example 3.1 • 22 Example 3.2 • 28 Example 3.3 • 31 EXAMPLE 4 - Multibay Two Story Frame •

37 EXAMPLE 5 - Three-Dimensional Rigid

Frame • 45 EXAMPLE 6 - Simply Supported Beam • 54 EXAMPLE 7 - Dynamic Shell Analysis • 59 EXAMPLE 8 - Cantilever Beam • 63 Example2.1.tcl • 122 Example3.1.tcl • 67 Example3.2.tcl • 70 Example3.3.tcl • 73 Example4.1.tcl • 80

G genPlaneFrame.tcl • 128

I Introduction • 5

M matTest.tcl • 130 MomentCurvature.tcl • 132

P PortalFrame.tcl • 75

Q Quad Examples • 124

R RCcircSection.tcl • 133 RCcircSectionFEDEAS.tcl • 135 RCFrame1.tcl • 85 RCFrame2.tcl • 88 RCFrame3.tcl • 92 RCFrame4.tcl • 94 RCFrame5.tcl • 97 RCFrameDisplay.tcl • 100, 137 RCsection.tcl • 137 RCsectionFEDEAS.tcl • 140 ReadSMDFile.tcl • 144 Reinforced Concrete Plane Frame

Examples • 67 Reliability Examples • 127 Rigid Floor Diaphragm Example • 111 RigidFrame3D.tcl • 111 RigidFrame3Ddisplay.tcl • 148 RotSpring2D • 146

S Script Utilities Library • 128 Section Analysis Example • 122 solid01.tcl • 125 Steel Plane Frame Examples • 102 SteelFrame1.tcl • 102 SteelFrame2.tcl • 105 SteelFrame3.tcl • 107 StFramePZLdisplay.tcl • 147

W Wsection.tcl • 147

Z Zero Length Element Examples • 116 ZeroLength1.tcl • 116 ZeroLength2.tcl • 117 ZeroLength3.tcl • 118 ZeroLength4.tcl • 119 ZeroLength5.tcl • 120

Index