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

cyclic boundary condition from ansys mesh (3d)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 16, 2024, 23:34
Unhappy cyclic boundary condition from ansys mesh (3d)
  #1
New Member
 
Zhicheng Kai
Join Date: Oct 2024
Posts: 8
Rep Power: 2
dandanTT is on a distinguished road
Hi Foamers,

Have anyone used ansys generated mesh with fluentMeshToFoam as openFoam mesh input? I have tried updating the boundary in polyMesh folder to cyclic or cyclicAMI, but neither works.

My geometry is an extruded shape and the mesh needs to be unstructured. The two faces in the extrusion direction should be periodic and I'm sure their geometry can match up.

Thank you all for helping!
dandanTT is offline   Reply With Quote

Old   November 17, 2024, 04:52
Default
  #2
Senior Member
 
Join Date: Oct 2017
Posts: 133
Rep Power: 9
Krapf is on a distinguished road
Yes, I have done that many times.
What exactly did your polyMesh/boundary file look like after you changed it? What does “neither works” mean? Are you getting an error message? You need to provide more information so that we can help you.
Krapf is offline   Reply With Quote

Old   November 17, 2024, 06:56
Default
  #3
New Member
 
Zhicheng Kai
Join Date: Oct 2024
Posts: 8
Rep Power: 2
dandanTT is on a distinguished road
Thank you so much for the reply!

The original boundary file looks like this:
Code:
FoamFile
{

10
(
    wall
    {
        type            wall;
        inGroups        1(wall);
        nFaces          21644;
        startFace       4767360;
    }
    inlet_1
    {
        type            patch;
        nFaces          420;
        startFace       4789004;
    }
    outlet
    {
        type            patch;
        nFaces          5516;
        startFace       4789424;
    }
    top
    {
        type            patch;
        nFaces          7952;
        startFace       4794940;
    }

    cyclic_front
    {
        type            patch;
        nFaces          57684;
        startFace       4808184;
    }
    cyclic_back
    {
        type            patch;
        nFaces          57684;
        startFace       4865868;
    }
)

// ************************************************************************* //
The first thing I tried is to change the boundary of the cyclic_front and cyclic_back to:
Code:
    cyclic_front
    {
        type            cyclic;
        neighbourPatch  cyclic_back;
        nFaces          57684;
        startFace       4808184;
    }
    cyclic_back
    {
        type            cyclic;
        neighbourPatch  cyclic_front;
        nFaces          57684;
        startFace       4865868;
    }
The error I got, by running checkMesh, from this is:
Code:
face 0 area does not match neighbour by 143.32% -- possible face ordering problem.
patch:cyclic_front my area:3.59926e-07 neighbour area:2.18012e-06 matching tolerance:0.0001
Mesh face:4808184 fc:(0.152289 0.0103259 0.03)
Neighbour fc:(0.195758 0.0111483 0)
If you are certain your matching is correct you can increase the 'matchTolerance' setting in the patch dictionary in the boundary file.
Rerun with cyclic debug flag set for more information.
Then I add a createPatchDict as shown below to use cyclicAMI:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2012                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      createPatchDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
pointSync    false;

patches
(
    {
        //- Master side patch
        name            cyclic_front;
        patchInfo
        {
            type            cyclicAMI;
            matchTolerance  0.0001;
            neighbourPatch  cyclic_back;
            transform       translational;
        }
        constructFrom patches;
        patches (cyclic_front);
    }

    {
        //- Slave side patch
        name            cyclic_back;
        patchInfo
        {
            type            cyclicAMI;
            matchTolerance  0.0001;
            neighbourPatch  cyclic_front;
            transform       translational;
        }
        constructFrom patches;
        patches (cyclic_back);
    }
);


// patches (cyclic_front cyclic_back);
patchPairs
(
    frontAndBack
    {
          // List of existing patch names
        master      cyclic_front;
        slave       cyclic_back;
        type        cyclic;
        transform   translational;
    }
);
This modified the boundary file to
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2012                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       polyBoundaryMesh;
    location    "constant/polyMesh";
    object      boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

10
(
    wall
    {
        type            wall;
        inGroups        1(wall);
        nFaces          21644;
        startFace       4767360;
    }
    inlet_1
    {
        type            patch;
        nFaces          420;
        startFace       4789004;
    }
    outlet
    {
        type            patch;
        nFaces          5516;
        startFace       4789424;
    }
    top
    {
        type            patch;
        nFaces          7952;
        startFace       4794940;
    }

    }
    cyclic_front
    {
        type            cyclicAMI;
        inGroups        1(cyclicAMI);
        nFaces          57684;
        startFace       4808184;
        matchTolerance  0.0001;
        transform       unknown;
        neighbourPatch  cyclic_back;
        AMIMethod       faceAreaWeightAMI;
        restartUncoveredSourceFace 1;
    }
    cyclic_back
    {
        type            cyclicAMI;
        inGroups        1(cyclicAMI);
        nFaces          57684;
        startFace       4865868;
        matchTolerance  0.0001;
        transform       unknown;
        neighbourPatch  cyclic_front;
        AMIMethod       faceAreaWeightAMI;
        restartUncoveredSourceFace 1;
    }
)

