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?
Find more posts tagged with
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_rotation
Regards
Stephen
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_rotation
Regards
Stephen