|
[Sponsors] |
July 18, 2017, 12:46 |
Getting started with CyclicAMI
|
#1 | |
New Member
Tom
Join Date: May 2017
Posts: 9
Rep Power: 9 |
Hello all,
I'm trying to model the flow interaction between two connected channels, and I've set up the following geometry for the left channel with blockMesh: Where the light blue area represents a coarse mesh, and the darker blue a fine mesh. I'd like to use cyclicAMI to connect the rough and fine areas of the mesh, as it seems impossible to merge the mesh and cyclicAMI is the next best thing. Unfortunatly, I'm quite a novice at using OpenFOAM and I've been unable to find a good example of cyclicAMI being used with blockMesh. This is my blockMeshDict file: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 4.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // convertToMeters 0.1; vertices ( //left rough 'c' box //back plane (0 0 0)//0 (180 0 0)//1 (260 0 0)//2 (260 90 0)//3 (180 90 0)//4 (180 170 0)//5 (260 170 0)//6 (260 260 0)//7 (180 260 0)//8 (0 260 0)//9 //front plane (0 0 20)//10 (180 0 20)//11 (260 0 20)//12 (260 90 20)//13 (180 90 20)//14 (180 170 20)//15 (260 170 20)//16 (260 260 20)//17 (180 260 20)//18 (0 260 20)//19 //left center box //back plane (180 90 0)//20 (260 90 0)//21 (260 170 0)//22 (180 170 0)//23 //front plane (180 90 20)//24 (260 90 20)//25 (260 170 20)//26 (180 170 20)//27 ); blocks ( hex (0 1 8 9 10 11 18 19) (18 26 20) simpleGrading (1 1 1)//left rough box hex (1 2 3 4 11 12 13 14) (8 9 20) simpleGrading (1 1 1)//left bottom box hex (20 21 22 23 24 25 26 27) (16 160 20) simpleGrading (1 1 1)//left center box, note doubled mesh density hex (5 6 7 8 15 16 17 18) (8 9 20) simpleGrading (1 1 1)//left top box ); edges ( ); boundary ( inlet { type patch; faces ( (10 11 18 19)//left rough box (11 12 13 14)//left bottom box (24 25 26 27)//left center box (15 16 17 18)//left top box ); } outlet { type patch; faces ( (0 1 8 9)//left rough box (1 2 3 4)//left bottom box (20 21 22 23)//left center box (5 6 7 8)//left top box ); } fixedWalls { type wall; faces ( //left rough box (0 1 11 10)//bottom (0 10 19 9)//left wall (8 9 19 18)//top //left bottom box (1 2 12 11)//bottom (2 3 13 12)//right //left center box (21 22 26 25)//right //left top box (8 18 17 7)//top (6 7 17 16)//right ); } //use the Arbitray Mesh Interface next //********************* inTopInterface { type cyclicAMI; neighborPatch outTopInterface; faces ( (22 23 27 26)// ); } outTopInterface// { type cyclicAMI; neighborPatch inTopInterface; faces ( (5 6 16 15)// ); } //********************* outBottomInterface { type cyclicAMI; neighborPatch inBottomInterface; faces ( (3 4 14 13)// ); } inBottomInterface { type cyclicAMI; neighborPatch outBottomInterface; faces ( (20 21 25 24)// ); } //********************* leftRightInterface { type cyclicAMI; neighborPatch rightLeftInterface; faces ( (1 8 18 11)// ); } rightLeftInterface { type cyclicAMI; neighborPatch leftRightInterface; faces ( (20 24 27 23)// ); } ); // ************************************************************************* // Quote:
Am I even correct in including the cyclicAMI boundary conditions in the blockMeshDict file? |
||
July 24, 2017, 08:18 |
|
#2 |
Member
Charlie Lloyd
Join Date: Feb 2016
Posts: 57
Rep Power: 10 |
It seems you have spelt 'neighbour' wrong .. although I'm not sure if there are other more appropriate boundary conditions. Have you had a look at snappyHexMesh ? You will be able to refine the dark blue region without splitting up your blockMesh.
|
|
July 26, 2017, 18:17 |
|
#3 | |
New Member
Tom
Join Date: May 2017
Posts: 9
Rep Power: 9 |
Quote:
I've boon considering snappyHexMesh, but my supervisor would like to see if it's possible to do in just blockMesh first. I've got it working below, but there are anomalies around the cyclicAMI patches: At first I assumed they might just be the due to some oddity in how it dealt with the initial conditions, but running it for increasing time-steps has shown that while the sudden jump in pressure and velocity sometimes goes away, there are always some discontinuities present along the boundary. Irrespective of whether I should just use snappyHexMesh (and I would welcome any advice on the pros and cons of it compared to the current method), I'm curious as to what causes the discontinuities seen above. Does anyone have an idea? |
||
July 27, 2017, 05:07 |
|
#4 |
Member
Charlie Lloyd
Join Date: Feb 2016
Posts: 57
Rep Power: 10 |
The advantage of SHM in this case would be that you don't have to worry about specifying any interior boundary conditions - such as the cyclic part. Also, the mesh that SHM will generate may lead to a more accurate solution since the cell nodes will be shared rather than having to interpolate between them.
I think the image you have printed shows a feature of the paraview interpolation rather than the cell values. If you change the variable to its cell values rather than the interpolated point fields the issues may disappear. |
|
February 11, 2019, 02:39 |
|
#5 |
New Member
E
Join Date: May 2018
Posts: 20
Rep Power: 8 |
Edit boundary file so its similar to mine. Obviously without the exact numbers and use whatever patch names you have.
AMI2 { type cyclicAMI; nFaces 9878; startFace 4084895; neighbourPatch AMI1; } AMI1 { type cyclicAMI; nFaces 10174; startFace 4094773; neighbourPatch AMI2; *I know this thread is old but for anyone else who finds this thread. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
time step continuity problem in VAWT simulation | lpz_michele | OpenFOAM Running, Solving & CFD | 5 | February 22, 2018 20:50 |
Time step continuity error | lpz_michele | OpenFOAM Running, Solving & CFD | 0 | October 12, 2015 07:05 |
Boundary Layer strange result | fernexda | OpenFOAM Running, Solving & CFD | 14 | January 15, 2015 08:21 |
problem with cyclicAMI and wall distance | Maff | OpenFOAM Bugs | 5 | August 14, 2014 15:41 |
CyclicAMI Boundary Condition | CUBoulderPhDStudent | OpenFOAM Running, Solving & CFD | 0 | May 21, 2014 19:34 |