CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Rigid Body Mesh Motion + 6DoF (http://www.cfd-online.com/Forums/openfoam-solving/129834-rigid-body-mesh-motion-6dof.html)

 minger February 13, 2014 22:24

Rigid Body Mesh Motion + 6DoF

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:

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.

 minger February 18, 2014 23:12

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?

 minger February 20, 2014 21:26

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 March 1, 2014 17:55

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.

 cyril.trp March 14, 2014 04:33

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

 minger April 1, 2014 23:22

3 Attachment(s)
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)
Attachment 29772
Attachment 29773
Attachment 29774

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

 Mojtaba.a April 9, 2014 16:12

Quote:
 Originally Posted by minger (Post 483355) 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.

 minger April 9, 2014 21:30

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!

 Mojtaba.a April 10, 2014 06:17

Quote:
 Originally Posted by minger (Post 485075) 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:

http://www.cfd-online.com/Forums/ope...free-body.html

Beside the problem I have mentioned above, I have some serious problem in converging the solution.

 Maimouna June 5, 2014 11:09

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?

 mali October 20, 2014 21:48

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-

 Maimouna October 21, 2014 05:48

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

 mali October 21, 2014 06:12

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;
}

}

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

 Maimouna October 21, 2014 08:48

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?

Maimouna

 cfd.eng February 18, 2015 11:41

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?