CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Post-Processing

How to extract roll angles of 2D floating object?

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree3Likes
  • 3 Post By CKH

Reply
 
LinkBack Thread Tools Display Modes
Old   February 14, 2012, 12:46
Default How to extract roll angles of 2D floating object?
  #1
CKH
New Member
 
Kie Hian
Join Date: Aug 2011
Location: Singapore
Posts: 19
Rep Power: 5
CKH is on a distinguished road
Hi Foamers,

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.
Kie
CKH is offline   Reply With Quote

Old   February 16, 2012, 00:05
Default Get sixDoFRigidBodyMoton functionObject to output "Orientation"
  #2
CKH
New Member
 
Kie Hian
Join Date: Aug 2011
Location: Singapore
Posts: 19
Rep Power: 5
CKH is on a distinguished road
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
Code:
<< "Angular velocity: " << omega()
add
Code:
" << nl"
to get std IO to jump to the next line

After the angular velocity line (but before the line that says
Code:
<< endl;
insert
Code:
 << "Orientation: " << Q()
Save and close the file and rerun Allwmake. The next time interDyMFoam is run, the IO will show the values of the Orientation tensor at each time step. The entire stream can be saved in a log file (e.g. log.interDyMFoam).

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.
donQi, zhan and Yage like this.
CKH is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error compiling OpenFOAM-1.6-ext Canesin OpenFOAM Installation 136 April 25, 2012 11:22
Inserting a floating object on a restart RileyJ FLOW-3D 0 October 24, 2011 16:05
Floating object in a fluid benjaminm CFX 7 November 14, 2009 06:46
Compilation error OF1.5-dev on Suse10.3 darenyang OpenFOAM Installation 0 April 29, 2009 04:55
BlockMeshmergePatchPairs hjasak OpenFOAM Native Meshers: blockMesh 11 August 15, 2008 07:36


All times are GMT -4. The time now is 22:17.