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

Rigid Body Mesh Motion + 6DoF

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree10Likes
  • 5 Post By minger
  • 5 Post By minger

Reply
 
LinkBack Thread Tools Display Modes
Old   February 13, 2014, 22:24
Default Rigid Body Mesh Motion + 6DoF
  #1
Member
 
Join Date: Apr 2009
Posts: 36
Rep Power: 8
minger is on a distinguished road
I've been reading through tutorials and web pages for a couple weeks now and can't figure out how to get this working. It seems that all the tutorials with DoF (e.g. wingMotion [flutter]) are made for small displacements and use the laplacianDisplacement solvers.

Basically, I am looking to do something like:
http://www.youtube.com/watch?v=jZwUA_xnces


I have seen many many tutorials and examples where the domain motion is a specified rotational velocity, but I'd really like it solved for (with moment of inertia, etc).

Preferably in 2.2.x, but at this point I'd be willing to install whatever necessary. If anyone can point me in the right direction (or hell, provide a gzipped case ) of that case I'd be super grateful.
micpage18, Tobi, SailorLiu and 2 others like this.
minger is offline   Reply With Quote

Old   February 18, 2014, 23:12
Default
  #2
Member
 
Join Date: Apr 2009
Posts: 36
Rep Power: 8
minger is on a distinguished road
I've been working off of the mixerVesselAMI2D and wingMotion case. Basically, I'm trying to mix the multi-domain AMI capability of the mixerVessel case with the 6DoF solver from the wingMotion (flutter) case. So, my goal is to change the mixerVessel change from a specified rotor motion to a 6DoF solver (I will find a way to test with initial conditions or through an initial condition)

So, I've changed the dynamicMeshDict
Code:
dynamicFvMesh      dynamicMotionSolverFvMesh;

motionSolverLibs ("libfvMotionSolvers.so");

solver            displacementLaplacian;

displacementLaplacianCoeffs
{
    cellZone        rotor;
    diffusivity       inverseDistance (rotor);
}
In the mixer tutorial, this is where the cellZone rotation is specified. I've changed it to the dynamicFvMesh solver from the airfoil case.

So, I then copied over the pointDisplacement from the Airfoil case and basically just changed the "center point" and removed the restraints (springs).

I'm currently struggling to rotate just the rotor cellZone. My current pointDisplacement file looks like:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.2                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       pointVectorField;
    location    "0.01";
    object      pointDisplacement;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 0 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{
    rotor
    {
        type            sixDoFRigidBodyDisplacement;
        mass            22.9;
        centreOfMass    (0 0 0);
        momentOfInertia (20 20 20);
        orientation
        (
            1 0 0
            0 1 0
            0 0 1
        );
        velocity        (0 0 0);
        acceleration    (0 0 0);
        angularMomentum (0 0 0.02);
        torque          (0 0 0);
        rhoName         rhoInf;
        rhoInf          1;
        g               (0 0 0);
        report          on;
        constraints
        {
            maxIterations   500;

            fixedLine1
            {
                sixDoFRigidBodyMotionConstraint fixedLine;
                tolerance        1e-9;
                relaxationFactor 0.7;
                fixedLineCoeffs
                {
                    refPoint      (0 0 0);
                    direction     (0 1 0);
                }
            }

            fixedAxis1
            {
                sixDoFRigidBodyMotionConstraint fixedAxis;
                tolerance       1e-06;
                relaxationFactor 0.7;
                fixedAxisCoeffs
                {
                    axis            ( 0 0 1 );
                }
            }
        }

        value           uniform (0 0 0); // think this is a dummy value
    }

    front
    {
        type            empty;
    }

    back
    {
        type            empty;
    }

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

    AMI2
    {
    type        zeroGradient;
        //type            cyclicAMI;
        //value           uniform (0 0 0); // think this is a dummy value
    }

    AMI1
    {
        //type            cyclicAMI;
    type        fixedValue;
        value           uniform (0 0 0); // think this is a dummy value
    }
}


// ************************************************************************* //
So I thought I was being clever by defining one side of the AMI as zeroGradient and then the other as simply fixed 0. However, the displacement is still "bleeding" across the AMI.

Any suggestions?

Last edited by minger; February 18, 2014 at 23:17. Reason: i have it ... semi-working
minger is offline   Reply With Quote

Old   February 20, 2014, 21:26
Default
  #3
Member
 
Join Date: Apr 2009
Posts: 36
Rep Power: 8
minger is on a distinguished road
So I was able to fix my problem with the outside rotating. You need to create a pointZoneSet (I used the setSet utility to do it interactively rather than topoSet). Then you simply specify a "frozenPointZone"

