← Back to team overview

yade-dev team mailing list archive

Re: [Yade-commits] r1359 - in trunk: core gui/py lib/import pkg/common/DataClass/PhysicalParameters pkg/common/Engine/DeusExMachina pkg/common/Engine/StandAloneEngine pkg/dem/Engine/EngineUnit pkg/dem/Engine/StandAloneEngine pkg/dem/RenderingEngine/GLDrawElasticContactInteraction

 

Hello Sega,

I am not sure I understand everything in this commit, and at least in 
one case i'm sure there is a problem (see first paragraph) :




> Modified: trunk/pkg/dem/Engine/EngineUnit/InteractingSphere2InteractingSphere4SpheresContactGeometry.cpp
> ===================================================================
> --- trunk/pkg/dem/Engine/EngineUnit/InteractingSphere2InteractingSphere4SpheresContactGeometry.cpp	2008-05-20 20:05:08 UTC (rev 1358)
> +++ trunk/pkg/dem/Engine/EngineUnit/InteractingSphere2InteractingSphere4SpheresContactGeometry.cpp	2008-05-21 18:56:45 UTC (rev 1359)
> @@ -38,7 +38,7 @@
>  	Vector3r normal = se32.position-se31.position;
>  	Real penetrationDepth = pow(interactionDetectionFactor*(s1->radius+s2->radius), 2) - normal.SquaredLength();// Compute a wrong value just to check sign - faster than computing distances
>  	//Real penetrationDepth = s1->radius+s2->radius-normal.Normalize();
> -	if (penetrationDepth>0 || c->isReal){
> +	if (penetrationDepth>0 /*|| c->isReal*/){
>   

We need to compute the geometry when c->isReal because an interaction 
under tension, for instance, will not have penetrationDepth>0 but will 
still be a "real" interraction and needs geometrical data. I suspect 
this change actually brakes all cohesive and capillary laws in Yade.


>
> Modified: trunk/pkg/dem/Engine/StandAloneEngine/ElasticContactLaw.cpp
> ===================================================================
> --- trunk/pkg/dem/Engine/StandAloneEngine/ElasticContactLaw.cpp	2008-05-20 20:05:08 UTC (rev 1358)
> +++ trunk/pkg/dem/Engine/StandAloneEngine/ElasticContactLaw.cpp	2008-05-21 18:56:45 UTC (rev 1359)
> @@ -62,7 +62,10 @@
>  	
>
> -			angle = dt*0.5*currentContactGeometry->normal.Dot(de1->angularVelocity+de2->angularVelocity);
> +			//angle = dt*0.5*currentContactGeometry->normal.Dot(de1->angularVelocity+de2->angularVelocity);
> +				//FIXME: if one body is kinematic then assumed its rotation centre does not lies along the normal
> +				//(i.e. virtual sphere, which replaces this kinematic body on contact, does not rotate)
> +			Vector3r summaryAngularVelocity(0,0,0);
> +			if (isDynamic1) summaryAngularVelocity += de1->angularVelocity;
> +			if (isDynamic2) summaryAngularVelocity += de2->angularVelocity;
> +			angle = dt*0.5*currentContactGeometry->normal.Dot(summaryAngularVelocity);
>   
Why wouldn't we take the motion of not-dynamic bodies into account?
A typical situation where isDynamic==false is when bodies are used to 
define prescribed velocity at boundaries.
If you don't account for the kinematics of boundaries in the equation, 
computed rotation will be wrong I think.

>  		
>
> -            		Vector3r _c1x_	= currentContactGeometry->radius1*currentContactGeometry->normal;
> -            		Vector3r _c2x_	= -currentContactGeometry->radius2*currentContactGeometry->normal;
> +            		Vector3r _c1x_	= (isDynamic1) ? currentContactGeometry->radius1*currentContactGeometry->normal : x - de1->zeroPoint;
> +            		Vector3r _c2x_	= (isDynamic2) ? -currentContactGeometry->radius2*currentContactGeometry->normal : x - de2->zeroPoint;
>  			Vector3r relativeVelocity		= (de2->velocity+de2->angularVelocity.Cross(_c2x_)) - (de1->velocity+de1->angularVelocity.Cross(_c1x_));
>  			Vector3r shearVelocity			= relativeVelocity-currentContactGeometry->normal.Dot(relativeVelocity)*currentContactGeometry->normal;
>  			Vector3r shearDisplacement		= shearVelocity*dt;
>  
>   
I'm a bit lost. I agree that when the body is not a sphere, cx must be 
defined relative to the center of mass of the body (and not based on the 
radius of the virtual sphere as it was before). But then, why should it 
be the case only if !isDynamic?

Bruno


-- 
 
_______________
Chareyre Bruno
Maitre de conference

Institut National Polytechnique de Grenoble
Laboratoire 3S (Soils Solids Structures) - bureau E145
BP 53 - 38041, Grenoble cedex 9 - France
Tél : 33 4 56 52 86 21
Fax : 33 4 76 82 70 43
________________

_______________________________________________
yade-dev mailing list
yade-dev@xxxxxxxxxxxxxxxx
https://lists.berlios.de/mailman/listinfo/yade-dev