Move Mesh (Translation, Rotation...)

Asked by Daniela

Hi,
I would like to know if it is possible to move a mesh. I saw in the tutorial and in some another questions here, that it is possible to translate the mesh. But actually I need to define the followinig states for the mesh during the simulation: position, rotation (in quaternions), velocity and and angular velocity. Would it be possible?
Thanks a lot.
Daks

Question information

Language:
English Edit question
Status:
Answered
For:
ESyS-Particle Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
SteffenAbe (s-abe) said :
#1

Its possible - sort of.
You can move (or deforme) a mesh by moving individual mesh nodes using the moveSingleMeshNodeBy function. That way you can rotate the mesh - but you'd have to calculate the movement of each mesh node individually. Doable if the mesh is small - ugly if its large.

Steffen

Revision history for this message
Daniela (dmaionchi) said :
#2

Hi Steffen,
thanks for the answer. What about the velocity and angular velocity? Could I also define this states for the mesh?
Another question: is it possible to obtain the force and torque acting on a body described by the mesh?
Thanks again for the infos
Daniela

Revision history for this message
SteffenAbe (s-abe) said :
#3

Hi Daniela,

> What about the velocity and angular velocity?
Same deal. You'd have to use the usual equations for rigid body motion to calculate the movement of individual mesh nodes (at every time step) from the velocitiy and angular velocity and then move the mesh nodes individually.

> is it possible to obtain the force and torque acting on a body described by the mesh?
Currently not. A way for saving the forces on mesh facets is under development, but not fully implemented so far.

Steffen

Revision history for this message
Will (will-hancock) said :
#4

Hi Daniela,

A while ago i implemented a mesh rotation function in a runnable that would visit each node and call moveSingleMeshNodeBy as Steffen suggested. The rotation function was for a ball mill so i was easily able to calculate the incremental displacement needed for each node point. I also implemented a rampup so that i didn't get any side effects from an instantaneous velocity jump. My input to the function was an angular velocity which you can easily back out an angle of rotation from and the function moved 160 nodes per timestep without much of a noticabe slow down to the simulation.

The only difficulty i ran into was that i had to store the positions of my nodes within the runnable so i could keep track of updated positions for the next step, but that was easy enough to do.

Cheers,
Will

Revision history for this message
Kahlil Fredrick Cui (physicsman98) said :
#6

Hi Will!

Sorry for digging up this old post. I am having a little trouble with implementing a rotating mesh for a barrel. Would it be possible to view your codes for the rotating mesh that you mentioned? It'd be really helpful reference for me.

Thank you!

Kahlil Cui

Can you help with this problem?

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

To post a message you must log in.