tmdsimpy.nlforces.InstantaneousForce

class tmdsimpy.nlforces.InstantaneousForce(Q, T)

Bases: NonlinearForce

Template class for instantaneous nonlinear forces.

This type of forces can be evaluated at the current state without knowledge of history. This class does not actually implement any nonlinear forces.

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.

See also

tmdsimpy.nlforces.GenPolyForce

An alternative instantaneous force type class where nonlinear forces can depend on all nonlinear DOFs.

Notes

Each of the local Nnl nonlinear forces is a function of just a single local displacement with the same index. This does not imply that the nonlinear forces must be a function of a single global DOF. Rather the local displacements can be a linear combination of any of the global DOFs through the mappings Q and T.

__init__(Q, T)

Methods

__init__(Q, T)

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)

Template force function for evaluating the nonlinear force for a set of global displacements.

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)

Template force function for evaluating the nonlinear force for a set of global displacements.

Parameters:
X(N,) numpy.ndarray

Global displacements

Returns:
F(N,) numpy.ndarray

Global forces

dFdX(N,N) numpy.ndarray

Derivative of global forces with respect to global displacements X

local_force_history(unlt, unltdot)

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

Parameters:
unlt(Nt,Nnl) numpy.ndarray

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

unltdot(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

This function is used for AFT evaluations of nonlinear forces and should support vectorization for necessary forces.

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.