yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #07597
[Branch ~yade-dev/yade/trunk] Rev 2855: - add of some hyperlinks in doc
------------------------------------------------------------
revno: 2855
committer: jduriez <jduriez@c1solimara-l>
branch nick: yade
timestamp: Wed 2011-05-04 12:19:03 +0200
message:
- add of some hyperlinks in doc
- changes in scripts. At the moment I can run ~20 times the proposed checkTest without fails (did not make more than ~20). Fails occured when interaction disappeared. Wait however a bit...
modified:
pkg/common/PeriodicEngines.hpp
pkg/dem/Ip2_2xNormalInelasticMat_NormalInelasticityPhys.cpp
pkg/dem/Ip2_2xNormalInelasticMat_NormalInelasticityPhys.hpp
pkg/dem/NormalInelasticityLaw.hpp
scripts/normalInelasticity-test.py
scripts/test/checkTestNormalInelasticity.py
--
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/PeriodicEngines.hpp'
--- pkg/common/PeriodicEngines.hpp 2010-10-13 16:23:08 +0000
+++ pkg/common/PeriodicEngines.hpp 2011-05-04 10:19:03 +0000
@@ -47,7 +47,7 @@
overrides also Engine::isActivated, it should also take in account return value from PeriodicEngine::isActivated, \
since otherwise the periodicity will not be functional. \n\n\
\
- Example with PyRunner, which derives from PeriodicEngine; likely to be encountered in python scripts):: \n\n\
+ Example with :yref`PyRunner`, which derives from PeriodicEngine; likely to be encountered in python scripts:: \n\n\
\
PyRunner(realPeriod=5,iterPeriod=10000,command='print O.iter') \n\n\
\
=== modified file 'pkg/dem/Ip2_2xNormalInelasticMat_NormalInelasticityPhys.cpp'
--- pkg/dem/Ip2_2xNormalInelasticMat_NormalInelasticityPhys.cpp 2011-04-28 14:20:15 +0000
+++ pkg/dem/Ip2_2xNormalInelasticMat_NormalInelasticityPhys.cpp 2011-05-04 10:19:03 +0000
@@ -53,7 +53,7 @@
contactPhysics->tangensOfFrictionAngle = std::tan(std::min(fa,fb));
contactPhysics->forMaxMoment = 1.0*(Ra+Rb)/2.0; // 1.0 corresponding to ethaR which I don't know exactly where to define as a parameter...
- // Lot of suppress here around (>) r2276. Normally not bad but ?
+ // Lot of suppress here around (>) r2276.
contactPhysics->knLower = Kn;
contactPhysics->kn = Kn;
contactPhysics->ks = Ks;
=== modified file 'pkg/dem/Ip2_2xNormalInelasticMat_NormalInelasticityPhys.hpp'
--- pkg/dem/Ip2_2xNormalInelasticMat_NormalInelasticityPhys.hpp 2011-01-10 08:08:23 +0000
+++ pkg/dem/Ip2_2xNormalInelasticMat_NormalInelasticityPhys.hpp 2011-05-04 10:19:03 +0000
@@ -28,7 +28,7 @@
FUNCTOR2D(NormalInelasticMat,NormalInelasticMat);
YADE_CLASS_BASE_DOC_ATTRS(Ip2_2xNormalInelasticMat_NormalInelasticityPhys,
IPhysFunctor,
- "The RelationShips for using Law2_ScGeom6D_NormalInelasticityPhys_NormalInelasticity\n\n In these RelationShips all the attributes of the interactions (which are of NormalInelasticityPhys type) are computed. \n\n.. warning::\n\tas in the others :yref:`Ip2 functors<IPhysFunctor>`, most of the attributes are computed only once, when the interaction is new.",
+ "The RelationShips for using :yref:`Law2_ScGeom6D_NormalInelasticityPhys_NormalInelasticity`\n\n In these RelationShips all the attributes of the interactions (which are of NormalInelasticityPhys type) are computed. \n\n.. warning::\n\tas in the others :yref:`Ip2 functors<IPhysFunctor>`, 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"))
);
};
=== modified file 'pkg/dem/NormalInelasticityLaw.hpp'
--- pkg/dem/NormalInelasticityLaw.hpp 2011-05-03 16:17:23 +0000
+++ pkg/dem/NormalInelasticityLaw.hpp 2011-05-04 10:19:03 +0000
@@ -19,7 +19,7 @@
class Law2_ScGeom6D_NormalInelasticityPhys_NormalInelasticity : public LawFunctor
{
private :
- Vector3r moment // contact torque of the interaction
+ Vector3r moment // the part of the contact torque of the interaction due to relative rotations (a first part is due to contact forces)
,f// contact force
;
Real Fn // value of normal force in the interaction
=== modified file 'scripts/normalInelasticity-test.py'
--- scripts/normalInelasticity-test.py 2011-05-03 15:04:37 +0000
+++ scripts/normalInelasticity-test.py 2011-05-04 10:19:03 +0000
@@ -7,6 +7,8 @@
#Different graphs illustrate the effects of the different loadings. The run is paused at each plot window (so that there is time to observe them). Push on "Return", while being in the Yade terminal, to go ahead.
+# Comment/decomment around l.18-19 and l.38 to execute the script with Law2_ScGeom_FrictPhys_CundallStrack, to see the difference
+
#No crash warranty with r2676 and r2849
@@ -33,6 +35,10 @@
[Ip2_2xNormalInelasticMat_NormalInelasticityPhys(betaR=0.24)],
[Law2_ScGeom6D_NormalInelasticityPhys_NormalInelasticity()]
),
+ #InteractionLoop(
+ #[Ig2_Sphere_Sphere_ScGeom()],
+ #[Ip2_FrictMat_FrictMat_FrictPhys()],
+ #[Law2_ScGeom_FrictPhys_CundallStrack()]),
PyRunner(iterPeriod=1,command='letMove()')
]
@@ -80,42 +86,48 @@
# define of the plots to be made : un(step), and Fn(un)
plot.plots={'step':('unTrue','torque',),'unPerso':('normFn',),'unTrue':('normFnBis',)}
plot.plot(noShow=False, subPlots=False)
-print 'Type Return to go ahead'
+print 'Plotting curve. Type Return to go ahead'
print ''
raw_input()
-#NB : these different unTrue and unPerso illustrate the definition of penetrationDepth really used in the code (computed in Ig2_Sphere_Sphere_ScGeom) which is slightly different from R1 + R2 - Distance (see for example this "shift2"). According to the really used penetrationDepth, Fn evolves as it should
+#-- Comments (r2851) --#
+# - different unTrue and unPerso illustrate the definition of penetrationDepth really used in the code (computed in Ig2_Sphere_Sphere_ScGeom6D) which is slightly different from R1 + R2 - Distance (because of this "shift2" in Distance computation). According to the really used penetrationDepth, Fn evolves as it should
+# - value of virgin slope is 4e9 N/m (r2851) corresponding indeed to input "young" (as it should be the case here with used radii)
+# - and unload-reload slope is correctly multiplied by three
-#O.saveTmp('EndComp')
-#O.save('FinN_I_Test.xml')
# ------ Test of the law in the tangential direction, still with python function ------ #
print 'Beginning of tangential loading'
mode='tangential'
-O.run(1000)
+O.run(1000,True)
print 'End of tangential loading'
+tOn0woLTM=O.forces.t(0)
+tOn1woLTM=O.forces.t(1)
+
+
plot.plots={'step':('gamma','torque',),'gamma':('fx',)}
plot.plot()
-print 'Type Return to go ahead'
+print 'Plotting curve. Type Return to go ahead'
raw_input()
plot.plots={'normFn':('fx',)}
plot.plot()
-print 'Type Return to go ahead'
+print 'Plotting another curve. Type Return to go ahead'
raw_input()
#pylab.show() #to pause on the plot window. Effective only first time
print ''
#-- Comments (r2528) --#
-# - evolution of Fx with gamma normal (flat at the beginning because of the order of engines)
-# - un decreases indeed during this shear, but maybe a zoom on the curves is needed to see it.
-# - We can observe that the force state of the sample decreases a line with a slope equal to tan(~34.5°)=tan(~0.602 rad). Why not strict equality ? Because of the measure of the slope or because something else ? To see...
-# - during this phase O.forces.t(0).norm() / O.forces.f(0)[0] seems to increase between 0.502 and 0.507 (according to r=[T[i]/F[i] for i in range(50,T.__len__()-20) ])
-# Please note, to explain this, that Fx = O.forces.f(0)[0] is more and more different from Ft, from which we can expect Ft = Torque /Radius
+# - evolution of Fx with gamma normal (flat at the beginning because of the order of engines)
+# - waited value of initial slope of fx(gamma) equal to 1.6 e8 N/m confirmed by what can be measured (r2851)
+# - un decreases indeed during this shear, but maybe a zoom on the curves is needed to see it.
+# - We can observe that the force state of the sample decreases a line with a slope equal to tan(~34.5°)=tan(~0.602 rad). Why not strict equality ? Because of the measure of the slope or because something else ? To see...
+# - during this phase O.forces.t(0).norm() / O.forces.f(0)[0] seems to increase between 0.502 and 0.507 (according to r=[T[i]/F[i] for i in range(50,T.__len__()-20) ])
+# Please note, to explain this, that Fx = O.forces.f(0)[0] is more and more different from Ft, from which we can expect Ft = Torque /Radius
## ------ Test of the law for the moment, using blockedDOF_s and NewtonIntegrator ------ #
-#O.loadTmp('EndComp')
+
print 'Beginning of rotationnal loading'
##To use blockedDOF_s, the body has to be dynamic....
@@ -133,14 +145,18 @@
print upperSphere.state.ori
print i.geom.penetrationDepth
-O.run(8000,True)
+O.run(4000,True)
print 'End of rotationnal loading'
+tOn0withLTMonly=O.forces.t(0)- tOn0woLTM
+tOn1withLTMonly=O.forces.t(1)- tOn1woLTM
+
+
+
plot.plots={'step':('torque',)}
plot.plot()
print 'Type Return to go ahead'
-#-- Comments : TO DO
-
-
+#-- Comments : (r2851)
+# - threshold of increment of torque corresponding to relative rotation corresponds to the threshold value which is expected : 1.0 (here) * Fn ~ 5.4e5 Nm
=== modified file 'scripts/test/checkTestNormalInelasticity.py'
--- scripts/test/checkTestNormalInelasticity.py 2011-05-04 09:00:54 +0000
+++ scripts/test/checkTestNormalInelasticity.py 2011-05-04 10:19:03 +0000
@@ -36,6 +36,7 @@
vImposed=[1,0,0]
upperSphere.state.vel=vImposed
upperSphere.state.pos=upperSphere.state.pos+upperSphere.state.vel*O.dt
+
@@ -50,8 +51,13 @@
# ------ Test of the law in the tangential direction, still with python function ------ #
mode='tangential'
-O.run(1000)
+O.engines=O.engines+[PyRunner(iterPeriod=1,command='testInterac()')]
+def testInterac():
+ i=O.interactions[1,0]
+ if (not(i.isReal)):
+ print "!!! L'interaction n est plus reelle !!!! It", O.iter
+O.run(1000,True)
## ------ Test of the law for the moment, using blockedDOF_s and NewtonIntegrator ------ #
@@ -65,15 +71,15 @@
-O.run(8000,True)
-
-
-
-
-# Reference value of force acting on upperSphere, (r2849)
-fRef=Vector3(-519943.97434309247,760000.00000497897,0)
-# Reference value of torque acting on upperSphere, (r2849)
-tRef=Vector3(0,0,-1279894.5796705084)
+O.run(4000,True)
+
+
+
+
+# Reference value of force acting on upperSphere, (r2851)
+fRef=Vector3(-312380.72434640542,461541.17554873932,0)
+# Reference value of torque acting on upperSphere, (r2851)
+tRef=Vector3(0,0,-774632.12686359778)
#Actual values:
f=O.forces.f(1)
@@ -88,7 +94,12 @@
print "- force (the norm) equal to ", dF.norm()/fRef.norm()
print "- torque (the norm) equal to ", dT.norm()/tRef.norm()
print "Whereas tolerance is ", tolerance
+
+ print " "
print "Indeed here, we have f=",f
print "And t=",t
+ print "Because O.forces.f(1) = ", O.forces.f(1)
+ print "Is interaction real ?" ,O.interactions[1,0].isReal
+
resultStatus +=1
Follow ups