← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 3516: Sign convention change for fCap, to be consistent with global framework. Plus other minor changes...

 

------------------------------------------------------------
revno: 3516
committer: jduriez <jerome.duriez@xxxxxxxxxxx>
timestamp: Thu 2014-10-30 11:11:15 -0600
message:
  Sign convention change for fCap, to be consistent with global framework. Plus other minor changes. As discussed in http://www.mail-archive.com/yade-dev@xxxxxxxxxxxxxxxxxxx/msg10868.html and http://www.mail-archive.com/yade-dev@xxxxxxxxxxxxxxxxxxx/msg10877.html
modified:
  pkg/dem/CapillaryPhys.hpp
  pkg/dem/CapillaryStressRecorder.hpp
  pkg/dem/HertzMindlin.hpp
  pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.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/CapillaryPhys.hpp'
--- pkg/dem/CapillaryPhys.hpp	2014-10-17 15:27:48 +0000
+++ pkg/dem/CapillaryPhys.hpp	2014-10-30 17:11:15 +0000
@@ -18,13 +18,13 @@
 		virtual ~CapillaryPhys() {};
 
 	YADE_CLASS_BASE_DOC_ATTRS_DEPREC_INIT_CTOR_PY(CapillaryPhys,FrictPhys,"Physics (of interaction) for :yref:`Law2_ScGeom_CapillaryPhys_Capillarity`.",
-				 ((bool,meniscus,false,,"Presence of a meniscus if true"))
-				 ((bool,isBroken,false,,"If true, capillary force is zero and liquid bridge is inactive."))
+				 ((bool,meniscus,false,Attr::readonly,"True when a meniscus with a non-zero liquid volume (:yref:`vMeniscus<CapillaryPhys.vMeniscus>`) has been computed for this interaction"))
+				 ((bool,isBroken,false,,"Might be set to true by the user to make liquid bridge inactive (capillary force is zero)"))
 				 ((Real,capillaryPressure,0.,,"Value of the capillary pressure Uc. Defined as Ugas-Uliquid, obtained from :yref:`corresponding Law2 parameter<Law2_ScGeom_CapillaryPhys_Capillarity.capillaryPressure>`"))
 				 ((Real,vMeniscus,0.,,"Volume of the meniscus"))
 				 ((Real,Delta1,0.,,"Defines the surface area wetted by the meniscus on the smallest grains of radius R1 (R1<R2)"))
 				 ((Real,Delta2,0.,,"Defines the surface area wetted by the meniscus on the biggest grains of radius R2 (R1<R2)"))
-				 ((Vector3r,fCap,Vector3r::Zero(),,"Capillary force produced by the presence of the meniscus"))
+				 ((Vector3r,fCap,Vector3r::Zero(),,"Capillary force produced by the presence of the meniscus. This is the force acting on particle #2"))
 				 ((short int,fusionNumber,0.,,"Indicates the number of meniscii that overlap with this one"))
 				 ,/*deprec*/
 				 ((Fcap,fCap,"naming convention"))

=== modified file 'pkg/dem/CapillaryStressRecorder.hpp'
--- pkg/dem/CapillaryStressRecorder.hpp	2014-10-15 06:44:01 +0000
+++ pkg/dem/CapillaryStressRecorder.hpp	2014-10-30 17:11:15 +0000
@@ -22,7 +22,7 @@
 	public :
 		virtual void action();
 		
-	YADE_CLASS_BASE_DOC_ATTRS_CTOR(CapillaryStressRecorder,Recorder,"Records information from capillary meniscii on samples submitted to triaxial compressions. -> New formalism needs to be tested!!!",,initRun=true;);
+	YADE_CLASS_BASE_DOC_ATTRS_CTOR(CapillaryStressRecorder,Recorder,"Records information from capillary meniscii on samples submitted to triaxial compressions. Classical sign convention (tension positiv) is used for capillary stresses. -> New formalism needs to be tested!!!",,initRun=true;);
 	DECLARE_LOGGER;
 
 };

