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
d94bed4d
Commit
d94bed4d
authored
Nov 05, 2018
by
Frédéric Dubois
Browse files
wip typo
parent
4eb0d56e
Changes
1
Hide whitespace changes
Inline
Side-by-side
testcases/injectionWGrains/inject2fGrains.py
View file @
d94bed4d
...
...
@@ -26,7 +26,6 @@
from
migflow
import
fluid
from
migflow
import
scontact
from
migflow
import
lmgc2Interface
from
pylmgc90
import
pre
import
numpy
as
np
import
os
...
...
@@ -34,9 +33,6 @@ import time
import
shutil
import
random
outputdir
=
"outputVid"
if
not
os
.
path
.
isdir
(
outputdir
)
:
os
.
makedirs
(
outputdir
)
def
genInitialPosition
(
filename
,
N
,
r
,
lx
,
ly
,
rhop
)
:
p
=
scontact
.
ParticleProblem
(
2
)
...
...
@@ -51,23 +47,29 @@ def genInitialPosition(filename, N, r, lx, ly, rhop) :
p
.
add_particle
(
coors
[
2
*
i
:
2
*
i
+
2
],
radii
[
i
],
radii
[
i
]
**
2
*
np
.
pi
*
rhop
);
p
.
write_vtk
(
filename
,
0
,
0
)
outputdir
=
"outputVid"
if
not
os
.
path
.
isdir
(
outputdir
)
:
os
.
makedirs
(
outputdir
)
# physical parameters
alpha
=
0
*
np
.
pi
/
4.
g
=
-
9.81
*
np
.
cos
(
alpha
)
# gravity
rho0
=
1.117
# fluid density
g
=
-
9.81
*
np
.
cos
(
alpha
)
# gravity
rho0
=
1.117
# fluid density
rho1
=
1000
nu1
=
1.57e-5
# kinematic viscosity
nu1
=
1.57e-5
# kinematic viscosity
nu0
=
1e-6
tEnd
=
10
# final time
tEnd
=
10
# final time
r
=
5e-4
N
=
10000
*
3
lx
=
.
222
ly
=
.
14
*
2
rhop
=
2500
# numerical parameters
dt
=
.
0001
# time step
dt
=
.
0001
# time step
genInitialPosition
(
outputdir
,
N
,
r
,
lx
,
ly
,
rhop
)
friction
=
0.3
p
=
scontact
.
ParticleProblem
(
2
)
p
.
read_vtk
(
outputdir
,
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