tmdsimpy.nlforces.GenPolyForce¶
- class tmdsimpy.nlforces.GenPolyForce(Q, T, Emat, qq)¶
Bases:
InstantaneousForceNonlinear force based on general polynomial combinations of nonlinear DOFs.
- 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.
- Emat(Nnl,cnl) numpy.ndarray
Stiffness coefficients that multiply polynomial combinations of Nnl DOFs as defined by qq. cnl is the number of polynomial combinations considered.
- qq(cnl,Nnl) numpy.ndarray
Matrix defining the exponents of the nonlinear DOFs for evaluating the force. Each of the cnl rows defines a different polynomial term. Within a row, the column i is the exponent for nonlinear DOF i of the Nnl nonlinear DOFs.
Notes
This class can commonly be used with cubic and quadratic polynomial nonlinearities to simulate geometric nonlinearity. Applications can be more general than geometric nonlinearity.
This class calculates an instantaneous force, but does not exactly match the template of tmdsimpy.nlforces.InstantaneousForce because here each of the force outputs can depend in a nonlinear fashion on other nonlinear DOFs.
- __init__(Q, T, Emat, qq)¶
Methods
__init__(Q, T, Emat, qq)aft(U, w, h[, Nt, tol, calc_grad])Implementation of the alternating frequency-time method to extract harmonic nonlinear force coefficients.
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.
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.
- 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,Nnl) numpy.ndarray
Derivative of forces of ft with resepct to displacements unl. Each index i, j, k is the derivative ft[i, j] with respect to unl[i, k].
- dfdud(Nt,Nnl,Nnl) numpy.ndarray
Derivative of forces of ft with resepct to velocities unltdot. Each index i, j, k is the derivative ft[i, j] with respect to unltdot[i, k].
- nl_force_type()¶
Method to identify the force type as instantaneous.
- Returns:
- int
0, indicating instanteous force type.