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
TurTLE
TurTLE
Commits
48bfdd45
Commit
48bfdd45
authored
Jan 16, 2020
by
Tobias Baetge
Committed by
Cristian Lalescu
Jan 30, 2020
Browse files
correct drag coefficient is used
parent
c54d2b4a
Changes
3
Hide whitespace changes
Inline
Side-by-side
TurTLE/test/test_turtle_NSVE_Stokes_particles.py
View file @
48bfdd45
...
...
@@ -63,8 +63,8 @@ def main():
sys
.
argv
[
1
:])
f
=
h5py
.
File
(
'quiescent_nsve_stokes_particles_particles.h5'
,
'r'
)
print
(
f
[
'tracers0/momentum/0'
][:])
print
(
f
[
'tracers0/momentum/0'
][:]
-
f
[
'tracers0/momentum/
10
0'
][:])
print
(
f
[
'tracers0/position/0'
][:]
-
f
[
'tracers0/position/
10
0'
][:])
print
(
f
[
'tracers0/momentum/
10
0'
][:]
-
f
[
'tracers0/momentum/0'
][:])
print
(
f
[
'tracers0/position/
10
0'
][:]
-
f
[
'tracers0/position/0'
][:])
return
None
if
__name__
==
'__main__'
:
...
...
cpp/full_code/NSVE_Stokes_particles.cpp
View file @
48bfdd45
...
...
@@ -46,7 +46,7 @@ int NSVE_Stokes_particles<rnumber>::initialize(void)
particles_inner_computer_2nd_order_Stokes
<
double
,
long
long
int
>
current_particles_inner_computer
;
current_particles_inner_computer
.
set_drag_coefficient
(
0.1
);
DEBUG_MSG
(
"drag coefficient is set to %f
\n
"
,
current_particles_inner_computer
.
get_drag_coefficient
());
//DEBUG_MSG_WAIT(MPI_COMM_WORLD, "before call to particles_system_builder\n");
this
->
ps
=
particles_system_builder_with_p2p
(
this
->
fs
->
cvelocity
,
// (field object)
...
...
@@ -61,7 +61,7 @@ int NSVE_Stokes_particles<rnumber>::initialize(void)
this
->
comm
,
this
->
fs
->
iteration
+
1
,
std
::
move
(
p2p_ghost_collisions
<
double
,
long
long
int
>
()),
std
::
move
(
particles_inner_computer
_2nd_order_Stokes
<
double
,
long
long
int
>
()
),
std
::
move
(
current_
particles_inner_computer
),
this
->
tracers0_cutoff
);
//DEBUG_MSG_WAIT(MPI_COMM_WORLD, "after call to particles_system_builder\n");
this
->
particles_output_writer_mpi
=
new
particles_output_hdf5
<
...
...
@@ -79,6 +79,7 @@ int NSVE_Stokes_particles<rnumber>::initialize(void)
"tracers0"
,
"position/0"
);
this
->
particles_sample_writer_mpi
->
setParticleFileLayout
(
this
->
ps
->
getParticleFileLayout
());
DEBUG_MSG
(
"drag coefficient is after initialization %f
\n
"
,
current_particles_inner_computer
.
get_drag_coefficient
());
return
EXIT_SUCCESS
;
}
...
...
cpp/particles/particles_system.hpp
View file @
48bfdd45
...
...
@@ -266,7 +266,7 @@ public:
void
move
(
const
real_number
dt
)
final
{
TIMEZONE
(
"particles_system::move"
);
positions_updater
.
move_particles
(
my_particles_positions
.
get
(),
my_nb_particles
,
my_particles_rhs
.
data
(),
std
::
min
(
step_idx
,
int
(
my_particles_rhs
.
size
())),
my_particles_rhs
.
data
(),
std
::
min
(
step_idx
,
int
(
my_particles_rhs
.
size
())),
dt
);
}
...
...
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