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

restraints in floatingObject tutorial

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 16, 2018, 04:44
Default restraints in floatingObject tutorial
  #1
Member
 
Jiadong Wang
Join Date: Mar 2018
Location: Australia
Posts: 32
Rep Power: 8
jiadongw is on a distinguished road
Hey Foamers,

I'm trying to add a linear spring to the floatingObject tutorial.

Here is my modified dynamicMeshDict for this tutorial, where I added the restraints.
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5                                     |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      motionProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dynamicFvMesh       dynamicMotionSolverFvMesh;

motionSolverLibs   ("librigidBodyMeshMotion.so");

motionSolver       rigidBodyMotion;

rigidBodyMotionCoeffs
{
    report          on;

    solver
    {
        type Newmark;
    }

    accelerationRelaxation 0.7;

    bodies
    {
        floatingObject
        {
            type            cuboid;
            parent          root;

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

            // Density of the cuboid
            rho             500;

            // Cuboid mass
            mass            #calc "$rho*$Lx*$Ly*$Lz";
            L               ($Lx $Ly $Lz);
            centreOfMass    (0 0 0.25);
            transform       (1 0 0 0 1 0 0 0 1) (0.5 0.45 0.1);

            joint
            {
                type            composite;
                joints
                (
                    {
                        type Py;
                    }
                    {
                        type Ry;
                    }
                );
            }

            patches         (floatingObject);
            innerDistance   0.05;
            outerDistance   0.35;
        }
    }
         restraints
         {
               verticalspring
               { 
                     body                     floatingObject;
                     type                     linearSpring;
                     anchor                   (0.5 0.35 0.1);
                     refAttachmentPt          (0.5 0.45 0.1);
                     stiffness                100;
                     damping                  0;
                     restLength               0.1;
               }
          }
}


// ************************************************************************* //
That’s the only thing I changed. But the cases blow up after several time steps.

Does anyone have the relevant experience with this tutorial?

Any advice is appreciated, thanks.
jiadongw is offline   Reply With Quote

Old   September 17, 2018, 06:49
Default
  #2
New Member
 
金恒
Join Date: Oct 2012
Posts: 17
Rep Power: 14
jinheng is on a distinguished road
Quote:
Originally Posted by jiadongw View Post
Hey Foamers,

I'm trying to add a linear spring to the floatingObject tutorial.

Here is my modified dynamicMeshDict for this tutorial, where I added the restraints.
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5                                     |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      motionProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dynamicFvMesh       dynamicMotionSolverFvMesh;

motionSolverLibs   ("librigidBodyMeshMotion.so");

motionSolver       rigidBodyMotion;

rigidBodyMotionCoeffs
{
    report          on;

    solver
    {
        type Newmark;
    }

    accelerationRelaxation 0.7;

    bodies
    {
        floatingObject
        {
            type            cuboid;
            parent          root;

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

            // Density of the cuboid
            rho             500;

            // Cuboid mass
            mass            #calc "$rho*$Lx*$Ly*$Lz";
            L               ($Lx $Ly $Lz);
            centreOfMass    (0 0 0.25);
            transform       (1 0 0 0 1 0 0 0 1) (0.5 0.45 0.1);

            joint
            {
                type            composite;
                joints
                (
                    {
                        type Py;
                    }
                    {
                        type Ry;
                    }
                );
            }

            patches         (floatingObject);
            innerDistance   0.05;
            outerDistance   0.35;
        }
    }
         restraints
         {
               verticalspring
               { 
                     body                     floatingObject;
                     type                     linearSpring;
                     anchor                   (0.5 0.35 0.1);
                     refAttachmentPt          (0.5 0.45 0.1);
                     stiffness                100;
                     damping                  0;
                     restLength               0.1;
               }
          }
}


// ************************************************************************* //
That’s the only thing I changed. But the cases blow up after several time steps.

Does anyone have the relevant experience with this tutorial?

Any advice is appreciated, thanks.
hello, jiadong
I meet similar problem too, do you have any suggest after your question.
jinheng is offline   Reply With Quote

Old   September 17, 2018, 20:08
Default
  #3
Member
 
Jiadong Wang
Join Date: Mar 2018
Location: Australia
Posts: 32
Rep Power: 8
jiadongw is on a distinguished road
Quote:
Originally Posted by jinheng View Post
hello, jiadong
I meet similar problem too, do you have any suggest after your question.
Sorry, I'm still confused about the restraints in rigidBody motion solver.

I guess the key point is how to define the centre of mass and transform. But I did not find some reference materials about that.
jiadongw is offline   Reply With Quote

Reply

Tags
floatingobject, restraints, rigidbody


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
help with 3D Bifurcating Artery tutorial - no wall shear seen 9aul FLUENT 0 January 15, 2018 19:20
no floatingObject patch generated in tutorial "floatingObject" yejungong OpenFOAM Running, Solving & CFD 1 August 8, 2013 22:43
[blockMesh] problem with blockMesh in floatingObject tutorial atulAtcae OpenFOAM Meshing & Mesh Conversion 4 October 6, 2012 04:35
[Virtualization] OpenFOAM oriented tutorial on using VMware Player - support thread wyldckat OpenFOAM Installation 2 July 11, 2012 17:01
STAR-CD Tutorial shekhar aryal STAR-CD 4 March 22, 2010 04:25


All times are GMT -4. The time now is 05:04.