Commit 46842f09 authored by Nathan Coppin's avatar Nathan Coppin
Browse files

Sens de vt pour les segments est correct

parent a350b74d
Pipeline #5179 passed with stage
in 27 seconds
......@@ -420,7 +420,7 @@ static int contactParticleDiskSolve(Contact *c, ParticleProblem *p, double dt, d
p->velocity[c->o1 * DIMENSION]*t[0]+
p->velocity[c->o1 * DIMENSION+1]*t[1]+
p->omega[c->o1]*p->particles[c->o1].r+
p->disks[c->o0].vt*((t[0]!=0) ? -(1-2*signbit(t[0])) : (1-2*signbit(t[0])) );
p->disks[c->o0].vt;
const double mu = particleProblemGetMu(p,p->particleMaterial[c->o1],p->diskMaterial[c->o0]);
double ct = 0;
if(vt>(3./1.)*mu*dp){
......@@ -461,12 +461,14 @@ static int contactParticleSegmentSolve(Contact *c, ParticleProblem *p, double dt
double t[2];
t[0] = -c->n[1];
t[1] = c->n[0];
Segment seg = p->segments[c->o0];
double sign = (seg.p[0][0]-seg.p[1][0])*t[0] + (seg.p[0][1]-seg.p[1][1])*t[1];
double vt = c->ct +
c->ct*p->particles[c->o1].r*c->In1+
p->velocity[c->o1*DIMENSION]*t[0]+
p->velocity[c->o1*DIMENSION +1]*t[1]+
p->omega[c->o1]*p->particles[c->o1].r+
p->segments[c->o0].vt*((t[0]!=0) ? -(1-2*signbit(t[0])) : (1-2*signbit(t[0])) );
seg.vt*( sign>0 ? 1 : -1 );
const double mu = particleProblemGetMu(p,p->particleMaterial[c->o1],p->segmentMaterial[c->o0]);
double ct = 0;
if(vt>(3./1.)*mu*dp){
......
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