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

plotting center of Mass over time

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 24, 2013, 06:35
Default plotting center of Mass over time
  #1
New Member
 
Cathelain
Join Date: Apr 2013
Posts: 11
Rep Power: 13
mcathela is on a distinguished road
Dear all,

I run the case of a vertical free decay of a floating object in a still water. This case is similar to the floatingObject tutorial, it's just different initial conditions.
My floating object's type is a sixDoFRigidDisplacement and I set the "report" on in the pointDisplacement file. In my .log file, I have at each time step the coordinates of the center of mass.
I would like to plot the z-coordinate over time.
I tried in gnuplot something like plot "<cat log | grep 'Centre of mass:' ... That works but it plots heave over iteration. As i want to compare different cases (they don't have the same time-steps since my simulations run with the adjustTimeStep on in the controlDict), this solution doesn't work for me.
I heard about pyFoam, I saw that it can plot a lot of things but it seems to be only residuals... Is it possible to plot the center of mass over time (using the datas extracted from my log file)?

Thank you for your help

Marie
mcathela is offline   Reply With Quote

Old   June 5, 2013, 20:06
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by mcathela View Post
Dear all,

I run the case of a vertical free decay of a floating object in a still water. This case is similar to the floatingObject tutorial, it's just different initial conditions.
My floating object's type is a sixDoFRigidDisplacement and I set the "report" on in the pointDisplacement file. In my .log file, I have at each time step the coordinates of the center of mass.
I would like to plot the z-coordinate over time.
I tried in gnuplot something like plot "<cat log | grep 'Centre of mass:' ... That works but it plots heave over iteration. As i want to compare different cases (they don't have the same time-steps since my simulations run with the adjustTimeStep on in the controlDict), this solution doesn't work for me.
I heard about pyFoam, I saw that it can plot a lot of things but it seems to be only residuals... Is it possible to plot the center of mass over time (using the datas extracted from my log file)?

Thank you for your help

Marie
Yes you can with a customRegexp (you've got to specify the pattern in the log-file):
http://openfoamwiki.net/index.php/Co...omRegexp-files
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   October 16, 2014, 08:34
Default
  #3
Senior Member
 
ok
Join Date: Oct 2013
Posts: 346
Rep Power: 14
Maimouna is on a distinguished road
[QUOTE]
Quote:
Originally Posted by mcathela View Post
Dear all,

I run the case of a vertical free decay of a floating object in a still water. This case is similar to the floatingObject tutorial, it's just different initial conditions.
My floating object's type is a sixDoFRigidDisplacement and I set the "report" on in the pointDisplacement file. In my .log file, I have at each time step the coordinates of the center of mass.
I would like to plot the z-coordinate over time.
I tried in gnuplot something like plot "<cat log | grep 'Centre of mass:' ... That works but it plots heave over iteration. As i want to compare different cases (they don't have the same time-steps since my simulations run with the adjustTimeStep on in the controlDict), this solution doesn't work for me.
I heard about pyFoam, I saw that it can plot a lot of things but it seems to be only residuals... Is it possible to plot the center of mass over time (using the datas extracted from my log file)?
Dear Marie,

I'm looking exactly what you were looking for, plot centre of mass over time from the data in the log file. Could you help me please how to plot that?

Kind regards

Maimouna

Thank you for your help
Maimouna is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Transient simulation not converging skabilan OpenFOAM Running, Solving & CFD 14 December 17, 2019 00:12
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 06:21
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 16:33
dynamic Mesh is faster than MRF???? sharonyue OpenFOAM Running, Solving & CFD 14 August 26, 2013 08:47
Modeling in micron scale using icoFoam m9819348 OpenFOAM Running, Solving & CFD 7 October 27, 2007 01:36


All times are GMT -4. The time now is 13:02.