overlap with no force, pollygon collision,membrane

Asked by mohsen

In the name of god
hello all!
happy new year!!
i have searched Yade documentations but could not find what i was searching! here are my questions:

1- I want to generate an 'elastic' body (so rigid bonds and clump idea are not useful) with arbitrary shape such that:
    i- it's surface should be smooth, to provide such feature i thought may be arranging spheres with prescribed overlap (but with no force) could be the answer. is this OK? if yes how to apply it in YADE? if not , is there a better suggestion?
   ii- As the shape is arbitrary (suppose a 2D potato) and i need a realistic response of the body, i have decided to fill the inside of potato with spheres with overlap but no force generated ( like previous part of my question); any better idea? if this is OK, what is modelling consideration (any comment about forces, moments, contact law and ...)?

2- In new version of Yade, is it possible to capture polygon collision?

3- Can i model a flexible membrane in Yade? Is there any new findings after zuoguang's question [1]?

Seeking your help

[1]: https://answers.launchpad.net/yade/+question/254339

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
mohsen
Solved:
Last query:
Last reply:
Revision history for this message
Jérôme Duriez (jduriez) said :
#1

Hello,

For the "overlap with no force" part of your question, you may find an answer in the answers #13, 14, 15 of https://answers.launchpad.net/yade/+question/269724,
And the link therein (in #15)

The method to introduce such feature in your simulations is not consensual, but at least you will then know one method.

As a general remark, I suggest to open 3 distinct Launchpad questions in such case where you have 3 different questions.

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

Hi Mohsen,

> 1- I want to generate an 'elastic' body (so rigid bonds and clump idea
> are not useful) with arbitrary shape such that:
> i- it's surface should be smooth, to provide such feature i thought
> may be arranging spheres with prescribed overlap (but with no force) could
> be the answer. is this OK? if yes how to apply it in YADE? if not , is
> there a better suggestion?

   ii- As the shape is arbitrary (suppose a 2D potato) and i need a
> realistic response of the body, i have decided to fill the inside of potato
> with spheres with overlap but no force generated ( like previous part of my
> question); any better idea? if this is OK, what is modelling consideration
> (any comment about forces, moments, contact law and ...)?

>

As suggested by Jerome, some contact models allow this feature. I use
CpmMat for this purpose. Overlaping spheres may be used if such surface is
sufficiently smooth for you. I am curious myself, so I will create a simple
example and post it here :-) how many such potatoes would you like to
simulate?

2- In new version of Yade, is it possible to capture polygon collision?
>

There are polyhedra implemented, including collision detection and one
material law (repulsive force is proportional to overlapping volume).
Polygons can be simulated as prisms.

>
> 3- Can i model a flexible membrane in Yade? Is there any new findings
> after zuoguang's question [1]?
>

It is not possible in Yade currently. You have to combine Yade with other
software or use different software, like Woodem (suggested by Vaclav in
referenced question)

cheers
Jan

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

Hi Mohsen,

you can try the following script. The simulation is very simple with two
macrobodies, but I hope you can get some feeling what is possible and how
it looks like. If you have any questions concerning the code, just ask.

If you choose this way, you will probably have to spend some time on
calibration material parameters to get desired macroscopic response.

The main idea is that initial bonds (elasticity of bodies) are created at
first time step with original "soft" young's modulus. Than this modulus is
changed, so newly created interactions (the contact interactions) will have
higher stiffness.

cheers
Jan

########################################################################################################
from math import pow
from itertools import product
radius = 1
grid = .5
nGrid = int(20/grid)

mat =
CpmMat(young=1e6,neverDamage=True,sigmaT=1e20,epsCrackOnset=1e20,relDuctility=10)
O.materials.append(mat)

