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

Multiple floating objects (6DOF) with overInterDyMFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 2 Post By zweihuehner
  • 1 Post By mahsankhan

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 8, 2021, 19:09
Question Multiple floating objects (6DOF) with overInterDyMFoam
  #1
New Member
 
Faro Schäfer
Join Date: Nov 2021
Posts: 10
Rep Power: 5
zweihuehner is on a distinguished road
For a research project I want to simulate a Wave energy converter (WEC) in extreme waves with OpenFoam.
The WEC consists of two articulated floating bodies which is why I choose the overset Mesh method for modelling.

I was already able to set up a simulation with one body but I am failing to do so with two bodies (firstly without articulation).
Does anyone have experience with this? So far I just added a second object in the dynamicMeshDict like so:


Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2106                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dynamicFvMesh   dynamicOversetFvMesh;

solvers
{
     VF
     {
        motionSolverLibs (fvMotionSolvers);

        motionSolver            solidBody;
        solidBodyMotionFunction drivenLinearMotion;

        cellSet                 c0;
        cOfGdisplacement        CofG;
    }

    Obj1
    {
        motionSolverLibs   (sixDoFRigidBodyMotion);
        motionSolver        sixDoFRigidBodyMotion;

        cellSet         c1;

        patches         (WEC1);
        innerDistance   1000.0;
        outerDistance   1001.0;

        centreOfMass    (4 0.75 1);
        cOfGdisplacement    CofG;

        // Cuboid dimensions
        Lx              0.5;
        Ly              0.3;
        Lz              0.2;

        // Density of the solid
        rhoSolid        500;

        // Cuboid mass
        mass            #eval{ $rhoSolid*$Lx*$Ly*$Lz };

        // Cuboid moment of inertia about the centre of mass
        momentOfInertia #codeStream
        {
            codeInclude
            #{
                #include "diagTensor.H"
            #};

            code
            #{
                scalar sqrLx = sqr($Lx);
                scalar sqrLy = sqr($Ly);
                scalar sqrLz = sqr($Lz);
                os  <<
                    $mass
                *diagTensor(sqrLy + sqrLz, sqrLx + sqrLz, sqrLx + sqrLy)/12.0;
            #};
        };

        report          on;
        accelerationRelaxation 0.9;
        accelerationDamping    1;

        solver
        {
            type Newmark;
        }

        restraints
        {

            linearSpring
            {
                sixDoFRigidBodyMotionRestraint linearSpring;
                anchor            (2 0.75 0);
                refAttachmentPt   (3.75 0.75 0.9);
                stiffness         300;
                damping           0;
                restLength        1.96787;
            }

        }
    }

    Obj2
    {
        motionSolverLibs   (sixDoFRigidBodyMotion);
        motionSolver        sixDoFRigidBodyMotion;

        cellSet         c2;

        patches         (WEC2);
        innerDistance   1000.0;
        outerDistance   1001.0;

        centreOfMass    (3.4 0.75 1);
        cOfGdisplacement    CofG;

        // Cuboid dimensions
        Lx              0.5;
        Ly              0.3;
        Lz              0.2;

        // Density of the solid
        rhoSolid        500;

        // Cuboid mass
        mass            #eval{ $rhoSolid*$Lx*$Ly*$Lz };

        // Cuboid moment of inertia about the centre of mass
        momentOfInertia #codeStream
        {
            codeInclude
            #{
                #include "diagTensor.H"
            #};

            code
            #{
                scalar sqrLx = sqr($Lx);
                scalar sqrLy = sqr($Ly);
                scalar sqrLz = sqr($Lz);
                os  <<
                    $mass
                *diagTensor(sqrLy + sqrLz, sqrLx + sqrLz, sqrLx + sqrLy)/12.0;
            #};
        };

        report          on;
        accelerationRelaxation 0.9;
        accelerationDamping    1;

        solver
        {
            type Newmark;
        }

        restraints
        {

            linearSpring
            {
                sixDoFRigidBodyMotionRestraint linearSpring;
                anchor            (1.4 0.75 0);
                refAttachmentPt   (3.15 0.75 0.9);
                stiffness         300;
                damping           0;
                restLength        1.96787;
            }

        }
    }

}
// ************************************************************************* //
I found no other helping examples or code snippets dealing with the same problem except for this one: Multiple Floating Objects with 6DoF in OF 2.3.0
Unfortunately I think this solution is derived from the "twosimplerotors" example and does not allow 6DOF.


However, I can not imagine that it is not possible to simulate two floating bodies with openFoam with overset Mesh.


Looking forwards to help.
lourencosm and Jim1310 like this.
zweihuehner is offline   Reply With Quote

Old   May 9, 2023, 10:24
Question
  #2
New Member
 
Ahsan
Join Date: Nov 2019
Location: Bologna, Italy
Posts: 27
Rep Power: 6
mahsankhan is on a distinguished road
Hey Faro Schäfer,


Did you find any solution for using more than 1 body in OpenFOAM with 6DoF? Let me know, please. Thank you so much.


Regards,
Ahsan
lourencosm likes this.
mahsankhan is offline   Reply With Quote

Old   May 24, 2024, 10:53
Default Solution
  #3
New Member
 
Dimitris Tsoumpelis
Join Date: Sep 2022
Location: Athens, Greece
Posts: 8
Rep Power: 3
Jim1310 is on a distinguished road
For overset meshes it mmight not be possible to simulate multiple bodies (for deformable mesh it is possible, see report from Chalmers University from Magnus Urquhart). Lately i have found that there has been made a new type of overset mesh found in https://journal.openfoam.com/index.p...rticle/view/96 . It is called dynamicOversetZoneFvMesh and inherits from oversetBase and dynamicMultimOtionSolverFvMesh, with the later one enabling the capability of having multiple zones of overset meshes. I have also made a case of 2D floating bodies (in v2306) where the functionality of the above code is demonstrated. In that case one body performs oscillating rotating motion and the other is freely moving.
Attached Files
File Type: zip floatingBody2D_oscRot.zip (194 Bytes, 2 views)
Jim1310 is online now   Reply With Quote

Old   June 19, 2024, 10:13
Default
  #4
New Member
 
babaloknath
Join Date: Jun 2024
Posts: 1
Rep Power: 0
cfdphd is on a distinguished road
Hello Dimitris Tsoumpelis,

Can you share your case of 2D floating bodies?

Thank you.
cfdphd is offline   Reply With Quote

Old   June 19, 2024, 11:19
Default
  #5
New Member
 
Dimitris Tsoumpelis
Join Date: Sep 2022
Location: Athens, Greece
Posts: 8
Rep Power: 3
Jim1310 is on a distinguished road
Yes of course, i think i have it attached it in the post above. In any case though here it is. (actually it takes very little space, i probably had forgotten to provide the zip application the '-r' option).
Attached Files
File Type: zip floatingBody2D_oscRot.zip (29.4 KB, 3 views)
Jim1310 is online now   Reply With Quote

Reply

Tags
6dof solver, floating objects, multiple bodies, overset overinterdymfoam


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
Multiple Floating Objects with 6DoF in OF 2.3.0 tyoung OpenFOAM Running, Solving & CFD 23 June 11, 2024 01:13
Can I simulate multiple floating bodies with REEF3D? XinWangSwansea REEF3D 4 July 1, 2022 12:26
Multiple floating objects using InterDyMFoam and sixDoFRigidBodyMotion solver FloatingSolar OpenFOAM Running, Solving & CFD 4 December 29, 2020 11:09
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


All times are GMT -4. The time now is 06:12.