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
8a72a9e8
Commit
8a72a9e8
authored
Dec 08, 2020
by
Michel Henry
Browse files
fix darcy
parent
aea6b0d5
Pipeline
#8793
passed with stages
in 5 minutes and 18 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
testcases/shear-2d/shear.py
View file @
8a72a9e8
...
...
@@ -116,7 +116,7 @@ while t < tEnd:
vTop
+=
(
fTop
[
0
]
+
Fext
(
xTop
))
*
dt
/
mTop
xTop
+=
vTop
*
dt
p
.
set_boundary_velocity
(
"Top"
,
vTop
)
#
p.set_boundary_velocity("Top", vTop)
#Ensure particle teleportation
p
.
position
()[:,
0
]
=
np
.
fmod
(
p
.
position
()[:,
0
]
+
L
/
2
,
L
)
-
L
/
2
...
...
validation/darcy/darcy.py
View file @
8a72a9e8
...
...
@@ -107,8 +107,9 @@ class Darcy(unittest.TestCase) :
ii
=
0
fluid
=
mbfluid
.
FluidProblem
(
2
,
g
,
mu
,
rho
,
drag_in_stab
=
True
,
petsc_solver_type
=
"-pc_type ilu"
)
fluid
.
load_msh
(
"mesh.msh"
)
V
=
0.00001
fluid
.
solution
()[:,
0
]
=
V
U
=
0.00001
# averaged fluid velocity
V
=
U
/
(
1
-
compacity
)
# fluid velocity
fluid
.
solution
()[:,
0
]
=
U
fluid
.
set_open_boundary
(
"Left"
,
velocity
=
[
V
,
0
])
fluid
.
set_open_boundary
(
"Right"
,
pressure
=
0
)
fluid
.
set_wall_boundary
(
"Bottom"
,
velocity
=
[
0
,
0
])
...
...
@@ -133,10 +134,10 @@ class Darcy(unittest.TestCase) :
ii
+=
1
print
(
"%i : %.2g/%.2g (cpu %.6g)"
%
(
ii
,
t
,
tEnd
,
time
.
time
()
-
tic
))
gamma
=
(
0.63
*
V
/
(
1
-
compacity
)
+
4.8
*
(
mu
/
((
1
-
compacity
)
*
rho
*
2
*
r
))
**
0.5
)
**
2
*
(
1
-
compacity
)
**-
1.8
*
rho
*
r
gamma
=
(
0.63
*
U
/
(
1
-
compacity
)
+
4.8
*
(
mu
/
((
1
-
compacity
)
*
rho
*
2
*
r
))
**
0.5
)
**
2
*
(
1
-
compacity
)
**-
1.8
*
rho
*
r
vol
=
(
np
.
pi
*
r
**
2
)
N
=
compacity
/
vol
Dp_drag
[
j
]
=
gamma
*
N
*
V
/
(
1
-
compacity
)
**
2
Dp_drag
[
j
]
=
gamma
*
N
*
U
/
(
1
-
compacity
)
**
2
pressure
=
fluid
.
solution
()[:,
2
]
pM
[
j
]
=
np
.
mean
(
fluid
.
solution
()[
fluid
.
coordinates
()[:,
0
]
<-
.
99
,
2
])
...
...
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