Commit fef71350 authored by Matthieu Constant's avatar Matthieu Constant
Browse files

correction force 2d

parent 9f7b525f
......@@ -133,7 +133,7 @@ static void particle_drag(double u[2], double mu, double rho, double d, double c
Cd_u = Cd_u*Cd_u;
double f = pow(c,-1.8);
double r = d/2.;
double GoU = f*Cd_u*rho/2*(M_PI*r*r);
double GoU = f*Cd_u*rho/2*(2*r);
double a = 0;
double h = (1+(1-c)*rhop/(c*rho)+a)/(a+1);
......@@ -697,7 +697,11 @@ void fluid_problem_adapt_gen_mesh(FluidProblem *problem, double gradmin, double
/* ngrad2 += gradP*gradP;*/
/* }*/
double ngrad = sqrt(ngrad2);
#if DIMENSION == 2
double lc = lcmin /fmin(1,fmax(ngrad/(gradmax),gradmin/(gradmax)));
#else
double lc = lcmin /fmin(1,fmax(ngrad*ngrad/(gradmax*gradmax),gradmin*gradmin/(gradmax*gradmax)));
#endif
for (int j = 0; j < N_N; ++j){
new_mesh_size[el[j]] += lc;
num_lc[el[j]] += 1.;
......
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