Hello! I am using localForce recorders to record element forces. However, the numbers I get aren't correct.
I am giving an example, where I have divided a beam in three parts modelled with elasticBeamColumn. Its load is 11.96 per length unit, parts 1 and 3 have length 0.92 and the 2nd one 2.76. The results are as follows for a given time 1658.47 at a pushover analysis: (The torque is a bit different as I have used rigid elements in between)
1st: 1658.47 0 0 [17.1728] -1.2567 57.6861 0 0 0 -6.16607 1.2567 {-46.9502} 0
2nd: 1658.47 0 0 [50.1931] -0.498775 {46.9502} 0 0 0 [-17.1728] 0.498775 {46.0147} 0
3nd: 1658.47 0 0 61.1998 2.58462 {-46.0147} 0 0 0 [-50.1931] -2.58462 97.2554 0
As you see, the moments seem to be correct, however the shear forces are in the wrong place, confusing the beginning node and the end node. Simple static analysis knowing the load, length and moments at the ends show that shear forces are the opposite way too. Is there maybe an error in the transformation vectors I have used or a bug in the recorder? Thanks!
localForce problem
Moderators: silvia, selimgunay, Moderators
Re: localForce problem
not quite sure what your analysis is, here is a simple model with theose values showing results are correct for local force directions we use in OpenSees:
model basic -ndm 2 -ndf 3
# nodes
set nodeTag 0;
set xCoords {0.0 0.92 3.68 4.60}
foreach xCoord $xCoords {
incr nodeTag
node $nodeTag $xCoord 0.
set L $xCoord
}
# fix supports
fix 1 1 1 0
fix $nodeTag 1 1 0
# elements
geomTransf Linear 1
set A 10.0; set E 10000.0; set I 1000.0;
element elasticBeamColumn 1 1 2 $A $E $I 1
element elasticBeamColumn 2 2 3 $A $E $I 1
element elasticBeamColumn 3 3 4 $A $E $I 1
# load
set w -11.96
timeSeries Linear 1
pattern Plain 1 1 {
eleLoad -ele 1 2 3 -type -beamUniform $w 0.
}
#analysis
integrator LoadControl 1.0
test NormDispIncr 1.0e-12 2
algorithm Newton
system ProfileSPD
numberer Plain
constraints Plain
analysis Static
analyze 1
#check results
puts " EXACT COMPUTED"
set formatString { %10s %10s %10s %10s %10s %10s %10s %10s}
puts [format $formatString V1 V2 M1 M2 V1 V2 M1 M2]
set formatString {%15.5f%15.5f%15.5f%15.5f%15.5f%15.5f%15.5f%15.5f}
set R1 [expr $w*$L/2.0]
for {set i 1} {$i < $nodeTag} {incr i 1} {
set eleForces [eleResponse $i localForces]
set loc1 [lindex $xCoords [expr $i-1]]
set loc2 [lindex $xCoords $i]
set V1 [expr -($R1-$w*$loc1)];
set V2 [expr $R1-$w*$loc2];
set M1 [expr $R1*$loc1-($w*$loc1*$loc1/2.0)];
set M2 [expr -($R1*$loc2-($w*$loc2*$loc2/2.0))];
puts [format $formatString $V1 $M1 $V2 $M2 [lindex $eleForces 1] [lindex $eleForces 2] [lindex $eleForces 4] [lindex $eleForces 5]]
}
model basic -ndm 2 -ndf 3
# nodes
set nodeTag 0;
set xCoords {0.0 0.92 3.68 4.60}
foreach xCoord $xCoords {
incr nodeTag
node $nodeTag $xCoord 0.
set L $xCoord
}
# fix supports
fix 1 1 1 0
fix $nodeTag 1 1 0
# elements
geomTransf Linear 1
set A 10.0; set E 10000.0; set I 1000.0;
element elasticBeamColumn 1 1 2 $A $E $I 1
element elasticBeamColumn 2 2 3 $A $E $I 1
element elasticBeamColumn 3 3 4 $A $E $I 1
# load
set w -11.96
timeSeries Linear 1
pattern Plain 1 1 {
eleLoad -ele 1 2 3 -type -beamUniform $w 0.
}
#analysis
integrator LoadControl 1.0
test NormDispIncr 1.0e-12 2
algorithm Newton
system ProfileSPD
numberer Plain
constraints Plain
analysis Static
analyze 1
#check results
puts " EXACT COMPUTED"
set formatString { %10s %10s %10s %10s %10s %10s %10s %10s}
puts [format $formatString V1 V2 M1 M2 V1 V2 M1 M2]
set formatString {%15.5f%15.5f%15.5f%15.5f%15.5f%15.5f%15.5f%15.5f}
set R1 [expr $w*$L/2.0]
for {set i 1} {$i < $nodeTag} {incr i 1} {
set eleForces [eleResponse $i localForces]
set loc1 [lindex $xCoords [expr $i-1]]
set loc2 [lindex $xCoords $i]
set V1 [expr -($R1-$w*$loc1)];
set V2 [expr $R1-$w*$loc2];
set M1 [expr $R1*$loc1-($w*$loc1*$loc1/2.0)];
set M2 [expr -($R1*$loc2-($w*$loc2*$loc2/2.0))];
puts [format $formatString $V1 $M1 $V2 $M2 [lindex $eleForces 1] [lindex $eleForces 2] [lindex $eleForces 4] [lindex $eleForces 5]]
}
Re: localForce problem
Thanks for the reply!
I made the model in 3d and the results seem to be in different order:
EDIT: The problem seems to exist only with shear forces in Z axis, loading the beam in Y axis gives correct shear forces.
wipe
model basic -ndm 3 -ndf 6
# nodes
set nodeTag 0;
set xCoords {0.0 0.92 3.68 4.60}
foreach xCoord $xCoords {
incr nodeTag
node $nodeTag $xCoord 0. 0.
set L $xCoord
}
# fix supports
fix 1 1 1 1 0 0 0
fix $nodeTag 1 1 1 0 0 0
# elements
geomTransf Linear 1 0 0 1
set A 10.0; set E 10000.0; set I 1000.0; set J 1000.0; set G 10000.0
element elasticBeamColumn 1 1 2 $A $E $G $J $I $I 1
element elasticBeamColumn 2 2 3 $A $E $G $J $I $I 1
element elasticBeamColumn 3 3 4 $A $E $G $J $I $I 1
# load
set w -11.96
timeSeries Linear 1
pattern Plain 1 1 {
eleLoad -ele 1 2 3 -type -beamUniform 0. $w 0.
}
#analysis
integrator LoadControl 1.0
test NormDispIncr 1.0e-12 2
algorithm Newton
system ProfileSPD
numberer Plain
constraints Plain
analysis Static
analyze 1
#check results
# puts " EXACT COMPUTED"
# set formatString { %10s %10s %10s %10s %10s %10s %10s %10s}
# puts [format $formatString V1 V2 M1 M2 V1 V2 M1 M2]
set formatString {%8.2f%8.2f%8.2f%8.2f%8.2f%8.2f%8.2f%8.2f%8.2f%8.2f%8.2f%8.2f}
# set R1 [expr $w*$L/2.0]
for {set i 1} {$i < $nodeTag} {incr i 1} {
set eleForces [eleResponse $i localForces]
# set loc1 [lindex $xCoords [expr $i-1]]
# set loc2 [lindex $xCoords $i]
# set V1 [expr -($R1-$w*$loc1)];
# set V2 [expr $R1-$w*$loc2];
# set M1 [expr $R1*$loc1-($w*$loc1*$loc1/2.0)];
# set M2 [expr -($R1*$loc2-($w*$loc2*$loc2/2.0))];
# puts [format $formatString $V1 $M1 $V2 $M2 [lindex $eleForces 1] [lindex $eleForces 2] [lindex $eleForces 4] [lindex $eleForces 5]]
puts [format $formatString [lindex $eleForces 0] [lindex $eleForces 1] [lindex $eleForces 2] [lindex $eleForces 3] [lindex $eleForces 4] [lindex $eleForces 5] [lindex $eleForces 6] [lindex $eleForces 7] [lindex $eleForces 8] [lindex $eleForces 9] [lindex $eleForces 10] [lindex $eleForces 11]]
}
I made the model in 3d and the results seem to be in different order:
EDIT: The problem seems to exist only with shear forces in Z axis, loading the beam in Y axis gives correct shear forces.
wipe
model basic -ndm 3 -ndf 6
# nodes
set nodeTag 0;
set xCoords {0.0 0.92 3.68 4.60}
foreach xCoord $xCoords {
incr nodeTag
node $nodeTag $xCoord 0. 0.
set L $xCoord
}
# fix supports
fix 1 1 1 1 0 0 0
fix $nodeTag 1 1 1 0 0 0
# elements
geomTransf Linear 1 0 0 1
set A 10.0; set E 10000.0; set I 1000.0; set J 1000.0; set G 10000.0
element elasticBeamColumn 1 1 2 $A $E $G $J $I $I 1
element elasticBeamColumn 2 2 3 $A $E $G $J $I $I 1
element elasticBeamColumn 3 3 4 $A $E $G $J $I $I 1
# load
set w -11.96
timeSeries Linear 1
pattern Plain 1 1 {
eleLoad -ele 1 2 3 -type -beamUniform 0. $w 0.
}
#analysis
integrator LoadControl 1.0
test NormDispIncr 1.0e-12 2
algorithm Newton
system ProfileSPD
numberer Plain
constraints Plain
analysis Static
analyze 1
#check results
# puts " EXACT COMPUTED"
# set formatString { %10s %10s %10s %10s %10s %10s %10s %10s}
# puts [format $formatString V1 V2 M1 M2 V1 V2 M1 M2]
set formatString {%8.2f%8.2f%8.2f%8.2f%8.2f%8.2f%8.2f%8.2f%8.2f%8.2f%8.2f%8.2f}
# set R1 [expr $w*$L/2.0]
for {set i 1} {$i < $nodeTag} {incr i 1} {
set eleForces [eleResponse $i localForces]
# set loc1 [lindex $xCoords [expr $i-1]]
# set loc2 [lindex $xCoords $i]
# set V1 [expr -($R1-$w*$loc1)];
# set V2 [expr $R1-$w*$loc2];
# set M1 [expr $R1*$loc1-($w*$loc1*$loc1/2.0)];
# set M2 [expr -($R1*$loc2-($w*$loc2*$loc2/2.0))];
# puts [format $formatString $V1 $M1 $V2 $M2 [lindex $eleForces 1] [lindex $eleForces 2] [lindex $eleForces 4] [lindex $eleForces 5]]
puts [format $formatString [lindex $eleForces 0] [lindex $eleForces 1] [lindex $eleForces 2] [lindex $eleForces 3] [lindex $eleForces 4] [lindex $eleForces 5] [lindex $eleForces 6] [lindex $eleForces 7] [lindex $eleForces 8] [lindex $eleForces 9] [lindex $eleForces 10] [lindex $eleForces 11]]
}
Re: localForce problem
Hi! Since the new version has been released (thanks for the 64-bit version! ), I tried testing the codes above again and the problem seems to persist. So I am bringing this topic up for the next update! Thanks for the hard work!
Re: localForce problem
Frank and I should have it sorted out tomorrow.