← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 3955: Capillary law2: erasing when necessary sphere-non sphere interactions (bug LP: #1628273) + minor ...

 

------------------------------------------------------------
revno: 3955
committer: jduriez <jerome.duriez@xxxxxxxxxxx>
timestamp: Tue 2016-10-25 11:53:35 -0600
message:
  Capillary law2: erasing when necessary sphere-non sphere interactions (bug LP: #1628273) + minor changes
modified:
  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/Law2_ScGeom_CapillaryPhys_Capillarity.cpp'
--- pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp	2016-09-21 16:20:15 +0000
+++ pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp	2016-10-25 17:53:35 +0000
@@ -92,16 +92,17 @@
 			unsigned int id1 = interaction->getId1();
 			unsigned int id2 = interaction->getId2();
 
+			/// definition of interacting objects (not necessarily in contact)
+			ScGeom* currentContactGeometry = static_cast<ScGeom*>(interaction->geom.get());
+			
 			/// interaction geometry search (this test is to compute capillarity only between spheres (probably a better way to do that)
 			int geometryIndex1 = (*bodies)[id1]->shape->getClassIndex(); // !!!
 			int geometryIndex2 = (*bodies)[id2]->shape->getClassIndex();
-			if (!(geometryIndex1 == geometryIndex2)) continue;
-
-			/// definition of interacting objects (not necessarily in contact)
-			ScGeom* currentContactGeometry = static_cast<ScGeom*>(interaction->geom.get());
-
-			/// Capillary components definition:
-			Real liquidTension = surfaceTension;
+			if (!(geometryIndex1 == geometryIndex2)) { // such interactions won't have a meniscus
+				if(currentContactGeometry->penetrationDepth < 0) // thus we will ask for the interaction to be erased, as we do w. sphere-sphere interactions below:
+					scene->interactions->requestErase(interaction);
+				continue;}
+
 
 			/// Interacting Grains:
 			// If you want to define a ratio between YADE sphere size and real sphere size
@@ -128,8 +129,8 @@
 
 			/// Suction (Capillary pressure):
 			Real Pinterpol = 0;
-			if (!hertzOn) Pinterpol = cundallContactPhysics->isBroken ? 0 : capillaryPressure*(R2/liquidTension);
-			else Pinterpol = mindlinContactPhysics->isBroken ? 0 : capillaryPressure*(R2/liquidTension);
+			if (!hertzOn) Pinterpol = cundallContactPhysics->isBroken ? 0 : capillaryPressure*(R2/surfaceTension);
+			else Pinterpol = mindlinContactPhysics->isBroken ? 0 : capillaryPressure*(R2/surfaceTension);
 			if (!hertzOn) cundallContactPhysics->capillaryPressure = capillaryPressure;
 			else mindlinContactPhysics->capillaryPressure = capillaryPressure;
 
@@ -149,7 +150,7 @@
 				}
 				/// 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)*surfaceTension)*currentContactGeometry->normal;
 				if (!hertzOn) cundallContactPhysics->fCap = fCap;
 				else mindlinContactPhysics->fCap = fCap;
 				/// meniscus volume