unexpected Plot of normal force

Asked by Pawan

Here is my simulation
I have placed a sphere on a horizontal wall. A normal force is applied on the sphere vertically downward. Some velocity is given to the plate.

Now I am recording normal force on sphere vs displacement of plate graph.
Here I am expecting a constant value of normal force on sphere but Yade returns an abrupt behaviour in starting , however it is constant thereafter but with some different magnitude.
I have not used force resetter as it makes the graph periodic and gives unwanted results.

Kindly help us with how we can plot the actual normal force which is given initially on the graph.

from yade import plot
MaterialS=O.materials.append(FrictMat(young=70e6,poisson=.23,frictionAngle=radians(30))) #material of sphere
MaterialP=O.materials.append(FrictMat(young=700e6,poisson=.23,frictionAngle=radians(30))) #material of plate
sp=sphere((0,0,0),1,material=MaterialS) #creating sphere
plate=utils.wall(-1,axis=2,material=MaterialP) #creating plate
plateID=O.bodies.append(plate) #plateID=0
spID=O.bodies.append(sp) #spID=1
O.forces.setPermF(1,(0,0,-4)) # 4 mag. force on sphere in -ve z direction
plate.state.vel =(0,1,0) #plate given const. velocity in y direction
O.engines=[
    #ForceResetter(),
    InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Wall_Aabb()]),
    InteractionLoop(
     [Ig2_Wall_Sphere_ScGeom()],
     [Ip2_FrictMat_FrictMat_FrictPhys()],
     [Law2_ScGeom_FrictPhys_CundallStrack()]
    ),
    NewtonIntegrator(gravity=(0,0,0),damping=0),
    PyRunner(command='addPlotData()',iterPeriod=100)
]

def addPlotData():
 #if O.iter<10000:
    #plot.addData(t=O.iter,FrictionForce=O.forces.f(0)[1],Displacement=O.bodies[0].state.pos[1])
    #plot.addData(t=O.iter,NormalForce=O.forces.f(1)[2],Displacement=O.bodies[0].state.pos[1])
    plot.addData(t=O.iter,NormalForce=O.forces.f(0)[2],Displacement=O.bodies[0].state.pos[1])
#plot.plots={'Displacement':('FrictionForce')}
plot.plots={'Displacement':('NormalForce')}
plot.plot()
O.dt=.5e-4*PWaveTimeStep()
O.saveTmp()

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
Karol Brzezinski (kbrzezinski) said :
#1

Hi Pawan,

what you call "unwanted oscillation" really is a proper result. You have no damping in your model, thus, pushed particle starts to oscillate.

I propose the following:
- turn on the force resetter,
- add some damping (e.g. 0.2),
- after adding the force, run the simulation until the oscillation calms,
- then move the wall.

Best wishes,
Karol

PS Theoretically you have two solutions that do not require damping:
- increase the force linearly in the infinite time period ;)
- less obvious: increase the force linearly in the time that is exactly integer multiplicity of the oscillation period.

But of course, my advice is damping.

####################
from yade import plot
MaterialS=O.materials.append(FrictMat(young=70e6,poisson=.23,frictionAngle=radians(30))) #material of sphere
MaterialP=O.materials.append(FrictMat(young=700e6,poisson=.23,frictionAngle=radians(30))) #material of plate
sp=sphere((0,0,0),1,material=MaterialS) #creating sphere
plate=utils.wall(-1,axis=2,material=MaterialP) #creating plate
plateID=O.bodies.append(plate) #plateID=0
spID=O.bodies.append(sp) #spID=1
O.forces.setPermF(1,(0,0,-4)) # 4 mag. force on sphere in -ve z direction

O.engines=[
    ForceResetter(),
    InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Wall_Aabb()]),
    InteractionLoop(
     [Ig2_Wall_Sphere_ScGeom()],
     [Ip2_FrictMat_FrictMat_FrictPhys()],
     [Law2_ScGeom_FrictPhys_CundallStrack()]
    ),
    NewtonIntegrator(gravity=(0,0,0),damping=0.2),
    PyRunner(command='addPlotData()',iterPeriod=100)
]

def addPlotData():
 #if O.iter<10000:
    #plot.addData(t=O.iter,FrictionForce=O.forces.f(0)[1],Displacement=O.bodies[0].state.pos[1])
    #plot.addData(t=O.iter,NormalForce=O.forces.f(1)[2],Displacement=O.bodies[0].state.pos[1])
    plot.addData(t=O.iter,NormalForce=O.forces.f(0)[2],Displacement=O.bodies[0].state.pos[1])
#plot.plots={'Displacement':('FrictionForce')}
plot.plots={'Displacement':('NormalForce')}
plot.plot()
O.dt=.5e-4*PWaveTimeStep()
O.saveTmp()

O.run(int(3e6),wait = True)
plate.state.vel =(0,1,0) #plate given const. velocity in y direction
O.run(int(1e6),wait = True)

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

Hello,

> I am recording normal force on sphere
> Kindly help us with how we can plot the actual normal force

Kindly help us with explaining what "normal force" is [1].
- External force (which is constant)?
- Total force (which is not constant)?
- "Internal" interaction force between sphere and plate?
- ... ?

> Here I am expecting a constant value

you have several options, according to the answer above, respectively:
- O.forces.permF(0)[2]
- O.forces.f(0)[2]
- O.interaction[0,1].phys.normalForce[2]

actually maybe it is a good idea to export all of them and then decide what you really want.

> I have not used force resetter

unless you know exactly what you are doing, always do use the force resetter.

Cheers
Jan

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

Can you help with this problem?

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

To post a message you must log in.