← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 3557: Add LiqMigrEnabled parameter.

 

------------------------------------------------------------
revno: 3557
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Wed 2014-12-10 11:52:48 +0100
message:
  Add LiqMigrEnabled parameter.
  
  Needed to enable/disable LiqMigr model, if LiqMigr feature is on.
  Helps to escape memory leakage without LiqControl.
modified:
  pkg/dem/ViscoelasticCapillarPM.cpp
  pkg/dem/ViscoelasticCapillarPM.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 'pkg/dem/ViscoelasticCapillarPM.cpp'
--- pkg/dem/ViscoelasticCapillarPM.cpp	2014-11-17 13:21:30 +0000
+++ pkg/dem/ViscoelasticCapillarPM.cpp	2014-12-10 10:52:48 +0000
@@ -57,7 +57,9 @@
     }
     phys->Capillar=true;
   }
-  
+  #ifdef YADE_LIQMIGRATION
+  phys->LiqMigrEnabled = mat1->LiqMigrEnabled && mat2->LiqMigrEnabled;
+  #endif
   interaction->phys = phys;
 }
 
@@ -84,7 +86,9 @@
     phys.liqBridgeCreated = true;
     phys.liqBridgeActive = false;
     #ifdef YADE_LIQMIGRATION
-    scene->addIntrs.push_back(I);
+    if (phys.LiqMigrEnabled) {
+      scene->addIntrs.push_back(I);
+    }
     #endif
     Sphere* s1=dynamic_cast<Sphere*>(bodies[id1]->shape.get());
     Sphere* s2=dynamic_cast<Sphere*>(bodies[id2]->shape.get());

=== modified file 'pkg/dem/ViscoelasticCapillarPM.hpp'
--- pkg/dem/ViscoelasticCapillarPM.hpp	2014-10-15 06:44:01 +0000
+++ pkg/dem/ViscoelasticCapillarPM.hpp	2014-12-10 10:52:48 +0000
@@ -8,6 +8,9 @@
 		virtual ~ViscElCapMat();
 	YADE_CLASS_BASE_DOC_ATTRS_CTOR(ViscElCapMat,ViscElMat,"Material for extended viscoelastic model of contact with capillary parameters.",
 		((bool,Capillar,false,,"True, if capillar forces need to be added."))
+#ifdef YADE_LIQMIGRATION
+		((bool,LiqMigrEnabled,true,,"True, if liquid migration mechanism is needed. On by default."))
+#endif
 		((Real,Vb,0.0,,"Liquid bridge volume [m^3]"))
 		((Real,gamma,0.0,,"Surface tension [N/m]"))
 		((Real,theta,0.0,,"Contact angle [°]"))
@@ -36,6 +39,7 @@
 		((Real,theta,0.0,,"Contact angle [rad]"))
 		((CapType,CapillarType,None_Capillar,,"Different types of capillar interaction: Willett_numeric, Willett_analytic, Weigert, Rabinovich, Lambert, Soulie"))
 #ifdef YADE_LIQMIGRATION
+		((bool,LiqMigrEnabled,,,"True, if liquid migration mechanism is needed."))
 		((Real,Vmax,0.0,,"Maximal liquid bridge volume [m^3]"))
 		((Real,Vf1,0.0,, "Liquid which will be returned to the 1st body after rupture [m^3]"))
 		((Real,Vf2,0.0,, "Liquid which will be returned to the 2nd body after rupture [m^3]"))