← Back to team overview

yade-dev team mailing list archive

[svn] r1524 - in trunk: gui/py pkg/dem/Engine/EngineUnit scripts

 

Author: sega
Date: 2008-09-23 15:44:55 +0200 (Tue, 23 Sep 2008)
New Revision: 1524

Modified:
   trunk/gui/py/yadeControl.cpp
   trunk/pkg/dem/Engine/EngineUnit/InteractingFacet2InteractingSphere4SpheresContactGeometry.cpp
   trunk/pkg/dem/Engine/EngineUnit/InteractingFacet2InteractingSphere4SpheresContactGeometry.hpp
   trunk/scripts/exact-rot-facet.py
Log:
small fixes

Modified: trunk/gui/py/yadeControl.cpp
===================================================================
--- trunk/gui/py/yadeControl.cpp	2008-09-23 07:51:55 UTC (rev 1523)
+++ trunk/gui/py/yadeControl.cpp	2008-09-23 13:44:55 UTC (rev 1524)
@@ -495,7 +495,7 @@
 
 class pySTLImporter : public STLImporter {
     public:
-	unsigned int py_import(pyBodyContainer bc, unsigned int begin=0) { import(bc.proxee,begin); }
+	void py_import(pyBodyContainer bc, unsigned int begin=0) { import(bc.proxee,begin); }
 };
 
 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(STLImporter_import_overloads,py_import,1,2);

Modified: trunk/pkg/dem/Engine/EngineUnit/InteractingFacet2InteractingSphere4SpheresContactGeometry.cpp
===================================================================
--- trunk/pkg/dem/Engine/EngineUnit/InteractingFacet2InteractingSphere4SpheresContactGeometry.cpp	2008-09-23 07:51:55 UTC (rev 1523)
+++ trunk/pkg/dem/Engine/EngineUnit/InteractingFacet2InteractingSphere4SpheresContactGeometry.cpp	2008-09-23 13:44:55 UTC (rev 1524)
@@ -64,6 +64,15 @@
 	Real sh = sphereRadius*shrinkFactor;
 	Real icr = facet->icr-sh;
 
+	if (icr<0)
+	{
+		LOG_INFO("WARNING: a radius of a facet's inscribed circle less than zero! So, shrinkFactor is too large and would be reduced to zero.");
+		shrinkFactor=0;
+		icr = facet->icr;
+		sh = 0;
+	}
+
+
 	if (bm<icr) // contact with facet's surface
 	{
 		penetrationDepth = sphereRadius - L;

Modified: trunk/pkg/dem/Engine/EngineUnit/InteractingFacet2InteractingSphere4SpheresContactGeometry.hpp
===================================================================
--- trunk/pkg/dem/Engine/EngineUnit/InteractingFacet2InteractingSphere4SpheresContactGeometry.hpp	2008-09-23 07:51:55 UTC (rev 1523)
+++ trunk/pkg/dem/Engine/EngineUnit/InteractingFacet2InteractingSphere4SpheresContactGeometry.hpp	2008-09-23 13:44:55 UTC (rev 1524)
@@ -35,7 +35,14 @@
 
 	DEFINE_FUNCTOR_ORDER_2D(InteractingFacet,InteractingSphere);
 
-	Real shrinkFactor;
+	// The radius of the inscribed circle of the facet is decreases by the
+	// value of the sphere's radius multipled by shrinkFactor. So, at
+	// definition of a contact point on the surface made of facets, the given
+	// surface is not continuous and is similar to a surface covered with a
+	// tile, with a gap between the separate tiles equal to the sphere's radius
+	// multiplied by 2*shrinkFactor. By default shrinkFactor=0.
+	Real shrinkFactor; 
+
 	bool hasShear;
 	
 	protected :

Modified: trunk/scripts/exact-rot-facet.py
===================================================================
--- trunk/scripts/exact-rot-facet.py	2008-09-23 07:51:55 UTC (rev 1523)
+++ trunk/scripts/exact-rot-facet.py	2008-09-23 13:44:55 UTC (rev 1524)
@@ -20,7 +20,7 @@
 	StandAloneEngine('PersistentSAPCollider'),
 	MetaEngine('InteractionGeometryMetaEngine',[
 		EngineUnit('InteractingSphere2InteractingSphere4SpheresContactGeometry',{'hasShear':True,'interactionDetectionFactor':1.4}),
-		EngineUnit('InteractingFacet2InteractingSphere4SpheresContactGeometry',{'hasShear':True,'shrinkFactor':1.}),
+		EngineUnit('InteractingFacet2InteractingSphere4SpheresContactGeometry',{'hasShear':True,'shrinkFactor':0.}),
 	]),
 	MetaEngine('InteractionPhysicsMetaEngine',[EngineUnit('SimpleElasticRelationships')]),
 	StandAloneEngine('ElasticContactLaw'),