Commit de9b44d2 authored by Nathan Coppin's avatar Nathan Coppin
Browse files

particles can get out

parent e3125e1f
......@@ -1819,7 +1819,7 @@ void fluid_problem_move_particles(FluidProblem *problem, int n, double *position
compute_porosity(problem->mesh, problem->node_volume, particle_enter_porosity, problem->n_particles, position,
problem->particle_volume, problem->particle_element_id, problem->particle_uvw, particle_enter);
compute_porosity(problem->mesh, problem->node_volume, particle_leave_porosity, problem->n_particles, problem->particle_position,
problem->particle_volume, problem->particle_element_id, problem->particle_uvw, particle_leave);
problem->particle_volume, old_element_id, problem->particle_uvw, particle_leave);
compute_porosity(problem->mesh, problem->node_volume, problem->porosity, problem->n_particles, position, problem->particle_volume, problem->particle_element_id, problem->particle_uvw, NULL);
for (int i = 0; i < problem->mesh->n_nodes; i++) {
problem->oldporosity[i] += particle_enter_porosity[i]-particle_leave_porosity[i];
......@@ -1827,7 +1827,7 @@ void fluid_problem_move_particles(FluidProblem *problem, int n, double *position
int nf = fluid_problem_n_fields(problem);
for (int i = 0; i < problem->mesh->n_nodes; i++) {
for (int d = 0; d < DIMENSION; ++d) {
problem->solution[i*nf+U+d] *= problem->porosity[i]/(problem->porosity[i]-particle_enter_porosity[i]+particle_leave_porosity[i]);
problem->solution[i*nf+U+d] *= problem->porosity[i]/(problem->porosity[i] - particle_enter_porosity[i] + particle_leave_porosity[i]);
}
}
free(particle_enter_porosity);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment