how to calculate rotational energy of particle

Asked by lip

hello
      i am simulating a particle column collapse, the particle system is consist of sphere and polyhedra, and i want calculate the energy loss caused by friction and the kinetic energy, so i need to know how to calculate the rotational energy, can you give me some advice, lookforward for your answer

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
lip (mr.xie) said :
#1

by the way, i know that function yade._utils.kineticEnergy() can be used to calculate the total kinetic neergy of all particles, but i want to calculate the kinetic energy of polyhedra and sphere separately, which will make the function yade._utils.kineticEnergy()
become useless to me, can you give me some advice?

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

> which will make the function yade._utils.kineticEnergy() become useless to me

I would not be that strict.
Even I dare to say that the implementation of kineticEnergy(), namely formulas for linear kinetic energy [1], rotational kinetic energy of spherical particle [2] and rotational kinetic energy of aspherical particle [3] could be actually very useful :-)

cheers
Jan

[1] https://gitlab.com/yade-dev/trunk/blob/master/pkg/dem/Shop_01.cpp#L165
[2] https://gitlab.com/yade-dev/trunk/blob/master/pkg/dem/Shop_01.cpp#L179
[3] https://gitlab.com/yade-dev/trunk/blob/master/pkg/dem/Shop_01.cpp#L175

Revision history for this message
lip (mr.xie) said :
#3

dear Jan:
       thanks for your answer. i noticed that the code below might solve my problem:
       if(b->isAspherical()){
   Matrix3r T(state->ori);
   // the tensorial expression http://en.wikipedia.org/wiki/Moment_of_inertia#Moment_of_inertia_tensor
   // inertia tensor rotation from http://www.kwon3d.com/theory/moi/triten.html
   Matrix3r mI; mI<<state->inertia[0],0,0, 0,state->inertia[1],0, 0,0,state->inertia[2];
   //E+=.5*state->angVel.transpose().dot((T.transpose()*mI*T)*state->angVel);
   E+=.5*angVel.transpose().dot((T*mI*T.transpose())*angVel);
  }

    but i still have a problem, i think the code 'Matrix3r T(state->ori)' is used to conver quaternionr into a rotating matrix,if so, how can i achieve that by python? can you give me some advice?

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

b.state.ori.toRotationMatrix()

hint:
b = sphere((0,0,0),1)
help(b.state.ori)

cheers
Jan

Can you help with this problem?

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

To post a message you must log in.