← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2587: - restore default CohFrict behaviour

 

------------------------------------------------------------
revno: 2587
committer: Bruno Chareyre <bruno.chareyre@xxxxxxxxxxx>
branch nick: yade
timestamp: Fri 2010-12-03 13:00:34 +0100
message:
  - restore default CohFrict behaviour
modified:
  pkg/dem/Ip2_2xCohFrictMat_CohFrictPhys.cpp
  pkg/dem/Ip2_2xCohFrictMat_CohFrictPhys.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/Ip2_2xCohFrictMat_CohFrictPhys.cpp'
--- pkg/dem/Ip2_2xCohFrictMat_CohFrictPhys.cpp	2010-12-02 19:27:56 +0000
+++ pkg/dem/Ip2_2xCohFrictMat_CohFrictPhys.cpp	2010-12-03 12:00:34 +0000
@@ -28,7 +28,7 @@
 	if (setCohesionNow && cohesionDefinitionIteration!=-1 && cohesionDefinitionIteration!=scene->iter) {
 		cohesionDefinitionIteration = -1;
 		setCohesionNow = 0;}
-		
+
 	if (geom) {
 		if (!interaction->phys) {
 			interaction->phys = shared_ptr<CohFrictPhys>(new CohFrictPhys());
@@ -47,13 +47,18 @@
 			Real Ks;
 			if (Va && Vb) Ks = 2.0*Ea*Da*Va*Eb*Db*Vb/(Ea*Da*Va+Eb*Db*Vb);//harmonic average of two stiffnesses with ks=V*kn for each sphere
 			else Ks=0;
-				
+
 			// Jean-Patrick Plassiard, Noura Belhaine, Frederic
 			// Victor Donze, "Calibration procedure for spherical
 			// discrete elements using a local moemnt law".
-			Real Kr = pow(Dmean,2)*Ks*alphaKr;
-			Real Ktw = pow(Dmean,2)*Ks*alphaKtw;
-			
+			if (!useMeanRad){
+				contactPhysics->kr = Da*Db*Ks*alphaKr;
+				contactPhysics->ktw = Da*Db*Ks*alphaKtw;
+			} else {
+			// Chiara Modese's variant
+				contactPhysics->kr = pow(Dmean,2)*Ks*alphaKr;
+				contactPhysics->ktw = pow(Dmean,2)*Ks*alphaKtw;}
+
 			contactPhysics->frictionAngle			= std::min(fa,fb);
 			contactPhysics->tangensOfFrictionAngle		= std::tan(contactPhysics->frictionAngle);
 
@@ -66,14 +71,10 @@
 			}
 			contactPhysics->kn = Kn;
 			contactPhysics->ks = Ks;
-			
-			contactPhysics->kr = Kr;
-			contactPhysics->ktw = Ktw;
+
 			contactPhysics->maxRollPl = etaRoll*Dmean;
-			
 			contactPhysics->momentRotationLaw=(sdec1->momentRotationLaw && sdec2->momentRotationLaw);
 			//contactPhysics->elasticRollingLimit = elasticRollingLimit;
-
 		}
 		else {// !isNew, but if setCohesionNow, all contacts are initialized like if they were newly created
 			CohFrictPhys* contactPhysics = YADE_CAST<CohFrictPhys*>(interaction->phys.get());

=== modified file 'pkg/dem/Ip2_2xCohFrictMat_CohFrictPhys.hpp'
--- pkg/dem/Ip2_2xCohFrictMat_CohFrictPhys.hpp	2010-12-02 19:27:56 +0000
+++ pkg/dem/Ip2_2xCohFrictMat_CohFrictPhys.hpp	2010-12-03 12:00:34 +0000
@@ -17,16 +17,17 @@
 					const shared_ptr<Material>& b2,
 					const shared_ptr<Interaction>& interaction);
 		int cohesionDefinitionIteration;
-		
+
 		YADE_CLASS_BASE_DOC_ATTRS_CTOR(Ip2_2xCohFrictMat_CohFrictPhys,IPhysFunctor,
 		"Generates cohesive-frictional interactions with moments. Used in the contact law :yref:`Law2_ScGeom6D_CohFrictPhys_CohesionMoment`.",
 		((bool,setCohesionNow,false,,"If true, assign cohesion to all existing contacts in current time-step. The flag is turned false automatically, so that assignment is done in the current timestep only."))
 		((bool,setCohesionOnNewContacts,false,,"If true, assign cohesion at all new contacts. If false, only existing contacts can be cohesive (also see :yref:`Ip2_2xCohFrictMat_CohFrictPhys::setCohesionNow`), and new contacts are only frictional."))
-		((Real,alphaKr,0.0,,"Dimensionless coefficient used for the rolling stiffness."))
-		((Real,alphaKtw,0.0,,"Dimensionless coefficient used for the twist stiffness."))
+		((Real,alphaKr,2.0,,"Dimensionless coefficient used for the rolling stiffness."))
+		((Real,alphaKtw,2.0,,"Dimensionless coefficient used for the twist stiffness."))
 		((Real,etaRoll,-1.,,"Dimensionless coefficient used to calculate the plastic rolling moment (if negative, plasticity will not be applied)."))
+		((bool,useMeanRad,false,,"use $meanRad^2$ to define rotational stifnesses, else use R1*R2"))
 		,
-		cohesionDefinitionIteration = -1; 
+		cohesionDefinitionIteration = -1;
 		);
 	FUNCTOR2D(CohFrictMat,CohFrictMat);
 };