integer value too large to represent

Forum for OpenSees users to post questions, comments, etc. on the use of the OpenSees interpreter, OpenSees.exe

Moderators: silvia, selimgunay, Moderators

Post Reply
songwang
Posts: 16
Joined: Mon Feb 18, 2013 11:25 am
Location: Missouri University of Science and Technology

integer value too large to represent

Post by songwang »

Dear all:

I'm trying to test the material stress-strain curve under cyclic compression-tension load. I just use Static Reversed Cyclic command file from OS official example page (http://opensees.berkeley.edu/wiki/index ... rtal_Frame) and make some adjustment based on my model. Below is the script:

wipe

# unit: N, mm, MPa

model BasicBuilder -ndm 2 -ndf 3


set LCol 1

puts "Model Geometry"
# nodal coordinates:
node 1 0 0
node 2 $LCol 0


puts "Boundary Conditions"
# boundary conditions
fix 1 1 1 1
fix 2 0 1 1

puts "Materials"
# UniaxialMaterial
uniaxialMaterial Steel02 1 350 205.882e3 4.044e-3 18 0.925 0.15 0 1 0 1 0


geomTransf Linear 1
section Fiber 1 {
patch circ 1 18 6 0.0 0.0 0 0.5642 0.0 360.0
}
element forceBeamColumn 1 1 2 1 Lobatto 1 5


puts "Define Node Recorder"
# element recorder
file mkdir data
recorder Node -file Data/DFree.out -time -node 2 -dof 1 disp


set LunitTXT "mm"

# we need to set up parameters that are particular to the model.
set PushNode 2
set IDctrlNode 2; # node where displacement is read for displacement control
set IDctrlDOF 1; # degree of freedom of displacement read for displacement contro
# characteristics of cyclic analysis
set iDmax "0.002 0.004 0.006 0.008 0.010 0.012 0.014 0.016 0.018 0.020 0.022 0.024 0.026"; # vector of displacement-cycle peaks, in terms of storey drift ratio
set Dincr [expr 0.001*$LCol]; # displacement increment for pushover. you want this to be very small, but not too small to slow down the analysis
set Fact $LCol; # scale drift ratio by storey height for displacement cycles
set CycleType Full; # you can do Full / Push / Half cycles with the proc
set Ncycles 1; # specify the number of cycles at each peak

# create load pattern for lateral pushover load
set Hload 1; # 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

pattern Plain 200 Linear {; # define load pattern -- generalized
load $PushNode $Hload 0.0 0.0
}

# ----------- set up analysis parameters
source LibAnalysisStaticParameters.tcl; # constraintsHandler,DOFnumberer,system-ofequations,convergenceTest,solutionAlgorithm,integrator

# --------------------------------- perform Static Cyclic Displacements Analysis
source LibGeneratePeaks.tcl
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 {
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 $Tol 2000 0
algorithm Newton -initial
set ok [analyze 1]
test $testTypeStatic $TolStatic $maxNumIterStatic 0
algorithm $algorithmTypeStatic
}
if {$ok != 0} {
puts "Trying Broyden .."
algorithm Broyden 8
set ok [analyze 1 ]
algorithm $algorithmTypeStatic
}
if {$ok != 0} {
puts "Trying NewtonWithLineSearch .."
algorithm NewtonLineSearch 0.8
set ok [analyze 1]
algorithm $algorithmTypeStatic
}
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
}; # 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]
}


*******************************************************************************************************************************************************************************************************************************

When I assign "CycleType" to be "Full" or "Push", it worked successfully. However, when I change it to "Half", it always give me this error information "integer value too large to represent".

Does anyone know why this happens?

Song
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: integer value too large to represent

Post by fmk »

there looks to be something wrong with the file source LibGeneratePeaks.tcl. open it up and have a look.
songwang
Posts: 16
Joined: Mon Feb 18, 2013 11:25 am
Location: Missouri University of Science and Technology

Re: integer value too large to represent

Post by songwang »

fmk wrote:
> there looks to be something wrong with the file source
> LibGeneratePeaks.tcl. open it up and have a look.

Hi Fmk:

I also doubted that, but I cannot figure out where is the problem, could you please help me take a look on it.



proc GeneratePeaks {Dmax {DincrStatic 0.001} {CycleType "Full"} {Fact 1} } {; # generate incremental disps for Dmax
###########################################################################
## GeneratePeaks $Dmax $DincrStatic $CycleType $Fact
###########################################################################
# generate incremental disps for Dmax
# this proc creates a file which defines a vector then executes the file to return the vector of disp. increments
# by Silvia Mazzoni, 2006
# input variables
# $Dmax : peak displacement (can be + or negative)
# $DincrStatic : displacement increment (optional, default=0.01, independently of units)
# $CycleType : Full (0->+peak), Half (0->+peak->0), Full (0->+peak->0->-peak->0) (optional, def=Full)
# $Fact : scaling factor (optional, default=1)
# $iDstepFileName : file name where displacement history is stored temporarily, until next disp. peak
# output variable
# $iDstep : vector of displacement increments
file mkdir data
set outFileID [open data/tmpDsteps.tcl w]
set Disp 0.
puts $outFileID "set iDstep { ";puts $outFileID $Disp;puts $outFileID $Disp; # open vector definition and some 0
set Dmax [expr $Dmax*$Fact]; # scale value
if {$Dmax<0} {; # avoid the divide by zero
set dx [expr -$DincrStatic]
} else {
set dx $DincrStatic;
}
set NstepsPeak [expr int(abs($Dmax)/$DincrStatic)]
for {set i 1} {$i <= $NstepsPeak} {incr i 1} {; # zero to one
set Disp [expr $Disp + $dx]
puts $outFileID $Disp; # write to file
}
if {$CycleType !="Push"} {
for {set i 1} {$i <= $NstepsPeak} {incr i 1} {; # one to zero
set Disp [expr $Disp - $dx]
puts $outFileID $Disp; # write to file
}
if {$CycleType !="Half"} {
for {set i 1} {$i <= $NstepsPeak} {incr i 1} {; # zero to minus one
set Disp [expr $Disp - $dx]
puts $outFileID $Disp; # write to file
}
for {set i 1} {$i <= $NstepsPeak} {incr i 1} {; # minus one to zero
set Disp [expr $Disp + $dx]
puts $outFileID $Disp; # write to file
}
}
}
puts $outFileID " }"; # close vector definition
close $outFileID
source data/tmpDsteps.tcl; # source tcl file to define entire vector
return $iDstep
}
Post Reply