Acceleration recorder

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

Moderators: silvia, selimgunay, Moderators

Post Reply
Jayram

Acceleration recorder

Post by Jayram » Mon Oct 11, 2004 11:31 pm

Hi,

Is there a problem with the acceleration recorder? The acceleration values output by Opensees seem to be way off expected values. I understand that numerical differentiation is intrinsically ill-conditioned, however, when I manually computed the second derivative of a harmonic displacement using the central difference formula, I was able to get pretty good match with the theoretical acceleration values. However, the values output by opensees seem to be totally off the mark.

Jayram

fmk
Site Admin
Posts: 5883
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk » Fri Oct 15, 2004 11:20 am

acceleration recorders work fine .. here is an example script showing SDOF system subject to sin wave .. if look at plots in matlab they are on top of each oher ..

# problem: M*A(t) + K*U(t) = Po Sin(Wt)
# U(0) = V(0) = 0.0

# solution: U(t) = Po/K * 1/(1-(W/Wn)^2) [Sin(W*t) - W/Wn Sin (Wn*t)]
# V(t) = Po/K * 1/(1-(W/Wn)^2) [WCos(W*t) - W Cos (Wn*t)]
# A(t) = Po/K * 1/(1-(W/Wn)^2) [-W^2Sin(W*t) + W Wn Sin(Wn*t)]

# set some constants

set PI 3.14159265
set g 386.4

# set some parameters
set Tn 5.0 ; #period of model
set T 1.0 ; #period of input motion
set Tfinal 20.0 ; #duration of analysis
set M 1.0; # mass
set A 1.0; # area
set L 1.0; # length

# some derived parameters
set Wn [expr 2.0 * $PI / $Tn]
set W [expr 2.0 * $PI / $T]
set K [expr $Wn * $Wn * $M]
set E [expr $K * $L / $A]

set Po [expr 5.0 * $K]; # magnitude of input motion

wipe

set Tmin $Tn;
if {$Tmin > $T} {
set Tmin $T;
}
set dT [expr $Tmin/200.0]


# Create ModelBuilder (with two-dimensions and 2 DOF/node)
model BasicBuilder -ndm 1 -ndf 1

# Create nodes & add to Domain - command: node nodeId xCrd yCrd
node 1 0.0
node 2 $L -mass $M

fix 1 1

# Create material - command: uniaxialMaterial Elastic matID E
uniaxialMaterial Elastic 1 $E

# Create elements - command: element truss trussID node1 node2 A matID
element truss 1 1 2 $A 1

set series "Sine 0.0 $Tfinal $T -factor $Po"

# Create UniformExcitation load pattern
pattern Plain 1 $series {
load 2 1.0
}

# ------------------------------
# Start of analysis generation
# ------------------------------

# Create the system of equation, a SPD using a band storage scheme
system BandGEN
numberer Plain
constraints Plain
integrator Newmark 0.5 0.25
test RelativeNormDispIncr 1.0e-12 10
algorithm Newton

# Create the analysis object
analysis Transient

# set some variables
set tCurrent [getTime]
set ok 0

# create a Recorder for the envelope of nodal displacements at node 2
recorder Node -time -file nodalDisp.out -node 2 -dof 1 disp
recorder Node -time -file nodalAccel.out -node 2 -dof 1 accel

set outFileID [open exact.out w]
set fact [expr $Po/$K * (1.0 / (1.0 - (($W * $W)/($Wn * $Wn))))];

while {$ok == 0 && $tCurrent < $Tfinal} {

set ok [analyze 1 $dT]

# if the analysis fails try initial tangent iteration
if {$ok != 0} {
puts "regular newton failed .. lets try an initail stiffness for this step"
test NormDispIncr 1.0e-12 100 0
algorithm ModifiedNewton -initial
set ok [analyze 1 $dT]
if {$ok == 0} {puts "that worked .. back to regular newton"}
test NormDispIncr 1.0e-12 10
algorithm Newton
}

set tCurrent [getTime]
set disp [expr $fact * (sin($W * $tCurrent) - $W/$Wn * sin($Wn * $tCurrent))];
set accel [expr $fact * (-1.0*$W*$W *sin($W*$tCurrent) + $W*$Wn*sin($Wn * $tCurrent))]
puts $outFileID "$tCurrent $disp $accel"

}

close $outFileID
set outfile [open matlab.m w]
puts $outfile "load exact.out"
puts $outfile "load nodalDisp.out"
puts $outfile "load nodalAccel.out"
puts $outfile "subplot(2,1,1)"
puts $outfile "plot(exact(:,1),exact(:,2),nodalDisp(:,1),nodalDisp(:,2));"
puts $outfile "grid\n title(\'Tn = $Tn T = $T\')\n xlabel(\'Nodal Displacement')"
puts $outfile "subplot(2,1,2)"
puts $outfile "plot(exact(:,1),exact(:,3),nodalAccel(:,1),nodalAccel(:,2));"
puts $outfile "grid\n xlabel(\'Nodal Acceleration')"
close $outfile

Jayram

Post by Jayram » Mon Oct 18, 2004 11:14 pm

Hi,

Yes, the acceleration recorder seems to be working when I run your example file. However, it is not giving the correct result for the problem I'm solving. I am running an analysis in which the excitation is in the form of a Multisupport Excitation. I input displacement, velocity and acceleration time histories at a number of locations. Then, I checked the output displacment and acceleration at one of the points with imposed motion. The displacement output matches the input time history. When I numerically differentiate the output displacement, it matches the input acceleration. However, the recorded acceleration values are much higher than the input acceleration. I also verified my results by running the same analysis in Abaqus. In the past, I have had some problems in getting good results due to the type of Constraint Handler I use. In this case, I am using the penalty method. Could there be a problem with the Constraint Handler definition?

Post Reply