How to extract roll angles of 2D floating object?
I'm trying to figure out how to extract / sample the roll angle of a floating box constrained to roll only (1 DoF). It seems like a simple problem but I can't seemed to find anyway of doing it!
The case I'm running is based on: Jung, K.H., Chang, K.A., Jo, H.J., Viscous Effect on the Roll Motion of a Rectangular Structure, J. of Engineering Mechanics, 2006. This was mentioned in the Eric Paterson's slides for 3rd OF workshop and seems to have been used as a demo case a few times. If anyone has ran the case before please do share some hints.
Thanks in advance.
Get sixDoFRigidBodyMoton functionObject to output "Orientation"
Posting my work-around if it's of help to anyone else:
Go to $FOAM_SRC/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion
Open sixDoFRigidBodyMotion.C file with your favourite editor.
Near the bottom of the file:
After the angular velocity line (but before the line that says
A bash script (e.g. extractData script found in the simple harmonic motion tutorial) can subsequently be used to extract time step and Orientation tensor value for further post-processing.
I think the orientation (Q) tensor is a rotational matrix generated by rotating in X, Y, Z sequence (still figuring this out at the moment......). If this is the case, then roll (i.e. rotation about Y axis) will be given by asin of the 3,1 element which should be the #7 of the 9 values of the Q tensor.
|All times are GMT -4. The time now is 16:28.|