IDA
Moderators: silvia, selimgunay, Moderators
Re: IDA
your question is unclear. is this the max displacement or do you want to stop an analysis if the roof hits 30cm??
Re: IDA
set roofNode xx
set tCurrent 0.
set tFinal [expr $numPts * $dt]
set roofDisp 0.
while {$tCurrent < $tFinal && $roofDisp < 30} {
set ok [analyze 1 $dt]
set tCurrent [getTime]
set roofDisp [nodeDisp $roofNode 1]
set roofDisp [expr abs($roofDisp)]
}
set tCurrent 0.
set tFinal [expr $numPts * $dt]
set roofDisp 0.
while {$tCurrent < $tFinal && $roofDisp < 30} {
set ok [analyze 1 $dt]
set tCurrent [getTime]
set roofDisp [nodeDisp $roofNode 1]
set roofDisp [expr abs($roofDisp)]
}
Re: IDA
so if i want to calculate scale factor of ground motion (which in that factor, roof displacement hits 30cm); does the following works correctly?
wipeAnalysis
loadConst -time 0.0
set kk 1
for { set i 1} { $i <= 50 } { incr i 1 } {;
set Factor [expr $i/10.0]
set outFile tabas.txt
set Nsteps 1642
set dt 0.02;
set GMfatt [expr 9.81*$Factor];
set gamma 0.5
set beta 0.25;
set alphaM 0.446;
set betaK 0.00426;
set betaKcomm 0
set betaKinit 0
system UmfPack
constraints Plain
test EnergyIncr 1.0e-4 1000;
algorithm NewtonLineSearch; # BETTER
numberer RCM
integrator Newmark $gamma $beta
analysis Transient
set roofNode 43
set tCurrent 0.
set tFinal [expr $Nsteps * $dt]
set roofDisp 0.
incr kk
set Gaccel "Series -dt $dt -filePath $outFile -factor $GMfatt"; # time series information
pattern UniformExcitation $kk 1 -accel $Gaccel; # create uniform excitation
set ok [analyze 1 $dt]
set tCurrent [getTime]
set roofDisp [nodeDisp $roofNode 1]
set roofDisp [expr abs($roofDisp)]
puts "d=$roofDisp"
if { $roofDisp >30 } {
puts " factor=$Factor; Disp=$roofDisp"
break
}
}
wipeAnalysis
loadConst -time 0.0
set kk 1
for { set i 1} { $i <= 50 } { incr i 1 } {;
set Factor [expr $i/10.0]
set outFile tabas.txt
set Nsteps 1642
set dt 0.02;
set GMfatt [expr 9.81*$Factor];
set gamma 0.5
set beta 0.25;
set alphaM 0.446;
set betaK 0.00426;
set betaKcomm 0
set betaKinit 0
system UmfPack
constraints Plain
test EnergyIncr 1.0e-4 1000;
algorithm NewtonLineSearch; # BETTER
numberer RCM
integrator Newmark $gamma $beta
analysis Transient
set roofNode 43
set tCurrent 0.
set tFinal [expr $Nsteps * $dt]
set roofDisp 0.
incr kk
set Gaccel "Series -dt $dt -filePath $outFile -factor $GMfatt"; # time series information
pattern UniformExcitation $kk 1 -accel $Gaccel; # create uniform excitation
set ok [analyze 1 $dt]
set tCurrent [getTime]
set roofDisp [nodeDisp $roofNode 1]
set roofDisp [expr abs($roofDisp)]
puts "d=$roofDisp"
if { $roofDisp >30 } {
puts " factor=$Factor; Disp=$roofDisp"
break
}
}
Last edited by Eli on Tue May 28, 2013 1:11 pm, edited 1 time in total.
Re: IDA
you are missing the while .. i modified the original post.
Re: IDA
you only have one if! .. i don't see where you do more than a single analysis step with what you have.
Re: IDA
in the following i use while too. but when roof displacement hits 0.5 m; the analysis do not break and continue, and after it gets error: the ConvergenceTest object failed in test.
Do I use while and for in correct place?
wipeAnalysis
loadConst -time 0.0
set kk 1
for { set i 1} { $i <=100 } { incr i 1 } {;
set Factor [expr $i/20.0]
set outFile "kobe.txt"
set Nsteps 4000
set dt 0.01;
set GMfatt [expr 9.81*$Factor];
set roofNode 43
set tCurrent 0.0
set tFinal [expr $Nsteps*$dt]
set roofDisp 0.0
incr kk
set Gaccel "Series -dt $dt -filePath $outFile -factor $GMfatt";
pattern UniformExcitation $kk 1 -accel $Gaccel;
set gamma 0.5
set beta 0.25;
system UmfPack
constraints Plain
test EnergyIncr 1.0e-4 1000;
algorithm NewtonLineSearch;
numberer RCM
integrator Newmark $gamma $beta
analysis Transient
while {$tCurrent<=$tFinal && $roofDisp<0.5} {;
set ok [analyze 1 $dt]
set tCurrent [getTime]
set roofDisp [nodeDisp $roofNode 1]
set roofDisp [expr abs($roofDisp)]
puts " factor=$Factor; Disp=$roofDisp time=$tCurrent"
if { $roofDisp >0.5 } {;
puts " ok, factor=$Factor; Disp=$roofDisp time=$tCurrent"
};
};
};
Do I use while and for in correct place?
wipeAnalysis
loadConst -time 0.0
set kk 1
for { set i 1} { $i <=100 } { incr i 1 } {;
set Factor [expr $i/20.0]
set outFile "kobe.txt"
set Nsteps 4000
set dt 0.01;
set GMfatt [expr 9.81*$Factor];
set roofNode 43
set tCurrent 0.0
set tFinal [expr $Nsteps*$dt]
set roofDisp 0.0
incr kk
set Gaccel "Series -dt $dt -filePath $outFile -factor $GMfatt";
pattern UniformExcitation $kk 1 -accel $Gaccel;
set gamma 0.5
set beta 0.25;
system UmfPack
constraints Plain
test EnergyIncr 1.0e-4 1000;
algorithm NewtonLineSearch;
numberer RCM
integrator Newmark $gamma $beta
analysis Transient
while {$tCurrent<=$tFinal && $roofDisp<0.5} {;
set ok [analyze 1 $dt]
set tCurrent [getTime]
set roofDisp [nodeDisp $roofNode 1]
set roofDisp [expr abs($roofDisp)]
puts " factor=$Factor; Disp=$roofDisp time=$tCurrent"
if { $roofDisp >0.5 } {;
puts " ok, factor=$Factor; Disp=$roofDisp time=$tCurrent"
};
};
};
Last edited by Eli on Mon Jun 03, 2013 10:31 pm, edited 2 times in total.
Re: IDA
it should work .. the break is not needed if the test is in the conditional of the while loop. show me the resul of the puts "d=$roofDisp" before and after it goes beyond 30.
-
- Posts: 140
- Joined: Sun Oct 03, 2010 11:36 pm
- Location: Hong Kong
Re: IDA
Nice topic
Research Assistant Professor, The Hong Kong Polytechnic University
guanlin@polyu.edu.hk
guanlin@polyu.edu.hk
Re: IDA
and why would you want to reset it .. if reset why bother record any data?