# F

Hello !
I want to simulation Initially particles do not touch and then particles touch when the force between the particles reaches a certain value. I do not know how to do it .

## Question information

Language:
English Edit question
Status:
For:
Assignee:
No assignee Edit question
Last query:
2013-08-21
2013-10-18
 Jan Stránský (honzik) said on 2013-07-30: #1

Hello,

the very basic idea of DEM is that forces between particles are computed
according to their overlap, i.e. when they are touching. So an idea for
- particles, that do not touch initially is not a problem
- use aabbEnlargeFactor>1 of Bo1 functor and interactionDetectionFactor>1
of Ig2 functor (the same value for both cases, see [1]) to detect and
create interactions even if particles are not in contact. Then the force is
applied on particles even if they do not touch and when they touch, the
force has certain value depending on you enlargeFactors value, particle
size, stiffness and contact law used.

I am not sure if this is what you are looking for, in this kind of
questions it is always good to explain also why you want to do such things
(some example what you want to simulate for example).
cheers
Jan

> New question #233232 on Yade:
>
> Hello !
> I want to simulation Initially particles do not touch and then
> particles touch when the force between the particles reaches a certain
> value. I do not know how to do it .
>
> --
> You received this question notification because you are a member of
>
> _______________________________________________
> Post to : <email address hidden>
>

 403175147 (yanfb-1019) said on 2013-07-31: #2

Thank you very much !
In reality, the concrete in the mineral particles initially not in contact; mineral particles contact after the cement occur the destruction. I want to simulate it.
At 2013-07-30 13:41:32,"Jan Stránský" <email address hidden> wrote:
>
>
>Jan Stránský proposed the following answer:
>Hello,
>
>the very basic idea of DEM is that forces between particles are computed
>according to their overlap, i.e. when they are touching. So an idea for
>- particles, that do not touch initially is not a problem
>- use aabbEnlargeFactor>1 of Bo1 functor and interactionDetectionFactor>1
>of Ig2 functor (the same value for both cases, see [1]) to detect and
>create interactions even if particles are not in contact. Then the force is
>applied on particles even if they do not touch and when they touch, the
>force has certain value depending on you enlargeFactors value, particle
>size, stiffness and contact law used.
>
>I am not sure if this is what you are looking for, in this kind of
>questions it is always good to explain also why you want to do such things
>(some example what you want to simulate for example).
>cheers
>Jan
>
>
>
>
>
>> New question #233232 on Yade:
>>
>> Hello !
>> I want to simulation Initially particles do not touch and then
>> particles touch when the force between the particles reaches a certain
>> value. I do not know how to do it .
>>
>> --
>> You received this question notification because you are a member of
>>
>> _______________________________________________
>> Post to : <email address hidden>
>>
>
>--
>
>_______________________________________________
>Post to : <email address hidden>

 Launchpad Janitor (janitor) said on 2013-08-15: #3

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

 403175147 (yanfb-1019) said on 2013-08-21: #4

Thank you teacher!
Can you tell me how to apply force for particles? What command stream or programming do we need?
At 2013-07-31 08:43:39,"平洋" <pingyang.1019@163.com> wrote:
>Thank you very much !
> In reality, the concrete in the mineral particles initially not in contact; mineral particles contact after the cement occur the destruction. I want to simulate it.
>At 2013-07-30 13:41:32,"Jan Stránský" <email address hidden> wrote:
>>
>>
>>Jan Stránský proposed the following answer:
>>Hello,
>>
>>the very basic idea of DEM is that forces between particles are computed
>>according to their overlap, i.e. when they are touching. So an idea for
>>- particles, that do not touch initially is not a problem
>>- use aabbEnlargeFactor>1 of Bo1 functor and interactionDetectionFactor>1
>>of Ig2 functor (the same value for both cases, see [1]) to detect and
>>create interactions even if particles are not in contact. Then the force is
>>applied on particles even if they do not touch and when they touch, the
>>force has certain value depending on you enlargeFactors value, particle
>>size, stiffness and contact law used.
>>
>>I am not sure if this is what you are looking for, in this kind of
>>questions it is always good to explain also why you want to do such things
>>(some example what you want to simulate for example).
>>cheers
>>Jan
>>
>>
>>
>>
>>
>>> New question #233232 on Yade:
>>>
>>> Hello !
>>> I want to simulation Initially particles do not touch and then
>>> particles touch when the force between the particles reaches a certain
>>> value. I do not know how to do it .
>>>
>>> --
>>> You received this question notification because you are a member of
>>>
>>> _______________________________________________
>>> Post to : <email address hidden>
>>>
>>
>>--
>>
>>_______________________________________________
>>Post to : <email address hidden>
>
>
>_______________________________________________
>Post to : <email address hidden>

 Klaus Thoeni (klaus.thoeni) said on 2013-08-21: #5

