------------------------------------------------------------
revno: 3515
committer: Bruno Chareyre <bruno.chare...@hmg.inpg.fr>
timestamp: Wed 2014-10-29 19:47:32 +0100
message:
  explicit error message when trying to interpolate capillary forces 
out-of-range of the data files
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	2014-10-17 15:43:56 +0000
+++ pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp	2014-10-29 18:47:32 +0000
@@ -6,11 +6,6 @@
 *  GNU General Public License v2 or later. See file LICENSE for details. *
 *************************************************************************/
 
-//Modifs : Parameters renamed as MeniscusParameters
-//id1/id2 as id1 is the smallest grain, FIXME : wetting angle?
-//FIXME : in triaxialStressController, change test about null force in updateStiffness
-//FIXME : needs "requestErase" somewhere
-
 #include "Law2_ScGeom_CapillaryPhys_Capillarity.hpp"
 #include <pkg/common/ElastMat.hpp>
 #include <pkg/dem/ScGeom.hpp>
@@ -117,7 +112,7 @@
 			Real D = alpha*((b2->state->pos-b1->state->pos).norm()-(currentContactGeometry->radius1+ currentContactGeometry->radius2)); // scGeom->penetrationDepth could probably be used here?
 
 			if ((currentContactGeometry->penetrationDepth>=0)|| D<=0 || createDistantMeniscii) { //||(scene->iter < 1) ) // a simplified way to define meniscii everywhere
-				D=0; // 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.
+				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 (!hertzOn) {
 					if (fusionDetection && !cundallContactPhysics->meniscus) bodiesMenisciiList.insert(interaction);
 					cundallContactPhysics->meniscus=true;
@@ -160,6 +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.")
 				}
 				/// wetting angles
 				if (!hertzOn) {

_______________________________________________
Mailing list: https://launchpad.net/~yade-dev
Post to     : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to