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

boatAndPropeller tutorial error? overInterDyMFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By xuegy

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 6, 2021, 11:17
Default boatAndPropeller tutorial error? overInterDyMFoam
  #1
New Member
 
Join Date: Oct 2012
Posts: 9
Rep Power: 13
efe011 is on a distinguished road
Hello,

I've been playing a bit with the overInterDyMFoam tutorial boatAndPropeller that was included in OF v1806 and it seems to be an error. Once you run the case, the "propeller" rotates for a bit and then it stops.

The rotation of the propeller is generated with a prescribedRotation restraint, and the "omega" value is passed as a table (Function1) in dynamicMeshDict:

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

motionSolverLibs    (rigidBodyMeshMotion);

dynamicFvMesh       dynamicOversetFvMesh;

motionSolver        rigidBodyMotion;

report          on;

solver
{
    type Newmark;
    //gamma   0.1;    // Velocity integration coefficient
    //beta    0.1;    // Position integration coefficient
}

accelerationRelaxation 0.4;

// prescribedRotation requires some sub-iterations to converge faster
// to desired value of omega.
nIter   3;

bodies
{
    hull
    {
        type            rigidBody;
        parent          root;

        // To get Tensor of Inertia (symmetrical) use surfaceInertia
        // here hull is empty shell

        mass            0.552;
        inertia            (0.0033 0 0 0.01 0 0.0095);
        centreOfMass    (0.2857 -0.07 0); // relative to the centreOfMass
                                        // of parent body
                                        // (here root = global coord system)

        // Transformation tensor and centre of rotation (CoR)
        transform       (1 0 0 0 1 0 0 0 1) (0.2857 -0.07 0);

        joint
        {
        // These constrains are applied only to body hull,
        // other bodies need to have their own set
        // Constraints used for faster run

            type            composite;
            joints
            (
                {
                    type Px;  // Allow translation in X -
                }
                {
                    type Ry;  // Allow rotation along Y axis
                                // (local - body CS)
                }
            );
        }

        patches         (hullWall);
        innerDistance   100;    // With overset we want to avoid the mesh
                                // deformation so have large innerDistance
        outerDistance   200;
    }

    propeller
    {

        type            rigidBody;
        parent          hull;

        centreOfMass    (-0.2847 0.03 0);    // Relative to parent CoM
        mass            0.0288;
        inertia         (7.6e-6 0 0 4.2e-6 0 4.2e-6);
        // transform and CoR - relative to parent CoR
        transform       (1 0 0 0 1 0 0 0 1) (-0.2757 0.03 0);
        patches        (propellerWall);
        innerDistance   100;
        outerDistance   200;
        joint
        {
            type            Rx;
        }
    }

    rudder
    {
        type            rigidBody;
        parent          hull;
        centreOfMass    (-0.3602 -0.0055 0);
        mass            0.0746;
        inertia         (3.3e-5 0 0 4.7e-6 0 3.4e-5);
        // transform and CoR - relative to parent CoR
        transform       (1 0 0 0 1 0 0 0 1) (-0.3487 -0.04 0);
        patches        (rudderWall);
        innerDistance   100;
        outerDistance   200;
        joint
        {
            type            Ry;
        }
    }
}

restraints
{
    rudderRotation
    {
        type                    prescribedRotation;
        body                    rudder;
        referenceOrientation    (1 0 0 0 1 0 0 0 1);
        axis                    (0 1 0);    // Axis of rotation
        omega                   sine;       // Function1 entry
        omegaCoeffs
        {
            frequency   4;
            amplitude   0.2;
            scale       (0 1 0);
            level       (0 1 0);
        }
    }
    propellerRotation
    {
        type                    prescribedRotation;
        body                    propeller;
        referenceOrientation    (1 0 0 0 1 0 0 0 1);
        axis                    (1 0 0);
        omega                   table
        (
            (0 (0 0 0))
            (1 (16 0 0))
        );
    }
}
If I understand correctly, the propeller should reach a maximum rotational speed at 1 second. However, it doesn't matter whether I pass a table, a ramp, or a constant value as omega, I can't get the propeller to run at a constant rotational speed and to avoid it from stopping in the end.

I tried running the case with OF v1912, v2006 and v2012 with the same results.

Any idea of what could be wrong?

Thanks a lot!
Federico.
efe011 is offline   Reply With Quote

Old   January 19, 2021, 10:15
Default
  #2
New Member
 
Join Date: Oct 2012
Posts: 9
Rep Power: 13
efe011 is on a distinguished road
If it works for anyone, the prescribedRotation restraint acts as a controller applying a certain torque to the joint. This restraint is almost a direct copy of the angular spring restraint, but the controller doesn't work as expected.

I managed to modify the externalForce restraint, a lot cleaner than the angular spring, to apply a proportional controller based on torque, depending on the rotational speed of the propeller and with that obtain the desired value of omega. I don't think it's the ideal solution, in any case.

Regards,
Federico.
efe011 is offline   Reply With Quote

Old   August 4, 2021, 03:40
Default Hi
  #3
New Member
 
Shai Aser
Join Date: Aug 2015
Posts: 25
Rep Power: 10
shaiashe is on a distinguished road
Hi Federico,

thank you for the update, are you willing to share your modification?

Thanks again,
Shai
shaiashe is offline   Reply With Quote

Old   June 8, 2023, 10:10
Default
  #4
Member
 
Join Date: Jun 2016
Posts: 99
Rep Power: 9
xuegy is on a distinguished road
Hello Fredrico,

Could you share more details (or citations) about how to modify externalForce to control the torque? Thanks.
AbdoMusaad likes this.
xuegy is offline   Reply With Quote

Reply


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
tutorial files KITetima FLUENT 8 November 23, 2019 16:05
AMI - Propeller Tutorial diverging kingmaker OpenFOAM Running, Solving & CFD 2 November 4, 2016 02:57
Tutorial For Workbench CFX Remesh ashtonJ CFX 2 April 26, 2014 21:19
Fluent Tutorial Guide Ch. 17: Non-Premixed Combust, THTR MAE7509 FLUENT 0 January 22, 2014 20:59
STAR-CD Tutorial shekhar aryal STAR-CD 4 March 22, 2010 03:25


All times are GMT -4. The time now is 09:22.