WARNING -- PathSeries::getDuration<> on empty Vector

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

Moderators: silvia, Moderators

WARNING -- PathSeries::getDuration<> on empty Vector

Postby vasilischrys » Sun Jul 16, 2017 6:19 am

Hello,

I am trying to run a nonlinear time history analysis in 2-storey 1-bay RC frame. However, I get this message "WARNING -- PathSeries::getDuration<> on empty Vector".
Below you can see my script. I have identified that the problem arises at the command "pattern UniformExcitation" but I am unable to find what is going wrong. The analysis is completed successfully (OpenSees shows me the message "Time History Analysis Successful!" but I do not get any results. All my results are zero which is not possible. Any thoughts on what is wrong?
Thank you in advance for your assistance.

P.S. The fact that some commands are not properly aligned is due to copy-paste from the notepad.

# ------------------------------------------------------------------------------------BARE FRAME--------------------------------------------------------------------------------------------------------------------------------------------

wipe

source DisplayModel2D.tcl
source DisplayPlane.tcl
model BasicBuilder -ndm 2 -ndf 3; # ndm: 2 dimensional problem, ndf: 3 degrees of freedom in each node

# -----------------------------------------------------------------Define Variables---------------------------------------------------------------------------------------------------------------------------------------------------------

set m21 4900; # nodal mass of the node 21 in kg
set m22 4900; # nodal mass of the node 22 in kg
set m31 4600; # nodal mass of the node 31 in kg
set m32 4600; # nodal mass of the node 32 in kg
set negligible 1.0e-9; # defines a quantity that is almost zero in kg
set Ec 25545000000; # Young's modulus of elasticity of concrete in Pa
set A_col 0.0676; # Cross sectional area of columns in m^2
set A_beam 0.19688; # Cross sectional area of beams in m^2
set I_col 0.000381; # 2nd Moment of inertia of columns in m^4
set I_beam 0.00245976; # 2nd Moment of inertia of beams in m^4
set n 10; # Parameter used in the study of Ibarra and Krawinkler for better distribution of the stiffness
set I_col_eff [expr 0.7*$I_col*($n+1)/$n]; # effective moment of inertia after cracking of concrete for columns in m^4 (0.7->ACI, (n+1/n)->Ibarra and Krawinkler)
set I_beam_eff [expr 0.35*$I_beam*($n+1)/$n]; # effective moment of inertia after cracking of concrete for beams in m^4 (0.35->ACI, (n+1/n)->Ibarra and Krawinkler)
set My_col1 64900; # yield moment of the columns of the 1st floor in Nm
set Mu_col1 [expr $My_col1*1.1]; # ultimate moment of the columns of the 1st floor in Nm
set My_col2 42450; # yield moment of the columns of the 2nd floor in Nm
set Mu_col2 [expr $My_col2*1.1]; # ultimate moment of the columns of the 2nd floor in Nm
set My_beam 121650; # yield moment of the beams in Nm
set Mu_beam [expr $My_beam*1.1]; # ultimate moment of the beams in Nm
set Ks_col [expr 6*$Ec*$I_col_eff*$n/3.3]; # effective stiffness of column's rotational spring in N/m (Ibarra and Krawinkler)
set Ks_beam [expr 6*$Ec*$I_beam_eff*$n/4]; # effective stiffness of beam's rotational spring in N/m (Ibarra and Krawinkler)
set THy_col1 [expr $My_col1/$Ks_col]; # yield chord rotation for columns of the 1st floor in rad
set THu_col1 0.048571922; # ultimate chord rotation for columns of the 1st floor in rad (EC8)
set THy_col2 [expr $My_col2/$Ks_col]; # yield chord rotation for columns of the 2nd floor in rad
set THu_col2 0.044941363; # ultimate chord rotation for columns of the 2nd floor in rad (EC8)
set THy_beam [expr $My_beam/$Ks_beam]; # yield chord rotation for beams in rad
set THu_beam 0.038079275; # ultimate chord rotation for beams in rad (EC8)
set Beta 0.5; # parameter for stiffness degradation in unloading
puts "Variables Defined"

# ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

# -------------------------------------------------------------------Nodal Coordinates------------------------------------------------------------------------------------------------------------------------------------------------------

node 11 0 0
node 12 4 0
node 21 0 3.3
node 22 4 3.3
node 31 0 6.6
node 32 4 6.6
puts "Nodal Coordinates Defined"

# -------------------------------------------------------------------Boundary Conditions----------------------------------------------------------------------------------------------------------------------------------------------------

fix 11 1 1 1; # Node 11 is fully fixed
fix 12 1 1 1; # Node 12 is fully fixed
equalDOF 21 22 1; # Nodes 21 and 22 have the same x-displacement
equalDOF 31 32 1; # Nodes 31 and 32 have the same x-displacement
puts "Boundary Conditions Defined"

# ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

# ---------------------------------------------------------------------Nodal Masses---------------------------------------------------------------------------------------------------------------------------------------------------------

mass 21 $m21 $negligible $negligible
mass 22 $m22 $negligible $negligible
mass 31 $m31 $negligible $negligible
mass 32 $m32 $negligible $negligible
puts "Nodal Masses Defined"

# ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

# --------------------------------------------------------------Rotational Spring Coordinates-----------------------------------------------------------------------------------------------------------------------------------------------

node 111 0 0; # left column of the 1st floor-bottom
node 121 4 0; # right column of the 1st floor-bottom
node 211 0 3.3; # left column of the 1st floor-top
node 221 4 3.3; # right column of the 1st floor-top
node 212 0 3.3; # left column of the 2nd floor-bottom
node 222 4 3.3; # right column of the 2nd floor-bottom
node 213 0 3.3; # beam of the 1st floor-left
node 223 4 3.3; # beam of the 1st floor-right
node 311 0 6.6; # left column of the 2nd floor-top
node 321 4 6.6; # right column of the 2nd floor-top
node 312 0 6.6; # beam of the 2nd floor-left
node 322 4 6.6; # beam of the 2nd floor-right
puts "Rotational Spring Coordinates Defined"

# ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

# ------------------------------------------------------------------Linear Elastic Elements-------------------------------------------------------------------------------------------------------------------------------------------------

geomTransf Linear 1

# Elem Ni Nj A E Iz transfTag

element elasticBeamColumn 411 111 211 $A_col $Ec $I_col_eff 1; # 1st floor left column
element elasticBeamColumn 412 121 221 $A_col $Ec $I_col_eff 1; # 1st floor right column
element elasticBeamColumn 421 212 311 $A_col $Ec $I_col_eff 1; # 2nd floor left column
element elasticBeamColumn 422 222 321 $A_col $Ec $I_col_eff 1; # 2nd floor right column
element elasticBeamColumn 413 213 223 $A_beam $Ec $I_beam_eff 1; # 1st floor beam
element elasticBeamColumn 423 312 322 $A_beam $Ec $I_beam_eff 1; # 2nd floor beam
puts "Linear Elastic Beams and Columns Defined"

# ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

# -------------------------------------------------------------------------------Rotational Spring Elements---------------------------------------------------------------------------------------------------------------------------------

# Mat My THy Mu THu -My -THy -Mu -THu PX PY D1 D2 Beta

uniaxialMaterial Hysteretic 1 $My_col1 $THy_col1 $Mu_col1 $THu_col1 [expr $My_col1*(-1)] [expr $THy_col1*(-1)] [expr $Mu_col1*(-1)] [expr $THu_col1*(-1)] 1 1 0 0 $Beta; # 1st floor columns-material in plastic hinges region
uniaxialMaterial Hysteretic 2 $My_col2 $THy_col2 $Mu_col2 $THu_col2 [expr $My_col2*(-1)] [expr $THy_col2*(-1)] [expr $Mu_col2*(-1)] [expr $THu_col2*(-1)] 1 1 0 0 $Beta; # 2nd floor columns-material in plastic hinges region
uniaxialMaterial Hysteretic 3 $My_beam $THy_beam $Mu_beam $THu_beam [expr $My_beam*(-1)] [expr $THy_beam*(-1)] [expr $Mu_beam*(-1)] [expr $THu_beam*(-1)] 1 1 0 0 $Beta; # beams-material in plastic hinges region

# Elem Ni Nj Mat Dir

element zeroLength 5111 11 111 -mat 1 -dir 6; # 1st floor left column bottom spring
element zeroLength 5121 12 121 -mat 1 -dir 6; # 1st floor right column bottom spring
element zeroLength 5211 21 211 -mat 1 -dir 6; # 1st floor left column top spring
element zeroLength 5221 22 221 -mat 1 -dir 6; # 1st floor right column top spring
element zeroLength 5212 21 212 -mat 2 -dir 6; # 2nd floor left column bottom spring
element zeroLength 5222 22 222 -mat 2 -dir 6; # 2nd floor right column bottom spring
element zeroLength 5213 21 213 -mat 3 -dir 6; # 1st floor beam left spring
element zeroLength 5223 22 223 -mat 3 -dir 6; # 1st floor beam right spring
element zeroLength 5311 31 311 -mat 2 -dir 6; # 2nd floor left column top spring
element zeroLength 5321 32 321 -mat 2 -dir 6; # 2nd floor right column top spring
element zeroLength 5312 31 312 -mat 3 -dir 6; # 2nd floor beam left spring
element zeroLength 5322 32 322 -mat 3 -dir 6; # 2nd floor beam right spring

# Nodes and plastic hinges have the same X and Y displacement but different rotation
equalDOF 11 111 1 2
equalDOF 12 121 1 2
equalDOF 21 211 1 2
equalDOF 22 221 1 2
equalDOF 21 212 1 2
equalDOF 22 222 1 2
equalDOF 21 213 1 2
equalDOF 22 223 1 2
equalDOF 31 311 1 2
equalDOF 32 321 1 2
equalDOF 31 312 1 2
equalDOF 32 322 1 2
puts "Rotational Spring Elements Defined"

# -----------------------------------------------------------------Regions for Rotational Springs-------------------------------------------------------------------------------------------------------------------------------------------

region 1 -ele 5111 5121 5211 5221 5212 5222 5311 5312; # Region for spring column elements
region 2 -ele 5213 5223 5312 5322; # Region for spring beam elements

# ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

# -----------------------------------------------------------------------------Analysis-Output Generation-----------------------------------------------------------------------------------------------------------------------------------

# Define Analysis Type: "static" = pushover and "dynamic" = time history
set analysis "static"
if {$analysis == "static"} {
set Data Static_Output
file mkdir $Data
}
if {$analysis == "dynamic"} {
set Data Dynamic_Output
file mkdir $Data
}

# ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

puts "MODEL BUILT"


DisplayModel2D DeformedShape

# --------------------------------------------------------------------------------Gravity Analysis------------------------------------------------------------------------------------------------------------------------------------------

puts "Running Gravity Analysis"
set GravSteps 10
set Tol 1.0e-8
set TimeStep [expr 1/$GravSteps]

pattern Plain 1 Linear {
load 21 0 -48.1 0
load 22 0 -48.1 0
load 31 0 -45.3 0
load 32 0 -45.3 0
}

system BandGeneral
constraints Plain
numberer Plain
test NormDispIncr $Tol 6
algorithm Newton
integrator LoadControl $TimeStep
analysis Static
analyze $GravSteps
loadConst -time 0
puts "Gravity Analysis Complete"

# ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

# ----------------------------------------------------------------------------------Eigenvalue Analysis-------------------------------------------------------------------------------------------------------------------------------------

puts "Running Eigenvalue Analysis"
set EigenI 1; # mode i=1
set EigenJ 2; # mode j=2
set lamdaN [eigen [expr $EigenJ]]; # eigenvalue analysis for EigenJ modes
set lamdaI [lindex $lamdaN [expr 0]]; # eigenvalue mode i = 1
set lamdaJ [lindex $lamdaN [expr $EigenJ-1]]; # eigenvalue mode j = 2
set omega1 [expr pow($lamdaI,0.5)]; # 1st mode circular frequency
set omega2 [expr pow($lamdaJ,0.5)]; # 2nd mode circular frequency
set T1 [expr 2.0*3.14/$omega1]; # 1st mode period of the structure
set T2 [expr 2.0*3.14/$omega2]; # 2nd mode period of the structure
puts "T1 = $T1 s"; # display the first mode period in the command window
puts "T2 = $T2 s"; # display the second mode period in the command window
puts "Eigenvalue Analysis Complete"

# ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

# -----------------------------------------------------------------------------------Define Recorders---------------------------------------------------------------------------------------------------------------------------------------

# Floor Displacements
recorder Node -file $Data/Node21.out -time -node 21 -dof 1 2 3 disp
recorder Node -file $Data/Node22.out -time -node 22 -dof 1 2 3 disp
recorder Node -file $Data/Node31.out -time -node 31 -dof 1 2 3 disp
recorder Node -file $Data/Node32.out -time -node 32 -dof 1 2 3 disp

# Reactions
recorder Node -file $Data/reaction.out -time -node 11 12 -dof 1 2 3 reaction

# Interstorey Drifts
recorder Drift -file $Data/1storeyDrift.out -time -iNode 11 -jNode 21 -dof 1 -perpDirn 2
recorder Drift -file $Data/2storeyDrift.out -time -iNode 21 -jNode 31 -dof 1 -perpDirn 2
recorder Drift -file $Data/roofDrift.out -time -iNode 11 -jNode 31 -dof 1 -perpDirn 2

# Column Springs - Moment, Rotation
recorder Element -file $Data/SpringColMom.out -time -region 1 -force
recorder Element -file $Data/SpringColRot.out -time -region 1 -deformation

# Beam Springs - Moment, Rotation
recorder Element -file $Data/SpringBeamMom.out -time -region 2 -force
recorder Element -file $Data/SpringBeamRot.out -time -region 2 -deformation

# -----------------------------------------------------------------------Time History Analysis----------------------------------------------------------------------------------------------------------------------------------------------
puts "Time history analysis running"

# -------------------------------------------------------------------------Reyleigh Damping-------------------------------------------------------------------------------------------------------------------------------------------------

# C = a0*M + a1*K
set zeta_1 0.03; # Damping ratio of the 1st mode of vibration
set zeta_2 0.02; # Damping ratio of the 2nd mode of vibration
set a0 0.356533695; # Mass damping coefficient
set a1 0.0008493; # Stiffness damping coefficient
set a1_mod [expr $a1*(1+$n)/$n]
# Assign damping by creating regions
region 3 -ele 411 412 421 422 413 423 -reyleigh 0 $a1_mod $a1_mod $a1_mod
region 4 -node 21 22 31 32 -rayleigh $a0 0.0 0.0 0.0
# -------------------------------------------------------------------------Define Variables-------------------------------------------------------------------------------------------------------------------------------------------------

set g 9.81; # Acceleration of gravity in m/s^2
set dt 0.01; # Time step of input ground motion file in s
set outFile "0.05g_axtab"; # Input file of ground motion
set GMfact [expr 1.0*$g]; # Data in input file is in factor of g
set patternTag 3; # Load pattern ID
set dir 1; # Ground motion direction. 1 = x, 2 = y, 3 = z
set Nsteps 4096; # Total number of steps of ground motion file
set totalDuration [expr $dt*$Nsteps]; # Total duration of the earthquake. Should be 40,96 s
set dt_analysis 0.001; # Time step of the analysis in s
set Analysis_steps [expr round($totalDuration/$dt_analysis)]; # Total number of steps of the analysis
set Gaccel "Series -dt $dt -filePath $outFile -factor $GMfact"; # Time series information
pattern UniformExcitation $patternTag $dir -accel $Gaccel; # Apply uniform excitation load pattern
puts "Variables Defined"

# ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

# --------------------------------------------------------------------------Create Analysis-------------------------------------------------------------------------------------------------------------------------------------------------

system UmfPack
constraints Plain
test NormDispIncr 1.0e-8 50
algorithm Newton
numberer RCM
integrator Newmark 0.5 0.25
analysis Transient
puts "Analysis Created"

# ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

# ----------------------------------------------------------------------------Run Analysis--------------------------------------------------------------------------------------------------------------------------------------------------

set ok [analyze $Analysis_steps $dt_analysis]; # If ok = 0 then analysis completed
if {$ok == 0} {
puts "Time History Analysis Successful!"
} else {
puts "Time History Analysis Failed!"
}

# Output time at end of analysis
set currentTime [getTime];
puts "The current time is: $currentTime";

puts "eigen values [eigen 2]"
vasilischrys
 
Posts: 1
Joined: Sun Jul 16, 2017 5:57 am

Re: WARNING -- PathSeries::getDuration<> on empty Vector

Postby Jhno » Mon Jul 17, 2017 6:12 am

The file in which your time Serie is stored, which I see you refer to as "0.05g_axtab", does it has a extension? If yes, it should be provided.
Example : 0.05g_axtab.ACC or 0.05g_axtab.out or.. w/e .Extension.
Also, do not use " " for the filename in this command.
Also, make sure the file "0.05g_axtab" is in the folder OS is working.

The error message is very clear; it comes from the timeseries. Why not just use the standard command instead of having many variable in it?
timeSeries Path $tag -dt $dt -filePath $filePath <-factor $cFactor> <-useLast> <-prependZero> <-startTime $tStart>
Easier to use this way (I think).
timeSeries Path 0 -dt 0.01 (or w/e) -filePath 0.05g_axtab.EXTENSION <-factor $cFactor> <-useLast> <-prependZero> <-startTime $tStart>
Hope it helps, Gl.
Jhno
 
Posts: 138
Joined: Sat May 05, 2012 2:55 pm
Location: Laval


Return to OpenSees.exe Users

Who is online

Users browsing this forum: No registered users and 4 guests

cron