|
[Sponsors] |
March 9, 2019, 06:31 |
How to get motion amplitude and roll angle
|
#1 |
New Member
Ian
Join Date: Aug 2018
Posts: 15
Rep Power: 7 |
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! |
|
March 10, 2019, 12:55 |
|
#2 |
Senior Member
Join Date: Oct 2017
Posts: 121
Rep Power: 8 |
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 |
|
March 11, 2019, 03:06 |
|
#3 |
New Member
Ian
Join Date: Aug 2018
Posts: 15
Rep Power: 7 |
Hi.Krapf
Thank you for your timely reply, it does help me a lot! I'm trying to compile in the present version. |
|
March 24, 2019, 05:51 |
|
#4 |
New Member
Cai Wei
Join Date: Jan 2018
Posts: 1
Rep Power: 0 |
Have you test it ?
|
|
March 25, 2019, 21:57 |
|
#5 |
New Member
Ian
Join Date: Aug 2018
Posts: 15
Rep Power: 7 |
I have sucessfully achieve that in the latest version V1812 it works well
|
|
October 15, 2019, 21:52 |
|
#6 |
New Member
Tanvir Sayeed
Join Date: Jan 2015
Posts: 9
Rep Power: 11 |
||
October 15, 2019, 22:23 |
|
#7 |
New Member
Ian
Join Date: Aug 2018
Posts: 15
Rep Power: 7 |
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! |
|
October 16, 2019, 08:18 |
|
#8 | |
New Member
Tanvir Sayeed
Join Date: Jan 2015
Posts: 9
Rep Power: 11 |
Quote:
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... |
||
October 16, 2019, 08:24 |
|
#9 |
New Member
Ian
Join Date: Aug 2018
Posts: 15
Rep Power: 7 |
I am not sure if you add the corresponding functionObject in the controldict ? the template could be found in the .H file
|
|
October 16, 2019, 08:58 |
|
#10 | |
New Member
Tanvir Sayeed
Join Date: Jan 2015
Posts: 9
Rep Power: 11 |
Quote:
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? |
||
October 16, 2019, 09:13 |
|
#11 |
New Member
Ian
Join Date: Aug 2018
Posts: 15
Rep Power: 7 |
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! |
|
October 16, 2019, 10:06 |
|
#12 | |
New Member
Tanvir Sayeed
Join Date: Jan 2015
Posts: 9
Rep Power: 11 |
Quote:
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.. |
||
October 16, 2019, 20:40 |
|
#13 |
New Member
Ian
Join Date: Aug 2018
Posts: 15
Rep Power: 7 |
Actually I am using this in OF1712 and OF1812 it all works.
Here are my two folders, you can try it again. Good Luck! |
|
October 17, 2019, 06:44 |
|
#14 |
New Member
Tanvir Sayeed
Join Date: Jan 2015
Posts: 9
Rep Power: 11 |
||
Thread Tools | Search this Thread |
Display Modes | |
|
|
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 |