OpenSees Tutorial for SE 207: Nonlinear Structural Structural Analysis by Quan Gu, Andre Andre Barbosa, Barbosa, and Joel Joel Conte
1
Introduction to OpenSees § OpenSees OpenSees (Open (Open System for for Earthquake Earthquake Engineering Engineering Simulation) is an open source software s oftware framework used to model structural and geotechnical systems s ystems and simulate their earthquake response. § This framework has been under development by the th e Pacific Earthquake Engineering Research Center (PEER) since 1997. § OpenSees has been recently adopted as a NEESgrid simulation component. § Website: http://opensees.berkeley.edu 2
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 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.
3
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; }
};
Set value of E
ε Get value of σ Get value of ε Set value of
Get Tangent
private: double E; double strain; double stress;
Material object
E, σ, ε Private members 4
Matlab: theMat.E = 2.1E11; 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;
In Matlab: getStress( 0.001);
} Output: stress is: 210000000.000000 5
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 domainChanged(); theIntegrator ->newStep(dT); theAlgorithm ->solveCurrentStep();
…
theIntegrator ->commit();
};
Pointer Class DirectIntegrationAnalysis
} // end for } // end program 6
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);
∆u 3n 0 Ψ n+1
int result = theTest->start()
Do { IV.
theIntegrator->formTangent(tangent)
V.
theSOE->solve();
VI.
theIntegrator->update (theSOE->getX();
− ( K dyn T )
VII. theIntegrator->formUnbalance() VIII. result = theTest->test(); // refer right side IX.
Ψn
∆u 2n
=0
∆u1n
0 n +1
=0
−Ψ 0n+1
−Ψ1n+1
1
− Ψ 2n+1 n +1
n
δu1n un
δu 2n u1n +1
δu3n u 2n +1
u 3n +1
u
Newton Raphson iteration algorithm
this->record(count++);
} while (result == -1) // i.e., while not converged;
7
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
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. 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
C:\>dir C:\> 9
Using Tcl
10
Using Tcl
set a(1) 1 set a(2) 2 parray a set b $a(1) 11
Tcl Commands for OpenSees
12
Building a FE model in OpenSees using Tcl
13
14
Building a FE model in OpenSees using TCL # A simple 2D truss problems ( unit: kips, inch, s) 2 –ndf 2
y x
15
16
•
Perform the analysis
17
RC section behavior under Combined Bending and Axial Load
18
RC section behavior under Combined Bending and Axial Load Interaction Diagram ( Failure Envelope )
P , d a o L l a i x A
Concrete crushes before steel yields Steel yields before concrete crushes Moment
Failure Criterion:
εcu =
0.003
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: • •
–
Mp.tcl model.tcl
Output: •
P P , d a o L l a i x A
M
mp.out Moment = f( χ ) 20
Zero Length Section Element for RC Section Analysis y
y
Zero-Length Section L ≡1 ε
=
χ
=
∆u L ∆θ L
= ∆u
x
z
= ∆θ
21
Fiber section Concrete01 $epsU
$eps0
s s e r t s
strain
y z1
z
-z1
As1 = 4 No. 8 bars As2 = 4 No. 8 bars
cover
Initial stiffness: 2*$fpc/$epsc0 $fpcu $fpc
y1
Steel01 -y1
s s e r t s
$Fy
$b*E0 $E0 strain $Fy
$b*E0 22
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 − d i 0.003 f si = ε si Es ; f si ≤ ε si = c f c′ β1 = 1.05 − 0.05 1000 psi
f y
Cc = ( 0.85 f c′)( ab ) ; a = β1c
Pn
if a < d i Fsi = f si Asi (positive in compression)
else Fsi =
( f si − 0.85 f c′)
n
Asi
= Cc + ∑ F si i =1
a n M n = Cc y − + ∑ Fsi ( y − d i ) 2 i =1 y
=
h
2
for symmetric sections
23
Interaction Diagram Column Interaction Diagram OpenSees Textbook
1600 1400 ] 1200 s p i k [ 1000 d a o L 800 l a i x 600 A
400 200 0 0
100
200 300 Moment [kips-ft]
400
24