yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #03573
[Branch ~yade-dev/yade/trunk] Rev 2074: Renaming of Cinem...Engine in an english way :
------------------------------------------------------------
revno: 2074
committer: jduriez <jduriez@c1solimara-l>
branch nick: trunk
timestamp: Wed 2010-03-10 12:37:28 +0100
message:
Renaming of Cinem...Engine in an english way :
- CNC = Constant Normal Load => CNL
- KNC = Constant Normal Stifness => CNS
- DNC = Constant Normal Displacement => CND
- DTC = Constant Tangential Displacement => CTD
Add of Disp2DPropLoadEngine, not correctly written yet, and so compilation disabled (please keep it not in attic, I will do this rapidly)
added:
pkg/dem/Engine/PartialEngine/Disp2DPropLoadEngine.cpp
pkg/dem/Engine/PartialEngine/Disp2DPropLoadEngine.hpp
renamed:
pkg/common/Engine/PartialEngine/CinemCNCEngine.cpp => pkg/dem/Engine/PartialEngine/KinemCNLEngine.cpp
pkg/common/Engine/PartialEngine/CinemCNCEngine.hpp => pkg/dem/Engine/PartialEngine/KinemCNLEngine.hpp
pkg/common/Engine/PartialEngine/CinemDNCEngine.cpp => pkg/common/Engine/PartialEngine/KinemCNDEngine.cpp
pkg/common/Engine/PartialEngine/CinemDNCEngine.hpp => pkg/common/Engine/PartialEngine/KinemCNDEngine.hpp
pkg/common/Engine/PartialEngine/CinemKNCEngine.cpp => pkg/dem/Engine/PartialEngine/KinemCNSEngine.cpp
pkg/common/Engine/PartialEngine/CinemKNCEngine.hpp => pkg/dem/Engine/PartialEngine/KinemCNSEngine.hpp
modified:
pkg/dem/PreProcessor/DirectShearCis.cpp
pkg/dem/PreProcessor/SimpleShear.cpp
pkg/dem/PreProcessor/SimpleShear.hpp
py/system.py
pkg/dem/Engine/PartialEngine/KinemCNLEngine.cpp
pkg/dem/Engine/PartialEngine/KinemCNLEngine.hpp
pkg/common/Engine/PartialEngine/KinemCNDEngine.cpp
pkg/common/Engine/PartialEngine/KinemCNDEngine.hpp
pkg/dem/Engine/PartialEngine/KinemCNSEngine.cpp
pkg/dem/Engine/PartialEngine/KinemCNSEngine.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/common/Engine/PartialEngine/CinemDNCEngine.cpp' => 'pkg/common/Engine/PartialEngine/KinemCNDEngine.cpp'
--- pkg/common/Engine/PartialEngine/CinemDNCEngine.cpp 2010-02-09 20:22:04 +0000
+++ pkg/common/Engine/PartialEngine/KinemCNDEngine.cpp 2010-03-10 11:37:28 +0000
@@ -9,10 +9,10 @@
#include<yade/core/Scene.hpp>
#include<yade/lib-base/Math.hpp>
-#include"CinemDNCEngine.hpp"
-
-
-CinemDNCEngine::CinemDNCEngine() : leftbox(new Body), rightbox(new Body), topbox(new Body)
+#include"KinemCNDEngine.hpp"
+
+
+KinemCNDEngine::KinemCNDEngine() : leftbox(new Body), rightbox(new Body), topbox(new Body)
{
gamma_save.resize(0);
temoin_save.resize(0);
@@ -26,7 +26,7 @@
}
-void CinemDNCEngine::applyCondition(Scene * ncb)
+void KinemCNDEngine::applyCondition(Scene * ncb)
{
leftbox = Body::byId(id_boxleft);
rightbox = Body::byId(id_boxright);
@@ -61,7 +61,7 @@
}
-void CinemDNCEngine::letMove(Scene * ncb)
+void KinemCNDEngine::letMove(Scene * ncb)
{
shared_ptr<BodyContainer> bodies = ncb->bodies;
Real dt = Omega::instance().getTimeStep();
@@ -107,7 +107,7 @@
}
-void CinemDNCEngine::computeAlpha()
+void KinemCNDEngine::computeAlpha()
{
Quaternionr orientationLeftBox,orientationRightBox;
orientationLeftBox = leftbox->state->ori;
@@ -122,7 +122,7 @@
alpha=Mathr::PI/2.0-angle; // right if the initial orientation of the body (on the beginning of the simulation) is q =(1,0,0,0) = FromAxisAngle((0,0,1),0)
}
-void CinemDNCEngine::stopMovement()
+void KinemCNDEngine::stopMovement()
{
// annulation de la vitesse de la plaque du haut
topbox->state->vel = Vector3r(0,0,0);
=== renamed file 'pkg/common/Engine/PartialEngine/CinemDNCEngine.hpp' => 'pkg/common/Engine/PartialEngine/KinemCNDEngine.hpp'
--- pkg/common/Engine/PartialEngine/CinemDNCEngine.hpp 2010-02-09 20:22:04 +0000
+++ pkg/common/Engine/PartialEngine/KinemCNDEngine.hpp 2010-03-10 11:37:28 +0000
@@ -18,7 +18,7 @@
*/
-class CinemDNCEngine : public PartialEngine
+class KinemCNDEngine : public PartialEngine
{
private :
Real alpha // angle from the lower plate to the left box (trigo wise), the Engine finds itself its value
@@ -36,7 +36,7 @@
public :
- CinemDNCEngine();
+ KinemCNDEngine();
void applyCondition(Scene * body),
computeAlpha();
@@ -53,10 +53,10 @@
protected :
REGISTER_ATTRIBUTES(PartialEngine,(shearSpeed)(gammalim)(gamma)(gamma_save)(temoin_save)(id_boxhaut)(id_boxleft)(id_boxright)(Key));
- REGISTER_CLASS_NAME(CinemDNCEngine);
+ REGISTER_CLASS_NAME(KinemCNDEngine);
REGISTER_BASE_CLASS_NAME(PartialEngine);
};
-REGISTER_SERIALIZABLE(CinemDNCEngine);
+REGISTER_SERIALIZABLE(KinemCNDEngine);
=== added file 'pkg/dem/Engine/PartialEngine/Disp2DPropLoadEngine.cpp'
--- pkg/dem/Engine/PartialEngine/Disp2DPropLoadEngine.cpp 1970-01-01 00:00:00 +0000
+++ pkg/dem/Engine/PartialEngine/Disp2DPropLoadEngine.cpp 2010-03-10 11:37:28 +0000
@@ -0,0 +1,266 @@
+/*************************************************************************
+* Copyright (C) 2008 by Jerome Duriez *
+* jerome.duriez@xxxxxxxxxxx *
+* *
+* 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 "Disp2DPropLoadEngine.hpp"
+#include<yade/core/State.hpp>
+#include<yade/pkg-common/Force.hpp>
+#include<yade/pkg-common/Box.hpp>
+#include<yade/core/Scene.hpp>
+// #include<yade/lib-base/yadeWm3Extra.hpp>
+#include <yade/lib-miniWm3/Wm3Math.h>
+
+
+YADE_REQUIRE_FEATURE(PHYSPAR);
+
+Disp2DPropLoadEngine::Disp2DPropLoadEngine() : actionForce(new Force), leftbox(new Body), rightbox(new Body), frontbox(new Body), backbox(new Body), topbox(new Body), boxbas(new Body)
+{
+ firstIt=true;
+ v=0.0;
+ alpha=Mathr::PI/2.0;;
+ id_topbox=3;
+ id_boxbas=1;
+ id_boxleft=0;
+ id_boxright=2;
+ id_boxfront=5;
+ id_boxback=4;
+ Key="";
+}
+
+void Disp2DPropLoadEngine::postProcessAttributes(bool deserializing)
+{
+ if(deserializing)
+ {
+ std::string outputFile="DirSearch" + Key + "Yade";
+ bool file_exists = std::ifstream (outputFile.c_str()); //if file does not exist, we will write colums titles
+ ofile.open(outputFile.c_str(), std::ios::app);
+ if (!file_exists) ofile<<"theta (!angle ds plan (gamma,-du) )dtau (kPa) dsigma (kPa) dgamma (m) du (m) tau0 (kPa) sigma0 (kPa) d2W coordSs0 coordTot0 coordSsF coordTotF (Yade)" << endl;
+ }
+}
+
+
+void Disp2DPropLoadEngine::registerAttributes()
+{
+ DeusExMachina::registerAttributes();
+ REGISTER_ATTRIBUTE(id_topbox);
+ REGISTER_ATTRIBUTE(id_boxbas);
+ REGISTER_ATTRIBUTE(id_boxleft);
+ REGISTER_ATTRIBUTE(id_boxright);
+ REGISTER_ATTRIBUTE(id_boxfront);
+ REGISTER_ATTRIBUTE(id_boxback);
+ REGISTER_ATTRIBUTE(v);
+ REGISTER_ATTRIBUTE(theta);
+ REGISTER_ATTRIBUTE(nbre_iter);
+ REGISTER_ATTRIBUTE(Key);
+ REGISTER_ATTRIBUTE(LOG);
+}
+
+
+void Disp2DPropLoadEngine::applyCondition(Scene* ncb)
+{
+ if(LOG) cerr << "debut applyCondi !!" << endl;
+ leftbox = Body::byId(id_boxleft);
+ rightbox = Body::byId(id_boxright);
+ frontbox = Body::byId(id_boxfront);
+ backbox = Body::byId(id_boxback);
+ topbox = Body::byId(id_topbox);
+ boxbas = Body::byId(id_boxbas);
+
+ if(firstIt)
+ {
+ it_begin=Omega::instance().getCurrentIteration();
+ H0=topbox->state->pos.Y();
+ X0=topbox->state->pos.X();
+ Vector3r F_sup=ncb->forces.getForce(id_topbox);
+ Fn0=F_sup.Y();
+ Ft0=F_sup.X();
+
+ Real OnlySsInt=0 // the half number of real sphere-sphere (only) interactions, at the beginning of the perturbation
+ ,TotInt=0 // the half number of all the real interactions, at the beginning of the perturbation
+ ;
+
+ InteractionContainer::iterator ii = ncb->interactions->begin();
+ InteractionContainer::iterator iiEnd = ncb->interactions->end();
+ for( ; ii!=iiEnd ; ++ii )
+ {
+ if ((*ii)->isReal)
+ {
+ TotInt++;
+ const shared_ptr<Body>& b1 = Body::byId( (*ii)->getId1() );
+ const shared_ptr<Body>& b2 = Body::byId( (*ii)->getId2() );
+ if ( (b1->isDynamic) && (b2->isDynamic) )
+ OnlySsInt++;
+ }
+ }
+
+ coordSs0 = OnlySsInt/8590; // 8590 is the number of spheres in the CURRENT case
+ coordTot0 = TotInt / 8596; // 8596 is the number of bodies in the CURRENT case
+
+ firstIt=false;
+ }
+
+
+ if ( (Omega::instance().getCurrentIteration()-it_begin) < nbre_iter)
+ { letDisturb(ncb);
+ }
+ else if ( (Omega::instance().getCurrentIteration()-it_begin) == nbre_iter)
+ {
+ stopMovement();
+ string fileName=Key + "DR"+lexical_cast<string> (nbre_iter)+"ItAtV_"+lexical_cast<string> (v)+"done.xml";
+// Omega::instance().saveSimulation ( fileName );
+ saveData(ncb);
+ }
+}
+
+void Disp2DPropLoadEngine::letDisturb(Scene* ncb)
+{
+// shared_ptr<BodyContainer> bodies = ncb->bodies;
+
+ Real dt = Omega::instance().getTimeStep();
+ dgamma=cos(theta*Mathr::PI/180.0)*v*dt;
+ dh=sin(theta*Mathr::PI/180.0)*v*dt;
+
+ Real Ysup = topbox->state->pos.Y();
+ Real Ylat = leftbox->state->pos.Y();
+
+// Changes in vertical and horizontal position :
+
+ topbox->state->pos += Vector3r(dgamma,dh,0);
+
+ leftbox->state->pos += Vector3r(dgamma/2.0,dh/2.0,0);
+ rightbox->state->pos += Vector3r(dgamma/2.0,dh/2.0,0);
+
+ Real Ysup_mod = topbox->state->pos.Y();
+ Real Ylat_mod = leftbox->state->pos.Y();
+
+// with the corresponding velocities :
+ topbox->state->vel=Vector3r(dgamma/dt,dh/dt,0);
+
+ leftbox->state->vel = Vector3r((dgamma/dt)/2.0,dh/(2.0*dt),0);
+
+ rightbox->state->vel = Vector3r((dgamma/dt)/2.0,dh/(2.0*dt),0);
+
+// Then computation of the angle of the rotation to be done :
+ computeAlpha();
+ if (alpha == Mathr::PI/2.0) // Case of the very beginning
+ {
+ dalpha = - Mathr::ATan( dgamma / (Ysup_mod -Ylat_mod) );
+ }
+ else
+ {
+ Real A = (Ysup_mod - Ylat_mod) * 2.0*Mathr::Tan(alpha) / (2.0*(Ysup - Ylat) + dgamma*Mathr::Tan(alpha) );
+ dalpha = Mathr::ATan( (A - Mathr::Tan(alpha))/(1.0 + A * Mathr::Tan(alpha)));
+ }
+
+ Quaternionr qcorr;
+ qcorr.FromAxisAngle(Vector3r(0,0,1),dalpha);
+ if(LOG)
+ cout << "Quaternion associe a la rotation incrementale : " << qcorr.W() << " " << qcorr.X() << " " << qcorr.Y() << " " << qcorr.Z() << endl;
+
+// On applique la rotation en changeant l'orientation des plaques, leurs vang et en affectant donc alpha
+/* rb = dynamic_cast<RigidBodyParameters*>(leftbox->physicalParameters.get());
+ rb->se3.orientation = qcorr*rb->se3.orientation;*/
+ leftbox->state->ori = qcorr*leftbox->state->ori;
+ leftbox->state->angVel = Vector3r(0,0,1)*dalpha/dt;
+
+
+ rb = dynamic_cast<RigidBodyParameters*>(rightbox->physicalParameters.get());
+ rightbox->state->ori = qcorr*leftbox->state->ori;
+ rightbox->state->angVel = Vector3r(0,0,1)*dalpha/dt;
+
+}
+
+
+
+void Disp2DPropLoadEngine::computeAlpha()
+{
+ Quaternionr orientationLeftBox,orientationRightBox;
+ orientationLeftBox = leftbox->state->ori;
+ orientationRightBox = rightbox->state->ori;
+ if(orientationLeftBox!=orientationRightBox)
+ {
+ cout << "WARNING !!! your lateral boxes have not the same orientation, you're not in the case of a box imagined for creating these engines" << endl;
+ }
+ Vector3r axis;
+ Real angle;
+ orientationLeftBox.ToAxisAngle(axis,angle);
+ alpha=Mathr::PI/2.0-angle; // right if the initial orientation of the body (on the beginning of the simulation) is q =(1,0,0,0) = FromAxisAngle((0,0,1),0)
+}
+
+
+void Disp2DPropLoadEngine::stopMovement()
+{
+ // annulation de la vitesse de la plaque du haut
+// RigidBodyParameters * rb = YADE_CAST<RigidBodyParameters*>(topbox->physicalParameters.get());
+ topbox->state->vel = Vector3r(0,0,0);
+
+ // de la plaque gauche
+// rb = YADE_CAST<RigidBodyParameters*>(leftbox->physicalParameters.get());
+ leftbox->state->vel = Vector3r(0,0,0);
+ leftbox->state->angVel = Vector3r(0,0,0);
+
+ // de la plaque droite
+ rightbox->state->vel = Vector3r(0,0,0);
+ rightbox->state->angVel = Vector3r(0,0,0);
+}
+
+
+void Disp2DPropLoadEngine::saveData(Scene* ncb)
+{
+ Real Xleft = leftbox->state->position.X() + (YADE_CAST<Box*>(leftbox->shape.get()))->extents.X();
+
+ Real Xright = rightbox->state->pos.X() - (YADE_CAST<Box*>(rightbox->shape.get()))->extents.X();
+
+ Real Zfront = frontbox->state->pos.Z() - YADE_CAST<Box*>(frontbox->shape.get())->extents.Z();
+ Real Zback = backbox->state->pos.Z() + (YADE_CAST<Box*>(backbox->shape.get()))->extents.Z();
+
+ Real Scontact = (Xright-Xleft)*(Zfront-Zback); // that's so the value of section at the middle of the height of the box
+
+ InteractionContainer::iterator ii = ncb->interactions->begin();
+ InteractionContainer::iterator iiEnd = ncb->interactions->end();
+
+ Real OnlySsInt=0 // the half number of real sphere-sphere (only) interactions, at the end of the perturbation
+ ,TotInt=0 // the half number of all the real interactions, at the end of the perturbation
+ ;
+ for( ; ii!=iiEnd ; ++ii )
+ {
+ if ((*ii)->isReal)
+ {
+ TotInt++;
+ const shared_ptr<Body>& b1 = Body::byId( (*ii)->getId1() );
+ const shared_ptr<Body>& b2 = Body::byId( (*ii)->getId2() );
+ if ( (b1->isDynamic) && (b2->isDynamic) )
+ OnlySsInt++;
+ }
+ }
+
+ Real coordSs = OnlySsInt/8590, // 8590 is the number of spheres in the CURRENT case
+ coordTot = TotInt / 8596; // 8596 is the number of bodies in the CURRENT case
+
+ Vector3r& F_sup = ncb->forces.getForce(id_topbox);
+
+ Real dFn=F_sup.Y()-Fn0 // OK pour le signe
+ ,dFt=(F_sup.X()-Ft0)
+ ,du=-( topbox->state->pos.Y() - H0 ) // OK pour le signe (>0 en compression)
+ ,dgamma=topbox->state->pos.X()-X0
+ ,SigN0 = (Fn0/Scontact)/1000 // en kPa, pour comparer à Fortran
+ ,Tau0 = -(Ft0/Scontact)/1000 // en kPa, pour comparer à Fortran, Ok pour le signe, cf p. Yade29
+ ,dSigN= (dFn/Scontact)/1000 // Ok pour le signe
+ ,dTau = -(dFt/Scontact)/1000 // Ok pour le signe, idem que Tau0
+ ,d2W = dSigN * du + dTau * dgamma
+ ;
+
+ ofile << lexical_cast<string> (theta) << " "<< lexical_cast<string> (dTau) << " " << lexical_cast<string> (dSigN) << " "
+ << lexical_cast<string> (dgamma)<<" " << lexical_cast<string> (du) << " " << lexical_cast<string> (Tau0) << " "
+ << lexical_cast<string> (SigN0) << " " << lexical_cast<string> (d2W) << " "
+ << lexical_cast<string> (coordSs0) << " " << lexical_cast<string> (coordTot0) << " "
+ << lexical_cast<string> (coordSs) << " " << lexical_cast<string> (coordTot) <<endl;
+}
+
+
+
=== added file 'pkg/dem/Engine/PartialEngine/Disp2DPropLoadEngine.hpp'
--- pkg/dem/Engine/PartialEngine/Disp2DPropLoadEngine.hpp 1970-01-01 00:00:00 +0000
+++ pkg/dem/Engine/PartialEngine/Disp2DPropLoadEngine.hpp 2010-03-10 11:37:28 +0000
@@ -0,0 +1,98 @@
+/*************************************************************************
+* Copyright (C) 2008 by Jerome Duriez *
+* jerome.duriez@xxxxxxxxxxx *
+* *
+* 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. *
+*************************************************************************/
+
+#ifndef DIRECRESEARCHENGINE_HPP
+#define DIRECRESEARCHENGINE_HPP
+
+#include<yade/core/Omega.hpp>
+#include<yade/core/PartialEngine.hpp>
+#include<yade/core/Body.hpp>
+#include <Wm3Vector3.h>
+// #include<yade/lib-base/yadeWm3.hpp>
+
+/*! \brief To disturb a sample in a given direction (initial aim : directionnal research for d²w)
+
+The aim of this engine is to perform what is called a "directionnal research" over a sample. That is to say : considering a sample in a given state, disturbing it in all the directions (directions in the stresses plane for example)
+
+In fact this Engine disturbs in only one direction
+The control will be done in displacements in fact since it is much more easier
+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 Disp2DPropLoadEngine : public DeusExMachina
+{
+ private :
+ shared_ptr<PhysicalAction> actionForce;
+ Real dgamma // the increment of horizontal displacement in one timestep, part of the disturbation
+ ,dh // the increment of vertical displacement in one timestep, part of the disturbation
+ ,H0 // the height of the top box, at the beginnig of the application of the disturbation
+ ,X0 // the X-position of the top box, at the beginnig of the application of the disturbation
+ ,Fn0,Ft0// the normal and tangential force acting on the top box, at...
+ ,coordSs0,coordTot0
+ ;
+ std::ofstream ofile;
+
+ Real alpha // angle from the lower plate to the left box (trigo wise), as in other shear Engines, but here the Engine is able to find itself its value !
+ ,dalpha // the increment over alpha
+ ;
+
+ bool firstIt;// true if this is the first iteration, false else.
+
+ int it_begin// the number of the it at which the computation starts
+ ;
+
+ shared_ptr<Body> leftbox;
+ shared_ptr<Body> rightbox;
+ shared_ptr<Body> frontbox;
+ shared_ptr<Body> backbox;
+ shared_ptr<Body> topbox;
+ shared_ptr<Body> boxbas;
+ void saveData(Scene* ncb);
+ void letDisturb(Scene* ncb);
+ void stopMovement(); // to cancel all the velocities
+
+
+ public :
+ Disp2DPropLoadEngine();
+ void applyCondition(Scene* ncb)
+ ,computeAlpha()
+ ;
+
+ Real v // the speed at which the perturbation is imposed
+ ,theta // the angle, in a (gamma,h) plane from the gamma - axis to the perturbation vector (trigo wise), in degrees For example v = 0.3 - | (0.3-0.04)*sin(theta) | => 0.3 in shear; 0.04 in compression (for 18/11)
+ ;
+
+ int nbre_iter // the number of iterations of disturbation to perform
+ ;
+ bool LOG; //controls messages output on screen
+
+ body_id_t id_topbox, // 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 :
+ virtual void postProcessAttributes(bool deserializing);
+ void registerAttributes();
+ REGISTER_CLASS_NAME(Disp2DPropLoadEngine);
+ REGISTER_BASE_CLASS_NAME(DeusExMachina);
+};
+
+REGISTER_SERIALIZABLE(Disp2DPropLoadEngine,false);
+
+#endif // DIRECRESEARCHENGINE_HPP
+
=== renamed file 'pkg/common/Engine/PartialEngine/CinemCNCEngine.cpp' => 'pkg/dem/Engine/PartialEngine/KinemCNLEngine.cpp'
--- pkg/common/Engine/PartialEngine/CinemCNCEngine.cpp 2010-03-01 13:49:20 +0000
+++ pkg/dem/Engine/PartialEngine/KinemCNLEngine.cpp 2010-03-10 11:37:28 +0000
@@ -6,16 +6,16 @@
* GNU General Public License v2 or later. See file LICENSE for details. *
*************************************************************************/
-#include "CinemCNCEngine.hpp"
+#include "KinemCNLEngine.hpp"
#include<yade/core/State.hpp>
#include<yade/pkg-common/Box.hpp>
#include<yade/pkg-dem/FrictPhys.hpp>
#include<yade/core/Scene.hpp>
#include <yade/lib-base/Math.hpp>
-YADE_PLUGIN((CinemCNCEngine));
+YADE_PLUGIN((KinemCNLEngine));
-void CinemCNCEngine::applyCondition(Scene * ncb)
+void KinemCNLEngine::applyCondition(Scene * ncb)
{
if(LOG) cout << "debut applyCondi du CNCEngine !!" << endl;
leftbox = Body::byId(id_boxleft);
@@ -63,7 +63,7 @@
}
-void CinemCNCEngine::letMove(Scene * ncb)
+void KinemCNLEngine::letMove(Scene * ncb)
{
shared_ptr<BodyContainer> bodies = ncb->bodies;
@@ -121,7 +121,7 @@
}
-void CinemCNCEngine::computeAlpha()
+void KinemCNLEngine::computeAlpha()
{
Quaternionr orientationLeftBox,orientationRightBox;
orientationLeftBox = leftbox->state->ori;
@@ -137,7 +137,7 @@
}
-void CinemCNCEngine::computeDu(Scene* ncb)
+void KinemCNLEngine::computeDu(Scene* ncb)
{
ncb->forces.sync(); Vector3r F_sup=ncb->forces.getForce(id_topbox);
@@ -199,7 +199,7 @@
}
-void CinemCNCEngine::stopMovement()
+void KinemCNLEngine::stopMovement()
{
// annulation de la vitesse de la plaque du haut
topbox->state->vel = Vector3r(0,0,0);
@@ -213,7 +213,7 @@
rightbox->state->angVel = Vector3r(0,0,0);
}
-void CinemCNCEngine::computeStiffness(Scene* ncb)
+void KinemCNLEngine::computeStiffness(Scene* ncb)
{
int nbre_contacts = 0;
stiffness=0.0;
=== renamed file 'pkg/common/Engine/PartialEngine/CinemCNCEngine.hpp' => 'pkg/dem/Engine/PartialEngine/KinemCNLEngine.hpp'
--- pkg/common/Engine/PartialEngine/CinemCNCEngine.hpp 2010-03-03 16:03:23 +0000
+++ pkg/dem/Engine/PartialEngine/KinemCNLEngine.hpp 2010-03-10 11:37:28 +0000
@@ -17,7 +17,7 @@
-class CinemCNCEngine : public PartialEngine
+class KinemCNLEngine : public PartialEngine
{
private :
shared_ptr<NormalInelasticityLaw> myLdc;
@@ -48,7 +48,7 @@
void stopMovement(); // to cancel all the velocities when gammalim is reached
void computeStiffness(Scene* ncb);
- YADE_CLASS_BASE_DOC_ATTRS_CTOR(CinemCNCEngine,PartialEngine,
+ YADE_CLASS_BASE_DOC_ATTRS_CTOR(KinemCNLEngine,PartialEngine,
"To apply a constant normal stress shear for a parallelogram box (simple shear)\n\nThis engine, used in simulations issued from :yref:`SimpleShear` 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\nIn 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\nThe 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\nThe 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\n.. note::\n\tNot 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\n.. warning::\n\tBecause 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.\n",
((Real,shearSpeed,0.0,"the speed at wich the shearing is performed : speed of the upper plate [m/s]"))
((Real,gammalim,0.0,"the value of tangential displacement (of upper plate) at wich the shearing is stopped [m]"))
@@ -73,6 +73,6 @@
);
};
-REGISTER_SERIALIZABLE(CinemCNCEngine);
+REGISTER_SERIALIZABLE(KinemCNLEngine);
=== renamed file 'pkg/common/Engine/PartialEngine/CinemKNCEngine.cpp' => 'pkg/dem/Engine/PartialEngine/KinemCNSEngine.cpp'
--- pkg/common/Engine/PartialEngine/CinemKNCEngine.cpp 2010-03-03 16:19:21 +0000
+++ pkg/dem/Engine/PartialEngine/KinemCNSEngine.cpp 2010-03-10 11:37:28 +0000
@@ -8,17 +8,17 @@
-#include "CinemKNCEngine.hpp"
+#include "KinemCNSEngine.hpp"
#include<yade/core/State.hpp>
#include<yade/pkg-common/Box.hpp>
#include<yade/pkg-dem/FrictPhys.hpp>
#include<yade/core/Scene.hpp>
#include<yade/lib-base/Math.hpp>
-YADE_PLUGIN((CinemKNCEngine));
-
-
-void CinemKNCEngine::applyCondition(Scene * ncb)
+YADE_PLUGIN((KinemCNSEngine));
+
+
+void KinemCNSEngine::applyCondition(Scene * ncb)
{
if(LOG) cerr << "debut applyCondi !!" << endl;
leftbox = Body::byId(id_boxleft);
@@ -51,7 +51,7 @@
}
-void CinemKNCEngine::letMove(Scene * ncb)
+void KinemCNSEngine::letMove(Scene * ncb)
{
shared_ptr<BodyContainer> bodies = ncb->bodies;
@@ -105,7 +105,7 @@
gamma+=dx;
}
-void CinemKNCEngine::computeAlpha()
+void KinemCNSEngine::computeAlpha()
{
Quaternionr orientationLeftBox,orientationRightBox;
orientationLeftBox = leftbox->state->ori;
@@ -121,7 +121,7 @@
}
-void CinemKNCEngine::computeDu(Scene* ncb)
+void KinemCNSEngine::computeDu(Scene* ncb)
{
ncb->forces.sync(); Vector3r F_sup=ncb->forces.getForce(id_topbox);
@@ -192,7 +192,7 @@
}
-void CinemKNCEngine::stopMovement()
+void KinemCNSEngine::stopMovement()
{
// annulation de la vitesse de la plaque du haut
topbox->state->vel = Vector3r(0,0,0);
@@ -206,7 +206,7 @@
rightbox->state->angVel = Vector3r(0,0,0);
}
-void CinemKNCEngine::computeStiffness(Scene* ncb)
+void KinemCNSEngine::computeStiffness(Scene* ncb)
{
stiffness=0.0;
InteractionContainer::iterator ii = ncb->interactions->begin();
=== renamed file 'pkg/common/Engine/PartialEngine/CinemKNCEngine.hpp' => 'pkg/dem/Engine/PartialEngine/KinemCNSEngine.hpp'
--- pkg/common/Engine/PartialEngine/CinemKNCEngine.hpp 2010-03-03 16:19:21 +0000
+++ pkg/dem/Engine/PartialEngine/KinemCNSEngine.hpp 2010-03-10 11:37:28 +0000
@@ -16,7 +16,7 @@
-class CinemKNCEngine : public PartialEngine
+class KinemCNSEngine : public PartialEngine
{
private :
shared_ptr<NormalInelasticityLaw> myLdc;
@@ -47,7 +47,7 @@
void stopMovement(); // to cancel all the velocities when gammalim is reached
void computeStiffness(Scene* ncb);
- YADE_CLASS_BASE_DOC_ATTRS_CTOR(CinemKNCEngine,PartialEngine,
+ YADE_CLASS_BASE_DOC_ATTRS_CTOR(KinemCNSEngine,PartialEngine,
"To apply a constant normal rigidity shear for a parallelogram box (simple shear)\n\nThis engine, useable in simulations implying one deformable parallelepipedic box (e.g. :yref:`SimpleShear` 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. The upper plate can move not only horizontally but also vertically, so that the normal rigidity defined by DeltaF(upper plate)/DeltaU(upper plate) = constant (= *KnC* defined by the user).\n The movement is moreover controlled by the user via a *shearSpeed* which is the horizontal speed of the upper wall, and by a maximum value of horizontal displacement *gammalim* (of the upper plate), after which the shear stops.\n\n 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. \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 : speed of the upper plate [m/s]"))
((Real,gammalim,0.0,"the value of tangential displacement (of upper plate) at wich the shearing is stopped [m]"))
@@ -73,6 +73,6 @@
};
-REGISTER_SERIALIZABLE(CinemKNCEngine);
+REGISTER_SERIALIZABLE(KinemCNSEngine);
=== modified file 'pkg/dem/PreProcessor/DirectShearCis.cpp'
--- pkg/dem/PreProcessor/DirectShearCis.cpp 2010-02-09 20:22:04 +0000
+++ pkg/dem/PreProcessor/DirectShearCis.cpp 2010-03-10 11:37:28 +0000
@@ -42,7 +42,7 @@
#include<yade/pkg-common/CundallNonViscousDamping.hpp>
#include<yade/pkg-common/CundallNonViscousDamping.hpp>
#include<yade/pkg-common/GravityEngines.hpp>
-#include<yade/pkg-common/CinemDNCEngine.hpp>
+#include<yade/pkg-common/KinemCNDEngine.hpp>
#include<yade/pkg-common/InteractionGeometryDispatcher.hpp>
@@ -270,7 +270,7 @@
forcesnap->list_id.push_back(10);
forcesnap->outputFile="../data/ForceSnapshot";
- shared_ptr<CinemDNCEngine> kinematic = shared_ptr<CinemDNCEngine>(new CinemDNCEngine);
+ shared_ptr<KinemCNDEngine> kinematic = shared_ptr<KinemCNDEngine>(new KinemCNDEngine);
kinematic->shearSpeed = shearSpeed;
=== modified file 'pkg/dem/PreProcessor/SimpleShear.cpp'
--- pkg/dem/PreProcessor/SimpleShear.cpp 2010-02-09 20:22:04 +0000
+++ pkg/dem/PreProcessor/SimpleShear.cpp 2010-03-10 11:37:28 +0000
@@ -37,7 +37,7 @@
#include<yade/pkg-dem/NewtonIntegrator.hpp>
#include<yade/pkg-common/GravityEngines.hpp>
-#include<yade/pkg-common/CinemDNCEngine.hpp>
+#include<yade/pkg-common/KinemCNDEngine.hpp>
#include<yade/pkg-common/InteractionGeometryDispatcher.hpp>
@@ -261,7 +261,7 @@
// forcesnap->list_id.push_back(10);
// forcesnap->outputFile="../data/ForceSnapshot";
- shared_ptr<CinemDNCEngine> kinematic = shared_ptr<CinemDNCEngine>(new CinemDNCEngine);
+ shared_ptr<KinemCNDEngine> kinematic = shared_ptr<KinemCNDEngine>(new KinemCNDEngine);
kinematic->shearSpeed = shearSpeed;
=== modified file 'pkg/dem/PreProcessor/SimpleShear.hpp'
--- pkg/dem/PreProcessor/SimpleShear.hpp 2010-02-02 14:55:17 +0000
+++ pkg/dem/PreProcessor/SimpleShear.hpp 2010-03-10 11:37:28 +0000
@@ -15,8 +15,8 @@
This preprocessor allows to simulate a simple shear test of a sample (contained so in a deformable parallelogram box)
The sample could be generated via the same method used in TriaxialTest Preprocesor (=> see GenerateCloud) or by reading a text file containing positions and radii of a sample (=> see ImportCloud). This last one is the one by default used by this PreProcessor as it is written here => you need to have such a file.
-Thanks to the Engines (in pkg/common/Engine/PartialEngine) CinemDNCEngine, CinemKNCEngine and CinemCNCEngine, respectively constant normal displacement, constant normal rigidity and constant normal stress are possible to execute over such samples
-NB : in this PreProcessor only CinemDNCEngine appears, if you want to use other engines the best is maybe to modify directly .xml files
+Thanks to the Engines (in pkg/common/Engine/PartialEngine) KinemCNDEngine, KinemCNSEngine and KinemCNLEngine, respectively constant normal displacement, constant normal rigidity and constant normal stress are possible to execute over such samples
+NB : in this PreProcessor only KinemCNDEngine appears, if you want to use other engines the best is maybe to modify directly .xml files
*/
=== modified file 'py/system.py'
--- py/system.py 2010-02-09 16:50:30 +0000
+++ py/system.py 2010-03-10 11:37:28 +0000
@@ -118,6 +118,12 @@
'TetraAABB':'Bo1_Tetra_Aabb', # Tue Feb 9 10:22:33 2010, vaclav@flux
'Tetra2TetraBang':'Ig2_Tetra_Tetra_TTetraGeom', # Tue Feb 9 10:23:19 2010, vaclav@flux
'TetraLaw':'TetraVolumetricLaw', # Tue Feb 9 10:24:10 2010, vaclav@flux
+ 'OldName':'NewName', # Wed Mar 10 12:23:10 2010, jduriez@c1solimara-l
+ 'DirecResearchEngine':'Disp2DPropLoadEngine', # Wed Mar 10 12:23:42 2010, jduriez@c1solimara-l
+ 'CinemCNCEngine':'KinemCNLEngine', # Wed Mar 10 12:33:36 2010, jduriez@c1solimara-l
+ 'CinemKNCEngine':'KinemCNSEngine', # Wed Mar 10 12:34:01 2010, jduriez@c1solimara-l
+ 'CinemDNCEngine':'KinemCNDEngine', # Wed Mar 10 12:34:27 2010, jduriez@c1solimara-l
+ 'CinemDTCEngine':'KinemCTDEngine', # Wed Mar 10 12:34:37 2010, jduriez@c1solimara-l
### END_RENAMED_CLASSES_LIST ### (do not delete this line; scripts/rename-class.py uses it
}