Spring element functions¶
The spring element, shown below, can be used for the analysis of one-dimensional spring systems and for a variety of analogous physical problems.
Quantities corresponding to the variables of the spring are listed in Table 1.
Problem type |
Spring stiffness |
Nodal displacement |
Element force |
Spring force |
|---|---|---|---|---|
Spring |
\(k\) |
\(u\) |
\(P\) |
\(N\) |
Bar |
\(\frac{EA}{L}\) |
\(u\) |
\(P\) |
\(N\) |
Thermal conduction |
\(\frac{\lambda A}{L}\) |
\(T\) |
\(\bar{H}\) |
\(H\) |
Diffusion |
\(\frac{D A}{L}\) |
\(c\) |
\(\bar{H}\) |
\(H\) |
Electrical circuit |
\(\frac{1}{R}\) |
\(U\) |
\(\bar{I}\) |
\(I\) |
Groundwater flow |
\(\frac{kA}{L}\) |
\(\phi\) |
\(\bar{H}\) |
\(H\) |
Pipe network |
\(\frac{\pi D^4}{128{\mu}L}\) |
\(p\) |
\(\bar{H}\) |
\(H\) |
Problem type |
Quantities |
Designations |
Description |
|---|---|---|---|
Spring |
|
\(k\), \(u\), \(P\), \(N\) |
spring stiffness, displacement, element force, spring force |
Bar |
|
\(L\), \(E\), \(A\), \(u\), \(P\), \(N\) |
length, modulus of elasticity, area of cross section, displacement, element force, normal force |
Thermal conduction |
|
\(L\), \(\lambda\), \(T\), \(\bar{H}\), \(H\) |
length, thermal conductivity, temperature, element heat flow, internal heat flow |
Diffusion |
|
\(L\), \(D\), \(c\), \(\bar{H}\), \(H\) |
length, diffusivity, nodal concentration, nodal mass flow, element mass flow |
Electrical circuit |
|
\(R\), \(U\), \(\bar{I}\), \(I\) |
resistance, potential, element current, internal current |
Groundwater flow |
|
\(L\), \(k\), \(\phi\), \(\bar{H}\), \(H\) |
length, permeability, piezometric head, element water flow, internal water flow |
Pipe network (laminar flow) |
|
\(L\), \(D\), \(\mu\), \(p\), \(\bar{H}\), \(H\) |
length, pipe diameter, viscosity, pressure, element fluid flow, internal fluid flow |
The following functions are available for the spring element:
spring1e |
Compute element matrix |
spring1s |
Compute spring force |
spring1e¶
- Purpose:
Compute element stiffness matrix for a spring element.
- Syntax:
Ke = spring1e(ep)- Description:
spring1eprovides the element stiffness matrix \(\bar{\mathbf{K}}^e\) for a spring element.The input variable
ep\(= [k]\)supplies the spring stiffness \(k\) or the analog quantity defined in Table Analogous quantities.
- Theory:
The element stiffness matrix \(\mathbf{K}^e\), stored in
Ke, is computed according to\[\begin{split}\mathbf{K}^e = \begin{bmatrix} k & -k \\ -k & k \end{bmatrix}\end{split}\]where \(k\) is defined by
ep.
spring1s¶
- Purpose:
Compute spring force in a spring element.
- Syntax:
es = spring1s(ep, ed)- Description:
spring1scomputes the spring force in the spring elementspring1e.The input variable
epis defined inspring1eand the element nodal displacementsedare obtained by the functionextract_ed.The output variable
es\(= [N]\)contains the spring force, or the analog quantity.
- Theory:
The spring force \(N\), or analog quantity, is computed according to
\[N = k \left(u_2 - u_1\right)\]