# conditions for positions of particle's centers to be part of a potatoe
potatoes = [
lambda x: pow((x[0]-18)/1.,2) + pow((x[1]-4)/2.,2) + pow((x[2]-9)/3.,2) <
1, # ellipsoid at center (18,4,9) and samiaxes 1,2,3
lambda x: pow((x[0]-10)/10.,2) + pow((x[1]-4)/2.,2) + pow((x[2]-3)/1.,2) <
1, # ellipsoid at center (18,4,3) and samiaxes 10,2,1
]
macroBodies = [[] for i in potatoes]

for x,y,z in product(range(nGrid),range(nGrid),range(nGrid)):
for i,potatoe in enumerate(potatoes):
pos = grid*Vector3(x,y,z)
if potatoe(pos):
s = sphere(pos,radius)
macroBodies[i].append(s)
O.bodies.append(s)

for b in macroBodies[0]:
b.state.vel = (0,0,-10)

intRadius = 1
O.engines = [
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=intRadius,label='is2aabb')]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=intRadius,label='ss2d3dg')],
[Ip2_CpmMat_CpmMat_CpmPhys()],
[Law2_ScGeom_CpmPhys_Cpm()]
),
NewtonIntegrator(damping=0),
]

# creates initial cohesive bonds with young=1e6 and reset intRadius
O.dt = 0
O.step()
is2aabb.aabbEnlargeFactor = 1.
ss2d3dg.interactionDetectionFactor = 1.

# change young such that new interactions will have higher young
mat.young = 1e10
O.dt = .8*PWaveTimeStep()
########################################################################################################

2016-01-05 19:44 GMT+01:00 Jan Stránský <email address hidden>:

> Hi Mohsen,
>
>
>> 1- I want to generate an 'elastic' body (so rigid bonds and clump idea
>> are not useful) with arbitrary shape such that:
>> i- it's surface should be smooth, to provide such feature i thought
>> may be arranging spheres with prescribed overlap (but with no force) could
>> be the answer. is this OK? if yes how to apply it in YADE? if not , is
>> there a better suggestion?
>
> ii- As the shape is arbitrary (suppose a 2D potato) and i need a
>> realistic response of the body, i have decided to fill the inside of potato
>> with spheres with overlap but no force generated ( like previous part of my
>> question); any better idea? if this is OK, what is modelling consideration
>> (any comment about forces, moments, contact law and ...)?
>
>
>>
>
> As suggested by Jerome, some contact models allow this feature. I use
> CpmMat for this purpose. Overlaping spheres may be used if such surface is
> sufficiently smooth for you. I am curious myself, so I will create a simple
> example and post it here :-) how many such potatoes would you like to
> simulate?
>
>
> 2- In new version of Yade, is it possible to capture polygon collision?
>>
>
> There are polyhedra implemented, including collision detection and one
> material law (repulsive force is proportional to overlapping volume).
> Polygons can be simulated as prisms.
>
>
>>
>> 3- Can i model a flexible membrane in Yade? Is there any new findings
>> after zuoguang's question [1]?
>>
>
> It is not possible in Yade currently. You have to combine Yade with other
> software or use different software, like Woodem (suggested by Vaclav in
> referenced question)
>
> cheers
> Jan
>
>
>

Revision history for this message
mohsen (agha-mohsena) said :
#4

Thanks so much Jérôme and Jun.
I studied carefully #1 , #2 and #3 and also [1],[2].

1- But about Jérôme comments:
I studied [1] and some questions arose:
1-1: It is better to use JCF model for modelling an elastic beam than Cpm. am i right? Is there any example script?
1-2: In [1], #10 Jérôme said that "... so that distant particles may be bonded". It is really a good feature. this provides a tool to a potato by distant particles not filling with particles. the advantage is decreasing number of particles in the simulation. so how it possible? can you help me?
1-3: I run the script written in #4,[2] but there is no displacement. and also there is a error:
>>>No such interaction.
though in the 3d view the two spheres has overlap. what is the reasons.

