hi
I want to perform a couple of time history analysis using an earthquake with different ground motion factors . for time saving i wanted to do these analysis automatically after each other
so at the first of the code I added this:
>set igscale "0.1 0.2 0.3 0.4"
>foreach gscale $igscale {
[code]
}
but after the gravity analysis at the start of the TH analysis the program stops and it prints: warning: needed to specify alpha :handler Penalty alpha
I have specified the penalty handler correctly and it work without the foreach.. command .
whats the problem?
Multiple timehistory analysis
Moderators: silvia, selimgunay, Moderators
frank this is a the basic parameters I used for the analysis:
######
# Analysis-Sequence 1 #
######################################################
# Start of model generation
# ====================================================
#Define Earthquake
set Equake ardakull
set igscale "0.1 0.2 0.3"
foreach gscale $igscale {
set g 9.81
set PGx 0.133838
set PGy 0.1186
set ggx [expr $PGx*10]
set ggy [expr $PGy*10]
set pggx [expr $ggx/($gscale)]
set pggy [expr $ggy/($gscale)]
set GMfactX [expr 10*$g/$pggx]
set GMfactY [expr 10*$g/$pggy]
# Create ModelBuilder
# -------------------
[CODE]
# Define analysis options
# -----------------------
# AnalysisOptn "AnalysisGravity": Type: Static
# --------------------------------------------
# Constraint Handler
constraints Penalty +1.000000E+018 +1.000000E+018
# Convergence Test
test FixedNumIter 5 2 2
# Integrator
integrator LoadControl +1.000000E-001 1 +1.000000E-001 +1.000000E-001
# Solution Algorithm
algorithm Newton
# DOF Numberer
numberer RCM
# System of Equations
system ProfileSPD
# Analysis Type
analysis Static
analyze 10
# Reset for next analysis case
# ----------------------------
loadConst -time 0.0
# hold gravity constant and restart time
# Analysis: Dynamic
# +++++++++++++++++
# Define load pattern
# -------------------
set X X
set Y Y
set dt 0.005
set GMdir "EQ"; # ground-motion file directory
set QuakeFileX $GMdir/$Equake/$Equake$X.txt;
set QuakeFileY $GMdir/$Equake/$Equake$Y.txt;
set AccelSeriesX "Series -dt $dt -filePath $QuakeFileX -factor $GMfactX"; # time series information
set AccelSeriesY "Series -dt $dt -filePath $QuakeFileY -factor $GMfactY"; # time series information
# LoadPattern "EQX": patternTag dir TimeSeries
pattern UniformExcitation 6 1 -accel $AccelSeriesX
# LoadPattern "EQY": patternTag dir TimeSeries
pattern UniformExcitation 7 2 -accel $AccelSeriesY
# ----------- set up analysis parameters
# ------------ define & apply damping
# RAYLEIGH damping parameters, Where to put M/K-prop damping, switches
#----------"D=$alphaM*M + $betaKcurr*Kcurrent + $betaKcomm*KlastCommit + $beatKinit*$Kinitial"---------
set xDamp 0.05; # damping ratio
set MpropSwitch 1.0;
set KcurrSwitch 0.0;
set KcommSwitch 1.0;
set KinitSwitch 0.0;
set nEigenI 1; # mode 1
set nEigenJ 3; # mode 3
set lambdaN [eigen [expr $nEigenJ]]; # eigenvalue analysis for nEigenJ modes
set lambdaI [lindex $lambdaN [expr $nEigenI-1]]; # eigenvalue mode i
set lambdaJ [lindex $lambdaN [expr $nEigenJ-1]]; # eigenvalue mode j
set omegaI [expr pow($lambdaI,0.5)];
set omegaJ [expr pow($lambdaJ,0.5)];
set alphaM [expr $MpropSwitch*$xDamp*(2*$omegaI*$omegaJ)/($omegaI+$omegaJ)]; # M-prop. damping; D = alphaM*M
set betaKcurr [expr $KcurrSwitch*2.*$xDamp/($omegaI+$omegaJ)]; # current-K; +beatKcurr*KCurrent
set betaKcomm [expr $KcommSwitch*2.*$xDamp/($omegaI+$omegaJ)]; # last-committed K; +betaKcomm*KlastCommitt
set betaKinit [expr $KinitSwitch*2.*$xDamp/($omegaI+$omegaJ)]; # initial-K; +beatKinit*Kini
rayleigh $alphaM $betaKcurr $betaKinit $betaKcomm; # RAYLEIGH damping
# Define analysis options
Define analysis options
# -----------------------
# set up ground-motion-analysis parameters
set DtAnalysis 0.1; # time-step Dt for lateral analysis
set TmaxAnalysis 40.0; # maximum duration of ground-motion analysis -- should be 50 sec
# AnalysisOptn "THA": Type: Transient
variable constraintsTypeDynamic Penalty +1.0e18 +1.0e18;
constraints $constraintsTypeDynamic ;
variable numbererTypeDynamic RCM
numberer $numbererTypeDynamic
variable systemTypeDynamic SparseGeneral; # try UmfPack for large problems
system $systemTypeDynamic
variable TolDynamic 1.e-8; # Convergence Test: tolerance
variable maxNumIterDynamic 10; # Convergence Test: maximum number of iterations that will be performed before "failure to converge" is returned
variable printFlagDynamic 0; # Convergence Test: flag used to print information on convergence (optional) # 1: print information on each step;
variable testTypeDynamic EnergyIncr; # Convergence-test type
test $testTypeDynamic $TolDynamic $maxNumIterDynamic $printFlagDynamic;
variable maxNumIterConvergeDynamic 2000;
variable printFlagConvergeDynamic 0;
variable algorithmTypeDynamic Newton
algorithm $algorithmTypeDynamic;
variable NewmarkGamma 0.5; # Newmark-integrator gamma parameter (also HHT)
variable NewmarkBeta 0.25; # Newmark-integrator beta parameter
variable integratorTypeDynamic Newmark;
integrator $integratorTypeDynamic $NewmarkGamma $NewmarkBeta
variable analysisTypeDynamic Transient
analysis $analysisTypeDynamic
set Nsteps [expr int($TmaxAnalysis/$DtAnalysis)];
set ok [analyze $Nsteps $DtAnalysis]; # actually perform analysis; returns ok=0 if analysis was successful
set Tol 1.0e-4
if {$ok != 0} { ; # analysis was not successful.
[CODE]
}
######
# Analysis-Sequence 1 #
######################################################
# Start of model generation
# ====================================================
#Define Earthquake
set Equake ardakull
set igscale "0.1 0.2 0.3"
foreach gscale $igscale {
set g 9.81
set PGx 0.133838
set PGy 0.1186
set ggx [expr $PGx*10]
set ggy [expr $PGy*10]
set pggx [expr $ggx/($gscale)]
set pggy [expr $ggy/($gscale)]
set GMfactX [expr 10*$g/$pggx]
set GMfactY [expr 10*$g/$pggy]
# Create ModelBuilder
# -------------------
[CODE]
# Define analysis options
# -----------------------
# AnalysisOptn "AnalysisGravity": Type: Static
# --------------------------------------------
# Constraint Handler
constraints Penalty +1.000000E+018 +1.000000E+018
# Convergence Test
test FixedNumIter 5 2 2
# Integrator
integrator LoadControl +1.000000E-001 1 +1.000000E-001 +1.000000E-001
# Solution Algorithm
algorithm Newton
# DOF Numberer
numberer RCM
# System of Equations
system ProfileSPD
# Analysis Type
analysis Static
analyze 10
# Reset for next analysis case
# ----------------------------
loadConst -time 0.0
# hold gravity constant and restart time
# Analysis: Dynamic
# +++++++++++++++++
# Define load pattern
# -------------------
set X X
set Y Y
set dt 0.005
set GMdir "EQ"; # ground-motion file directory
set QuakeFileX $GMdir/$Equake/$Equake$X.txt;
set QuakeFileY $GMdir/$Equake/$Equake$Y.txt;
set AccelSeriesX "Series -dt $dt -filePath $QuakeFileX -factor $GMfactX"; # time series information
set AccelSeriesY "Series -dt $dt -filePath $QuakeFileY -factor $GMfactY"; # time series information
# LoadPattern "EQX": patternTag dir TimeSeries
pattern UniformExcitation 6 1 -accel $AccelSeriesX
# LoadPattern "EQY": patternTag dir TimeSeries
pattern UniformExcitation 7 2 -accel $AccelSeriesY
# ----------- set up analysis parameters
# ------------ define & apply damping
# RAYLEIGH damping parameters, Where to put M/K-prop damping, switches
#----------"D=$alphaM*M + $betaKcurr*Kcurrent + $betaKcomm*KlastCommit + $beatKinit*$Kinitial"---------
set xDamp 0.05; # damping ratio
set MpropSwitch 1.0;
set KcurrSwitch 0.0;
set KcommSwitch 1.0;
set KinitSwitch 0.0;
set nEigenI 1; # mode 1
set nEigenJ 3; # mode 3
set lambdaN [eigen [expr $nEigenJ]]; # eigenvalue analysis for nEigenJ modes
set lambdaI [lindex $lambdaN [expr $nEigenI-1]]; # eigenvalue mode i
set lambdaJ [lindex $lambdaN [expr $nEigenJ-1]]; # eigenvalue mode j
set omegaI [expr pow($lambdaI,0.5)];
set omegaJ [expr pow($lambdaJ,0.5)];
set alphaM [expr $MpropSwitch*$xDamp*(2*$omegaI*$omegaJ)/($omegaI+$omegaJ)]; # M-prop. damping; D = alphaM*M
set betaKcurr [expr $KcurrSwitch*2.*$xDamp/($omegaI+$omegaJ)]; # current-K; +beatKcurr*KCurrent
set betaKcomm [expr $KcommSwitch*2.*$xDamp/($omegaI+$omegaJ)]; # last-committed K; +betaKcomm*KlastCommitt
set betaKinit [expr $KinitSwitch*2.*$xDamp/($omegaI+$omegaJ)]; # initial-K; +beatKinit*Kini
rayleigh $alphaM $betaKcurr $betaKinit $betaKcomm; # RAYLEIGH damping
# Define analysis options
Define analysis options
# -----------------------
# set up ground-motion-analysis parameters
set DtAnalysis 0.1; # time-step Dt for lateral analysis
set TmaxAnalysis 40.0; # maximum duration of ground-motion analysis -- should be 50 sec
# AnalysisOptn "THA": Type: Transient
variable constraintsTypeDynamic Penalty +1.0e18 +1.0e18;
constraints $constraintsTypeDynamic ;
variable numbererTypeDynamic RCM
numberer $numbererTypeDynamic
variable systemTypeDynamic SparseGeneral; # try UmfPack for large problems
system $systemTypeDynamic
variable TolDynamic 1.e-8; # Convergence Test: tolerance
variable maxNumIterDynamic 10; # Convergence Test: maximum number of iterations that will be performed before "failure to converge" is returned
variable printFlagDynamic 0; # Convergence Test: flag used to print information on convergence (optional) # 1: print information on each step;
variable testTypeDynamic EnergyIncr; # Convergence-test type
test $testTypeDynamic $TolDynamic $maxNumIterDynamic $printFlagDynamic;
variable maxNumIterConvergeDynamic 2000;
variable printFlagConvergeDynamic 0;
variable algorithmTypeDynamic Newton
algorithm $algorithmTypeDynamic;
variable NewmarkGamma 0.5; # Newmark-integrator gamma parameter (also HHT)
variable NewmarkBeta 0.25; # Newmark-integrator beta parameter
variable integratorTypeDynamic Newmark;
integrator $integratorTypeDynamic $NewmarkGamma $NewmarkBeta
variable analysisTypeDynamic Transient
analysis $analysisTypeDynamic
set Nsteps [expr int($TmaxAnalysis/$DtAnalysis)];
set ok [analyze $Nsteps $DtAnalysis]; # actually perform analysis; returns ok=0 if analysis was successful
set Tol 1.0e-4
if {$ok != 0} { ; # analysis was not successful.
[CODE]
}