← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2119: some updates of capillary files. Rk: all must be tested!

 

------------------------------------------------------------
revno: 2119
committer: Luc Scholtes <sch50p@fluent-ph>
branch nick: trunk
timestamp: Wed 2010-03-31 10:06:48 +1000
message:
  some updates of capillary files. Rk: all must be tested!
renamed:
  pkg/dem/DataClass/InteractionPhysics/CapillaryParameters.cpp => pkg/dem/DataClass/InteractionPhysics/CapillaryPhys.cpp
  pkg/dem/DataClass/InteractionPhysics/CapillaryParameters.hpp => pkg/dem/DataClass/InteractionPhysics/CapillaryPhys.hpp
  pkg/dem/Engine/Functor/Ip2_Frictmat_FrictMat_CapillaryLawPhys.cpp => pkg/dem/Engine/Functor/Ip2_FrictMat_FrictMat_CapillaryPhys.cpp
  pkg/dem/Engine/Functor/Ip2_Frictmat_FrictMat_CapillaryLawPhys.hpp => pkg/dem/Engine/Functor/Ip2_FrictMat_FrictMat_CapillaryPhys.hpp
  pkg/dem/Engine/GlobalEngine/CapillaryLaw.cpp => pkg/dem/Engine/GlobalEngine/Law2_ScGeom_CapillaryPhys_Capillarity.cpp
  pkg/dem/Engine/GlobalEngine/CapillaryLaw.hpp => pkg/dem/Engine/GlobalEngine/Law2_ScGeom_CapillaryPhys_Capillarity.hpp
modified:
  pkg/dem/Engine/PartialEngine/CapillaryPressureEngine.cpp
  pkg/dem/Engine/PartialEngine/CapillaryPressureEngine.hpp
  pkg/dem/Engine/PartialEngine/CapillaryStressRecorder.cpp
  pkg/dem/Engine/PartialEngine/SampleCapillaryPressureEngine.cpp
  pkg/dem/Engine/PartialEngine/SampleCapillaryPressureEngine.hpp
  pkg/dem/PreProcessor/TriaxialTestWater.cpp
  py/system.py
  pkg/dem/DataClass/InteractionPhysics/CapillaryPhys.cpp
  pkg/dem/DataClass/InteractionPhysics/CapillaryPhys.hpp
  pkg/dem/Engine/Functor/Ip2_FrictMat_FrictMat_CapillaryPhys.cpp
  pkg/dem/Engine/Functor/Ip2_FrictMat_FrictMat_CapillaryPhys.hpp
  pkg/dem/Engine/GlobalEngine/Law2_ScGeom_CapillaryPhys_Capillarity.cpp
  pkg/dem/Engine/GlobalEngine/Law2_ScGeom_CapillaryPhys_Capillarity.hpp


--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription.
=== renamed file 'pkg/dem/DataClass/InteractionPhysics/CapillaryParameters.cpp' => 'pkg/dem/DataClass/InteractionPhysics/CapillaryPhys.cpp'
--- pkg/dem/DataClass/InteractionPhysics/CapillaryParameters.cpp	2010-03-25 01:16:17 +0000
+++ pkg/dem/DataClass/InteractionPhysics/CapillaryPhys.cpp	2010-03-31 00:06:48 +0000
@@ -1,23 +1,8 @@
-#include <yade/pkg-dem/CapillaryParameters.hpp>
-
-// CapillaryParameters::CapillaryParameters()
-// {
-// 	meniscus = false;
-// 	Vmeniscus = 0;
-// 	CapillaryPressure = 0;
-// 	Fcap = Vector3r(0,0,0);
-// 	Delta1 = 0;
-// 	Delta2 = 0;
-// 	fusionNumber = 0;
-// 	currentIndexes[0]=0;
-// 	currentIndexes[1]=0;
-// 	currentIndexes[2]=0;
-// 	currentIndexes[3]=0;
-// }
-
-CapillaryParameters::~CapillaryParameters()
+#include <yade/pkg-dem/CapillaryPhys.hpp>
+
+CapillaryPhys::~CapillaryPhys()
 {
 }
 
-YADE_PLUGIN((CapillaryParameters));
+YADE_PLUGIN((CapillaryPhys));
 

=== renamed file 'pkg/dem/DataClass/InteractionPhysics/CapillaryParameters.hpp' => 'pkg/dem/DataClass/InteractionPhysics/CapillaryPhys.hpp'
--- pkg/dem/DataClass/InteractionPhysics/CapillaryParameters.hpp	2010-03-30 04:55:22 +0000
+++ pkg/dem/DataClass/InteractionPhysics/CapillaryPhys.hpp	2010-03-31 00:06:48 +0000
@@ -8,14 +8,14 @@
 #pragma once
 #include<yade/pkg-dem/FrictPhys.hpp>
 
