Commit 1530636d authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

fix funnel

parent 0743f499
......@@ -136,7 +136,11 @@ static void compute_node_force_implicit(FluidProblem *problem, double dt, double
Mesh *mesh = problem->mesh;
for (int i = 0; i < problem->n_particles; ++i) {
int iel = problem->particle_element_id[i];
double mass = problem->particle_mass[i];
if(iel < 0){
for (int d = 0; d < DIMENSION; ++d)
problem->particle_force[i*DIMENSION+d] = 0;
problem->particle_force[i*DIMENSION+1] = problem->g*mass;
continue;
}
double *xi = problem->particle_uvw + DIMENSION*i;
......@@ -167,11 +171,10 @@ static void compute_node_force_implicit(FluidProblem *problem, double dt, double
due[j] = problem->particle_velocity[i*DIMENSION+j]-vfe[j]/c;
}
double vol = problem->particle_volume[i];
double mass = problem->particle_mass[i];
double rhop = mass/vol;
double drho = rhop -problem->rho;
double gamma = particle_drag_coeff(due,problem->mu,problem->rho,vol,c);
double g = problem->g*drho/rhop;
double gamma = particle_drag_coeff(due,problem->mu,problem->rho,vol,c);
double fcoeff = mass/(mass+dt*gamma);
for (int d = 0; d < DIMENSION; ++d)
......
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