// ************************************************************************* //
This passes checkMesh but when using $rhoCentralFoam$ or using $checkMesh -allTopology -allGeometry$ it fails with error:
Code:
Unable to set target face for source face 57683

    From virtual bool Foam::faceAreaWeightAMI::setNextFaces(Foam::label&, Foam::label&, Foam::label&, const Foam::bitSet&, Foam::labelList&, const Foam::DynamicList<int>&, bool) const
    in file AMIInterpolation/AMIInterpolation/faceAreaWeightAMI/faceAreaWeightAMI.C at line 347.

FOAM aborting
dandanTT is offline   Reply With Quote

Old   November 18, 2024, 08:34
Default
  #4
Senior Member
 
Join Date: Oct 2017
Posts: 133
Rep Power: 9
Krapf is on a distinguished road
Okay, I haven't had to work with cyclicAMI yet, because in my cases both surfaces were identical.
Someone reported here that “transform translational” helped: CyclicAMI: Unable to find initial target face. This does not appear in your boundary file, although you specify it in createPatchDict. What happens if you adjust the boundary file manually?
Krapf is offline   Reply With Quote

Old   November 18, 2024, 18:34
Default
  #5
New Member
 
Zhicheng Kai
Join Date: Oct 2024
Posts: 8
Rep Power: 2
dandanTT is on a distinguished road
I have tried the following update in the boundary file, but the same error was obtained.
Code:
cyclic_front
    {
        type            cyclicAMI;
        inGroups        1(cyclicAMI);
        nFaces          57684;
        startFace       4808184;
        matchTolerance  0.0001;
        transform       translational;
        neighbourPatch  cyclic_back;
        AMIMethod       faceAreaWeightAMI;
         separationVector (0.0 0.0 0.0);
        restartUncoveredSourceFace 1;
    }
    cyclic_back
    {
        type            cyclicAMI;
        inGroups        1(cyclicAMI);
        nFaces          57684;
        startFace       4865868;
        matchTolerance  0.0001;
        transform       translational;
        neighbourPatch  cyclic_front;
        AMIMethod       faceAreaWeightAMI;
        separationVector (0.0 0.0 -0.03);
        restartUncoveredSourceFace 1;
    }
dandanTT is offline   Reply With Quote

Old   November 19, 2024, 08:08
Default
  #6
Senior Member
 
Join Date: Oct 2017
Posts: 133
Rep Power: 9
Krapf is on a distinguished road
Then unfortunately I have no idea at the moment. Is it possible for you to upload the entire case?
Krapf is offline   Reply With Quote

Old   November 19, 2024, 09:29
Default
  #7
Senior Member
 
Join Date: Dec 2021
Posts: 251
Rep Power: 5
Alczem is on a distinguished road
Hey!


The separationVector should also be properly configured for the cyclic_front patch (it is set to (0 0 0) in the dictionary you posted). So in your case, it would be (0 0 0.03) I guess. If that does not work, try swapping the signs for the two vectors.


Maybe you could also try a different interpolation method:


https://www.openfoam.com/news/main-n...v2106/numerics
Alczem is offline   Reply With Quote

Reply

Tags
cyclic ami, cyclic bc, fluentmeshtofoam, openfoam


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
help!!problem in openfoam when i use icem mesh file with cyclic boundary condition heheda OpenFOAM Pre-Processing 0 December 3, 2020 23:06
Radiation in semi-transparent media with surface-to-surface model? mpeppels CFX 11 August 22, 2019 08:30
Wrong flow in ratating domain problem Sanyo CFX 17 August 15, 2015 07:20
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 18:44
Low Mixing time Problem Mavier CFX 5 April 29, 2013 01:00


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