← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 3542: Other changes regarding sign convention. Add of deprecation warnings (existing in the code and at...

 

------------------------------------------------------------
revno: 3542
committer: jduriez <jerome.duriez@xxxxxxxxxxx>
timestamp: Wed 2014-11-19 10:49:18 -0700
message:
  Other changes regarding sign convention. Add of deprecation warnings (existing in the code and at execution) in the doc. Fix of script-session2.py previously broken
modified:
  examples/triax-tutorial/script-session2.py
  pkg/dem/ThreeDTriaxialEngine.hpp
  pkg/dem/TriaxialCompressionEngine.hpp


--
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 'examples/triax-tutorial/script-session2.py'
--- examples/triax-tutorial/script-session2.py	2013-03-28 11:33:07 +0000
+++ examples/triax-tutorial/script-session2.py	2014-11-19 17:49:18 +0000
@@ -48,12 +48,10 @@
 	stressControl_1 = False,
 	stressControl_2 = False,
 	stressControl_3 = False,
-	## The stress used for (isotropic) internal compaction
-	sigma_iso = 10000,
 	## Independant stress values for anisotropic loadings
-	sigma1=10000,
-	sigma2=10000,
-	sigma3=10000,
+	sigma1=-10000,
+	sigma2=-10000,
+	sigma3=-10000,
 	internalCompaction=True,
 	Key=key,
 )
@@ -86,7 +84,7 @@
   #note: triax.stress(k) returns a stress vector, so we need to keep only the normal component
   meanS=(triax.stress(triax.wall_right_id)[0]+triax.stress(triax.wall_top_id)[1]+triax.stress(triax.wall_front_id)[2])/3
   print 'unbalanced force:',unb,' mean stress: ',meanS
-  if unb<stabilityThreshold and abs(meanS-triax.sigma_iso)/triax.sigma_iso<0.001:
+  if unb<stabilityThreshold and abs(meanS+10000)/10000<0.001:
     break
 
 O.save('compressedState'+key+'.xml')
@@ -121,7 +119,7 @@
 ##... need to active stress control in 3 directions
 #triax.stressControl_1=triax.stressControl_2=triax.stressControl_3=True
 ##... choose the value of axial stress where we want to stop the compression
-#triax.sigma2=12000
+#triax.sigma2=-12000
 ##... fix a maximum strain rate to go progressivly to the desired stress state in direction 2
 #triax.strainRate2=0.01
 ##... fix a high value of maximum strain rate in radial direction to be sure to keep in any conditions a constant confining pressure
@@ -135,7 +133,7 @@
   ##note: triax.stress(k) returns a stress vector, so we need to keep only the normal component
   #axialS=triax.stress(triax.wall_top_id)[1]
   #print 'unbalanced force:',unb,' sigma2: ',axialS
-  #if unb<stabilityThreshold and abs(axialS-triax.sigma2)/triax.sigma2<0.001:
+  #if unb<stabilityThreshold and abs((axialS-triax.sigma2)/triax.sigma2)<0.001:
     #break
 
 #O.save('anisotropicState'+key+'.xml')

=== modified file 'pkg/dem/ThreeDTriaxialEngine.hpp'
--- pkg/dem/ThreeDTriaxialEngine.hpp	2014-10-15 06:44:01 +0000
+++ pkg/dem/ThreeDTriaxialEngine.hpp	2014-11-19 17:49:18 +0000
@@ -48,12 +48,13 @@
 		"For a stress control the imposed stress is specified by 'sigma_i' with a 'max_veli' depending on 'strainRatei'. To obtain the same strain rate in stress control than in strain control you need to set 'wallDamping = 0.8'.\n"
 		"For a strain control the imposed strain is specified by 'strainRatei'.\n"
 		"With this engine you can also perform internal compaction by growing the size of particles by using ``TriaxialStressController::controlInternalStress``. For that, just switch on 'internalCompaction=1' and fix sigma_iso=value of mean pressure that you want at the end of the internal compaction.\n"
+		"\n\n.. warning::\n\t This engine is deprecated, please switch to TriaxialStressController if you expect long term support."
 		,
-		((Real, strainRate1,0,,"target strain rate in direction 1 (./s)"))
+		((Real, strainRate1,0,,"target strain rate in direction 1 (./s, >0 for compression)"))
 		((Real, currentStrainRate1,0,,"current strain rate in direction 1 - converging to :yref:`ThreeDTriaxialEngine::strainRate1` (./s)"))
-		((Real, strainRate2,0,,"target strain rate in direction 2 (./s)"))
+		((Real, strainRate2,0,,"target strain rate in direction 2 (./s, >0 for compression)"))
 		((Real, currentStrainRate2,0,,"current strain rate in direction 2 - converging to :yref:`ThreeDTriaxialEngine::strainRate2` (./s)"))
-		((Real, strainRate3,0,,"target strain rate in direction 3 (./s)"))
+		((Real, strainRate3,0,,"target strain rate in direction 3 (./s, >0 for compression)"))
 		((Real, currentStrainRate3,0,,"current strain rate in direction 3 - converging to :yref:`ThreeDTriaxialEngine::strainRate3` (./s)"))
 		((Real, UnbalancedForce,1,,"mean resultant forces divided by mean contact force"))
 		((Real, frictionAngleDegree,-1,,"Value of friction used in the simulation if (updateFrictionAngle)"))

=== modified file 'pkg/dem/TriaxialCompressionEngine.hpp'
--- pkg/dem/TriaxialCompressionEngine.hpp	2014-11-18 19:46:27 +0000
+++ pkg/dem/TriaxialCompressionEngine.hpp	2014-11-19 17:49:18 +0000
@@ -85,9 +85,10 @@
 		"#.  STATE_TRIAX_LIMBO: currently unused, since simulation is hard-stopped in the previous state.\n\n"
 		"Transition from COMPACTION to UNLOADING is done automatically if autoUnload==true;\n\n Transition from (UNLOADING to LOADING) or from (COMPACTION to LOADING: if UNLOADING is skipped) is done automatically if autoCompressionActivation=true; Both autoUnload and autoCompressionActivation are true by default.\n\n"
 		"\n\n.. note::\n\t Most of the algorithms used have been developed initialy for simulations reported in [Chareyre2002a]_ and [Chareyre2005]_. They have been ported to Yade in a second step and used in e.g. [Kozicki2008]_,[Scholtes2009b]_,[Jerier2010b]."
+		"\n\n.. warning::\n\t This engine is deprecated, please switch to TriaxialStressController if you expect long term support."
 		,
 		((int, warn, 0,,"counter used for sending a deprecation warning once"))
-		((Real,strainRate,0,,"target strain rate (./s)"))
+		((Real,strainRate,0,,"target strain rate (./s, >0 for compression)"))
 		((Real,currentStrainRate,0,,"current strain rate - converging to :yref:`TriaxialCompressionEngine::strainRate` (./s)"))
 		((Real,UnbalancedForce,1,,"mean resultant forces divided by mean contact force"))
 		((Real,StabilityCriterion,0.001,,"tolerance in terms of :yref:`TriaxialCompressionEngine::UnbalancedForce` to consider the packing is stable"))