How to plot pitch motion for free decay test?
Hi all,
I am simulating a floating body in pitch motion and I would like to do a free decay test to compare with experimental results. I am using a moving mesh and the log file contains information like this: Code:
6-DoF rigid body motion Cheers, Mona |
Hi Mona:
Did you manage to do it? Best regards Hao Quote:
|
Hi Hao,
no I havn't managed yet. Do you have an idea how to do it or do you want me to tell you as soon as I figured it out? :) Cheers, Mona |
Ideas
Hi all,
I have some ideas now how to do it but I am not quite there yet. In this thread simon-2 describes a way to obtain sixDoFRigidBodyMotionState files for each timestep: http://www.cfd-online.com/Forums/ope...tml#post601930 He said it was just a matter of batch processing to write all the information into one file so you obtain a file like this: Code:
#time centreOfMass orientation velocity acceleration angularMomentum Torque I also found this python-script: https://github.com/kodejak/openfoam-data-extractor This script extracts searched datas from the OpenFOAM project generated files e.g. gravity, centreOfMass etc. The datas will be stored as a CSV file located at the directory of the script, named like the command line search pattern. But then I still need to do this for every single sixDoFRigidBodyMotionState file and thats a lot. Any ideas? Cheers, Mona |
Solved
Hey,
for everyone struggling with the same issue: I found a shell script that writes out data from the logfile and modified it a little bit to match my needs: Code:
#!/bin/bash Code:
bash data.sh I hoped this will help someone! :) Cheers, Mona |
Exactly what I have been searching for. Thanks!
|
Hi Mona,
I am using the new rigidBodyDynamics library instead of the classical sixDofRigidBodyMotion ? The problem is that I do not understand how to explore the log file info since the CoG is not logged out anymore. What we have instead is a "center of rotation" but it is not the kind of point I am looking for, a CoG or a manually point to follow would be better. Here you have an example : Code:
Courant Number mean: 0.000365065 max: 0.934088 If you have some info about the way to extract CoG info, please share it ;) Adri |
Quote:
Hi, Mona! I also try to plot the heave motion of a floating body. I follow your ideas above. After running the case, I creat a file named data.sh and copy the script into the this file. Then I run the command bash data.sh in the terminal. However, some errors happen and I get three .dat files without nothong in these files. I don't know if I am right to do so. Did I do someting wrong so that I can't get the data. I am new here. I wish your rely, thank you! |
Hi Robin86,
Quote:
Code:
PFAD=log Code:
PFAD=log.interFoam Laurent. |
Thank you for your reply. I already fix the problem.
|
Quote:
For instance: 1.34587e-18 becomes 1.34587-18. Any help would be greatly appreciated in this regard. Thanks, Arun. |
Quote:
Just saw your msg. Actually the reason this occurs is due to: Code:
tr -d 'Orientation:' |
Dear all,
I have the same question about this pitch and heave plot. I think the sin(pitch) is the third component of the orientation vector but I have no idea how to derive the heave. Please let me know if you have any ideas. Many thanks, Tony |
Quote:
Many thanks, Brandon |
forgot
Quote:
I'm running floatingObject (2d case) using olaFlow and I'm able to run simulation successfully. while i was trying to plot surge, heave plot i used your script with just modifying 'log' to 'olaDyMFoam.log' , and then running ' bash data.sh' , i got this msg. I couldn't get this msg what I'm doing wrong. can u please help me to figure it out. this is what i got after running 'bash data.sh' https://prnt.sc/6p2lCfU9ASfm |
Quote:
cat: olaDyMFlow.log: No such file or directory cat: olaDyMFlow.log: No such file or directory cat: olaDyMFlow.log: No such file or directory cat: olaDyMFlow.log: No such file or directory cat: olaDyMFlow.log: No such file or directory paste: CentreofmassTemp.dat: No such file or directory rm: cannot remove 'CentreofmassTemp.dat': No such file or directory rm: cannot remove 'plot/*.png': No such file or directory |
Quote:
|
All times are GMT -4. The time now is 16:08. |