tmdsimpy.nlforces.UnilateralSpring

class tmdsimpy.nlforces.UnilateralSpring(Q, T, k, Npreload=0, delta=0)

Bases: InstantaneousForce

Unilateral spring for contact and impact type nonlinear forces (with potential preload)

Parameters:
Q(Nnl, N) numpy.ndarray

Matrix tranform from the N degrees of freedom (DOFs) of the system to the Nnl local nonlinear DOFs.

T(N, Nnl) numpy.ndarray

Matrix tranform from the local Nnl forces to the N global DOFs.

kfloat or (Nnl,) numpy.ndarray

Stiffness coefficient

Npreloadfloat or (Nnl,) numpy.ndarray, optional

The minimum force is -1*Npreload for displacements less than delta. The default is 0.

deltafloat or (Nnl,) numpy.ndarray, optional

Offset of the elbow in the force from being at zero displacement. The default is 0.

Notes

Force displacement relationship to calculate the force given a displacement u:

>>> if u > delta: # in contact
...     force = k * (u - delta) - Npreload
... else: # out of contact
...     force = -Npreload
__init__(Q, T, k, Npreload=0, delta=0)

Methods

__init__(Q, T, k[, Npreload, delta])

aft(U, w, h[, Nt, tol, calc_grad])

Implementation of the alternating frequency-time method to extract harmonic nonlinear force coefficients (instantaneous forces).

force(X)

Calculate global nonlinear forces for some global displacement vector.

local_force_history(unlt, unltdot)

Evaluates the local nonlinear forces based on local nonlinear displacements for a time series.

nl_force_type()

Method to identify the force type as instantaneous.

aft(U, w, h, Nt=128, tol=1e-07, calc_grad=True)

Implementation of the alternating frequency-time method to extract harmonic nonlinear force coefficients (instantaneous forces).

Parameters:
U(N*Nhc,) numpy.ndarray

displacement harmonic DOFs

wfloat

Frequency in rad/s. Needed in case there is velocity dependency.

hnumpy.ndarray, sorted

List of harmonics. The list corresponds to Nhc harmonic components.

Ntint power of 2, optional

Number of time steps used in evaluation. The default is 128.

tolfloat, optional

This argument is ignored for instantaneous forces. It is included for compatability of interface. The default is 1e-7.

calc_gradboolean, optional

This argument is ignored for instantaneous forces. It is included for compatability of interface. The default is True.

Returns:
Fnl(N*Nhc,) numpy.ndarray

Nonlinear hamonic force coefficients

dFnldU(N*Nhc,N*Nhc) numpy.ndarray

Jacobian of Fnl with respect to U

dFnldw(N*Nhc,) numpy.ndarray

Jacobian of Fnl with respect to w

force(X)

Calculate global nonlinear forces for some global displacement vector.

Parameters:
X(N,) numpy.ndarray

Global displacements.

Returns:
F(N,) numpy.ndarray

Global nonlinear force.

dFdX(N,N) numpy.ndarray

Derivative of F with respect to X.

local_force_history(unlt, unltdot)

Evaluates the local nonlinear forces based on local nonlinear displacements for a time series.

Parameters:
unl(Nt,Nnl) numpy.ndarray

Local displacements, rows are different time instants and columns are different displacement DOFs.

unldot(Nt,Nnl) numpy.ndarray

Local velocities, rows are different time instants and columns are different displacement DOFs.

Returns:
ft(Nt,Nnl) numpy.ndarray

Local nonlinear forces, rows are different time instants and columns are different local force DOFs.

dfdu(Nt,Nnl) numpy.ndarray

Derivative of forces of ft with resepct to displacements unl. Each index i, j is the derivative ft[i, j] with respect to unl[i, j].

dfdud(Nt,Nnl) numpy.ndarray

Derivative of forces of ft with resepct to velocities unltdot. Each index i, j is the derivative ft[i, j] with respect to unltdot[i, j].

Notes

Since the nonlinear forces are dependent on only one of the local DOFs, the derivative matrix need not be three dimensional to contain all necessary information.

nl_force_type()

Method to identify the force type as instantaneous.

Returns:
int

0, indicating instanteous force type.