F

Asked by 403175147 on 2013-07-30

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:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
2013-08-21
Last reply:
2013-10-18
Jan Stránský (honzik) said : #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
your case:
- 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

[1] https://yade-dem.org/doc/user.html#creating-interactions

2013/7/30 pingyang.1019@163.com <email address hidden>

> New question #233232 on Yade:
> https://answers.launchpad.net/yade/+question/233232
>
> 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
> 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
>

403175147 (yanfb-1019) said : #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:
>Question #233232 on Yade changed:
>https://answers.launchpad.net/yade/+question/233232
>
> 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
>your case:
>- 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
>
>[1] https://yade-dem.org/doc/user.html#creating-interactions
>
>
>
>2013/7/30 pingyang.1019@163.com <email address hidden>
>
>> New question #233232 on Yade:
>> https://answers.launchpad.net/yade/+question/233232
>>
>> 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
>> 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
>>
>
>--
>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

Launchpad Janitor (janitor) said : #3

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

403175147 (yanfb-1019) said : #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:
>>Question #233232 on Yade changed:
>>https://answers.launchpad.net/yade/+question/233232
>>
>> 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
>>your case:
>>- 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
>>
>>[1] https://yade-dem.org/doc/user.html#creating-interactions
>>
>>
>>
>>2013/7/30 pingyang.1019@163.com <email address hidden>
>>
>>> New question #233232 on Yade:
>>> https://answers.launchpad.net/yade/+question/233232
>>>
>>> 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
>>> 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
>>>
>>
>>--
>>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
>
>
>_______________________________________________
>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

Klaus Thoeni (klaus.thoeni) said : #5

Hi,

in python you can just use:

O.forces.addF(bodyID,(Fx,Fy,Fz))

For more details see [1].

HTH
Klaus

[1] https://yade-dem.org/doc/yade.wrapper.html?highlight=addf#yade.wrapper.ForceContainer.addF

On Wednesday 21 August 2013 01:56:07 pingyang.1019@163.com wrote:
> Question #233232 on Yade changed:
> https://answers.launchpad.net/yade/+question/233232
>
> 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ý"
<email address hidden> wrote:
> >>Question #233232 on Yade changed:
> >>https://answers.launchpad.net/yade/+question/233232
> >>
> >> 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
> >>your case:
> >>- 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
> >>
> >>[1] https://yade-dem.org/doc/user.html#creating-interactions
> >>
> >>
> >>
> >>2013/7/30 pingyang.1019@163.com <email address hidden>
> >>
> >>> New question #233232 on Yade:
> >>> https://answers.launchpad.net/yade/+question/233232
> >>>
> >>> 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
> >>> 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
> >>
> >>--
> >>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
> >
> >_______________________________________________
> >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
>
> --
> 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

> 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

[1] https://www.yade-dem.org/doc/user.html#individual-interactions-on-demand

@Klaus
>> O.forces.addF(bodyID,(Fx,Fy,Fz))

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 : #8

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

right, i tested that already.

> 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 ...

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

Done. Now, this is possible:
O.forces.addF(id,f,permanent=True)

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):
https://yade-dem.org/doc/user.html#imposing-conditions

Christian Jakob (jakob-ifgt) said : #10

Thanks Bruno for this new feature.

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

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

Would you send me an example script Christian?

Christian Jakob (jakob-ifgt) said : #13

https://github.com/yade/trunk/blob/master/examples/clumps/apply-buoyancy-clumps.py

replace lines 99 - 104 by this line:

 O.forces.addF(b.id,F_buo,permanent=True)

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

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)])
O.forces.addF(2,(1,0,0),True)

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

B

Christian Jakob (jakob-ifgt) said : #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):
O.forces.addF(b.id,F_buo,permanent=True)
if b.isClump:
keys = O.bodies[b.id].shape.members.keys()
for ii in range(0,len(keys)):
O.forces.addF(keys[ii],(O.bodies[keys[ii]].state.mass/b.state.mass)*F_buo,permanent=True)

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)
O.forces.addF(b.id,F_buo,permanent=True)

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):
O.forces.addF(b.id,F_buo,permanent=True)

#indents are lost, sorry!

Christian Jakob (jakob-ifgt) said : #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)])
> O.forces.addF(2,(1,0,0),True)

this works well,

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

I tried this in your script, clumps float, spheres fall:
if b.isClump: O.forces.addF(b.id,F_buo,permanent=True) #else nothing

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

Now I see that this is ok:
if b.isClump: O.forces.addF(b.id,F_buo,permanent=True)

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 : #19

Finally I could fix the bouyancy example.

The problem was in saturatedList:
When a clump was added to this (python) list, its permanent forces added by addF() disappeared.
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

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!

Can you help with this problem?

Provide an answer of your own, or ask 403175147 for more information if necessary.

To post a message you must log in.