yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #03496
[Branch ~yade-dev/yade/trunk] Rev 2051: Re-writing of classes CinemCNCEngine, NormalInelastictiyLaw (and those linked : NormalInelasticit...
------------------------------------------------------------
revno: 2051
committer: jduriez <jduriez@c1solimara-l>
branch nick: trunk
timestamp: Fri 2010-02-26 18:01:36 +0100
message:
Re-writing of classes CinemCNCEngine, NormalInelastictiyLaw (and those linked : NormalInelasticityPhys and Ip2_2xCohFrictMat_NormalInelasticityPhys) according to the macros
replacing former REGISTER_ATTRIBUTES...
modified:
pkg/common/Engine/PartialEngine/CinemCNCEngine.cpp
pkg/common/Engine/PartialEngine/CinemCNCEngine.hpp
pkg/dem/DataClass/InteractionPhysics/NormalInelasticityPhys.cpp
pkg/dem/DataClass/InteractionPhysics/NormalInelasticityPhys.hpp
pkg/dem/Engine/Functor/Ip2_2xCohFrictMat_NormalInelasticityPhys.cpp
pkg/dem/Engine/Functor/Ip2_2xCohFrictMat_NormalInelasticityPhys.hpp
pkg/dem/Engine/GlobalEngine/NormalInelasticityLaw.cpp
pkg/dem/Engine/GlobalEngine/NormalInelasticityLaw.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/common/Engine/PartialEngine/CinemCNCEngine.cpp'
--- pkg/common/Engine/PartialEngine/CinemCNCEngine.cpp 2010-02-09 20:22:04 +0000
+++ pkg/common/Engine/PartialEngine/CinemCNCEngine.cpp 2010-02-26 17:01:36 +0000
@@ -16,31 +16,28 @@
#include <yade/lib-base/Math.hpp>
-CinemCNCEngine::CinemCNCEngine() : leftbox(new Body), rightbox(new Body), frontbox(new Body), backbox(new Body), topbox(new Body), boxbas(new Body)
-{
- prevF_sup=Vector3r(0,0,0);
- firstRun=true;
- shearSpeed=0;
- alpha=Mathr::PI/2.0;;
- gamma_save.resize(0);
- temoin_save.resize(0);
- temoin=0;
- gamma=0;
- gammalim=0;
- id_boxhaut=3;
- id_boxbas=1;
- id_boxleft=0;
- id_boxright=2;
- id_boxfront=5;
- id_boxback=4;
- Y0=0;
- F_0=0;
- Key="";
- it_depart=0;
- LOG=0;
- wallDamping = 0.2;
- coeff_dech=1.0;
-}
+// CinemCNCEngine::CinemCNCEngine() : leftbox(new Body), rightbox(new Body), frontbox(new Body), backbox(new Body), topbox(new Body), boxbas(new Body)
+// {
+// firstRun=true;
+// shearSpeed=0;
+// alpha=Mathr::PI/2.0;;
+// gamma_save.resize(0);
+// temoin_save.resize(0);
+// temoin=0;
+// gamma=0;
+// gammalim=0;
+// id_topbox=3;
+// id_boxbas=1;
+// id_boxleft=0;
+// id_boxright=2;
+// id_boxfront=5;
+// id_boxback=4;
+// F_0=0;
+// Key="";
+// LOG=0;
+// wallDamping = 0.2;
+// coeff_dech=1.0;
+// }
void CinemCNCEngine::applyCondition(Scene * ncb)
@@ -50,7 +47,7 @@
rightbox = Body::byId(id_boxright);
frontbox = Body::byId(id_boxfront);
backbox = Body::byId(id_boxback);
- topbox = Body::byId(id_boxhaut);
+ topbox = Body::byId(id_topbox);
boxbas = Body::byId(id_boxbas);
if(LOG) cout << "gamma = " << lexical_cast<string>(gamma) << " et gammalim = " << lexical_cast<string>(gammalim) << endl;
@@ -114,7 +111,6 @@
rightbox->state->pos += Vector3r(dx/2.0,deltaU/2.0,0);
if(LOG) cout << "deltaU reellemt applique :" << deltaU << endl;
if(LOG) cout << "qui nous a emmene en : y = " <<(topbox->state->pos).Y() << endl;
- if(LOG) cout << "soit un decalage par rapport a position intiale : " << (topbox->state->pos.Y()) - Y0 << endl;
Real Ysup_mod = topbox->state->pos.Y();
Real Ylat_mod = leftbox->state->pos.Y();
@@ -168,7 +164,7 @@
void CinemCNCEngine::computeDu(Scene* ncb)
{
- ncb->forces.sync(); Vector3r F_sup=ncb->forces.getForce(id_boxhaut);
+ ncb->forces.sync(); Vector3r F_sup=ncb->forces.getForce(id_topbox);
if(firstRun)
{
@@ -187,14 +183,9 @@
}
}
- it_depart = Omega::instance().getCurrentIteration();
alpha=Mathr::PI/2.0;;
- Y0 = topbox->state->pos.Y();
- cout << "Y0 initialise à : " << Y0 << endl;
F_0 = F_sup.Y();
cout << "F_0 initialise à : " << F_0 << endl;
- prevF_sup=F_sup;
- previousdeltaU=0.0;
firstRun=false;
}
@@ -208,11 +199,10 @@
{
Real Ycourant = topbox->state->pos.Y();
deltaU = ( F_sup.Y() - F_0 )/(stiffness);
- if(LOG) cout << "Lors du calcul de DU (utile pour deltaU) : F_0 = " << F_0 << "; Y0 = " << Y0 << "; Ycourant = " << Ycourant << endl;
+ if(LOG) cout << "Lors du calcul de DU (utile pour deltaU) : F_0 = " << F_0 << "; Ycourant = " << Ycourant << endl;
}
- if(LOG) cout << "PrevF_sup : " << prevF_sup << " F sup : " << F_sup.Y() << endl;
if(LOG) cout << "deltaU a permettre normalemt :" << deltaU << endl;
// Il va falloir prendre en compte la loi de contact qui induit une rigidite plus grande en decharge qu'en charge
@@ -224,8 +214,6 @@
deltaU = (1-wallDamping)*deltaU;
if(LOG) cout << "deltaU apres amortissement :" << deltaU << endl;
-// deltaU += 0.7*previousdeltaU;
- if(LOG) cout << "deltaU apres correction avec previousdeltaU :" << deltaU << endl;
if(abs(deltaU) > max_vel*Omega::instance().getTimeStep())
{
if(LOG) cout << "v induite pour cet it n° " <<Omega::instance().getCurrentIteration()<<" : " << deltaU/Omega::instance().getTimeStep() << endl;
@@ -234,8 +222,6 @@
if(LOG) cout << "Correction appliquee pour ne pas depasser vmax(comp) = " << max_vel << endl;
}
- previousdeltaU=deltaU;
- prevF_sup=F_sup; // Now the value of prevF_sup is used for computing deltaU, it is actualized
}
void CinemCNCEngine::stopMovement()
@@ -269,7 +255,7 @@
if (fn!=0)
{
int id1 = contact->getId1(), id2 = contact->getId2();
- if ( id_boxhaut==id1 || id_boxhaut==id2 )
+ if ( id_topbox==id1 || id_topbox==id2 )
{
FrictPhys* currentContactPhysics =
static_cast<FrictPhys*> ( contact->interactionPhysics.get() );
=== modified file 'pkg/common/Engine/PartialEngine/CinemCNCEngine.hpp'
--- pkg/common/Engine/PartialEngine/CinemCNCEngine.hpp 2010-02-09 20:22:04 +0000
+++ pkg/common/Engine/PartialEngine/CinemCNCEngine.hpp 2010-02-26 17:01:36 +0000
@@ -15,42 +15,22 @@
#include<yade/pkg-dem/NormalInelasticityLaw.hpp>
-/*! \brief To apply a constant normal stress shear for a parallelogram box (simple shear)
-
-This engine, used in simulations issued from "DirectShearCis" Preprocessor, allows to translate horizontally the upper plate while the lateral ones rotate so that they always keep contact with the lower and upper walls
-In fact the upper plate can move not only horizontally but also vertically, so that the normal stress acting on it remains constant (this constant value is not choosen by the user but is the one that exists at the beginning of the simulation)
-The right vertical displacements which will be allowed are computed from the rigidity Kn of the sample over the wall (so to cancel a deltaSigma, a normal dplt deltaSigma*S/(Kn) is set)
-The movement is moreover controlled by the user via a "shearSpeed" which will be the speed of the upper wall, and by a maximum value of horizontal displacement "gammalim", after which the shear stops.
-
-
-Nota : not only the positions of walls are updated but also their speeds, which is all but useless considering the fact that in the contact laws these velocities of bodies are used to compute values of tangential relative displacements
-
-!!WARNING!! : But, because of this last point, if you want to use later saves of simulations executed with this Engine, but without that stopMovement was executed, your boxes will keep their speeds => you will have to cancel them "by hand" in the .xml
-*/
class CinemCNCEngine : public PartialEngine
{
private :
shared_ptr<NormalInelasticityLaw> myLdc;
- Real coeff_dech; // in the case of the use of "NormalInelasticityLaw" for ex where kn(unload)#kn(load). The engine cares to find the value at the first run
Real alpha // angle from the lower plate to the left box (trigo wise), the Engine finds itself its value
,dalpha // the increment over alpha, due to vertical displacement of upper box
- ,gamma // horizontal displacement done since the launch of the calcul first step
- ,Y0 // the height of the upper plate at the very first time step
,deltaU // the vertical increment of displacement to allow on the upper plate on this time step to verify the constant normal stress
- ,F_0 // the (vertical) force acting on the upper plate on the very first time step
,stiffness // the normal stifness on the sample acting below the upper plate
- ,previousdeltaU
- ;
-
- int temoin,it_stop
- ,it_depart // the number of the first it at which plates are moved
- ;
- Vector3r prevF_sup; // the force acting on the upper plate at the previous time step
-
-
- bool firstRun; // set to true as soon as the engine has done its job one time : usefull to know if the force acting on the plate is known or not (and if F_0 and Y0 were initialized)
+ ;
+
+ int temoin,// utile pour savoir ou on en est
+ it_stop
+ ;
+
shared_ptr<Body> leftbox;
shared_ptr<Body> rightbox;
shared_ptr<Body> frontbox;
@@ -58,41 +38,39 @@
shared_ptr<Body> topbox;
shared_ptr<Body> boxbas;
public :
- CinemCNCEngine();
void applyCondition(Scene * body)
,computeAlpha()
;
- Real shearSpeed // to be defined in the PreProcessor
- ,gammalim // the maximum value of the horizontal displacemt
- ,max_vel // to compute the maximum correction displacement that could be imposed in one time step to the upper plate
- ,wallDamping
- ;
-
- std::vector<Real> gamma_save // the values of gamma, in meters, at which a save is performed
- ,temoin_save
- ;
-
- bool LOG; //controls messages output on screen
-
- body_id_t id_boxhaut, // the id of the upper wall : defined in the constructor
- id_boxbas, // the id of the lower wall : defined in the constructor
- id_boxleft,
- id_boxright,
- id_boxfront,
- id_boxback;
- string Key;
-
-
-
protected :
- REGISTER_ATTRIBUTES(PartialEngine,(shearSpeed)(gammalim)(gamma)(gamma_save)(temoin_save)(prevF_sup)(firstRun)(id_boxhaut)(id_boxbas)(id_boxleft)(id_boxright)(id_boxfront)(id_boxback)(Y0)(F_0)(max_vel)(wallDamping)(Key)(LOG)(coeff_dech));
void letMove(Scene* body);
void computeDu(Scene* ncb);
void stopMovement(); // to cancel all the velocities when gammalim is reached
void computeStiffness(Scene* ncb);
- REGISTER_CLASS_NAME(CinemCNCEngine);
- REGISTER_BASE_CLASS_NAME(PartialEngine);
+
+ YADE_CLASS_BASE_DOC_ATTRS_CTOR(CinemCNCEngine,PartialEngine,
+ "To apply a constant normal stress shear for a parallelogram box (simple shear)\n\n This engine, used in simulations issued from 'DirectShearCis' Preprocessor, allows to translate horizontally the upper plate while the lateral ones rotate so that they always keep contact with the lower and upper walls.\n In fact the upper plate can move not only horizontally but also vertically, so that the normal stress acting on it remains constant (this constant value is not choosen by the user but is the one that exists at the beginning of the simulation)\n The right vertical displacements which will be allowed are computed from the rigidity Kn of the sample over the wall (so to cancel a deltaSigma, a normal dplt deltaSigma*S/(Kn) is set)\n The movement is moreover controlled by the user via a 'shearSpeed' which will be the speed of the upper wall, and by a maximum value of horizontal displacement 'gammalim', after which the shear stops.\n \nNota : not only the positions of walls are updated but also their speeds, which is all but useless considering the fact that in the contact laws these velocities of bodies are used to compute values of tangential relative displacements.\n!!WARNING!! : But, because of this last point, if you want to use later saves of simulations executed with this Engine, but without that stopMovement was executed, your boxes will keep their speeds => you will have to cancel them 'by hand' in the .xml",
+ ((Real,shearSpeed,0.0,"the speed at wich the shearing is performed [m/s]"))
+ ((Real,gammalim,0.0,"the value of tangential displacement at wich the shearing is stopped [m]"))
+ ((Real,gamma,0.0,"current value of tangential displacement [m]"))
+ ((std::vector<Real>,gamma_save,,"vector with the values of gamma at which a save of the simulation is performed [m]"))
+ ((std::vector<Real>,temoin_save,,"vector (same length as 'gamma_save'), with 0 or 1 depending whether the save for the corresponding value of gamma has been done (1) or not (0)"))
+ ((bool,firstRun,true,"boolean set to false as soon as the engine has done its job one time : usefull to know if the force acting on the plate is known or not (and if F_0 has to be initialized)"))
+ ((body_id_t,id_topbox,3,"the id of the upper wall"))
+ ((body_id_t,id_boxbas,1,"the id of the lower wall"))
+ ((body_id_t,id_boxleft,0,"the id of the left wall"))
+ ((body_id_t,id_boxright,2,"the id of the right wall"))
+ ((body_id_t,id_boxfront,5,"the id of the wall in front of the sample"))
+ ((body_id_t,id_boxback,4,"the id of the wall at the back of the sample"))
+ ((Real,F_0,0.0,"the (vertical) force acting on the upper plate on the very first time step (determined by the Engine). All control will be performed in order to keep this value of F_0 [N]"))
+ ((Real,max_vel,1.0,"to limit the speed of the vertical displacements done to maintain F equal to F_0 [m/s]"))
+ ((Real,wallDamping,0.2,"the vertical displacements done to maintain F equal to F_0 are in fact damped, through this wallDamping"))
+ ((string,Key,"","string to add at the names of the saved files"))
+ ((bool,LOG,false,"boolean controling the output of messages on the screen"))
+ ((Real,coeff_dech,1.0,"in the case of the use of 'NormalInelasticityLaw' for ex, where kn(unload)#kn(load). The engine cares to find the value at the first run")),
+ alpha=Mathr::PI/2.0;
+ temoin=0;
+ );
};
REGISTER_SERIALIZABLE(CinemCNCEngine);
=== modified file 'pkg/dem/DataClass/InteractionPhysics/NormalInelasticityPhys.cpp'
--- pkg/dem/DataClass/InteractionPhysics/NormalInelasticityPhys.cpp 2010-02-08 10:38:35 +0000
+++ pkg/dem/DataClass/InteractionPhysics/NormalInelasticityPhys.cpp 2010-02-26 17:01:36 +0000
@@ -9,24 +9,24 @@
#include "NormalInelasticityPhys.hpp"
-NormalInelasticityPhys::NormalInelasticityPhys()
-{
- createIndex();
-
-// assign neutral value
- orientationToContact1 = Quaternionr(1.0,0.0,0.0,0.0);
- orientationToContact2 = Quaternionr(1.0,0.0,0.0,0.0);
- initialOrientation1 = Quaternionr(1.0,0.0,0.0,0.0);
- initialOrientation2 = Quaternionr(1.0,0.0,0.0,0.0);
- kr = 0;
- currentContactOrientation = Quaternionr(1.0,0.0,0.0,0.0);
- initialContactOrientation = Quaternionr(1.0,0.0,0.0,0.0);
- initialPosition1=initialPosition2=Vector3r(1,0,0);
- unMax = 0;
- previousun = 0;
- previousFn = 0;
-
-}
+// NormalInelasticityPhys::NormalInelasticityPhys()
+// {
+// createIndex();
+//
+// // assign neutral value
+// orientationToContact1 = Quaternionr(1.0,0.0,0.0,0.0);
+// orientationToContact2 = Quaternionr(1.0,0.0,0.0,0.0);
+// initialOrientation1 = Quaternionr(1.0,0.0,0.0,0.0);
+// initialOrientation2 = Quaternionr(1.0,0.0,0.0,0.0);
+// kr = 0;
+// currentContactOrientation = Quaternionr(1.0,0.0,0.0,0.0);
+// initialContactOrientation = Quaternionr(1.0,0.0,0.0,0.0);
+// initialPosition1=initialPosition2=Vector3r(1,0,0);
+// unMax = 0;
+// previousun = 0;
+// previousFn = 0;
+//
+// }
void NormalInelasticityPhys::SetBreakingState()
{
=== modified file 'pkg/dem/DataClass/InteractionPhysics/NormalInelasticityPhys.hpp'
--- pkg/dem/DataClass/InteractionPhysics/NormalInelasticityPhys.hpp 2010-02-08 10:38:35 +0000
+++ pkg/dem/DataClass/InteractionPhysics/NormalInelasticityPhys.hpp 2010-02-26 17:01:36 +0000
@@ -18,28 +18,28 @@
class NormalInelasticityPhys : public FrictPhys
{
public :
- Real unMax, // the maximum value of penetration depth of the history of this interaction
- previousun, // the value of this un at the last time step
- previousFn // the value of the normal force at the last time step
- ,forMaxMoment // for the maximum value of elastic momentum
- ,kr // rolling stiffness
- ;
-
- Quaternionr initialOrientation1,initialOrientation2,
- orientationToContact1,orientationToContact2,
- currentContactOrientation,initialContactOrientation;
- Vector3r initialPosition1,initialPosition2;
-
- NormalInelasticityPhys();
+// NormalInelasticityPhys();
virtual ~NormalInelasticityPhys();
void SetBreakingState ();
- REGISTER_ATTRIBUTES(FrictPhys,(unMax)(previousun)(previousFn)(initialOrientation1)(initialOrientation2)(orientationToContact1)(orientationToContact2)(currentContactOrientation)(initialContactOrientation)(initialPosition1)(initialPosition2)(forMaxMoment)(kr));
- REGISTER_CLASS_NAME(NormalInelasticityPhys);
- REGISTER_BASE_CLASS_NAME(FrictPhys);
-
+ YADE_CLASS_BASE_DOC_ATTRS_CTOR(NormalInelasticityPhys,FrictPhys,
+ "Physics (of interaction) for using NormalInelasticityLaw",
+ ((Real,unMax,0.0,"the maximum value of penetration depth of the history of this interaction"))
+ ((Real,previousun,0.0,"the value of this un at the last time step"))
+ ((Real,previousFn,0.0,"the value of the normal force at the last time step"))
+ ((Quaternionr,initialOrientation1,Quaternionr(1.0,0.0,0.0,0.0),""))
+ ((Quaternionr,initialOrientation2,Quaternionr(1.0,0.0,0.0,0.0),""))
+ ((Quaternionr,orientationToContact1,Quaternionr(1.0,0.0,0.0,0.0),""))
+ ((Quaternionr,orientationToContact2,Quaternionr(1.0,0.0,0.0,0.0),""))
+ ((Quaternionr,currentContactOrientation,Quaternionr(1.0,0.0,0.0,0.0),""))
+ ((Quaternionr,initialContactOrientation,Quaternionr(1.0,0.0,0.0,0.0),""))
+ ((Vector3r,initialPosition1,Quaternionr(1.0,0.0,0.0,0.0),""))
+ ((Vector3r,initialPosition2,Quaternionr(1.0,0.0,0.0,0.0),""))
+ ((Real,forMaxMoment,1.0,"parameter stored for each interaction, and allowing to compute the maximum value of the exchanged torque : TorqueMax= forMaxMoment * NormalForce"))
+ ((Real,kr,0.0,"the rolling stiffness of the rigidity")),
+ createIndex();
+ );
REGISTER_CLASS_INDEX(NormalInelasticityPhys,FrictPhys);
-
};
REGISTER_SERIALIZABLE(NormalInelasticityPhys);
=== modified file 'pkg/dem/Engine/Functor/Ip2_2xCohFrictMat_NormalInelasticityPhys.cpp'
--- pkg/dem/Engine/Functor/Ip2_2xCohFrictMat_NormalInelasticityPhys.cpp 2010-02-08 10:38:35 +0000
+++ pkg/dem/Engine/Functor/Ip2_2xCohFrictMat_NormalInelasticityPhys.cpp 2010-02-26 17:01:36 +0000
@@ -9,22 +9,20 @@
#include"Ip2_2xCohFrictMat_NormalInelasticityPhys.hpp"
#include<yade/pkg-dem/ScGeom.hpp>
#include<yade/pkg-dem/NormalInelasticityPhys.hpp>
-// #include<yade/pkg-dem/SDECLinkGeometry.hpp> // FIXME - I can't dispatch by SDECLinkGeometry <-> ScGeom !!?
-// #include<yade/pkg-dem/SDECLinkPhysics.hpp> // FIXME
#include<yade/pkg-dem/CohesiveFrictionalMat.hpp>
#include<yade/core/Omega.hpp>
#include<yade/core/Scene.hpp>
-Ip2_2xCohFrictMat_NormalInelasticityPhys::Ip2_2xCohFrictMat_NormalInelasticityPhys()
-{
- betaR = 0.12;
- setCohesionNow = false;
- setCohesionOnNewContacts = false;
- cohesionDefinitionIteration = -1;
-
-// elasticRollingLimit = ;
-}
+// Ip2_2xCohFrictMat_NormalInelasticityPhys::Ip2_2xCohFrictMat_NormalInelasticityPhys()
+// {
+// betaR = 0.12;
+// setCohesionNow = false;
+// setCohesionOnNewContacts = false;
+// cohesionDefinitionIteration = -1;
+//
+// // elasticRollingLimit = ;
+// }
=== modified file 'pkg/dem/Engine/Functor/Ip2_2xCohFrictMat_NormalInelasticityPhys.hpp'
--- pkg/dem/Engine/Functor/Ip2_2xCohFrictMat_NormalInelasticityPhys.hpp 2010-02-08 10:38:35 +0000
+++ pkg/dem/Engine/Functor/Ip2_2xCohFrictMat_NormalInelasticityPhys.hpp 2010-02-26 17:01:36 +0000
@@ -19,25 +19,23 @@
class Ip2_2xCohFrictMat_NormalInelasticityPhys : public InteractionPhysicsFunctor
{
public :
- Ip2_2xCohFrictMat_NormalInelasticityPhys();
+// Ip2_2xCohFrictMat_NormalInelasticityPhys();
virtual void go( const shared_ptr<Material>& b1,
const shared_ptr<Material>& b2,
const shared_ptr<Interaction>& interaction);
-
- Real betaR; // a parameter for computing the maximum value of momentum
- // FIXME : should be better in an other place ?? (like the bodies parameters ?) but for me it was here finally the better place...
-
- bool setCohesionNow,
- setCohesionOnNewContacts;
- int cohesionDefinitionIteration;
- long iter;//REMOVE THIS
+ int cohesionDefinitionIteration; //useful is you want to use setCohesionNow
FUNCTOR2D(CohesiveFrictionalMat,CohesiveFrictionalMat);
- REGISTER_CLASS_NAME(Ip2_2xCohFrictMat_NormalInelasticityPhys);
- REGISTER_BASE_CLASS_NAME(InteractionPhysicsFunctor);
- REGISTER_ATTRIBUTES(InteractionPhysicsFunctor,(betaR)(setCohesionNow)(setCohesionOnNewContacts));
+ YADE_CLASS_BASE_DOC_ATTRS_CTOR(Ip2_2xCohFrictMat_NormalInelasticityPhys,
+ InteractionPhysicsFunctor,
+ "The RelationShips for using NormalInelasticityLaw\n \n In these RelationShips all the attributes of the interactions (which are of NormalInelasticityPhys type) are computed. \n WARNING : as in the others Relationships most of the attributes are computed only once : when the interaction is (new)",
+ ((Real,betaR,0.12,"Parameter for computing the torque-stifness : T-stifness = betaR * Rmoy^2"))
+ ((bool,setCohesionNow,false,""))
+ ((bool,setCohesionOnNewContacts,false,"")),
+ cohesionDefinitionIteration=-1;
+ );
};
REGISTER_SERIALIZABLE(Ip2_2xCohFrictMat_NormalInelasticityPhys);
=== modified file 'pkg/dem/Engine/GlobalEngine/NormalInelasticityLaw.cpp'
--- pkg/dem/Engine/GlobalEngine/NormalInelasticityLaw.cpp 2010-02-09 20:22:04 +0000
+++ pkg/dem/Engine/GlobalEngine/NormalInelasticityLaw.cpp 2010-02-26 17:01:36 +0000
@@ -17,16 +17,16 @@
// <<<<<<< TREE
-NormalInelasticityLaw::NormalInelasticityLaw() : GlobalEngine()
-// =======
-// ContactLaw1::ContactLaw1() : GlobalEngine()
-// >>>>>>> MERGE-SOURCE
-{
- sdecGroupMask=1;
- momentRotationLaw = true;
- coeff_dech=1.0;
- momentAlwaysElastic=false;
-}
+// NormalInelasticityLaw::NormalInelasticityLaw() : GlobalEngine()
+// // =======
+// // ContactLaw1::ContactLaw1() : GlobalEngine()
+// // >>>>>>> MERGE-SOURCE
+// {
+// sdecGroupMask=1;
+// momentRotationLaw = true;
+// coeff_dech=1.0;
+// momentAlwaysElastic=false;
+// }
=== modified file 'pkg/dem/Engine/GlobalEngine/NormalInelasticityLaw.hpp'
--- pkg/dem/Engine/GlobalEngine/NormalInelasticityLaw.hpp 2010-02-08 10:38:35 +0000
+++ pkg/dem/Engine/GlobalEngine/NormalInelasticityLaw.hpp 2010-02-26 17:01:36 +0000
@@ -13,43 +13,24 @@
#include <set>
#include <boost/tuple/tuple.hpp>
-/*! \brief Contact law including cohesion, moment transfer and inelastic compression behaviour
-
-This contact Law is inspired by CohesiveFrictionalContactLaw (inspired itselve directly from the work of Plassiard & Belheine, see the corresponding articles in "Annual Report 2006" in http://geo.hmg.inpg.fr/frederic/Discrete_Element_Group_FVD.html for example). It allows so to set moments, cohesion, tension limit and (that's the difference) inelastic unloadings in compression between bodies.
-All that concerned brokenBodies (this flag and the erosionactivated one) and the useless "iter" has been suppressed.
-
-The Relationsships corresponding are Ip2_2xCohFrictMat_NormalInelasticityPhys, where the rigidities, the friction angles (with their tan()), and the orientations of the interactions are calculated. No more cohesion and tension limits are computed for all the interactions
-To use it you should also use :
-- CohesiveFrictionalMat for the bodies, with "isCohesive" = 1 (A verifier ce dernier point)
-- Ip2_2xCohFrictMat_NormalInelasticityPhys (=> which involves interactions of "NormalInelasticityPhys" type)
+/*! \brief
*/
-// <<<<<<< TREE
class NormalInelasticityLaw : public GlobalEngine
-// =======
-// class ContactLaw1 : public GlobalEngine
-// >>>>>>> MERGE-SOURCE
{
/// Attributes
public :
- int sdecGroupMask;
- Real coeff_dech; // = kn(unload) / kn(load)
- bool momentRotationLaw;
- bool momentAlwaysElastic; // if true the value of the momentum (computed only if momentRotationLaw !!) is not limited by a plastic threshold
-
- NormalInelasticityLaw();
void action(Scene*);
-// <<<<<<< TREE
- REGISTER_ATTRIBUTES(GlobalEngine,(sdecGroupMask)(momentRotationLaw)(coeff_dech)(momentAlwaysElastic));
- REGISTER_CLASS_NAME(NormalInelasticityLaw);
- REGISTER_BASE_CLASS_NAME(GlobalEngine);
-// =======
-// REGISTER_ATTRIBUTES(GlobalEngine,(sdecGroupMask)(momentRotationLaw)(coeff_dech)(momentAlwaysElastic));
-// REGISTER_CLASS_NAME(ContactLaw1);
-// REGISTER_BASE_CLASS_NAME(GlobalEngine);
-// >>>>>>> MERGE-SOURCE
+ YADE_CLASS_BASE_DOC_ATTRS(NormalInelasticityLaw,
+ GlobalEngine,
+ "Contact law including cohesion, moment transfer and inelastic compression behaviour\n\n This contact Law is inspired by CohesiveFrictionalContactLaw (inspired itselve directly from the work of Plassiard & Belheine, see the corresponding articles in (Annual Report 2006) in http://geo.hmg.inpg.fr/frederic/Discrete_Element_Group_FVD.html for example).\n It allows so to set moments, cohesion, tension limit and (that's the difference) inelastic unloadings in compression between bodies. All that concerned brokenBodies (this flag and the erosionactivated one) and the useless 'iter' has been suppressed.\n The Relationsships corresponding are Ip2_2xCohFrictMat_NormalInelasticityPhys, where the rigidities, the friction angles (with their tan()), and the orientations of the interactions are calculated. No more cohesion and tension limits are computed for all the interactions.\n To use it you should also use :\n- CohesiveFrictionalMat for the bodies, with 'isCohesive' = 1 (A verifier ce dernier point)\n- Ip2_2xCohFrictMat_NormalInelasticityPhys (=> which involves interactions of 'NormalInelasticityPhys' type)",
+ ((int,sdecGroupMask,1,"?"))
+ ((Real,coeff_dech,1.0,"=kn(unload) / kn(load)"))
+ ((bool,momentRotationLaw,true,"boolean, true=> computation of a torque (against relative rotation) exchanged between particles"))
+ ((bool,momentAlwaysElastic,false,"boolean, true=> the torque (computed only if momentRotationLaw !!) is not limited by a plastic threshold"))
+ );
};
REGISTER_SERIALIZABLE(NormalInelasticityLaw);
Follow ups