CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[Tutorials] Flow induced rotation with AMI and 6DOF

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Tobi

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 24, 2018, 08:44
Default Flow induced rotation with AMI and 6DOF
  #1
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Dear Community,

I am happy to announce a new tutorial that combines the AMI boundary condition and 6DOF library in order to build a flow induced rotation of a vertical axis wind turbine also named VAWT. The case is published on my website. Enjoy.

Case: https://holzmann-cfd.com/community/training-cases/vertical-axial-wind-turbine

Video: https://www.youtube.com/watch?v=N0MN79bpl58




PS: Did you realize the fluctuations of the passive scalar? Can you explain it?
Attached Images
File Type: png VAWT.png (85.0 KB, 448 views)
zfaraday likes this.
__________________
Keep foaming,
Tobias Holzmann

Last edited by Tobi; July 14, 2021 at 03:48.
Tobi is offline   Reply With Quote

Old   July 13, 2021, 05:03
Default
  #2
New Member
 
Pedro
Join Date: Jul 2021
Posts: 11
Rep Power: 4
phelps is on a distinguished road
Hi Tobi,


First of all I would like to thank you for all your work, I have learned a lot about OpenFoam thanks to you.



Also, I would like to ask you something about this case. I'm trying to study the effects of the wake produced by a turbine into another turbine next to the first one, so I need to implement 6DoF for both turbines, but I'm unable to achieve this.


I have tried tons of solutions over the past week, but none seems to work in OpenFoam 8. Could you please shed a light on how to get more than one object with flow induced movement? I would be very gratefull.



Thank you.
phelps is offline   Reply With Quote

Old   July 14, 2021, 03:48
Default
  #3
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi Pedro,
thank you for your feedback. It is good to know that my work supports the community. To your question: As far as I know, OpenFOAM-8 cannot handle two 6-DoF zones. I guess the ESI version does have a library which allows you to use as much 6 DOF zones as you want. (This is my personal idea without checking the Foundation/ESI version regarding your problem).

Tobi
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   July 15, 2021, 18:55
Default
  #4
New Member
 
Pedro
Join Date: Jul 2021
Posts: 11
Rep Power: 4
phelps is on a distinguished road
Hello Tobias,

Thanks for your answer, it was very helpful. I installed ESI version (OpenFOAM 2012) and as you said, I' ve been able to set two 6DoF using dynamicMotionSolverListFv.

I've been able to start the simulation, however, it crashes after a few minutes. Checking the log file I've seen that time step continuity error gets huge, as well as bounding k and omega. So I guess I will have to change some discretization schemes.

Anyway, I don't want to bother you with this matter and I know this is not the right thread for this issues, but I wanted to thank you and leave this reply, someone may find helpful to know that you were right.


Best regards,


Pedro.
phelps is offline   Reply With Quote

Old   October 7, 2022, 04:41
Default Mesh moves around AMI
  #5
New Member
 
okay to be anonymous
Join Date: Dec 2012
Location: France
Posts: 4
Rep Power: 13
ExtRas is on a distinguished road
Dear Tobias,

I tried to apply the dynamicMeshDict of this tutorial and the Kaplan turbine one to a custom VAWT (an anemometer in fact). What a find, is the AMI interface is not really used. The mesh is morphed around AMI or around the solid depending on the inner / outer distance I choose.

I use OF2206, but I dont think the problem is my version of Openfoam.

In pointDisplacement, AMI1 and AMI2 are set to cyclicAMI. I think everything is well defined, I don't understand why the AMI is "sticky".

Did you experienced this kind of troubles when you worked on this case ?

B.R.

Marc
ExtRas is offline   Reply With Quote

Old   October 7, 2022, 07:44
Default
  #6
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
I don't get your statement:



Quote:
the AMI is not used
You know that if you use my stuff, its a flow-induced rotation. Hence, you need to change also the moment of inertia and stuff like that. You cannot simply copy paste my files.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   October 8, 2022, 09:43
Default
  #7
New Member
 
okay to be anonymous
Join Date: Dec 2012
Location: France
Posts: 4
Rep Power: 13
ExtRas is on a distinguished road
Hello,


Thanks for answering.


