Skip to content
Snippets Groups Projects
Commit 48bfdd45 authored by Tobias Baetge's avatar Tobias Baetge Committed by Cristian Lalescu
Browse files

correct drag coefficient is used

parent c54d2b4a
No related branches found
No related tags found
1 merge request!26Feature/stokes drag
...@@ -63,8 +63,8 @@ def main(): ...@@ -63,8 +63,8 @@ def main():
sys.argv[1:]) sys.argv[1:])
f = h5py.File('quiescent_nsve_stokes_particles_particles.h5', 'r') f = h5py.File('quiescent_nsve_stokes_particles_particles.h5', 'r')
print(f['tracers0/momentum/0'][:]) print(f['tracers0/momentum/0'][:])
print(f['tracers0/momentum/0'][:]-f['tracers0/momentum/100'][:]) print(f['tracers0/momentum/100'][:]-f['tracers0/momentum/0'][:])
print(f['tracers0/position/0'][:]-f['tracers0/position/100'][:]) print(f['tracers0/position/100'][:]-f['tracers0/position/0'][:])
return None return None
if __name__ == '__main__': if __name__ == '__main__':
......
...@@ -46,7 +46,7 @@ int NSVE_Stokes_particles<rnumber>::initialize(void) ...@@ -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; particles_inner_computer_2nd_order_Stokes<double, long long int> current_particles_inner_computer;
current_particles_inner_computer.set_drag_coefficient(0.1); 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"); //DEBUG_MSG_WAIT(MPI_COMM_WORLD, "before call to particles_system_builder\n");
this->ps = particles_system_builder_with_p2p( this->ps = particles_system_builder_with_p2p(
this->fs->cvelocity, // (field object) this->fs->cvelocity, // (field object)
...@@ -61,7 +61,7 @@ int NSVE_Stokes_particles<rnumber>::initialize(void) ...@@ -61,7 +61,7 @@ int NSVE_Stokes_particles<rnumber>::initialize(void)
this->comm, this->comm,
this->fs->iteration+1, this->fs->iteration+1,
std::move(p2p_ghost_collisions<double, long long int>()), 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); this->tracers0_cutoff);
//DEBUG_MSG_WAIT(MPI_COMM_WORLD, "after call to particles_system_builder\n"); //DEBUG_MSG_WAIT(MPI_COMM_WORLD, "after call to particles_system_builder\n");
this->particles_output_writer_mpi = new particles_output_hdf5< this->particles_output_writer_mpi = new particles_output_hdf5<
...@@ -79,6 +79,7 @@ int NSVE_Stokes_particles<rnumber>::initialize(void) ...@@ -79,6 +79,7 @@ int NSVE_Stokes_particles<rnumber>::initialize(void)
"tracers0", "tracers0",
"position/0"); "position/0");
this->particles_sample_writer_mpi->setParticleFileLayout(this->ps->getParticleFileLayout()); 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; return EXIT_SUCCESS;
} }
......
...@@ -266,7 +266,7 @@ public: ...@@ -266,7 +266,7 @@ public:
void move(const real_number dt) final { void move(const real_number dt) final {
TIMEZONE("particles_system::move"); TIMEZONE("particles_system::move");
positions_updater.move_particles(my_particles_positions.get(), my_nb_particles, 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); dt);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment