# Polyhedra Simulation - Numerical Parameters

Hello,

I am trying to model a deposit of polyhedral particles in YADE.

I modified a pre-existing example in YADE's documentation (textExport.py).

However, I am not sure about the choice of the timestep.

And I would like to know if it possible to artificially increase the inertia tensor or damp the particles' rotation, because I have a very high residual rotational energy.

Can you please inform me about the choice of numerical parameters and whether the ones I use in the following example make sense from a numerical point of view.

Thanks in advance!

François

Here's my working code

###

from __future__ import print_function

from yade import plot, polyhedra_utils, export

from yade import qt

import numpy as np

import sys, time, os

if not(os.

os.mkdir('VTK')

m = PolyhedraMat()

m.density = 2700 #kg/m^3

m.young = 1E6 #Pa

m.poisson = 20000/1E6

m.frictionAngle = 0.67474 #rad

freq = 100 #output frequency, in iterations

dx = 0.07

nx = 8

dy = 0.07

ny = 8

dz = 0.07

nz = 8

O.bodies.

O.bodies.

O.bodies.

O.bodies.

O.bodies.

O.bodies.

for k in range(0,nz):

for j in range(0,ny):

for i in range(0,nx):

t = polyhedra_

u = np.random.random()

v = np.random.random()

w = np.random.random()

vtkExporter = export.

def vtkOutput():

vtkExporter

vtkExporter

vtkExporter

vtkExporter

vtkOutput() #initial state VTK

O.engines=[

ForceResetter(),

InsertionSor

InteractionLoop(

[

[

[

),

NewtonIntegr

PyRunner(

PyRunner(

]

O.dt=0.

#O.dt=0.00025

qt.Controller()

V = qt.View()

O.saveTmp()

O.run()

###

## Question information

- Language:
- English Edit question

- Status:
- Solved

- For:
- Yade Edit question

- Assignee:
- No assignee Edit question

- Solved by:
- Jan Stránský

- Solved:
- 2020-09-15

- Last query:
- 2020-09-15

- Last reply:
- 2020-09-10

Jan Stránský (honzik) said : | #1 |

Hello,

below are simple answers to your questions:

> However, I am not sure about the choice of the timestep.

chose such time step that leave the simulation stable.

Unfortunately I don't know if there is something like PWaveTimeStep for the polyhedra law..

trial-and-error time step determination can always be used

> And I would like to know if it possible to artificially increase the inertia tensor or damp the particles' rotation, because I have a very high residual rotational energy.

Yes, it is possible to artificially increase inertia tensor (b.state.inertia = ...).

You can also block degrees of freedom totally (b.state.

If such results better correspond to expected results, why not.

> Can you please inform me about the choice of numerical parameters and whether the ones I use in the following example make sense from a numerical point of view.

any set of numerical parameters may be good, it depends on your problem

> m.young = 1E6 #Pa

note that in the case of Law2_PolyhedraG

Recently I had a discussion of friend of mine using a few polyhedrons and their collisions observing the same, too much rotation. They tried PotentialBlocks with better results, so you also may try those.

cheers

Jan

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