Rotational springs

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

Moderators: silvia, selimgunay, Moderators

Post Reply
papaloo
Posts: 15
Joined: Fri Apr 08, 2011 8:41 am
Location: Istanbul Technical University

Rotational springs

Post by papaloo »

Hi dear vesna...

I have defined a rotational spring by this command:(I have put appropriate values instead of each $)

uniaxialMaterial Steel01 $matTag $Fy $E0 $b
element zeroLength $eleTag $iNode $jNode -mat $matTag1 $matTag2 ... -dir $dir1 $dir2 ...
equalDOF $nodeR $nodeC ...

I applied a ground motion to my model and got results.My problem is that when I change $E0,results are being changed but when I change $Fy or $b,the results aren't being changed.It seems that this rotational spring is considered as an elastic element.
Please help me how I can enter inelastic parameters of spring in command?
thanks a lot...

Mohsen.
vesna
Posts: 3033
Joined: Tue May 23, 2006 11:23 am
Location: UC Berkeley

Re: Rotational springs

Post by vesna »

would you please show me your commands completely with the values rather than variables.
papaloo
Posts: 15
Joined: Fri Apr 08, 2011 8:41 am
Location: Istanbul Technical University

Re: Rotational springs

Post by papaloo »

Hi...

This is my commands for defining a 2 degree of freedom system:

# Set up---------------------------------------------------
wipe; # clear memory of all past model definitions
set dataDir Data; # set up name of data directory
file mkdir $dataDir; # create data directory
set GMdir "../GMfiles/"; #ground motion file directory

puts "set up"

#Define units------------------------------------------
set m 1;
set kg 1;
set sec 1;
set sec2 [expr $sec*$sec];
set m2 [expr $m*$m];
set pi [expr 2*asin(1.0)];
set g [expr 9.81*$m/$sec2];
set ubig 1e10;
set usmall [expr 1/$ubig];

puts "units are defined"

#units metric kg sec
#creat modelbuilder ( 3 dimensional and 6 degree of freedom for each node)----------
model basic -ndm 3 -ndf 6


#Define nodes------------------------------------------
node 1 0 0 0
node 2 0 0 0
node 3 -0.35 0 0



puts "nodes are defined"



#DEFINING MATERIALS-------------------------

# FOR SPRINGS
# uniaxialMaterial Steel01 $matTag $Fy $E0 $b

uniaxialMaterial Steel01 1 11 8.82 0.5 #(translational spring)
uniaxialMaterial Steel01 2 19 2.34 0.28 #(rotational spring)

puts "materials are defined"


#-------------------------------------------
geomTransf Linear 1 0 0 1

puts "geomTransf are defined"


#creating command named Rotational Springs -------------------------
# Create the zero length element
#element zeroLength $eleTag $iNode $jNode -mat $matTag1 $matTag2 ... -dir $dir1 $dir2 ...

element zeroLength 11 1 2 -mat 1 2 -dir 3 5


equalDOF 1 2 1 2 4 6

puts "sections are defined"


#element elasticBeamColumn $eleTag $iNode $jNode $A $E $G $J $Iy $Iz $transfTag-----------------------
#### beam(rigid)

element elasticBeamColumn 111 2 3 .1 10e10 10e10 .1 .1 .1 1

puts "elements are defined"


#----------------------------------------
fix 3 0 1 0 1 0 1

puts "center of mass is defined"


#Define mass--------------------------------------

set mass1 0.9471 #(mass)
set mass_I 0.0529 #(moment of inertia)

mass 3 $mass1 0 $mass1 0 $mass_I 0


puts "story mass are defined"


#Define restrain--------------------------------
fix 1 1 1 1 1 1 1

puts "support is defined"


#set recorders directions & adaresses----------

set mode1 "Data/Nodes Eigen vector mode1.txt"

set nodesdisplacement "Data/nodes displacement - 3.txt"

set envelopenodesdisplacement "Data/envelope nodes displacement - 3.txt"

###################################################################################################

#set recorders command----------

recorder Node -file $mode1 -time -node 3 -dof 3 "eigen 1"

recorder Node -file $nodesdisplacement -time -nodes 3 -dof 3 disp

recorder EnvelopeNode -file $envelopenodesdisplacement -time -node 3 -dof 3 disp

puts "recorder 2DOF"



#define gravity,weights----------

set Weight1 [expr $mass1*$kg*$g]


#define gravity loads-----------

pattern Plain 1 Linear {

load 3 0.0 -$Weight1 0.0 0.0 0.0 0.0

}

eigen 1

#Gravity analysis parameters--------LoadControl static analysis

set Tol 1.0e-8;
constraints Transformation;
numberer RCM;
system SparseGeneral;
test NormDispIncr $Tol 50;
algorithm Newton;
integrator LoadControl 0.1; #first load increment (pseudo-time step) in the next invocation of the analysis command.
analysis Static;
analyze 10;
loadConst -time 0.0; #keep gravity load and restart time -- lead to lateral load analysis

puts "define gravity loads & analysis"

set Lambda [eigen 1]
puts "\nEigenvalues at start of transient:"
puts " Lambda Omega Period"
foreach Lambda $Lambda {
if {$Lambda > 0.0} {
set Omega [expr pow($Lambda,0.5)]
set Period [expr 2*$pi/$Omega]
puts "-------------------------------------------"
puts "$Lambda $Omega $Period"
}
}


# define dynamic analysis parameter------------------------------------

constraints Transformation
numberer RCM
system SparseGeneral
test NormDispIncr $Tol 50 0
algorithm Newton
integrator Newmark 0.5 0.25
analysis Transient

puts " "
puts "dynamic analysis parameter"