In fact, I am trying to have the anemometer rotating with the fluid forces. I do not want the mesh to be morphed and I would like that only the mesh inside the AMI, turns. Obviously I changed the values of the moment of inertia by the one given by Salome.



But what I got, is an uggly morphed mesh around the AMI and / or inside the AMI, depending on my BC in pointDisplacement and my inner or outer distances in the dynamicMeshDict.


Here they are :



Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  9                                     |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       pointVectorField;
    location    "0";
    object      pointDisplacement;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 0 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{
    AMI1
    {
        type            fixedValue;
        // type            cyclicAMI;
        value           uniform (0 0 0);
    }

    AMI2
    {
    type fixedValue;
        // type            calculated;
        // type            cyclicAMI;
        value           uniform (0 0 0);
    }

    inlet
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }

    outlet
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }

    walls
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }

    stator 
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }

    rotor
    {
        type            calculated;
        value           uniform (0 0 0);
    }

}


// ************************************************************************* //
I tried a lot of stuff for the AMI BC : fixedValue, cyclicAMI, calculated, but the mesh is still morphed.




Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  9                                     |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


dynamicFvMesh      dynamicMotionSolverFvMesh;

motionSolverLibs ("libsixDoFRigidBodyMotion.so");

motionSolver            sixDoFRigidBodyMotion;

sixDoFRigidBodyMotionCoeffs
{
    //- The following stuff is read from the rigidBodyMeshMotionSolver class 
    //  lOD = lookupOrDefault | l = lookup
    //  :: l :: patches
    //  :: l :: innerDistance
    //  :: l :: outerDistance
    //  :: l :: g                   (only if g is in db()) 
    //
    //  :: lOD :: test              (default = false) | test mode, only g act 
    //  :: lOD :: rho               (default = rho)   | needed for inco.
    //                              if rho = rhoInf -> lookup rhoInf value

    //- List of mesh patches associated with the solid body 
    patches         (rotor);

    //- Inner morphing distance (limit of solid-body region)
   innerDistance   0.0;

    //- Outer morphing distance (limit of linear interpolation region)
    outerDistance   0.1;

    //- Note: Based on innterDistance and outerDistance, we make a pointField
    //  that scales the morphing stuff (see also in the source code)

    //- Gravitational acceleration if g is used in the calculation
    //g               (0 0 0);

    //- Denisty name (normally rho but for incompressible cases we have to
    //  specify rhoInf and set the density). Each name different from rhoInf
    //  will be treated as variable. E.g. if we set rhoTest, FOAM search for
    //  a reserved rhoTest quantity
    rho             rhoInf;

    //- For incompressible cases [kg/m^3]
    rhoInf          1.2;


    //- The following stuff is read from the sixDoFRigidBodyMotion class and
    //  sixDoFRigidBodyMotionState
    //  lOD = lookupOrDefault | l = lookup
    //  :: l ::  mass
    //  :: l ::  momentOfInertia
    //
    //  :: lOD :: initialCentreOfMass       (default = l :: centreOfMass)
    //  :: lOD :: centreOfRotation          (default = l :: centreOfMass)
    //  :: lOD :: initialOrientation        (default = l :: orientation)
    //  :: lOD :: orientation               (default = identiy matrix I)
    //  :: lOD :: accelerationRelaxation    (default = 1) 
    //  :: lOD :: accelerationDumping       (default = 1)
    //  :: lOD :: report                    (default = false)
    //  :: lOD :: velocity                  (default = (0 0 0))
    //  :: lOD :: acceleration              (default = (0 0 0)) 
    //  :: lOD :: angularMomentum           (default = (0 0 0))
    //  :: lOD :: torque                    (default = (0 0 0))
    //
    //  -- need subDicts 
    //          "solver"
    //     and read if found
    //          "restraints"
    //          "constraints"

    //- Mass of VATK [kg]
    //  Volume in the geomtetry is V = 0.000461158 m^3
    //  Volume of the blades is V = 0.0000687109 m^3
    //  CFK rho = 1.5g/cm^3 = 1.5e-3 kg/cm^3 = 1.5e-3 * 100 * 100 * 100 kg/m^3 [kg/m^3]
    mass        0.48;

    //- Salome calculation
    // IX IY IZ = (0.0053176 0.0053176 0.0103473) based on rho = 1
    // IX IY IZ = (6.898e-6 3.54533e-6 3.545e-6) based on rho = 1
    momentOfInertia (0.000125702 7.57408e-05 7.57408e-05);

    //- Intial center of mass (default) and centre of rotation of the rigid-body 
    centreOfMass (0. 0. -0.01156);

    centreOfRotation (0. 0. -0.01156);

    //- Intial center of mass of the rigid-body (used if CenterOfMass move)
    //initialCenterOfMass     (0.1 0.025 0.00125);

    //- Initial orientation of the rigid-body (default) and rotational orient.
    orientation
    (
        1 0 0
        0 1 0
        0 0 1
    );
    
    //- Initial orientation of the rigid-body (used if orientation differs)
    //initialOrientation
    //(
    //    1 0 0
    //    0 1 0
    //    0 0 1
    //);

    //- Linear velocity of the rigid-body
    velocity        (0 0 0);

    //- Total linear acceleration of the rigid-body
    acceleration    (0 0 0);

    //- Angular momentum of the rigid-body in local reference frame
    angularMomentum (0 0 0);

    //- Total torque on rigid-body in local reference frame
    torque          (0 0 0);

    //- Report motion data
    report          on;

    //- Acceleration relaxation coeff [0-1]
    //accelerationRelaxation 0.7;

    //- Acceleration dumping coeff (for steady-state simulations) [0-1]
    //accelerationDumping 0.1;


    //- Motion Solver (for AMI not really needed); more related to 
    //  moving rigids while the mesh is deformed - not with AMI
    //  Options:
    //  Newmark
    //  Crank-Nicolsen
    //  and others possible
    solver
    {
        type Newmark;
    }


    //- Section for constraints 
    //  Checkout the openfoamwiki or the source code
    constraints
    {
        //- Arbitrary name
        zAxis
        {
            //- Fix the axis
            //  Here: rigid-body cannot move in x and z and rotate
            //  But we could move in y direction
            sixDoFRigidBodyMotionConstraint axis;
            axis (0 0 1);
        }

        //- Arbitrary name
        fixedPt
        {
            //- Fix the point
            //  Here: motion also avoided in y direction
            //  Only possibility now -> rotate arount y axis
            sixDoFRigidBodyMotionConstraint point;
            centreOfRotation (0 0 -0.01156);
        }
    }

    
    //- Section for restraints
    //  Checkout the openfoamwiki or the source code
    restraints
    {
        //- Some dumping functions
        /*translationDamper
        {
                //- Nms/rad
                //  Acts against motion as friction
                sixDoFRigidBodyMotionRestraint  sphericalAngularDamper;
                coeff 0.05;
        }
        */
    }
}