2- @ Jan the code was fantastic. I tried that and some results were hard to underestand
 2-1- Why at the first step the Young modulus is decreased?
 I tried this two and in both the particles positions got infinite:
        i. first young modulus: 10e6; second young modulus: 10e6
 ii. first young modulus: 10e10; second young modulus: 10e10
 And I tried below set of youngs and the potatoes explode but particle's positions were not infinite
 iii. first young modulus: 10e2; second young modulus: 10e6.
        can you explain me why such results happened?
 2-2- In the simulation maybe each potato suffers high compressive stress whereas it should show elastic behavior ( suppose a tire chips which easily deforms (stretching or bending or twisting) but there is no breakage or failure ). To apply mentioned situations and avoid any concern about bond breakage, which parameters should be considered?
 2-3- Any suggestion or previous experiences about calibrating?

[1] https://answers.launchpad.net/yade/+question/269724>
[2] https://answers.launchpad.net/yade/+question/266828

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

Hi,

1-1 A precise comparison of contact laws is a difficult task (furthermore often ending as polemic), so no I do not want to mean that the JCF model is more suited than Cpm to model an elastic beam.
In particular, none of theses models has been specifically designed for such task. So both would probably do the trick.
Not mentionning the CohFrictMat - Law2_ScGeom6D_CohFrictPhys_CohesionMoment model..

Anyway, on the JCF side, there is no example script for such elastic beam use (you have other examples in examples/jointedCohesiveFrictionalPM involving rock joints)

1-2 Your idea here is not completely clear to me. You want to simulate a deformable potato using distant particles ? Then, your potato would include holes ?

Anyway, introducing cohesion for distant particles with the JCFpm obeys the logic presented here:
https://yade-dem.org/doc/user.html#creating-interactions
If you wanna use the JCFpm, just replace in the example there the Cpm Law2 and Ip2 with the JCFpm Law2 and Ip2. Everything else is strictly the same

Applying cohesion to distant particles, associating zero force to the distant configuration, is also possible with the "CohesionMoment" model (quoted above) using the "unp" method discussed in your two links [1]-[2]

I do not know if such distant bond (with zero initial force) is possible with the CpmMat

1-3 If I copy paste in "ex.py" the example I wrote there, and run this "ex.py" with my yade version (and nothing else), everything goes smoothly here. I do not get such error as you, and end up with the expected plots showing some oscillation..
If it is not the case on your side, can you provide more details ? E.g. are you sure there is no previous message ? (It would make sense putting it as comments in that initial question, rather than here)

Revision history for this message
mohsen (agha-mohsena) said :
#6

Hello Jérôme:
>1-2-: Your idea here is not completely clear to me...
There would be no hole. to clarify suppose a long 2D square-shape potato with spheres are located on it's perimeter. So external surface is smooth but there is no particle inside of potato. Spheres have overlap but no initial force evoked. The distant bonds between upper spheres and lower ones(ignore lateral spheres for now), guarantees the elastic performance of potato although the arrangement of bonds (which particle's should be bonded to each other to show a realistic behavior) must be calibrated.

So now, in Yade my simulations include 'n' particles(also a potato). Can i create a bond between specific particles (e.g. particles i and j) with no overlap ? In [3] i don't know where i should specify the particle id?

>1-3 If I copy paste in "ex.py" the example....
I'll check the script soon, comment in the [2] but also notify you here.

Thanks
[2] https://answers.launchpad.net/yade/+question/266828
[3]https://yade-dem.org/doc/user.html#creating-interactions

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

Hi Mohsen,

1-1: It is better to use JCF model for modelling an elastic beam than Cpm.
> am i right? Is there any example script?

As already suggested by Jerome, in the elastic regime, the two models are
equivalent. They differ in the inelastic regime, since both are developed
to model different phenomena.

1-2: In [1], #10 Jérôme said that "... so that distant particles may be
> bonded". It is really a good feature. this provides a tool to a potato by
> distant particles not filling with particles. the advantage is decreasing
> number of particles in the simulation. so how it possible? can you help me?

see below and [2]

