Hi. I am trying to model simple spring in order to verify more complex models. However I cant get a force in the spring. I looked at the file 10x times and can't figure this.
So please if anyone can help!
model BasicBuilder -ndm 2 -ndf 3
set L 200
set A 20
set E 21000
set I 167
node 1 0.0 0.0
node 2 $L 0.0
node 3 $L 0.0
node 4 [expr 2*$L] 0.0
fix 1 1 1 0
#fix 2 1 1 1
fix 4 0 1 0
equalDOF 2 3 1 3
# Define force-deformation relationship for spring
uniaxialMaterial Elastic 1 1050
# id ndI ndJ mat dir
element zeroLength 1 2 3 -mat 1 -dir 2
# Geometric transformation
geomTransf Linear 1
# id ndI ndJ A E I transf
element elasticBeamColumn 2 1 2 $A $E $I 1
element elasticBeamColumn 3 3 4 $A $E $I 1
pattern Plain 1 Linear {
eleLoad -ele 2 -type -beamUniform -5
eleLoad -ele 3 -type -beamUniform -5
}
#recorder Node Z.out disp -time -node 2 -dof 2
recorder Node -file p.txt -time -node 2 3 -dof 2 disp
recorder Node -file px.txt -time -node 3 -dof 1 disp
recorder Element -file ele1.txt -time -ele 1 localForce
recorder Element -file ele2.txt -time -ele 2 3 localForce
constraints Plain
numberer RCM
test NormUnbalance 1.0e-2 250 0
integrator LoadControl 0.025 1 0.025 0.025
algorithm Newton
system ProfileSPD
analysis Static
integrator LoadControl 0.05 3 0.05 0.05
analyze 16
integrator LoadControl 0.02 3 0.02 0.02
analyze 10
Simple supported beam with spring in the middle
Moderators: silvia, selimgunay, Moderators