Commit 7d1db235 authored by Nathan Coppin's avatar Nathan Coppin
Browse files

debug fric

parent 47f2a45a
Pipeline #9319 failed with stages
in 2 minutes and 23 seconds
......@@ -618,10 +618,10 @@ static void contact_get_local_free_velocity_tangent(Contact *c, ParticleProblem
double res1[2];
res0[0] = c->type==0 ? -p->omega[p->particles[c->o0].body]*c->r0[1] : 0;
res0[1] = c->type==0 ? p->omega[p->particles[c->o0].body]*c->r0[0] : 0;
res1[0] = -p->omega[p->particles[c->o1].body]*c->r1[1];
res1[1] = p->omega[p->particles[c->o1].body]*c->r1[0];
res1[0] = p->omega[p->particles[c->o1].body]*c->r1[1];
res1[1] = -p->omega[p->particles[c->o1].body]*c->r1[0];
for(int d = 0;d<DIMENSION;d++){
v[1] -= (res0[d]+res1[d]) * c->basis[1][d];
v[1] += (res0[d]+res1[d]) * c->basis[1][d];
}
#endif
#endif
......@@ -1142,13 +1142,17 @@ static int contact_solve(ParticleProblem *p, Contact *c, double dt, double tol)
}
}
else {
double v[DIMENSION]= {0.}; // local free velocity in the contact basis
for (int i=0; i < DIMENSION; ++i) {
for (int j=0; j < DIMENSION; ++j) {
v[i] += (v0[j]-v1[j])*c->basis[i][j];
//v[i] += (v0[j]-v1[j])*c->basis[i][j];
}
//printf("v[%d] : %f\n",i,v[i]);
}
//contact_get_local_free_velocity_tangent(c, p, v0, v1, v);
contact_get_local_free_velocity_tangent(c, p, v0, v1, v);
//if(p->particles[c->o0].body == 31 && p->particles[c->o1].body == 21)
//printf("c->o0 : %ld c->o1 : %ld v[0] : %f v[1] : %f\n",c->o0,c->o1,v[0],v[1]);
double wnn = c->imass0+c->imass1;
double wtt = wnn;
double wnt = 0;
......
Markdown is supported
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