Hi all,
I am modeling a spring and damper system with truss elements elastic and viscous. When I output the damper force and compared with c*veloc they are not the same.
Thanks for your help,
Lola
damper force
Moderators: silvia, selimgunay, Moderators
# --------------------------------------------------------------------------------------------------
# SDOF system with spring and damper
# all units are in kip, inch, second
#
# SET UP ----------------------------------------------------------------------------
wipe; # clear opensees model
model basic -ndm 2 -ndf 3; # 2 dimensions, 3 dof per node
file mkdir data3; # create data directory
# define GEOMETRY -------------------------------------------------------------
# nodal coordinates:
node 1 0 0; # node#, X Y
node 2 12 0;
# Single point constraints -- Boundary Conditions
fix 1 1 1 1; # node DX DY RZ
fix 2 0 1 1
# nodal masses:
mass 2 6.84 0. 0.; # node#, Mx My Mz, Mass=Weight/g.
geomTransf Linear 1;
#Spring
set E 29000.0;
set A 0.785;
#Definition of material
uniaxialMaterial Elastic 1 $E;
#Definition Element
element truss 1 1 2 $A 1;
#Damper
set C 4.55;
set alpha 1;
#Definition of material
uniaxialMaterial Viscous 2 $C $alpha;
#Definition Element
element truss 2 1 2 $C 2;
# Define RECORDERS -------------------------------------------------------------
recorder Node -file Data3/DFree.txt -time -node 2 -dof 1 disp; # displacements of free nodes
recorder Node -file Data3/DBase.txt -time -node 1 -dof 1 disp; # displacements of support nodes
recorder Node -file Data3/VFree.txt -time -node 2 -dof 1 vel; # velocity of free nodes
recorder Node -file Data3/VBase.txt -time -node 1 -dof 1 vel; # velocity of support nodes
recorder Element -file Data3/spring.txt -time -ele 1 globalForce; # element forces -- column
recorder Element -file Data3/damper.txt -time -ele 2 globalForce; # element forces -- beam
#Calculates the frequencies and periods of the structure
set pi 3.14159265358979
set lambda [eigen -fullGenLapack 1]
puts "\nEigenvalues at start of transient:"
puts "lambda omega period"
foreach lambda $lambda {
set omega [expr pow($lambda,0.5)]
set period [expr 2*$pi/pow($lambda,0.5)]
puts "$lambda $omega $period"}
set xDamp 0.0
set KcurrSwitch 0 ;
set KcommSwitch 1;
set KinitSwitch 0;
set nEigenI 1; # mode 1
set lambdaN [eigen [expr $nEigenI]]; # eigenvalue analysis for nEigenJ modes
set lambdaI [lindex $lambdaN [expr $nEigenI-1]]; # eigenvalue mode i
puts "$lambdaN $lambdaI"
set omegaI [expr pow($lambdaI,0.5)];
set alphaM 0; # M-prop. damping; D = alphaM*M
set betaKcurr [expr $KcurrSwitch*2.*$xDamp/($omegaI)]; # K-proportional damping; +beatKcurr*KCurrent
set betaKcomm [expr $KcommSwitch*2.*$xDamp/($omegaI)]; # K-prop. damping parameter; +betaKcomm*KlastCommitt
set betaKinit [expr $KinitSwitch*2.*$xDamp/($omegaI)]; # initial-stiffness proportional damping +beatKinit*Kini
#define damping
rayleigh $alphaM $betaKcurr $betaKinit $betaKcomm; # RAYLEIGH damping[/quote]
#DYNAMIC ground-motion analysis -------------------------------------------------------------
# create load pattern
set accelSeries "Series -dt 0.02 -filePath elcentro.txt -factor 1"; # define acceleration vector from file (dt=0.02 is associated with the input file gm)
pattern UniformExcitation 1 1 -accel $accelSeries; # define where and how (pattern tag, dof) acceleration is applied
#create the analysis
wipeAnalysis; # clear previously-define analysis parameters
constraints Plain; # how it handles boundary conditions
numberer Plain; # renumber dof's to minimize band-width (optimization), if you want to
system BandGeneral; # how to store and solve the system of equations in the analysis
test NormDispIncr 1.0e-8 10; # determine if convergence has been achieved at the end of an iteration step
algorithm Newton; # use Newton's solution algorithm: updates tangent stiffness at every iteration
integrator Newmark 0.5 0.25 ; # determine the next time step for an analysis
analysis Transient; # define type of analysis: time-dependent
analyze 2688 0.02; # apply 1000 0.02-sec time steps in analysis
puts "Ground Motion Done. End Time: [getTime]"
# SDOF system with spring and damper
# all units are in kip, inch, second
#
# SET UP ----------------------------------------------------------------------------
wipe; # clear opensees model
model basic -ndm 2 -ndf 3; # 2 dimensions, 3 dof per node
file mkdir data3; # create data directory
# define GEOMETRY -------------------------------------------------------------
# nodal coordinates:
node 1 0 0; # node#, X Y
node 2 12 0;
# Single point constraints -- Boundary Conditions
fix 1 1 1 1; # node DX DY RZ
fix 2 0 1 1
# nodal masses:
mass 2 6.84 0. 0.; # node#, Mx My Mz, Mass=Weight/g.
geomTransf Linear 1;
#Spring
set E 29000.0;
set A 0.785;
#Definition of material
uniaxialMaterial Elastic 1 $E;
#Definition Element
element truss 1 1 2 $A 1;
#Damper
set C 4.55;
set alpha 1;
#Definition of material
uniaxialMaterial Viscous 2 $C $alpha;
#Definition Element
element truss 2 1 2 $C 2;
# Define RECORDERS -------------------------------------------------------------
recorder Node -file Data3/DFree.txt -time -node 2 -dof 1 disp; # displacements of free nodes
recorder Node -file Data3/DBase.txt -time -node 1 -dof 1 disp; # displacements of support nodes
recorder Node -file Data3/VFree.txt -time -node 2 -dof 1 vel; # velocity of free nodes
recorder Node -file Data3/VBase.txt -time -node 1 -dof 1 vel; # velocity of support nodes
recorder Element -file Data3/spring.txt -time -ele 1 globalForce; # element forces -- column
recorder Element -file Data3/damper.txt -time -ele 2 globalForce; # element forces -- beam
#Calculates the frequencies and periods of the structure
set pi 3.14159265358979
set lambda [eigen -fullGenLapack 1]
puts "\nEigenvalues at start of transient:"
puts "lambda omega period"
foreach lambda $lambda {
set omega [expr pow($lambda,0.5)]
set period [expr 2*$pi/pow($lambda,0.5)]
puts "$lambda $omega $period"}
set xDamp 0.0
set KcurrSwitch 0 ;
set KcommSwitch 1;
set KinitSwitch 0;
set nEigenI 1; # mode 1
set lambdaN [eigen [expr $nEigenI]]; # eigenvalue analysis for nEigenJ modes
set lambdaI [lindex $lambdaN [expr $nEigenI-1]]; # eigenvalue mode i
puts "$lambdaN $lambdaI"
set omegaI [expr pow($lambdaI,0.5)];
set alphaM 0; # M-prop. damping; D = alphaM*M
set betaKcurr [expr $KcurrSwitch*2.*$xDamp/($omegaI)]; # K-proportional damping; +beatKcurr*KCurrent
set betaKcomm [expr $KcommSwitch*2.*$xDamp/($omegaI)]; # K-prop. damping parameter; +betaKcomm*KlastCommitt
set betaKinit [expr $KinitSwitch*2.*$xDamp/($omegaI)]; # initial-stiffness proportional damping +beatKinit*Kini
#define damping
rayleigh $alphaM $betaKcurr $betaKinit $betaKcomm; # RAYLEIGH damping[/quote]
#DYNAMIC ground-motion analysis -------------------------------------------------------------
# create load pattern
set accelSeries "Series -dt 0.02 -filePath elcentro.txt -factor 1"; # define acceleration vector from file (dt=0.02 is associated with the input file gm)
pattern UniformExcitation 1 1 -accel $accelSeries; # define where and how (pattern tag, dof) acceleration is applied
#create the analysis
wipeAnalysis; # clear previously-define analysis parameters
constraints Plain; # how it handles boundary conditions
numberer Plain; # renumber dof's to minimize band-width (optimization), if you want to
system BandGeneral; # how to store and solve the system of equations in the analysis
test NormDispIncr 1.0e-8 10; # determine if convergence has been achieved at the end of an iteration step
algorithm Newton; # use Newton's solution algorithm: updates tangent stiffness at every iteration
integrator Newmark 0.5 0.25 ; # determine the next time step for an analysis
analysis Transient; # define type of analysis: time-dependent
analyze 2688 0.02; # apply 1000 0.02-sec time steps in analysis
puts "Ground Motion Done. End Time: [getTime]"