Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fluidparticles
MigFlow
Commits
c1f51bdb
Commit
c1f51bdb
authored
May 03, 2021
by
Nathan Coppin
Browse files
close
parent
9c743918
Pipeline
#9327
failed with stages
in 2 minutes and 24 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
scontact/scontact.c
View file @
c1f51bdb
...
...
@@ -1034,7 +1034,7 @@ static int contact_solve(ParticleProblem *p, Contact *c, double dt, double tol)
double
*
v0
,
*
v1
;
contact_get_velocity_pointers
(
c
,
p
,
&
v0
,
&
v1
);
contact_get_local_velocity
(
c
,
p
,
v0
,
v1
,
v
);
// v[0] < 0 if particles get closer
v
[
0
]
=
fmax
(
c
->
p
[
0
]
*
w
det
/
wtt
-
c
->
D
/
dt
,
0
.);
// for the normal component, the free velocity that has to be canceled
v
[
0
]
=
-
fmax
(
c
->
p
[
0
]
*
w
nn
-
c
->
D
/
dt
,
0
.);
// for the normal component, the free velocity that has to be canceled
double
pstick
[
2
]
=
{
-
(
+
wtt
*
v
[
0
]
-
wnt
*
v
[
1
])
/
wdet
,
...
...
@@ -1052,10 +1052,10 @@ static int contact_solve(ParticleProblem *p, Contact *c, double dt, double tol)
}
}
else
{
/*
if (v[0]>0) {
if
(
v
[
0
]
>
0
)
{
c
->
p
[
0
]
=
0
;
c
->
p
[
1
]
=
0
;
}
*/
}
if
(
pstick
[
1
]
+
c
->
mu
*
pstick
[
0
]
<
0
)
{
c
->
p
[
0
]
=
-
v
[
0
]
/
(
wnn
-
c
->
mu
*
wnt
);
c
->
p
[
1
]
=
-
c
->
mu
*
c
->
p
[
0
];
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment