← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 3411: make computeForce optional; a bakcup

 

------------------------------------------------------------
revno: 3411
committer: Chao Yuan <chaoyuan2012@xxxxxxxxx>
timestamp: Fri 2014-03-28 11:58:02 +0100
message:
  make computeForce optional;a bakcup
modified:
  pkg/dem/UnsaturatedEngine.cpp
  pkg/dem/UnsaturatedEngine.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/UnsaturatedEngine.cpp'
--- pkg/dem/UnsaturatedEngine.cpp	2014-02-28 17:32:34 +0000
+++ pkg/dem/UnsaturatedEngine.cpp	2014-03-28 10:58:02 +0000
@@ -74,7 +74,9 @@
     if (pressureForce) {
         invade(solver);
     }
+
     ///compute force
+    if(computeForceActivated){
     computeFacetPoreForcesWithCache(solver);
     Vector3r force;
     Finite_vertices_iterator vertices_end = solver->T[solver->currentTes].Triangulation().finite_vertices_end();
@@ -83,6 +85,7 @@
         scene->forces.addForce ( V_it->info().id(), force);
     }
 }
+}
 
 template<class Solver>
 void UnsaturatedEngine::invade(Solver& flow)

=== modified file 'pkg/dem/UnsaturatedEngine.hpp'
--- pkg/dem/UnsaturatedEngine.hpp	2014-02-28 17:32:34 +0000
+++ pkg/dem/UnsaturatedEngine.hpp	2014-03-28 10:58:02 +0000
@@ -144,14 +144,8 @@
 		int		_getCell(Vector3r pos) {return getCell(pos[0],pos[1],pos[2],solver);}
 		void 		_buildTriangulation() {setPositionsBuffer(true); Build_Triangulation(solver);}
 		void		_invade() {invade(solver);}
-// 		void		_invade1() {invade1(solver);}
-// 		void		_invade2() {invade2(solver);}
 		Real		_getMinEntryValue() {return getMinEntryValue(solver);}
-// 		Real		_getMinEntryValue1() {return getMinEntryValue1(solver);}
-// 		Real		_getMinEntryValue2() {return getMinEntryValue2(solver);}
 		Real		_getSaturation() {return getSaturation(solver);}
-// 		Real 		_getSaturation1 () {return getSaturation1(solver);}
-// 		Real		_getSaturation2() {return getSaturation2(solver);}
 		void		_saveListNodes() {saveListNodes(solver);}
 		void		_saveListConnection() {saveListConnection(solver);}
  		void		_saveLatticeNodeX(double x) {saveLatticeNodeX(solver,x);}
@@ -195,6 +189,7 @@
 					((vector<bool>, boundaryUseMaxMin, vector<bool>(6,true),,"If true (default value) bounding sphere is added as function of max/min sphere coord, if false as function of yade wall position"))					
 
 					((bool, pressureForce, true,,"Compute the pressure field and associated fluid forces. WARNING: turning off means fluid flow is not computed at all."))
+					((bool, computeForceActivated, true,,"Activate capillary force computation. WARNING: turning off means capillary force is not computed at all, but the drainage can still work."))
 					,
 					/*deprec*/
 					,,
@@ -215,11 +210,7 @@
 					.def("testFunction",&UnsaturatedEngine::testFunction,"The playground for Chao's experiments.")
 					.def("buildTriangulation",&UnsaturatedEngine::_buildTriangulation,"Triangulate spheres of the current scene.")
 					.def("getSaturation",&UnsaturatedEngine::_getSaturation,"get saturation.")					
-// 					.def("getSaturation1",&UnsaturatedEngine::_getSaturation1,"get saturation for mode 1")
-// 					.def("getSaturation2",&UnsaturatedEngine::_getSaturation2,"get saturation for mode 2")
 					.def("getMinEntryValue",&UnsaturatedEngine::_getMinEntryValue,"get the minimum air entry pressure for the next invade step.")
-// 					.def("getMinEntryValue1",&UnsaturatedEngine::_getMinEntryValue1,"get the minimum air entry pressure for the next invade step")
-// 					.def("getMinEntryValue2",&UnsaturatedEngine::_getMinEntryValue2,"get the minimum air entry pressure for the next invade step(version2)")
 					.def("saveListNodes",&UnsaturatedEngine::_saveListNodes,"Save the list of nodes.")
 					.def("saveListConnection",&UnsaturatedEngine::_saveListConnection,"Save the connections between cells.")
 					.def("saveLatticeNodeX",&UnsaturatedEngine::_saveLatticeNodeX,(python::arg("x")),"Save the slice of lattice nodes for x_normal(x). 0: out of sphere; 1: inside of sphere.")
@@ -231,9 +222,7 @@
 					.def("savePoreThroatInfo",&UnsaturatedEngine::_savePoreThroatInfo,"Save pore throat area, inscribed radius and perimeter.")
 					.def("debugTemp",&UnsaturatedEngine::_debugTemp,"debug temp file.")
 					.def("invade",&UnsaturatedEngine::_invade,"Run the drainage invasion.")
-// 					.def("invade1",&UnsaturatedEngine::_invade,"Run the drainage invasion mode 1. Consider trapped phase. ")
-// 					.def("invade2",&UnsaturatedEngine::_invade2,"Run the drainage invasion mode 2. Consider no trapped phase.")
-					.def("computeForce",&UnsaturatedEngine::_computeFacetPoreForcesWithCache,"Test computeFacetPoreForcesWithCache(). ")
+					.def("computeForce",&UnsaturatedEngine::_computeFacetPoreForcesWithCache,"Compute capillary force. ")
 					.def("fluidForce",&UnsaturatedEngine::_fluidForce,(python::arg("Id_sph")),"Return the fluid force on sphere Id_sph.")
 					)
 		DECLARE_LOGGER;