Element
Each instance represents one truss member
method |
input |
returns |
description |
---|---|---|---|
__init__(nd0, nd1, material) |
two Node() objects, one Material() object. |
constructor. |
|
getForce() |
list of (1d) np.array objects |
A list of nodal forces. Each nodal force shall be represented as a 1d np.array with two components of the force. |
|
getStiffness() |
2-by-2 list of 2-by-2 np.array |
A list of lists (matrix) containing nodal tangent matrices as np.array([[.,.],[.,.]]) |
Note: a Node() object may have changed its state between calls, so you need to recompute every time!
name |
type |
description |
---|---|---|
nodes |
List of Node() instances |
representing the two nodes at either end of a truss. |
material |
Material() |
pointer to an instance of Material(). Needed to compute stress and tangent modulus. |
force |
2-list of (1d) np.array objects. |
holding nodal forces P0 and P1 |
Kt |
2-by-2 array of 2-by-2 np.array objects. |
tangent stiffness matrix. Representing all nodal stiffness matrices. |
Equations
\({\bf L} = {\bf X}_1 - {\bf X}_0\)
\(\ell = ||{\bf L}||\)
\({\bf n} = \frac{1}{\ell} \, {\bf L}\)
Strain: \(\varepsilon = \frac{1}{\ell} \, {\bf n}\cdot( {\bf U}_1 - {\bf U}_0)\)
Force: \(f = \sigma(\varepsilon) A\) using material.setStrain(eps) and material.getStress().
Nodal force vector: \({\bf P}^e = f \, {\bf n}\)
\({\bf P}_0 = -{\bf P}^e ~~~~~~ {\bf P}_1 = {\bf P}^e\)
Nodal stiffness matrix: \({\bf k}^e = \frac{E_t(\varepsilon)\,A}{\ell}\, {\bf n}\otimes{\bf n}\) using material.getStiffness() to find \(E_t\).
\({\bf k}_{00} = {\bf k}_{11} = {\bf k}^e ~~~~~~~~ {\bf k}_{01} = {\bf k}_{10} = -{\bf k}^e\)