How to assign the values of kn ks of particles in Yade directly

Asked by nie jiayan

Dear all, Now I want to do some simulations with different size particles using Ip2_FrictMat_FrictMat_FrictPhys(), and the contacts can have the same kn and ks, what should I do? I suggest that some modification of source code should be done. Can someone give me some advice? Ps, I use the Yade 2017.01a releases in Ubuntu 16.04.

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
Jan Stránský (honzik) said :
#1

Hello,

sorry, your question is too ambiguous, please be more specific (especially what is wrong)

> the contacts can have the same kn and ks, what should I do?

simple answer, you should do nothing special :-)

yes, contacts can have the same kn and ks (depending on meaning):
- kn=ks would be for poisson=1.0
- kn_interaction1=kn_interaction2 would be if their material properties and radii related to interactions have mutually special properties.

Is "same kn and ks" (whatever it means) a problem? why? why would you want it different?

thanks
Jan

Revision history for this message
nie jiayan (jiayann) said :
#2

Dear Jan,

Thanks for your suggestions. My question is actually the second one you mentioned that all the interactions have the same kn values and also the same ks values.

 Actually, you know I used PFC before, and in PFC we can directly assign the values of kn, ks in a simple linear contact model. But when I use Yade to do the same simulation to compare both results, I found that in Yade the particle materials properties like young, and poisson need to be assigned when using the p2_FrictMat_FrictMat_FrictPhys() functor. And the normal and shear stiffness of particles are determined based on the particle radius and also the materials properties. So I just wonder how to directly assign their values like kn=1.0e8, ks=1.0e8*0.3? I think it needs to modify some source code maybe? I have little experience about it.

Regards,
jiayan

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

Thanks for clarification. So the "can have the same kn and ks" should have been "should have" or "must have" :-) Then it would sound completely different..

See similar questions [1,2].

What is the reason you want this? as discussed in [1,2], it is quite non-standard and therefore Yade does not support it [3]..

Some options:
a) With little modification of source code, it is possible.
b) You can change manually kn and ks of existing interactions, but it would have no effect on newly created interactions..
c) [3] gives kn=2*(E1*r1*E*r2)/(E1*r1+E2*r2). If I am not mistaken, if you keep Ei*ri constant, than you always get the same kn. So you only need need to assign each particle separate material with such 'young' that b.mat.young*b.shape.radius are equal for all particles.

try c), if it works, it is the easiest, most general and maintainable option

cheers
Jan

[1] https://answers.launchpad.net/yade/+question/298001
[2] https://answers.launchpad.net/yade/+question/228494
[3] https://yade-dem.org/doc/formulation.html#stiffnesses

Revision history for this message
nie jiayan (jiayann) said :
#4

Dear Jan,
Thanks. I have tried c), and I found that is was not useful. But in option a), after some minor improvements of source code, that solved my problem.

Revision history for this message
nie jiayan (jiayann) said :
#5

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

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

Hello,
for future reference. could you please describe why c) was not useful?
thanks
Jan

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

Hi,

> after some minor improvements

Should read "after some minor regressions" IMO. :)
I think c) was a smart answer and I'm also wondering why it didn't help.
Bruno

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

For future reference, a MWE how to achieve this without modification of source code:

###
kn = 1e6
radii = [0.7, 0.8, 0.9, 1.0]
centers = [
   (0,0,0),
   (1,0,0),
   (0,1,0),
   (0,0,1),
]
youngs = [kn/r for r in radii]
materials = [FrictMat(young=young,poisson=0.3) for young in youngs]
O.bodies.append([sphere(c,r,material=mat,fixed=True) for c,r,mat in zip(centers,radii,materials)])
O.step()
for i in O.interactions:
   print i.phys.kn,i.phys.ks # prints "1000000.0 300000.0" for 6 interactions
###

cheers
Jan

Revision history for this message
nie jiayan (jiayann) said :
#9

Hi, Jan,

Thanks for your MWE. It functions well. but indeed when using this method, for a fixed kn, the sphere with a smaller radius will have a larger young, which results in a small critical time step. That's really time-consuming when conduct simulations with a gap-graded specimen.

Maybe for a simple linear contact model, like in PFC, we can directly assign the same values of normal and shear stiffness kn ,ks for all the contacts, and the critical time step is depends on the minimum of math.sqrt((mass/kn)) of the particle. I do not know if Yade has the same contact model since I am a novice. So I modified some source code to achieve this simple contact model.

Revision history for this message
nie jiayan (jiayann) said :
#10

Hi, Bruno, I just modified some source code to achieve the above mentioned contact model. Thanks.

Revision history for this message
nie jiayan (jiayann) said :
#11

Hi, Bruno, I just modified some source code to achieve the above mentioned contact model. Thanks.

Revision history for this message
Jérôme Duriez (jduriez) said :
#12

"the sphere with a smaller radius will have a larger young, which results in a small critical time step"

How do you define your time step ? I would imagine that behavior may happen if you use PWaveTimeStep (?) but I'm expecting it would not with GlobalStiffnessTimeStepper (which is the way to go), that directly uses the kn.

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

> for a fixed kn, the sphere with a smaller radius will have a larger young, which results in a small critical time step.

Absolutely.
And that's exactly what happens in PFC when you assign a unique kn.
Got it?

Bruno

p.s. @Jérôme, the effect is exactly the same with both PWaveTS or GSTS