yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #07840
[Branch ~yade-dev/yade/trunk] Rev 2907: - In Law2... add of a requestErase of the interactions with un<0, which was missing. Could help h...
------------------------------------------------------------
revno: 2907
committer: jduriez <jduriez@c1solimara-l>
branch nick: yade
timestamp: Fri 2011-08-26 11:49:25 +0200
message:
- In Law2... add of a requestErase of the interactions with un<0, which was missing. Could help https://bugs.launchpad.net/yade/+bug/810056 ?
- In Ip2 : correct of the typo in computation of Ks (as in 2886)
- in .py development of output messages
modified:
examples/simpleShear.py
pkg/dem/Ip2_2xNormalInelasticMat_NormalInelasticityPhys.cpp
pkg/dem/NormalInelasticityLaw.cpp
--
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 'examples/simpleShear.py'
--- examples/simpleShear.py 2011-07-13 15:13:12 +0000
+++ examples/simpleShear.py 2011-08-26 09:49:25 +0000
@@ -95,16 +95,16 @@
#log.setLevel('',log.TRACE)
O.dt=.4*utils.PWaveTimeStep()
print ''
-print 'Be patient, running in progress'
+print 'Be patient, running in progress (the shear box is being compressed)'
O.run(14000,True)
plot.plots={'step':('fy',)}
plot.plot()
-print 'Plotting curve. Type Return to go ahead'
+print 'Plotting curve (fy = normal force). Type Return to go ahead'
print ''
raw_input()
plot.plots={'u':('fy',)}
plot.plot()
-print 'Plotting curve. Type Return to go ahead'
+print 'Plotting curve (u = normal displacement). Type Return to go ahead'
print ''
raw_input()
#O.save('FinComp.xml')
@@ -115,24 +115,24 @@
O.engines=O.engines[:5]+[KinemCNDEngine(shearSpeed=(length/7.0)/(nCycShear*O.dt),gamma_save=(),temoin_save=(),gammalim=length/7.0,LOG=False)]
-print 'Be patient, running in progress'
+print 'Be patient, running in progress (the shear box is being sheared)'
O.run(int(1.15*nCycShear),True)
plot.plots={'step':('gamma',)}
plot.plot()
-print 'Plotting curve. Type Return to go ahead'
+print 'Plotting curve (gamma = tangential displacement). Type Return to go ahead'
print ''
raw_input()
plot.plots={'gamma':('fx','fy',)}
plot.plot()
-print 'Plotting curve. Type Return to go ahead'
+print 'Plotting curve (fx = tangential force). Type Return to go ahead'
print ''
raw_input()
#---- A re-compression, from this initial sheared state ----
O.engines=O.engines[:5]+[KinemCTDEngine(compSpeed=0.5,sigma_save=(),temoin_save=(),targetSigma=80000.0,LOG=False)]
+print 'Be patient, running in progress (the sample is being again compressed, from this sheared state)'
O.run(10000,True)
-print 'Be patient, running in progress'
plot.plots={'u':('fx','fy',)}
plot.plot()
print 'Plotting curve. Type Return to go ahead'
=== modified file 'pkg/dem/Ip2_2xNormalInelasticMat_NormalInelasticityPhys.cpp'
--- pkg/dem/Ip2_2xNormalInelasticMat_NormalInelasticityPhys.cpp 2011-05-04 10:19:03 +0000
+++ pkg/dem/Ip2_2xNormalInelasticMat_NormalInelasticityPhys.cpp 2011-08-26 09:49:25 +0000
@@ -44,7 +44,7 @@
Real Kn = 2.0*Ea*Ra*Eb*Rb/(Ea*Ra+Eb*Rb);//harmonic average of two stiffnesses
- Real Ks = 2.0*Ea*Ra*Va*Eb*Rb*Vb/(Ea*Ra*Va+Eb*Rb*Va);//harmonic average of two stiffnesses with ks=V*kn for each sphere
+ Real Ks = 2.0*Ea*Ra*Va*Eb*Rb*Vb/(Ea*Ra*Va+Eb*Rb*Vb);//harmonic average of two stiffnesses with ks=V*kn for each sphere
// Jean-Patrick Plassiard, Noura Belheine, Frederic Victor Donze, "A Spherical Discrete Element Model: calibration procedure and incremental response", DOI: 10.1007/s10035-009-0130-x
=== modified file 'pkg/dem/NormalInelasticityLaw.cpp'
--- pkg/dem/NormalInelasticityLaw.cpp 2011-05-03 16:17:23 +0000
+++ pkg/dem/NormalInelasticityLaw.cpp 2011-08-26 09:49:25 +0000
@@ -36,12 +36,20 @@
currentContactPhysics->unMax=0.0;
}
+ un = geom->penetrationDepth; // >0 for real penetration
+
+// Check if there is a real overlap or not. The Ig2... seems to let exist interactions with negative un (= no overlap). Such interactions seem then to have to be deleted here.
+ if ( un < 0 )
+ {
+ scene->interactions->requestErase(contact->getId1(),contact->getId2());// this, among other things, resets the interaction : geometry and physics variables (as forces, ...) are reset to defaut values
+ return;
+ }
+
+
// ******** Computation of normal Force : depends of the history ******* //
// cout << " Dans Law2 valeur de kn : " << currentContactPhysics->kn << endl;
- un = geom->penetrationDepth; // >0 for real penetration
-
// cout << "un = " << un << " alors que unMax = "<< currentContactPhysics->unMax << " et previousun = " << currentContactPhysics->previousun << " et previousFn =" << currentContactPhysics->previousFn << endl;
if(un >= currentContactPhysics->unMax) // case of virgin load : on the "principal line" (limit state of the (un,Fn) space)
@@ -125,7 +133,7 @@
moment = currentContactPhysics->moment_twist + currentContactPhysics->moment_bending;
-// Limitation by plastic threshold
+// Limitation by plastic threshold of this part of the moment caused by relative twist and bending
if (!momentAlwaysElastic)
{
Real normeMomentMax = currentContactPhysics->forMaxMoment * std::fabs(Fn);