// ************************************************************************* //
I am pretty sure it is something obvious that I do not understand. Maybe with the inner and outer distances.



I attach some pictures of the mesh.





Best regards,


Marc
Attached Images
File Type: png morphedMesh1.png (58.0 KB, 39 views)
File Type: png morphedMeshT0.png (15.4 KB, 30 views)
File Type: png morphedMeshT1.png (23.5 KB, 22 views)
File Type: png morphedMesh2.png (81.8 KB, 30 views)

Last edited by ExtRas; October 9, 2022 at 04:25.
ExtRas is offline   Reply With Quote

Old   October 10, 2022, 06:18
Default
  #8
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
The one from Salome are not correct.

Use the surfaceInertia tool to determine the stuff. My Tutorials are wrong in that sense.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   October 11, 2022, 10:13
Default
  #9
New Member
 
okay to be anonymous
Join Date: Dec 2012
Location: France
Posts: 4
Rep Power: 13
ExtRas is on a distinguished road
Hello,

I think I found the solution.
In fact, the problem was the mesh.

I changed 2 parameters :
1 - (Maybe) the AMI was too close to the solid body
2 - the bottom of the rotor was coincident to the AMI.

Now the AMI is far from the rotor.

If I understand well, even if a want to connect a stator to the rotor (a fixed body connected to a rotating body), it is better to include it inside the rotating zone and to have an AMI far enough to the geometry. (?)

