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

Multiple Floating Objects with 6DoF in OF 2.3.0

Register Blogs Community New Posts Updated Threads Search

Like Tree9Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 29, 2014, 16:14
Post 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
tyoung is on a distinguished road
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
tyoung is offline   Reply With Quote

Old   November 1, 2014, 15:10
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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 18:22. Reason: fixed typo
wyldckat is offline   Reply With Quote

Old   November 1, 2014, 18:09
Default
  #3
New Member
 
Teng
Join Date: May 2011
Location: UK
Posts: 5
Rep Power: 15
tyoung is on a distinguished road
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); 
}
And my pointDisplacement for the floating objects in the 0 folder:

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); 
}
It sounds like modifying the multiSolidBodyMotion function you mentioned to do similar function of internal motion of a mesh calculated from boundary motion (with 6DoF) a bit too complicated for a new user like myself. I am hoping to model two floating objects subjected to water waves generated from the inlet boundary. Anyway I am grateful for your clarification.

Kind Regards,
tyoung
wyldckat and chun like this.

Last edited by wyldckat; November 1, 2014 at 18:52. Reason: Added [CODE][/CODE]
tyoung is offline   Reply With Quote

Old   November 1, 2014, 18:59
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi tyoung,

Quote:
Originally Posted by tyoung View Post
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); 
}
Of course! How could I have forgotten about this Since I hadn't seen something like this in the past, I never thought it would be possible to do this in such a way!

OK, the correct definition should be this:
Code:
dynamicFvMesh dynamicMotionSolverFvMesh; 

motionSolverLibs ("libfvMotionSolvers.so"); 

solver displacementLaplacian; 

displacementLaplacianCoeffs 
{ 
diffusivity inverseDistance (object1 object2); 
}
this way is the correct way to define the various patches that are affected by this diffusivity calculation.

Therefore, in OpenFOAM 2.3.0/x, you should be using this:
Code:
sixDoFRigidBodyMotionCoeffs
{
patches (object1 object2);
..................
}
And yes, in OpenFOAM it is used a space for separating 2 items in a list or vector .

Best regards,
Bruno
waku2005 and dupeng like this.
__________________
wyldckat is offline   Reply With Quote

Old   November 1, 2014, 19:46
Default
  #5
New Member
 
Teng
Join Date: May 2011
Location: UK
Posts: 5
Rep Power: 15
tyoung is on a distinguished road
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;
}
and the pointDisplacement in the 0 folder:

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);
    }
}
Regards
tyoung
tyoung is offline   Reply With Quote

Old   November 2, 2014, 08:23
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi tyoung,

OK, I've done some code diving and here's what I've figured out:
  1. You can still use the same mechanism in 2.3 that you used in OpenFOAM 2.2. The only change needed is that you need an additional library loaded into memory. This should perhaps do the trick:
    Code:
    dynamicFvMesh dynamicMotionSolverFvMesh; 
    
    motionSolverLibs
    (
        "libfvMotionSolvers.so"
        "libsixDoFRigidBodyMotion.so"
    ); 
    
    solver displacementLaplacian; 
    
    displacementLaplacianCoeffs 
    { 
        diffusivity inverseDistance (object1 object2); 
    }
    And then use the same boundary conditions you used in 2.2.
  2. The reason for this solution is because the class "sixDoFRigidBodyDisplacementPointPatchVectorFi eld" was moved from the library "libfvMotionSolvers.so" to "libsixDoFRigidBodyMotion.so".
  3. The new functionality they've implemented into OpenFOAM 2.3.0/x is by having the mesh motion solver to be able to directly solve the mesh motion, instead of forcing the patches to move themselves. Problem is that this suffers from the same problem that most of the other mesh motion solvers have got: it's not possible to handle more than one mesh motion solver at a time.
    • More specifically, if you look at the source code for this new motion solver, you'll see very similar code to the code used directly on the patches. Problem is that each patch is handled independently with its own instance of "sixDoFRigidBodyDisplacementPointPatchVectorField" , while the code in the mesh motion class "sixDoFRigidBodyMotionSolver" was designed to only handle a single object-body.
    • A possible solution for this would be to create a new class that is based on "sixDoFRigidBodyMotionSolver" and that can then handle more than one body. At first glance, it doesn't seem something hard to do, but it does take somewhere between 4 to 8h of development and testing in total, time which I personally don't have
      The best I can do is to suggest that you compare the source code in stitchMesh with the one present here: https://github.com/wyldckat/stitchMeshMultiPatch - this should give you an idea of what needs to done to get a similar capability.
Good luck! Best regards,
Bruno

tyoung, kkpal, minh khang and 1 others like this.
__________________
wyldckat is offline   Reply With Quote

Old   November 2, 2014, 11:57
Default
  #7
New Member
 
