← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 4000: CohesiveFrictionalContactLaw does not warn about incremental formulation of rolling/twisting mome...

 

------------------------------------------------------------
revno: 4000
committer: Bruno Chareyre <bruno.chareyre@xxxxxxxxxxx>
timestamp: Mon 2014-06-02 11:07:27 +0200
message:
  CohesiveFrictionalContactLaw does not warn about incremental formulation of rolling/twisting moments when the moments are elastic
modified:
  pkg/dem/CohFrictMat.hpp
  pkg/dem/CohesiveFrictionalContactLaw.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/CohFrictMat.hpp'
--- pkg/dem/CohFrictMat.hpp	2014-05-26 16:49:23 +0000
+++ pkg/dem/CohFrictMat.hpp	2014-06-02 09:07:27 +0000
@@ -25,8 +25,8 @@
 		((Real,alphaKtw,2.0,,"Dimensionless twist stiffness."))
 		((Real,etaRoll,-1.,,"Dimensionless rolling (aka 'bending') strength. If negative, rolling moment will be elastic."))
 		((Real,etaTwist,-1.,,"Dimensionless twisting strength. If negative, twist moment will be elastic."))
-		((Real,normalCohesion,0,,"Tensile strength, homogeneous to a pressure"))
-		((Real,shearCohesion,0,,"Shear strength, homogeneous to a pressure"))
+		((Real,normalCohesion,-1,,"Tensile strength, homogeneous to a pressure. If negative the normal force is purely elastic."))
+		((Real,shearCohesion,-1,,"Shear strength, homogeneous to a pressure. If negative the shear force is purely elastic."))
 		((bool,momentRotationLaw,false,,"Use bending/twisting moment at contact. The contact will have moments only if both bodies have this flag true. See :yref:`CohFrictPhys::cohesionDisablesFriction` for details."))
 		,
 		createIndex();

=== modified file 'pkg/dem/CohesiveFrictionalContactLaw.cpp'
--- pkg/dem/CohesiveFrictionalContactLaw.cpp	2014-05-26 16:49:23 +0000
+++ pkg/dem/CohesiveFrictionalContactLaw.cpp	2014-06-02 09:07:27 +0000
@@ -193,8 +193,8 @@
 			}
 			/// Plasticity ///
 			// limit rolling moment to the plastic value, if required
-			Real RollMax = phys->maxRollPl*phys->normalForce.norm();
-			if (RollMax>=0.){ // do we want to apply plasticity?
+			if (phys->maxRollPl>=0.){ // do we want to apply plasticity?
+				Real RollMax = phys->maxRollPl*phys->normalForce.norm();
 				if (!useIncrementalForm) LOG_WARN("If :yref:`Law2_ScGeom6D_CohFrictPhys_CohesionMoment::useIncrementalForm` is false, then plasticity will not be applied correctly (the total formulation would not reproduce irreversibility).");
 				Real scalarRoll = phys->moment_bending.norm();
 				if (scalarRoll>RollMax){ // fix maximum rolling moment
@@ -206,8 +206,8 @@
 				}
 			}
 			// limit twisting moment to the plastic value, if required
-			Real TwistMax = phys->maxTwistPl*phys->normalForce.norm();
-			if (TwistMax>=0.){ // do we want to apply plasticity?
+			if (phys->maxTwistPl>=0.){ // do we want to apply plasticity?
+				Real TwistMax = phys->maxTwistPl*phys->normalForce.norm();
 				if (!useIncrementalForm) LOG_WARN("If :yref:`Law2_ScGeom6D_CohFrictPhys_CohesionMoment::useIncrementalForm` is false, then plasticity will not be applied correctly (the total formulation would not reproduce irreversibility).");
 				Real scalarTwist= phys->moment_twist.norm();
 				if (scalarTwist>TwistMax){ // fix maximum rolling moment