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
f5ae26b2
Commit
f5ae26b2
authored
Jul 25, 2018
by
Matthieu Constant
Browse files
fix inject aapt order
parent
75ca181c
Pipeline
#3894
passed with stage
in 57 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
testcases/injectionWGrains/inject2fGrains.py
View file @
f5ae26b2
...
...
@@ -103,15 +103,14 @@ fluid.export_vtk(outputdir,0,0)
ii
=
0
tic
=
time
.
clock
()
fluid
.
set_particles
(
p
.
mass
(),
p
.
volume
(),
p
.
position
(),
p
.
velocity
())
while
t
<
tEnd
:
#Adaptation of the mesh. Args are minimal mesh radius, maximal mesh radius and number of elements
if
(
ii
%
25
==
0
and
ii
!=
0
):
fluid
.
adapt_mesh
(
8e-2
,
3e-3
,
10000
)
fluid
.
set_particles
(
p
.
mass
(),
p
.
volume
(),
p
.
position
(),
p
.
velocity
())
else
:
fluid
.
set_particles
(
p
.
mass
(),
p
.
volume
(),
p
.
position
(),
p
.
velocity
())
#Fluid solver
fluid
.
implicit_euler
(
dt
)
if
(
ii
%
25
==
0
and
ii
!=
0
):
fluid
.
adapt_mesh
(
8e-2
,
3e-3
,
10000
)
forces
=
fluid
.
compute_node_force
(
dt
)
#Computation of the new velocities
vn
=
p
.
velocity
()
+
forces
*
dt
/
p
.
mass
()
...
...
@@ -123,6 +122,7 @@ while t < tEnd :
for
i
in
range
(
nsub
)
:
p
.
iterate
(
dt
/
nsub
,
forces
)
t
+=
dt
fluid
.
set_particles
(
p
.
mass
(),
p
.
volume
(),
p
.
position
(),
p
.
velocity
())
#Output files writting
if
ii
%
outf
==
0
:
ioutput
=
int
(
ii
/
outf
)
+
1
...
...
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