Simulation of Dynamic compaction

Asked by Sirasak Detcheewa

Hi i try to simulate the dynamic compaction by dropping the weight to the footing. and the current code are:

from yade import pack,plot
'''pred=pack.inCylinder((0,0,0),(0,0,0.25),0.10)
sp=pack.randomDensePack(pred,radius=0.01,spheresInCell=300)'''

## 1.create boundaries and the packs.
O.bodies.append(geom.facetBox((4, 4, 4), (4, 4, 4), wallMask=31))
sp = pack.SpherePack()
pred=pack.inAlignedBox((0,0,0),(8,8,8))
sp=pack.randomDensePack(pred,spheresInCell=1000,radius=.3,rRelFuzz=.4,returnSpherePack=True)

sp.toSimulation()

idSteel=O.materials.append(FrictMat(young=210e9,poisson=.25,frictionAngle=.8,label="steel"))
Steel=O.materials[idSteel]

calm()

O.engines=[ForceResetter(),
    InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()]),
    InteractionLoop(
                # handle sphere+sphere and facet+sphere collisions
                [Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()],
                [Ip2_FrictMat_FrictMat_FrictPhys()],
                [Law2_ScGeom_FrictPhys_CundallStrack()])

    ,NewtonIntegrator(gravity=(0, 0, -9.81), damping=0.4),
    PyRunner(iterPeriod=10000,command="addPlotData()"),
    VTKRecorder(iterPeriod=10000,recorders=['spheres','facets','colors'],fileName='p2-'),
    PyRunner(command='checkUnbalanced()', realPeriod=2, label='checker'),
    PyRunner(command='compaction()', realPeriod=3, label='compact'),
]
def addPlotData():
  '''Dz=hammer.state.displ[2]
  Fz=O.forces.f(hammerID)[2]
  plot.addData(i=O.iter,Fz=Fz,Dz=Dz)'''

## 2.lets the pack settle and drop the footing
def checkUnbalanced():
 # at the very start, unbalanced force can be low as there is only few contacts, but it does not mean the packing is stable
 if O.iter < 5000:
  return
 # the rest will be run only if unbalanced is < .1 (stabilized packing)
 if unbalancedForce() > .1:
  return

 footing=O.bodies.appendClumped([ sphere([4,4,9], material=Steel, radius=0.25), sphere([3.5,4,9], material=Steel, radius=0.25),sphere([4.5,4,9], material=Steel, radius=0.25) , sphere([3.66,4.38,9], material=Steel, radius=0.25),sphere([4,4.5,9], material=Steel, radius=0.25),sphere([4.35,4.35,9], material=Steel, radius=0.25), sphere([4.35,3.64,9], material=Steel, radius=0.25),sphere([4,3.5,9], material=Steel, radius=0.25) , sphere([3.64,3.64,9], material=Steel, radius=0.25) ])
 checker.command = 'compaction()'

## 3.dropping the wegiht from a height.
def compaction():
 weight=O.bodies.appendClumped([ sphere([4,4,11], material=Steel, radius=0.25), sphere([3.5,4,11], material=Steel, radius=0.25),sphere([4.5,4,11], material=Steel, radius=0.25) , sphere([3.66,4.38,11], material=Steel, radius=0.25),sphere([4,4.5,11], material=Steel, radius=0.25),sphere([4.35,4.35,11], material=Steel, radius=0.25), sphere([4.35,3.64,11], material=Steel, radius=0.25),sphere([4,3.5,11], material=Steel, radius=0.25) , sphere([3.64,3.64,11], material=Steel, radius=0.25) ])
 ##checker.command = 'compaction()'

O.dt=0.5*PWaveTimeStep()
O.run()
O.saveTmp()

I have some questions.
1. At step#1 for create packing is it possible to assign the material properties to the particle in side the pack and how can i apply the particle size distribution.

2. At step #2 after the gravity deposit is finished i try to add 'footing(clump)' to the system and after that i try to drop the 'weight(clump) at the specific height. The 3D animation shows after the weight is drops the footing and weight is bounce off and dissapeard. Could you suggest better method to do this simulation or did i miss something in the engine. I try to drop the weight at every 2 second while the footing still remain at the top of the pack.
Im am very new with YADE dem and try to follow the explamples in the website and try to read the manual.
Thank you very much

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Karol Brzezinski
Solved:
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hello,

> Im am very new with YADE

welcome :-)

Please read [1], point 5, and open separate question for separate problems.
Here:
- 1st question: assign material
- 2nd question: particle size distribution
- 3rd question: your problem 2.

Some comments:

> to the particle in side the pack

what does this mean? inside? on a side? ... ?

> 2. ...

I really do not understand what is desired behavior..
please try to be more specific (in the newly opened questions :-)

Cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask

Revision history for this message
Karol Brzezinski (kbrzezinski) said :
#2

Hi Sirasak,

As Jan said you should try to explain better how you imagine your code should work.

Your code is a little bit messy, but I will focus only on major issues:

- You can pass sphere properties when the sphere pack is added to the simulation by the sp.toSimulation() command. You can follow the first couple of lines of this example [2]
- Since your 'soil' particles are relatively soft (default young=1.0MPa), so the computed timestep is big. After you add stiff, steel elements, you should change the timestep again. Otherwise, your simulation becomes unstable, and bodies 'disappear'.
- You add PyRunner with the 'compaction()' command twice. First time when setting up the simulation. Secondly, when 'checkUnbalanced()' changes to the 'compaction()' . Also, are you sure you want to add weights all the time? Or rather move the same weight up, and then drop again.

Cheers,
Karol

[2] https://yade-dem.org/doc/tutorial-short-course-fluids.html

Revision history for this message
Sirasak Detcheewa (tanksrs) said :
#3

Thanks you very much for the answer Jan and Karol
@Jan: its is 'inside' sorry for the miss typing and yes i will create another post for the questions

@Karol: This help me alot thank you. Yes, at first i was trying to make it move the weight up and drop it but i don't know how to code it do you have any suggestion that i should follow. and also i would like to know if its better to use pfacet as a footing rather than a clump.

Revision history for this message
Best Karol Brzezinski (kbrzezinski) said :
#4

Hi Sirasak,

As previously mentioned, you should open separate questions for separate problems [1].

You are at an early stage of the simulation, and it is hard to tell what will work out the best for you. I would start with modeling the footing with a dynamic clump of facets (see the first answer in this [3] topic to see how to clump facets). The footing can be loaded by dropping a single sphere on it. There are multiple ways to 'move the weigh up', for example, using function shiftBodies() [4].

Good luck!
Karol

[3] https://answers.launchpad.net/yade/+question/696056#1
[4] https://yade-dem.org/doc/yade.utils.html?highlight=shift%20bodies#yade._utils.shiftBodies

Revision history for this message
Sirasak Detcheewa (tanksrs) said :
#5

Thanks Karol Brzezinski, that solved my question.