tmdsimpy.jax.nlforces.ElasticDryFriction3D

class tmdsimpy.jax.nlforces.ElasticDryFriction3D(Q, T, kt, kn, mu, u0=0, meso_gap=0)

Bases: NonlinearForce

3D Elastic Dry Friction (Spring + Coulomb Friction) Model

Parameters:
Q(Nnl, N) numpy.ndarray

Matrix tranform from the N degrees of freedom (DOFs) of the system to the Nnl local nonlinear DOFs. Nnl should be even. Rows 0::3 correspond to local tangential DOFs in X direction. Rows 1::3 correspond to local tangential DOFs in X direction. Rows 2::3 correspond to local normal DOFs.

T(N, Nnl) numpy.ndarray

Matrix tranform from the local Nnl forces to the N global DOFs. Columns 0::3 correspond to local tangential forces in X direction. Columns 1::3 correspond to local tangential forces in Y direction. Columns 2::3 correspond to local normal forces.

ktfloat

Tangential stiffness in X and Y direction

knfloat

Tangential stiffness

mufloat

Friction coefficient

u0float, (Nnl,) numpy.ndarray, or None, optional

If a float, all sliders in AFT are initialized at that displacement and zero force. If a numpy.ndarray, entries 0::3 and 1::3 correspond to the initial slider displacements and zero force for AFT. If None, then the zeroth harmonic displacements are used to initialize the slider position in AFT. Highly recommended not to use u0=None because may result in non-unique solutions. Not fully verified for None option. The default is 0.

meso_gapfloat, optional

Initial gap between contact due to other. This gap is added to quadrature location of contact element The default is 0

See also

set_aft_initialize

Overrides the value of u0.

Notes

Positive normal displacements are in contact and yield positive normal forces. Negative normal displacements are out of contact and yield zero normal force.

Derivatives are calculated with automatic differentiation using JAX. JAX calculates dense derivative matrices, so the calculation may become very inefficient if more than 1 slider is included in the object (i.e., Nnl > 3).

kt, kn, and mu may work for inputs of (Nnl//3,) numpy.ndarrays. However, this is not tested.

__init__(Q, T, kt, kn, mu, u0=0, meso_gap=0)

Methods

__init__(Q, T, kt, kn, mu[, u0, meso_gap])

aft(U, w, h[, Nt, tol, calc_grad])

Implementation of the alternating frequency-time (AFT) method to extract harmonic nonlinear force coefficients.

force(X[, update_hist])

Calculate global nonlinear forces for some global displacement vector.

init_history()

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.

nl_force_type()

Method to identify the force type as hysteretic.

reset_real_mu()

Resets friction coefficient to initial value.

set_aft_initialize(X)

Set an initial slider position with zero force for AFT calculation.

set_prestress_mu()

Sets friction coefficient to zero while saving initial value in a different variable.

update_history(unl, fnl)

Updates hysteretic states to be the input displacement and force.

aft(U, w, h, Nt=128, tol=1e-07, 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.

calc_gradboolean

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

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 elastic dry friction 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. 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)

Calculate global nonlinear forces for some global displacement vector.

Parameters:
X(N,) numpy.ndarray

Global displacements

update_histbool

Flag to save displacement and force from the evaluation as history variables for subsequent calls to this function.

Returns:
F(N,) numpy.ndarray

Global nonlinear force

dFdX(N,N) numpy.ndarray

Derivative of F with respect to X.

Notes

If update_hist is True, then update_history is called on the local results of this calculation to save the history.

init_history()

Method to initialize history variables to zero force and displacement.

Returns:
None.

See also

set_aft_initialize

Method for initializing history states for AFT analysis.

Notes

This sets force history for evaluations with force method for static calculations.

History variables are just initialized for tangential displacements.

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:
unl(Nt,Nnl) numpy.ndarray

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

unldot(Nt,Nnl) 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(Nnl,) numpy.ndarray

Zeroth harmonic contributions to a time series of displacements. This is passed to init_history_harmonic to initialize model is self.u0 is None.

max_repeatsint, optional

Ignored here, included for compatibility of interface. The default is 2.

atolfloat, optional

Ignored here, included for compatibility of interface. Absolute tolerance on force time series convergence to steady-state (final state of cycle). The default is 1e-10.

rtolfloat, optional

Ignored here, included for compatibility of interface. Relative tolerance on force time series convergence to steady-state (final state of cycle). The default is 1e-10.

Returns:
ft(Nt,Nnl) numpy.ndarray

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 for the elastic dry friction model. 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_history

Method 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(unl, fnl)

Updates hysteretic states to be the input displacement and force.

Parameters:
unl(2*Nnl//3,) numpy.ndarray

Local tangential nonlinear displacements to save

fnl(2*Nnl//3,) numpy.ndarray

Local tangential nonlinear forces to save

Returns:
None.