timestep

Asked by mohsen

In the name of god

Hi Every one. when i need to rotate a group of facet by rotation engine i set rotation angle to desired one and O.dt=1 and run just one step
to follow this all the time the default engine called 'globaltimestepper' change the dt and hence cases problems.
I delete this engine and now i can easily rotate the group of facets by one step to desired rotation angle. this is the code:

###
from yade import ymport
fctIds= O.bodies.append(ymport.gmsh('conveyor3.mesh',scale=0.001,color=(1,0,0), mask=5))
O.engines=O.engines[0:3]+O.engines[4:5]
O.engines+=[RotationEngine(angularVelocity=-.16+radians(ba),ids=fctIds,rotateAroundZero=True, rotationAxis=(1,0,0),zeroPoint=(.5,1.5,.5))]
O.dt=1

O.run(2)

###
(from this MWE i have a question. if i run the simulation just one step nothing happens. why?!)

when i add some sphere to my simulation and then engines, everything goes wrong and there is no rotation as expected. and there is no rotation. this is the code;

##
from numpy.linalg import norm
import numpy as np

#mat=O.materials.append(ViscElMat(density=Density,frictionAngle=frictionAngle,tc=tc,en=en,et=es))
id_Mat=O.materials.append(FrictMat(young=1e6,poisson=0.2,density=7800,frictionAngle=1))
walls=O.materials[id_Mat]

## Import wall's geometry
from yade import ymport
fctIds= O.bodies.append(ymport.gmsh('conveyor3.mesh',scale=0.001,color=(1,0,0), mask=5,material=walls))
O.engines=O.engines[0:3]+O.engines[4:5]
O.engines+=[RotationEngine(angularVelocity=-.16+radians(50),ids=fctIds,rotateAroundZero=True, rotationAxis=(1,0,0),zeroPoint=(.5,1.5,.5))]
O.dt=1
O.run(2)

sp=pack.SpherePack()
sp.makeCloud((-0.2,-0.88,0.65),(0.2,1.0,1.55),rMean=0.075, rRelFuzz=0.3,num=100)
particles=O.bodies.append([sphere(c,r,mask=3,material=walls) for c,r in sp])

### Timestep
O.dt=.0002

O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()],
  [Ip2_FrictMat_FrictMat_FrictPhys()],
  [Law2_ScGeom_FrictPhys_CundallStrack()]
 ),
 NewtonIntegrator(damping=0.2,gravity=[0,0,-10], mask=2),
 DomainLimiter(lo=(-0.6,-1.0,-10.00),hi=(0.6,3.0,3.0),iterPeriod=200)
]

##
Any Help?

Question information

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

Hi,

I would suggest to look into the following keywords in the scientific/DEM literature: "explicit scheme", "critical time step", "divergence"
Because

> i set rotation angle to desired one and O.dt=1 and run just one step

this is not a good DEM practice I think (no offense intended) because of the O.dt.

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

Hi and very thanks for your answer

i understand.
but the aim was just to rotate the facets and because of that i set O.dt=1. I do not know why it changes automatically when the spheres are included in the simulations?

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

> but the aim was just to rotate the facets and because of that i set O.dt=1.

Any problem rotating them "manually"?:
- setting their position (before simulation starts)
- or velocity such that they come to desired position the next step
- ...

> I do not know why it changes automatically when the spheres are included in the simulations?

Because of the GlobalStiffnessTimeStepper, which chooses "best" time step automatically. This is by design.
If you do not want it, set its dead=True, do not use it at all, ...

Cheers
Jan

Can you help with this problem?

Provide an answer of your own, or ask mohsen for more information if necessary.

To post a message you must log in.