Particle Orientation from H5 file
I am trying to use a simulation .h5 file to reconstruct a set of particles from one simulation in another simulation. The position, velocity, etc. are self explanatory and match the inputs in the createParticle method in the custom factory API. For orientation however, the .h5 file contains four numbers that define the orientation and EDEM and the custom factory API use a 3x3 matrix to define the orientation. How do I use the 4 provided values to get the required 9 values?
Best Answer
-
Hi Andrew,
The h5 file stores the orientation information as a quaternion and the custom factory API is looking for an orientation matrix. if you export the data from the EDEM Analyst this will export the orientation in the format that the factory requires (you have to choose 9 queries, xx, xy, xz orientation etc.).
To read direct from the h5 file you would have to convert the quaternions - https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotationRegards
Stephen
0
Answers
-
Hi Andrew,
The h5 file stores the orientation information as a quaternion and the custom factory API is looking for an orientation matrix. if you export the data from the EDEM Analyst this will export the orientation in the format that the factory requires (you have to choose 9 queries, xx, xy, xz orientation etc.).
To read direct from the h5 file you would have to convert the quaternions - https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotationRegards
Stephen
0 -
Hi
I am wodering about the type of orientation matrix that Edem uses for particle orientation, is it Euler matrix or quaternion matrix.
See the pic
0