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
9c9e2a7d
Commit
9c9e2a7d
authored
Dec 20, 2018
by
Nathan Coppin
Browse files
test case with problem for contact management
parent
d4f0e665
Pipeline
#4809
passed with stage
in 24 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
testcases/inclined-2d/inclined.py
View file @
9c9e2a7d
...
...
@@ -59,12 +59,12 @@ ii = 0
#physical parameters
g
=
-
9.81
# gravity
rhop
=
2450
# grains density
tEnd
=
5
0
# final time
tEnd
=
0
.8
# final time
#numerical parameters
dt
=
1e-3
# time step
#geometry parameters
rout
=
1000
# outer radius
rout
=
0.2
# outer radius
r
=
5e-3
# grains radius
shutil
.
copy
(
"mesh.msh"
,
outputdir
+
"/mesh.msh"
)
...
...
@@ -74,13 +74,14 @@ p = scontact.ParticleProblem(2)
p
.
read_vtk
(
outputdir
,
0
)
outf
=
1
# number of iterations between output files
#Taking friction into account
p
.
add_friction
([
0.3090
,
1.0
],[
0.1545
,
0.5
])
p
.
add_friction
([
0.3090
,
1.0
])
p
.
set_friction_relaxation
(
0.95
)
#Computation loop
forces
=
np
.
zeros_like
(
p
.
velocity
())
k
=
0
while
t
<
tEnd
:
forces
[:,
1
]
=
g
*
p
.
mass
()[
0
]
*
cos
(
radians
(
2
5
))
forces
[:,
0
]
=
-
g
*
p
.
mass
()[
0
]
*
sin
(
radians
(
2
5
))
forces
[:,
1
]
=
g
*
p
.
mass
()[
0
]
*
cos
(
radians
(
3
5
))
forces
[:,
0
]
=
-
g
*
p
.
mass
()[
0
]
*
sin
(
radians
(
3
5
))
#Computation of the new velocities
vn
=
p
.
velocity
()
+
forces
*
dt
/
p
.
mass
()
vmax
=
np
.
max
(
np
.
hypot
(
vn
[:,
0
],
vn
[:,
1
]))
...
...
testcases/inclined-2d/mesh.geo
View file @
9c9e2a7d
rout =
1000
;
rout =
0.2
;
lcout = rout/20;
Point(1) = {0, 0, 0};
...
...
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