@semprelibera
2018-06-23T05:01:06.000000Z
字数 14106
阅读 1689
assignment
# --------------------------------------------------------------------------------------------------# Example 2. 2D cantilever column, static pushover# fiber section, nonlinearBeamColumn element# Silvia Mazzoni & Frank McKenna, 2006## ^Y# |# 2 __# | |# | |# | |# (1) LCol# | |# | |# | |# =1= _|_ -------->X## SET UP ----------------------------------------------------------------------------# units: N, mm, secwipe; # clear memory of all past model definitionsfile mkdir DataHyst; # create data directorymodel BasicBuilder -ndm 2 -ndf 3; # Define the model builder, ndm=#dimension, ndf=#dofs# define GEOMETRY -------------------------------------------------------------######## 把这里改成Gill试验中的构件几何尺寸#######--------------------------startset LCol 1200; # column lengthset Weight 1815000.; # superstructure weight# define section geometryset HCol 550; # Column Depthset BCol 550; # Column Width#######---------------------------end# calculated parametersset PCol $Weight; # nodal dead-load weight per column########重力加速度改成9.81N/kg#######------startset g 9.81; # g.#######------endset Mass [expr $PCol/$g]; # nodal mass# calculated geometry parametersset ACol [expr $BCol*$HCol]; # cross-sectional areaset IzCol [expr 1./12.*$BCol*pow($HCol,3)]; # Column moment of inertia# nodal coordinates:node 1 0 0; # node#, X, Ynode 2 0 $LCol# Single point constraints -- Boundary Conditionsfix 1 1 1 1; # node DX DY RZ# nodal masses:mass 2 $Mass 1e-9 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#########改保护层信息以、纵筋数量、纵筋面积########---------startset coverCol 40.; # Column cover to reinforcing steel NA.set numBarsCol 4; # number of longitudinal-reinforcement bars in each side of column section. (symmetric top & bot)set barAreaCol 452.4 ; # area of longitudinal-reinforcement bars########----------end#########这里混凝土和纵筋的材料性质信息需要按照Gill试验进行修改########---------------start# MATERIAL parameters -------------------------------------------------------------------set IDconcU 1; # material ID tag -- unconfined cover concreteset IDreinf 2; # material ID tag -- reinforcement# nominal concrete compressive strengthset fc -23.1; # CONCRETE Compressive Strength (+Tension, -Compression)set Ec [expr 57000*sqrt(-$fc*1.45e2)*6.89e-3]; # Concrete Elastic Modulus (the term in sqr root needs to be in psi# unconfined concreteset fc1U $fc; # UNCONFINED concrete (todeschini parabolic model), maximum stressset eps1U -0.003; # strain at maximum strength of unconfined concreteset fc2U [expr 0.2*$fc1U]; # ultimate stressset eps2U -0.01; # strain at ultimate stressset lambda 0.1; # ratio between unloading slope at $eps2 and initial slope $Ec# tensile-strength propertiesset ftU [expr -0.14*$fc1U]; # tensile strength +tensionset Ets [expr $ftU/0.002]; # tension softening stiffness# -----------set Fy 375.; # STEEL yield stressset Es 287500.; # modulus of steelset Bs 0.03; # strain-hardening ratioset R0 18; # control the transition from elastic to plastic branchesset cR1 0.925; # control the transition from elastic to plastic branchesset cR2 0.15; # control the transition from elastic to plastic branchesuniaxialMaterial Concrete02 $IDconcU $fc1U $eps1U $fc2U $eps2U $lambda $ftU $Ets; # build cover concrete (unconfined)uniaxialMaterial Steel02 $IDreinf $Fy $Es $Bs $R0 $cR1 $cR2; # build reinforcement material########---------------end# FIBER SECTION properties -------------------------------------------------------------# symmetric section## y# ^# |# --------------------- -- --# | o o o | | -- cover# | | |# | | |# z <--- | + | H# | | |# | | |# | o o o | | -- cover# --------------------- -- --# |-------- B --------|## RC section:set coverY [expr $HCol/2.0]; # The distance from the section z-axis to the edge of the cover concrete -- outer edge of cover concreteset coverZ [expr $BCol/2.0]; # The distance from the section y-axis to the edge of the cover concrete -- outer edge of cover concreteset coreY [expr $coverY-$coverCol]set coreZ [expr $coverZ-$coverCol]set nfY 16; # number of fibers for concrete in y-directionset nfZ 4; # number of fibers for concrete in z-direction#########这里布置纵筋钢筋########------------startsection fiberSec $ColSecTag {; # Define the fiber sectionpatch quad $IDconcU $nfZ $nfY -$coverY $coverZ -$coverY -$coverZ $coverY -$coverZ $coverY $coverZ; # Define the concrete patchlayer straight $IDreinf $numBarsCol $barAreaCol -$coreY $coreZ -$coreY -$coreZ; # top layer reinfocementlayer straight $IDreinf $numBarsCol $barAreaCol $coreY $coreZ $coreY -$coreZ; # bottom layer reinforcement# layer straight $IDreinf $numBarsCol $barAreaCol $coreY $coreZ -$coreY $coreZ; # left layer reinforcement# layer straight $IDreinf $numBarsCol $barAreaCol $coreY -$coreZ -$coreY -$coreZ; # right layer reinforcement}; # end of fibersection definition########----------end# define geometric transformation: performs a linear geometric transformation of beam stiffness and resisting force from the basic system to the global-coordinate systemset ColTransfTag 1; # associate a tag to column transformationgeomTransf Linear $ColTransfTag ;# element connectivity:set numIntgrPts 5; # number of integration points for force-based elementelement nonlinearBeamColumn 1 1 2 $numIntgrPts $ColSecTag $ColTransfTag; # self-explanatory when using variables# Define RECORDERS -------------------------------------------------------------recorder Node -file DataHyst/DFree.out -time -node 2 -dof 1 2 3 disp; # displacements of free nodesrecorder Node -file DataHyst/DBase.out -time -node 1 -dof 1 2 3 disp; # displacements of support nodesrecorder Node -file DataHyst/RBase.out -time -node 1 -dof 1 2 3 reaction; # support reactionrecorder Drift -file DataHyst/Drift.out -time -iNode 1 -jNode 2 -dof 1 -perpDirn 2 ; # lateral driftrecorder Element -file DataHyst/FCol.out -time -ele 2 globalForce; # element forces -- columnrecorder Element -file DataHyst/ForceColSec1.out -time -ele 1 section 1 force; # Column section forces, axial and moment, node irecorder Element -file DataHyst/DefoColSec1.out -time -ele 1 section 1 deformation; # section deformations, axial and curvature, node irecorder Element -file DataHyst/ForceColSec$numIntgrPts.out -time -ele 1 section $numIntgrPts force; # section forces, axial and moment, node jrecorder Element -file DataHyst/DefoColSec$numIntgrPts.out -time -ele 1 section 1 deformation; # section deformations, axial and curvature, node j# define GRAVITY -------------------------------------------------------------pattern Plain 1 Linear {load 2 0 -$PCol 0}# Gravity-analysis parameters -- load-controlled static analysisset Tol 1.0e-8; # convergence tolerance for testconstraints Plain; # how it handles boundary conditionsnumberer Plain; # renumber dof's to minimize band-width (optimization), if you want tosystem BandGeneral; # how to store and solve the system of equations in the analysistest NormDispIncr $Tol 6 ; # determine if convergence has been achieved at the end of an iteration stepalgorithm Newton; # use Newton's solution algorithm: updates tangent stiffness at every iterationset NstepGravity 10; # apply gravity in 10 stepsset DGravity [expr 1./$NstepGravity]; # first load increment;integrator LoadControl $DGravity; # determine the next time step for an analysisanalysis Static; # define type of analysis static or transientanalyze $NstepGravity; # apply gravity# ------------------------------------------------- maintain constant gravity loads and reset time to zeroloadConst -time 0.0puts "Model Built"# STATIC PUSHOVER ANALYSIS --------------------------------------------------------------------------------------------------## we need to set up parameters that are particular to the model.set IDctrlNode 2; # node where displacement is read for displacement controlset IDctrlDOF 1; # degree of freedom of displacement read for displacement controset Dmax [expr 0.03*$LCol]; # maximum displacement of pushover. push to 10% drift.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#########这里输入位移加载的幅值########---------------startset Amp1 3.0set Amp2 6.0set Amp3 10.0set Amp4 20.0set Amp5 34.0########---------------end# create load pattern for lateral pushover loadset 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 patternpattern Plain 200 Linear {; # define load pattern -- generalizedload 2 $Hload 0.0 0.0; # define lateral load in static lateral analysis}# ----------- set up analysis parameters# CONSTRAINTS handler -- Determines how the constraint equations are enforced in the analysis (http://opensees.berkeley.edu/OpenSees/manuals/usermanual/617.htm)# Plain Constraints -- Removes constrained degrees of freedom from the system of equations (only for homogeneous equations)# Lagrange Multipliers -- Uses the method of Lagrange multipliers to enforce constraints# Penalty Method -- Uses penalty numbers to enforce constraints --good for static analysis with non-homogeneous eqns (rigidDiaphragm)# Transformation Method -- Performs a condensation of constrained degrees of freedomconstraints Plain;# DOF NUMBERER (number the degrees of freedom in the domain): (http://opensees.berkeley.edu/OpenSees/manuals/usermanual/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 algorithmnumberer Plain# SYSTEM (http://opensees.berkeley.edu/OpenSees/manuals/usermanual/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# SparseSPD -- Direct solver for symmetric sparse matrices# UmfPack -- Direct UmfPack solver for unsymmetric matricessystem BandGeneral# TEST: # convergence test to# Convergence TEST (http://opensees.berkeley.edu/OpenSees/manuals/usermanual/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 iterationset Tol 1.e-5; # Convergence Test: toleranceset maxNumIter 6000; # Convergence Test: maximum number of iterations that will be performed before "failure to converge" is returnedset printFlag 0; # Convergence Test: flag used to print information on convergence (optional) # 1: print information on each step;set TestType NormDispIncr ; # Convergence-test typetest $TestType $Tol $maxNumIter $printFlag;# Solution ALGORITHM: -- Iterate from the last time step to the current (http://opensees.berkeley.edu/OpenSees/manuals/usermanual/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 convergenceset algorithmType Newton#algorithm $algorithmType;algorithm Newton -initial# Static INTEGRATOR: -- determine the next time step for an analysis (http://opensees.berkeley.edu/OpenSees/manuals/usermanual/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 displacementanalysis Staticintegrator DisplacementControl $IDctrlNode $IDctrlDOF $Dincr# ANALYSIS -- defines what type of analysis is to be performed (http://opensees.berkeley.edu/OpenSees/manuals/usermanual/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 Static# --------------------------------- perform Static Pushover Analysis#########这里设置具体的位移加载方式########---------------------startset Nsteps [expr int($Amp1/$Dincr)]; # number of pushover analysis stepsset ok [analyze $Nsteps]; # this will return zero if no convergence problems were encounteredintegrator DisplacementControl $IDctrlNode $IDctrlDOF [expr -1*$Dincr]set Nsteps [expr int(2*$Amp1/$Dincr)];set ok [analyze $Nsteps];integrator DisplacementControl $IDctrlNode $IDctrlDOF $Dincrset Nsteps [expr int(($Amp1+$Amp2)/$Dincr)];set ok [analyze $Nsteps];integrator DisplacementControl $IDctrlNode $IDctrlDOF [expr -1*$Dincr]set Nsteps [expr int(2*$Amp2/$Dincr)];set ok [analyze $Nsteps];integrator DisplacementControl $IDctrlNode $IDctrlDOF $Dincrset Nsteps [expr int(($Amp2+$Amp3)/$Dincr)];set ok [analyze $Nsteps];integrator DisplacementControl $IDctrlNode $IDctrlDOF [expr -1*$Dincr]set Nsteps [expr int(2*$Amp3/$Dincr)];set ok [analyze $Nsteps];integrator DisplacementControl $IDctrlNode $IDctrlDOF $Dincrset Nsteps [expr int(($Amp3+$Amp4)/$Dincr)];set ok [analyze $Nsteps];integrator DisplacementControl $IDctrlNode $IDctrlDOF [expr -1*$Dincr]set Nsteps [expr int(2*$Amp4/$Dincr)];set ok [analyze $Nsteps];integrator DisplacementControl $IDctrlNode $IDctrlDOF $Dincrset Nsteps [expr int(($Amp4+$Amp5)/$Dincr)];set ok [analyze $Nsteps];integrator DisplacementControl $IDctrlNode $IDctrlDOF [expr -1*$Dincr]set Nsteps [expr int(2*$Amp5/$Dincr)];set ok [analyze $Nsteps];integrator DisplacementControl $IDctrlNode $IDctrlDOF $Dincrset Nsteps [expr int($Amp5/$Dincr)];set ok [analyze $Nsteps];########------------------------end# ---------------------------------- in case of convergence problemsif {$ok != 0} {# change some analysis parameters to achieve convergence# performance is slower inside this loopset ok 0;set controlDisp 0.0; # start from zeroset D0 0.0; # start from zeroset Dstep [expr ($controlDisp-$D0)/($Dmax-$D0)]while {$Dstep < 1.0 && $ok == 0} {set controlDisp [nodeDisp $IDctrlNode $IDctrlDOF ]set Dstep [expr ($controlDisp-$D0)/($Dmax-$D0)]set ok [analyze 1 ]if {$ok != 0} {puts "Trying Newton with Initial Tangent .."test NormDispIncr $Tol 2000 0algorithm Newton -initialset ok [analyze 1 ]test $TestType $Tol $maxNumIter 0algorithm $algorithmType}if {$ok != 0} {puts "Trying Broyden .."algorithm Broyden 8set ok [analyze 1 ]algorithm $algorithmType}if {$ok != 0} {puts "Trying NewtonWithLineSearch .."algorithm NewtonLineSearch .8set ok [analyze 1 ]algorithm $algorithmType}}}; # end if ok !0puts "DonePushover"