yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #04461
Re: [Branch ~yade-dev/yade/trunk] Rev 2237: - Simplify equations inside plastic condition of Dem3Dof (1 sqrt instead of 3, less norm()), add ...
> Real maxFsSq=phys->normalForce.squaredNorm()*pow(phys->tangensOfFrictionAngle,2);
> Vector3r trialFs=phys->ks*geom->displacementT();
> - if(trialFs.squaredNorm()>maxFsSq){ geom->slipToDisplacementTMax(sqrt(maxFsSq)/phys->ks); trialFs*=sqrt(maxFsSq/(trialFs.squaredNorm()));}
> + Real multiplier=maxFsSq/trialFs.squaredNorm();
> +// if(trialFs.squaredNorm()>maxFsSq){
> +// geom->slipToDisplacementTMax(sqrt(maxFsSq)/phys->ks); trialFs*=sqrt(maxFsSq/(trialFs.squaredNorm()));}
> + if(multiplier<1){
> + multiplier = sqrt(multiplier);
> + geom->scaleToDisplacementTMax(multiplier); trialFs*=multiplier;}
Are you nuts??? What if trialFs.squaredNorm()==0 ?
Follow ups
References