24
1 OpenSees Tutorial for SE 207: Nonlinear Structural Analysis by Quan Gu, Andre Barbosa, and Joel Conte PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.cn

OpenSees Tutorial

Embed Size (px)

DESCRIPTION

I found this paper on the Internet, I saw it very useful for anyone willing to know about OpenSees.

Citation preview

Page 1: OpenSees Tutorial

1

OpenSees Tutorial

for SE 207: Nonlinear Structural Analysis

by

Quan Gu, Andre Barbosa, and Joel Conte

PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.cn

Page 2: OpenSees Tutorial

2

Introduction to OpenSees§ OpenSees (Open System for Earthquake Engineering

Simulation) is an open source software framework used to model structural and geotechnical systems and simulate their earthquake response.

§ This framework has been under development by the Pacific Earthquake Engineering Research Center (PEER) since 1997.

§ OpenSees has been recently adopted as a NEESgridsimulation component.

§ Website: http://opensees.berkeley.edu

PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.cn

Page 3: OpenSees Tutorial

3

OpenSees is an Object-Oriented Software

§ An object is a bundle of variables and related methods.

§ A method is an operation which can modify an object’s behavior. In other words, it changes an object by manipulating its variables.

§ Only an object's methods should modify its variables.

§ A class is a blueprint for an object (i.e., it is a data structure, but not the memory allocated for the object)

§ Instantiation: process of allocating the memory to implement a class.

§ Inheritance. A subclass is a class definition which derives functionality from another class definition.

Concepts of Object-Oriented Programming (OOP):

PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.cn

Page 4: OpenSees Tutorial

4

class Material {public:

Material() { };virtual ~Material( ) { };

void setE (double passedE) {E=passedE;}void setStrain (double pStrain) { strain = pStrain;}double getStrain (void) {return strain;}double getStress (void) {

stress = strain*E; return stress;}

double getTangent (void) { return E; }

private:

double E; double strain;double stress;

};

E, σ, ε

Set value of E

Set value of εGet value of σGet value of εGet Tangent

Material object

Private members

Public methods

PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.cn

Page 5: OpenSees Tutorial

5

int main (int argc, char* argv[]){

Material theMat; //create an object and allocate the memory for this object

theMat.setE(2.1e11); //call the object’s method to modify its variable

theMat.setStrain(0.001); //call the object’s method to modify its variable

double stress = theMat.getStress(); //call the object’s method

printf("stress is: %f \n", stress);

return 0;}

Output:stress is: 210000000.000000

Matlab: theMat.E = 2.1E11;

In Matlab: getStress( 0.001);

PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.cn

Page 6: OpenSees Tutorial

6

OpenSees Framework -- Object Oriented Programming (OOP)

§ OpenSees is a C++ based FE software

class DirectIntegrationAnalysis:public TransientAnalysis{public:

int analyze( );int domainChanged( );…

private:TransientIntegrator * theIntegrator;

EquiSolnAlgo * theAlgorithm;…

};

Class DirectIntegrationAnalysis

How to analyze a structural model by using DirectIntegrationAnalysis

Pointer