2-1- Why at the first step the Young modulus is decreased?
> I tried this two and in both the particles positions got infinite:
> i. first young modulus: 10e6; second young modulus: 10e6
> ii. first young modulus: 10e10; second young modulus: 10e10
> And I tried below set of youngs and the potatoes explode but
> particle's positions were not infinite
> iii. first young modulus: 10e2; second young modulus: 10e6.
> can you explain me why such results happened?

When I tried the same modulus, the potatoes had too big overlap. So in the
first stage, 1e6 was defined, which affects elastic bonds inside the
potatoes. The value 1e10 then defines modulus of newly created contacts,
resulting in reasonable overlap of potatoes.

Exploding and/or NaN or infinite particles position is often the result of
too large time step. I tried 1e6/1e6 combination with "O.dt =
.1*PWaveTimeStep()" and it worked OK.

2-3- Any suggestion or previous experiences about calibrating?

the macroscopic stiffness is proportional to the microscopic one, so
calibrating stiffness is an easy task. Poisson's ratio is a bit more
tricky, but in general the lower 'poisson' parameter, the higher is
macroscopic Poisson's ratio.

So now, in Yade my simulations include 'n' particles(also a potato). Can i
> create a bond between specific particles (e.g. particles i and j) with no
> overlap ? In [3] i don't know where i should specify the particle id?

[1] ([3] in you original message) presents a concept of automatic distant
bonds creation, controled by parameter intRadius. In this case, **all**
particle whose distance is less then (intRadius*their diameter) will be
bonded, so non-touching particles as well.

You can also create interaction between arbitrary particles, see [2]. In
the case of Cpm, such bond is cohesive and stress free by default.

cheers
Jan

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

Revision history for this message
mohsen (agha-mohsena) said :
#8

@#6
Jérôme I added a comment on [1]

@ #7
Thanks Jan.
For a betters understanding of the potato script, i run it with various 'intRadious' and the results were as expected. I also try this script with three sphere; but something strange happened and particles did not move because of gravity. can you help me why?
 My script:
mat=CpmMat(young=1e6,neverDamage=True,sigmaT=1e20,epsCrackOnset=1e20,relDuctility=10)

O.bodies.append([
# fixed: particle's position in space will not change (support)
sphere(center=(0,0,0),radius=.5,fixed=True),
# this two particles are free, subject to dynamics
sphere((0,0,2),.5),sphere((0,0,20),.5)
])

intRadius = 1

O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=intRadius,label='is2aabb')]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=intRadius,label='ss2d3dg')],
[Ip2_CpmMat_CpmMat_CpmPhys()],
[Law2_ScGeom_CpmPhys_Cpm()]
),
NewtonIntegrator(damping=0),
]

# creates initial cohesive bonds with young=1e6 and reset intRadius
O.dt = 0
O.step()
is2aabb.aabbEnlargeFactor = 1.
ss2d3dg.interactionDetectionFactor = 1.

# change young such that new interactions will have higher young
mat.young = 1e6
O.dt = .1*PWaveTimeStep()
###################################################
[1]: https://answers.launchpad.net/yade/+question/266828

Revision history for this message
mohsen (agha-mohsena) said :
#9

Thank you all

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

Hi, sorry for late remark but I think this paper [1] is relevant to your question.
It shows an example of a deformable potatoe (spherical potatoe in the example but it is not a restriction).
Also an example of a flexible membrane and of a tube.
By now this code should be available. Else it will happen shortly.

Clearly, a difficulty is to relate the elastic properties of a continuous potatoe to that of the model, since it simulates hollow objects with sort of shell elements instead of volume elements. I don't think filling the potatoe with overlapping spheres make this problem easier though.
Regards
Bruno

[1] http://www.sciencedirect.com/science/article/pii/S0266114415001235

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

Hi, Bruno is right. The basic code is up and running in the latest trunk version. For examples see [1].

Have fun,
Klaus

[1] https://github.com/yade/trunk/tree/master/examples/pfacet