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 Tree2Likes
  • 1 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 likes 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

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 22 April 17, 2024 00:36
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 15:00.