tmdsimpy.nlforces.NonlinearForce¶
- class tmdsimpy.nlforces.NonlinearForce(Q, T)¶
Bases:
objectTemplate class for nonlinear forces.
This class does not actually implement any nonlinear force.
- 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.
- __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
force(X)Template force function for evaluating the nonlinear force for a set of global displacements.
Method to return a flag for the force type.
- 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
- 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
Tolerance on convergence of force at start and end of AFT. Most cases ignore this tolerance, but it is included to ensure a compatible interface. The default is 1e-7.
- calc_gradboolean, optional
Flag for if to calculate the gradients and return them. Fnl should always be returned as the first entry of a tuple regardless of if other returned values are calculated. Flag is ignored in many cases, but in others can significantly decrease computation time. 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
- nl_force_type()¶
Method to return a flag for the force type.
- Returns:
- int
Value indicates the force type. 0 == Instantaneous Force Type. 1 == Hysteretic Force Type.