CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   simpleFoam+MRF vs pipleFoam+dynamicMesh (https://www.cfd-online.com/Forums/openfoam-solving/232803-simplefoam-mrf-vs-piplefoam-dynamicmesh.html)

WhiteW December 31, 2020 06:05

simpleFoam+MRF vs pipleFoam+dynamicMesh
 
2 Attachment(s)
Dear all,
I have a question regarding the difference between the two approaches, MRF and dynamic mesh.
I’m referring to the propeller tutorial:
Code:

/foam/tutorials/incompressible/pimpleFoam/RAS/propeller
First of all, I run the Allrun.pre and the mesh is generated and prepared.
However I modified the topoSet dictionary to split the patch of rotating zone into inlet outlet and cylinder.

Then I tried to evaluate the Thrust of the propeller using the two approaches:
1) pimpleFoam +dynamicMeshDict: this is an unsteady analysis that imposes the rotation of the innerCylinderSmall cellZone using the dynamicMeshDict file.
The solver is pimpleFoam and I used the same setting of the tutorial case.
After 0.3s of physical time the Thrust (y direction) is 369.55N
Residuals are 6E-3 for pressure and 1E-3 for velocities.

2) simpleFoam + MRFProperties: a steady analyses. I added the MRFProperties dictionary in place of the dynamicMeshDict. Same rotational velocity, same rotation axis.
I modified the fvSolution and fvSchemes accordingly with the simpleFoam solver.
After 4000 iterations the Thrust (y direction) is 940.27N.
Residuals are 6E-4 for pressure and 6E-5 for velocities.

Both the analysis seems to converge (to a stable integral value of Thrust); however the results are very different. Where am I wrong?
Also the streamlines are different: in pimpleFoam+dynamicMesh the U field represents the absolute velocity, however what is the U field of the MRF zone in the simpleFoam case? These streamlines don’t seem neither the absolute or relative velocities..
Attached is the postprocessing in Paraview, you can notice how both the pressure field and the streamlines are different.

Thanks,
WhiteW

WhiteW December 31, 2020 13:22

2 Attachment(s)
The error seems related to cyclicAMI patches when using MRF.

I run an analysis with simpleFoam without MRF untill it converges (first pictures) then I added the MRFProperties file to constant folder with a low rotational velocity. And the results after 10 iterates in on the second picture.
The pressure field completely changes in 10 iterates, even if the rotational velocity of MRF is 0.001 rad/s...
How is it possible?

Here is my MRFProperties:


Code:

MRF1
{
    cellZone    innerCylinderSmall;
    active      yes;

    // Fixed patches (by default they 'move' with the MRF zone)
    nonRotatingPatches ();

    origin    (0 0 0);
    axis      (0 1 0);
    omega    0.001;    // [rad/s]
}


And this is the boundary file:

Code:

13
(
    outerCylinder
    {
        type            wall;
        inGroups        1(wall);
        nFaces          640;
        startFace      1578336;
    }
    propellerTip
    {
        type            wall;
        inGroups        1(wall);
        nFaces          21811;
        startFace      1578976;
    }
    propellerStem1
    {
        type            wall;
        inGroups        1(wall);
        nFaces          192;
        startFace      1600787;
    }
    propellerStem2
    {
        type            wall;
        inGroups        1(wall);
        nFaces          576;
        startFace      1600979;
    }
    propellerStem3
    {
        type            wall;
        inGroups        1(wall);
        nFaces          1536;
        startFace      1601555;
    }
    inlet
    {
        type            patch;
        nFaces          652;
        startFace      1603091;
    }
    outlet
    {
        type            patch;
        nFaces          112;
        startFace      1603743;
    }
    AMI1
    {
        type            cyclicAMI;
        inGroups        1(cyclicAMI);
        nFaces          9504;
        startFace      1603855;
        matchTolerance  0.0001;
        transform      noOrdering;
        neighbourPatch  AMI2;
        method          faceAreaWeightAMI;
    }
    AMI2
    {
        type            cyclicAMI;
        inGroups        1(cyclicAMI);
        nFaces          9680;
        startFace      1613359;
        matchTolerance  0.0001;
        transform      noOrdering;
        neighbourPatch  AMI1;
        method          faceAreaWeightAMI;
    }
    AMI1in
    {
        type            cyclicAMI;
        inGroups        1(cyclicAMI);
        nFaces          4388;
        startFace      1623039;
        matchTolerance  0.0001;
        transform      noOrdering;
        neighbourPatch  AMI2in;
        method          faceAreaWeightAMI;
    }
    AMI2in
    {
        type            cyclicAMI;
        inGroups        1(cyclicAMI);
        nFaces          4412;
        startFace      1627427;
        matchTolerance  0.0001;
        transform      noOrdering;
        neighbourPatch  AMI1in;
        method          faceAreaWeightAMI;
    }
    AMI1out
    {
        type            cyclicAMI;
        inGroups        1(cyclicAMI);
        nFaces          4604;
        startFace      1631839;
        matchTolerance  0.0001;
        transform      noOrdering;
        neighbourPatch  AMI2out;
        method          faceAreaWeightAMI;
    }
    AMI2out
    {
        type            cyclicAMI;
        inGroups        1(cyclicAMI);
        nFaces          4628;
        startFace      1636443;
        matchTolerance  0.0001;
        transform      noOrdering;
        neighbourPatch  AMI1out;
        method          faceAreaWeightAMI;
    }
)

Thanks,

WhiteW

gabrielfelix May 3, 2021 09:32

I'm trying to do the same. I I have ran the propeller case and now I'm trying to run it with simpleFoam. Have you managed to run it correctly?

Fauster May 6, 2021 03:51

Hello,


If I am right in your simpleFoam + MRF setup you have to tell to OpenFOAM that your cyclic patch are non rotating.


so :


Quote:

nonRotatingPatches (AMI1 AMI2);

Best regards

gabrielfelix May 11, 2021 10:14

In which file do I have to set this command?

Quote:

nonRotatingPatches (AMI1 AMI2);
EDITED: I found the place to set it in the MRFPRoperties file. It worked! Now the suction region is on the correct side of the prop and the pressure scale is very similar to the transient results from pimpleFoam in the original tutorial.


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