Modelling a spring Element

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

Moderators: silvia, selimgunay, Moderators

Post Reply
diarmaidmeagher
Posts: 5
Joined: Sun Oct 18, 2020 1:39 pm

Modelling a spring Element

Post by diarmaidmeagher » Fri Jun 25, 2021 5:20 am

What's the best way to model a spring element with a defined spring stiffness in OpenSees? I am trying to model a load acing on a vertical spring, and I am currently using the ViscousDamper material and TwoNodeLink element to do so.
This is producing and error in OpenSees and I am not sure why this is happening, but my best guess is that the model is unstable between the nodes at the top and at the bottom of the spring. Would anyone have any idea how to solve this issue?

mhscott
Posts: 868
Joined: Tue Jul 06, 2004 3:38 pm
Location: Corvallis, Oregon USA
Contact:

Re: Modelling a spring Element

Post by mhscott » Sat Jun 26, 2021 8:48 am

Typically, zeroLength elements are used for springs. TwoNodeLink is OK too, but it has some extra inputs. Either way, you have to constrain the DOFs with zero stiffness at the nodes.

diarmaidmeagher
Posts: 5
Joined: Sun Oct 18, 2020 1:39 pm

Re: Modelling a spring Element

Post by diarmaidmeagher » Tue Jun 29, 2021 4:11 am

Thanks. To constrain the nodes with zero stiffness should I be using the equalDOF command? I am still getting the following error when I run my model in OpenSees:

WARNING: numeric analysis returns 1 -- Umfpackgenlinsolver::solve
WARNING AcceleratedNewton::solveCurrentStep() -the LinearSysOfEqn failed in solve()
DirectIntegrationAnalysis::analyze() - the Algorithm failed at time 1.01
OpenSees > analyze failed, returned: -3 error flag


This is how I have defined my Spring damper elements. Note that the spring and damper are in parallel so I have defined two seperate viscous damper materials.


# Define Spring & Damper Elements

set Damper 1
set Spring 2
set SpringDamper 3

# Define Viscous Damper No.1 Negligible Damping Coefficient
# Spring Properties
set Kd_1 233902; # N/m (calculated using IStructE guidance formula)
set Cd_1 1e-9
set alpha 1

# Define Viscous Damper No.2 Negligible Spring Stiffness
#Damper Properties
set Ccr 0.25
set Kd_2 1e-9
set Cd_2 [expr $Ccr*2*sqrt($Kd_1*$mp)]; # Damping coefficient equation derived from 'Eta = c/(2*sqrt(k*m))

#uniaxialMaterial ViscousDamper $matTag $K $Cd $alpha <$LGap> < $NM $RelTol $AbsTol $MaxHalf>
uniaxialMaterial ViscousDamper $Spring $Kd_1 $Cd_1 $alpha
uniaxialMaterial ViscousDamper $Damper $Kd_2 $Cd_2 $alpha

# Define Parallel Material so both damper and spring are in parallel
#uniaxialMaterial Parallel $matTag $tag1 $tag2 ... <-factors $fact1 $fact2 ...>
uniaxialMaterial Parallel $SpringDamper $Spring $Damper

# Define Spring/Damper Elements using previously defined materials
#element zeroLength $eleTag $iNode $jNode -mat $matTag1 $matTag2 ... -dir $dir1 $dir2 ...<-doRayleigh $rFlag> <-orient $x1 $x2 $x3 $yp1 $yp2 $yp3>
element zeroLength 8 1 11 -mat 3 -dir 2
element zeroLength 9 2 12 -mat 3 -dir 2
element zeroLength 10 3 13 -mat 3 -dir 2
element zeroLength 11 4 14 -mat 3 -dir 2
element zeroLength 12 5 15 -mat 3 -dir 2
element zeroLength 13 6 16 -mat 3 -dir 2

#equalDOF $rNodeTag $cNodeTag $dof1 $dof2 ...
equalDOF 1 11 1 3
equalDOF 2 12 1 3
equalDOF 3 13 1 3
equalDOF 4 14 1 3
equalDOF 5 15 1 3
equalDOF 6 16 1 3

Post Reply