[关闭]
@semprelibera 2018-06-23T05:01:06.000000Z 字数 14106 阅读 1689

OpenSEES悬臂梁滞回模拟

assignment


  1. # --------------------------------------------------------------------------------------------------
  2. # Example 2. 2D cantilever column, static pushover
  3. # fiber section, nonlinearBeamColumn element
  4. # Silvia Mazzoni & Frank McKenna, 2006
  5. #
  6. # ^Y
  7. # |
  8. # 2 __
  9. # | |
  10. # | |
  11. # | |
  12. # (1) LCol
  13. # | |
  14. # | |
  15. # | |
  16. # =1= _|_ -------->X
  17. #
  18. # SET UP ----------------------------------------------------------------------------
  19. # units: N, mm, sec
  20. wipe; # clear memory of all past model definitions
  21. file mkdir DataHyst; # create data directory
  22. model BasicBuilder -ndm 2 -ndf 3; # Define the model builder, ndm=#dimension, ndf=#dofs
  23. # define GEOMETRY -------------------------------------------------------------
  24. #######
  25. # 把这里改成Gill试验中的构件几何尺寸
  26. #######--------------------------start
  27. set LCol 1200; # column length
  28. set Weight 1815000.; # superstructure weight
  29. # define section geometry
  30. set HCol 550; # Column Depth
  31. set BCol 550; # Column Width
  32. #######---------------------------end
  33. # calculated parameters
  34. set PCol $Weight; # nodal dead-load weight per column
  35. #######
  36. #重力加速度改成9.81N/kg
  37. #######------start
  38. set g 9.81; # g.
  39. #######------end
  40. set Mass [expr $PCol/$g]; # nodal mass
  41. # calculated geometry parameters
  42. set ACol [expr $BCol*$HCol]; # cross-sectional area
  43. set IzCol [expr 1./12.*$BCol*pow($HCol,3)]; # Column moment of inertia
  44. # nodal coordinates:
  45. node 1 0 0; # node#, X, Y
  46. node 2 0 $LCol
  47. # Single point constraints -- Boundary Conditions
  48. fix 1 1 1 1; # node DX DY RZ
  49. # nodal masses:
  50. mass 2 $Mass 1e-9 0.; # node#, Mx My Mz, Mass=Weight/g, neglect rotational inertia at nodes
  51. # Define ELEMENTS & SECTIONS -------------------------------------------------------------
  52. set ColSecTag 1; # assign a tag number to the column section
  53. # define section geometry
  54. ########
  55. #改保护层信息以、纵筋数量、纵筋面积
  56. ########---------start
  57. set coverCol 40.; # Column cover to reinforcing steel NA.
  58. set numBarsCol 4; # number of longitudinal-reinforcement bars in each side of column section. (symmetric top & bot)
  59. set barAreaCol 452.4 ; # area of longitudinal-reinforcement bars
  60. ########----------end
  61. ########
  62. #这里混凝土和纵筋的材料性质信息需要按照Gill试验进行修改
  63. ########---------------start
  64. # MATERIAL parameters -------------------------------------------------------------------
  65. set IDconcU 1; # material ID tag -- unconfined cover concrete
  66. set IDreinf 2; # material ID tag -- reinforcement
  67. # nominal concrete compressive strength
  68. set fc -23.1; # CONCRETE Compressive Strength (+Tension, -Compression)
  69. set Ec [expr 57000*sqrt(-$fc*1.45e2)*6.89e-3]; # Concrete Elastic Modulus (the term in sqr root needs to be in psi
  70. # unconfined concrete
  71. set fc1U $fc; # UNCONFINED concrete (todeschini parabolic model), maximum stress
  72. set eps1U -0.003; # strain at maximum strength of unconfined concrete
  73. set fc2U [expr 0.2*$fc1U]; # ultimate stress
  74. set eps2U -0.01; # strain at ultimate stress
  75. set lambda 0.1; # ratio between unloading slope at $eps2 and initial slope $Ec
  76. # tensile-strength properties
  77. set ftU [expr -0.14*$fc1U]; # tensile strength +tension
  78. set Ets [expr $ftU/0.002]; # tension softening stiffness
  79. # -----------
  80. set Fy 375.; # STEEL yield stress
  81. set Es 287500.; # modulus of steel
  82. set Bs 0.03; # strain-hardening ratio
  83. set R0 18; # control the transition from elastic to plastic branches
  84. set cR1 0.925; # control the transition from elastic to plastic branches
  85. set cR2 0.15; # control the transition from elastic to plastic branches
  86. uniaxialMaterial Concrete02 $IDconcU $fc1U $eps1U $fc2U $eps2U $lambda $ftU $Ets; # build cover concrete (unconfined)
  87. uniaxialMaterial Steel02 $IDreinf $Fy $Es $Bs $R0 $cR1 $cR2; # build reinforcement material
  88. ########---------------end
  89. # FIBER SECTION properties -------------------------------------------------------------
  90. # symmetric section
  91. #
  92. # y
  93. # ^
  94. # |
  95. # --------------------- -- --
  96. # | o o o | | -- cover
  97. # | | |
  98. # | | |
  99. # z <--- | + | H
  100. # | | |
  101. # | | |
  102. # | o o o | | -- cover
  103. # --------------------- -- --
  104. # |-------- B --------|
  105. #
  106. # RC section:
  107. set coverY [expr $HCol/2.0]; # The distance from the section z-axis to the edge of the cover concrete -- outer edge of cover concrete
  108. set coverZ [expr $BCol/2.0]; # The distance from the section y-axis to the edge of the cover concrete -- outer edge of cover concrete
  109. set coreY [expr $coverY-$coverCol]
  110. set coreZ [expr $coverZ-$coverCol]
  111. set nfY 16; # number of fibers for concrete in y-direction
  112. set nfZ 4; # number of fibers for concrete in z-direction
  113. ########
  114. #这里布置纵筋钢筋
  115. ########------------start
  116. section fiberSec $ColSecTag {; # Define the fiber section
  117. patch quad $IDconcU $nfZ $nfY -$coverY $coverZ -$coverY -$coverZ $coverY -$coverZ $coverY $coverZ; # Define the concrete patch
  118. layer straight $IDreinf $numBarsCol $barAreaCol -$coreY $coreZ -$coreY -$coreZ; # top layer reinfocement
  119. layer straight $IDreinf $numBarsCol $barAreaCol $coreY $coreZ $coreY -$coreZ; # bottom layer reinforcement
  120. # layer straight $IDreinf $numBarsCol $barAreaCol $coreY $coreZ -$coreY $coreZ; # left layer reinforcement
  121. # layer straight $IDreinf $numBarsCol $barAreaCol $coreY -$coreZ -$coreY -$coreZ; # right layer reinforcement
  122. }; # end of fibersection definition
  123. ########----------end
  124. # define geometric transformation: performs a linear geometric transformation of beam stiffness and resisting force from the basic system to the global-coordinate system
  125. set ColTransfTag 1; # associate a tag to column transformation
  126. geomTransf Linear $ColTransfTag ;
  127. # element connectivity:
  128. set numIntgrPts 5; # number of integration points for force-based element
  129. element nonlinearBeamColumn 1 1 2 $numIntgrPts $ColSecTag $ColTransfTag; # self-explanatory when using variables
  130. # Define RECORDERS -------------------------------------------------------------
  131. recorder Node -file DataHyst/DFree.out -time -node 2 -dof 1 2 3 disp; # displacements of free nodes
  132. recorder Node -file DataHyst/DBase.out -time -node 1 -dof 1 2 3 disp; # displacements of support nodes
  133. recorder Node -file DataHyst/RBase.out -time -node 1 -dof 1 2 3 reaction; # support reaction
  134. recorder Drift -file DataHyst/Drift.out -time -iNode 1 -jNode 2 -dof 1 -perpDirn 2 ; # lateral drift
  135. recorder Element -file DataHyst/FCol.out -time -ele 2 globalForce; # element forces -- column
  136. recorder Element -file DataHyst/ForceColSec1.out -time -ele 1 section 1 force; # Column section forces, axial and moment, node i
  137. recorder Element -file DataHyst/DefoColSec1.out -time -ele 1 section 1 deformation; # section deformations, axial and curvature, node i
  138. recorder Element -file DataHyst/ForceColSec$numIntgrPts.out -time -ele 1 section $numIntgrPts force; # section forces, axial and moment, node j
  139. recorder Element -file DataHyst/DefoColSec$numIntgrPts.out -time -ele 1 section 1 deformation; # section deformations, axial and curvature, node j
  140. # define GRAVITY -------------------------------------------------------------
  141. pattern Plain 1 Linear {
  142. load 2 0 -$PCol 0
  143. }
  144. # Gravity-analysis parameters -- load-controlled static analysis
  145. set Tol 1.0e-8; # convergence tolerance for test
  146. constraints Plain; # how it handles boundary conditions
  147. numberer Plain; # renumber dof's to minimize band-width (optimization), if you want to
  148. system BandGeneral; # how to store and solve the system of equations in the analysis
  149. test NormDispIncr $Tol 6 ; # determine if convergence has been achieved at the end of an iteration step
  150. algorithm Newton; # use Newton's solution algorithm: updates tangent stiffness at every iteration
  151. set NstepGravity 10; # apply gravity in 10 steps
  152. set DGravity [expr 1./$NstepGravity]; # first load increment;
  153. integrator LoadControl $DGravity; # determine the next time step for an analysis
  154. analysis Static; # define type of analysis static or transient
  155. analyze $NstepGravity; # apply gravity
  156. # ------------------------------------------------- maintain constant gravity loads and reset time to zero
  157. loadConst -time 0.0
  158. puts "Model Built"
  159. # STATIC PUSHOVER ANALYSIS --------------------------------------------------------------------------------------------------
  160. #
  161. # we need to set up parameters that are particular to the model.
  162. set IDctrlNode 2; # node where displacement is read for displacement control
  163. set IDctrlDOF 1; # degree of freedom of displacement read for displacement contro
  164. set Dmax [expr 0.03*$LCol]; # maximum displacement of pushover. push to 10% drift.
  165. set Dincr [expr 0.00001*$LCol]; # displacement increment for pushover. you want this to be very small, but not too small to slow down the analysis
  166. ########
  167. #这里输入位移加载的幅值
  168. ########---------------start
  169. set Amp1 3.0
  170. set Amp2 6.0
  171. set Amp3 10.0
  172. set Amp4 20.0
  173. set Amp5 34.0
  174. ########---------------end
  175. # create load pattern for lateral pushover load
  176. set Hload $Weight; # define the lateral load as a proportion of the weight so that the pseudo time equals the lateral-load coefficient when using linear load pattern
  177. pattern Plain 200 Linear {; # define load pattern -- generalized
  178. load 2 $Hload 0.0 0.0; # define lateral load in static lateral analysis
  179. }
  180. # ----------- set up analysis parameters
  181. # CONSTRAINTS handler -- Determines how the constraint equations are enforced in the analysis (http://opensees.berkeley.edu/OpenSees/manuals/usermanual/617.htm)
  182. # Plain Constraints -- Removes constrained degrees of freedom from the system of equations (only for homogeneous equations)
  183. # Lagrange Multipliers -- Uses the method of Lagrange multipliers to enforce constraints
  184. # Penalty Method -- Uses penalty numbers to enforce constraints --good for static analysis with non-homogeneous eqns (rigidDiaphragm)
  185. # Transformation Method -- Performs a condensation of constrained degrees of freedom
  186. constraints Plain;
  187. # DOF NUMBERER (number the degrees of freedom in the domain): (http://opensees.berkeley.edu/OpenSees/manuals/usermanual/366.htm)
  188. # determines the mapping between equation numbers and degrees-of-freedom
  189. # Plain -- Uses the numbering provided by the user
  190. # RCM -- Renumbers the DOF to minimize the matrix band-width using the Reverse Cuthill-McKee algorithm
  191. numberer Plain
  192. # SYSTEM (http://opensees.berkeley.edu/OpenSees/manuals/usermanual/371.htm)
  193. # Linear Equation Solvers (how to store and solve the system of equations in the analysis)
  194. # -- provide the solution of the linear system of equations Ku = P. Each solver is tailored to a specific matrix topology.
  195. # ProfileSPD -- Direct profile solver for symmetric positive definite matrices
  196. # BandGeneral -- Direct solver for banded unsymmetric matrices
  197. # BandSPD -- Direct solver for banded symmetric positive definite matrices
  198. # SparseGeneral -- Direct solver for unsymmetric sparse matrices
  199. # SparseSPD -- Direct solver for symmetric sparse matrices
  200. # UmfPack -- Direct UmfPack solver for unsymmetric matrices
  201. system BandGeneral
  202. # TEST: # convergence test to
  203. # Convergence TEST (http://opensees.berkeley.edu/OpenSees/manuals/usermanual/360.htm)
  204. # -- Accept the current state of the domain as being on the converged solution path
  205. # -- determine if convergence has been achieved at the end of an iteration step
  206. # NormUnbalance -- Specifies a tolerance on the norm of the unbalanced load at the current iteration
  207. # NormDispIncr -- Specifies a tolerance on the norm of the displacement increments at the current iteration
  208. # EnergyIncr-- Specifies a tolerance on the inner product of the unbalanced load and displacement increments at the current iteration
  209. set Tol 1.e-5; # Convergence Test: tolerance
  210. set maxNumIter 6000; # Convergence Test: maximum number of iterations that will be performed before "failure to converge" is returned
  211. set printFlag 0; # Convergence Test: flag used to print information on convergence (optional) # 1: print information on each step;
  212. set TestType NormDispIncr ; # Convergence-test type
  213. test $TestType $Tol $maxNumIter $printFlag;
  214. # Solution ALGORITHM: -- Iterate from the last time step to the current (http://opensees.berkeley.edu/OpenSees/manuals/usermanual/682.htm)
  215. # Linear -- Uses the solution at the first iteration and continues
  216. # Newton -- Uses the tangent at the current iteration to iterate to convergence
  217. # ModifiedNewton -- Uses the tangent at the first iteration to iterate to convergence
  218. set algorithmType Newton
  219. #algorithm $algorithmType;
  220. algorithm Newton -initial
  221. # Static INTEGRATOR: -- determine the next time step for an analysis (http://opensees.berkeley.edu/OpenSees/manuals/usermanual/689.htm)
  222. # LoadControl -- Specifies the incremental load factor to be applied to the loads in the domain
  223. # DisplacementControl -- Specifies the incremental displacement at a specified DOF in the domain
  224. # Minimum Unbalanced Displacement Norm -- Specifies the incremental load factor such that the residual displacement norm in minimized
  225. # Arc Length -- Specifies the incremental arc-length of the load-displacement path
  226. # Transient INTEGRATOR: -- determine the next time step for an analysis including inertial effects
  227. # Newmark -- The two parameter time-stepping method developed by Newmark
  228. # HHT -- The three parameter Hilbert-Hughes-Taylor time-stepping method
  229. # Central Difference -- Approximates velocity and acceleration by centered finite differences of displacement
  230. analysis Static
  231. integrator DisplacementControl $IDctrlNode $IDctrlDOF $Dincr
  232. # ANALYSIS -- defines what type of analysis is to be performed (http://opensees.berkeley.edu/OpenSees/manuals/usermanual/324.htm)
  233. # Static Analysis -- solves the KU=R problem, without the mass or damping matrices.
  234. # 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.
  235. # variableTransient Analysis -- performs the same analysis type as the Transient Analysis object. The time step, however, is variable. This method is used when
  236. # 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.
  237. #analysis Static
  238. # --------------------------------- perform Static Pushover Analysis
  239. ########
  240. #这里设置具体的位移加载方式
  241. ########---------------------start
  242. set Nsteps [expr int($Amp1/$Dincr)]; # number of pushover analysis steps
  243. set ok [analyze $Nsteps]; # this will return zero if no convergence problems were encountered
  244. integrator DisplacementControl $IDctrlNode $IDctrlDOF [expr -1*$Dincr]
  245. set Nsteps [expr int(2*$Amp1/$Dincr)];
  246. set ok [analyze $Nsteps];
  247. integrator DisplacementControl $IDctrlNode $IDctrlDOF $Dincr
  248. set Nsteps [expr int(($Amp1+$Amp2)/$Dincr)];
  249. set ok [analyze $Nsteps];
  250. integrator DisplacementControl $IDctrlNode $IDctrlDOF [expr -1*$Dincr]
  251. set Nsteps [expr int(2*$Amp2/$Dincr)];
  252. set ok [analyze $Nsteps];
  253. integrator DisplacementControl $IDctrlNode $IDctrlDOF $Dincr
  254. set Nsteps [expr int(($Amp2+$Amp3)/$Dincr)];
  255. set ok [analyze $Nsteps];
  256. integrator DisplacementControl $IDctrlNode $IDctrlDOF [expr -1*$Dincr]
  257. set Nsteps [expr int(2*$Amp3/$Dincr)];
  258. set ok [analyze $Nsteps];
  259. integrator DisplacementControl $IDctrlNode $IDctrlDOF $Dincr
  260. set Nsteps [expr int(($Amp3+$Amp4)/$Dincr)];
  261. set ok [analyze $Nsteps];
  262. integrator DisplacementControl $IDctrlNode $IDctrlDOF [expr -1*$Dincr]
  263. set Nsteps [expr int(2*$Amp4/$Dincr)];
  264. set ok [analyze $Nsteps];
  265. integrator DisplacementControl $IDctrlNode $IDctrlDOF $Dincr
  266. set Nsteps [expr int(($Amp4+$Amp5)/$Dincr)];
  267. set ok [analyze $Nsteps];
  268. integrator DisplacementControl $IDctrlNode $IDctrlDOF [expr -1*$Dincr]
  269. set Nsteps [expr int(2*$Amp5/$Dincr)];
  270. set ok [analyze $Nsteps];
  271. integrator DisplacementControl $IDctrlNode $IDctrlDOF $Dincr
  272. set Nsteps [expr int($Amp5/$Dincr)];
  273. set ok [analyze $Nsteps];
  274. ########------------------------end
  275. # ---------------------------------- in case of convergence problems
  276. if {$ok != 0} {
  277. # change some analysis parameters to achieve convergence
  278. # performance is slower inside this loop
  279. set ok 0;
  280. set controlDisp 0.0; # start from zero
  281. set D0 0.0; # start from zero
  282. set Dstep [expr ($controlDisp-$D0)/($Dmax-$D0)]
  283. while {$Dstep < 1.0 && $ok == 0} {
  284. set controlDisp [nodeDisp $IDctrlNode $IDctrlDOF ]
  285. set Dstep [expr ($controlDisp-$D0)/($Dmax-$D0)]
  286. set ok [analyze 1 ]
  287. if {$ok != 0} {
  288. puts "Trying Newton with Initial Tangent .."
  289. test NormDispIncr $Tol 2000 0
  290. algorithm Newton -initial
  291. set ok [analyze 1 ]
  292. test $TestType $Tol $maxNumIter 0
  293. algorithm $algorithmType
  294. }
  295. if {$ok != 0} {
  296. puts "Trying Broyden .."
  297. algorithm Broyden 8
  298. set ok [analyze 1 ]
  299. algorithm $algorithmType
  300. }
  301. if {$ok != 0} {
  302. puts "Trying NewtonWithLineSearch .."
  303. algorithm NewtonLineSearch .8
  304. set ok [analyze 1 ]
  305. algorithm $algorithmType
  306. }
  307. }
  308. }; # end if ok !0
  309. puts "DonePushover"
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注