proc ReadSMDFile {inFilename outFilename dt} {
#########################################################
# ReadSMDFile $inFilename $outFilename $dt

# NPTS= 1642, DT= .02000 SEC

upvar $dt DT; # Pass dt by reference

# Open the input file and catch the error if it can't be read
if [catch {open $inFilename r} inFileID] {
puts stderr "Cannot open $inFilename for reading"
} else {
# Open output file for writing
set outFileID [open $outFilename w]

# Flag indicating dt is found and that ground motion
# values should be read -- ASSUMES dt is on last line
# of header!!!
set flag 0
# Look at each line in the file
foreach line [split [read $inFileID] \n] {
if {[llength $line] == 0} {
# Blank line --> do nothing
continue
} elseif {$flag == 1} {
# Echo ground motion values to output file
puts $outFileID $line
} else {
# Search header lines for dt
foreach word [split $line] {
# Read in the time step
if {$flag == 1} {
set DT $word
break
}
# Find the desired token and set the flag
if {[string match $word "DT="] == 1} {set flag 1}
}
}
}
close $outFileID; # Close the output file
close $inFileID; # Close the input file
}
}

puts "Proc ReadSMDFile"


# Uniform Earthquake ground motion (uniform acceleration input at all support nodes)
set GMdirection 3; # ground-motion direction
set GMfile "tabas.acc" ; # ground-motion filenames
set GMfact 1; # ground-motion scaling factor

# set up ground-motion-analysis parameters
set DtAnalysis [expr 0.02*$sec]; # time-step Dt for lateral analysis
set TmaxAnalysis [expr 30*$sec]; # maximum duration of ground-motion analysis -- should be 50*$sec

# ------------ define & apply damping
# RAYLEIGH damping parameters, Where to put M/K-prop damping, switches (http://opensees.berkeley.edu/OpenSees/m ... l/1099.htm)
# 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 1; # mode 1
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

# --------------------------------- perform Dynamic Ground-Motion Analysis
# the following commands are unique to the Uniform Earthquake excitation
set IDloadTag 400; # for uniformSupport excitation

# Uniform EXCITATION: acceleration input
set inFile tabas.acc;
set outFile tabas.th; # set variable holding new filename (PEER files have .at2/dt2 extension)
ReadSMDFile $inFile $outFile dt; # call procedure to convert the ground-motion file
set GMfatt [expr $g*$GMfact]; # data in input file is in g Unifts -- ACCELERATION TH
set AccelSeries "Series -dt $dt -filePath $outFile -factor $GMfatt"; # time series information
pattern UniformExcitation $IDloadTag $GMdirection -accel $AccelSeries ; # create Unifform excitation

set Nsteps [expr int($TmaxAnalysis/$DtAnalysis)];

set ok 0;
set controlTime [getTime];
set nModes 1
set i 0
for {set i 0} {$i<$Nsteps} {incr i 1} {
while {$controlTime < $TmaxAnalysis && $ok == 0} {
set controlTime [getTime]
set ok [analyze 1 $DtAnalysis]

if {$ok != 0} {

puts "Trying Newton with Initial Tangent .."
test NormDispIncr $Tol 1000 0
algorithm Newton -initial
set ok [analyze 1 $DtAnalysis]
test $testTypeDynamic $TolDynamic $maxNumIterDynamic 0
algorithm $algorithmTypeDynamic


}
if {$ok != 0} {
puts "Trying Broyden .."
algorithm Broyden 8
set ok [analyze 1 $DtAnalysis]
algorithm $algorithmTypeDynamic



}
if {$ok != 0} {
puts "Trying NewtonWithLineSearch .."
algorithm NewtonLineSearch .8
set ok [analyze 1 $DtAnalysis]
algorithm $algorithmTypeDynamic

}

if {$ok == 0} {
eigen $nModes
}
}


}
puts "Ground Motion Done. End Time: [getTime]"



Thanks a lot dear vesna.
I'm preparing my thesis,and your advices are very useful for me.
vesna
Posts: 3033
Joined: Tue May 23, 2006 11:23 am
Location: UC Berkeley

Re: Rotational springs

Post by vesna »

I looked at your commands for defining a zeroLength elements and they look ok. Both of your springs have nonlinear materials assigned to it. The possible reason for not seeing changes in response after you change Fy and b for rotational spring is the following: for all selections of Fy and b the rotational spring did not get to the nonlinear range for the applied earthquake. Plot moment-rotation relationship for spring to see how it changes with the change of Fy and b.
papaloo
Posts: 15
Joined: Fri Apr 08, 2011 8:41 am
Location: Istanbul Technical University

Re: Rotational springs

Post by papaloo »

Hi dear vesna...
I applied another earthquake record to my model.It gets to the inelastic range,but my problem isn't solved. :(
I was wondering if you'd mind showing me a command which defines a rotational spring with its appropriate elastic and inelastic parameters.
As you know,a rotational spring needs some variables (My:yielding moment,as an inelastic parameter & post-yielding stiffness)to behave as a nonlinear element.
Please help me...
Thanks a lot.

Mohsen
vesna
Posts: 3033
Joined: Tue May 23, 2006 11:23 am
Location: UC Berkeley

Re: Rotational springs

Post by vesna »

To define your rotational spring you are using nonlinear material Steel01. In the case of rotational spring: Fy is yielding moment (My), E0 is element stiffness, and b is strain-hardening ratio. If you apply big enough earthquake you should see hysteretic behavior of your spring.
arame08
Posts: 1
Joined: Tue Aug 09, 2011 4:35 am

Re: Rotational springs

Post by arame08 »

It gets to the inelastic range,but my problem isn't solved
I was wondering if you'd mind showing me a command which defines a rotational spring with its appropriate elastic and inelastic parameters.
Post Reply