Teng
Join Date: May 2011
Location: UK
Posts: 5
Rep Power: 15
tyoung is on a distinguished road
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
tyoung is offline   Reply With Quote

Old   February 21, 2015, 10:07
Talking Any results
  #8
Member
 
Thaw Tar's Avatar
 
Thaw Tar
Join Date: Apr 2013
Location: Yangon, Myanmar
Posts: 35
Rep Power: 13
Thaw Tar is on a distinguished road
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
Thaw Tar is offline   Reply With Quote

Old   December 22, 2016, 01:19
Talking
  #9
New Member
 
Shilong. Liu
Join Date: Dec 2016
Posts: 3
Rep Power: 9
ShilongLiu is on a distinguished road
Quote:
Originally Posted by tyoung View Post
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
Hi Tyoung,
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
ShilongLiu is offline   Reply With Quote

Old   December 22, 2016, 10:39
Default
  #10
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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
This feature should also be available in the next stable release version 5.0 (if I'm not mistaken).

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   April 18, 2020, 02:46
Default
  #11
New Member
 
Paulo
Join Date: Dec 2017
Posts: 9
Rep Power: 9
pvreis is on a distinguished road
Hi Tyoung,

How have you solved it?
I have the same problem for two bodies.

Thanks.
pvreis is offline   Reply With Quote

Old   December 28, 2020, 12:23
Default Regarding Multiple floating-objects in openFOAM
  #12
New Member
 
mostafa raeisi
Join Date: Dec 2014
Posts: 14
Rep Power: 12
mostafa R is on a distinguished road
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.
mostafa R is offline   Reply With Quote

Old   March 3, 2021, 01:20
Default Multiple floating body simulation
  #13
Member
 
Sachin
Join Date: Aug 2014
Location: India
Posts: 84
Rep Power: 12
Sachin m is on a distinguished road
Quote:
Originally Posted by mostafa R View Post
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.
Hi mostafa,

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
Sachin m is offline   Reply With Quote

Old   March 16, 2021, 03:11
Default Multiple floating body simulation
  #14
Member
 
Sachin
Join Date: Aug 2014
Location: India
Posts: 84
Rep Power: 12
Sachin m is on a distinguished road
Does anyone know how the transform is defined inside the dynamicmeshdict in floatingobject tutorial.
Sachin m is offline   Reply With Quote

Old   July 10, 2021, 07:57
Default
  #15
New Member
 
Pedro
Join Date: Jul 2021
Posts: 11
Rep Power: 5
phelps is on a distinguished road
Quote:
Originally Posted by mostafa R View Post
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.

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.
phelps is offline   Reply With Quote

Old   December 9, 2021, 16:44
Default
  #16
New Member
 
Faro Schäfer
Join Date: Nov 2021
Posts: 10
Rep Power: 6
zweihuehner is on a distinguished road
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.
zweihuehner is offline   Reply With Quote

Old   July 1, 2023, 06:56
Default
  #17
@ss
New Member
 
shristi
Join Date: Jun 2023
Posts: 26
Rep Power: 3
@ss is on a distinguished road
I am also facing the same problem in openfoam 7.
@ss is offline   Reply With Quote

Old   April 15, 2024, 10:29
Default
  #18
New Member
 
Faisal Muhammad
Join Date: Oct 2015
Location: Canada
Posts: 12
Rep Power: 11
faysaal is on a distinguished road
Quote:
Originally Posted by @ss View Post
I am also facing the same problem in openfoam 7.
Did u find any soultion?
faysaal is offline   Reply With Quote

Old   April 15, 2024, 10:30
Default
  #19
New Member
 
Faisal Muhammad
Join Date: Oct 2015
Location: Canada
Posts: 12
Rep Power: 11
faysaal is on a distinguished road
Quote:
Originally Posted by @ss View Post
I am also facing the same problem in openfoam 7.
Any luck with 6dof multiple bodies?
faysaal is offline   Reply With Quote

Old   April 15, 2024, 10:31
Default
  #20
New Member
 
Faisal Muhammad
Join Date: Oct 2015
Location: Canada
Posts: 12
Rep Power: 11
faysaal is on a distinguished road
Quote:
Originally Posted by zweihuehner View Post
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.
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
AbdoMusaad likes this.
faysaal is offline   Reply With Quote

Reply

Tags
of 2.3.0, sixdofrigidbodymotion


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
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 07:09
Multiple floating objects CKH OpenFOAM Running, Solving & CFD 14 February 20, 2019 10:08
Floating objects in water flow: which tools and how much effort ? TomGratte1 Main CFD Forum 0 December 29, 2013 11:43
Linking two floating objects chatluthier FLOW-3D 3 December 12, 2011 12:31
OpenFOAM static build on Cray XT5 asaijo OpenFOAM Installation 9 April 6, 2011 13:21


All times are GMT -4. The time now is 14:17.