tmdsimpy.jax.nlforces.JenkinsForce¶
- class tmdsimpy.jax.nlforces.JenkinsForce(Q, T, kt, Fs, u0=0)¶
Bases:
NonlinearForceSingle Jenkins slider element nonlinearity with JAX for automatic differentiation.
- Parameters:
- Q(1, N) numpy.ndarray
Matrix tranform from the N degrees of freedom (DOFs) of the system to the Nnl local nonlinear DOFs.
- T(N, 1) numpy.ndarray
Matrix tranform from the local Nnl forces to the N global DOFs.
- ktfloat
Tangential stiffness.
- Fsfloat
Slip force.
- u0float or None, optional
Initialization value for the slider for AFT. If u0 = None, then the zeroth harmonic is used to initialize the slider position. Highly recommended not to use u0 = None because it may result in non-unique solutions. The default is 0.
See also
tmdsimpy.nlforces.VectorJenkinsnon-JAX implementation of a Jenkins element that has full functionality and can be faster.
Notes
The Jenkins element consists of a linear spring of stiffness kt that stretches until a slip force Fs is reached. Once the slip force is reached, an anchor point for the other side of the spring moves to maintain the slip force until reversal.
The force method is not implemented here since this is just an example of automatic differentiation for AFT.
It may be possible to do some calculations with multiple nonlinear elements, but such cases are not tested or fully supported. It would probably be relatively straightforward to extend this to multiple elements, but this serves more as a demonstration of JAX, JIT, and autodiff for a frictional element than an implementation to be used.
- __init__(Q, T, kt, Fs, u0=0)¶
Methods
__init__(Q, T, kt, Fs[, u0])aft(U, w, h[, Nt, tol])Implementation of the alternating frequency-time (AFT) 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 identify the force type as hysteretic.
Resets slip force to initial value.
Sets slip force to zero while saving initial value in a different variable.
- aft(U, w, h, Nt=128, tol=1e-07)¶
Implementation of the alternating frequency-time (AFT) method to extract harmonic nonlinear force coefficients.
- Parameters:
- U(N*Nhc,) numpy.ndarray
Displacement harmonic DOFs (global)
- 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, and is included for compatability of interface. The default is 1e-7.
- 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
Notes
The tolerance tol is ignored because the Jenkins element converges to steady-state with two cycles of the hysteresis loop. Two cycles of the nonlinear forces are calculated automatically without the option to change this setting.
- 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 identify the force type as hysteretic.
- Returns:
- int
1, indicating hysteretic force type.
- reset_real_mu()¶
Resets slip force to initial value.
Useful for after prestress analysis with zero friction coefficient.
- Returns:
- None
- set_prestress_mu()¶
Sets slip force to zero while saving initial value in a different variable.
Useful for prestress analysis.
- Returns:
- None