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

[Tutorials] Arbitrary Rotating AMI

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

Like Tree2Likes
  • 1 Post By Tobi
  • 1 Post By Tobi

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 1, 2018, 13:10
Default Arbitrary Rotating AMI
  #1
New Member
 
Paul
Join Date: Nov 2017
Posts: 15
Rep Power: 7
Paul Caicedo is on a distinguished road
Hello,

I am trying to understand the Arbitrary Rotating AMI case (https://holzmann-cfd.de/openfoam/ope...y-rotating-ami), and I would really appreciate any help to some questions about the tutorial.

1) If I run the case with ./run, everything is smooth, but could it be the same if I type each line in the terminal? I can't do in that way because when I type the first line cd ${0%/*} || exit 1, the location changes to /usr/bin, and I cannot type the next lines because I got errors of location.

2) I have opened AMI.stl and regionSTL.stl in Paraview, but I can't find any patch. Is it because I would need to open in a specific software?

3) Could I add heat transfer equations (radiation, convection) to pimpleDymFoam? Is it possible to use a method similar to the one found here (http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam).

Kind Regards,
Paul
Paul Caicedo is offline   Reply With Quote

Old   March 4, 2018, 11:44
Default
  #2
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,677
Blog Entries: 6
Rep Power: 49
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,

1. yes you can type everything in a terminal but the first command is not related to OpenFOAM stuff. Check google for the answer what that is doing.

2. regionSTL included region names. Patches are generated by snappyHexMesh. Read the user guide (there are so many references out nowadays; no need to explain it again and again)

3. Yes you can. The link you mentioned is just a passive scalar equation. The things you would like to use is a bit more work. Therefore, I would directly use a density based solver. By the way - convection / advection is always included.
Paul Caicedo likes this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   March 6, 2018, 18:20
Default
  #3
New Member
 
Paul
Join Date: Nov 2017
Posts: 15
Rep Power: 7
Paul Caicedo is on a distinguished road
Hi Tobias,
Thanks. Here are my understanding about your explanation.
1) It works differently when I run in the terminal because it goes to the root, but if I use in a document, it says only that I'll run from that directory.
2) I have opened as text file, and I can see that you have created the region names in the stl. file, then apply snappyHexMeshDict.
3) I'll check that in more detail.

Thanks again for your answer.
Paul
Paul Caicedo is offline   Reply With Quote

Old   March 7, 2018, 03:03
Default
  #4
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,677
Blog Entries: 6
Rep Power: 49
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
About the script. It is just Linux.
Paul Caicedo likes this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   July 3, 2022, 17:57
Unhappy Strange results using AMI. Meshing with Ansys.
  #5
New Member
 
Anuar Giménez
Join Date: Feb 2022
Location: Spain
Posts: 15
Rep Power: 2
anuargimenez is on a distinguished road
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:
geometría general.JPG

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:
ami.JPG

and the velocity field obtained in the rotating cellZone:
cellzone rotating.JPG

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
anuargimenez is offline   Reply With Quote

Reply

Tags
ami patches, pimpledymfoam, rotating mesh

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
mapField error rvl565 OpenFOAM Pre-Processing 1 September 6, 2018 17:13
Translating and Rotating AMI HiddenSquid OpenFOAM Pre-Processing 1 October 25, 2017 04:59
Car external aerodynamic with wheel spinning issue hokhay FloEFD, FloWorks & FloTHERM 2 August 18, 2016 05:23
[mesh manipulation] Combining two meshes for AMI of rotating turbine mahtin360 OpenFOAM Meshing & Mesh Conversion 0 October 2, 2014 04:06
mixerVesselAMI2D's mass is not balancing sharonyue OpenFOAM Running, Solving & CFD 6 June 10, 2013 10:34


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