This repository was archived by the owner on Oct 22, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathadhesion.cpp
More file actions
145 lines (116 loc) · 5.13 KB
/
adhesion.cpp
File metadata and controls
145 lines (116 loc) · 5.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#include <common.hpp>
#include <ipc/adhesion/adhesion.hpp>
using namespace ipc;
void define_adhesion(py::module_& m)
{
m.def(
"normal_adhesion_potential", &normal_adhesion_potential,
R"ipc_Qu8mg5v7(
The normal adhesion potential.
Parameters:
d: distance
dhat_p: distance of largest adhesion force (:math:`\hat{d}_p`) where :math:`0 < \hat{d}_p < \hat{d}_a`
dhat_a: adhesion activation distance (:math:`\hat{d}_a`)
a2: adjustable parameter relating to the maximum derivative of a (:math:`a_2`)
Returns:
The normal adhesion potential.
)ipc_Qu8mg5v7",
"d"_a, "dhat_p"_a, "dhat_a"_a, "a2"_a);
m.def(
"normal_adhesion_potential_first_derivative",
&normal_adhesion_potential_first_derivative,
R"ipc_Qu8mg5v7(
The first derivative of the normal adhesion potential wrt d.
Parameters:
d: distance
dhat_p: distance of largest adhesion force (:math:`\hat{d}_p`) where :math:`0 < \hat{d}_p < \hat{d}_a`
dhat_a: adhesion activation distance (:math:`\hat{d}_a`)
a2: adjustable parameter relating to the maximum derivative of a (:math:`a_2`)
Returns:
The first derivative of the normal adhesion potential wrt d.
)ipc_Qu8mg5v7",
"d"_a, "dhat_p"_a, "dhat_a"_a, "a2"_a);
m.def(
"normal_adhesion_potential_second_derivative",
&normal_adhesion_potential_second_derivative,
R"ipc_Qu8mg5v7(
The second derivative of the normal adhesion potential wrt d.
Parameters:
d: distance
dhat_p: distance of largest adhesion force (:math:`\hat{d}_p`) where :math:`0 < \hat{d}_p < \hat{d}_a`
dhat_a: adhesion activation distance (:math:`\hat{d}_a`)
a2: adjustable parameter relating to the maximum derivative of a (:math:`a_2`)
Returns:
The second derivative of the normal adhesion potential wrt d.
)ipc_Qu8mg5v7",
"d"_a, "dhat_p"_a, "dhat_a"_a, "a2"_a);
m.def(
"max_normal_adhesion_force_magnitude",
&max_normal_adhesion_force_magnitude,
R"ipc_Qu8mg5v7(
The maximum normal adhesion force magnitude.
Parameters:
dhat_p: distance of largest adhesion force (:math:`\hat{d}_p`) where :math:`0 < \hat{d}_p < \hat{d}_a`
dhat_a: adhesion activation distance (:math:`\hat{d}_a`)
a2: adjustable parameter relating to the maximum derivative of a (:math:`a_2`)
Returns:
The maximum normal adhesion force magnitude.
)ipc_Qu8mg5v7",
"dhat_p"_a, "dhat_a"_a, "a2"_a);
m.def(
"tangential_adhesion_f0", &tangential_adhesion_f0,
R"ipc_Qu8mg5v7(
The tangential adhesion mollifier function.
Parameters:
y: The tangential relative speed.
eps_a: Velocity threshold below which static adhesion force is applied.
Returns:
The tangential adhesion mollifier function at y.
)ipc_Qu8mg5v7",
"y"_a, "eps_a"_a);
m.def(
"tangential_adhesion_f1", &tangential_adhesion_f1,
R"ipc_Qu8mg5v7(
The first derivative of the tangential adhesion mollifier function.
Parameters:
y: The tangential relative speed.
eps_a: Velocity threshold below which static adhesion force is applied.
Returns:
The first derivative of the tangential adhesion mollifier function at y.
)ipc_Qu8mg5v7",
"y"_a, "eps_a"_a);
m.def(
"tangential_adhesion_f2", &tangential_adhesion_f2,
R"ipc_Qu8mg5v7(
The second derivative of the tangential adhesion mollifier function.
Parameters:
y: The tangential relative speed.
eps_a: Velocity threshold below which static adhesion force is applied.
Returns:
The second derivative of the tangential adhesion mollifier function at y.
)ipc_Qu8mg5v7",
"y"_a, "eps_a"_a);
m.def(
"tangential_adhesion_f1_over_x", &tangential_adhesion_f1_over_x,
R"ipc_Qu8mg5v7(
The first derivative of the tangential adhesion mollifier function divided by y.
Parameters:
y: The tangential relative speed.
eps_a: Velocity threshold below which static adhesion force is applied.
Returns:
The first derivative of the tangential adhesion mollifier function divided by y.
)ipc_Qu8mg5v7",
"y"_a, "eps_a"_a);
m.def(
"tangential_adhesion_f2_x_minus_f1_over_x3",
&tangential_adhesion_f2_x_minus_f1_over_x3,
R"ipc_Qu8mg5v7(
The second derivative of the tangential adhesion mollifier function times y minus the first derivative all divided by y cubed.
Parameters:
y: The tangential relative speed.
eps_a: Velocity threshold below which static adhesion force is applied.
Returns:
The second derivative of the tangential adhesion mollifier function times y minus the first derivative all divided by y cubed.
)ipc_Qu8mg5v7",
"y"_a, "eps_a"_a);
}