Multiple Analysis for damping ratio

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

Moderators: silvia, selimgunay, Moderators

Post Reply
Ulbong
Posts: 17
Joined: Thu Apr 30, 2020 1:41 am

Multiple Analysis for damping ratio

Post by Ulbong » Sat Jul 11, 2020 9:55 pm

Hi Guys I have a problem for multiple simultaneous analysis.
I want to change damping ratio (for now 0.05) for 2nd floor lumped massed stick model.
But it's annoying that I have to change damping ratio on script each time.
So I need to know how to get each results at one go. (different result file)
Is there any command like 'array' or someting? [0.01 0.02 0.03 ..... 0.09]
Here is my script below

--------------------------------------------------------------------------------------------------------------
source Model.tcl

timeSeries Path 1001 -dt 0.02 -filePath Input.tcl -factor 1;
pattern UniformExcitation 1 1 -accel 1;

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 2; # mode 2
set lambdaN [eigen [expr $nEigenJ]]; # eigenvalue analysis for nEigenJ modes
set lambdaI [lindex $lambdaN [expr $nEigenI-1]]; # eigenvalue mode
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


recorder Node -file MODE/TAb.out -timeSeries 1001 -time -node 3 -dof 1 accel; # acceleration of support nodes
recorder Node -file MODE/MAb.out -timeSeries 1001 -time -node 2 -dof 1 accel;

wipeAnalysis; # clear previously-define analysis parameters
constraints Transformation; # how it handles boundary conditions
numberer RCM; # renumber dof's to minimize band-width (optimization), if you want to
system ProfileSPD; # how to store and solve the system of equations in the analysis
test EnergyIncr 1.0e-10 100 0;
algorithm Newton; # use Linear algorithm for linear analysis
integrator Newmark 0.5 0.25; # determine the next time step for an analysis
analysis Transient; # define type of analysis: time-dependent
analyze 2048 0.02;
puts "YES!"
--------------------------------------------------------------------------------------------------------------------------

Thanks Bros

selimgunay
Posts: 913
Joined: Mon Sep 09, 2013 8:50 pm
Location: University of California, Berkeley

Re: Multiple Analysis for damping ratio

Post by selimgunay » Mon Jul 13, 2020 10:04 pm

Yes you can do it with a for loop in tcl

Post Reply