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
21c7b306
Commit
21c7b306
authored
Jun 29, 2020
by
Nathan Coppin
Browse files
adapting for merge
parent
2b51e93d
Pipeline
#7815
passed with stages
in 3 minutes and 38 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
python/scontact.py
View file @
21c7b306
...
...
@@ -209,7 +209,7 @@ class ParticleProblem :
return
(
self
.
_get_matrix
(
"ContactForces"
,
self
.
_dim
))
def
get_boundary_forces
(
self
,
tag
=
"default"
)
:
"""Returns the net force acting on a boundary because of the contacts.
"""Returns the net
normal and tangential
force
s
acting on a boundary because of the contacts.
Keyword arguments:
tag -- Name of the boundary
"""
...
...
@@ -419,7 +419,7 @@ class ParticleProblem :
cheat
=
np
.
append
(
cheat
,((
1
-
cheat
[:,
0
]
**
2
)
**
0.5
).
reshape
((
cheat
.
shape
[
0
],
1
)),
axis
=
1
)
cheat
[
np
.
isnan
(
cheat
[:,
1
]),
1
]
=
0
basis
.
append
(
cheat
)
basis
.
append
(
np
.
vstack
([
fdata
[
k
+
"_dir_n"
]
for
k
in
ks
])
[:,[
1
,
0
]]
*
np
.
array
([
-
1
,
1
]))
basis
.
append
(
cheat
[:,[
1
,
0
]]
*
np
.
array
([
-
1
,
1
]))
else
:
cheat
=
np
.
append
(
cheat
,((
1
-
cheat
[:,
0
]
**
2
-
cheat
[:,
1
]
**
2
)
**
0.5
).
reshape
((
cheat
.
shape
[
0
],
1
)),
axis
=
1
)
cheat
[
np
.
isnan
(
cheat
[:,
2
]),
2
]
=
0
...
...
testcases/drag-3d/depot/depot.py
View file @
21c7b306
...
...
@@ -28,13 +28,11 @@
from
migflow
import
fluid
from
migflow
import
scontact
from
migflow
import
time_integration
import
numpy
as
np
import
os
import
time
import
shutil
import
random
import
sys
def
genInitialPosition
(
filename
,
r
,
H
,
ly
,
lx
,
lz
,
rin
,
rhop
)
:
"""Set all the particles centre positions and create the particles objects to add in the computing structure
...
...
testcases/drag-3d/drag.py
View file @
21c7b306
...
...
@@ -31,7 +31,6 @@ import os
import
time
import
shutil
import
random
import
sys
# Physical parameters
vit
=
-
0.05
#stream velocity
muwall
=
0.3
#friction coefficient between the walls and the particles
...
...
testcases/hopper-3d/hopper.py
View file @
21c7b306
...
...
@@ -28,7 +28,6 @@ from migflow import lmgc90Interface
from
pylmgc90
import
pre
import
numpy
as
np
import
os
import
sys
def
genInitialPosition
(
filename
,
r
,
rhop
)
:
"""Set all the particles centre positions and create the particles objects to add in the computing structure.
...
...
Write
Preview
Markdown
is supported
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