← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2268: - Implement Cundall-style positions scaling when (homotheticCellResize=2).

 

------------------------------------------------------------
revno: 2268
committer: Bruno Chareyre <bchareyre@r1arduina>
branch nick: trunk
timestamp: Wed 2010-06-02 16:19:37 +0200
message:
  - Implement Cundall-style positions scaling when (homotheticCellResize=2).
  - Rename Water=>Capillary (more accurate)
  - Register CFTTest.
renamed:
  pkg/dem/PreProcessor/TriaxialTestWater.cpp => pkg/dem/PreProcessor/CapillaryTriaxialTest.cpp
  pkg/dem/PreProcessor/TriaxialTestWater.hpp => pkg/dem/PreProcessor/CapillaryTriaxialTest.hpp
modified:
  pkg/dem/Engine/GlobalEngine/NewtonIntegrator.cpp
  pkg/dem/Engine/GlobalEngine/NewtonIntegrator.hpp
  pkg/dem/PreProcessor/CohesiveTriaxialTest.cpp
  pkg/dem/PreProcessor/CohesiveTriaxialTest.hpp
  pkg/dem/PreProcessor/CapillaryTriaxialTest.cpp
  pkg/dem/PreProcessor/CapillaryTriaxialTest.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
=== modified file 'pkg/dem/Engine/GlobalEngine/NewtonIntegrator.cpp'
--- pkg/dem/Engine/GlobalEngine/NewtonIntegrator.cpp	2010-05-25 11:10:22 +0000
+++ pkg/dem/Engine/GlobalEngine/NewtonIntegrator.cpp	2010-06-02 14:19:37 +0000
@@ -105,7 +105,11 @@
 				// translate equation
 				const Vector3r& f=scene->forces.getForce(id); 
 				state->accel=f/state->mass; 
