← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 3021: - make the "smoothing" of strain rate evolution configurable via a registered attribute (default=...

 

------------------------------------------------------------
revno: 3021
committer: Bruno Chareyre <bruno.chareyre@xxxxxxxxxxx>
branch nick: trunk
timestamp: Thu 2012-02-09 18:37:02 +0100
message:
  - make the "smoothing" of strain rate evolution configurable via a registered attribute (default=unchanged behavior)
modified:
  pkg/dem/ThreeDTriaxialEngine.cpp
  pkg/dem/ThreeDTriaxialEngine.hpp


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

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'pkg/dem/ThreeDTriaxialEngine.cpp'
--- pkg/dem/ThreeDTriaxialEngine.cpp	2010-12-31 14:35:21 +0000
+++ pkg/dem/ThreeDTriaxialEngine.cpp	2012-02-09 17:37:02 +0000
@@ -70,7 +70,7 @@
 
 	if(!stressControl_1)  // control in strain if wanted
 	{
-		if ( currentStrainRate1 != strainRate1 ) currentStrainRate1 += ( strainRate1-currentStrainRate1 ) *0.0003;
+		if ( currentStrainRate1 != strainRate1 ) currentStrainRate1 += ( strainRate1-currentStrainRate1 ) *(1-strainDamping);
 
 		State* p_left=Body::byId(wall_left_id,scene)->state.get();
 		p_left->pos += 0.5*currentStrainRate1*width*translationAxisx*dt;
@@ -79,14 +79,14 @@
 
 	} else {
 
-		if ( currentStrainRate1 != strainRate1 ) currentStrainRate1 += ( strainRate1-currentStrainRate1 ) *0.0003;
+		if ( currentStrainRate1 != strainRate1 ) currentStrainRate1 += ( strainRate1-currentStrainRate1 ) *(1-strainDamping);
 		max_vel1 = 0.5*currentStrainRate1*width;
 	}
 
 
 	if(!stressControl_2)  // control in strain if wanted
 	{
-		if ( currentStrainRate2 != strainRate2 ) currentStrainRate2 += ( strainRate2-currentStrainRate2 ) *0.0003;
+		if ( currentStrainRate2 != strainRate2 ) currentStrainRate2 += ( strainRate2-currentStrainRate2 ) *(1-strainDamping);
 
 		State* p_bottom=Body::byId(wall_bottom_id,scene)->state.get();
 		p_bottom->pos += 0.5*currentStrainRate2*height*translationAxisy*dt;
@@ -95,14 +95,14 @@
 
 	} else {
 
-		if ( currentStrainRate2 != strainRate2 ) currentStrainRate2 += ( strainRate2-currentStrainRate2 ) *0.0003;
+		if ( currentStrainRate2 != strainRate2 ) currentStrainRate2 += ( strainRate2-currentStrainRate2 ) *(1-strainDamping);
 		max_vel2 = 0.5*currentStrainRate2*height;
 	}
 
 
 	if(!stressControl_3)  // control in strain if wanted
 	{
-		if ( currentStrainRate3 != strainRate3 ) currentStrainRate3 += ( strainRate3-currentStrainRate3 ) *0.0003;
+		if ( currentStrainRate3 != strainRate3 ) currentStrainRate3 += ( strainRate3-currentStrainRate3 ) *(1-strainDamping);
 
 
 		State* p_back=Body::byId(wall_back_id,scene)->state.get();
@@ -112,7 +112,7 @@
 
 	} else {
 
-		if ( currentStrainRate3 != strainRate3 ) currentStrainRate3 += ( strainRate3-currentStrainRate3 ) *0.0003;
+		if ( currentStrainRate3 != strainRate3 ) currentStrainRate3 += ( strainRate3-currentStrainRate3 ) *(1-strainDamping);
 		max_vel3 = 0.5*currentStrainRate3*depth;
 	}
 

=== modified file 'pkg/dem/ThreeDTriaxialEngine.hpp'
--- pkg/dem/ThreeDTriaxialEngine.hpp	2010-11-07 11:46:20 +0000
+++ pkg/dem/ThreeDTriaxialEngine.hpp	2012-02-09 17:37:02 +0000
@@ -64,6 +64,7 @@
 		((bool, stressControl_1,true,,"Switch to choose a stress or a strain control in directions 1"))
 		((bool, stressControl_2,true,,"Switch to choose a stress or a strain control in directions 2"))
 		((bool, stressControl_3,true,,"Switch to choose a stress or a strain control in directions 3"))
+		((Real, strainDamping,0.9997,,"factor used for smoothing changes in effective strain rate. If target rate is TR, then (1-damping)*(TR-currentRate) will be added at each iteration. With damping=0, rate=target all the time. With damping=1, it doesn't change."))
 		((std::string,Key,"",,"A string appended at the end of all files, use it to name simulations."))
 		,
 		translationAxisy=Vector3r(0,1,0);