how to start from one special step?
Moderators: silvia, selimgunay, Moderators
-
- Posts: 94
- Joined: Fri May 11, 2007 9:53 pm
- Location: tongji university
how to start from one special step?
in static cycle analysis, the last step is corresponding to the displaecment=0, if the next analysis is expected to begin at the step corresponding to the force=0, how to do it?
the following will work if series all result in a load factor of 0 at time 0.0
or just remove all load patterns, do 1 analysis step, & add them back.
Code: Select all
setTime 0.0
loadControl 0.0
analyze 1
-
- Posts: 94
- Joined: Fri May 11, 2007 9:53 pm
- Location: tongji university
thank you ,fmk! I seeked in the manual ,but can't find setTime or loadControl command, how to use them?
I applied the gravity load first ,and then apply the static cyclic load using displacement control, at last , i want to apply a additional load just after the substep of force=0, but in the static cyclic load, the last substep is displacement=0. the used manuscript is just ex5 downloaded in the site. could you tell me how to do it in detail?
I applied the gravity load first ,and then apply the static cyclic load using displacement control, at last , i want to apply a additional load just after the substep of force=0, but in the static cyclic load, the last substep is displacement=0. the used manuscript is just ex5 downloaded in the site. could you tell me how to do it in detail?
-
- Posts: 94
- Joined: Fri May 11, 2007 9:53 pm
- Location: tongji university
the following is my manuscript. how to change it? I tried,but it didn't work
# source in procedures
source GeneratePeaks.tcl; # procedure to generate displacement increments for cyclic peaks
# characteristics of cyclic analysis
set iDmax "1/200 2/200 3/200 4/200 5/200 6/200 7/200 8/200 9/200"; # vector of displacement-cycle peaks, in terms of storey drift ratio
set Fact $LBuilding ; # scale drift ratio by storey height for displacement cycles
set Dincr [expr $LBuilding/20000]; # displacement increment for pushover. you want this to be very small, but not too small to slow analysis
set CycleType Full; # you can do Full / Push / Half cycles with the proc
set Ncycles 1; # specify the number of cycles at each peak
# -- STATIC PUSHOVER/CYCLIC ANALYSIS
# create load pattern for lateral pushover load coefficient when using linear load pattern
pattern Plain 200 Linear {; # define load pattern
load 71 1 0 0 0 0 0
}; # end load pattern
# ----------- set up analysis parameters
source LibAnalysisStaticParameters.tcl; # constraintsHandler,DOFnumberer,system-ofequations,convergenceTest,solutionAlgorithm,integrator
# --------------------------------- perform Static Cyclic Displacements Analysis
set fmt1 "%s Cyclic analysis: CtrlNode %.3i, dof %.1i, Disp=%.4f %s"; # format for screen/file output of DONE/PROBLEM analysis
foreach Dmax $iDmax {
set iDstep [GeneratePeaks $Dmax $Dincr $CycleType $Fact]; # this proc is defined above
for {set i 1} {$i <= $Ncycles} {incr i 1} {
set zeroD 0
set D0 0.0
foreach Dstep $iDstep {
puts Dstep
puts $Dstep
set D1 $Dstep
set Dincr [expr $D1 - $D0]
integrator DisplacementControl $IDctrlNode $IDctrlDOF $Dincr
analysis Static
# ----------------------------------------------first analyze command------------------------
set ok [analyze 1]
# ----------------------------------------------if convergence failure-------------------------
if {$ok != 0} {
# if analysis fails, we try some other stuff
# performance is slower inside this loop global maxNumIterStatic; # max no. of iterations performed before "failure to converge" is ret'd
if {$ok != 0} {
puts "Trying Newton with Initial Tangent .."
test NormDispIncr 1.0e-5 1000 0
algorithm Newton -initial
set ok [analyze 1]
test NormDispIncr 1.0e-5 20 0
algorithm Newton
}
if {$ok != 0} {
puts "Trying NewtonWithLineSearch .."
algorithm NewtonLineSearch 0.8
set ok [analyze 1]
algorithm Newton
}
if {$ok != 0} {
puts "Trying Broyden .."
algorithm Broyden 8
set ok [analyze 1 ]
algorithm Newton
}
if {$ok != 0} {
set putout [format $fmt1 "PROBLEM" $IDctrlNode $IDctrlDOF [nodeDisp $IDctrlNode $IDctrlDOF] $LunitTXT]
puts $putout
return -1
}; # end if
}; # end if
# -----------------------------------------------------------------------------------------------------
set D0 $D1; # move to next step
}; # end Dstep
}; # end i
# if {[$Dstep>168] & [$Dincr>0] & [$Dstep>-159.6]} stop
}; # end of iDmaxCycl
# -----------------------------------------------------------------------------------------------------
if {$ok != 0 } {
puts [format $fmt1 "PROBLEM" $IDctrlNode $IDctrlDOF [nodeDisp $IDctrlNode $IDctrlDOF] $LunitTXT]
} else {
puts [format $fmt1 "DONE" $IDctrlNode $IDctrlDOF [nodeDisp $IDctrlNode $IDctrlDOF] $LunitTXT]
}
# source in procedures
source GeneratePeaks.tcl; # procedure to generate displacement increments for cyclic peaks
# characteristics of cyclic analysis
set iDmax "1/200 2/200 3/200 4/200 5/200 6/200 7/200 8/200 9/200"; # vector of displacement-cycle peaks, in terms of storey drift ratio
set Fact $LBuilding ; # scale drift ratio by storey height for displacement cycles
set Dincr [expr $LBuilding/20000]; # displacement increment for pushover. you want this to be very small, but not too small to slow analysis
set CycleType Full; # you can do Full / Push / Half cycles with the proc
set Ncycles 1; # specify the number of cycles at each peak
# -- STATIC PUSHOVER/CYCLIC ANALYSIS
# create load pattern for lateral pushover load coefficient when using linear load pattern
pattern Plain 200 Linear {; # define load pattern
load 71 1 0 0 0 0 0
}; # end load pattern
# ----------- set up analysis parameters
source LibAnalysisStaticParameters.tcl; # constraintsHandler,DOFnumberer,system-ofequations,convergenceTest,solutionAlgorithm,integrator
# --------------------------------- perform Static Cyclic Displacements Analysis
set fmt1 "%s Cyclic analysis: CtrlNode %.3i, dof %.1i, Disp=%.4f %s"; # format for screen/file output of DONE/PROBLEM analysis
foreach Dmax $iDmax {
set iDstep [GeneratePeaks $Dmax $Dincr $CycleType $Fact]; # this proc is defined above
for {set i 1} {$i <= $Ncycles} {incr i 1} {
set zeroD 0
set D0 0.0
foreach Dstep $iDstep {
puts Dstep
puts $Dstep
set D1 $Dstep
set Dincr [expr $D1 - $D0]
integrator DisplacementControl $IDctrlNode $IDctrlDOF $Dincr
analysis Static
# ----------------------------------------------first analyze command------------------------
set ok [analyze 1]
# ----------------------------------------------if convergence failure-------------------------
if {$ok != 0} {
# if analysis fails, we try some other stuff
# performance is slower inside this loop global maxNumIterStatic; # max no. of iterations performed before "failure to converge" is ret'd
if {$ok != 0} {
puts "Trying Newton with Initial Tangent .."
test NormDispIncr 1.0e-5 1000 0
algorithm Newton -initial
set ok [analyze 1]
test NormDispIncr 1.0e-5 20 0
algorithm Newton
}
if {$ok != 0} {
puts "Trying NewtonWithLineSearch .."
algorithm NewtonLineSearch 0.8
set ok [analyze 1]
algorithm Newton
}
if {$ok != 0} {
puts "Trying Broyden .."
algorithm Broyden 8
set ok [analyze 1 ]
algorithm Newton
}
if {$ok != 0} {
set putout [format $fmt1 "PROBLEM" $IDctrlNode $IDctrlDOF [nodeDisp $IDctrlNode $IDctrlDOF] $LunitTXT]
puts $putout
return -1
}; # end if
}; # end if
# -----------------------------------------------------------------------------------------------------
set D0 $D1; # move to next step
}; # end Dstep
}; # end i
# if {[$Dstep>168] & [$Dincr>0] & [$Dstep>-159.6]} stop
}; # end of iDmaxCycl
# -----------------------------------------------------------------------------------------------------
if {$ok != 0 } {
puts [format $fmt1 "PROBLEM" $IDctrlNode $IDctrlDOF [nodeDisp $IDctrlNode $IDctrlDOF] $LunitTXT]
} else {
puts [format $fmt1 "DONE" $IDctrlNode $IDctrlDOF [nodeDisp $IDctrlNode $IDctrlDOF] $LunitTXT]
}
-
- Posts: 94
- Joined: Fri May 11, 2007 9:53 pm
- Location: tongji university
-
- Posts: 94
- Joined: Fri May 11, 2007 9:53 pm
- Location: tongji university
where the code given by fmk should be added in? I added them just after
source LibAnalysisStaticParameters.tcl;
as:
load 71 1 0 0 0 0 0
source LibAnalysisStaticParameters.tcl
set time 0.0
load control 0.0
analyze 1
but it didn't work(warning: the load control is an invalid command). I don't know much about Opensees, sorry for my silly.
source LibAnalysisStaticParameters.tcl;
as:
load 71 1 0 0 0 0 0
source LibAnalysisStaticParameters.tcl
set time 0.0
load control 0.0
analyze 1
but it didn't work(warning: the load control is an invalid command). I don't know much about Opensees, sorry for my silly.
-
- Posts: 94
- Joined: Fri May 11, 2007 9:53 pm
- Location: tongji university