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

How to get motion amplitude and roll angle

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 9, 2019, 06:31
Post How to get motion amplitude and roll angle
  #1
New Member
 
Ian
Join Date: Aug 2018
Posts: 15
Rep Power: 7
insane is on a distinguished road
Hi, everyone
Recently I am working on simulating a floating Object with 3-degree motion with RigidBodyMotion, but I have trouble in getting the motion amplitude and roll angle of the object. I have found there is a function object called SixDoFRigidBodyState, but it only works for SixDoFRigidBodyMotion, but I don't know if there any difference between those two libs, can someone tell me where can I find some script or tools to help me get the information?
Thanks in advance!
insane is offline   Reply With Quote

Old   March 10, 2019, 12:55
Default
  #2
Senior Member
 
Join Date: Oct 2017
Posts: 121
Rep Power: 8
Krapf is on a distinguished road
Hi insane,

just a few days ago OpenFOAM.org added an equivalent functionObject for rigidBodyState: https://github.com/OpenFOAM/OpenFOAM...d19f6220801f09
So if you are able to use OpenFOAM-dev you could use this.

Kind regards,
Krapf
Krapf is offline   Reply With Quote

Old   March 11, 2019, 03:06
Default
  #3
New Member
 
Ian
Join Date: Aug 2018
Posts: 15
Rep Power: 7
insane is on a distinguished road
Hi.Krapf
Thank you for your timely reply, it does help me a lot! I'm trying to compile in the present version.
insane is offline   Reply With Quote

Old   March 24, 2019, 05:51
Default
  #4
New Member
 
Cai Wei
Join Date: Jan 2018
Posts: 1
Rep Power: 0
Thomas Caine is on a distinguished road
Have you test it ?
Thomas Caine is offline   Reply With Quote

Old   March 25, 2019, 21:57
Default
  #5
New Member
 
Ian
Join Date: Aug 2018
Posts: 15
Rep Power: 7
insane is on a distinguished road
I have sucessfully achieve that in the latest version V1812 it works well
insane is offline   Reply With Quote

Old   October 15, 2019, 21:52
Default
  #6
New Member
 
Tanvir Sayeed
Join Date: Jan 2015
Posts: 9
Rep Power: 11
tms120 is on a distinguished road
Quote:
Originally Posted by insane View Post
I have sucessfully achieve that in the latest version V1812 it works well
Hello, I have compiled it in v1906, still not producing the outputs. Can you please tell me the steps / files you compiled and how? I appreciate your help..
tms120 is offline   Reply With Quote

Old   October 15, 2019, 22:23
Default
  #7
New Member
 
Ian
Join Date: Aug 2018
Posts: 15
Rep Power: 7
insane is on a distinguished road
1) download form the url Krapf put there
2) put the folder you download in the OpenFOAM src
3) modify the allwmake file add wmake $targetType rigidBodyState in the last
4) compile and fix it according to the compile information
the detail of the process I am not sure after such a long time
Good Luck!
insane is offline   Reply With Quote

Old   October 16, 2019, 08:18
Default
  #8
New Member
 
Tanvir Sayeed
Join Date: Jan 2015
Posts: 9
Rep Power: 11
tms120 is on a distinguished road
Quote:
Originally Posted by insane View Post
1) download form the url Krapf put there
2) put the folder you download in the OpenFOAM src
3) modify the allwmake file add wmake $targetType rigidBodyState in the last
4) compile and fix it according to the compile information
the detail of the process I am not sure after such a long time
Good Luck!
Thanks for your reply... I actually followed the same what you mentioned here... after that it was showing an error on "not finding movingBodyNames", then I copied rigidBodyModel.H and rigidBodyModel.c in rigidBodyDynamics/rigidBodyModel/.. and then it compiled.

But when i run the tutorial "floatingObject", there was no data written in PostProcessing folder. The log.interFoam file states as follows:



Using #calc at line 50 in file "/home/tanvir/Tanvir_test_cases/floatingObject/constant/dynamicMeshDict.rigidBodyMotionCoeffs.bodies.float ingObject"
Using #codeStream with "/home/tanvir/Tanvir_test_cases/floatingObject/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcodeStream_61cbf2342e2af17e0533956d99753ec57f88 b4a3.so"
Creating new library in "dynamicCode/_61cbf2342e2af17e0533956d99753ec57f88b4a3/platforms/linux64GccDPInt32Opt/lib/libcodeStream_61cbf2342e2af17e0533956d99753ec57f88 b4a3.so"
Invoking wmake libso /home/tanvir/Tanvir_test_cases/floatingObject/dynamicCode/_61cbf2342e2af17e0533956d99753ec57f88b4a3
wmake libso /home/tanvir/Tanvir_test_cases/floatingObject/dynamicCode/_61cbf2342e2af17e0533956d99753ec57f88b4a3
ln: ./lnInclude
dep: codeStreamTemplate.C
Ctoo: codeStreamTemplate.C
ld: /home/tanvir/Tanvir_test_cases/floatingObject/dynamicCode/_61cbf2342e2af17e0533956d99753ec57f88b4a3/../platforms/linux64GccDPInt32Opt/lib/libcodeStream_61cbf2342e2af17e0533956d99753ec57f88 b4a3.so
Selecting dynamicFvMesh dynamicMotionSolverFvMesh
Using #calc at line 50 in file "/home/tanvir/Tanvir_test_cases/floatingObject/constant/dynamicMeshDict.rigidBodyMotionCoeffs.bodies.float ingObject"
Selecting motion solver: rigidBodyMotion
Using #calc at line 50 in file "/home/tanvir/Tanvir_test_cases/floatingObject/constant/dynamicMeshDict.rigidBodyMotionCoeffs.bodies.float ingObject"
Selecting rigidBodySolver Newmark




