← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 3997: Important change in Kinem.. engines. Both changes in position and velocities of boundary bodies w...

 

------------------------------------------------------------
revno: 3997
committer: Jerome Duriez <jerome.duriez@xxxxxxxxxxxxxxx>
timestamp: Wed 2014-05-28 10:55:24 +0200
message:
  Important change in Kinem.. engines. Both changes in position and velocities of boundary bodies were still existing, while now changes in position should be handled by NewtonIntegrator
modified:
  pkg/dem/KinemSimpleShearBox.cpp


--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'pkg/dem/KinemSimpleShearBox.cpp'
--- pkg/dem/KinemSimpleShearBox.cpp	2013-05-29 09:48:51 +0000
+++ pkg/dem/KinemSimpleShearBox.cpp	2014-05-28 08:55:24 +0000
@@ -55,24 +55,16 @@
 	Real Ysup = topbox->state->pos.y();
 	Real Ylat = leftbox->state->pos.y();
 
-// 	Changes in vertical and horizontal position :
-
-	
-	topbox->state->pos += Vector3r(dX,dY,0);
-
-	leftbox->state->pos += Vector3r(dX/2.0,dY/2.0,0);
-	rightbox->state->pos += Vector3r(dX/2.0,dY/2.0,0);
-	if(LOG)	cout << "dY reellemt applique :" << dY << endl;
-	if(LOG)	cout << "qui nous a emmene en : y = " <<(topbox->state->pos).y() << endl;
-	
-	Real Ysup_mod = topbox->state->pos.y();
-	Real Ylat_mod = leftbox->state->pos.y();
-
-//	with the corresponding velocities :
+// 	Changes in vertical and horizontal velocities :
 	topbox->state->vel = Vector3r(dX/dt,dY/dt,0);
 	leftbox->state->vel = Vector3r(dX/(2.0 * dt),dY/(2.0 * dt),0);
 	rightbox->state->vel = Vector3r(dX/(2.0 * dt),dY/(2.0*dt),0);
 
+	if(LOG)	cout << "dY that will be applied by NewtonIntegrator :" << dY << endl;
+	
+	Real Ysup_mod = Ysup + dY;
+	Real Ylat_mod = Ylat + dY;
+
 	computeAlpha();
 //	Then computation of the angle of the rotation,dalpha, to be done :
 	if (alpha == Mathr::PI/2.0)	// Case of the very beginning
@@ -87,11 +79,8 @@
 
 	Quaternionr qcorr(AngleAxisr(dalpha,Vector3r::UnitZ()));
 
-// Rotation is applied : orientation and angular velocity of plates are modified.
-	leftbox->state->ori	= qcorr*leftbox->state->ori;
+//	Rotation is applied through velocities (and NewtonIntegrator)
 	leftbox->state->angVel	= Vector3r(0,0,1)*dalpha/dt;
-
-	rightbox->state->ori	= qcorr*rightbox->state->ori;
 	rightbox->state->angVel	= Vector3r(0,0,1)*dalpha/dt;
 
 }