However, the issue now is that the AMI is "breaking apart". The fvMeshSolver is still solving the displacement at each point as a function of the closest rotor point.

I feel that I'm going about this the wrong way. Can I simply specify the entire rotor cellZoneSet in the pointDisplacement library? or something like that ...
minger is offline   Reply With Quote

Old   March 1, 2014, 17:55
Default
  #4
Member
 
Join Date: Apr 2009
Posts: 36
Rep Power: 8
minger is on a distinguished road
Goodness, it appears 1 day after I posted my original message they released OF 2.3 which allows solid body motion. (face palm) See below from release notes:
Code:
dynamicFvMesh       dynamicMotionSolverFvMesh; 
motionSolverLibs    ("libsixDoFRigidBodyMotion.so"); 
solver              sixDoFRigidBodyMotion; 

sixDoFRigidBodyMotionCoeffs 
{ 
    patches         (hull); 
    innerDistance   0.3;   // Extent of the solid-body motion region around body 
    outerDistance   1;     // Extent of mesh-morphing region around body 

    centreOfMass    (2.929541 0 0.2); 
    mass            412.73; 
    momentOfInertia (40 921 921); 
    rhoInf          1; 
    report          on; 
    accelerationRelaxation 0.3; 
    value           uniform (0 0 0); 

    constraints 
    { 
...
I will install 2.3 and see if I can get this thing working.
minger is offline   Reply With Quote

Old   March 14, 2014, 04:33
Default
  #5
New Member
 
Cyril
Join Date: Mar 2014
Posts: 5
Rep Power: 3
cyril.trp is on a distinguished road
Hello minger,

can you tell us if you finally managed to move your mixer with the solid body motion? I am also interesting in the rotating motion without the AMI method.

Regards Cyril
cyril.trp is offline   Reply With Quote

Old   April 1, 2014, 23:22
Default
  #6
Member
 
Join Date: Apr 2009
Posts: 36
Rep Power: 8
minger is on a distinguished road
OK, so I may have something working. Cyril, to address something you said, there is still AMI interfaces. We still need to communicate between the rotating and stationary zones, and the AMI handles that.

The main difference is that they rolled in a few dynamicFvMesh solver which allows the rigidbodymotion. Here is an image 0.3 s into my simulation which appears to be chugging along (mesh displacement shown first, and velocity shown second)
mesh_displacement.jpg
rigid_test_U.jpg
rigid_test_U_2.jpg

Here are the highlights for getting it working
  • pointDisplacement point vector field. I set all my outer walls to fixed 0, the symmetry plane and the moving rotor to calculated. I fixed the stationary side of the interface to 0 and the rotating side to calculated.
  • dynamicMeshDict is where everything happens. You set sixDoFRigidBodyMotionC as the solver, and then set your coefficients just like you normally would (presumably, I don't think I have) if you were defining it in pointDisplacement.
    • I set the rotor as the patch
    • I had to use LARGE distances. It seems like it interpolates all points to the nearest point in the patch listing. So, I was still getting the mesh to come apart at the interface when I had realistic values set (I was using 2 for inner and 2.1 for outer. I am now using 1e5 for inner and 1.1e5 for outer
  • You do not need the fvOptions set (not sure why I was playing with it)
  • I am not using the frozenPointsZone in the 6DoFCoeffs dictionary. I have it in my mesh ... but am not using it and it seems to be working. So how the solver know? I'm guessing that it knows that my patch "rotor" is inside of a certain cell zone, so it's only deforming that. But that is purely speculative and perhaps this success message is premature (although if I show only the stationary cellZone the displacement is zero everywhere)
I have uploaded my current case if anyone wants to play. There is likely a lot of garbage in there, so I apologize in advance

https://drive.google.com/file/d/0B2c...it?usp=sharing
Tobi, hua1015, SailorLiu and 2 others like this.
minger is offline   Reply With Quote

Old   April 9, 2014, 16:12
Default
  #7
Senior Member
 
Mojtaba.a's Avatar
 
Mojtaba Amiraslanpour
Join Date: Jun 2011
Location: Zanjan, Iran
Posts: 233
Rep Power: 7
Mojtaba.a is on a distinguished road
Send a message via Yahoo to Mojtaba.a
Quote:
Originally Posted by minger View Post
OK, so I may have something working. Cyril, to address something you said, there is still AMI interfaces. We still need to communicate between the rotating and stationary zones, and the AMI handles that.
Hi minger,

Thank you very much for you detailed information about your case and your sharing. It was all wonderful.

I want to ask you one more favor. If it is possible please tell me about the commands you have ran step by step to achieve this.

Thank you,
Mojtaba.
__________________
Complex Heat & Flow Simulation Research Group
If you can't explain it simply, you don't understand it well enough. "Richard Feynman"
Mojtaba.a is offline   Reply With Quote

Old   April 9, 2014, 21:30
Default
  #8
Member
 
Join Date: Apr 2009
Posts: 36
Rep Power: 8
minger is on a distinguished road
I mean, there weren't any specific commands. I meshed the geometry in ICEM, so needed to run fluent3DMeshToFoam to convert the .msh file into an OpenFOAM polymesh. After that, I'm simply running pimplyDyMFoam. The case set up does all the work. If you download the case and simply run that solver, it should iterate!
minger is offline   Reply With Quote

Old   April 10, 2014, 06:17
Default
  #9
Senior Member
 
Mojtaba.a's Avatar
 
Mojtaba Amiraslanpour
Join Date: Jun 2011
Location: Zanjan, Iran
Posts: 233
Rep Power: 7
Mojtaba.a is on a distinguished road
Send a message via Yahoo to Mojtaba.a
Quote:
Originally Posted by minger View Post
I mean, there weren't any specific commands. I meshed the geometry in ICEM, so needed to run fluent3DMeshToFoam to convert the .msh file into an OpenFOAM polymesh. After that, I'm simply running pimplyDyMFoam. The case set up does all the work. If you download the case and simply run that solver, it should iterate!
Thank you minger,
Yea that's right. Can you please have a look at this thread:

Pivoting around a fixed point : 1-DOF free body

Beside the problem I have mentioned above, I have some serious problem in converging the solution.
__________________
Complex Heat & Flow Simulation Research Group
If you can't explain it simply, you don't understand it well enough. "Richard Feynman"
Mojtaba.a is offline   Reply With Quote

Old   June 5, 2014, 11:09
Default
  #10
Senior Member
 
ok
Join Date: Oct 2013
Posts: 256
Rep Power: 4
Maimouna is on a distinguished road
Dear minger,

many thanks for all that valuable information. Could I apply what you posted for vortex induced vibration for circular cylinder? Is it helpful for my cylinder case?
Maimouna is offline   Reply With Quote

Old   October 20, 2014, 21:48
Default
  #11
New Member
 
Join Date: Mar 2009
Location: adelaide, SA, Australia
Posts: 27
Rep Power: 8
mali is on a distinguished road
Dear Maimouna,

I think for VIV of a flow past a circular cylinder is more simple. First, define the moving patch (i.e., circular) at the dynamicMeshDict and at pointDisplacement defines the moving patch as 'calculated' type boundary condition. But Minger may have better suggestion.

Cheers
-mali-
__________________
mali
mali is offline   Reply With Quote

Old   October 21, 2014, 05:48
Default
  #12
Senior Member
 
ok
Join Date: Oct 2013
Posts: 256
Rep Power: 4
Maimouna is on a distinguished road
Dear Mali'

many thanks for you post. I'm applying VIV in OF-2.2.2, so if you could please check dynamicMeshDict file and pointDisplacement file, it would be really grateful. In my case, dynamicMeshDict and pointDisplacement files are below respectively

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

dynamicFvMesh dynamicMotionSolverFvMesh;

motionSolverLibs ("libfvMotionSolvers.so");

solver displacementLaplacian;

displacementLaplacianCoeffs
{
diffusivity inverseDistance (cylinder);
}

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

dimensions [0 1 0 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
cylinder
{
type sixDoFRigidBodyDisplacement;

centreOfMass (4 0 0.5);
momentOfInertia (1.4539 1.4539 1.24625);
mass 9.97;
orientation
(
1 0 0
0 1 0
0 0 1
);

velocity (0 0 0);
acceleration (0 0 0);
angularMomentum (0 0 0);
torque (0 0 0);
gravity (0 -9.81 0);
rhoName rhoInf;
rhoInf 1;
report on;


constraints
{
maxIterations 500;

/*
noRotate1
{
sixDoFRigidBodyMotionConstraint fixedAxis;
axis (0 0 1);
}

noRotate2
{
sixDoFRigidBodyMotionConstraint fixedAxis;
axis (1 0 0);
}

noRotate3
{
sixDoFRigidBodyMotionConstraint fixedAxis;
axis (0 1 0);
}
*/


fixedLine1
{
sixDoFRigidBodyMotionConstraint fixedLine;
tolerance 1e-9;
relaxationFactor 0.7;
fixedLineCoeffs
{
refPoint (4 0 0.5);
direction (0 1 0);
}
}

/*fixedLine2
{
sixDoFRigidBodyMotionConstraint fixedLine;
tolerance 1e-6;
relaxationFactor 1.0;
fixedLineCoeffs
{
refPoint (4 0 0.5);
direction (1 0 0);
}
}*/

}

restraints
{
verticalSpring
{
sixDoFRigidBodyMotionRestraint linearSpring;

linearSpringCoeffs
{
anchor (4 0 0.5);
refAttachmentPt (4 0 0.5);
stiffness 4;
damping 2;
restLength 1;
}
}

horizontalSpring
{
sixDoFRigidBodyMotionRestraint linearSpring;

linearSpringCoeffs
{
anchor (4 0 0.5);
refAttachmentPt (4 0 0.5);
stiffness 4;
damping 2;
restLength 1;
}
}
}

value uniform (0 0 0);
}

top
{
type empty;
}

bottom
{
type empty;
}

".*"
{
type fixedValue;
value uniform (0 0 0);
}
}


// ************************************************** *********************** //
With million of thanks.

Maimouna
Maimouna is offline   Reply With Quote

Old   October 21, 2014, 06:12
Default
  #13
New Member
 
Join Date: Mar 2009
Location: adelaide, SA, Australia
Posts: 27
Rep Power: 8
mali is on a distinguished road
Dear Maimouna,

I don't have the chance to try the file that you posted yet. But, below is the file that I'm using to simulate the VIV problem. I'm also using OpenFOAM 2.2.

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 1 0 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
square
{
type sixDoFRigidBodyDisplacement;
mass 584.6;
centreOfMass (0 0 0.5);
momentOfInertia (97.7 97.7 97.7);
orientation //22.5degree
(
1 0 0
0 1 0
0 0 1
);
velocity (0 0 0);
acceleration (0 0 0);
angularMomentum (0 0 0);
torque (0 0 0);
rhoName rhoInf;
rhoInf 1;
g (0 0 0);
report on;
constraints
{
maxIterations 500;

fixedLine1
{
sixDoFRigidBodyMotionConstraint fixedLine;
tolerance 1e-9;
relaxationFactor 0.1;
fixedLineCoeffs
{
refPoint (0 0 0);
direction (0 1 0);
}
}

fixedAxis1
{
sixDoFRigidBodyMotionConstraint fixedAxis;
tolerance 1e-06;
relaxationFactor 0.7;
fixedAxisCoeffs
{
axis ( 0 0 1);
}
}
}
restraints
{
verticalSpring
{
sixDoFRigidBodyMotionRestraint linearSpring;

linearSpringCoeffs
{
anchor (0 0 0.5);
refAttachmentPt (0 0 0.5);
stiffness 23079.1;
damping 34.89;
restLength 0;
}
}
axialSpring
{
sixDoFRigidBodyMotionRestraint linearAxialAngularSpring;

linearAxialAngularSpringCoeffs
{
axis (0 0 1);
stiffness 100000;
damping 100;
referenceOrientation $orientation;
}
}
}
value uniform (0 0 0);
}

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

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

front
{
type empty;
}
back
{
type empty;
}


}


// ************************************************** *********************** //
__________________
mali
mali is offline   Reply With Quote

Old   October 21, 2014, 08:48
Default
  #14
Senior Member
 
ok
Join Date: Oct 2013
Posts: 256
Rep Power: 4
Maimouna is on a distinguished road
Dear Mali,

many thanks for your previous post. When I applied what you posted in my case, I couldn't figure out any motion on the cylinder. Why? Could you figure out any motion in your case?

Many thanks in advanced.

Maimouna
Maimouna is offline   Reply With Quote

Old   February 18, 2015, 11:41
Default
  #15
New Member
 
Join Date: Feb 2015
Posts: 2
Rep Power: 0
cfd.eng is on a distinguished road
Dear Minger,

I'm working with a system like your test case: a rotating device in water.
I have a problem. If I try to define a torque at the shaft of the device, It seems that the value imposed is only an initial condition value. If I extract a report of moment applied to the device the torque imposed don't have effect.
Do you have tested a similar case with a constant resistance to the motion?

Many thanks in advanced.
cfd.eng is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Update of the variables after dynamic mesh motion. gtg258f OpenFOAM Programming & Development 9 January 18, 2014 11:08
new workstation for running 5 Million size mesh on CFX with rigid body solver aks Hardware 5 August 20, 2013 07:12
Rigid body motion + Boundary Layer Manoj Kumar FLUENT 4 May 26, 2012 10:34
Fixed mesh method for rigid body motion philippose OpenFOAM 1 January 12, 2009 05:57
Dynamic Mesh : rigid body +deforming boundary amcfd FLUENT 1 September 4, 2007 07:01


All times are GMT -4. The time now is 15:18.