Question about "ScGeom"

Asked by Christian Sommerfeld

Hi,
i am a little bit confused about, how yade calculate the motion. Therefore i did 2 short tests.

test (Cundall & Strack):

from yade import plot, geom, utils

#parameters:

r1 = 0.003
r2 = 0.003
E1 = 210e9
E2 = 90e9
poisson1 = 0.3
poisson2 = 0.14
frictionAngle = 0.07
density1 = 7900
density2 = 2500
g = 9.81
h = 0.1

O.materials.append(FrictMat(young=E1,poisson=poisson1,frictionAngle=frictionAngle,density=density1, label='mat_ground'))

O.materials.append(FrictMat(young=E2,poisson=poisson2,frictionAngle=frictionAngle,density=density2, label='mat_spheres'))

O.bodies.append(utils.sphere([0.01,0.01,0.1],0.003,color=[1,1,0], material='mat_spheres'))
sphere=O.bodies[0]
print O.time,sphere.state.vel[2],sphere.state.pos[2]

pot=O.bodies.append(utils.geom.facetCylinder((0,0,.04),.054,.08,orientation=Quaternion((0, 0, 0),0),segmentsNumber=20,wallMask=2, color=(0,1,0), fixed=True, material='mat_ground'))

O.engines=[
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
   InteractionLoop(
      [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
      [Ip2_FrictMat_FrictMat_FrictPhys()],
      [Law2_ScGeom_FrictPhys_CundallStrack()]

   ),
  NewtonIntegrator(damping=0.2, gravity=(0,0,-9.81)),
 PyRunner(iterPeriod=1,command="myAddPlotData()"),
 PyRunner(iterPeriod=100000,command="addData()")
]

O.dt=1*utils.PWaveTimeStep()

def myAddPlotData():
 force=plot.addData(t=O.time,F=O.forces.f(0).norm())

def addData():
 print O.time,sphere.state.vel[2],sphere.state.pos[2]

plot.plots={'t':('F')}
plot.plot()

from yade import qt
v=qt.View()

Test (Hertz):

from yade import plot, geom, utils

#parameters:

r1 = 0.003
r2 = 0.003
E1 = 210e9
E2 = 90e9
poisson1 = 0.3
poisson2 = 0.14
frictionAngle = 0.07
density1 = 7900
density2 = 2500
g = 9.81
h = 0.1

O.materials.append(FrictMat(young=E1,poisson=poisson1,frictionAngle=frictionAngle,density=density1, label='mat_ground'))

O.materials.append(FrictMat(young=E2,poisson=poisson2,frictionAngle=frictionAngle,density=density2, label='mat_spheres'))

O.bodies.append(utils.sphere([0.01,0.01,0.1],0.003,color=[1,1,0], material='mat_spheres'))
sphere=O.bodies[0]
print O.time,sphere.state.vel[2],sphere.state.pos[2]

pot=O.bodies.append(utils.geom.facetCylinder((0,0,.04),.054,.08,orientation=Quaternion((0, 0, 0),0),segmentsNumber=20,wallMask=2, color=(0,1,0), fixed=True, material='mat_ground'))

O.engines=[
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
   InteractionLoop(
      [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
      [Ip2_FrictMat_FrictMat_MindlinPhys()],
      [Law2_ScGeom_MindlinPhys_HertzWithLinearShear()]

   ),
  NewtonIntegrator(damping=0.2, gravity=(0,0,-9.81)),
 PyRunner(iterPeriod=1,command="myAddPlotData()"),
 PyRunner(iterPeriod=100000,command="addData()")
]

O.dt=1*utils.PWaveTimeStep()

def myAddPlotData():
 force=plot.addData(t=O.time,F=O.forces.f(0).norm())

def addData():
 print O.time,sphere.state.vel[2],sphere.state.pos[2]

plot.plots={'t':('F')}
plot.plot()

from yade import qt
v=qt.View()

and this are my results:
http://s14.directupload.net/file/d/3080/9ui6zesh_pdf.htm

It is shown that i got 2 different forces. But the velocity and the position are nearly the same.
So i took a look into the yade-code and i found out that that both contact laws (Law2_ScGeom_FrictPhys_CundallStrack, Law2_ScGeom_MindlinPhys_HertzWithLinearShear) need the penetrationDepth to calculate the normalForce.
Now my question:
Does yade calculate the motion independently from the force? Because the algorithm of the scGeom doesn't need any force:
https://www.yade-dem.org/doc/yade.wrapper.html?highlight=scgeom#yade.wrapper.ScGeom

Furthermore i'm interested in how yade calculate the velocity and position if there isn't a contact anymore? Is the NewtonIntegrator also independently from the forces of the contact law? It isn't that easy to find in the yade-cade.

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jan Stránský
Solved:
Last query:
Last reply:
Revision history for this message
Anton Gladky (gladky-anton) said :
#1

Hi,

2012/11/20 Christian Sommerfeld <email address hidden>:
> Does yade calculate the motion independently from the force?

https://www.yade-dem.org/doc/formulation.html#motion-integration

> Because the algorithm of the scGeom doesn't need any force:

ScGeom is a class for __geometry__ calculation. It has nothing to do
with the force.

> Furthermore i'm interested in how yade calculate the velocity and position if there isn't a contact anymore?

Body can have velocities and forces, acting on it, even without any contact.
Imagine a free fall of a sphere. Newtonintegrator cares about that.

> Is the NewtonIntegrator also independently from the forces of the contact law?

What you mean "independently"? It is a class/"engine" which handles motion
integration.

> It isn't that easy to find in the yade-cade.

Well, if you are not going to be a "core developer", you do not need
to read the code.
BTW the code of yade is relatively easy to read. It is good
structured, nothing superfluous. Have a look at other codes :)

Cheers,

Anton

Revision history for this message
Christian Sommerfeld (sommerfeld-m) said :
#3

Hi Anton,

it isn't easy to find doesn't meanthat the code isn't good structured. It means that i'm not that good in reading c-code. Sorry for that! But i'm still confused. Did you took a look into my results? Why is there such a different between the force and the motion/velocity?

Revision history for this message
Alexander Eulitz [Eugen] (kubeu) said :
#4

Hi Guys,
I think I know what confuses you. If I take a look at your python script, your simulation is a rather simple experiment. One sphere drops from a given height without any initial velocity to ground. Reaching ground it jumps up again but with less altitude - drops again and so on and so on.
Looking at your graphs, we see, that positions as well as velocities are roughly the same for Cundall and Hertz at least for t <=0,45.
But the graphs of forces are completely different. You have about 400N at Cundall and about 70N at Hertz.

Thats why you're confused I guess: how can velocities and positions be roughly the same for that different forces.

I'm sorry, but I cant help you with that. But maybe it helps someone to understand your problem.

Greetings, kubeu

Revision history for this message
Chiara Modenese (chiara-modenese) said :
#5

Hi Christian,

I noticed that in your script you use Law2_ScGeom_MindlinPhys_HertzWithLinearShear. As explained in [1] that law is no longer maintained or functioning. Please use Law2_ScGeom_MindlinPhys_Mindlin instead.

[1] https://yade-dem.org/wiki/ConstitutiveLaws

Chiara

Revision history for this message
Jan Stránský (honzik) said :
#6

Hello guys,

thanks to Eugen for summary. Based on his answer (I did not checked the
scripts in detail myself):

the free falling is the same for both contact laws (besause there is no
contact :-).

Then there is a short contact impulse causing force acting on particles
causing their acceleration. The contact laws / parameters may be (and
according to the results they are) different, resulting in different
forces. With different forces the acceleration is also different. But under
assumption of low energy dissipation, the velocity before and after the
contact is the same for any contact law. The difference is the time of
actual contact (for stiffer law it is shorter). But in your simulation this
time is negligible compared to the total time of simulation, therefore you
do not see differences in velocities / positions (at least in the
beginning), although they are there. And also there may be some energy
dissipation in MindlinPhys, I don't know.

Hope it helps you.
Jan

2012/11/21 Eugen Kubowsky <email address hidden>

> Question #214773 on Yade changed:
> https://answers.launchpad.net/yade/+question/214773
>
> Status: Open => Answered
>
> Eugen Kubowsky proposed the following answer:
> Hi Guys,
> I think I know what confuses you. If I take a look at your python script,
> your simulation is a rather simple experiment. One sphere drops from a
> given height without any initial velocity to ground. Reaching ground it
> jumps up again but with less altitude - drops again and so on and so on.
> Looking at your graphs, we see, that positions as well as velocities are
> roughly the same for Cundall and Hertz at least for t <=0,45.
> But the graphs of forces are completely different. You have about 400N at
> Cundall and about 70N at Hertz.
>
> Thats why you're confused I guess: how can velocities and positions be
> roughly the same for that different forces.
>
> I'm sorry, but I cant help you with that. But maybe it helps someone to
> understand your problem.
>
> Greetings, kubeu
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Best Jan Stránský (honzik) said :
#7

Hello once more,

my last answer is a bit complicated.. a very simple example came to my
mind: imagine elastic contact of two bodies. According to bodies velocities
before contact, kinetic energy conservation and momentum conservation you
are able to evaluate velocities after the contact [1]. You don't care about
contact forces at all. That's why the velocities / positions are the same /
comparable

The forces depends on material (material law) and stiffness. Therefore for
different laws the forces are different.

Now it should be clear
Jan

[1] http://en.wikipedia.org/wiki/Elastic_collision

2012/11/21 Jan Stránský <email address hidden>

> Hello guys,
>
> thanks to Eugen for summary. Based on his answer (I did not checked the
> scripts in detail myself):
>
> the free falling is the same for both contact laws (besause there is no
> contact :-).
>
> Then there is a short contact impulse causing force acting on particles
> causing their acceleration. The contact laws / parameters may be (and
> according to the results they are) different, resulting in different
> forces. With different forces the acceleration is also different. But under
> assumption of low energy dissipation, the velocity before and after the
> contact is the same for any contact law. The difference is the time of
> actual contact (for stiffer law it is shorter). But in your simulation this
> time is negligible compared to the total time of simulation, therefore you
> do not see differences in velocities / positions (at least in the
> beginning), although they are there. And also there may be some energy
> dissipation in MindlinPhys, I don't know.
>
> Hope it helps you.
> Jan
>
>
> 2012/11/21 Eugen Kubowsky <email address hidden>
>
>> Question #214773 on Yade changed:
>> https://answers.launchpad.net/yade/+question/214773
>>
>> Status: Open => Answered
>>
>> Eugen Kubowsky proposed the following answer:
>> Hi Guys,
>> I think I know what confuses you. If I take a look at your python
>> script, your simulation is a rather simple experiment. One sphere drops
>> from a given height without any initial velocity to ground. Reaching ground
>> it jumps up again but with less altitude - drops again and so on and so on.
>> Looking at your graphs, we see, that positions as well as velocities are
>> roughly the same for Cundall and Hertz at least for t <=0,45.
>> But the graphs of forces are completely different. You have about 400N at
>> Cundall and about 70N at Hertz.
>>
>> Thats why you're confused I guess: how can velocities and positions be
>> roughly the same for that different forces.
>>
>> I'm sorry, but I cant help you with that. But maybe it helps someone to
>> understand your problem.
>>
>> Greetings, kubeu
>>
>> --
>> You received this question notification because you are a member of
>> yade-users, which is an answer contact for Yade.
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~yade-users
>> Post to : <email address hidden>
>> Unsubscribe : https://launchpad.net/~yade-users
>> More help : https://help.launchpad.net/ListHelp
>>
>
>

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#8

I second Jan. In fact you don't even need to compare two laws to see this effect.
Try Cundall & Strack with Young=E1, then run the same test with Young=2*E1: different forces, similar velocity/positions.

>i'm interested in how yade calculate the velocity and position if there isn't a contact anymore?

 Newtons says "acceleration = force / mass". It is not different with and without contacts.
If contacts are present they will be added to force, else force is null (acceleration=0, velocity=cste) or it includes other things (e.g. weight).

Revision history for this message
Christian Sommerfeld (sommerfeld-m) said :
#9

Hi guys,

@Eugen: Thanks! Your summary explain exactly whati mean. Sorry for the bad formulated question!

Ok this makes sense. If you use the kinetic energy conservation and momentum conservation than you get the same velocity and the same position. Thank you very much Jan!

First i though if you add the forces to the newton law there will be a much higher velocity after the contact when using the law of cundall & strack. So now i understand what the laws are doing. Every contact law affects the time of actual contact what affects the position and the velocity of the motion. And for a short time of actual contact the impact of different laws isn't that high. This explains the behaviour for t>0.45 where the impact of the contact law is much higher. Hopefully i understand it in the correct way?

Cheers,

Christian

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#10

If you are satisfied, could you please click on Jan's post to mark the question answered?

Revision history for this message
Klaus Thoeni (klaus.thoeni) said :
#11

Hi Christian,

you should have a very close look at the force distribution over time during
an impact. You can zoom into your plots (now in your plots the impact is just
a line but if you zoom in it should become a curve - make sure iterPeriod=1)
and you will see that the contact time will not be the same as other people
already mentioned.

Klaus

On Thu, 22 Nov 2012 04:11:12 AM Christian Sommerfeld wrote:
> Question #214773 on Yade changed:
> https://answers.launchpad.net/yade/+question/214773
>
> Status: Answered => Open
>
> Christian Sommerfeld is still having a problem:
> Hi guys,
>
> @Eugen: Thanks! Your summary explain exactly whati mean. Sorry for the
> bad formulated question!
>
> Ok this makes sense. If you use the kinetic energy conservation and
> momentum conservation than you get the same velocity and the same
> position. Thank you very much Jan!
>
> First i though if you add the forces to the newton law there will be a
> much higher velocity after the contact when using the law of cundall &
> strack. So now i understand what the laws are doing. Every contact law
> affects the time of actual contact what affects the position and the
> velocity of the motion. And for a short time of actual contact the
> impact of different laws isn't that high. This explains the behaviour
> for t>0.45 where the impact of the contact law is much higher. Hopefully
> i understand it in the correct way?
>
> Cheers,
>
> Christian

Revision history for this message
Christian Sommerfeld (sommerfeld-m) said :
#12

Thanks Jan Stránský, that solved my question.

Revision history for this message
Christian Sommerfeld (sommerfeld-m) said :
#13

Hi,

@Klaus:I will take a look into my plots to understand the impact more and more. Thanks!