CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Strange results using AMI. Meshing with Ansys. (https://www.cfd-online.com/Forums/openfoam-programming-development/243731-strange-results-using-ami-meshing-ansys.html)

anuargimenez July 3, 2022 16:58

Strange results using AMI. Meshing with Ansys.
 
Hello,

I am trying to use the Arbitrary Rotating AMI case to simulate a polymer flow through a single screw extruder, and I would really appreciate any help.

Previously, I have been able to successfully run the same case using the MRF approach, with good results.

The geometry is shown bellow:
Attachment 90568

The mesh was generated using ANSYS. Then, I used the topoSet utility to create the rotating and stationary cellZone, and also the faceZone needed to develop the AMI patches.
The topoSetDict file is shown bellow:
Code:

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

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

actions
(
    {
        name    rotif;
        type    cellSet;
        action  new;
        source  cylinderToCell;
        sourceInfo
        {
            p1          (0 0.004 0);
            p2          (0 0.043703 0);
            radius      0.00396;
        }
    }
    {
        name    outerCells;
        type    cellSet;
        action  new;
        source  cellToCell;
        sourceInfo
        {
            set rotif;
        }
    }
    {
        name    outerCells;
        type    cellSet;
        action  invert;
    }

    {
        name    rotif;
        type    cellZoneSet;
        action  new;
        source  setToCellZone;
        sourceInfo
        {
            set    rotif;
        }
    }



    {
        name    rotifFace;
        type    faceSet;
        action  new;
        source  cellToFace;
        sourceInfo
        {
            set    rotif;
            option  all;
        }
    }
    {
        name    rotifFace;
        type    faceSet;
        action  subset;
        source  cellToFace;
        sourceInfo
        {
            set    outerCells;
            option  all;
        }
    }
    {
        name    rotif;
        type    faceZoneSet;
        action  new;
        source  setsToFaceZone;
        sourceInfo
        {
            faceSet    rotifFace;
            cellSet    rotif;
        }
    }
);

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

Finally, with the createBaffles utility I defined the AMI patches as follows:
Code:

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

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

internalFacesOnly true;

baffles
{
    rotating
    {
        type        faceZone;
        zoneName    rotif;

        patches
        {
            master
            {
                name            AMI1;
                type            cyclicAMI;
                neighbourPatch  AMI2;
                transform      rotational;
                  rotationAxis    (0 1 0);
                      rotationCentre  (0 0 0); 
            }

            slave
            {
                name            AMI2;
                type            cyclicAMI;
                neighbourPatch  AMI1;
                transform      rotational;
                  rotationAxis    (0 1 0);
                      rotationCentre  (0 0 0);           
            }
        }
    }
}


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

This is the script I used to run the case:
Code:

#!/bin/sh
cd ${0%/*} || exit 1    # Run from this directory

# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions

application=$(getApplication)

runApplication fluentMeshToFoam AMI.msh

#Create cellZones and faceZones for rotating mesh. Develop new AMI BC´s
runApplication topoSet
runApplication createBaffles -overwrite
runApplication mergeOrSplitBaffles -split -overwrite

# Renumbering for speeding up simulation
runApplication renumberMesh -noFields -overwrite

decomposePar

pyFoamPlotRunner.py mpirun -np 6 rhoPimpleFoam -parallel
 
echo "Done!"

Here you can see the AMI patches:
Attachment 90570

and the velocity field obtained in the rotating cellZone:
Attachment 90569

As you can see, the velocity field seems wrong. In my MRF simulation the effect of the rotation due to the screw was very clear. With the AMI approach it seems that the highest velocity values are at the inlet, which is an unreal result.

I hope anyone could give me some advice or correct me if there is any error. I have little experience using AMI.

Kind Regards,
Anuar R. Giménez El Amrani

PositronCascade July 4, 2022 07:23

Have you tried recent Non-Conformal Coupling?

Source

anuargimenez July 4, 2022 16:53

Quote:

Originally Posted by PositronCascade (Post 830950)
Have you tried recent Non-Conformal Coupling?

Source

Thank you very much for you quick response. I didn't heard before about NCC.
However, I need to run it in the OpenFoam-7 version, so im afraid that I can not use it.
May I ask if anything about my AMI procedure or code looks strange to you?

Kind Regards,
Anuar


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