← Back to team overview

yade-users team mailing list archive

Are we obliged to use NewtonIntegrator ?

 

(I write to mailing list because of the two scripts I have to attach)

Hello,

I would like to show you the two attached scripts. It is about two spheres (in FrictMat) who do not move. O.engines contains only ForceResetter, InsertionSortCollider and Interaction Loop. And that's the difference between the two scripts, NewtonIntegrator or not. NewtonIntegrator is *not* contained in scriptCrash. Due to its name, this script crashes, whereas the second which contains NewtonIntegrator does not. The crash occurs more precisely in ForceContainer::Reset called by Engine ForceResetter.

I wonder if it is "normal" ? The reason is probably that NewtonIntegrator cares about forces of bodies, and then performs something indispensable (I do not know what exactly).

If you agree with what I say (?), I'd suggest at least to put a warning saying that NewtonIntegrator engine is in fact mandatory, and performs not only "integration of newtonian motion equations"

That is the reason of https://bugs.launchpad.net/yade/+bug/739429. My script did not contain NewtonIntegrator.

To conclude, the funny thing is that, if you get rid of interactions in scriptCrash, either by removing one of the two spheres, or by removing the InteractionLoop engine, crash disappears...

Jerome

--
Jérôme Duriez
ATER Polytech' Grenoble - Laboratoire 3S-R
04.56.52.86.49 (ne pas laisser de messages sur le répondeur)

# -*- coding: utf-8 -*-

# Very simple script to test for Bug


#Def of the material which will be used
O.materials.append(FrictMat(young=10e9,poisson=.25,frictionAngle=0.5,density=1e3))

#Def of the bodies of the simulations : 2 spheres, with names which will be useful after
O.bodies.append(utils.sphere([0,0,0], 1, fixed=True, wire=False, color=None, highlight=False))
#O.bodies.append(utils.sphere([0,2,0], 1, fixed=True, wire=False, color=None, highlight=False))

lowerSphere=O.bodies[0]
#upperSphere=O.bodies[1]


#Def of the engines taking part to the simulation loop
O.engines=[
	ForceResetter(),
	InsertionSortCollider([Bo1_Sphere_Aabb()],verletDist=0),# absence of NewtonIntegrator requires verletDist=0
	InteractionLoop(
			      [Ig2_Sphere_Sphere_ScGeom()],
			      [Ip2_FrictMat_FrictMat_FrictPhys()],
			      [Law2_ScGeom_FrictPhys_CundallStrack()]
			      )
	]






O.dt=1e-5
print 'Going for cycling'

O.run(2,True)
print 'Cycles done'


# -*- coding: utf-8 -*-

# Very simple script to test for Bug


#Def of the material which will be used
O.materials.append(FrictMat(young=10e9,poisson=.25,frictionAngle=0.5,density=1e3))

#Def of the bodies of the simulations : 2 spheres, with names which will be useful after
O.bodies.append(utils.sphere([0,0,0], 1, fixed=True, wire=False, color=None, highlight=False))
O.bodies.append(utils.sphere([0,2,0], 1, fixed=True, wire=False, color=None, highlight=False))

lowerSphere=O.bodies[0]
upperSphere=O.bodies[1]


#Def of the engines taking part to the simulation loop
O.engines=[
	ForceResetter(),
	InsertionSortCollider([Bo1_Sphere_Aabb()]),
	InteractionLoop(
			      [Ig2_Sphere_Sphere_ScGeom()],
			      [Ip2_FrictMat_FrictMat_FrictPhys()],
			      [Law2_ScGeom_FrictPhys_CundallStrack()]
			      ),
	NewtonIntegrator()
	]






O.dt=1e-5
print 'Going for cycling'

O.run(2,True)
print 'Cycles done'



Follow ups