You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Separate Static and Kinetic Coefficients of Friction (#177)
- Add separate static and kinetic friction coefficients (mu_s, mu_k) to tangential collisions.
- Added `smooth_mu`, `smooth_mu_derivative`, `smooth_mu_f0`, `smooth_mu_f1`, `smooth_mu_f2`, `smooth_mu_f1_over_x`, and `smooth_mu_f2_x_minus_f1_over_x3` functions in `smooth_mu.cpp` and `smooth_mu.hpp` to handle the transition between static and kinetic friction smoothly.
- Implemented unit tests for the smooth friction functions in `test_smooth_mu.cpp`, including gradient and Hessian checks using finite difference methods.
- Introduced smooth friction mollifier functions: `smooth_mu_a0`, `smooth_mu_a1`, `smooth_mu_a2`, `smooth_mu_a1_over_x`, and `smooth_mu_a2_x_minus_mu_a1_over_x3` in `adhesion.cpp` and `adhesion.hpp`.
- Refactored existing friction mollifier functions for improved clarity and performance.
- Added unit tests for the new smooth friction mollifier functions to ensure correctness and stability.
- Enhance documentation for adhesion and friction modules with new `smooth_mu` functions.
- Update bindings to include new `smooth_mu` functionalities.
- The second derivative of the tangential adhesion mollifier function times y minus the first derivative all divided by y cubed.
30
+
* - :func:`smooth_mu_a0`
31
+
- Compute the value of the ∫ μ(y) a₁(y) dy, where a₁ is the first derivative of the smooth tangential adhesion mollifier.
32
+
* - :func:`smooth_mu_a1`
33
+
- Compute the value of the μ(y) a₁(y), where a₁ is the first derivative of the smooth tangential adhesion mollifier.
34
+
* - :func:`smooth_mu_a2`
35
+
- Compute the value of d/dy (μ(y) a₁(y)), where a₁ is the first derivative of the smooth tangential adhesion mollifier.
36
+
* - :func:`smooth_mu_a1_over_x`
37
+
- Compute the value of the μ(y) a₁(y) / y, where a₁ is the first derivative of the smooth tangential adhesion mollifier.
38
+
* - :func:`smooth_mu_a2_x_minus_mu_a1_over_x3`
39
+
- Compute the value of the [(d/dy μ(y) a₁(y)) ⋅ y - μ(y) a₁(y)] / y³, where a₁ and a₂ are the first and second derivatives of the smooth tangential adhesion mollifier.
Copy file name to clipboardExpand all lines: python/src/adhesion/adhesion.cpp
+98Lines changed: 98 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -142,4 +142,102 @@ void define_adhesion(py::module_& m)
142
142
The second derivative of the tangential adhesion mollifier function times y minus the first derivative all divided by y cubed.
143
143
)ipc_Qu8mg5v7",
144
144
"y"_a, "eps_a"_a);
145
+
146
+
m.def(
147
+
"smooth_mu_a0", &smooth_mu_a0,
148
+
R"ipc_Qu8mg5v7(
149
+
Compute the value of the ∫ μ(y) a₁(y) dy, where a₁ is the first derivative of the smooth tangential adhesion mollifier.
150
+
151
+
Note:
152
+
The `a0`/`a1` are unrelated to the `a0`/`a1` in the normal adhesion.
153
+
154
+
Parameters:
155
+
y: The tangential relative speed.
156
+
mu_s: Coefficient of static adhesion.
157
+
mu_k: Coefficient of kinetic adhesion.
158
+
eps_a: Velocity threshold below which static adhesion force is applied.
159
+
160
+
Returns:
161
+
The value of the integral at y.
162
+
)ipc_Qu8mg5v7",
163
+
"y"_a, "mu_s"_a, "mu_k"_a, "eps_a"_a);
164
+
165
+
m.def(
166
+
"smooth_mu_a1", &smooth_mu_a1,
167
+
R"ipc_Qu8mg5v7(
168
+
Compute the value of the μ(y) a₁(y), where a₁ is the first derivative of the smooth tangential adhesion mollifier.
169
+
170
+
Note:
171
+
The `a1` is unrelated to the `a1` in the normal adhesion.
172
+
173
+
Parameters:
174
+
y: The tangential relative speed.
175
+
mu_s: Coefficient of static adhesion.
176
+
mu_k: Coefficient of kinetic adhesion.
177
+
eps_a: Velocity threshold below which static adhesion force is applied.
178
+
179
+
Returns:
180
+
The value of the product at y.
181
+
)ipc_Qu8mg5v7",
182
+
"y"_a, "mu_s"_a, "mu_k"_a, "eps_a"_a);
183
+
184
+
m.def(
185
+
"smooth_mu_a2", &smooth_mu_a2,
186
+
R"ipc_Qu8mg5v7(
187
+
Compute the value of d/dy (μ(y) a₁(y)), where a₁ is the first derivative of the smooth tangential adhesion mollifier.
188
+
189
+
Note:
190
+
The `a1`/`a2` are unrelated to the `a1`/`a2` in the normal adhesion.
191
+
192
+
Parameters:
193
+
y: The tangential relative speed.
194
+
mu_s: Coefficient of static adhesion.
195
+
mu_k: Coefficient of kinetic adhesion.
196
+
eps_a: Velocity threshold below which static adhesion force is applied.
197
+
198
+
Returns:
199
+
The value of the derivative at y.
200
+
)ipc_Qu8mg5v7",
201
+
"y"_a, "mu_s"_a, "mu_k"_a, "eps_a"_a);
202
+
203
+
m.def(
204
+
"smooth_mu_a1_over_x", &smooth_mu_a1_over_x,
205
+
R"ipc_Qu8mg5v7(
206
+
Compute the value of the μ(y) a₁(y) / y, where a₁ is the first derivative of the smooth tangential adhesion mollifier.
207
+
208
+
Notes:
209
+
The `x` in the function name refers to the parameter `y`.
210
+
The `a1` is unrelated to the `a1` in the normal adhesion.
211
+
212
+
Parameters:
213
+
y: The tangential relative speed.
214
+
mu_s: Coefficient of static adhesion.
215
+
mu_k: Coefficient of kinetic adhesion.
216
+
eps_a: Velocity threshold below which static adhesion force is applied.
217
+
218
+
Returns:
219
+
The value of the product at y.
220
+
)ipc_Qu8mg5v7",
221
+
"y"_a, "mu_s"_a, "mu_k"_a, "eps_a"_a);
222
+
223
+
m.def(
224
+
"smooth_mu_a2_x_minus_mu_a1_over_x3",
225
+
&smooth_mu_a2_x_minus_mu_a1_over_x3,
226
+
R"ipc_Qu8mg5v7(
227
+
Compute the value of the [(d/dy μ(y) a₁(y)) ⋅ y - μ(y) a₁(y)] / y³, where a₁ and a₂ are the first and second derivatives of the smooth tangential adhesion mollifier.
228
+
229
+
Notes:
230
+
The `x` in the function name refers to the parameter `y`.
231
+
The `a1`/`a2` are unrelated to the `a1`/`a2` in the normal adhesion.
232
+
233
+
Parameters:
234
+
y: The tangential relative speed.
235
+
mu_s: Coefficient of static adhesion.
236
+
mu_k: Coefficient of kinetic adhesion.
237
+
eps_a: Velocity threshold below which static adhesion force is applied.
0 commit comments