=== modified file 'pkg/dem/HertzMindlin.hpp'
--- pkg/dem/HertzMindlin.hpp	2014-10-15 06:44:01 +0000
+++ pkg/dem/HertzMindlin.hpp	2014-10-30 17:11:15 +0000
@@ -179,13 +179,13 @@
 		virtual ~MindlinCapillaryPhys() {};
 
 	YADE_CLASS_BASE_DOC_ATTRS_DEPREC_INIT_CTOR_PY(MindlinCapillaryPhys,MindlinPhys,"Adds capillary physics to Mindlin's interaction physics.",
-				((bool,meniscus,false,,"Presence of a meniscus if true"))
-				((bool,isBroken,false,,"If true, capillary force is zero and liquid bridge is inactive."))
+				((bool,meniscus,false,Attr::readonly,"True when a meniscus with a non-zero liquid volume (:yref:`vMeniscus<MindlinPhys.vMeniscus>`) has been computed for this interaction"))
+				((bool,isBroken,false,,"Might be set to true by the user to make liquid bridge inactive (capillary force is zero)"))
 				((Real,capillaryPressure,0.,,"Value of the capillary pressure Uc. Defined as Ugas-Uliquid, obtained from :yref:`corresponding Law2 parameter<Law2_ScGeom_CapillaryPhys_Capillarity.capillaryPressure>`"))
 				((Real,vMeniscus,0.,,"Volume of the meniscus"))
 				((Real,Delta1,0.,,"Defines the surface area wetted by the meniscus on the smallest grains of radius R1 (R1<R2)"))
 				((Real,Delta2,0.,,"Defines the surface area wetted by the meniscus on the biggest grains of radius R2 (R1<R2)"))
-				((Vector3r,fCap,Vector3r::Zero(),,"Capillary Force produces by the presence of the meniscus"))
+				((Vector3r,fCap,Vector3r::Zero(),,"Capillary Force produces by the presence of the meniscus. This is the force acting on particle #2"))
 				((short int,fusionNumber,0.,,"Indicates the number of meniscii that overlap with this one"))
 				,/*deprec*/
 				((Fcap,fCap,"naming convention"))

=== modified file 'pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp'
--- pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp	2014-10-29 18:47:32 +0000
+++ pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp	2014-10-30 17:11:15 +0000
@@ -109,10 +109,10 @@
 			R2=alpha*std::max(currentContactGeometry->radius2,currentContactGeometry->radius1) ;
 
 			/// intergranular distance
-			Real D = alpha*((b2->state->pos-b1->state->pos).norm()-(currentContactGeometry->radius1+ currentContactGeometry->radius2)); // scGeom->penetrationDepth could probably be used here?
+			Real D = - alpha * currentContactGeometry->penetrationDepth;
 
-			if ((currentContactGeometry->penetrationDepth>=0)|| D<=0 || createDistantMeniscii) { //||(scene->iter < 1) ) // a simplified way to define meniscii everywhere
-				D=max(0.,D); // defines fCap when spheres interpenetrate. D<0 leads to wrong interpolation has D<0 has no solution in the interpolation : this is not physically interpretable!! even if, interpenetration << grain radius.
+			if ( D<0 || createDistantMeniscii) { //||(scene->iter < 1) ) // a simplified way to define meniscii everywhere
+				D=max(0.,D); // defines fCap when spheres interpenetrate. D<0 leads to wrong interpolation as D<0 has no solution in the interpolation : this is not physically interpretable!! even if, interpenetration << grain radius.
 				if (!hertzOn) {
 					if (fusionDetection && !cundallContactPhysics->meniscus) bodiesMenisciiList.insert(interaction);
 					cundallContactPhysics->meniscus=true;
@@ -138,7 +138,7 @@
 				solution(Pinterpol? capillary->interpolate(R1,R2,Dinterpol, Pinterpol, currentIndexes) : MeniscusParameters());
 				/// capillary adhesion force
 				Real Finterpol = solution.F;
-				Vector3r fCap = Finterpol*(2*Mathr::PI*(R2/alpha)*liquidTension)*currentContactGeometry->normal;
+				Vector3r fCap = - Finterpol*(2*Mathr::PI*(R2/alpha)*liquidTension)*currentContactGeometry->normal;
 				if (!hertzOn) cundallContactPhysics->fCap = fCap;
 				else mindlinContactPhysics->fCap = fCap;
 				/// meniscus volume
@@ -155,7 +155,7 @@
 				if (!Vinterpol) {
 					if ((fusionDetection) || (hertzOn ? mindlinContactPhysics->isBroken : cundallContactPhysics->isBroken)) bodiesMenisciiList.remove(interaction);
 					if (D>0) scene->interactions->requestErase(interaction);
-					else LOG_ERROR("No meniscus found at a contact. capillaryPressure may be to large wrt. to the loaded data files.")
+					else LOG_ERROR("No meniscus found at a contact. capillaryPressure may be too large wrt. the loaded data files.")
 				}
 				/// wetting angles
 				if (!hertzOn) {
@@ -197,8 +197,8 @@
 					//LINEAR VERSION : capillary force is divided by (fusionNumber + 1) - NOTE : any decreasing function of fusionNumber can be considered in fact
 					else if (fusionNumber !=0) hertzOn?mindlinContactPhysics->fCap:cundallContactPhysics->fCap /= (fusionNumber+1.);
 				}
-				scene->forces.addForce(interaction->getId1(), hertzOn?mindlinContactPhysics->fCap:cundallContactPhysics->fCap);
-				scene->forces.addForce(interaction->getId2(),-(hertzOn?mindlinContactPhysics->fCap:cundallContactPhysics->fCap));
+				scene->forces.addForce(interaction->getId1(),-(hertzOn?mindlinContactPhysics->fCap:cundallContactPhysics->fCap));
+				scene->forces.addForce(interaction->getId2(),  hertzOn?mindlinContactPhysics->fCap:cundallContactPhysics->fCap );
 			}
 		}
 	}