DirectIntegrationAnalysis::analyze( intnumSteps, double dT) {

for (int i=0; i<numSteps; i++) {

this -> domainChanged();

theIntegrator ->newStep(dT);

theAlgorithm ->solveCurrentStep();

theIntegrator ->commit();

} // end for} // end program

PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.cn

Page 7: OpenSees Tutorial

7

OpenSees Framework– NR Iteration Procedure

theAlgorithm->solveCurrentStep();I. AnalysisModel * theAnaModel = this->getAnalysisModelPtr();

IncrementalIntegrator *theIntegrator = this->getIncrementalIntegratorPtr();LinearSOE *theSOE = this->getLinearSOEptr();

II. theIntegrator->formUnbalance(..);III. theTest->setEquiSolnAlgo(*this);

int result = theTest->start()Do {

IV. theIntegrator->formTangent(tangent)V. theSOE->solve(); VI. theIntegrator->update (theSOE->getX();VII. theIntegrator->formUnbalance()VIII. result = theTest->test(); // refer right side IX. this->record(count++);

} while (result == -1) // i.e., while not converged;

Newton Raphson iteration algorithmnu 1

n 1+u 2n 1+u 3

n 1+u

n1n+

1nδu 2

nδu 3nδu

1( )

n 1

0dynT

+

− K

n =Ψ 0

0n+1 =Ψ 0

0n+1−Ψ

1n∆u

2n∆u

3n∆u

Ψ

u

1n+1−Ψ 2

n+1−Ψ

PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.cn

Page 8: OpenSees Tutorial

8

OpenSees Framework Data structure (2)class Node : public DomainComponent {

Public:Node( …) ; ~Node(..)virtual const Vector &getDisp(void);virtual int setTrialDisp(const Vector &); virtual int setTrialVel(const Vector &); virtual const Vector &getUnbalancedLoad(void); virtual int commitState();virtual const Matrix &getMass(void);…private:int createDisp(void);int createVel(void);int createAccel(void); …int numberDOF; Vector *Crd; // original nodal coordsVector *commitDisp, *commitVel, *commitAccel;Vector *trialDisp, *trialVel, *trialAccel; Vector *unbalLoad; Matrix *mass; // pointer to mass….}

Public methods may be called by other objects

Private methods are called only by themselves

Private data are managed only by themselves

PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.cn

Page 9: OpenSees Tutorial

9

OpenSees and Tcl§ Tcl (Tool Command Language) is a string-based scripting

language and interpreter, first developed by John Ousterhout. § TCL was designed for easy learning, but it provides all the

powerful functions the expert programmer wants. § OpenSees.exe is an extension of the Tcl interpreter for finite

element analysis using OpenSees.

TCL

DOS, Windows or Unix OS

OpenSees

C:\>dir C:\>

% set a 0.250.25% set b [expr $a+1]1.25%

OpenSees > model BasicBuilder -ndm 3 -ndf 6OpenSees > node 1 0.0 0.0 0.1OpenSees >

PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.cn

Page 10: OpenSees Tutorial

10

Using Tcl

PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.cn

Page 11: OpenSees Tutorial

11

Using Tcl

set a(1) 1set a(2) 2parray aset b $a(1)

PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.cn

Page 12: OpenSees Tutorial

12

Tcl Commands for OpenSees

PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.cn

Page 13: OpenSees Tutorial

13

Building a FE model in OpenSees using Tcl

PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.cn

Page 14: OpenSees Tutorial

14

PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.cn

Page 15: OpenSees Tutorial

15

Building a FE model in OpenSees using TCL

x

y

# A simple 2D truss problems ( unit: kips, inch, s)

2 –ndf 2

PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.cn

Page 16: OpenSees Tutorial

16

PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.cn

Page 17: OpenSees Tutorial

17

• Perform the analysis

PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.cn

Page 18: OpenSees Tutorial

18

RC section behavior under Combined Bending and Axial Load

PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.cn

Page 19: OpenSees Tutorial

19

RC section behavior under Combined RC section behavior under Combined Bending and Axial LoadBending and Axial Load

Concrete crushes before steel yields

Steel yields before concrete crushes

Moment

Axia

lLoa

d, P

Failure Criterion: εcu = 0.003

Interaction Diagram

( Failure Envelope )

PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.cn

Page 20: OpenSees Tutorial

20

General ProcedureGeneral Procedure– For various levels of axial load, increase curvature

of the section until a concrete strain of 0.003 is reached.

– Files used:• Mp.tcl• model.tcl

– Output:• mp.out

Moment = f(χ)

Axia

lLoa

d,

PP

M

PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.cn

Page 21: OpenSees Tutorial

21

Zero Length Section ElementZero Length Section Elementfor RC Section Analysisfor RC Section Analysis

y

z

y

x

1Lu u

L

L

ε

θχ θ

≡∆

= = ∆

∆= = ∆

Zero-Length Section

PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.cn

Page 22: OpenSees Tutorial

22

Concrete01

Initial stiffness:2*$fpc/$epsc0

$fpc$fpcu

$epsU $eps0

strain

stre

ss

Steel01

$E0

$b*E0$Fy

strain

stre

ss$Fy

$b*E0

As1 = 4 No. 8 bars

As2 = 4 No. 8 bars

y

zy1

-y1

-z1z1

cover

Fiber sectionFiber section

PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.cn

Page 23: OpenSees Tutorial

23

Interaction Diagram Interaction Diagram

c si1=

= + ∑n

ni

P C F

( )c si12 =

= − + −

∑n

n ii

aM C y F y d

Reinforced Concrete: Mechanics and Design (4th Edition) by James G. MacGregor, James K. Wight

1 11

0.003 ; where = 0.003

ε εε

= −

s ys

c d Z

= 0.003ε−

isi

c dc

= ; ε ≤si si s si yf E f f

1 = 1.05 0.051000

β′

cfpsi

( ) ( ) 1 = 0.85 ; β′ =c cC f ab a c

= (positive in compression)si si siF f A

( ) = 0.85 ′−si si c siF f f A

if < ia d

else

for symmetric sections2

=hy

PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.cn

Page 24: OpenSees Tutorial

24

Interaction DiagramInteraction Diagram

0 100 200 300 4000

200

400

600

800

1000

1200

1400

1600

Moment [kips-ft]

Axi

al L

oad

[kip

s]Column Interaction Diagram

OpenSeesTextbook

PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.cn