CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Setting cyclicAMI and cyclic Boundary conditions (ICEM Mesh to OpenFoam) (https://www.cfd-online.com/Forums/openfoam-pre-processing/185913-setting-cyclicami-cyclic-boundary-conditions-icem-mesh-openfoam.html)

bowen1024 April 5, 2017 11:23

Setting cyclicAMI and cyclic Boundary conditions (ICEM Mesh to OpenFoam)
 
I want to simulate turbine rotating in a circular channel. Due to symmetry, the mesh only contain 1/3 of the domain(120 degree wedge). I want to use simpleFoam and MRF. I've made two cellzones jointed by cyclicAMI BCs. I also want to apply cyclic BCs to side faces of both inner and outter domain.

However, I also get errors either due to cyclicAMI or cyclic BCs. My way of setting BCs is:

1. I used fluent3DMeshToFoam (also tried fluentMeshToFoam) to convert Mesh from ICEM to OpenFoam format.

2. I manually change the boundary conditions in constant/polyMesh folder to set cyclic and cyclicAMI BCs in certain faces.

This is okay for cyclicAMI BCs, but I got errors for faces of cyclic BCs like:

FOAM FATAL ERROR:
face 741 area does not match neighbour by 147.120008% -- possible face ordering problem.
patch:SYSINL my area:0.0041659859 neighbour area:0.0273467715 matching tolerance:0.0001
Mesh face:11758713 fc:(4.90992063 8.62353997 4.97880336)
Neighbour fc:(4.91516942 -3.48005447 2.00921046)

I've checked my Mesh carefully and the nodes on cyclic BCs faces are symmetric.

3. Due to suggestions from the forum, I used createPatch -overwrite to create cyclic BCs, which could help to reorder faces. But boundary file in constant/polyMesh keeps unchanged so I then manually changed the boundary file in constant/polyMesh. (I also tried use createPatch to create BOTH cyclicAMI and cyclic/use createPatch to create all BCs).

By doing this, there e is no problem with cyclic BCs. However, errors for cyclicAMI showed, such as:

AMI: Creating addressing and weights between 27000 source faces and 3103 target faces
--> FOAM Warning :
From function AMIMethod<SourcePatch, TargetPatch>::checkPatches()
in file lnInclude/AMIMethod.C at line 57
Source and target patch bounding boxes are not similar
source box span : (8.50000286 2.59809914 1.49999989)
target box span : (2.25992262 1.03910747 0.727020719)
source box : (-3.5 -1.29906085 0) (5.00000286 1.29903829 1.49999989)
target box : (-2 0.259930804 0.750000076) (0.25992262 1.29903828 1.4770208)
inflated target box : (-2.12957193 0.130358877 0.620428149) (0.389494547 1.42861021 1.60659272)

--> FOAM FATAL ERROR:
Unable to set source and target faces

Could anyone provide a idea of how to set these boundary conditions?


Thanks in advance

bowen1024 April 18, 2017 12:33

I've solved this problem!

The steps are okay but we cannot change the order of boundaries in constant/polymesh/boundary file. Just change the type!

drinkWater July 17, 2017 09:02

1 Attachment(s)
Hi bowen1024

I have the same problem like yours, I have created two cellzones too through ICEM. boundary like yours I choiced cyclicAMI BCs. I selected pisoFoam solver, but there were some errors showed at the below jpg image.
Now, could i send my case file to you and help me find out the reason which why it doesnt run. and my email:917443727@qq.com. And I would appreciate you. otherwise, it must be the best of you send your boundary file to me.

In the end, I wonder if only manually change the 'boundary' file which in the consant/polyMesh/ folder after the command of 'fluentMeshToFoam'.


best wishes

Y. E. William March 1, 2018 10:22

Dear bowen,
I am happy that you could solve your problem. I have the same one. If possible, I need to understand what do you mean with your last line?

Thanks in advance,

William

bowen1024 March 1, 2018 20:28

Hello William,

The proper order would be:

1. "fluent3DMeshToFoam" to convet fluent mesh to openfoam format.

2. add a createPatchDict file in the system folder (perhaps you have to find a template for it) and then use "createPatch -overwrite".
In the createPatchDict file, you may only have to write patches for cyclic BCs. However, this step would not change anything in the "constant/boundary" file.

3. You may then have to manually change the boundary settings in "constant/boundary" file.
When I converted the fluent mesh to openfoam, the default type of the BCs were "wall". I changed certain BCs to cyclic or cyclicAMI.

The last line means that: for example, you have:


sidefaceL
{
type wall;
nFaces xxx;
.....
}

inlet
{
type patch;
nFaces xxx;
.....
}

sidefaceR
{
type wall;
nFaces xxx;
.....
}

you can only change the type e.g. from wall to cyclic

Do NOT try to rearrange the order of the boundaries in the boundary file, for example:

inlet
{
type patch;
nFaces xxx;
.....
}

sidefaceL
{
type cyclic;
nFaces xxx;
.....
}

sidefaceR
{
type cyclic;
nFaces xxx;
.....
}

4. Finally, use "checkMesh" to ensure all the settings are correct!

Best wishes,

Bowen


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