*************************************************
************** EDIT: ****************************

After some tests, I can answer by myself :

If there are non-rotating bodies or parts of non-rotating bodies inside the rotating zone delimitated by the AMI, they have to correspond to a specific patch (or several specific patches).
The non-rotating patches inside the rotating zone have to be set to "noslip" in U BC, and "calculated" in pointDisplacement BC. Tobias's Kaplan turbine tutorial is a good example (see patches "staticWall" and "staticMovingWall").

I am sorry if it was obvious for the most of us but It was not for me as I do not work so much with AMIs.

**********************************************

Best regards

Marc

Last edited by ExtRas; October 12, 2022 at 04:51.
ExtRas is offline   Reply With Quote

Old   October 12, 2022, 03:09
Default
  #10
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
The AMI cannot be too close. It is a matter of the parameters you specify in the dynamicMeshDict.

To your statement. No. A stator is static and is not inside the AMI. Everything inside the AMI is rotating and a stator is not rotating.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   October 12, 2022, 05:53
Default
  #11
New Member
 
okay to be anonymous
Join Date: Dec 2012
Location: France
Posts: 4
Rep Power: 13
ExtRas is on a distinguished road
Ok.

That explains why it never works when I add the stator.

I have to look further into your Kaplan tutorial to understand how works the AMI.

In the picture enclosed to this post (it is part of the Kaplan tutorial geometry), the AMI is in blue, and the pink patches inside the AMI looks like non-rotating parts of a real Kaplan turbine.

What physically happens inside this simulation ? (For now I am not able to make it run, I should install an older version of OF)


The fluid passes through the rotor and makes the whole AMI turns. (?)

1 -- Does the fluid at the wall on the pink patches turn with the AMI
or
2 -- is it static like the rest of the walls of the kaplan turbine in red ?

The hypothesis 2 would explain, in U BC, the differences between "movingWallVelocity" for the rotor and "noslip" for the rest of the walls.
Attached Images
File Type: jpg kaplanAMI.JPG (150.8 KB, 26 views)
ExtRas is offline   Reply With Quote

Old   February 13, 2023, 02:37
Default
  #12
New Member
 
Join Date: May 2013
Posts: 2
Rep Power: 0
vin_of is on a distinguished road
Quote:
Originally Posted by Tobi View Post
Dear Community,

I am happy to announce a new tutorial that combines the AMI boundary condition and 6DOF library in order to build a flow induced rotation of a vertical axis wind turbine also named VAWT. The case is published on my website. Enjoy.

Case: https://holzmann-cfd.com/community/training-cases/vertical-axial-wind-turbine

Video: https://www.youtube.com/watch?v=N0MN79bpl58




PS: Did you realize the fluctuations of the passive scalar? Can you explain it?
Dear Tobias,

Thanks for your great tutorial case! This is very helpful to me. Here I have two questions:
1. Did the case considered the load torque exerted by electric generator, or just omitted it? The load torque by generator is generally described by k*omega (k is a constant, and omega is the rotational speed).
2. If the load torque is not included in this case, any method/procudure to add this term in the setup?

Many thanks in advance if you could provide any thoughts or suggestions!

Sincerely,
Vin
vin_of is offline   Reply With Quote

Old   December 30, 2023, 03:27
Default How to enable wall collusion in 6DOF
  #13
Member
 
JunaidAhmad's Avatar
 
Junaid Ahmad Khan
Join Date: Mar 2010
Location: Islamabad
Posts: 43
Rep Power: 16
JunaidAhmad is on a distinguished road
Dear Tobi
Thanks to your and foam community efforts I learn a lot of openfoam, salome.

Sir i am trying to incorporate wall collusion in this freefall simulation and want this cube collide with wall and change its direction accordingly. I want a finite patch to act as constraint. In plane constraint of 6DOF it use an infinite plane but i want a finite plan.
Kindly point me in right direction.
Regards,
Junaid

Attached Images
File Type: jpg freeFall.0011.jpg (40.6 KB, 48 views)
JunaidAhmad 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
[snappyHexMesh] combining AMI and 6dof rigid bidy motion mo_na OpenFOAM Meshing & Mesh Conversion 0 July 25, 2016 09:24


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