-class CapillaryParameters : public FrictPhys
+class CapillaryPhys : public FrictPhys
 {
 	public :
 		int currentIndexes [4]; // used for faster interpolation (stores previous positions in tables)
 		
-		virtual ~CapillaryParameters();
+		virtual ~CapillaryPhys();
 
-	YADE_CLASS_BASE_DOC_ATTRS_CTOR(CapillaryParameters,FrictPhys,"Physics (of interaction) for CapillaryLaw. Rk: deprecated -> needs some work to be conform to the new formalism!",
+	YADE_CLASS_BASE_DOC_ATTRS_CTOR(CapillaryPhys,FrictPhys,"Physics (of interaction) for Law2_ScGeom_CapillaryPhys_Capillarity. Rk: deprecated -> needs some work to be conform with the new formalism!",
 				 ((bool,meniscus,false,"Presence of a meniscus if true"))
 				 ((Real,CapillaryPressure,0.,"Value of the capillary pressure Uc defines as Ugas-Uliquid"))
 				 ((Real,Vmeniscus,0.,"Volume of the menicus"))
@@ -25,30 +25,10 @@
 				 ((short int,fusionNumber,0.,"Indicates the number of meniscii that overlap with this one"))
 				 ,createIndex();currentIndexes[0]=currentIndexes[1]=currentIndexes[2]=currentIndexes[3]=0;
 				 );
-	REGISTER_CLASS_INDEX(CapillaryParameters,FrictPhys);
+	REGISTER_CLASS_INDEX(CapillaryPhys,FrictPhys);
 };
-REGISTER_SERIALIZABLE(CapillaryParameters);
-
-// class CapillaryParameters : public FrictPhys
-// {
-// 	public :	Real	 Vmeniscus
-// 				,CapillaryPressure
-// 				,Delta1
-// 				,Delta2;
-// 				
-// 		Vector3r	Fcap;
-// 						
-// 		bool 		meniscus;
-// 		short int	fusionNumber;//number of meniscii that are overlaping with this one
-// 		int		currentIndexes [4];// used for faster interpolation (stores previous positions in tables)
-// 				
-// 		CapillaryParameters();
-// 		virtual ~CapillaryParameters();
-// 	REGISTER_ATTRIBUTES(FrictPhys,(Vmeniscus)(CapillaryPressure)(Fcap)(Delta1)(Delta2)(meniscus)(fusionNumber));
-// 	REGISTER_CLASS_NAME(CapillaryParameters);
-// 	REGISTER_BASE_CLASS_NAME(FrictPhys);
-// };
-// 
-// REGISTER_SERIALIZABLE(CapillaryParameters);
+REGISTER_SERIALIZABLE(CapillaryPhys);
+
+
 
 

=== renamed file 'pkg/dem/Engine/Functor/Ip2_Frictmat_FrictMat_CapillaryLawPhys.cpp' => 'pkg/dem/Engine/Functor/Ip2_FrictMat_FrictMat_CapillaryPhys.cpp'
--- pkg/dem/Engine/Functor/Ip2_Frictmat_FrictMat_CapillaryLawPhys.cpp	2010-03-30 04:55:22 +0000
+++ pkg/dem/Engine/Functor/Ip2_FrictMat_FrictMat_CapillaryPhys.cpp	2010-03-31 00:06:48 +0000
@@ -6,17 +6,17 @@
 *  GNU General Public License v2 or later. See file LICENSE for details. *
 *************************************************************************/
 
-#include"Ip2_Frictmat_FrictMat_CapillaryLawPhys.hpp"
+#include"Ip2_FrictMat_FrictMat_CapillaryPhys.hpp"
 #include<yade/pkg-dem/ScGeom.hpp>
-#include <yade/pkg-dem/CapillaryParameters.hpp>
+#include <yade/pkg-dem/CapillaryPhys.hpp>
 #include<yade/pkg-dem/FrictPhys.hpp>
 #include<yade/pkg-common/ElastMat.hpp>
 #include<yade/core/Omega.hpp>
 #include<yade/core/Scene.hpp>
 
-YADE_PLUGIN((Ip2_Frictmat_FrictMat_CapillaryLawPhys));
+YADE_PLUGIN((Ip2_FrictMat_FrictMat_CapillaryPhys));
 
-void Ip2_Frictmat_FrictMat_CapillaryLawPhys::go( const shared_ptr<Material>& b1 //FrictMat
+void Ip2_FrictMat_FrictMat_CapillaryPhys::go( const shared_ptr<Material>& b1 //FrictMat
 					, const shared_ptr<Material>& b2 // FrictMat
 					, const shared_ptr<Interaction>& interaction)
 {
@@ -35,9 +35,9 @@
  			const shared_ptr<FrictMat>& sdec1 = YADE_PTR_CAST<FrictMat>(b1);
  			const shared_ptr<FrictMat>& sdec2 = YADE_PTR_CAST<FrictMat>(b2);
 			
- 			if (!interaction->interactionPhysics) interaction->interactionPhysics = shared_ptr<CapillaryParameters>(new CapillaryParameters());
-//			interaction->interactionPhysics = shared_ptr<CapillaryParameters>(new CapillaryParameters());
-			const shared_ptr<CapillaryParameters>& contactPhysics = YADE_PTR_CAST<CapillaryParameters>(interaction->interactionPhysics);
+ 			if (!interaction->interactionPhysics) interaction->interactionPhysics = shared_ptr<CapillaryPhys>(new CapillaryPhys());
+//			interaction->interactionPhysics = shared_ptr<CapillaryPhys>(new CapillaryPhys());
+			const shared_ptr<CapillaryPhys>& contactPhysics = YADE_PTR_CAST<CapillaryPhys>(interaction->interactionPhysics);
 
 			Real Ea 	= sdec1->young;
 			Real Eb 	= sdec2->young;

=== renamed file 'pkg/dem/Engine/Functor/Ip2_Frictmat_FrictMat_CapillaryLawPhys.hpp' => 'pkg/dem/Engine/Functor/Ip2_FrictMat_FrictMat_CapillaryPhys.hpp'
--- pkg/dem/Engine/Functor/Ip2_Frictmat_FrictMat_CapillaryLawPhys.hpp	2010-03-30 04:55:22 +0000
+++ pkg/dem/Engine/Functor/Ip2_FrictMat_FrictMat_CapillaryPhys.hpp	2010-03-31 00:06:48 +0000
@@ -10,7 +10,7 @@
 
 #include<yade/pkg-common/InteractionPhysicsFunctor.hpp>
 
-class Ip2_Frictmat_FrictMat_CapillaryLawPhys : public InteractionPhysicsFunctor
+class Ip2_FrictMat_FrictMat_CapillaryPhys : public InteractionPhysicsFunctor
 {
 	public :
 		virtual void go(	const shared_ptr<Material>& b1,
@@ -18,10 +18,10 @@
 					const shared_ptr<Interaction>& interaction);
 
 	FUNCTOR2D(FrictMat,FrictMat);
-	YADE_CLASS_BASE_DOC_ATTRS_CTOR(Ip2_Frictmat_FrictMat_CapillaryLawPhys,InteractionPhysicsFunctor, "RelationShips to use with CapillaryLaw\n\n In these RelationShips all the interaction attributes are computed. \n\n.. warning::\n\tas in the others :yref:`Ip2 functors<InteractionPhysicsFunctor>`, most of the attributes are computed only once, when the interaction is new.",,;);
+	YADE_CLASS_BASE_DOC_ATTRS_CTOR(Ip2_FrictMat_FrictMat_CapillaryPhys,InteractionPhysicsFunctor, "RelationShips to use with Law2_ScGeom_CapillaryPhys_Capillarity\n\n In these RelationShips all the interaction attributes are computed. \n\n.. warning::\n\tas in the others :yref:`Ip2 functors<InteractionPhysicsFunctor>`, most of the attributes are computed only once, when the interaction is new.",,;);
 	
 };
-REGISTER_SERIALIZABLE(Ip2_Frictmat_FrictMat_CapillaryLawPhys);
+REGISTER_SERIALIZABLE(Ip2_FrictMat_FrictMat_CapillaryPhys);
 
 
 

=== renamed file 'pkg/dem/Engine/GlobalEngine/CapillaryLaw.cpp' => 'pkg/dem/Engine/GlobalEngine/Law2_ScGeom_CapillaryPhys_Capillarity.cpp'
--- pkg/dem/Engine/GlobalEngine/CapillaryLaw.cpp	2010-03-30 04:55:22 +0000
+++ pkg/dem/Engine/GlobalEngine/Law2_ScGeom_CapillaryPhys_Capillarity.cpp	2010-03-31 00:06:48 +0000
@@ -7,15 +7,15 @@
 *************************************************************************/
 
 //Modifs : Parameters renamed as MeniscusParameters
-//id1/id2 classés pour que id1 soit toujours le plus petit grain, FIXME : angle de mouillage?
-//FIXME : dans triaxialStressController, changer le test de nullité de la force dans updateStiffness
+//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 "CapillaryLaw.hpp"
+#include "Law2_ScGeom_CapillaryPhys_Capillarity.hpp"
 #include <yade/pkg-common/ElastMat.hpp>
 #include <yade/pkg-dem/ScGeom.hpp>
 
-#include <yade/pkg-dem/CapillaryParameters.hpp>
+#include <yade/pkg-dem/CapillaryPhys.hpp>
 #include <yade/core/Omega.hpp>
 #include <yade/core/Scene.hpp>
 #include <yade/lib-base/Math.hpp>
@@ -24,11 +24,11 @@
 #include <iostream>
 #include <fstream>
 
-YADE_PLUGIN((CapillaryLaw));
+YADE_PLUGIN((Law2_ScGeom_CapillaryPhys_Capillarity));
 
 using namespace std;
 
-// CapillaryLaw::CapillaryLaw() : GlobalEngine()
+// Law2_ScGeom_CapillaryPhys_Capillarity::Law2_ScGeom_CapillaryPhys_Capillarity() : GlobalEngine()
 // {
 //         sdecGroupMask=1;
 // 
@@ -40,7 +40,7 @@
 // 
 // }
 
-void CapillaryLaw::postProcessAttributes(bool deserializing){
+void Law2_ScGeom_CapillaryPhys_Capillarity::postProcessAttributes(bool deserializing){
   if(!deserializing) return;
 
   capillary = shared_ptr<capillarylaw>(new capillarylaw); // ????????
@@ -78,23 +78,20 @@
 
 
 //FIXME : remove bool first !!!!!
-void CapillaryLaw::action()
+void Law2_ScGeom_CapillaryPhys_Capillarity::action()
 {
 //	cerr << "capillaryLawAction" << endl;
         //compteur1 = 0;
         //compteur2 = 0;
-        //cerr << "CapillaryLaw::action" << endl;
+        //cerr << "Law2_ScGeom_CapillaryPhys_Capillarity::action" << endl;
 
-//         Scene * scene = static_cast<Scene*>(body);
         shared_ptr<BodyContainer>& bodies = scene->bodies;
 
         if (fusionDetection) {
-                if (!bodiesMenisciiList.initialized)
-                        bodiesMenisciiList.prepare(scene);
+                if (!bodiesMenisciiList.initialized) bodiesMenisciiList.prepare(scene);
                 //bodiesMenisciiList.display();
         }
 
-
         /// Non Permanents Links ///
 
         InteractionContainer::iterator ii    = scene->interactions->begin();
@@ -111,45 +108,31 @@
                         unsigned int id1 = interaction->getId1();
                         unsigned int id2 = interaction->getId2();
 			
-			if( !( (*bodies)[id1]->getGroupMask() & (*bodies)[id2]->getGroupMask() & sdecGroupMask)  )
-                                continue; // skip other groups, BTW: this is example of a good usage of 'continue' keyword
+			if( !( (*bodies)[id1]->getGroupMask() & (*bodies)[id2]->getGroupMask() & sdecGroupMask)  ) continue; // skip other groups, BTW: this is example of a good usage of 'continue' keyword
 			
-                        /// interaction geometry search
+                        /// 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(); // !!!
-                        //cerr << "geo1 =" << geometryIndex1 << endl;
                         int geometryIndex2 = (*bodies)[id2]->shape->getClassIndex();
-                        //cerr << "geo2 =" << geometryIndex2 << endl;
-
-                        if (!(geometryIndex1 == geometryIndex2))
-                                continue;
-
-                        /// definition of interacting objects (not in contact)
-
-//                         BodyMacroParameters* de1 		=
-//                                 static_cast<BodyMacroParameters*>((*bodies)[id1]->physicalParameters.get());
-//                         BodyMacroParameters* de2 		=
-//                                 static_cast<BodyMacroParameters*>((*bodies)[id2]->physicalParameters.get());
-			
+
+                        if (!(geometryIndex1 == geometryIndex2)) continue;
+
+                        /// definition of interacting objects (not necessarily in contact)
+	
 			Body* b1 = (*bodies)[id1].get();
 			Body* b2 = (*bodies)[id2].get();
 
-                        ScGeom* currentContactGeometry 	=
-                                static_cast<ScGeom*>(interaction->interactionGeometry.get());
-
-                        CapillaryParameters* currentContactPhysics 	=
-                                static_cast<CapillaryParameters*>(interaction->interactionPhysics.get());
+                        ScGeom* currentContactGeometry = static_cast<ScGeom*>(interaction->interactionGeometry.get());
+                        CapillaryPhys* currentContactPhysics = static_cast<CapillaryPhys*>(interaction->interactionPhysics.get());
 
                         /// Capillary components definition:
 
-                        Real liquidTension = 0.073; 	// superficial water tension N/m (20�C)
-
-                        //Real teta = 0;		// mouillage parfait (eau pure/billes de verre)
+                        Real liquidTension = 0.073; 	// superficial water tension N/m (0.073 is water tension at 20 Celsius degrees)
+                        //Real teta = 0;		// perfect wetting (as in the case of pure water and glass beads)
 
                         /// Interacting Grains:
-                        // definition du rapport tailleReelle/TailleYADE
-
-                        Real alpha=1; // OK si pas de gravite!!!
-
+                        // If you want to define a ratio between YADE sphere size and real sphere size (Rk: OK if no gravity is accounted for)
+                        Real alpha=1; 
+			
                         Real R1 = 0;
                         R1=alpha*std::min(currentContactGeometry->radius2,currentContactGeometry->radius1 ) ;
                         Real R2 = 0;
@@ -158,79 +141,58 @@
 
                         /// intergranular distance
 
-                        Real D = alpha*(b2->state->pos-b1->state->pos).Length()-alpha*(                       currentContactGeometry->radius1+ currentContactGeometry->radius2);
-
-// 			Real intergranularDistance = currentContactGeometry->penetrationDepth;
-			//cerr << "D = " << intergranularDistance << endl;
+                        Real D = alpha*(b2->state->pos-b1->state->pos).Length()-alpha*(currentContactGeometry->radius1+ currentContactGeometry->radius2); // scGeom->penetrationDepth could probably be used here?
 
                         if ((currentContactGeometry->penetrationDepth>=0)||(D<=0)) //||(Omega::instance().getCurrentIteration() < 1) ) // a simplified way to define meniscii everywhere
 			{
-                                D=0;
-				//intergranularDistance = 0;	// def Fcap when spheres interpenetrate//FIXME : lead to wrong interpolation? D<0 has no solution in the interpolation : this is not physically interpretable!! even if, interpenetration << grain radius.
-                                if (fusionDetection && !currentContactPhysics->meniscus)                   bodiesMenisciiList.insert((*ii));
+                                D=0; // defines Fcap when spheres interpenetrate //FIXME : 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 (fusionDetection && !currentContactPhysics->meniscus) bodiesMenisciiList.insert((*ii));
                                 currentContactPhysics->meniscus=true;
                         }
 
-			//currentContactPhysics->meniscus=true; /// a way to create menisci everywhere			
-
-                        //Real Dinterpol = -(intergranularDistance)/R2;
 			Real Dinterpol = D/R2;
+			
+			//currentContactPhysics->meniscus=true; /// a way to create menisci everywhere	
 
                         /// Suction (Capillary pressure):
 
                         Real Pinterpol =CapillaryPressure*(R2/liquidTension);
                         currentContactPhysics->CapillaryPressure = CapillaryPressure;
 
-                        //Real r = R2/R1;
-
                         /// Capillary solution finder:
                         //cerr << "solution finder " << endl;
 
                         if ((Pinterpol>=0) && (currentContactPhysics->meniscus==true)) 
 			{	//cerr << "Pinterpol = "<< Pinterpol << endl;
-
                                 MeniscusParameters
                                 solution(capillary->Interpolate(R1,R2,Dinterpol, Pinterpol, currentContactPhysics->currentIndexes));
 
                                 /// capillary adhesion force
 
                                 Real Finterpol = solution.F;
-                                Vector3r Fcap =
-                                        Finterpol*(2*Mathr::PI*(R2/alpha)*liquidTension)*currentContactGeometry->
-                                        normal; /// unites !!!
+                                Vector3r Fcap = Finterpol*(2*Mathr::PI*(R2/alpha)*liquidTension)*currentContactGeometry->normal; /// unit !!!
 
                                 currentContactPhysics->Fcap = Fcap;
 
                                 /// meniscus volume
 
                                 Real Vinterpol = solution.V;
-                                currentContactPhysics->Vmeniscus =                                       Vinterpol*(R2*R2*R2)/(alpha*alpha*alpha);
+                                currentContactPhysics->Vmeniscus = Vinterpol*(R2*R2*R2)/(alpha*alpha*alpha);
 
-                                if (currentContactPhysics->Vmeniscus != 0) {
-                                        currentContactPhysics->meniscus = true;
-                                        //cerr <<"currentContactPhysics->meniscus = true;"<<endl;
+                                if (currentContactPhysics->Vmeniscus != 0) { 
+					currentContactPhysics->meniscus = true; 
+					//cerr <<"currentContactPhysics->meniscus = true;"<<endl;
                                 } else {
-                                        if (fusionDetection)
-                                                bodiesMenisciiList.remove((*ii));
-                                        currentContactPhysics->meniscus = false;
+					if (fusionDetection) bodiesMenisciiList.remove((*ii));
+					currentContactPhysics->meniscus = false;
 					scene->interactions->requestErase(id1,id2);
-                                        //cerr <<"currentContactPhysics->meniscus = false;"<<endl;
+					//cerr <<"currentContactPhysics->meniscus = false;"<<endl;
                                 }
 
                                 /// wetting angles
-                                /// wetting angles
                                 currentContactPhysics->Delta1 = max(solution.delta1,solution.delta2);
                                 currentContactPhysics->Delta2 = min(solution.delta1,solution.delta2);
 
-//                                 if (currentContactGeometry->radius2 > currentContactGeometry->radius1)
-// 				{
-//                                         currentContactPhysics->Delta1 = solution.delta1;
-//                                         currentContactPhysics->Delta2 = solution.delta2;
-//                                 } else {
-//                                         currentContactPhysics->Delta1 = solution.delta2;
-//                                         currentContactPhysics->Delta2 = solution.delta1;
-//                                 }
-
                                 currentContactPhysics->prevNormal = currentContactGeometry->normal;
 
                         } else if (fusionDetection)
@@ -239,14 +201,13 @@
 			bodiesMenisciiList.remove((*ii));//
         }
 
-        if (fusionDetection)
-                checkFusion();
+        if (fusionDetection) checkFusion();
 
         for(ii= scene->interactions->begin(); ii!=iiEnd ; ++ii ) 
 	{	//cerr << "interaction " << ii << endl;
                 if ((*ii)->isReal()) 
 		{
-                        CapillaryParameters* currentContactPhysics	=	static_cast<CapillaryParameters*>((*ii)->interactionPhysics.get());
+                        CapillaryPhys* currentContactPhysics	=	static_cast<CapillaryPhys*>((*ii)->interactionPhysics.get());
                         if (currentContactPhysics->meniscus) 
 			{
                                 if (fusionDetection) 
@@ -264,18 +225,15 @@
 					else if (currentContactPhysics->fusionNumber !=0)
 						currentContactPhysics->Fcap /= (currentContactPhysics->fusionNumber+1);
                                 }
-											scene->forces.addForce((*ii)->getId1(), currentContactPhysics->Fcap);
-											scene->forces.addForce((*ii)->getId2(),-currentContactPhysics->Fcap);
-
-				//cerr << "id1/id2 " << (*ii)->getId1() << "/" << (*ii)->getId2() << " Fcap= " << currentContactPhysics->Fcap << endl;
-
+			scene->forces.addForce((*ii)->getId1(), currentContactPhysics->Fcap);
+			scene->forces.addForce((*ii)->getId2(),-currentContactPhysics->Fcap);
+			//cerr << "id1/id2 " << (*ii)->getId1() << "/" << (*ii)->getId2() << " Fcap= " << currentContactPhysics->Fcap << endl;
+			
                         }
-					 }
+		}
         }
 
-
-        //if (fusionDetection)
-                //bodiesMenisciiList.display();
+        //if (fusionDetection) bodiesMenisciiList.display();
         //cerr << "end of capillarylaw" << endl;
 }
 
@@ -288,14 +246,12 @@
 
 }
 
-void CapillaryLaw::checkFusion()
+void Law2_ScGeom_CapillaryPhys_Capillarity::checkFusion()
 {
-
 	//Reset fusion numbers
 	InteractionContainer::iterator ii    = scene->interactions->begin();
         InteractionContainer::iterator iiEnd = scene->interactions->end();
-        for( ; ii!=iiEnd ; ++ii ) if ((*ii)->isReal()) static_cast<CapillaryParameters*>((*ii)->interactionPhysics.get())->fusionNumber=0;
-	
+        for( ; ii!=iiEnd ; ++ii ) if ((*ii)->isReal()) static_cast<CapillaryPhys*>((*ii)->interactionPhysics.get())->fusionNumber=0;
 	
 	list< shared_ptr<Interaction> >::iterator firstMeniscus, lastMeniscus, currentMeniscus;
 	Real angle1, angle2;
@@ -309,14 +265,14 @@
 			for ( firstMeniscus=bodiesMenisciiList[i].begin(); firstMeniscus!=lastMeniscus; ++firstMeniscus )//FOR EACH MENISCUS ON THIS BODY...
 			{
 				//if (*firstMeniscus)->isReal();
-				CapillaryParameters* interactionPhysics1 = YADE_CAST<CapillaryParameters*>((*firstMeniscus)->interactionPhysics.get());
+				CapillaryPhys* interactionPhysics1 = YADE_CAST<CapillaryPhys*>((*firstMeniscus)->interactionPhysics.get());
 				currentMeniscus = firstMeniscus; ++currentMeniscus;
 				
 				if (i == (*firstMeniscus)->getId1()) angle1=interactionPhysics1->Delta1;//get angle of meniscus1 on body i
 				else angle1=interactionPhysics1->Delta2;
 
 				for ( ;currentMeniscus!= lastMeniscus; ++currentMeniscus) {//... CHECK FUSION WITH ALL OTHER MENISCII ON THE BODY
-					CapillaryParameters* interactionPhysics2 = YADE_CAST<CapillaryParameters*>((*currentMeniscus)->interactionPhysics.get());
+					CapillaryPhys* interactionPhysics2 = YADE_CAST<CapillaryPhys*>((*currentMeniscus)->interactionPhysics.get());
 
 					if (i == (*currentMeniscus)->getId1()) angle2=interactionPhysics2->Delta1;//get angle of meniscus2 on body i
 					else angle2=interactionPhysics2->Delta2;
@@ -389,9 +345,7 @@
                 Real data_R = data_complete[i].R;
                 //cerr << "i = " << i << endl;
 
-                if (data_R > R)	// Attention � l'ordre ds lequel
-                        //vont �tre rang�s les tableau R (croissant)
-
+                if (data_R > R)	// Attention a l'ordre ds lequel vont etre ranges les tableau R (croissant)
                 {
                         Tableau& tab_inf=data_complete[i-1];
                         Tableau& tab_sup=data_complete[i];
@@ -445,7 +399,7 @@
         for (int i=0; i<n_D; i++)
                 full_data.push_back(TableauD(file));
         file.close();
-        //cerr << *this;	// exemple d'utilisation de la fonction d'�criture (this est le pointeur vers l'objet courant)
+        //cerr << *this;	// exemple d'utilisation de la fonction d'ecriture (this est le pointeur vers l'objet courant)
 }
 
 Tableau::~Tableau()
@@ -487,10 +441,9 @@
 }
 
 TableauD::TableauD()
-{} // ?? constructeur
+{} 
 
 TableauD::TableauD(ifstream& file)
-
 {
         int i=0;
         Real x;
@@ -513,7 +466,6 @@
 }
 
 MeniscusParameters TableauD::Interpolate3(Real P, int& index)
-
 {	//cerr << "interpolate3" << endl;
         MeniscusParameters result;
         int dataSize = data.size();
@@ -587,7 +539,7 @@
 }
 
 TableauD::~TableauD()
-{} // ?? destructeur
+{}
 
 std::ostream& operator<<(std::ostream& os, Tableau& T)
 {
@@ -633,7 +585,7 @@
         InteractionContainer::iterator iiEnd = scene->interactions->end();
         for(  ; ii!=iiEnd ; ++ii ) {
                 if ((*ii)->isReal()) {
-                	if (static_cast<CapillaryParameters*>((*ii)->interactionPhysics.get())->meniscus) insert(*ii);
+                	if (static_cast<CapillaryPhys*>((*ii)->interactionPhysics.get())->meniscus) insert(*ii);
                 }
         }
                 	

=== renamed file 'pkg/dem/Engine/GlobalEngine/CapillaryLaw.hpp' => 'pkg/dem/Engine/GlobalEngine/Law2_ScGeom_CapillaryPhys_Capillarity.hpp'
--- pkg/dem/Engine/GlobalEngine/CapillaryLaw.hpp	2010-03-30 04:55:22 +0000
+++ pkg/dem/Engine/GlobalEngine/Law2_ScGeom_CapillaryPhys_Capillarity.hpp	2010-03-31 00:06:48 +0000
@@ -1,5 +1,5 @@
 //
-// C++ Interface: CapillaryLaw
+// C++ Interface: Law2_ScGeom_CapillaryPhys_Capillarity
 /*************************************************************************
 *  Copyright (C) 2006 by luc Scholtes                                    *
 *  luc.scholtes@xxxxxxxxxxx                                              *
@@ -14,7 +14,6 @@
 #include <set>
 #include <boost/tuple/tuple.hpp>
 
-// ajouts
 #include <vector>
 #include <list>
 #include <utility>
@@ -23,13 +22,13 @@
 #include <string>
 
 /**
-This law allows to take into account capillary cohesion between spheres as a result of interparticular liquid bridges (menisci).
+This law allows to take into account capillary forces/effects between spheres coming from the presence of interparticular liquid bridges (menisci).
 refs:
 - (french, lot of documentation) L. Scholtes, PhD thesis -> http://tel.archives-ouvertes.fr/tel-00363961/en/
 - (english, less...) L. Scholtes et al. Micromechanics of granular materials with capillary effects. International Journal of Engineering Science 2009,(47)1, 64-75 
 
-The law needs ascii files M(r=i) with i=R1/R2 to work (see in yade/extra/capillaryFiles). They contain a set of results from the resolution of the Laplace-Young equation for different configurations of the interacting geometry
-The control parameter is the capillary pressure (or suction) Delta_u = u_gas - u_liquid
+The law needs ascii files M(r=i) with i=R1/R2 to work (see in yade/extra/capillaryFiles). They contain a set of results from the resolution of the Laplace-Young equation for different configurations of the interacting geometry and must be placed in the bin directory (where yade exec file is situated) to be taken into account.
+The control parameter is the capillary pressure (or suction) Delta_u, defined as the difference between gas and liquid pressure: Delta_u = u_gas - u_liquid
 Liquid bridges properties (volume V, extent over interacting grains delta1 and delta2) are computed as a result of Delta_u and the interacting geometry (spheres radii and interparticular distance)
 
 Rk: - the formulation is valid only for pendular menisci involving two grains (pendular regime).
@@ -39,7 +38,7 @@
 
 /// !!! This version is deprecated. It should be updated to the new formalism -> ToDo !!!
 
-/// a class to store meniscus parameters -> Rk: is it really needed since CapillaryParameters exist?
+/// a class to store meniscus parameters -> Rk: is it really needed since CapillaryPhys exist?
 class MeniscusParameters
 {
 public :
@@ -84,27 +83,7 @@
 };
 
 /// This is the constitutive law
-// class CapillaryLaw : public InteractionSolver
-// {
-// 	public :
-// 		int sdecGroupMask;
-// 		Real CapillaryPressure;
-// 		bool fusionDetection;//If yes, a BodiesMenisciiList is maintained and updated at each time step
-// 		bool binaryFusion;//if true, capillary forces are set to zero as soon as 1 fusion at least is detected
-// 		void checkFusion(Scene * ncb);
-// 		shared_ptr<capillarylaw> capillary;
-// 		BodiesMenisciiList bodiesMenisciiList;
-// 						
-// 		CapillaryLaw();
-// 		void action(Scene * ncb);
-// 		REGISTER_ATTRIBUTES(InteractionSolver,(sdecGroupMask)(CapillaryPressure)(fusionDetection)(binaryFusion));
-// 		virtual void postProcessAttributes(bool deserializing);
-// 	REGISTER_CLASS_NAME(CapillaryLaw);
-// 	REGISTER_BASE_CLASS_NAME(InteractionSolver);
-// 
-// };
-
-class CapillaryLaw : public GlobalEngine
+class Law2_ScGeom_CapillaryPhys_Capillarity : public GlobalEngine
 {
 	public :
 		void checkFusion();
@@ -114,9 +93,9 @@
 		void action();
 		virtual void postProcessAttributes(bool deserializing);
 		
-	YADE_CLASS_BASE_DOC_ATTRS(CapillaryLaw,GlobalEngine,"Rk: deprecated -> needs some work to be conform to the new formalism! This law allows to take into account capillary cohesion between spheres as a result of interparticular liquid bridges (menisci). refs: 1- infrench, (lot of documentation) L. Scholtes, PhD thesis -> http://tel.archives-ouvertes.fr/tel-00363961/en/ - 2 in english (less documentation) L. Scholtes et al. Micromechanics of granular materials with capillary effects. International Journal of Engineering Science 2009,(47)1, 64-75. The law needs ascii files M(r=i) with i=R1/R2 to work (see in yade/extra/capillaryFiles). They contain a set of results from the resolution of the Laplace-Young equation for different configurations of the interacting geometry. The control parameter is the capillary pressure (or suction) Uc = Cgas - Uliquid. Liquid bridges properties (volume V, extent over interacting grains delta1 and delta2) are computed as a result of the defined capillary pressure and of the interacting geometry (spheres radii and interparticular distance).",
+	YADE_CLASS_BASE_DOC_ATTRS(Law2_ScGeom_CapillaryPhys_Capillarity,GlobalEngine,"Rk: this engine is deprecated -> needs some work to be conform with the new formalism! This law allows to take into account capillary forces/effects between spheres coming from the presence of interparticular liquid bridges (menisci). refs: 1- infrench, (lot of documentation) L. Scholtes, PhD thesis -> http://tel.archives-ouvertes.fr/tel-00363961/en/ - 2 in english (less documentation) L. Scholtes et al. Micromechanics of granular materials with capillary effects. International Journal of Engineering Science 2009,(47)1, 64-75. The law needs ascii files M(r=i) with i=R1/R2 to work (see in yade/extra/capillaryFiles). These ASCII files contain a set of results from the resolution of the Laplace-Young equation for different configurations of the interacting geometry. The control parameter is the capillary pressure (or suction) Uc = Cgas - Uliquid. Liquid bridges properties (volume V, extent over interacting grains delta1 and delta2) are computed as a result of the defined capillary pressure and of the interacting geometry (spheres radii and interparticular distance).",
 				  ((int,sdecGroupMask,1,"? the interaction only considers particles with same mask ?"))
-				  ((Real,CapillaryPressure,0.,"Value of the capillary pressure Uc defines as Ugas-Uliquid"))
+				  ((Real,CapillaryPressure,0.,"Value of the capillary pressure Uc defines as Uc=Ugas-Uliquid"))
 				  ((bool,fusionDetection,false,"If true potential menisci overlaps are checked"))
 				  ((bool,binaryFusion,true,"If true, capillary forces are set to zero as soon as, at least, 1 overlap (menisci fusion) is detected"))
 				  );
@@ -163,7 +142,7 @@
 		void fill (const char* filename);
 };
 
-REGISTER_SERIALIZABLE(CapillaryLaw);
+REGISTER_SERIALIZABLE(Law2_ScGeom_CapillaryPhys_Capillarity);
 
 
 

=== modified file 'pkg/dem/Engine/PartialEngine/CapillaryPressureEngine.cpp'
--- pkg/dem/Engine/PartialEngine/CapillaryPressureEngine.cpp	2010-03-30 04:55:22 +0000
+++ pkg/dem/Engine/PartialEngine/CapillaryPressureEngine.cpp	2010-03-31 00:06:48 +0000
@@ -7,7 +7,7 @@
 *************************************************************************/
 
 #include "CapillaryPressureEngine.hpp"
-#include <yade/pkg-dem/CapillaryLaw.hpp>
+#include <yade/pkg-dem/Law2_ScGeom_CapillaryPhys_Capillarity.hpp>
 #include <yade/core/Scene.hpp>
 
 YADE_PLUGIN((CapillaryPressureEngine));

=== modified file 'pkg/dem/Engine/PartialEngine/CapillaryPressureEngine.hpp'
--- pkg/dem/Engine/PartialEngine/CapillaryPressureEngine.hpp	2010-03-30 04:55:22 +0000
+++ pkg/dem/Engine/PartialEngine/CapillaryPressureEngine.hpp	2010-03-31 00:06:48 +0000
@@ -11,18 +11,18 @@
 #include <yade/core/PartialEngine.hpp>
 #include <yade/lib-base/Math.hpp>
 
-class CapillaryLaw;
+class Law2_ScGeom_CapillaryPhys_Capillarity;
 
 class CapillaryPressureEngine : public PartialEngine
 {
 	public :
-		shared_ptr<CapillaryLaw>  capillaryCohesiveLaw;
-		//CapillaryLaw* capillaryCohesiveLaw; // which one is right?
+		shared_ptr<Law2_ScGeom_CapillaryPhys_Capillarity>  capillaryCohesiveLaw;
+		//Law2_ScGeom_CapillaryPhys_Capillarity* capillaryCohesiveLaw; // which one is right?
 		
 		void action();
 		virtual ~CapillaryPressureEngine();
 
-	YADE_CLASS_BASE_DOC_ATTRS_CTOR(CapillaryPressureEngine,PartialEngine,"Rk: this engine is deprecated and probably not very useful! It was designed to produce a variation of the capillary pressure (see CapillaryLaw).",
+	YADE_CLASS_BASE_DOC_ATTRS_CTOR(CapillaryPressureEngine,PartialEngine,"Rk: this engine is deprecated and probably not very useful! It was designed to produce a variation of the capillary pressure (see Law2_ScGeom_CapillaryPhys_Capillarity).",
 		((Real,Pressure,0.,"Initial value of the capillary pressure Uc = Ugas-Uliquid. [Pa]."))
 		((Real,PressureVariation,0.,"Variation of the capillary pressure (each iteration). [Pa]")),
 		;

=== modified file 'pkg/dem/Engine/PartialEngine/CapillaryStressRecorder.cpp'
--- pkg/dem/Engine/PartialEngine/CapillaryStressRecorder.cpp	2010-03-30 04:55:22 +0000
+++ pkg/dem/Engine/PartialEngine/CapillaryStressRecorder.cpp	2010-03-31 00:06:48 +0000
@@ -9,8 +9,8 @@
 #include "CapillaryStressRecorder.hpp"
 #include <yade/pkg-common/Sphere.hpp>
 #include <yade/pkg-common/ElastMat.hpp>
-#include <yade/pkg-dem/CapillaryParameters.hpp>
-#include <yade/pkg-dem/CapillaryLaw.hpp>
+#include <yade/pkg-dem/CapillaryPhys.hpp>
+#include <yade/pkg-dem/Law2_ScGeom_CapillaryPhys_Capillarity.hpp>
 #include <yade/pkg-dem/TriaxialCompressionEngine.hpp>
 
 #include <yade/core/Omega.hpp>
@@ -61,7 +61,7 @@
                 {	
                 	const shared_ptr<Interaction>& interaction = *ii;
                 
-                	CapillaryParameters* meniscusParameters = static_cast<CapillaryParameters*>(interaction->interactionPhysics.get());
+                	CapillaryPhys* meniscusParameters = static_cast<CapillaryPhys*>(interaction->interactionPhysics.get());
                         
                         if (meniscusParameters->meniscus)
                         {

=== modified file 'pkg/dem/Engine/PartialEngine/SampleCapillaryPressureEngine.cpp'
--- pkg/dem/Engine/PartialEngine/SampleCapillaryPressureEngine.cpp	2010-03-30 04:55:22 +0000
+++ pkg/dem/Engine/PartialEngine/SampleCapillaryPressureEngine.cpp	2010-03-31 00:06:48 +0000
@@ -7,7 +7,7 @@
 *************************************************************************/
 
 #include "SampleCapillaryPressureEngine.hpp"
-#include <yade/pkg-dem/CapillaryLaw.hpp>
+#include <yade/pkg-dem/Law2_ScGeom_CapillaryPhys_Capillarity.hpp>
 #include<yade/core/Scene.hpp>
 #include<yade/core/Omega.hpp>
 #include<yade/pkg-dem/FrictPhys.hpp>

=== modified file 'pkg/dem/Engine/PartialEngine/SampleCapillaryPressureEngine.hpp'
--- pkg/dem/Engine/PartialEngine/SampleCapillaryPressureEngine.hpp	2010-03-30 04:55:22 +0000
+++ pkg/dem/Engine/PartialEngine/SampleCapillaryPressureEngine.hpp	2010-03-31 00:06:48 +0000
@@ -16,7 +16,7 @@
 
 /*! \brief Isotropic compression + suction variation test */
 
-class CapillaryLaw;
+class Law2_ScGeom_CapillaryPhys_Capillarity;
 
 class SampleCapillaryPressureEngine : public TriaxialStressController
 {
@@ -27,15 +27,15 @@
 		//! is this the beginning of the simulation, after reading the scene?
 		bool firstRun;
 		
-		shared_ptr<CapillaryLaw>  capillaryCohesiveLaw;
-		//CapillaryLaw* capillaryCohesiveLaw; // which one is right?
+		shared_ptr<Law2_ScGeom_CapillaryPhys_Capillarity>  capillaryCohesiveLaw;
+		//Law2_ScGeom_CapillaryPhys_Capillarity* capillaryCohesiveLaw; // which one is right?
 		
 		virtual ~SampleCapillaryPressureEngine();
 		void updateParameters();
 		virtual void action();
 		
-	YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(SampleCapillaryPressureEngine,TriaxialStressController,"Rk: this engine has to be tested withthe new formalism. It produces the isotropic compaction of an assembly and allows to controlled the capillary pressure inside (uses CapillaryLaw).",
-		((Real,Pressure,0,"Value of the capillary pressure Uc=Ugas-Uliquid (see CapillaryLaw). [Pa]"))
+	YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(SampleCapillaryPressureEngine,TriaxialStressController,"Rk: this engine has to be tested withthe new formalism. It produces the isotropic compaction of an assembly and allows to controlled the capillary pressure inside (uses Law2_ScGeom_CapillaryPhys_Capillarity).",
+		((Real,Pressure,0,"Value of the capillary pressure Uc=Ugas-Uliquid (see Law2_ScGeom_CapillaryPhys_Capillarity). [Pa]"))
 		((bool,pressureVariationActivated,1,"Is the capillary pressure varying?"))
 		((bool,fusionDetection,1,"Is the detection of menisci overlapping activated?"))
 		((bool,binaryFusion,1,"If yes, capillary force are set to 0 when, at least, 1 overlap is detected for a meniscus. If no, capillary force is divided by the number of overlaps."))

=== modified file 'pkg/dem/PreProcessor/TriaxialTestWater.cpp'
--- pkg/dem/PreProcessor/TriaxialTestWater.cpp	2010-03-30 04:55:22 +0000
+++ pkg/dem/PreProcessor/TriaxialTestWater.cpp	2010-03-31 00:06:48 +0000
@@ -10,9 +10,9 @@
 #include "TriaxialTestWater.hpp"
 
 #include<yade/pkg-dem/ElasticContactLaw.hpp>
-#include <yade/pkg-dem/CapillaryLaw.hpp>
+#include <yade/pkg-dem/Law2_ScGeom_CapillaryPhys_Capillarity.hpp>
 // #include<yade/pkg-dem/Ip2_FrictMat_FrictMat_FrictPhys.hpp>
-#include<yade/pkg-dem/Ip2_Frictmat_FrictMat_CapillaryLawPhys.hpp>
+#include<yade/pkg-dem/Ip2_FrictMat_FrictMat_CapillaryPhys.hpp>
 #include<yade/pkg-common/ElastMat.hpp>
 #include<yade/pkg-dem/PositionOrientationRecorder.hpp>
 #include<yade/pkg-dem/GlobalStiffnessTimeStepper.hpp>
@@ -403,7 +403,7 @@
 	/// OLD
 	//interactionPhysicsDispatcher->add("BodyMacroParameters","BodyMacroParameters","MacroMicroElasticRelationshipsWater");
 	/// NEW
-	shared_ptr<InteractionPhysicsFunctor> ss(new Ip2_Frictmat_FrictMat_CapillaryLawPhys);
+	shared_ptr<InteractionPhysicsFunctor> ss(new Ip2_FrictMat_FrictMat_CapillaryPhys);
 	interactionPhysicsDispatcher->add(ss);
 	
 		
@@ -429,7 +429,7 @@
 	
 
 	// capillary
-	shared_ptr<CapillaryLaw> capillaryCohesiveLaw(new CapillaryLaw); 
+	shared_ptr<Law2_ScGeom_CapillaryPhys_Capillarity> capillaryCohesiveLaw(new Law2_ScGeom_CapillaryPhys_Capillarity); 
 	capillaryCohesiveLaw->sdecGroupMask = 2;	
 	capillaryCohesiveLaw->CapillaryPressure = CapillaryPressure;
 // 	capillaryCohesiveLaw->fusionDetection = fusionDetection;

=== modified file 'py/system.py'
--- py/system.py	2010-03-30 04:55:22 +0000
+++ py/system.py	2010-03-31 00:06:48 +0000
@@ -130,6 +130,11 @@
 	'CapillaryCohesiveLaw':'CapillaryLaw', # Tue Mar 30 14:11:36 2010, sch50p@fluent-ph
 	'Simplecd':'/home/sch50p/YADE-bzr/yade/pkg/dem/PreProcessor', # Tue Mar 30 14:13:03 2010, sch50p@fluent-ph
 	'SimpleElasticRelationshipsWater':'Ip2_Frictmat_FrictMat_CapillaryLawPhys', # Tue Mar 30 14:20:36 2010, sch50p@fluent-ph
+	'OldName':'NewName', # Wed Mar 31 09:22:48 2010, sch50p@fluent-ph
+	'CapillaryLaw':'Law2_ScGeom_CapillaryPhys_Capillarity', # Wed Mar 31 09:23:36 2010, sch50p@fluent-ph
+	'CapillaryParameters':'CapillaryPhys', # Wed Mar 31 09:25:03 2010, sch50p@fluent-ph
+	'Ip2_FrictMat_FrictMat_CapillaryLawPhys':'Ip2_FrictMat_FrictMat_CapillaryPhys', # Wed Mar 31 09:26:04 2010, sch50p@fluent-ph
+	'Ip2_Frictmat_FrictMat_CapillaryLawPhys':'Ip2_FrictMat_FrictMat_CapillaryPhys', # Wed Mar 31 09:26:56 2010, sch50p@fluent-ph
 	### END_RENAMED_CLASSES_LIST ### (do not delete this line; scripts/rename-class.py uses it
 }