← Back to team overview

yade-users team mailing list archive

Re: [Question #280376]: overlap with no force, pollygon collision, membrane

 

Question #280376 on Yade changed:
https://answers.launchpad.net/yade/+question/280376

Jan Stránský proposed the following answer:
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ý <honzik.stransky@xxxxxxxxx>:

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

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.