|
[Sponsors] |
Multiple Floating Objects with 6DoF in OF 2.3.0 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 29, 2014, 15:14 |
Multiple Floating Objects with 6DoF in OF 2.3.0
|
#1 |
New Member
Teng
Join Date: May 2011
Location: UK
Posts: 5
Rep Power: 15 |
Hi Foamers,
I am trying to model multiple floating objects in OpenFOAM. I started my case by using the floatingObject tutorial and managed to get two objects floating in 2.2.0. However, there is a problem when I try to model the similar case in 2.3.0 as the settings for dynamic motion are slightly different. My problem is that, in the dynamicMeshDict for 2.3.0: dynamicFvMesh dynamicMotionSolverFvMesh; motionSolverLibs ("libsixDoFRigidBodyMotion.so"); solver sixDoFRigidBodyMotion; sixDoFRigidBodyMotionCoeffs { patches (object1); .................. } sixDoFRigidBodyMotionCoeffs { patches (object2); .................. } Writing 2 separate sixDoFRigidBodyMotionCoeffs, one for each of the objects in the same dynamicMeshDict does not seems to work, only one object is picked up for the dynamic motion. Even putting two of the patches together (one after another) under one sixDoFRigidBodyMotionCoeffs doesn't help either. Would be grateful if anyone know how to get two (or even more) objects to run under sixDoFRigidBodyMotion in 2.3.0 simultaneously. Kind Regards, tyoung |
|
November 1, 2014, 14:10 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
Blog Entries: 45
Rep Power: 128 |
Greetings tyoung,
AFAIK, not even OpenFOAM 2.3.x supports multi-body mesh motion with the sixDoFRigidBodyMotion library. Most dynamic mesh capabilities in OpenFOAM usually only handle one body that distorts the mesh somehow. Nonetheless, there is at least one class that demonstrates how code can be created for supporting more than one object... let me see if I can find it... OK, I found "multiSolidBodyMotion": https://github.com/OpenFOAM/OpenFOAM...MotionFvMesh.H Actually, it's the class "solidBodyMotionFunctions::multiMotion" I was looking for: https://github.com/OpenFOAM/OpenFOAM.../multiMotion.H Mmm... I re-read your post and you mentioned that you got it to work fine in OpenFOAM 2.2.0. Perhaps you were using "multiSolidBodyMotion" or "solidBodyMotion"? I ask this because the algorithm in sixDoFRigidBodyMotion was re-written in in OpenFOAM 2.3.0 so that it would be more realistic: http://www.openfoam.org/version2.3.0/mesh-motion.php Best regards, Bruno
__________________
Last edited by wyldckat; November 1, 2014 at 17:22. Reason: fixed typo |
|
November 1, 2014, 17:09 |
|
#3 |
New Member
Teng
Join Date: May 2011
Location: UK
Posts: 5
Rep Power: 15 |
Hi Bruno,
Thank you so much for your reply. I am still fairly new to OpenFoam and my first case which I ran in 2.2.0 is actually modified from another thread in this forum http://www.cfd-online.com/Forums/ope...g-objects.html. The things that I have changed from that case is my own mesh, the centre of mass, moment of inertia and mass. My case ran alright for a short period of time (only for mesh observation). I assumed my case is alright as I can see both sets of Centre of mass, Linear velocity, Angular velocity, one for each objects being solved on the log file. However, after reading what you have mentioned, I believe my solution might not be right after all. This is how my dynamicMeshDict for 2.2.0 looks like: Code:
dynamicFvMesh dynamicMotionSolverFvMesh; motionSolverLibs ("libfvMotionSolvers.so"); solver displacementLaplacian; displacementLaplacianCoeffs { diffusivity inverseDistance (object1); diffusivity inverseDistance (object2); } Code:
object1 { type sixDoFRigidBodyDisplacement; centreOfMass (0 -0.04 0); momentOfInertia (5 5 5); mass 19.5; rhoInf 1; report on; value uniform (0 0 0); } object2 { type sixDoFRigidBodyDisplacement; centreOfMass (1.54 -0.04 0); momentOfInertia (5 5 5); mass 19.5; rhoInf 1; report on; value uniform (0 0 0); } Kind Regards, tyoung Last edited by wyldckat; November 1, 2014 at 17:52. Reason: Added [CODE][/CODE] |
|
November 1, 2014, 17:59 |
|
#4 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
Blog Entries: 45
Rep Power: 128 |
Hi tyoung,
Quote:
OK, the correct definition should be this: Code:
dynamicFvMesh dynamicMotionSolverFvMesh; motionSolverLibs ("libfvMotionSolvers.so"); solver displacementLaplacian; displacementLaplacianCoeffs { diffusivity inverseDistance (object1 object2); } Therefore, in OpenFOAM 2.3.0/x, you should be using this: Code:
sixDoFRigidBodyMotionCoeffs { patches (object1 object2); .................. } Best regards, Bruno
__________________
|
||
November 1, 2014, 18:46 |
|
#5 |
New Member
Teng
Join Date: May 2011
Location: UK
Posts: 5
Rep Power: 15 |
Hi Bruno,
Thanks for the quick reply. For OpenFOAM 2.3.0/x (sorry for my poor C++), I would like to know how do you assign the centre of mass, moment of inertia and mass under the same sixDoFRigidBodyMotionCoeffs for each of the objects as they are located in different positions (different centre of mass). FYI, in OpenFOAM 2.3.0/x, the dynamicMeshDict for single floating object looks like this(below), where you assign the centre of mass, moment of inertia and mass in the dynamicMeshDict instead of in the pointDisplacement in the 0 folder (For OF 2.2.0, it's the other way round) Code:
dynamicFvMesh dynamicMotionSolverFvMesh; motionSolverLibs ("libsixDoFRigidBodyMotion.so"); solver sixDoFRigidBodyMotion; sixDoFRigidBodyMotionCoeffs { patches (floatingObject); innerDistance 0.05; outerDistance 0.35; centreOfMass (0.5 0.5 0.5); momentOfInertia (0.08622222 0.08622222 0.144); mass 9.6; report on; accelerationRelaxation 0.7; } Code:
sidimensions [0 1 0 0 0 0 0]; internalField uniform (0 0 0); boundaryField { stationaryWalls { type fixedValue; value uniform (0 0 0); } atmosphere { type fixedValue; value uniform (0 0 0); } floatingObject { type calculated; value uniform (0 0 0); } } tyoung |
|
November 2, 2014, 07:23 |
|
#6 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
Blog Entries: 45
Rep Power: 128 |
Hi tyoung,
OK, I've done some code diving and here's what I've figured out:
Bruno
__________________
|
|
November 2, 2014, 10:57 |
|
#7 |
New Member
Teng
Join Date: May 2011
Location: UK
Posts: 5
Rep Power: 15 |
Hi Bruno,
Once again thank you so much for all your suggestions and explanations. They really give me a good insight of the changes in 2.3.0 from 2.2.0. For now, I managed to get my code running based on your first recommendation in 2.3.0. I will look into the results later on to see if everything is alright. Other than that, I will also try to look at the alternative method you have recommended (if I could do it) to see if the newer motion solver further improves anything. Regards, tyoung |
|
February 21, 2015, 09:07 |
Any results
|
#8 |
Member
Thaw Tar
Join Date: Apr 2013
Location: Yangon, Myanmar
Posts: 35
Rep Power: 13 |
Hi tyoung,
Have you got any results of multiple objects simulation using openfoam's native sixDofRigidBodyDisplacement solver? Actually, I am trying to do vortex induced vibration of multiple cylinders. But I am too lazy and too new to OpenFOAM. So, I do not want to create a new multiBody motion solver. So, I want to know whether your results using native sixDofRigidBodyDisplacement are right or now. Regards thaw tar |
|
December 22, 2016, 00:19 |
|
#9 | |
New Member
Shilong. Liu
Join Date: Dec 2016
Posts: 3
Rep Power: 9 |
Quote:
As mentioned in your last reply, you said you have got the code running based on Bruno's first recommendation, here you mean using the multiSolidBodyMotion? Did it work? Now I am doing the similar model like you in v3.0 and come with the same problem. Thank you |
||
December 22, 2016, 09:39 |
|
#10 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
Blog Entries: 45
Rep Power: 128 |
Greetings to all!
@ShilongLiu: Many thanks for bumping up this thread! I had plans to come looking for it, but this made my life easier A feature for multi-body support was introduced less than a month ago in OpenFOAM-dev: https://github.com/OpenFOAM/OpenFOAM...32cfbaec38a6e2
Best regards, Bruno
__________________
|
|
April 18, 2020, 01:46 |
|
#11 |
New Member
Paulo
Join Date: Dec 2017
Posts: 9
Rep Power: 8 |
Hi Tyoung,
How have you solved it? I have the same problem for two bodies. Thanks. |
|
December 28, 2020, 11:23 |
Regarding Multiple floating-objects in openFOAM
|
#12 |
New Member
mostafa raeisi
Join Date: Dec 2014
Posts: 14
Rep Power: 11 |
Dear all foam users,
After reading this thread, I sweep all files regarding to motion objects in OpenFOAM. Here, I will explain how to do it with the last released version. I use ''overInterDyMFoam'' solver. This Solver is connected to ''dynamicMotionSolverListFvMesh''. when you are interested in simulation of multiple objects, you need to use this way, either floating sixdofrigidbodymotion or another prescribed kinds. In constructors part of ''dynamicMotionSolverListFvMesh.C'' we have: /////////////////////////////////////////// label i = 0; if (dict.found("solvers")) { const dictionary& solvertDict = dict.subDict("solvers"); motionSolvers_.setSize(solvertDict.size()); for (const entry& dEntry : solvertDict) { if (dEntry.isDict()) { IOobject io(ioDict); io.readOpt() = IOobject::NO_READ; io.writeOpt() = IOobject::AUTO_WRITE; io.rename(dEntry.dict().dictName()); IOdictionary IOsolverDict ( io, dEntry.dict() ); motionSolvers_.set ( i++, motionSolver::New(*this,IOsolverDict) ); } } motionSolvers_.setSize(i); } else { motionSolvers_.setSize(1); motionSolvers_.set(i++, motionSolver::New(*this)); } } /////////////////////////////////////////// As you can see, after opening ''solvers'' part in ''dynamicMeshDict'' file (i.e. '' if (dict.found("solvers")) the code executes ''motionSolver::New(*this, IOsolverDict)'' This line is called from the selector part of ''motionSolver.C'' ///////////////////////////////////// Foam::autoPtr<Foam::motionSolver> Foam::motionSolver::New ( const polyMesh& mesh, const IOdictionary& solverDict ) { // The change from "solver" to "motionSolver" has not been // applied consistently. Accept both without complaint. const word solverName ( solverDict.getCompat<word>("motionSolver", {{"solver", -1612}}) ); Info<< "Selecting motion solver: " << solverName << nl; const_cast<Time&>(mesh.time()).libs().open ( solverDict, "motionSolverLibs", dictionaryConstructorTablePtr_ ); if (!dictionaryConstructorTablePtr_) { FatalErrorInFunction << "solver table is empty" << exit(FatalError); } auto cstrIter = dictionaryConstructorTablePtr_->cfind(solverName); if (!cstrIter.found()) { FatalIOErrorInLookup ( solverDict, "solver", solverName, *dictionaryConstructorTablePtr_ ) << exit(FatalIOError); } return autoPtr<motionSolver>(cstrIter()(mesh, solverDict)); } //////////////////////////////////// Now, you can see "motionSolverLibs" and ''solver'' are looked up here! .............................. Therefore, for multiple objects simulation you need to create ''dynamicMeshDict'' file as following: //////////////////////////// dynamicFvMesh dynamicOversetFvMesh; solvers { Obj1 { motionSolverLibs (sixDoFRigidBodyMotion); solver sixDoFRigidBodyMotion; sixDoFRigidBodyMotionCoeffs { patches (patch1); ... } } Obj2 { motionSolverLibs (sixDoFRigidBodyMotion); solver sixDoFRigidBodyMotion; sixDoFRigidBodyMotionCoeffs { patches (patch2); ... } } Obj3 { solver multiSolidBodyMotionSolver; multiSolidBodyMotionSolverCoeffs { movingZone1 { solidBodyMotionFunction rotatingMotion; rotatingMotionCoeffs { .... } } movingZone2 { solidBodyMotionFunction linearMotion; linearMotionCoeffs { .... } } } } //////////////////////////// I hope this help anyone. |
|
March 3, 2021, 00:20 |
Multiple floating body simulation
|
#13 | |
Member
Sachin
Join Date: Aug 2014
Location: India
Posts: 84
Rep Power: 12 |
Quote:
Could you share a sample dynamicmeshdict file for reference. I am trying to work with the floating body tutorial using overinterdymfoam. Iam trying to create two bodies and give motion to the two. In between why is there a movingzone1 and movingzone2 are those necessary for the problem iam trying to work on? With regards, Sachin M |
||
March 16, 2021, 02:11 |
Multiple floating body simulation
|
#14 |
Member
Sachin
Join Date: Aug 2014
Location: India
Posts: 84
Rep Power: 12 |
Does anyone know how the transform is defined inside the dynamicmeshdict in floatingobject tutorial.
|
|
July 10, 2021, 06:57 |
|
#15 | |
New Member
Pedro
Join Date: Jul 2021
Posts: 11
Rep Power: 5 |
Quote:
Hello, I have tried to implement my dinamycMeshDict file like this in OpenFoam 8, but I get this error: [0] --> FOAM FATAL ERROR: [0] Unknown dynamicFvMesh type dynamicMotionSolverListFvMesh Valid dynamicFvMesh types are : 7 ( dynamicInkJetFvMesh dynamicInterpolatedFvMesh dynamicMotionSolverFvMesh dynamicRefineFvMesh movingConeTopoFvMesh rawTopoChangerFvMesh staticFvMesh ) So looks like this dynamicFvMesh type is not implemented in OpenFoam 8 and what is worst, none of this types seems to work for multiple body motion. Is it possible to simulate multiple solid bodies in this version or they just removed this feature? Im trying to simulate 2 vertical axis wind turbines with 6DoF, but none of the solutions I have found (multiSolidBodyMotionFvMesh, dynamicMultiMotionSolverFvMesh, dynamicMotionSolverListFvMesh) work for this version. Please, let me know if you know how to implement the dynamicMeshDict file. Thank you. |
||
December 9, 2021, 15:44 |
|
#16 |
New Member
Faro Schäfer
Join Date: Nov 2021
Posts: 10
Rep Power: 5 |
Is there any updates on this? I am stuck with a very similar problem in which I want to simulate two floating objects with overset Mesh method.
I tried using both sixDOF and rigidBody Motion but none of them worked for me. |
|
July 1, 2023, 05:56 |
|
#17 |
New Member
shristi
Join Date: Jun 2023
Posts: 26
Rep Power: 3 |
I am also facing the same problem in openfoam 7.
|
|
April 15, 2024, 09:29 |
|
#18 |
New Member
Faisal Muhammad
Join Date: Oct 2015
Location: Canada
Posts: 12
Rep Power: 10 |
||
April 15, 2024, 09:30 |
|
#19 |
New Member
Faisal Muhammad
Join Date: Oct 2015
Location: Canada
Posts: 12
Rep Power: 10 |
||
April 15, 2024, 09:31 |
|
#20 |
New Member
Faisal Muhammad
Join Date: Oct 2015
Location: Canada
Posts: 12
Rep Power: 10 |
I am also stuck in a similar scenario. Were you able to solve it with 6dof?. My case is of forced motion and I am trying to use 6dof dic
|
|
Tags |
of 2.3.0, sixdofrigidbodymotion |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to set periodic boundary conditions | Ganesh | FLUENT | 15 | November 18, 2020 06:09 |
Multiple floating objects | CKH | OpenFOAM Running, Solving & CFD | 14 | February 20, 2019 09:08 |
Floating objects in water flow: which tools and how much effort ? | TomGratte1 | Main CFD Forum | 0 | December 29, 2013 10:43 |
Linking two floating objects | chatluthier | FLOW-3D | 3 | December 12, 2011 11:31 |
OpenFOAM static build on Cray XT5 | asaijo | OpenFOAM Installation | 9 | April 6, 2011 12:21 |