--> FOAM Warning :
Attempt to cast type rigidBodyMotion to type rigidBodyModel

From function To& Foam::refCast(From&) [with To = const Foam::RBD::rigidBodyMotion; From = const Foam::motionSolver]
in file /home/tanvir/OpenFOAM/OpenFOAM-v1906/src/OpenFOAM/lnInclude/typeInfo.H at line 138.
From function bool Foam::functionObjectList::read()
in file db/functionObjects/functionObjectList/functionObjectList.C at line 896

--> while loading function object 'rigidBodyState'


Thanks again...
tms120 is offline   Reply With Quote

Old   October 16, 2019, 08:24
Default
  #9
New Member
 
Ian
Join Date: Aug 2018
Posts: 15
Rep Power: 7
insane is on a distinguished road
I am not sure if you add the corresponding functionObject in the controldict ? the template could be found in the .H file
insane is offline   Reply With Quote

Old   October 16, 2019, 08:58
Default
  #10
New Member
 
Tanvir Sayeed
Join Date: Jan 2015
Posts: 9
Rep Power: 11
tms120 is on a distinguished road
Quote:
Originally Posted by insane View Post
I am not sure if you add the corresponding functionObject in the controldict ? the template could be found in the .H file
Yes I did.

rigidBodyState
{
type rigidBodyState;
libs ("librigidBodyState.so");
angleFormat degrees;
}

Did you make any changes in src/rigidBodyDynamics or src/rigidBodyMeshMotion folders? Can you run that tutorial with proper output?
tms120 is offline   Reply With Quote

Old   October 16, 2019, 09:13
Default
  #11
New Member
 
Ian
Join Date: Aug 2018
Posts: 15
Rep Power: 7
insane is on a distinguished road
I guess you might have made some mistake in the compile procedure, I attach my RigidState file you can try to compile it to see if it works.
Good luck!
Attached Files
File Type: zip rigidBodyState.zip (4.8 KB, 65 views)
insane is offline   Reply With Quote

Old   October 16, 2019, 10:06
Default
  #12
New Member
 
Tanvir Sayeed
Join Date: Jan 2015
Posts: 9
Rep Power: 11
tms120 is on a distinguished road
Quote:
Originally Posted by insane View Post
I guess you might have made some mistake in the compile procedure, I attach my RigidState file you can try to compile it to see if it works.
Good luck!
Thank you very much. Unfortunately still same thing... which version you using? I am using v1906.. thanks again..

When I compile your folder it shows error on "can't find 'BodyNames'..." which you must have solved as well... Is it possible to let me know your version and share your rigidBodyDynamics and rigidBodyMeshMotion folders as well. I again appreciate your help..
tms120 is offline   Reply With Quote

Old   October 16, 2019, 20:40
Default
  #13
New Member
 
Ian
Join Date: Aug 2018
Posts: 15
Rep Power: 7
insane is on a distinguished road
Actually I am using this in OF1712 and OF1812 it all works.
Here are my two folders, you can try it again.
Good Luck!
Attached Files
File Type: zip rigidBodyMeshMotion.zip (12.8 KB, 63 views)
File Type: zip rigidBodyDynamics.zip (160.3 KB, 59 views)
insane is offline   Reply With Quote

Old   October 17, 2019, 06:44
Thumbs up
  #14
New Member
 
Tanvir Sayeed
Join Date: Jan 2015
Posts: 9
Rep Power: 11
tms120 is on a distinguished road
Quote:
Originally Posted by insane View Post
Actually I am using this in OF1712 and OF1812 it all works.
Here are my two folders, you can try it again.
Good Luck!
Perfectly working. Thank you so much... much appreciated the way you shared...
tms120 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
2D Forced Roll Damping Simulation using FLUENT Sunflower_Li FLUENT 0 December 29, 2017 02:48
How to calculate oscillating roll of 2D body (with variable amplitude and omega) lavrov OpenFOAM Running, Solving & CFD 0 March 19, 2015 06:31


All times are GMT -4. The time now is 08:56.