tmdsimpy.jax.nlforces.RoughContactFriction¶
- class tmdsimpy.jax.nlforces.RoughContactFriction(Q, T, ElasticMod, PoissonRatio, Radius, TangentMod, YieldStress, mu, u0=0, meso_gap=0, gaps=None, gap_weights=None, tangent_model='TAN', N_radial_quad=100)¶
Bases:
NonlinearForceRough contact friction element nonlinearity with microslip.
- Parameters:
- Q(3, N) numpy.ndarray
Transformation matrix from system DOFs (N) to nonlinear DOFs (3).
- T(N, 3) numpy.ndarray
Transformation matrix from local nonlinear forces to global nonlinear forces.
- ElasticModfloat
Elastic modulus (in Pa) for contacting asperities.
- PoissonRatiofloat
Poisson’s ratio for contacting asperities.
- Radiusfloat
Initial undeformed effective asperity radius in meters (half of real radius of one asperity in general [1]).
- TangentModfloat
Plasticity hardening modulus (in Pa) of asperities in contact.
- YieldStressfloat
Yield strength / yield stress (in Pa) for contacting asperities (before plastic hardening).
- mufloat
Friction coefficient for tangential force limit proportional to normal force.
- u0float, (2,) numpy.ndarray, or (3,) numpy.ndarray, optional
Sets the starting position for AFT friction evaluations. If float, then both tangential directions take that value. If a (2,) numpy.ndarray, then it sets the two tangential directions with these two values. If a (3,) numpy.ndarray, then it sets all three directions with the given values (but the normal direction should be irrelevant). The default is 0.
- meso_gapfloat, optional
Initial gap between contact due to other (e.g. mesoscale) topology. This gap is added to the gaps of all asperities in the integral. The default is 0.
- gaps(Nasp,) numpy.ndarray
Initial gaps between asperities that forces should be calculated between (excluding mesoscale topology).
- gap_weights(Nasp,) numpy.ndarray
Integration weights for forces between asperities with initial gaps defined by the variable gaps.
- tangent_model{‘TAN’, ‘MIF’}, optional
Tangential force displacement relationship to use for asperities in contact. ‘TAN’ corresponds to just the tangential stiffness then complete slip at the friction coefficient. ‘MIF’ corresponds to the Mindlin-Iwan Fit model, which approximates asperity microslip [1]. The default is ‘TAN’.
- N_radial_quadint, optional
Number of radial quadrature points to use for each contact asperity when using the tangent_model == ‘MIF’. The default is 100.
Notes
This class implements two rough contact models from [1] for use in [2]. The Mindlin Iwan Fit (MIF) model is implemented in frequency domain for the first time here and was used in frequency domain with plasticity normal contact for the first time in [2].
Implementation currently requires exactly three nonlinear DOFs corresponding to a single location. The Nonlinear DOFs must first be both tangential displacement then normal displacement.
Implementation uses automatic differentiation with JAX.
References
[1] (1,2,3)Porter, J. H., and M. R. W. Brake, 2023, “Towards a predictive, physics-based friction model for the dynamics of jointed structures””, Mechanical Systems and Signal Processing. 192:110210. https://doi.org/10.1016/j.ymssp.2023.110210
- __init__(Q, T, ElasticMod, PoissonRatio, Radius, TangentMod, YieldStress, mu, u0=0, meso_gap=0, gaps=None, gap_weights=None, tangent_model='TAN', N_radial_quad=100)¶
Methods
__init__(Q, T, ElasticMod, PoissonRatio, ...)aft(U, w, h[, Nt, tol, max_repeats, ...])Implementation of the alternating frequency-time (AFT) method to extract harmonic nonlinear force coefficients.
force(X[, update_hist, return_aux])Static force evaluation based on global displacements.
Method to initialize history variables to zero force and displacement.
local_force_history(unlt, unltdot, h, cst, ...)Evaluate the local forces for steady-state harmonic motion used in AFT.
Method to identify the force type as hysteretic.
Resets friction coefficient to initial value.
Set an initial slider position with zero force for AFT calculation.
Sets friction coefficient to zero while saving initial value in a different variable.
update_history(uxyn, Fm_curr, fxy_curr, ...)Updates hysteretic states to be the input displacement and force.
- aft(U, w, h, Nt=128, tol=1e-07, max_repeats=2, return_local=False, calc_grad=True)¶
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.
- max_repeatsint, optional
Number of hysteresis loops to calculate to reach steady state. Maximum value allowed. The default is 2.
- return_localbool, optional
If False, it uses self.Q and self.T to convert forces and gradients back to global domain. If True, it does not apply these transforms to the results. This should mainly be used for post-processing analysis of harmonic solutions. The default is False.
- calc_gradbool, optional
Flag where True indicates that the gradients should be calculated and returned. If False, then returns only (Fnl,) as a tuple. The default is True.
- Returns:
- Fnl(N*Nhc,) numpy.ndarray
Nonlinear hamonic force coefficients in frequency domain.
- 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 slider model is expected to converge to steady-state with two cycles of the hysteresis loop. max_repeats is followed if more cycles are desired.
A numpy kron operation is utilized to convert forces back to physical domain. This operation may result in many unnecessary calculations that could be eliminated to speed up AFT.
- force(X, update_hist=False, return_aux=False)¶
Static force evaluation based on global displacements.
- Parameters:
- X(N,) numpy.ndarray
Physical displacements for all DOFs of the system.
- update_histbool, optional
Flag to update displacement and force history. The default is False.
- return_auxbool, optional
Flag to return extra results about the simulation (aux) The default is False.
- Returns:
- F(N,) numpy.ndarray
Forces corresponding to physical DOFs.
- dFdX(N,N) numpy.ndarray
Derivatives of forces F with respect to displacements X.
- auxTuple of extra results includes (Fm_prev, deltabar, Rebar, a)
- Fm_prev(Nasp,) numpy.ndarray
Maximum normal force for each asperity at the current instant or any previous instant.
- fxy_curr(Nasp,2) numpy.ndarray or (Nasp,Nrad,2) numpy.ndarray
Sizes are for the ‘TAN’ and ‘MIF’ models respectively. Forces for ‘TAN’ or tractions for ‘MIF’ model at each integrated location.
- deltabar(Nasp,) numpy.ndarray
Permanent deformation displacement of each asperity.
- Rebar(Nasp,) numpy.ndarray
Flattened (new) radius of each asperity.
- a(Nasp,) numpy.ndarray
Radius of contact area of each asperity.
- quad_radii_curr(Nasp,Nrad) numpy.ndarray
Quadrature radial positions for each asperity (rows) and discrete radial locations (columns). Output is only relevant for the ‘MIF’ model and is irrelevant for the ‘TAN’ model.
Notes
When contact models are used in the presence of plasticity, static forces may behave poorly. Specifically, the contact radius is discontinuous upon normal load reversal and thus tangential stiffness is discontinuous. This can potentially cause a large jump in tangential force based on slight normal displacement variations and break solvers. This is not a problem for frequency domain approaches (e.g., aft) because the maximum displacement is known and all times can operate on the elastic unloading curve.
- init_history()¶
Method to initialize history variables to zero force and displacement.
- Returns:
- None.
See also
set_aft_initializeMethod for initializing history states for AFT analysis.
Notes
This sets force history for evaluations with force method for static calculations.
Tangential forces and displacements are set to zero for all sliders. Maximum previous normal displacement is set to zero (for normal plasticity).
- local_force_history(unlt, unltdot, h, cst, unlth0, max_repeats=2, atol=1e-10, rtol=1e-10)¶
Evaluate the local forces for steady-state harmonic motion used in AFT.
- Parameters:
- unlt(Nt, 3) numpy.ndarray
Local displacements, rows are different time instants and columns are different displacement DOFs.
- unltdot(Nt, 3) numpy.ndarray
Ignored here, included for compatibility of interface. Local velocities, rows are different time instants and columns are different displacement DOFs.
- h1D numpy.ndarray, sorted
Ignored here, included for compatibility of interface. List of harmonics used in subsequent analysis. Corresponds to Nhc harmonic components.
- cst(Nt,Nhc) numpy.ndarray
Ignored here, included for compatibility of interface. Evaluation of each harmonic component (columns) at a given instant in time (row = instant in time). These are without any harmonic coefficients, so are just cosine and sine evaluations.
- unlth0(3,) numpy.ndarray
Ignored here, included for compatibility of interface. Zeroth harmonic contributions to a time series of displacements. Use set_aft_initialize instead.
- max_repeatsint, optional
Number of cycles of force evaluations to calculate. The default is 2.
- atolfloat, optional
Ignored here, included for compatibility of interface.
- rtolfloat, optional
Ignored here, included for compatibility of interface.
- Returns:
- fxyn_tTuple of (Nt, 3) numpy.ndarray
Force history for the element. Returned as tuple. Local nonlinear forces. First index is time instants, second index is which local nonlinear force DOF. This is returned as the first entry in a tuple.
Notes
This method is for the post-processing of force displacement relationships of the model from harmonic solutions.
This method is not directly called by AFT. Rather this just provides a public interface to the same private JAX function that AFT uses. As such, only the forces and not the derivatives are returned.
- nl_force_type()¶
Method to identify the force type as hysteretic.
- Returns:
- int
1, indicating hysteretic force type.
- reset_real_mu()¶
Resets friction coefficient to initial value. Useful for after prestress analysis with zero friction coefficient.
- Returns:
- None
- set_aft_initialize(X)¶
Set an initial slider position with zero force for AFT calculation.
- Parameters:
- X(N,) numpy.ndarray
Global displacements to be used with self.Q to calculate local slider positions for initializing AFT. Generally, a solution to a static problem.
- Returns:
- None.
See also
init_historyMethod for initializing history states for static analysis.
- set_prestress_mu()¶
Sets friction coefficient to zero while saving initial value in a different variable. Useful for prestress analysis.
- Returns:
- None
- update_history(uxyn, Fm_curr, fxy_curr, quad_radii_curr)¶
Updates hysteretic states to be the input displacement and force.
- Parameters:
- uxyn(3,) numpy.ndarray
Local displacements in two tangent and then one normal direction for the given location.
- Fm_curr(Nasp,) numpy.ndarray
Maximum normal force for each asperity at the current instant or any previous instant.
- fxy_curr(Nasp,2) numpy.ndarray or (Nasp,Nrad,2) numpy.ndarray
Sizes are for the ‘TAN’ and ‘MIF’ models respectively. Forces at each integrated location for history for the next force evaluation.
- quad_radii_curr(Nasp,Nrad) numpy.ndarray
Quadrature radial positions for each asperity (rows) and discrete radial locations (columns). For ‘TAN’ model, it is saved here, but does not effect any results for any calculations.
- Returns:
- None.