-				cundallDamp(dt,f,state->vel,state->accel); 
+				if (!scene->isPeriodic || homotheticCellResize==0)
+					cundallDamp(dt,f,state->vel,state->accel);
+				else {//Apply damping on velocity fluctuations only rather than true velocity meanfield+fluctuation.
+					Vector3r velFluctuation(state->vel-prevVelGrad*state->pos);
+					cundallDamp(dt,f,velFluctuation,state->accel);}
 				leapfrogTranslate(scene,state,id,dt);
 				// rotate equation: exactAsphericalRot is disabled or the body is spherical
 				if (!exactAsphericalRot || (state->inertia[0]==state->inertia[1] && state->inertia[1]==state->inertia[2])){
@@ -175,15 +179,20 @@
 inline void NewtonIntegrator::leapfrogTranslate(Scene* scene, State* state, const body_id_t& id, const Real& dt)
 {
 	blockTranslateDOFs(state->blockedDOFs, state->accel);
-	state->vel+=dt*state->accel;
-
+	
 	if (scene->forces.getMoveRotUsed()) state->pos+=scene->forces.getMove(id);
-	if (homotheticCellResize) {
+	if (homotheticCellResize>0) {
 		// update velocity reflecting changes in the macroscopic velocity field, making the problem homothetic.
 		//NOTE : if the velocity is updated before moving the body, it means the current velGrad (i.e. before integration in cell->integrateAndUpdate) will be effective for the current time-step. Is it correct? If not, this velocity update can be moved just after "state->pos += state->vel*dt", meaning the current velocity impulse will be applied at next iteration, after the contact law. (All this assuming the ordering is resetForces->integrateAndUpdate->contactLaw->PeriCompressor->NewtonsLaw. Any other might fool us.)
 		//NOTE : dVel defined without wraping the coordinates means bodies out of the (0,0,0) period can move realy fast. It has to be compensated properly in the definition of relative velocities (see Ig2 functors and contact laws).
-		Vector3r dVel((scene->cell->velGrad-prevVelGrad)*/*scene->cell->wrapShearedPt(*/state->pos/*)*/); state->vel+=dVel;
+		//This is the convective term, appearing in the time derivation of Cundall/Thornton expression (dx/dt=velGrad*pos -> d²x/dt²=dvelGrad/dt+velGrad*vel), negligible in many cases but not for high speed large deformations (gaz or turbulent flow). Emulating Cundall is an option, I don't especially recommend it. I know homothetic 1 and 2 expressions tend to identical values in the limit of dense quasi-static situations. They can give slitghly different results in other cases, and I'm still not sure which one should be considered better, if any (Cundall formula is in contradiction with molecular dynamics litterature).
+		if (homotheticCellResize>1) state->vel+=prevVelGrad*state->vel*dt;
+		
+		//In all cases, reflect macroscopic (periodic cell) acceleration in the velocity. This is the dominant term in the update in most cases
+		Vector3r dVel=(scene->cell->velGrad-prevVelGrad)*/*scene->cell->wrapShearedPt(*/state->pos/*)*/;
+		state->vel+=dVel;
 	}
+	state->vel+=dt*state->accel;
 	state->pos += state->vel*dt;
 }
 

=== modified file 'pkg/dem/Engine/GlobalEngine/NewtonIntegrator.hpp'
--- pkg/dem/Engine/GlobalEngine/NewtonIntegrator.hpp	2010-05-25 11:10:22 +0000
+++ pkg/dem/Engine/GlobalEngine/NewtonIntegrator.hpp	2010-06-02 14:19:37 +0000
@@ -68,7 +68,7 @@
 		((Real,damping,0.2,"damping coefficient for Cundall's non viscous damping (see [Chareyre2005]_) [-]"))
 		((Real,maxVelocitySq,NaN,"store square of max. velocity, for informative purposes; computed again at every step. |yupdate|"))
 		((bool,exactAsphericalRot,true,"Enable more exact body rotation integrator for aspherical bodies *only*, using formulation from [Allen1989]_, pg. 89."))
-		((bool,homotheticCellResize,false,"Enable artificially moving all bodies with the periodic cell, such that its resizes are homogeneous. The move is reflecting changes in :yref:`Cell::velGrad`, using :yref:`NewtonIntegrator::prevVelGrad`."))
+		((unsigned short,homotheticCellResize,0,"Enable velocity updates insuring that all bodies move homogeneously while the periodic cell deforms. 0: No update, 1: Reflect on each body the changes in macroscopic velocity field :yref:`Cell::velGrad`, using Δv_i=Δ(grad(v_macro))*x_i. 2: Emulate the Cundall-style equation Δx_i=(grad(v_macro))*x_i, by adding a convective term in the velocity update."))
 		((Matrix3r,prevVelGrad,Matrix3r::Zero(),"Store previous velocity gradient (:yref:`Cell::velGrad`) to track acceleration. |yupdate|"))
 		((vector<shared_ptr<BodyCallback> >,callbacks,,"List (std::vector in c++) of :yref:`BodyCallbacks<BodyCallback>` which will be called for each body as it is being processed."))
 		,

=== renamed file 'pkg/dem/PreProcessor/TriaxialTestWater.cpp' => 'pkg/dem/PreProcessor/CapillaryTriaxialTest.cpp'
--- pkg/dem/PreProcessor/TriaxialTestWater.cpp	2010-05-24 15:50:25 +0000
+++ pkg/dem/PreProcessor/CapillaryTriaxialTest.cpp	2010-06-02 14:19:37 +0000
@@ -7,7 +7,7 @@
 *  This program is free software; it is licensed under the terms of the  *
 *  GNU General Public License v2 or later. See file LICENSE for details. *
 *************************************************************************/
-#include "TriaxialTestWater.hpp"
+#include "CapillaryTriaxialTest.hpp"
 
 #include<yade/pkg-dem/ElasticContactLaw.hpp>
 #include <yade/pkg-dem/Law2_ScGeom_CapillaryPhys_Capillarity.hpp>
@@ -64,14 +64,14 @@
 string GenerateCloud_water(vector<BasicSphere>& sphere_list, Vector3r lowerCorner, Vector3r upperCorner, long number, Real rad_std_dev, Real porosity);
 
 
-// TriaxialTestWater::TriaxialTestWater () : FileGenerator()
+// CapillaryTriaxialTest::CapillaryTriaxialTest () : FileGenerator()
 // {
 // 	lowerCorner 		= Vector3r(0,0,0);
 // 	upperCorner 		= Vector3r(0.001,0.001,0.001);
 // 	thickness 		= 0.00001;
 // 	importFilename 		= ""; // "./small.sdec.xyz";
 // 	Key			="";
-// 	outputFileName 		= "./TriaxialTestWater"+Key+".xml";
+// 	outputFileName 		= "./CapillaryTriaxialTest"+Key+".xml";
 // 	//nlayers = 1;
 // 	wall_top 		= true;
 // 	wall_bottom 		= true;
@@ -143,14 +143,14 @@
 // }
 
 
-TriaxialTestWater::~TriaxialTestWater ()
+CapillaryTriaxialTest::~CapillaryTriaxialTest ()
 {
 
 }
 
 
 
-bool TriaxialTestWater::generate()
+bool CapillaryTriaxialTest::generate()
 {
 //	unsigned int startId=boost::numeric::bounds<unsigned int>::highest(), endId=0; // record forces from group 2
 	message="";	
@@ -287,7 +287,7 @@
 }
 
 
-void TriaxialTestWater::createSphere(shared_ptr<Body>& body, Vector3r position, Real radius, bool big, bool dynamic )
+void CapillaryTriaxialTest::createSphere(shared_ptr<Body>& body, Vector3r position, Real radius, bool big, bool dynamic )
 {
 	body = shared_ptr<Body>(new Body(body_id_t(0),2));
 	shared_ptr<FrictMat> physics(new FrictMat);
@@ -332,7 +332,7 @@
 }
 
 
-void TriaxialTestWater::createBox(shared_ptr<Body>& body, Vector3r position, Vector3r extents, bool wire)
+void CapillaryTriaxialTest::createBox(shared_ptr<Body>& body, Vector3r position, Vector3r extents, bool wire)
 {
 	body = shared_ptr<Body>(new Body(body_id_t(0),2));
 	shared_ptr<FrictMat> physics(new FrictMat);
@@ -370,7 +370,7 @@
 }
 
 
-void TriaxialTestWater::createActors(shared_ptr<Scene>& rootBody)
+void CapillaryTriaxialTest::createActors(shared_ptr<Scene>& rootBody)
 {
 	
 	Real distanceFactor = 1.3;//Create potential interactions as soon as the distance is less than factor*(rad1+rad2) 
@@ -503,7 +503,7 @@
 }
 
 
-void TriaxialTestWater::positionRootBody(shared_ptr<Scene>& rootBody)
+void CapillaryTriaxialTest::positionRootBody(shared_ptr<Scene>& rootBody)
 {	
 }
 
@@ -559,7 +559,7 @@
 
 
 
-YADE_PLUGIN((TriaxialTestWater));
+YADE_PLUGIN((CapillaryTriaxialTest));
 
 //YADE_REQUIRE_FEATURE(PHYSPAR);
 

=== renamed file 'pkg/dem/PreProcessor/TriaxialTestWater.hpp' => 'pkg/dem/PreProcessor/CapillaryTriaxialTest.hpp'
--- pkg/dem/PreProcessor/TriaxialTestWater.hpp	2010-05-24 15:50:25 +0000
+++ pkg/dem/PreProcessor/CapillaryTriaxialTest.hpp	2010-06-02 14:19:37 +0000
@@ -29,7 +29,7 @@
 	
  */
 
-class TriaxialTestWater : public FileGenerator
+class CapillaryTriaxialTest : public FileGenerator
 {
 	private	:
 		Vector3r	 gravity;
@@ -60,11 +60,11 @@
 		void positionRootBody(shared_ptr<Scene>& rootBody);
 		typedef pair<Vector3r, Real> BasicSphere;	
 	public : 
-		~TriaxialTestWater ();
+		~CapillaryTriaxialTest ();
 		bool generate();
 		
 		YADE_CLASS_BASE_DOC_ATTRS_INIT_CTOR_PY(
-		TriaxialTestWater,FileGenerator,"This preprocessor is a variant of TriaxialTest, including the model of capillary forces developped as part of the PhD of Luc Scholtès. See the documentation of Law2_ScGeom_CapillaryPhys_Capillarity or the main page https://yade-dem.org/wiki/CapillaryTriaxialTest, for more details.\n\n Results obtained with this preprocessor were reported for instance in 'Scholtes et al. Micromechanics of granular materials with capillary effects. International Journal of Engineering Science 2009,(47)1, 64-75.'"
+		CapillaryTriaxialTest,FileGenerator,"This preprocessor is a variant of TriaxialTest, including the model of capillary forces developped as part of the PhD of Luc Scholtès. See the documentation of Law2_ScGeom_CapillaryPhys_Capillarity or the main page https://yade-dem.org/wiki/CapillaryTriaxialTest, for more details.\n\n Results obtained with this preprocessor were reported for instance in 'Scholtes et al. Micromechanics of granular materials with capillary effects. International Journal of Engineering Science 2009,(47)1, 64-75.'"
 		,
    		((Vector3r,lowerCorner,Vector3r(0,0,0),"Lower corner of the box."))
 		((Vector3r,upperCorner,Vector3r(1,1,1),"Upper corner of the box."))
@@ -74,7 +74,7 @@
 		((Real,CapillaryPressure,0,"Define succion in the packing [Pa]. This is the value used in the capillary model."))
 		((bool,water,true,"activate capillary model"))
 		((bool,fusionDetection,false,"test overlaps between liquid bridges on modify forces if overlaps exist"))
-		((bool,binaryFusion,true,"Defines how overlapping bridges affect the capillary forces (see :yref:`TriaxialTestWater::fusionDetection`). If binary=true, the force is null as soon as there is an overlap detected, if not, the force is divided by the number of overlaps."))
+		((bool,binaryFusion,true,"Defines how overlapping bridges affect the capillary forces (see :yref:`CapillaryTriaxialTest::fusionDetection`). If binary=true, the force is null as soon as there is an overlap detected, if not, the force is divided by the number of overlaps."))
 		((string,WallStressRecordFile,"./WallStressesWater"+Key,""))
 		((string,capillaryStressRecordFile,"./capStresses"+Key,""))
 		((string,contactStressRecordFile,"./contStresses"+Key,""))
@@ -110,7 +110,7 @@
 		((Real,StabilityCriterion,0.01,"Value of unbalanced force for which the system is considered stable. Used in conditionals to switch between loading stages."))
 		((Real,wallOversizeFactor,1.3,"Make boundaries larger than the packing to make sure spheres don't go out during deformation."))
 		((Real,sigmaIsoCompaction,50000,"Confining stress during isotropic compaction."))
-		((Real,sigmaLateralConfinement,50000,"Lateral stress during triaxial loading. An isotropic unloading is performed if the value is not equal to :yref:`TriaxialTestWater::SigmaIsoCompaction`."))
+		((Real,sigmaLateralConfinement,50000,"Lateral stress during triaxial loading. An isotropic unloading is performed if the value is not equal to :yref:`CapillaryTriaxialTest::SigmaIsoCompaction`."))
 		
 		((int,timeStepUpdateInterval,50,"interval for :yref:`GlobalStiffnessTimeStepper`"))
 		((int,timeStepOutputInterval,50,"interval for outputing general informations on the simulation (stress,unbalanced force,...)"))
@@ -122,7 +122,7 @@
 		/* init */
 		,
 		/* constructor */
-  		outputFileName = "./TriaxialTestWater"+Key+".xml";
+  		outputFileName = "./CapillaryTriaxialTest"+Key+".xml";
 		wall_top 		= true;
 		wall_bottom 		= true;
 		wall_1			= true;
@@ -146,7 +146,7 @@
 };
 
 
-// class TriaxialTestWater : public FileGenerator
+// class CapillaryTriaxialTest : public FileGenerator
 // {
 // 	private	:
 // 		Vector3r	 gravity
@@ -234,8 +234,8 @@
 // 		void positionRootBody(shared_ptr<Scene>& rootBody);
 // 	
 // 	public : 
-// 		TriaxialTestWater ();
-// 		~TriaxialTestWater ();
+// 		CapillaryTriaxialTest ();
+// 		~CapillaryTriaxialTest ();
 // 		bool generate();
 // 	
 // 	REGISTER_ATTRIBUTES(FileGenerator,
@@ -314,10 +314,10 @@
 // 		(fusionDetection)
 // 		(binaryFusion)
 // 	);
-// 	REGISTER_CLASS_NAME(TriaxialTestWater);
+// 	REGISTER_CLASS_NAME(CapillaryTriaxialTest);
 // 	REGISTER_BASE_CLASS_NAME(FileGenerator);
 // };
 
-REGISTER_SERIALIZABLE(TriaxialTestWater);
+REGISTER_SERIALIZABLE(CapillaryTriaxialTest);
 
 

=== modified file 'pkg/dem/PreProcessor/CohesiveTriaxialTest.cpp'
--- pkg/dem/PreProcessor/CohesiveTriaxialTest.cpp	2010-05-18 10:28:02 +0000
+++ pkg/dem/PreProcessor/CohesiveTriaxialTest.cpp	2010-06-02 14:19:37 +0000
@@ -59,7 +59,7 @@
 //! make a list of spheres non-overlapping sphere
 string GenerateCloud_cohesive(vector<BasicSphere>& sphere_list, Vector3r lowerCorner, Vector3r upperCorner, long number, Real rad_std_dev, Real porosity);
 
-
+/*
 CohesiveTriaxialTest::CohesiveTriaxialTest () : FileGenerator()
 {
 	lowerCorner 		= Vector3r(0,0,0);
@@ -132,7 +132,7 @@
 // 	all_right_id =0;
 // 	wall_front_id =0;
 // 	wall_back_id =0;
-}
+}*/
 
 
 CohesiveTriaxialTest::~CohesiveTriaxialTest ()
@@ -387,24 +387,20 @@
 	globalStiffnessTimeStepper->timeStepUpdateInterval = timeStepUpdateInterval;
 	globalStiffnessTimeStepper->defaultDt = defaultDt;
 	globalStiffnessTimeStepper->timestepSafetyCoefficient = 0.2;
-	
 	shared_ptr<CohesiveFrictionalContactLaw> cohesiveFrictionalContactLaw(new CohesiveFrictionalContactLaw);
-	
-	
 	triaxialcompressionEngine = shared_ptr<TriaxialCompressionEngine> (new TriaxialCompressionEngine);
 	triaxialcompressionEngine-> stiffnessUpdateInterval = wallStiffnessUpdateInterval;// = stiffness update interval
 	triaxialcompressionEngine-> radiusControlInterval = radiusControlInterval;// = stiffness update interval
-	triaxialcompressionEngine-> sigma_iso = sigma_iso;
-	triaxialcompressionEngine-> sigmaLateralConfinement = sigma_iso;
-	triaxialcompressionEngine-> sigmaIsoCompaction = sigma_iso;
+	triaxialcompressionEngine-> sigma_iso = sigmaIsoCompaction;
+	triaxialcompressionEngine-> sigmaLateralConfinement = sigmaLateralConfinement;
+	triaxialcompressionEngine-> sigmaIsoCompaction = sigmaIsoCompaction;
 	triaxialcompressionEngine-> max_vel = 1;
 	triaxialcompressionEngine-> thickness = thickness;
 	triaxialcompressionEngine->strainRate = strainRate;
 	triaxialcompressionEngine->StabilityCriterion = StabilityCriterion;
 	triaxialcompressionEngine->autoCompressionActivation = autoCompressionActivation;
 	triaxialcompressionEngine->internalCompaction = internalCompaction;
-	triaxialcompressionEngine->maxMultiplier = maxMultiplier;
-	
+	triaxialcompressionEngine->maxMultiplier = maxMultiplier;	
 	
 	// recording global stress
 	triaxialStateRecorder = shared_ptr<TriaxialStateRecorder>(new
@@ -413,17 +409,6 @@
 	triaxialStateRecorder-> iterPeriod 		= recordIntervalIter;
 	//triaxialStateRecorder-> thickness 		= thickness;
 	
-	
-	// moving walls to regulate the stress applied
-	//cerr << "triaxialstressController = shared_ptr<TriaxialStressController> (new TriaxialStressController);" << std::endl;
-	triaxialstressController = shared_ptr<TriaxialStressController> (new TriaxialStressController);
-	triaxialstressController-> stiffnessUpdateInterval = 20;// = recordIntervalIter
-	triaxialstressController-> sigma_iso = sigma_iso;
-	triaxialstressController-> max_vel = 0.0001;
-	triaxialstressController-> thickness = thickness;
-	triaxialstressController->wall_bottom_activated = false;
-	triaxialstressController->wall_top_activated = false;	
-	
 	rootBody->engines.clear();
 	rootBody->engines.push_back(shared_ptr<Engine>(new ForceResetter));
 	rootBody->engines.push_back(boundDispatcher);

=== modified file 'pkg/dem/PreProcessor/CohesiveTriaxialTest.hpp'
--- pkg/dem/PreProcessor/CohesiveTriaxialTest.hpp	2010-05-08 14:53:54 +0000
+++ pkg/dem/PreProcessor/CohesiveTriaxialTest.hpp	2010-06-02 14:19:37 +0000
@@ -11,58 +11,22 @@
 #include<yade/core/FileGenerator.hpp>
 #include<yade/lib-base/Math.hpp>
 
-//class ForceRecorder;
-//class AveragePositionRecorder;
-//class VelocityRecorder;
 class TriaxialStressController;
 class TriaxialCompressionEngine;
 class TriaxialStateRecorder;
 
-/*! \brief Isotropic compression + uniaxial compression test
+/*! \brief Triaxial test on unsaturated sphere packings
 
-	detailed description...
+	This preprocessor is a variant of TriaxialTest using the cohesive-frictional contact law with moments.
+	See TriaxialTest documentation.
  */
 
 class CohesiveTriaxialTest : public FileGenerator
 {
 	private	:
-		Vector3r	 gravity
-				,lowerCorner
-				,upperCorner;
-
+		Vector3r	 gravity;
 		Vector3r	 spheresColor;
-
-		Real		 thickness
-				,sphereYoungModulus
-				,sphereKsDivKn
-				,sphereFrictionDeg
-				,normalCohesion
-				,shearCohesion
-				,boxYoungModulus
-				,boxKsDivKn
-				,boxFrictionDeg
-				,density
-				,dampingForce
-				,dampingMomentum
-				,defaultDt
-				,radiusDeviation
-
-// 				,bigBallRadius
-// 				,bigBallDensity
-// 				,bigBallDropTimeSeconds
-// 				,bigBallPoissonRatio
-// 				,bigBallYoungModulus
-// 				,bigBallFrictDeg
-// 				,bigBallDropHeight
-				
-				,sigma_iso
-				,strainRate
-				,StabilityCriterion
-				,maxMultiplier ///max multiplier of diameters during internal compaction
-				,finalMaxMultiplier;
-		 
-		bool		setCohesionOnNewContacts
-				,wall_top
+		bool		 wall_top
 				,wall_bottom
 				,wall_1
 				,wall_2
@@ -74,37 +38,8 @@
 				,wall_2_wire
 				,wall_3_wire
 				,wall_4_wire
-				,autoCompressionActivation
-				,bigBall
-				,rotationBlocked
-				,spheresRandomColor
-				,recordBottomForce
-				,recordAveragePositions
-				,boxWalls
-				,internalCompaction;
-
-		int		 recordIntervalIter
-				,timeStepUpdateInterval
-				,timeStepOutputInterval
-				,wallStiffnessUpdateInterval
-				,radiusControlInterval
-				,numberOfGrains;
-				/*,wall_top_id
-				,wall_bottom_id
-				,wall_left_id
-				,all_right_id
-				,wall_front_id
-				,wall_back_id;*/
-		
-		string		 forceRecordFile
-				,positionRecordFile
-				,velocityRecordFile
-				,importFilename
-				,WallStressRecordFile;
-	
-		//shared_ptr<ForceRecorder> forcerec;
-		//shared_ptr<VelocityRecorder> velocityRecorder;
-		//shared_ptr<AveragePositionRecorder> averagePositionRecorder;
+				,spheresRandomColor;
+				
 		shared_ptr<TriaxialCompressionEngine> triaxialcompressionEngine;
 		shared_ptr<TriaxialStressController> triaxialstressController;
 		shared_ptr<TriaxialStateRecorder> triaxialStateRecorder;
@@ -115,81 +50,85 @@
 		void positionRootBody(shared_ptr<Scene>& rootBody);
 	
 	public : 
-		CohesiveTriaxialTest ();
+		//CohesiveTriaxialTest ();
 		~CohesiveTriaxialTest ();
-		bool generate();
-	REGISTER_ATTRIBUTES(FileGenerator,
-		(lowerCorner)
-		(upperCorner)
-		(thickness)
-		(importFilename)
-		//(nlayers)
-		//(boxWalls)
-		(internalCompaction)
-		(maxMultiplier)
-		(finalMaxMultiplier)
-
-		(sphereYoungModulus)
-		(sphereKsDivKn)
-		(sphereFrictionDeg)
-		(normalCohesion)
-		(shearCohesion)
-		(setCohesionOnNewContacts)
-
-		(boxYoungModulus)
-		(boxKsDivKn)
-		(boxFrictionDeg)
-
-		(density)
-		(defaultDt)
-		(dampingForce)
-		(dampingMomentum)
-		(rotationBlocked)
-		(timeStepUpdateInterval)
-		(timeStepOutputInterval)
-		(wallStiffnessUpdateInterval)
-		(radiusControlInterval)
-		(numberOfGrains)
-		(radiusDeviation)
-		(strainRate)
-		(StabilityCriterion)
-		(autoCompressionActivation)
-		//	(wall_top)
-		//	(wall_bottom)
-		//	(wall_1)
-		//	(wall_2)
-		//	(wall_3)
-		//	(wall_4)
-		//	(wall_top_wire)
-		//	(wall_bottom_wire)
-		//	(wall_1_wire)
-		//	(wall_2_wire)
-		//	(wall_3_wire)
-		//	(wall_4_wire)
-		//	(spheresColor)
-		//	(spheresRandomColor)
-		(recordBottomForce)
-		(forceRecordFile)
-		//	(recordAveragePositions)
-		(positionRecordFile)
-		(velocityRecordFile)
-		(recordIntervalIter)
-		(WallStressRecordFile)
-
-		//	(gravity)
-		
-		//(bigBall)
-		//(bigBallRadius)
-		//(bigBallDensity)
-		//(bigBallDropTimeSeconds)
-		//(bigBallFrictDeg)
-		//(bigBallYoungModulus)
-		//(bigBallPoissonRatio)
-		//(bigBallDropHeight)
-		(sigma_iso)
+		virtual bool generate();
+	YADE_CLASS_BASE_DOC_ATTRS_INIT_CTOR_PY(
+		CohesiveTriaxialTest,FileGenerator,"This preprocessor is a variant of TriaxialTest using the cohesive-frictional contact law with moments. It sets up a scene for cohesive triaxial tests. See full documentation at http://yade-dem.org/wiki/TriaxialTest.\n\n Cohesion is initially 0 by default. The suggested usage is to define cohesion values in a second step, after isotropic compaction : define shear and normal cohesions in :yref:`Ip2_2xCohFrictMat_CohFrictPhys`, then turn :yref:`Ip2_2xCohFrictMat_CohFrictPhys`::setCohesionNow true to assign them at each contact at next iteration."
+		,
+   		((Vector3r,lowerCorner,Vector3r(0,0,0),"Lower corner of the box."))
+		((Vector3r,upperCorner,Vector3r(1,1,1),"Upper corner of the box."))
+		((string,importFilename,"","File with positions and sizes of spheres."))
+		((string,Key,"","A code that is added to output filenames."))
+		((string,fixedBoxDims,"","string that contains some subset (max. 2) of {'x','y','z'} ; containes axes will have box dimension hardcoded, even if box is scaled as mean_radius is prescribed: scaling will be applied on the rest."))
+		((string,WallStressRecordFile,"./CohesiveWallStresses"+Key,""))					
+		((bool,internalCompaction,false,"flag for choosing between moving boundaries or increasing particles sizes during the compaction stage."))
+		((bool,biaxial2dTest,false,"FIXME : what is that?"))
+		((bool,fixedPoroCompaction,false,"flag to choose an isotropic compaction until a fixed porosity choosing a same translation speed for the six walls"))
+		((bool,autoCompressionActivation,true,"Do we just want to generate a stable packing under isotropic pressure (false) or do we want the triaxial loading to start automatically right after compaction stage (true)?"))
+		((bool,autoUnload,true,"auto adjust the isotropic stress state from :yref:`TriaxialTest`::sigmaIsoCompaction to :yref:`TriaxialTest::sigmaLateralConfinement` if they have different values. See docs for :yref:`TriaxialCompressionEngine::autoUnload`"))
+		((bool,autoStopSimulation,false,"freeze the simulation when conditions are reached (don't activate this if you want to be able to run/stop from Qt GUI)"))
+		((bool,noFiles,false,"Do not create any files during run (.xml, .spheres, wall stress records)"))
+		((bool,facetWalls,false,"Use facets for boundaries (not tested)"))
+		((bool,wallWalls,false,"Use walls for boundaries (not tested)"))
+		((bool,boxWalls,true,"Use boxes for boundaries (recommended)."))
+		
+		((Real,fixedPorosity,1,"FIXME : what is that?"))
+		((Real,thickness,0.001,"thickness of boundaries. It is arbitrary and should have no effect"))
+		((Real,maxMultiplier,1.01,"max multiplier of diameters during internal compaction (initial fast increase)"))
+		((Real,finalMaxMultiplier,1.001,"max multiplier of diameters during internal compaction (secondary precise adjustment)"))
+		((Real,radiusDeviation,0.3,"Normalized standard deviation of generated sizes."))
+		((Real,radiusMean,-1,"Mean radius. If negative (default), autocomputed to as a function of box size and :yref:`TriaxialTest::numberOfGrains`"))
+		((Real,sphereYoungModulus,15000000.0,"Stiffness of spheres."))
+		((Real,sphereKsDivKn,0.5,"Ratio of shear vs. normal contact stiffness for spheres."))
+		((Real,sphereFrictionDeg,18.0,"Friction angle [°] of spheres assigned just before triaxial testing."))
+		((Real,compactionFrictionDeg,sphereFrictionDeg,"Friction angle [°] of spheres during compaction (different values result in different porosities)]. This value is overriden by :yref:`TriaxialTest::sphereFrictionDeg` before triaxial testing."))
+		((Real,normalCohesion,0,"Material parameter used to define contact strength in tension."))
+		((Real,shearCohesion,0,"Material parameter used to define shear strength of contacts."))
+		((bool,setCohesionOnNewContacts,false,"create cohesionless (False) or cohesive (True) interactions for new contacts."))
+		((Real,boxYoungModulus,15000000.0,"Stiffness of boxes."))
+		((Real,maxWallVelocity,10,"max velocity of boundaries. Usually useless, but can help stabilizing the system in some cases."))
+		((Real,boxKsDivKn,0.5,"Ratio of shear vs. normal contact stiffness for boxes."))
+		((Real,boxFrictionDeg,0.0,"Friction angle [°] of boundaries contacts."))
+		((Real,density,2600,"density of spheres"))
+		((Real,strainRate,0.1,"Strain rate in triaxial loading."))
+		((Real,defaultDt,0.001,"Max time-step. Used as initial value if defined. Latter adjusted by the time stepper."))
+		((Real,dampingForce,0.2,"Coefficient of Cundal-Non-Viscous damping (applied on on the 3 components of forces)"))
+		((Real,dampingMomentum,0.2,"Coefficient of Cundal-Non-Viscous damping (applied on on the 3 components of torques)"))
+		((Real,StabilityCriterion,0.01,"Value of unbalanced force for which the system is considered stable. Used in conditionals to switch between loading stages."))
+		((Real,wallOversizeFactor,1.3,"Make boundaries larger than the packing to make sure spheres don't go out during deformation."))
+		((Real,sigmaIsoCompaction,50000,"Confining stress during isotropic compaction."))
+		((Real,sigmaLateralConfinement,50000,"Lateral stress during triaxial loading. An isotropic unloading is performed if the value is not equal to :yref:`TriaxialTest::SigmaIsoCompaction`."))
+		
+		((int,timeStepUpdateInterval,50,"interval for :yref:`GlobalStiffnessTimeStepper`"))
+		((int,wallStiffnessUpdateInterval,10,"interval for updating the stiffness of sample/boundaries contacts"))
+		((int,radiusControlInterval,10,"interval between size changes when growing spheres."))
+		((int,numberOfGrains,400,"Number of generated spheres."))
+		((int,recordIntervalIter,20,"interval between file outputs"))
+		,
+		/* init */
+		,
+		/* constructor */
+  		outputFileName = "./CohesiveTriaxialTest"+Key+".xml";
+		wall_top 		= true;
+		wall_bottom 		= true;
+		wall_1			= true;
+		wall_2			= true;
+		wall_3			= true;
+		wall_4			= true;
+		wall_top_wire 		= true;
+		wall_bottom_wire	= true;
+		wall_1_wire		= true;
+		wall_2_wire		= true;
+		wall_3_wire		= true;
+		wall_4_wire		= true;
+		spheresColor		= Vector3r(0.8,0.3,0.3);
+		spheresRandomColor	= false;
+		WallStressRecordFile = "./CohesiveWallStresses"+Key;	
+		gravity 		= Vector3r(0,-9.81,0);
+		,
+		//.def("setContactProperties",&TriaxialCompressionEngine::setContactProperties,"Assign a new friction angle (degrees) to dynamic bodies and relative interactions")
 	);
-	REGISTER_CLASS_NAME(CohesiveTriaxialTest);
-	REGISTER_BASE_CLASS_NAME(FileGenerator);
 };
 
 REGISTER_SERIALIZABLE(CohesiveTriaxialTest);