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
f4d7e8c4
Commit
f4d7e8c4
authored
Dec 19, 2018
by
Matthieu Constant
Browse files
testcase drop
parent
ebe2ec0e
Pipeline
#4801
passed with stage
in 21 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
testcases/goutte/liqDrop.py
View file @
f4d7e8c4
...
...
@@ -37,7 +37,7 @@ ii = 0
#physical parameters
g
=
0
#
-9.81
g
=
0
#-9.81
rhof
=
1030
# fluid density
rhop
=
2450
# grains density
r
=
154e-6
# grains radii
...
...
@@ -63,7 +63,7 @@ def outerBndV(x) :
print
(.
4
*
max
(
np
.
sin
(
t
*
np
.
pi
*
2.
/
1
),
0
))
return
0.4
*
max
(
np
.
sin
(
t
*
np
.
pi
*
2.
/
1
),
0
)
fluid
=
fluid
.
FluidProblem
(
2
,
g
,[
nu
m
*
rho
m
,
nu
f
*
rho
f
],[
rho
m
,
rho
f
],
coeff_stab
=
1e-6
)
fluid
=
fluid
.
FluidProblem
(
2
,
g
,[
nu
f
*
rho
f
,
nu
m
*
rho
m
],[
rho
f
,
rho
m
],
coeff_stab
=
1e-6
)
fluid
.
load_msh
(
"mesh.msh"
)
fluid
.
set_wall_boundary
(
"Bottom"
)
fluid
.
set_wall_boundary
(
"Lateral"
)
...
...
@@ -76,15 +76,13 @@ c = np.ndarray((fluid.n_nodes()))
x
=
fluid
.
coordinates
()
c
[:]
=
0
c
[
np
.
logical_and
(
np
.
abs
(
x
[:,
0
])
<
R
,
np
.
abs
(
x
[:,
1
])
<
R
)]
=
1
#
for i in range(len(x[:,0])):
#
z = (x[i,0])**2+(x[i,1])**2
#
R1 = (0.7*R)**2
#
R2 = (1.3*R)**2
#
c[np.logical_and(np.abs(x[:,0])< R,np.abs(x[:,1])<R)] = 1
for
i
in
range
(
len
(
x
[:,
0
])):
z
=
(
x
[
i
,
0
])
**
2
+
(
x
[
i
,
1
])
**
2
R1
=
(
0.7
*
R
)
**
2
R2
=
(
1.3
*
R
)
**
2
# #s[i,1] = -0.01
# c[i] = min(max(0,1/(R1-R2)*z-R2/(R1-R2)),1)
# c[: ]
# c[i] = np.where(np.abs(x[i,0] < R)
c
[
i
]
=
min
(
max
(
0
,
1
/
(
R2
-
R1
)
*
z
-
R1
/
(
R2
-
R1
)),
1
)
fluid
.
set_concentration_cg
(
c
)
...
...
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