Element

Each instance represents one truss member

Element class methods

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!

Element class variables

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

  1. \({\bf L} = {\bf X}_1 - {\bf X}_0\)

  2. \(\ell = ||{\bf L}||\)

  3. \({\bf n} = \frac{1}{\ell} \, {\bf L}\)

  4. Strain: \(\varepsilon = \frac{1}{\ell} \, {\bf n}\cdot( {\bf U}_1 - {\bf U}_0)\)

  5. Force: \(f = \sigma(\varepsilon) A\) using material.setStrain(eps) and material.getStress().

  6. Nodal force vector: \({\bf P}^e = f \, {\bf n}\)

  7. \({\bf P}_0 = -{\bf P}^e ~~~~~~ {\bf P}_1 = {\bf P}^e\)

  8. Nodal stiffness matrix: \({\bf k}^e = \frac{E_t(\varepsilon)\,A}{\ell}\, {\bf n}\otimes{\bf n}\) using material.getStiffness() to find \(E_t\).

  9. \({\bf k}_{00} = {\bf k}_{11} = {\bf k}^e ~~~~~~~~ {\bf k}_{01} = {\bf k}_{10} = -{\bf k}^e\)