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

6-DOF monitoring after or during runtime

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

Like Tree4Likes
  • 1 Post By mo_na
  • 3 Post By mo_na

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 25, 2016, 05:05
Default 6-DOF monitoring after or during runtime
  #1
New Member
 
Jens Hucklenbroch
Join Date: Apr 2016
Posts: 2
Rep Power: 0
JensH is on a distinguished road
Dear Foamers,

I hope this questioned hasn't been asked here before.
I'm trying to simulate a floating structure under regular wave impact. After testing a few solvers I'm now working with ola(DyM)Foam on OF 4.0. So far, the simulations look quite promising although still some instabilities occur.
I now want to extract my simulated data of the 6 DOF's to further improve the simulations. Either during runtime or after the simulation has completed - both would be fine for me. The problem is that I have hardly any programming skills to easily extract the data. So my question:

Is there an easy way, for example a function in controlDict like "forces", to get the 6 DOF's clearly arranged for every time step in one file?
The second possibility would be a command to extract at least some values (e.g. centre of mass) out of the log file (see below).

Code:
Courant Number mean: 0.000706526 max: 0.491233
Interface Courant Number mean: 1.5213e-05 max: 0.102411
deltaT = 0.0192202
Time = 2.30807

PIMPLE: iteration 1
forces forces:
    Not including porosity effects
6-DoF rigid body motion
    Centre of rotation: (249.96 -2.76754e-07 -78.2397)
    Centre of mass: (249.96 -2.76754e-07 -78.2397)
    Orientation: (1 -6.18905e-08 6.00102e-05 6.18906e-08 1 -2.25103e-09 -6.00102e-05 2.25474e-09 1)
    Linear velocity: (-0.0225261 -9.2888e-08 -0.154357)
    Angular velocity: (9.77217e-10 2.15082e-05 5.38426e-08)
Velocity BC on patch inlet
3D_2D Absorption BC on patch outlet
"Correction Levels" 1( -0.041915 )

Execution time for mesh.update() = 0.9 s
Velocity BC on patch inlet
3D_2D Absorption BC on patch outlet
"Correction Levels" 1( -0.041915 )

DICPCG:  Solving for pcorr, Initial residual = 1, Final residual = 9.53932e-06, No Iterations 404
time step continuity errors : sum local = 2.91162e-13, global = 4.67776e-14, cumulative = -8.12108e-07
alpha.water BC on patch inlet
smoothSolver:  Solving for alpha.water, Initial residual = 5.67831e-06, Final residual = 1.94173e-10, No Iterations 1
Phase-1 volume fraction = 0.680182  Min(alpha.water) = -2.41813e-15  Max(alpha.water) = 1
Applying the previous iteration compression flux
MULES: Correcting alpha.water
alpha.water BC on patch inlet
MULES: Correcting alpha.water
alpha.water BC on patch inlet
MULES: Correcting alpha.water
alpha.water BC on patch inlet
Phase-1 volume fraction = 0.680182  Min(alpha.water) = -4.84977e-10  Max(alpha.water) = 1
Velocity BC on patch inlet
3D_2D Absorption BC on patch outlet
"Correction Levels" 1( -0.042129 )

DICPCG:  Solving for p_rgh, Initial residual = 0.00744167, Final residual = 0.000351415, No Iterations 4
time step continuity errors : sum local = 4.45801e-08, global = -4.33877e-10, cumulative = -8.12541e-07
DICPCG:  Solving for p_rgh, Initial residual = 0.000431143, Final residual = 2.09697e-05, No Iterations 111
Velocity BC on patch inlet
3D_2D Absorption BC on patch outlet
"Correction Levels" 1( -0.042129 )

time step continuity errors : sum local = 2.67396e-09, global = 1.50462e-10, cumulative = -8.12391e-07
DICPCG:  Solving for p_rgh, Initial residual = 4.70132e-05, Final residual = 9.66919e-08, No Iterations 224
Velocity BC on patch inlet
3D_2D Absorption BC on patch outlet
"Correction Levels" 1( -0.042129 )