Hi,

in python you can just use:

For more details see [1].

HTH
Klaus

On Wednesday 21 August 2013 01:56:07 pingyang.1019@163.com wrote:
> Question #233232 on Yade changed:
>
> Status: Expired => Open
>
> pingyang.1019@163.com is still having a problem:
> Thank you teacher!
> Can you tell me how to apply force for particles? What command stream
> or programming do we need?
> At 2013-07-31 08:43:39,"平洋" <pingyang.1019@163.com> wrote:
> >Thank you very much !
> >
> > In reality, the concrete in the mineral particles initially not in
> > contact; mineral particles contact after the cement occur the
> > destruction. I want to simulate it.>
> >At 2013-07-30 13:41:32,"Jan Stránský"
> >>Question #233232 on Yade changed:
> >>
> >> Status: Open => Answered
> >>
> >>Jan Stránský proposed the following answer:
> >>Hello,
> >>
> >>the very basic idea of DEM is that forces between particles are computed
> >>according to their overlap, i.e. when they are touching. So an idea for
> >>- particles, that do not touch initially is not a problem
> >>- use aabbEnlargeFactor>1 of Bo1 functor and interactionDetectionFactor>1
> >>of Ig2 functor (the same value for both cases, see [1]) to detect and
> >>create interactions even if particles are not in contact. Then the force
> >>is
> >>applied on particles even if they do not touch and when they touch, the
> >>force has certain value depending on you enlargeFactors value, particle
> >>size, stiffness and contact law used.
> >>
> >>I am not sure if this is what you are looking for, in this kind of
> >>questions it is always good to explain also why you want to do such things
> >>(some example what you want to simulate for example).
> >>cheers
> >>Jan
> >>
> >>
> >>
> >>
> >>2013/7/30 pingyang.1019@163.com <email address hidden>
> >>
> >>> New question #233232 on Yade:
> >>>
> >>> Hello !
> >>>
> >>> I want to simulation Initially particles do not touch and then
> >>>
> >>> particles touch when the force between the particles reaches a certain
> >>>
> >>> value. I do not know how to do it .
> >>>
> >>> --
> >>> You received this question notification because you are a member of
> >>>
> >>> _______________________________________________
> >>> Post to : <email address hidden>
> >>> More help : https://help.launchpad.net/ListHelp
> >>
> >>--
> >>You received this question notification because you are a member of
> >>
> >>_______________________________________________
> >>Post to : <email address hidden>
> >
> >_______________________________________________
> >Post to : <email address hidden>
>
> --
> You received this question notification because you are a member of
>
> _______________________________________________
> Post to : <email address hidden>

 Bruno Chareyre (bruno-chareyre) said on 2013-08-21: #6

> In reality, the concrete in the mineral particles initially not in contact

You can create interactions by hand as explained in [1].
If the particles are defined with material type CohFrictMat, you can tweak the plastic part of the normal displacement so that the initial configuration is at equilibrium. Like this:

i=utils.createInteraction(id1,id2)
i.phys.unp=i.geom.penetrationDepth

 Bruno Chareyre (bruno-chareyre) said on 2013-08-21: #7

@Klaus

Actually this force will be erased at the next step, right?
It gives me an idea on a possible variant that would store user defined forces and apply them forever. It would be a usefull replacement of the painful ForceEngine and it doesn't sound difficult to implement.

 Christian Jakob (jakob-ifgt) said on 2013-08-21: #8

> Actually this force will be erased at the next step, right?

