Hey! I have a question.
1-How can i add new gravity analysis after non linear time history analysis in opensees? Does gravity analysis consider deterioration of stiffness in previous analysis?
please send me example file that i use it.
thank you
I wait for your help.
gravity analysis after dynamic analysis
Moderators: silvia, selimgunay, Moderators
Re: gravity analysis after dynamic analysis
it's just like doing a transient analysis after a gravity analysis. no example file should be necessary.
i.e. issue commands:
wipeAnalysis; #no space beween wipe and Analysis
loadConst -time 0.0
then create the new load pattern and static analysis and issue the analyze command.
in OpenSees after any analyze you can add new load patterns, remove elements, load patterns, or whatever and continue on. the state of the remaining elements and nodes do not change from the end of one analysis step to the start of the next.
i.e. issue commands:
wipeAnalysis; #no space beween wipe and Analysis
loadConst -time 0.0
then create the new load pattern and static analysis and issue the analyze command.
in OpenSees after any analyze you can add new load patterns, remove elements, load patterns, or whatever and continue on. the state of the remaining elements and nodes do not change from the end of one analysis step to the start of the next.
Re: gravity analysis after dynamic analysis
hi fmk
i want to perform gravity analysis for first time , dynamic analysis for second time and finally gravity analysis sequencely. i do your comment but some errors happened.these errors and my file are attached bellow, please check my file.
1-errors
OpenSees -- Open System For Earthquake Engineering Simulation
Pacific Earthquake Engineering Research Center -- 2.2.2.g
(c) Copyright 1999,2000 The Regents of the University of California
All Rights Reserved
(Copyright and Disclaimer @ http://www.berkeley.edu/OpenSees/copyright.html)
OpenSees > source r60.tcl
ForceBeamColumn3d::ForceBeamColumn3d -- no torsion detected in sections, continu
ing with element torsional stiffness GJ/L = 1e+010Model Built
Ground Motion Done. End Time: 25.000000
Domain::addLoadPattern - cannot add as LoadPattern with tag1already exists in mo
del
WARNING could not add load pattern to the domain Load Pattern: 1
Linear Series: constant factor: 1
Nodal Loads:
Elemental Loads:
Single Point Constraints:
expected integer but got "Linear"
OpenSees >
2-my file
# --------------------------------------------------------------------------------------------------
# 3d cantilever column, dynamic bidirectional eq ground motion
# mokhtar, ansari
#
# ^Y
# |
# 2 __
# | |
# | |
# | |
# (1) LCol
# | |
# | |
# | |
# =1= _|_ -------->X
#
# SET UP ----------------------------------------------------------------------------
# units: kip, inch, sec
wipe; # clear memory of all past model definitions
file mkdir Data; # create data directory
model BasicBuilder -ndm 3 -ndf 6; # Define the model builder, ndm=#dimension, ndf=#dofs
# define GEOMETRY -------------------------------------------------------------
set LCol 96; # column length
set Weight 65.; # superstructure weight
# define section geometry
set DCol 16; # Column Diameter
# calculated parameters
set PCol $Weight; # nodal dead-load weight per column
set g 386.4; # g.
set Mass [expr $PCol/$g]; # nodal mass
# calculated geometry parameters
set ACol [expr $DCol*$DCol*3.14*.25]; # cross-sectional area
set IzCol [expr 3.14/4.*pow($DCol/2.,4)]; # Column moment of inertia
# nodal coordinates:
node 1 0 0 0; # node#, X, Y,Z
node 2 0 $LCol 0;
# Single point constraints -- Boundary Conditions
fix 1 1 1 1 1 1 1; # node 1: fully fixed
fix 2 0 0 0 0 0 0;
# nodal masses:
mass 2 $Mass $Mass $Mass 0 0 0; # node#, Mx My Mz, Mass=Weight/g, neglect rotational inertia at nodes
# Define ELEMENTS & SECTIONS -------------------------------------------------------------
set ColSecTag 1; # assign a tag number to the column section
# define section geometry
set coverCol 0.5; # Column cover to reinforcing steel NA.
set numBarsCol 12; # number of longitudinal-reinforcement bars in column.
set barAreaCol 0.2050 ; # area of longitudinal-reinforcement bars
# MATERIAL parameters -------------------------------------------------------------------
set IDconcU 1;
set IDconC 2; # material ID tag -- unconfined cover concrete
set IDreinf 3; # material ID tag -- reinforcement
################################# Concrete ######################################
# nominal concrete compressive strength
set fc -6; # CONCRETE Compressive Strength (+Tension, -Compression)
set Ec [expr 57*sqrt(-$fc*1000)]; # Concrete Elastic Modulus (the term in sqr root needs to be in psi
# unconfined concrete
set fc1U $fc; # UNCONFINED concrete (todeschini parabolic model), maximum stress
set eps1U -0.0028; # strain at maximum strength of unconfined concrete
set fc2U 0; # ultimate stress
set eps2U -0.006; # strain at ultimate stress
set lambda 0.1; # ratio between unloading slope at $eps2 and initial slope $Ec
# Confined Concrete for core---------------(by Mander's Model)
set Kfc 1.3; # ratio of confined to unconfined concrete strength
set fc1C [expr $Kfc*$fc]; # CONFINED concrete
set eps1C -0.007; # strain at maximum strength of confined concrete
set fc2C [expr 0.5*$fc1C]; # ultimate stress for confined concrete ( by mander's model= 5.471 ksi)
set eps2C [expr 2.5*$eps1C]; # strain at ultimate stress ( I have to use 0.016 instead of 0.0136
# tensile-strength properties
set ftU [expr -0.14*$fc1U];
set ftC [expr -0.14*$fc1C]; # tensile strength +tension
set Ets [expr $ftU/0.002]; # tension softening stiffness
################################ Reinforcement proprety########################
# Mild rebars----------------
set fy 71.1; # STEEL yield stress
set fu 105.5; # modulus of steel
set Es 18750; # strain-hardening ratio
set Esh 800; # control the transition from elastic to plastic branches
set esh 0.005; # control the transition from elastic to plastic branches
set eult 0.12; # control the transition from elastic to plastic branches
uniaxialMaterial Concrete01WithSITC $IDconC $fc1C $eps1C $fc2C $eps2C; # build core concrete (confined)
uniaxialMaterial Concrete02 $IDconcU $fc1U $eps1U $fc2U $eps2U $lambda $ftU $Ets; # build cover
uniaxialMaterial ReinforcingSteel $IDreinf $fy $fu $Es $Esh $esh $eult; # build reinforcement material
# FIBER SECTION properties -------------------------------------------------------------
# symmetric section
#
#
# |----- D -----|
# y
# ^
# |
# . -- . -- --
# ' 0 ' | -- cover
# ' ' |
# ' 0 '
# z <--- | 0 0 + 0 0 | D
# 0
# ' '
# ' ' |
# ' 0 ' |
# ' -- ' --
#
# |-|
# second bar radius
#
#
#
# Circular fiber RC section------------------
# RC section:
# patch circ $matTag $numSubdivCirc $numSubdivRad $yCenter $zCenter $intRad $extRad <$startAng $endAng>
set ncU 20
set nrU 2
set ncC 20
set nrC 10
set intradU 7.3
set extradU 8
set intradC 0
set extradC 7.3
set startang 0
set endang 360
section fiberSec $ColSecTag {; # Define the fiber section
patch circ $IDconcU $ncU $nrU 0 0 $intradU $extradU $startang $endang; # Define the concrete patch
patch circ $IDconC $ncC $nrC 0 0 $intradC $extradC $startang $endang
layer circ $IDreinf $numBarsCol $barAreaCol 0 0 7.3 0 360; # top layer reinfocement
}; # end of fibersection definition
# assign torsional Stiffness for 3D Model
set SecTagTorsion 99; # ID tag for torsional section behavior
set SecTag3D 3; # ID tag for combined behavior for 3D model
set GJ 1.0e10
uniaxialMaterial Elastic $SecTagTorsion $GJ; # define elastic torsional stiffness
section Aggregator $SecTag3D $SecTagTorsion T -section $ColSecTag; # combine section properties
# define geometric transformation: performs a linear geometric transformation of beam stiffness and resisting force from the basic system to the global-coordinate system
set ColTransfTag 1; # associate a tag to column transformation
geomTransf Linear $ColTransfTag 0 0 -1;
# element connectivity:
set numIntgrPts 5; # number of integration points for force-based element
element nonlinearBeamColumn 1 1 2 $numIntgrPts $ColSecTag $ColTransfTag; # self-explanatory when using variables
# Define RECORDERS -------------------------------------------------------------
recorder Node -file Data/DFree.out -time -node 2 -dof 1 2 3 disp; # displacements of free nodes
recorder Node -file Data/DBase.out -time -node 1 -dof 1 2 3 disp; # displacements of support nodes
recorder Node -file Data/RBase.out -time -node 1 -dof 1 2 3 reaction; # support reaction
recorder Drift -file Data/Drift.out -time -iNode 1 -jNode 2 -dof 1 -perpDirn 2 ; # lateral drift
recorder Element -file Data/FCol.out -time -ele 2 globalForce; # element forces -- column
recorder Element -file Data/ForceColSec1.out -time -ele 1 section 1 force; # Column section forces, axial and moment, node i
recorder Element -file Data/DefoColSec1.out -time -ele 1 section 1 deformation; # section deformations, axial and curvature, node i
recorder Element -file Data/ForceColSec$numIntgrPts.out -time -ele 1 section $numIntgrPts force; # section forces, axial and moment, node j
recorder Element -file Data/DefoColSec$numIntgrPts.out -time -ele 1 section $numIntgrPts deformation; # section deformations, axial and curvature, node j
# define first GRAVITY -------------------------------------------------------------
pattern Plain 1 Linear {
load 2 0 -$PCol 0 0 0 0
}
# Gravity-analysis parameters -- load-controlled static analysis
set Tol 1.0e-8; # convergence tolerance for test
constraints Plain; # how it handles boundary conditions
numberer Plain; # renumber dof's to minimize band-width (optimization), if you want to
system BandGeneral; # how to store and solve the system of equations in the analysis
test NormDispIncr $Tol 6 ; # determine if convergence has been achieved at the end of an iteration step
algorithm Newton; # use Newton's solution algorithm: updates tangent stiffness at every iteration
set NstepGravity 10; # apply gravity in 10 steps
set DGravity [expr 1./$NstepGravity]; # first load increment;
integrator LoadControl $DGravity; # determine the next time step for an analysis
analysis Static; # define type of analysis static or transient
analyze $NstepGravity; # apply gravity
# ------------------------------------------------- maintain constant gravity loads and reset time to zero
loadConst -time 0.0
puts "Model Built"
# DYNAMIC EQ ANALYSIS --------------------------------------------------------
# Uniform Earthquake ground motion (uniform acceleration input at all support nodes)
# set up ground-motion-analysis parameters
set DtAnalysis [expr 0.005]; # time-step Dt for lateral analysis
set TmaxAnalysis [expr 25.]; # maximum duration of ground-motion analysis -- should be 50*$sec
# DYNAMIC ANALYSIS PARAMETERS
# CONSTRAINTS handler -- Determines how the constraint equations are enforced in the analysis (http://opensees.berkeley.edu/OpenSees/m ... al/617.htm)
# Plain Constraints -- Removes constrained degrees of freedom from the system of equations
# Lagrange Multipliers -- Uses the method of Lagrange multipliers to enforce constraints
# Penalty Method -- Uses penalty numbers to enforce constraints
# Transformation Method -- Performs a condensation of constrained degrees of freedom
constraints Transformation ;
# DOF NUMBERER (number the degrees of freedom in the domain): (http://opensees.berkeley.edu/OpenSees/m ... al/366.htm)
# determines the mapping between equation numbers and degrees-of-freedom
# Plain -- Uses the numbering provided by the user
# RCM -- Renumbers the DOF to minimize the matrix band-width using the Reverse Cuthill-McKee algorithm
numberer Plain
# SYSTEM (http://opensees.berkeley.edu/OpenSees/m ... al/371.htm)
# Linear Equation Solvers (how to store and solve the system of equations in the analysis)
# -- provide the solution of the linear system of equations Ku = P. Each solver is tailored to a specific matrix topology.
# ProfileSPD -- Direct profile solver for symmetric positive definite matrices
# BandGeneral -- Direct solver for banded unsymmetric matrices
# BandSPD -- Direct solver for banded symmetric positive definite matrices
# SparseGeneral -- Direct solver for unsymmetric sparse matrices (-piv option)
# SparseSPD -- Direct solver for symmetric sparse matrices
# UmfPack -- Direct UmfPack solver for unsymmetric matrices
system SparseGeneral -piv
# TEST: # convergence test to
# Convergence TEST (http://opensees.berkeley.edu/OpenSees/m ... al/360.htm)
# -- Accept the current state of the domain as being on the converged solution path
# -- determine if convergence has been achieved at the end of an iteration step
# NormUnbalance -- Specifies a tolerance on the norm of the unbalanced load at the current iteration
# NormDispIncr -- Specifies a tolerance on the norm of the displacement increments at the current iteration
# EnergyIncr-- Specifies a tolerance on the inner product of the unbalanced load and displacement increments at the current iteration
# RelativeNormUnbalance --
# RelativeNormDispIncr --
# RelativeEnergyIncr --
set Tol 1.e-8; # Convergence Test: tolerance
set maxNumIter 10; # Convergence Test: maximum number of iterations that will be performed before "failure to converge" is returned
set printFlag 0; # Convergence Test: flag used to print information on convergence (optional) # 1: print information on each step;
set TestType EnergyIncr; # Convergence-test type
test $TestType $Tol $maxNumIter $printFlag;
# Solution ALGORITHM: -- Iterate from the last time step to the current (http://opensees.berkeley.edu/OpenSees/m ... al/682.htm)
# Linear -- Uses the solution at the first iteration and continues
# Newton -- Uses the tangent at the current iteration to iterate to convergence
# ModifiedNewton -- Uses the tangent at the first iteration to iterate to convergence
# NewtonLineSearch --
# KrylovNewton --
# BFGS --
# Broyden --
set algorithmType ModifiedNewton
algorithm $algorithmType;
# Static INTEGRATOR: -- determine the next time step for an analysis (http://opensees.berkeley.edu/OpenSees/m ... al/689.htm)
# LoadControl -- Specifies the incremental load factor to be applied to the loads in the domain
# DisplacementControl -- Specifies the incremental displacement at a specified DOF in the domain
# Minimum Unbalanced Displacement Norm -- Specifies the incremental load factor such that the residual displacement norm in minimized
# Arc Length -- Specifies the incremental arc-length of the load-displacement path
# Transient INTEGRATOR: -- determine the next time step for an analysis including inertial effects
# Newmark -- The two parameter time-stepping method developed by Newmark
# HHT -- The three parameter Hilbert-Hughes-Taylor time-stepping method
# Central Difference -- Approximates velocity and acceleration by centered finite differences of displacement
set NewmarkGamma 0.5; # Newmark-integrator gamma parameter (also HHT)
set NewmarkBeta 0.25; # Newmark-integrator beta parameter
integrator Newmark $NewmarkGamma $NewmarkBeta
# ANALYSIS -- defines what type of analysis is to be performed (http://opensees.berkeley.edu/OpenSees/m ... al/324.htm)
# Static Analysis -- solves the KU=R problem, without the mass or damping matrices.
# Transient Analysis -- solves the time-dependent analysis. The time step in this type of analysis is constant. The time step in the output is also constant.
# variableTransient Analysis -- performs the same analysis type as the Transient Analysis object. The time step, however, is variable. This method is used when
# there are convergence problems with the Transient Analysis object at a peak or when the time step is too small. The time step in the output is also variable.
analysis Transient
# define DAMPING--------------------------------------------------------------------------------------
# apply Rayleigh DAMPING from $xDamp
# D=$alphaM*M + $betaKcurr*Kcurrent + $betaKcomm*KlastCommit + $beatKinit*$Kinitial
set xDamp 0.02; # 2% damping ratio
set lambda [eigen 1]; # eigenvalue mode 1
set omega [expr pow($lambda,0.5)];
set alphaM 0.; # M-prop. damping; D = alphaM*M
set betaKcurr 0.; # K-proportional damping; +beatKcurr*KCurrent
set betaKcomm [expr 2.*$xDamp/($omega)]; # K-prop. damping parameter; +betaKcomm*KlastCommitt
set betaKinit 0.; # initial-stiffness proportional damping +beatKinit*Kini
# define damping
rayleigh $alphaM $betaKcurr $betaKinit $betaKcomm; # RAYLEIGH damping
# --------------------------------- perform Dynamic Ground-Motion Analysis
# Uniform EXCITATION: acceleration input
set IDloadTag 400; # load tag
set dt [expr 0.01/2.12]; # time step for input ground motion(Time Scale Factor=2.12)
set gx [expr 0.7*$g]
set lomax "Path -filePath NF03.txt -dt $dt -factor $gx"
set lomay "Path -filePath NF04.txt -dt $dt -factor $gx"
set lomaz "Path -filePath NFV.txt -dt $dt -factor $gx"
pattern UniformExcitation 2 1 -accel $lomax
pattern UniformExcitation 3 3 -accel $lomay
pattern UniformExcitation 4 2 -accel $lomaz
set Nsteps [expr int($TmaxAnalysis/$DtAnalysis)];
set ok [analyze $Nsteps $DtAnalysis]; # actually perform analysis; returns ok=0 if analysis was successful
if {$ok != 0} { ; # if analysis was not successful.
# change some analysis parameters to achieve convergence
# performance is slower inside this loop
# Time-controlled analysis
set ok 0;
set controlTime [getTime];
while {$controlTime < $TmaxAnalysis && $ok == 0} {
set ok [analyze 1 $DtAnalysis]
set controlTime [getTime]
set ok [analyze 1 $DtAnalysis]
if {$ok != 0} {
puts "Trying Newton with Initial Tangent .."
test NormDispIncr $Tol 1000 0
algorithm Newton -initial
set ok [analyze 1 $DtAnalysis]
test $TestType $Tol $maxNumIter 0
algorithm $algorithmType
}
if {$ok != 0} {
puts "Trying Broyden .."
algorithm Broyden 8
set ok [analyze 1 $DtAnalysis]
algorithm $algorithmType
}
if {$ok != 0} {
puts "Trying NewtonWithLineSearch .."
algorithm NewtonLineSearch .8
set ok [analyze 1 $DtAnalysis]
algorithm $algorithmType
}
}
}; # end if ok !0
puts "Ground Motion Done. End Time: [getTime]"
# define final GRAVITY -------------------------------------------------------------
wipeAnalysis
loadConst -time 0.0
pattern Plain 2 Linear {
load 2 0 -20 0 0 0 0
}
# Gravity-analysis parameters -- load-controlled static analysis
set Tol 1.0e-8; # convergence tolerance for test
constraints Plain; # how it handles boundary conditions
numberer Plain; # renumber dof's to minimize band-width (optimization), if you want to
system BandGeneral; # how to store and solve the system of equations in the analysis
test NormDispIncr $Tol 6 ; # determine if convergence has been achieved at the end of an iteration step
algorithm Newton; # use Newton's solution algorithm: updates tangent stiffness at every iteration
set NstepGravity 10; # apply gravity in 10 steps
set DGravity [expr 1./$NstepGravity]; # first load increment;
integrator LoadControl $DGravity; # determine the next time step for an analysis
analysis Static; # define type of analysis static or transient
analyze $NstepGravity; # apply gravity
# ------------------------------------------------- maintain constant gravity loads and reset time to zero
loadConst -time 0.0
puts "Model Built"
i want to perform gravity analysis for first time , dynamic analysis for second time and finally gravity analysis sequencely. i do your comment but some errors happened.these errors and my file are attached bellow, please check my file.
1-errors
OpenSees -- Open System For Earthquake Engineering Simulation
Pacific Earthquake Engineering Research Center -- 2.2.2.g
(c) Copyright 1999,2000 The Regents of the University of California
All Rights Reserved
(Copyright and Disclaimer @ http://www.berkeley.edu/OpenSees/copyright.html)
OpenSees > source r60.tcl
ForceBeamColumn3d::ForceBeamColumn3d -- no torsion detected in sections, continu
ing with element torsional stiffness GJ/L = 1e+010Model Built
Ground Motion Done. End Time: 25.000000
Domain::addLoadPattern - cannot add as LoadPattern with tag1already exists in mo
del
WARNING could not add load pattern to the domain Load Pattern: 1
Linear Series: constant factor: 1
Nodal Loads:
Elemental Loads:
Single Point Constraints:
expected integer but got "Linear"
OpenSees >
2-my file
# --------------------------------------------------------------------------------------------------
# 3d cantilever column, dynamic bidirectional eq ground motion
# mokhtar, ansari
#
# ^Y
# |
# 2 __
# | |
# | |
# | |
# (1) LCol
# | |
# | |
# | |
# =1= _|_ -------->X
#
# SET UP ----------------------------------------------------------------------------
# units: kip, inch, sec
wipe; # clear memory of all past model definitions
file mkdir Data; # create data directory
model BasicBuilder -ndm 3 -ndf 6; # Define the model builder, ndm=#dimension, ndf=#dofs
# define GEOMETRY -------------------------------------------------------------
set LCol 96; # column length
set Weight 65.; # superstructure weight
# define section geometry
set DCol 16; # Column Diameter
# calculated parameters
set PCol $Weight; # nodal dead-load weight per column
set g 386.4; # g.
set Mass [expr $PCol/$g]; # nodal mass
# calculated geometry parameters
set ACol [expr $DCol*$DCol*3.14*.25]; # cross-sectional area
set IzCol [expr 3.14/4.*pow($DCol/2.,4)]; # Column moment of inertia
# nodal coordinates:
node 1 0 0 0; # node#, X, Y,Z
node 2 0 $LCol 0;
# Single point constraints -- Boundary Conditions
fix 1 1 1 1 1 1 1; # node 1: fully fixed
fix 2 0 0 0 0 0 0;
# nodal masses:
mass 2 $Mass $Mass $Mass 0 0 0; # node#, Mx My Mz, Mass=Weight/g, neglect rotational inertia at nodes
# Define ELEMENTS & SECTIONS -------------------------------------------------------------
set ColSecTag 1; # assign a tag number to the column section
# define section geometry
set coverCol 0.5; # Column cover to reinforcing steel NA.
set numBarsCol 12; # number of longitudinal-reinforcement bars in column.
set barAreaCol 0.2050 ; # area of longitudinal-reinforcement bars
# MATERIAL parameters -------------------------------------------------------------------
set IDconcU 1;
set IDconC 2; # material ID tag -- unconfined cover concrete
set IDreinf 3; # material ID tag -- reinforcement
################################# Concrete ######################################
# nominal concrete compressive strength
set fc -6; # CONCRETE Compressive Strength (+Tension, -Compression)
set Ec [expr 57*sqrt(-$fc*1000)]; # Concrete Elastic Modulus (the term in sqr root needs to be in psi
# unconfined concrete
set fc1U $fc; # UNCONFINED concrete (todeschini parabolic model), maximum stress
set eps1U -0.0028; # strain at maximum strength of unconfined concrete
set fc2U 0; # ultimate stress
set eps2U -0.006; # strain at ultimate stress
set lambda 0.1; # ratio between unloading slope at $eps2 and initial slope $Ec
# Confined Concrete for core---------------(by Mander's Model)
set Kfc 1.3; # ratio of confined to unconfined concrete strength
set fc1C [expr $Kfc*$fc]; # CONFINED concrete
set eps1C -0.007; # strain at maximum strength of confined concrete
set fc2C [expr 0.5*$fc1C]; # ultimate stress for confined concrete ( by mander's model= 5.471 ksi)
set eps2C [expr 2.5*$eps1C]; # strain at ultimate stress ( I have to use 0.016 instead of 0.0136
# tensile-strength properties
set ftU [expr -0.14*$fc1U];
set ftC [expr -0.14*$fc1C]; # tensile strength +tension
set Ets [expr $ftU/0.002]; # tension softening stiffness
################################ Reinforcement proprety########################
# Mild rebars----------------
set fy 71.1; # STEEL yield stress
set fu 105.5; # modulus of steel
set Es 18750; # strain-hardening ratio
set Esh 800; # control the transition from elastic to plastic branches
set esh 0.005; # control the transition from elastic to plastic branches
set eult 0.12; # control the transition from elastic to plastic branches
uniaxialMaterial Concrete01WithSITC $IDconC $fc1C $eps1C $fc2C $eps2C; # build core concrete (confined)
uniaxialMaterial Concrete02 $IDconcU $fc1U $eps1U $fc2U $eps2U $lambda $ftU $Ets; # build cover
uniaxialMaterial ReinforcingSteel $IDreinf $fy $fu $Es $Esh $esh $eult; # build reinforcement material
# FIBER SECTION properties -------------------------------------------------------------
# symmetric section
#
#
# |----- D -----|
# y
# ^
# |
# . -- . -- --
# ' 0 ' | -- cover
# ' ' |
# ' 0 '
# z <--- | 0 0 + 0 0 | D
# 0
# ' '
# ' ' |
# ' 0 ' |
# ' -- ' --
#
# |-|
# second bar radius
#
#
#
# Circular fiber RC section------------------
# RC section:
# patch circ $matTag $numSubdivCirc $numSubdivRad $yCenter $zCenter $intRad $extRad <$startAng $endAng>
set ncU 20
set nrU 2
set ncC 20
set nrC 10
set intradU 7.3
set extradU 8
set intradC 0
set extradC 7.3
set startang 0
set endang 360
section fiberSec $ColSecTag {; # Define the fiber section
patch circ $IDconcU $ncU $nrU 0 0 $intradU $extradU $startang $endang; # Define the concrete patch
patch circ $IDconC $ncC $nrC 0 0 $intradC $extradC $startang $endang
layer circ $IDreinf $numBarsCol $barAreaCol 0 0 7.3 0 360; # top layer reinfocement
}; # end of fibersection definition
# assign torsional Stiffness for 3D Model
set SecTagTorsion 99; # ID tag for torsional section behavior
set SecTag3D 3; # ID tag for combined behavior for 3D model
set GJ 1.0e10
uniaxialMaterial Elastic $SecTagTorsion $GJ; # define elastic torsional stiffness
section Aggregator $SecTag3D $SecTagTorsion T -section $ColSecTag; # combine section properties
# define geometric transformation: performs a linear geometric transformation of beam stiffness and resisting force from the basic system to the global-coordinate system
set ColTransfTag 1; # associate a tag to column transformation
geomTransf Linear $ColTransfTag 0 0 -1;
# element connectivity:
set numIntgrPts 5; # number of integration points for force-based element
element nonlinearBeamColumn 1 1 2 $numIntgrPts $ColSecTag $ColTransfTag; # self-explanatory when using variables
# Define RECORDERS -------------------------------------------------------------
recorder Node -file Data/DFree.out -time -node 2 -dof 1 2 3 disp; # displacements of free nodes
recorder Node -file Data/DBase.out -time -node 1 -dof 1 2 3 disp; # displacements of support nodes
recorder Node -file Data/RBase.out -time -node 1 -dof 1 2 3 reaction; # support reaction
recorder Drift -file Data/Drift.out -time -iNode 1 -jNode 2 -dof 1 -perpDirn 2 ; # lateral drift
recorder Element -file Data/FCol.out -time -ele 2 globalForce; # element forces -- column
recorder Element -file Data/ForceColSec1.out -time -ele 1 section 1 force; # Column section forces, axial and moment, node i
recorder Element -file Data/DefoColSec1.out -time -ele 1 section 1 deformation; # section deformations, axial and curvature, node i
recorder Element -file Data/ForceColSec$numIntgrPts.out -time -ele 1 section $numIntgrPts force; # section forces, axial and moment, node j
recorder Element -file Data/DefoColSec$numIntgrPts.out -time -ele 1 section $numIntgrPts deformation; # section deformations, axial and curvature, node j
# define first GRAVITY -------------------------------------------------------------
pattern Plain 1 Linear {
load 2 0 -$PCol 0 0 0 0
}
# Gravity-analysis parameters -- load-controlled static analysis
set Tol 1.0e-8; # convergence tolerance for test
constraints Plain; # how it handles boundary conditions
numberer Plain; # renumber dof's to minimize band-width (optimization), if you want to
system BandGeneral; # how to store and solve the system of equations in the analysis
test NormDispIncr $Tol 6 ; # determine if convergence has been achieved at the end of an iteration step
algorithm Newton; # use Newton's solution algorithm: updates tangent stiffness at every iteration
set NstepGravity 10; # apply gravity in 10 steps
set DGravity [expr 1./$NstepGravity]; # first load increment;
integrator LoadControl $DGravity; # determine the next time step for an analysis
analysis Static; # define type of analysis static or transient
analyze $NstepGravity; # apply gravity
# ------------------------------------------------- maintain constant gravity loads and reset time to zero
loadConst -time 0.0
puts "Model Built"
# DYNAMIC EQ ANALYSIS --------------------------------------------------------
# Uniform Earthquake ground motion (uniform acceleration input at all support nodes)
# set up ground-motion-analysis parameters
set DtAnalysis [expr 0.005]; # time-step Dt for lateral analysis
set TmaxAnalysis [expr 25.]; # maximum duration of ground-motion analysis -- should be 50*$sec
# DYNAMIC ANALYSIS PARAMETERS
# CONSTRAINTS handler -- Determines how the constraint equations are enforced in the analysis (http://opensees.berkeley.edu/OpenSees/m ... al/617.htm)
# Plain Constraints -- Removes constrained degrees of freedom from the system of equations
# Lagrange Multipliers -- Uses the method of Lagrange multipliers to enforce constraints
# Penalty Method -- Uses penalty numbers to enforce constraints
# Transformation Method -- Performs a condensation of constrained degrees of freedom
constraints Transformation ;
# DOF NUMBERER (number the degrees of freedom in the domain): (http://opensees.berkeley.edu/OpenSees/m ... al/366.htm)
# determines the mapping between equation numbers and degrees-of-freedom
# Plain -- Uses the numbering provided by the user
# RCM -- Renumbers the DOF to minimize the matrix band-width using the Reverse Cuthill-McKee algorithm
numberer Plain
# SYSTEM (http://opensees.berkeley.edu/OpenSees/m ... al/371.htm)
# Linear Equation Solvers (how to store and solve the system of equations in the analysis)
# -- provide the solution of the linear system of equations Ku = P. Each solver is tailored to a specific matrix topology.
# ProfileSPD -- Direct profile solver for symmetric positive definite matrices
# BandGeneral -- Direct solver for banded unsymmetric matrices
# BandSPD -- Direct solver for banded symmetric positive definite matrices
# SparseGeneral -- Direct solver for unsymmetric sparse matrices (-piv option)
# SparseSPD -- Direct solver for symmetric sparse matrices
# UmfPack -- Direct UmfPack solver for unsymmetric matrices
system SparseGeneral -piv
# TEST: # convergence test to
# Convergence TEST (http://opensees.berkeley.edu/OpenSees/m ... al/360.htm)
# -- Accept the current state of the domain as being on the converged solution path
# -- determine if convergence has been achieved at the end of an iteration step
# NormUnbalance -- Specifies a tolerance on the norm of the unbalanced load at the current iteration
# NormDispIncr -- Specifies a tolerance on the norm of the displacement increments at the current iteration
# EnergyIncr-- Specifies a tolerance on the inner product of the unbalanced load and displacement increments at the current iteration
# RelativeNormUnbalance --
# RelativeNormDispIncr --
# RelativeEnergyIncr --
set Tol 1.e-8; # Convergence Test: tolerance
set maxNumIter 10; # Convergence Test: maximum number of iterations that will be performed before "failure to converge" is returned
set printFlag 0; # Convergence Test: flag used to print information on convergence (optional) # 1: print information on each step;
set TestType EnergyIncr; # Convergence-test type
test $TestType $Tol $maxNumIter $printFlag;
# Solution ALGORITHM: -- Iterate from the last time step to the current (http://opensees.berkeley.edu/OpenSees/m ... al/682.htm)
# Linear -- Uses the solution at the first iteration and continues
# Newton -- Uses the tangent at the current iteration to iterate to convergence
# ModifiedNewton -- Uses the tangent at the first iteration to iterate to convergence
# NewtonLineSearch --
# KrylovNewton --
# BFGS --
# Broyden --
set algorithmType ModifiedNewton
algorithm $algorithmType;
# Static INTEGRATOR: -- determine the next time step for an analysis (http://opensees.berkeley.edu/OpenSees/m ... al/689.htm)
# LoadControl -- Specifies the incremental load factor to be applied to the loads in the domain
# DisplacementControl -- Specifies the incremental displacement at a specified DOF in the domain
# Minimum Unbalanced Displacement Norm -- Specifies the incremental load factor such that the residual displacement norm in minimized
# Arc Length -- Specifies the incremental arc-length of the load-displacement path
# Transient INTEGRATOR: -- determine the next time step for an analysis including inertial effects
# Newmark -- The two parameter time-stepping method developed by Newmark
# HHT -- The three parameter Hilbert-Hughes-Taylor time-stepping method
# Central Difference -- Approximates velocity and acceleration by centered finite differences of displacement
set NewmarkGamma 0.5; # Newmark-integrator gamma parameter (also HHT)
set NewmarkBeta 0.25; # Newmark-integrator beta parameter
integrator Newmark $NewmarkGamma $NewmarkBeta
# ANALYSIS -- defines what type of analysis is to be performed (http://opensees.berkeley.edu/OpenSees/m ... al/324.htm)
# Static Analysis -- solves the KU=R problem, without the mass or damping matrices.
# Transient Analysis -- solves the time-dependent analysis. The time step in this type of analysis is constant. The time step in the output is also constant.
# variableTransient Analysis -- performs the same analysis type as the Transient Analysis object. The time step, however, is variable. This method is used when
# there are convergence problems with the Transient Analysis object at a peak or when the time step is too small. The time step in the output is also variable.
analysis Transient
# define DAMPING--------------------------------------------------------------------------------------
# apply Rayleigh DAMPING from $xDamp
# D=$alphaM*M + $betaKcurr*Kcurrent + $betaKcomm*KlastCommit + $beatKinit*$Kinitial
set xDamp 0.02; # 2% damping ratio
set lambda [eigen 1]; # eigenvalue mode 1
set omega [expr pow($lambda,0.5)];
set alphaM 0.; # M-prop. damping; D = alphaM*M
set betaKcurr 0.; # K-proportional damping; +beatKcurr*KCurrent
set betaKcomm [expr 2.*$xDamp/($omega)]; # K-prop. damping parameter; +betaKcomm*KlastCommitt
set betaKinit 0.; # initial-stiffness proportional damping +beatKinit*Kini
# define damping
rayleigh $alphaM $betaKcurr $betaKinit $betaKcomm; # RAYLEIGH damping
# --------------------------------- perform Dynamic Ground-Motion Analysis
# Uniform EXCITATION: acceleration input
set IDloadTag 400; # load tag
set dt [expr 0.01/2.12]; # time step for input ground motion(Time Scale Factor=2.12)
set gx [expr 0.7*$g]
set lomax "Path -filePath NF03.txt -dt $dt -factor $gx"
set lomay "Path -filePath NF04.txt -dt $dt -factor $gx"
set lomaz "Path -filePath NFV.txt -dt $dt -factor $gx"
pattern UniformExcitation 2 1 -accel $lomax
pattern UniformExcitation 3 3 -accel $lomay
pattern UniformExcitation 4 2 -accel $lomaz
set Nsteps [expr int($TmaxAnalysis/$DtAnalysis)];
set ok [analyze $Nsteps $DtAnalysis]; # actually perform analysis; returns ok=0 if analysis was successful
if {$ok != 0} { ; # if analysis was not successful.
# change some analysis parameters to achieve convergence
# performance is slower inside this loop
# Time-controlled analysis
set ok 0;
set controlTime [getTime];
while {$controlTime < $TmaxAnalysis && $ok == 0} {
set ok [analyze 1 $DtAnalysis]
set controlTime [getTime]
set ok [analyze 1 $DtAnalysis]
if {$ok != 0} {
puts "Trying Newton with Initial Tangent .."
test NormDispIncr $Tol 1000 0
algorithm Newton -initial
set ok [analyze 1 $DtAnalysis]
test $TestType $Tol $maxNumIter 0
algorithm $algorithmType
}
if {$ok != 0} {
puts "Trying Broyden .."
algorithm Broyden 8
set ok [analyze 1 $DtAnalysis]
algorithm $algorithmType
}
if {$ok != 0} {
puts "Trying NewtonWithLineSearch .."
algorithm NewtonLineSearch .8
set ok [analyze 1 $DtAnalysis]
algorithm $algorithmType
}
}
}; # end if ok !0
puts "Ground Motion Done. End Time: [getTime]"
# define final GRAVITY -------------------------------------------------------------
wipeAnalysis
loadConst -time 0.0
pattern Plain 2 Linear {
load 2 0 -20 0 0 0 0
}
# Gravity-analysis parameters -- load-controlled static analysis
set Tol 1.0e-8; # convergence tolerance for test
constraints Plain; # how it handles boundary conditions
numberer Plain; # renumber dof's to minimize band-width (optimization), if you want to
system BandGeneral; # how to store and solve the system of equations in the analysis
test NormDispIncr $Tol 6 ; # determine if convergence has been achieved at the end of an iteration step
algorithm Newton; # use Newton's solution algorithm: updates tangent stiffness at every iteration
set NstepGravity 10; # apply gravity in 10 steps
set DGravity [expr 1./$NstepGravity]; # first load increment;
integrator LoadControl $DGravity; # determine the next time step for an analysis
analysis Static; # define type of analysis static or transient
analyze $NstepGravity; # apply gravity
# ------------------------------------------------- maintain constant gravity loads and reset time to zero
loadConst -time 0.0
puts "Model Built"
Re: gravity analysis after dynamic analysis
the error message is saying that you are repeating the load pattern tag. either remove the old one or give the new one a different tag.
Re: gravity analysis after dynamic analysis
hi
I do what you say,but i can not run the above file. how can i do gravity analysis after dynamic analysis?
I do what you say,but i can not run the above file. how can i do gravity analysis after dynamic analysis?