time step continuity errors : sum local = 1.23822e-11, global = -5.39366e-13, cumulative = -8.12392e-07
ExecutionTime = 2579.76 s  ClockTime = 2600 s
Does anybody know such a command? That would help me quite a lot.

Kind regards,
Jens
JensH is offline   Reply With Quote

Old   July 25, 2016, 05:48
Default
  #2
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Jens,

I always work reading the log file. There is a utility that extracts data from the logs, but I doubt that it will work in your case. It is called foamLog.

As a personal advice I would suggest that you invest some of your time in researching ways to scan data from log files, it will prove very useful. In particular, there are some linux commands that are very simple: cat and grep

Also python is a very handy tool for these purposes. You can check this script that works for an old version of the output file and can be easily modified.

Best,

Pablo
Attached Files
File Type: zip plot_CoM.py.zip (527 Bytes, 93 views)
Phicau is offline   Reply With Quote

Old   July 25, 2016, 06:35
Default
  #3
Member
 
mo_na's Avatar
 
Mona
Join Date: Mar 2016
Location: Berlin
Posts: 49
Rep Power: 10
mo_na is on a distinguished road
Hi Jens,

I had the same problem a few weeks ago. Check out this thread:
http://www.cfd-online.com/Forums/ope...ecay-test.html
You will find there a shell script that writes you three dat-files containing linear velocity, angular velocity and orientation of the body over time. Of course you can also modify it to write out other information from the logfile.

Hope it helps
tushark3tk likes this.
mo_na is offline   Reply With Quote

Old   July 25, 2016, 07:27
Default
  #4
New Member
 
Jens Hucklenbroch
Join Date: Apr 2016
Posts: 2
Rep Power: 0
JensH is on a distinguished road
Thanks a lot Mona that's exactly what I was looking for. That works great!
As I've seen in your post, you are doing a pitch motion analysis.
I'm also interested in the pitch movement of my structure. But from where can I extract it? Is it one of the nine digits inside the orientation parenthesis?

@ Pablo: Thanks for your advice,too. I tried it with foamlog before but that wasn't very successful. You're probably right, that I should spend some more time on linux commands and python

Best,
Jens
JensH is offline   Reply With Quote

Old   July 25, 2016, 08:19
Default
  #5
Member
 
mo_na's Avatar
 
Mona
Join Date: Mar 2016
Location: Berlin
Posts: 49
Rep Power: 10
mo_na is on a distinguished road
I am glad I could help! Took me quite some time to figure it out myself.
And yes you can extract the pitch motion from the orientation. The first column for example is the cosine of the pitch angle. This is a part of the octave script I use for the analysis of a free decay test:
Code:
  
 start=10.7;  
 %Import  data 
 cd '/home/mona/OpenFoam/case1_undamped/data'
 load orientation.dat
 X1=orientation; 
 time1=X1(:,1); 
 cos1=X1(:,2);
 angle1=start-(acos(cos1)*180/pi);
dupeng, JensH and tushark3tk like this.
mo_na is offline   Reply With Quote

Old   January 8, 2019, 05:20
Default Collecting Acceleration
  #6
Member
 
A
Join Date: Jun 2016
Posts: 30
Rep Power: 9
aakie is on a distinguished road
Hee guys,

Thanks for sharing the script, it works perfect.

I was wondering if some of you found a way to also collect the acceleration over time (preferably for every pimple outer correction)?

I dont see this quantity in the log file (while the velocity and displacement are indeed located in the log file). I only noticed that the acceleration is present in every time Dir in the uniform folder, but batching all this data into one single file feels a bit crude. Please let me know if you have smart way!

Btw, the purpose of collecting this data is actually to monitor the relative error of the acceleration over time.

BR,
A
aakie is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in3D model processing mebinitap OpenFOAM 2 December 12, 2014 05:40
Force can not converge colopolo CFX 13 October 4, 2011 23:03
Monitoring at Runtime Moelfus OpenFOAM Running, Solving & CFD 0 October 13, 2010 06:13
The concept of DOF in fluid mechanics and CFD bearcat Main CFD Forum 8 May 27, 2007 19:02
monitoring cell Jane Siemens 2 March 4, 2004 22:01


All times are GMT -4. The time now is 06:46.