> It gives me an idea on a possible variant that would store user defined forces and apply them forever. It would be a usefull
> replacement of the painful ForceEngine and it doesn't sound difficult to implement.

this sounds good for me too.
if this new feature is available clumps/apply-buoyancy-clumps.py example could be rewritten ...

 Bruno Chareyre (bruno-chareyre) said on 2013-08-22: #9

>a possible variant that would store user defined forces and apply them forever

Done. Now, this is possible:

I've put a new section in the user manual, also explaining how to impose velocity without TranslationEngine (to appear online in a couple hours):

 Christian Jakob (jakob-ifgt) said on 2013-10-04: #10

Thanks Bruno for this new feature.

Unfortunately it is not possible to use O.forces.addF() for clumps ...

 Bruno Chareyre (bruno-chareyre) said on 2013-10-04: #11

It should work for clumps. I will have a look.

 Bruno Chareyre (bruno-chareyre) said on 2013-10-04: #12

Would you send me an example script Christian?

 Christian Jakob (jakob-ifgt) said on 2013-10-04: #13

replace lines 99 - 104 by this line:

and you will see, that buoyancy is not acting on clumps ...

 Bruno Chareyre (bruno-chareyre) said on 2013-10-04: #14

It works for me. In fact I see the clumps floating as the water table
goes up, as obviously this lines replacement gives a buoyancy force
which is too high.
I also tested this 2-liner, which works equally well:
O.bodies.appendClumped([sphere((0,0,0),1),sphere((1,0,0),1)])

So, I don't understand what doesn't work for you.

B

 Christian Jakob (jakob-ifgt) said on 2013-10-04: #15

Just to be sure, we are talking about the same script.

This part is working fine:

F_buo = -1*(pi/3)*dh*dh*(3*rad - dh)*rho_f*integrator.gravity # = -V*rho*g
#apply buoyancy force (will overwrite old forces applied with addF command)
if b.isStandalone and isinstance(b.shape,Sphere):
if b.isClump:
keys = O.bodies[b.id].shape.members.keys()
for ii in range(0,len(keys)):

But this affects only spheres (no clumps):

F_buo = -1*(pi/3)*dh*dh*(3*rad - dh)*rho_f*integrator.gravity # = -V*rho*g
#apply buoyancy force (will overwrite old forces applied with addF command)

I can imagine, that you used this (which explains differences between your and my results):

F_buo = -1*(pi/3)*dh*dh*(3*rad - dh)*rho_f*integrator.gravity # = -V*rho*g
#apply buoyancy force (will overwrite old forces applied with addF command)
if b.isStandalone and isinstance(b.shape,Sphere):

#indents are lost, sorry!

 Christian Jakob (jakob-ifgt) said on 2013-10-04: #16

... to be more precise:

> I also tested this 2-liner, which works equally well:
> O.bodies.appendClumped([sphere((0,0,0),1),sphere((1,0,0),1)])

this works well,

but in buoyancy example spheres and clumps gets separated. sphere are floating, clumps are falling ...

 Bruno Chareyre (bruno-chareyre) said on 2013-10-04: #17

I tried this in your script, clumps float, spheres fall:

As far as I can see, the problem (if there is a problem) may be in the
way you define F_buo. The function addF() does what it is supposed to
do: it applies F_buo on the clump.

Bruno

 Bruno Chareyre (bruno-chareyre) said on 2013-10-04: #18

Now I see that this is ok:

but with this the force on clumps become zero after some time:
O.forces.addF(b.id,F_buo,permanent=True) #The line replacement you suggested initially

Looking at the script, I don't understand why it happens, but I don't think there is something to fix in addF itself.

 Christian Jakob (jakob-ifgt) said on 2013-10-17: #19

Finally I could fix the bouyancy example.

The problem was in saturatedList:
When a sphere was added to this (python) list, everything works fine ...
I dont know why, but it is fixed now by removing saturatedList from the script ^^

Christian

 Bruno Chareyre (bruno-chareyre) said on 2013-10-18: #20

Thanks for update. I will sleep better. :)
I did not see any cause for that in the c++, but neither did I in your script. Uncomfortable!