3.4.3. nodeDisp Command

This command returns the current displacement of a node.

nodeDisp $nodeTag <$dof>

Argument

Type

Description

$nodeTag

integer

tag of the node

$dof

integer

degree-of-freedom at the node (1 through ndf) (optional: default = all)

Note

If $dof is given, the command returns a single value. Otherwise it returns a list of the displacement for every degree-of-freedom at the node.

Example 1:

The following example sets the variable disp to the displacement of the node with tag nodeTag in the 1 degree-of-freedom, and dispAll to all its displacements.

set disp [nodeDisp $nodeTag 1]
set dispAll [nodeDisp $nodeTag]

Example 2: Pushover analysis

A common use of nodeDisp is to control a loop of analysis steps. The following example runs a pushover analysis, with a DisplacementControl integrator, until the displacement of node 3 in the 1 degree-of-freedom reaches maxU. If a step fails to converge with the Newton algorithm, it is tried again with the modified Newton algorithm using the initial stiffness and more iterations, before going back to Newton for the next step. The loop stops when the displacement reaches maxU, after the step that passes it, or when a step fails with both algorithms.

set maxU 15.0;          # maximum displacement
set currentDisp 0.0
set ok 0

while {$ok == 0 && $currentDisp < $maxU} {
    set ok [analyze 1]

    # if the analysis fails, try initial tangent iteration
    if {$ok != 0} {
        puts "regular Newton failed .. trying an initial stiffness for this step"
        test NormDispIncr 1.0e-12 1000
        algorithm ModifiedNewton -initial
        set ok [analyze 1]
        test NormDispIncr 1.0e-12 10
        algorithm Newton
    }

    set currentDisp [nodeDisp 3 1]
}

Code Developed by: fmk