OpenSees does not compute reactions automatically because this can be a time consuming process–OpenSees assembles reactions over all nodes in a model, not just over the nodes that are constrained. When performing response history analysis, assembling reactions is likely not something you want or need to do at every time step. You probably just want to get the nodal displacements and move on.
But if you do want reactions and you don’t want OpenSees to always report zero (because the reactions were not assembled), there are a couple ways to go.
First, you can issue the
reactions command to get the reactions “on demand”. This is useful if you only want the reactions at certain times in an analysis, e.g., after the final step of a pushover analysis.
See this post for more details on the
'-dynamic' option for the
After calling the
reactions command, you can use the
nodeReaction command to get individual reactions, e.g., the DOF 1 reaction of node 2:
R2X = ops.nodeReaction(2,1)
You can omit the DOF to get a list of all reactions at a node.
R2 = ops.nodeReaction(2)
An alternative to the
nodeReaction command is the
nodeResponse command, but you can only get reactions one DOF at a time. Note that
6 is the response code for nodal reaction.
R2X = ops.nodeResponse(2,1,6)
The second approach is a node recorder. Once the recorder is created, the reactions will be computed automatically at all subsequent analysis steps–you do not have to use the
reactions command. For example, to record the reaction history for DOFs 1 and 2 of node 2:
There are likely other ways to force OpenSees to compute reactions, but these are the two most common methods.