getTangent (printA)#
The getTangent function, or printA in Tcl, is used to return system matrices like the stiffness or mass.
- Model.getTangent(m=0, c=0, k=1)#
Return the current tangent to the equilibrium residual.
- Parameters:
- m: float
factor with which to scale the inertial part of the tangent (default is
0.0).- c: float
factor with which to scale the damped part of the tangent (default is
0.0).- k: float
factor with which to scale the static part of the tangent (default is
1.0).
- Returns:
A numpy.array representing the tangent matrix.
- printA <-file $file> <-m $m> <-c $c> <-k $k>
|
string |
file name to write tangent to. |
|
float |
factor with which to scale the inertial part of the tangent (default is |
|
float |
factor with which to scale the damped part of the tangent (default is |
|
float |
factor with which to scale the static part of the tangent (default is |
If using a static integrator, the resulting matrix is the stiffness matrix. If a transient integrator, it will be some combination of mass and stiffness matrices.
Examples#
The following examples will return a matrix \(\mathbf{A}\) that is given by a linear combination of the mass \(\mathbf{M}\) and stiffness \(\mathbf{K}\):
In Tcl:
printA -m 0.5 -k 0.1
and in Python with OpenSeesRT:
A = model.getTangent(m=0.5, k=0.1)
Note
The full version of this command as documented above is supported from Python and Tcl
through OpenSeesRT.
In OpenSeesPy and older Tcl versions this command only works with the FullGeneral linear system,
and the GimmeMCK integrator must be used to specify m c and k factors.