3.1.7.1.3. sp Command
This command is used to construct a single-point constraint (SP_Constraint) that imposes a value, usually a displacement, on one degree-of-freedom at a node, and add it to the enclosing load pattern. Unlike a constraint created with fix Command, which holds the degree-of-freedom at zero, the imposed value is scaled by the pattern’s time series, so it can vary with time.
- sp $nodeTag $dof $dofValue <-const> <-subtractInit> <-pattern $patternTag>
ops.sp(nodeTag, dof, dofValue, '-const', '-subtractInit', '-pattern', patternTag)
Argument |
Type |
Description |
|---|---|---|
$nodeTag |
integer |
tag of the node to which the constraint is applied |
$dof |
integer |
degree-of-freedom at the node to which the constraint is applied (1 through ndf) |
$dofValue |
float |
reference value of the constraint |
-const |
string |
the value is not scaled by the load factor of the pattern (optional) |
-subtractInit |
string |
the value is measured from the displacement the node has when the constraint is added (optional; see note 2) |
$patternTag |
integer |
add the constraint to the pattern with this tag instead of the enclosing one (optional) |
Note
$dofValue is a reference value. The value actually imposed at time \(t\) is the reference value times the load factor \(\lambda(t)\) from the pattern’s timeSeries Command.
By default the imposed value is the total displacement of the degree-of-freedom. With -subtractInit it is instead added to the displacement the node has when the constraint is added, which is useful when the constraint is added after an earlier analysis, e.g. a gravity analysis, has already displaced the node. In the current Python interpreter this option has no effect.
How the constraint is enforced is determined by the constraints Command command.
Warning
Do not apply an sp to a degree-of-freedom that is already constrained, by fix Command or by another sp command. OpenSees does not check for this, and the two constraints will conflict.
Example:
The following example imposes a cyclic horizontal displacement on node 3, using a Triangle time series with a period of 10.0 and a reference displacement of 0.5. The displacement goes from 0.0 up to 0.5, down to -0.5 and back to 0.0 every 10.0 units of time, for 2 cycles.
Tcl Code
timeSeries Triangle 1 0.0 20.0 10.0
pattern Plain 1 1 {
sp 3 1 0.5
}
Python Code
ops.timeSeries('Triangle', 1, 0.0, 20.0, 10.0)
ops.pattern('Plain', 1, 1)
ops.sp(3, 1, 0.5)
Code Developed by: fmk