OpenSees Tutorial
for SE 207: Nonlinear Structural Analysis by Quan Gu, Andre Barbosa, and Joel Conte
1
PDF "pdfFactory Pro" [Link]
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 NEESgrid simulation component. Website: [Link]
2
PDF "pdfFactory Pro" [Link]
OpenSees is an Object-Oriented Software
Concepts of Object-Oriented Programming (OOP): An object is a bundle of variables and related methods. A method is an operation which can modify an objects 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.
3
PDF "pdfFactory Pro" [Link]
class Material { public: Material() { }; virtual ~Material( ) { };
Public methods
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; };
Material object
Set value of E Set value of Get value of Get value of Get Tangent
E, ,
Private members
4
PDF "pdfFactory Pro" [Link]
Matlab: theMat.E = 2.1E11; int main (int argc, char* argv[]) { Material theMat; //create an object and allocate the memory for this object [Link](2.1e11); //call the objects method to modify its variable [Link](0.001); //call the objects method to modify its variable double stress = [Link](); //call the objects method printf("stress is: %f \n", stress); In Matlab: getStress( 0.001); return 0; } Output: stress is: 210000000.000000
5
PDF "pdfFactory Pro" [Link]
OpenSees Framework -- Object Oriented Programming (OOP)
OpenSees is a C++ based FE software
How to analyze a structural model by using DirectIntegrationAnalysis
class DirectIntegrationAnalysis: public TransientAnalysis { public: int analyze( ); int domainChanged( ); private: TransientIntegrator * theIntegrator; EquiSolnAlgo * theAlgorithm; DirectIntegrationAnalysis::analyze( int numSteps, double dT) { for (int i=0; i<numSteps; i++) { this -> domainChanged(); theIntegrator ->newStep(dT); theAlgorithm ->solveCurrentStep(); theIntegrator ->commit(); } // end for } // end program
6
};
Pointer Class DirectIntegrationAnalysis
PDF "pdfFactory Pro" [Link]
OpenSees Framework NR Iteration Procedure
theAlgorithm->solveCurrentStep(); I. AnalysisModel * theAnaModel = this->getAnalysisModelPtr(); IncrementalIntegrator *theIntegrator = this->getIncrementalIntegratorPtr(); LinearSOE *theSOE = this->getLinearSOEptr(); theIntegrator->formUnbalance(..); theTest->setEquiSolnAlgo(*this); int result = theTest->start() Do { IV. V. VI. theIntegrator->formTangent(tangent) theSOE->solve(); theIntegrator->update (theSOE->getX();
0 = 0 n+1 u 2 n u1 n 1 n+1 u3 n
II. III.
K dyn T
0
n +1
0 n+1 n
un
2 n+1
n+1
n = 0
u1 n u
1 n +1
u 2 n u
2 n +1
u3 n u
3 n +1
VII. theIntegrator->formUnbalance() VIII. result = theTest->test(); // refer right side IX.
Newton Raphson iteration algorithm
this->record(count++); } while (result == -1) // i.e., while not converged;
7
PDF "pdfFactory Pro" [Link]
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 coords Vector *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
8
PDF "pdfFactory Pro" [Link]
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. [Link] is an extension of the Tcl interpreter for finite element analysis using OpenSees.
OpenSees > model BasicBuilder -ndm 3 -ndf 6 OpenSees > node 1 0.0 0.0 0.1 OpenSees > % set a 0.25 0.25 % set b [expr $a+1] 1.25 %
OpenSees TCL DOS, Windows or Unix OS
PDF "pdfFactory Pro" [Link]
C:\>dir C:\> 9
Using Tcl
10
PDF "pdfFactory Pro" [Link]
Using Tcl
set a(1) 1 set a(2) 2 parray a set b $a(1)
11
PDF "pdfFactory Pro" [Link]
Tcl Commands for OpenSees
12
PDF "pdfFactory Pro" [Link]
Building a FE model in OpenSees using Tcl
13
PDF "pdfFactory Pro" [Link]
14
PDF "pdfFactory Pro" [Link]
Building a FE model in OpenSees using TCL
# A simple 2D truss problems ( unit: kips, inch, s) 2 ndf 2
y x
15
PDF "pdfFactory Pro" [Link]
16
PDF "pdfFactory Pro" [Link]
Perform the analysis
17
PDF "pdfFactory Pro" [Link]
RC section behavior under Combined Bending and Axial Load
18
PDF "pdfFactory Pro" [Link]
RC section behavior under Combined Bending and Axial Load
Interaction Diagram ( Failure Envelope )
Axial Load, P
Concrete crushes before steel yields Steel yields before concrete crushes Moment
Failure Criterion: cu = 0.003
PDF "pdfFactory Pro" [Link]
19
General Procedure
For various levels of axial load, increase curvature of the section until a concrete strain of 0.003 is reached. Files used:
Axial Load, P P M
[Link] [Link]
Output:
[Link]
Moment = f()
20
PDF "pdfFactory Pro" [Link]
Zero Length Section Element for RC Section Analysis
y Zero-Length Section L 1 u = = u L = = L y
21
PDF "pdfFactory Pro" [Link]
Fiber section
$epsU $eps0 stress
Concrete01
strain
y
z1 -z1
Initial stiffness: 2*$fpc/$epsc0 $fpcu $fpc
As1 = 4 No. 8 bars As2 = 4 No. 8 bars
y1
cover
$Fy $E0 strain $Fy $b*E0
stress
-y1
Steel01
$b*E0
22
PDF "pdfFactory Pro" [Link]
Interaction Diagram
Reinforced Concrete: Mechanics and Design (4th Edition) by James G. MacGregor, James K. Wight
0.003 c= d1 ; where s1 = Z y 0.003 s1 c di f si = si Es ; f si f y si = 0.003 c f c 1 = 1.05 0.05 1000 psi Cc = ( 0.85 f c)( ab ) ; a = 1c if a < di Fsi = f si Asi (positive in compression) else Fsi = ( f si 0.85 f c) Asi
Pn = Cc + Fsi
i =1
a n M n = Cc y + Fsi ( y di ) 2 i =1
y= h for symmetric sections 2
23
PDF "pdfFactory Pro" [Link]
Interaction Diagram
Column Interaction Diagram 1600 1400 Axial Load [kips] 1200 1000 800 600 400 200 0 0 100 200 300 Moment [kips-ft] 400 OpenSees Textbook
24
PDF "pdfFactory Pro" [Link]