What does O.energy['nonviscdamping'] account for ?

Asked by Clerc Adriane

Hello,

I have done several tests with the two bouncing balls simulation, which I modified a little for the saving of the energies.
I wanted to see the behaviour of the energy saved under O.energy['nonviscdamping'], and if it corresponds to the energy dissipated with the damping given in the NewtonIntegrator.
My results seems to show that the energy 'nonviscdamping' is related to the energies linked to a contact (so here elastic and plastic energies but not gravity) ...
Could you enlighten me about what is saved under O.energy['nonviscdamping'] ? I can't find any answer in the Yade Doc.
Thanks in advance !

The script :
# basic simulation showing sphere falling ball gravity,
# bouncing against another sphere representing the support
from yade import plot

# DATA COMPONENTS

file_name='BB_d0.001'

# add 2 particles to the simulation
# they the default material (utils.defaultMat)
O.bodies.append([sphere(center=(0,0,0),radius=.5,fixed=True),sphere((0,0,2),.5)])

O.trackEnergy=True

# FUNCTIONAL COMPONENTS

# simulation loop -- see presentation for the explanation
O.engines=[
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb()]),
   InteractionLoop(
      [Ig2_Sphere_Sphere_ScGeom()], # collision geometry
      [Ip2_FrictMat_FrictMat_FrictPhys()], # collision "physics"
      [Law2_ScGeom_FrictPhys_CundallStrack()] # contact law -- apply forces
   ),
   # Apply gravity force to particles. damping: numerical dissipation of energy.
   NewtonIntegrator(gravity=(0,0,-9.81),damping=0.001),
   PyRunner(command='addData()',iterPeriod=100)
]

def addData():
    #print 'Ee : %.5f'%(O.energy['elastPotential'])
    plot.addData(i=O.iter,time=O.time,pos=O.bodies[1].state.pos[2],
                 vel=O.bodies[1].state.vel[2],Ec=O.energy['kinetic'],
                 Eg=O.energy['gravWork'],Ee=O.energy['elastPotential'],
                 Damp=O.energy['nonviscDamp'])
    if O.iter>3*10**6:
        plot.saveDataTxt(file_name+'.txt')
        O.pause()

# set timestep to a fraction of the critical timestep
# the fraction is very small, so that the simulation is not too fast
# and the motion can be observed
O.dt=5*10**-5

# save the simulation, so that it can be reloaded later, for experimentation
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
Jan Stránský (honzik) said :
#1

Hello,

> O.energy['nonviscdamping'] (in the question text)
> O.energy['nonviscDamp'] (in the code)

please be consistent and correct.

> it corresponds to the energy dissipated with the damping given in the NewtonIntegrator.

yes [1]

> My results seems to show that the energy 'nonviscdamping' is related to the energies linked to a contact (so here elastic and plastic energies but not gravity) ...

please do not use ... while asking question, then it is not clear if it is a problem, a question, a not important note..

> Could you enlighten me about what is saved under O.energy['nonviscdamping'] ?
> I can't find any answer in the Yade Doc.

the source code itself is also a valuable source of information [1]

cheers
Jan

[1] https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/dem/NewtonIntegrator.cpp#L62

Can you help with this problem?

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

To post a message you must log in.