CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[blockMesh] FOAM FATAL ERROR: face 0 in patch 0 does not have neighbour cell face

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 7, 2013, 08:27
Default FOAM FATAL ERROR: face 0 in patch 0 does not have neighbour cell face
  #1
New Member
 
Alex Flaminio
Join Date: Feb 2013
Posts: 3
Rep Power: 13
am9109 is on a distinguished road
Hello Everyone,

I am very new to OpeFoam as I only started to use it a few days ago, I am trying to generate a Mesh which is made of 3 rectangular blocks, one next to the other with the middle one slightly smaller than the other two.
I get the following message:

FOAM FATAL ERROR:
face 0 in patch 0 does not have neighbour cell face: 4(0 12 16 3)

What am I doing wrong?
Thanks a lot

P.S.: here is the code:
convertToMeters 1;

vertices
(
(-5 -1 -1)
(5 -1 -1)
(5 1 -1)
(-5 1 -1)
(-5 -1 1)
(5 -1 1)
(5 1 1)
(-5 1 1)
(-2 -1 -0.5)
(-2 1 -0.5)
(2 1 -0.5)
(2 -1 -0.5)
(-2 -1 -1 )
(-2 1 -1)
(2 1 -1)
(2 -1 -1)
(-2 -1 1)
(-2 1 1)
(2 1 1)
(2 -1 1)
);

blocks
(
hex (0 4 3 7 12 13 16 17) (100 4 4) simpleGrading (1 1 1)
hex (8 9 10 11 16 17 18 19) (100 4 4) simpleGrading (1 1 1)
hex (1 2 5 6 14 15 18 19) (100 4 4) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
leftWall
{
type wall;
faces
(
(0 12 16 3)
(8 11 19 16)
(1 2 19 15)
);
}
rightWall
{
type wall;
faces
(
(4 7 17 13)
(9 17 18 10)
(14 18 6 5)
);
}
topWall
{
type wall;
faces
(
(7 3 16 17)
(17 16 19 18)
(18 19 2 6)
);
}
bottomWall
{
type wall;
faces
(
(0 4 13 12)
(13 9 8 12)
(9 10 11 8)
(15 11 10 14)
(14 5 1 15)
);
}
inlet
{
type patch;
faces
(
(0 3 7 4)
);
}
outlet
{
type patch;
faces
(
(6 2 1 5)
);
}
);
patch slave_1
(
(13 17 16 12)
);

patch slave_2
(
(15 19 18 14)
) ;

mergePatchPairs
(
(16 17 9 8)
(10 18 19 11)
);
am9109 is offline   Reply With Quote

Old   February 7, 2013, 10:30
Default
  #2
Senior Member
 
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19
colinB is on a distinguished road
Hi and welcome to the forum,

face 0 in patch 0 does not have neighbour cell face: 4(0 12 16 3)

actually means that you messed up the order of the points
in your patch definition.
In blockMesh you have to strictly follow the orders which are
well explained in the user guide.

However sometimes it is hard to see where the error is therefore I
recommend you to type

paraFoam -block

which will display your blockMeshDict file without compiling it so
it is very handy for error handling.

Another hint for the future is try to use the forum search or google
on your error message, which gives you already a lot of answers
regarding your problems.

I hope I could contribute
regards
PanPeter likes this.
colinB is offline   Reply With Quote

Old   August 30, 2013, 06:41
Default FOAM FATAL ERROR: face 7 in patch 0 does not have neighbour cell face: 4(23 24 20 19
  #3
New Member
 
Join Date: Aug 2013
Posts: 4
Rep Power: 13
apk1509 is on a distinguished road
Hello Everyone...

I am very new to OF and trying to mesh a cylinder for Hagen-Poiseuille flow. I am getting error like:

FOAM FATAL ERROR:

face 7 in patch 0 does not have neighbour cell face: 4(19 20 24 23)

From function polyMesh::facePatchFaceCells(const faceList& patchFaces,const labelListList& pointCells,const faceListList& cellsFaceShapes,const label patchID)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 127.

blockMeshDict is :

convertToMeters 0.1;

vertices
(
(0 0 0)
(0.15 0.15 0)
(-0.15 0.15 0)
(-0.15 -0.15 0)
(0.15 -0.15 0) //4
(0.3 0.3 0)
(-0.3 0.3 0)
(-0.3 -0.3 0)
(0.3 -0.3 0)//8
(0.35 0.35 0)
(-0.35 0.35 0)
(-0.35 -0.35 0)
(0.35 -0.35 0)//12

(0.15 0.15 30)
(-0.15 0.15 30)
(-0.15 -0.15 30)
(0.15 -0.15 30)
(0.3 0.3 30)//17
(-0.3 0.3 30)
(-0.3 -0.3 30)
(0.3 -0.3 30)
(0.35 0.35 30) //21
(-0.35 0.35 30)
(-0.35 -0.35 30)
(0.35 -0.35 30)
(0 0 30) //25

);

blocks
(
hex (1 2 3 4 13 14 15 16) (10 10 150) simpleGrading (1 1 1)
hex (1 5 6 2 13 17 18 14) (10 10 150) simpleGrading (1 1 1)
hex (2 6 7 3 14 18 19 15) (10 10 150) simpleGrading (1 1 1)
hex (3 7 8 4 15 19 20 16) (10 10 150) simpleGrading (1 1 1)
hex (4 8 5 1 16 20 17 13) (10 10 150) simpleGrading (1 1 1)
hex (5 9 10 6 17 21 22 18) (10 10 150) simpleGrading (1 1 1)
hex (6 10 11 7 18 22 23 19) (10 10 150) simpleGrading (1 1 1)
hex (12 9 5 8 24 21 17 20) (10 10 150) simpleGrading (1 1 1)
);

edges
(
arc 5 6 (0 0.42426 0) // back face
arc 6 7 (-0.42426 0 0)
arc 7 8 (0 -0.42426 0)
arc 8 5 (0.42426 0 0)
arc 9 10 (0 0.5 0)
arc 10 11 (-0.5 0 0)
arc 11 12 (0 -0.5 0)
arc 12 9 (0.5 0 0)

arc 17 18 (0 0.42426 30) // front face
arc 18 19 (-0.42426 0 30)
arc 19 20 (0 -0.42426 30)
arc 20 17 (0.42426 0 30)
arc 21 22 (0 0.5 30)
arc 22 23 (-0.5 0 30)
arc 23 24 (0 -0.5 30)
arc 24 21 (0.5 0 30)

);

boundary
(
inlet
{
type inlet;
faces
(
(13 16 15 14)
(13 14 18 17)
(14 15 19 18)
(15 16 20 19)
(16 13 17 20)
(17 18 22 21)
(18 19 23 22)
(19 20 24 23)
(20 17 21 24)
);
}

outlet
{
type outlet;
faces
(
(1 5 6 2)
(2 6 7 3)
(3 7 8 4)
(4 8 5 1)
(1 2 3 4)
(5 9 10 6)
(6 10 11 7)
(7 11 12 8)
(8 12 9 5)
);
}

fixedWalls
{
type wall;
faces
(
(21 22 10 19)
(22 23 11 10)
(23 24 12 11)
(24 21 9 12)
);
}
);

mergePatchPairs
(
);
apk1509 is offline   Reply With Quote

Old   August 30, 2013, 06:47
Default
  #4
Senior Member
 
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19
colinB is on a distinguished road
Dear apk1509,

please read my post of Feb. 7th which is right before your
post. (post no. 2 of this thread)
The complete answer to your question is posted there as well
as hints on how to solve your problem!

regards
Colin
colinB is offline   Reply With Quote

Old   August 30, 2013, 06:57
Default
  #5
New Member
 
Join Date: Aug 2013
Posts: 4
Rep Power: 13
apk1509 is on a distinguished road
Actually I tried to correct the order of points and still i got the same error..
Also, when i tried with "paraFoam -block", paraview opened and closed before showing anything.

How to rectify this..
apk1509 is offline   Reply With Quote

Old   August 30, 2013, 07:41
Default
  #6
Senior Member
 
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19
colinB is on a distinguished road
Hi,

this brings us closer to your problem.
You see why it is important to explain your problem in detail
as suggested here: http://www.cfd-online.com/Forums/ope...-get-help.html

However two remarks to your blockMeshDict:

- the way you count is wrong: blockMesh starts counting from 0
so the first point in the list with points is 0 the second is 1 and so on!

- the valid entry for patchtypes are

wall
patch
symmetry

the patchtype like inlet outlet and so on will be specified in the 0 folder.
see the examples for further details (like dambreak)

When you have fixed that let us know what the results are!

regards
Colin
colinB is offline   Reply With Quote

Old   February 22, 2015, 05:39
Default FOAM FATAL ERROR: face 0 in patch 4 does not have neighbour cell face: 4(2 4 14 12)
  #7
New Member
 
Divye Singh
Join Date: Feb 2015
Posts: 1
Rep Power: 0
sdivye is on a distinguished road
Hello Everyone
I am very new to OF and trying to mesh. I am getting following error:

FOAM FATAL ERROR:
face 0 in patch 4 does not have neighbour cell face: 4(2 4 14 12)

From function polyMesh::facePatchFaceCells(const faceList& patchFaces,const labelListList& pointCells,const faceListList& cellsFaceShapes,const label patchID)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 127.

I even tried with "paraFoam -block", but that too gave an error.
Please help me rectify this error

My blockMeshDict is:

convertToMeters 1;

vertices
(
(0 0 0) // 0
(1.5 0 0) //1
(2 0.5 0) //2
(0 0.5 0) //3
(2.5 0 0) //4
(4 0 0) //5
(4 0.5 0) //6
(0 2 0) //7
(2 2 0) //8
(4 2 0) //9
(0 0 0.1) // 10
(1.5 0 0.1) //11
(2 0.5 0.1) //12
(0 0.5 0.1) //13
(2.5 0 0.1) //14
(4 0 0.1) //15
(4 0.5 0.1) //16
(0 2 0.1) //17
(2 2 0.1) //18
(4 2 0.1) //19
);

blocks
(
hex (0 1 2 3 10 11 12 13) (10 10 1) simpleGrading (1 1 1)
hex (3 2 8 7 13 12 18 17) (10 10 1) simpleGrading (1 1 1)
hex (4 5 6 7 14 15 16 17) (10 10 1) simpleGrading (1 1 1)
hex (3 6 9 8 13 16 19 18) (10 10 1) simpleGrading (1 1 1)
);

edges
(
arc 1 2 (1.64644 0.35355 0)
arc 2 4 (2.35355 0.35355 0)
arc 11 12 (1.64644 0.35355 0.1)
arc 12 14 (2.35355 0.35355 0.1)
);

boundary
(
down
{
type symmetryPlane;
faces
(
(0 1 11 10)
(4 5 15 14)
);
}
right
{
type patch;
faces
(
(5 6 16 15)
(6 9 19 16)
);
}
up
{
type symmetryPlane;
faces
(
(9 8 18 19)
(8 7 17 18)
);
}
left
{
type patch;
faces
(
(3 0 10 13)
(7 3 13 17)
);
}
cylinder
{
type symmetry;
faces
(
(2 4 14 12)
(1 2 12 11)
);
}
);

mergePatchPairs
(
);
sdivye is offline   Reply With Quote

Old   March 6, 2015, 07:01
Default
  #8
Member
 
Alexander Bartel
Join Date: Feb 2015
Location: Germany
Posts: 97
Rep Power: 11
alexB is on a distinguished road
Hi Divye,

check your points, is (2 4 14 12) really a face of your boundary?
there is no hex with all the 4 points.

So my suggestion is that (2 4 14 12) is just an imaginary plane between two hexes.

greetings
Alex
jonesm7 likes this.
alexB is offline   Reply With Quote

Old   July 1, 2015, 09:33
Default Issue with multiple blocks of different sizes
  #9
Member
 
Paula
Join Date: Aug 2012
Posts: 30
Rep Power: 14
curiosity is on a distinguished road
Hello,

Iīve found the same error of the title of the thread:

FOAM FATAL ERROR:
face 0 in patch 9 does not have neigbour cell face


...And I know the reason thanks to reading this forum

However, I do not know how to solve it in a "fast way".

Attached it is a picture of my geometry: two solid blocks and two air blocks of different sizes.

And my question is: what should I do with the face Air1_to_Solid2? That is, with the portion of the Solid2 face coupled with the block called Air1?

Should I make a new block dividing the block Air1 so that the face Air1_to_solid2 belongs to that new block? This is probably the answer, but is there any faster way to debug the error? The utility mergepatchpairs maybe?

Thanks in advance
Attached Images
File Type: jpg chtMultiRegionFoam-case.jpg (27.5 KB, 187 views)
curiosity is offline   Reply With Quote

Old   July 1, 2015, 18:24
Default
  #10
Member
 
Alexander Bartel
Join Date: Feb 2015
Location: Germany
Posts: 97
Rep Power: 11
alexB is on a distinguished road
Hi Paula,

First of all... what are you trying to simulate?

Secondly, to help you, at least the blockmeshdict would be useful too.

kind regards
Alex
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
alexB is offline   Reply With Quote

Old   July 1, 2015, 18:39
Default
  #11
Member
 
Paula
Join Date: Aug 2012
Posts: 30
Rep Power: 14
curiosity is on a distinguished road
Hello AlexB,

Sorry, I didnīt give information enough :S

Iīm doing this tutorial: http://es.slideshare.net/ARPITSINGHA...regiontutorial

Iīm having troubles with the boundary Air1_to_Solid2, as it doesnīt belong to an independent block.

I havenīt the blockMeshDict here, but I can attach it tomorrow

Thanks for your reply!
curiosity is offline   Reply With Quote

Old   July 2, 2015, 04:07
Default
  #12
Member
 
Paula
Join Date: Aug 2012
Posts: 30
Rep Power: 14
curiosity is on a distinguished road
Hello Alexander,

This is the blocMeshDict file:
HTML Code:
convertToMeters 1;

vertices
(
//Solid1
    (0 0 0) // 0
    (10 0 0) // 1=8
    (10 0.3 0) // 2=17
    (0 0.3 0) // 3
    (0 0 1) // 4
    (10 0 1) // 5=12
    (10 0.3 1) // 6=21
    (0 0.3 1) // 7=20
//Solid2
    (10 0 0) // 8=1
    (20 0 0) // 9
    (20 0.5 0) //10=25
    (10 0.5 0) // 11=24
    (10 0 1) //12=5
    (20 0 1) //13
    (20 0.5 1) // 14=29
    (10 0.5 1) // 15=28
//Air1
    (0 0.3 0) // 16=3
    (10 0.3 0) // 17=2
    (10 1 0) // 18=27
    (0 1 0) // 19
    (0 0.3 1) //20=7
    (10 0.3 1) //21=6
    (10 1 1) //22=31
    (0 1 1) //23
//Air2
    (10 0.5 0) // 24=11
    (20 0.5 0) // 25=10
    (20 1 0) // 26
    (10 1 0) // 27=18
    (10 0.5 1) //28=15
    (20 0.5 1) //29
    (20 1 1) //30
    (10 1 1) //31=22
);



blocks
(
//Solid1
    hex (0 1 2 3 4 5 6 7) Solid1 (10 10 10) simpleGrading (1 1 1)
//Solid2
    hex (8 9 10 11 12 13 14 15) Solid2 (10 10 10) simpleGrading (1 1 1)
//Air1
    hex (16 17 18 19 20 21 22 23) Air1 (10 10 10) simpleGrading (1 1 1)
//Air2
    hex (24 25 26 27 28 29 30 31) Air2 (10 10 10) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
    top
    {
        type wall;
        faces
        (
            (4 5 6 7) //counter clockwise from the outside of the block
	    (12 13 14 15)
	    (28 29 30 31)
	    (20 21 22 23)
        );
    }
    bottom
    {
        type wall;
        faces
	(
	    (3 2 1 0) //counter clockwise from the outside of the block
	    (11 10 9 8)
	    (19 18 17 16)
	    (27 26 25 24)
        );
    }    
    rear
    {
        type wall;
        faces
        (
            (0 4 7 3) //counter clockwise from the outside of the block
	    (16 20 23 19)
        );
    }
    left
    {
        type wall;
        faces
        (
            (18 19 23 22) //clockwise from the inside of the block
	    (26 27 31 30)
        );
    }   
    right
    {
        type wall;
        faces
        (
            (0 1 5 4) //counter clockwise from the outside of the block
	    (8 9 13 12)
        );
    }    
    front
    {
        type wall;
        faces
        (
            (9 10 14 13) //counter clockwise from the outside of the block
	    (25 26 30 29)
        );
    }
    Air1_to_Solid1
    {
        type wall;
        faces
        (
            (16 17 21 20) //counter clockwise from the outside of the block
        );
    }
    Air2_to_Solid2
    {
        type wall;
        faces
        (
            (24 25 29 28) //counter clockwise from the outside of the block
        );
    }
    Air2_to_Air1
    {
        type wall;
        faces
        (
            (24 28 31 27) //counter clockwise from the outside of the block
        );
    }
    Air1_to_Solid2
    {
        type wall;
        faces
        (
            (17 11 15 21) //counter clockwise from the outside of the block
        );
    }
    Solid1_to_Solid2
    {
        type wall;
        faces
        (
            (1 2 6 5) //counter clockwise from the outside of the block
        );
    }

);
mergePatchPairs
(
);

// ************************************************************************* //
Attached you can also find the picture with the labels of the vertices in each block.

Thanks!
Attached Images
File Type: jpg chtMultiRegionFoam-case.jpg (27.5 KB, 33 views)
curiosity is offline   Reply With Quote

Old   July 2, 2015, 11:32
Default
  #13
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22
zfaraday will become famous soon enough
Hi Paula,

after a quick glance to your blockMeshDict file I think the problem is that you need to use a couple of extra blocks in order to define properly your geometry. Besides that, it makes no sense to use the same point twice with a diferent label when you define all the vertices, i.e., the point 2 is tha same than the point 17... Define each point only once in the vertices subdictionary! Your vertices list will get muc shorter.

I would define your geometry by using 24 vertices and 6 blocks instead of 4, something like shown below would work.
Code:
only the vertices from the bottom of the geometry are shown

    9  ______ 10 _______ 11
    6 |_______7_|_______| 8
    3 |_______4_|_______| 5
    0 |_______1_|_______| 2
With this geometry the set of blocks would be the ones shown below

Code:
(...)
// the block divisions should be checked in order to be consistent, I only copy-pasted the blocks subdict from the previous post

blocks
(
//Solid1
    hex (0 1 4 3 12 13 16 15) Solid1 (10 10 10) simpleGrading (1 1 1)
//Solid2
    hex (1 2 5 4 12 14 17 16) Solid2 (10 10 10) simpleGrading (1 1 1)
    hex (4 5 8 7 16 17 20 19) Solid2 (10 10 10) simpleGrading (1 1 1)
//Air1
    hex (3 4 7 6 x x x x) Air1 (10 10 10) simpleGrading (1 1 1)
    hex (6 7 10 9 x x x x) Air1 (10 10 10) simpleGrading (1 1 1)
//Air2
    hex (7 78 11 10 x x x x) Air2 (10 10 10) simpleGrading (1 1 1)
);
(...)
Hope it helps!

Best regards,

Alex
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Old   July 3, 2015, 02:40
Default
  #14
Member
 
Paula
Join Date: Aug 2012
Posts: 30
Rep Power: 14
curiosity is on a distinguished road
Quote:
Originally Posted by zfaraday View Post

With this geometry the set of blocks would be the ones shown below

Code:
(...)
// the block divisions should be checked in order to be consistent, I only copy-pasted the blocks subdict from the previous post

blocks
(
//Solid1
    hex (0 1 4 3 12 13 16 15) Solid1 (10 10 10) simpleGrading (1 1 1)
//Solid2
    hex (1 2 5 4 12 14 17 16) Solid2 (10 10 10) simpleGrading (1 1 1)
    hex (4 5 8 7 16 17 20 19) Solid2 (10 10 10) simpleGrading (1 1 1)
//Air1
    hex (3 4 7 6 x x x x) Air1 (10 10 10) simpleGrading (1 1 1)
    hex (6 7 10 9 x x x x) Air1 (10 10 10) simpleGrading (1 1 1)
//Air2
    hex (7 78 11 10 x x x x) Air2 (10 10 10) simpleGrading (1 1 1)
);
(...)
Hope it helps!

Best regards,

Alex
Oh, sure it helps! That I what I was looking for! I didnīt know if I could define two blocks of hex for the same zone and now I see that I can. Thank you very much!


Iīve been reading the user guide and Iīd like to ask you another question:

If I do not use the utility mergePatchPairs would it be the "face matching" method and if I define the patches of type Air_to_solid as boundary and then use mergePatchPairs utility, would I be using the face merging method?

To clarify my question, an example of the code for only one external face (top) and one internal face (Solid_to_Air), for the face merging method:

HTML Code:
boundary
(
    top
    {
        type wall;
        faces
        (
            (X X X X)
	    (X X X X)
	    (X X X X)
	    (X X X X)
        );
    }
...
...
...
    Solid1_to_Air1
    {
        type patch;
        faces
        (
            (X X X X)
        );
    }
    Air1_to_Solid1
    {
        type patch;
        faces
        (
            (X X X X)
        );
    }
...
...
...

);
mergePatchPairs
(
            (Solid1_to_Air1 Air1_to_Solid1)
);

// ************************************************************************* //
Maybe Iīm mixing concepts... but I fear that I donīt understand when is the utility "mergePatchPairs" necessary

Thanks again!
curiosity is offline   Reply With Quote

Old   July 3, 2015, 09:04
Default
  #15
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22
zfaraday will become famous soon enough
Hi Paula,

Forget about the coupling patches between regions at this stage, you only need to define the external ones in blockMesh, the other ones get defined after you execute splitMeshRegions and changeDictionary utilities.

I see you are a bit lost when it comes to multi region cases, you need to take a look at the planeWall2D tutorial and try to understand the steps to reproduce a multi region case. I strongly recomend you to study this case before setting up any other multi region case on your own.

Best regards,

Alex
curiosity and KKlee like this.
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Old   July 6, 2015, 10:03
Default
  #16
Member
 
Paula
Join Date: Aug 2012
Posts: 30
Rep Power: 14
curiosity is on a distinguished road
Hello Alex,

Iīve made the tutorial you suggested (planeWall2D) and some others by Iīm afraid they havenīt clarify some of my doubts.

Iīve investigated which are the files OpenFOAM ask you for, in order to set a multiRegion case step by step (without using Allrun).
Attached you can find a scheme of the process.

As you can see, my plan is not to use the ./Allrun command. What I want to do is to enter the following commands one by one:

1. blockMesh
2. topoSet
3. splitMeshRegions
4. script to remove fluid fields from solid regions (contained in the Allrun file)
5. chtMultiregionFoam

However, I do not know how to set the changeDictionaryDict and it doesnīt help me so much to look into the example of the tutorial.

Please, could you help me?
Attached Images
File Type: jpg steps_to_set_multiRegion_case1.jpg (50.1 KB, 51 views)
File Type: jpg steps_to_set_multiRegion_case2.jpg (37.4 KB, 20 views)
curiosity is offline   Reply With Quote

Old   July 6, 2015, 12:22
Default
  #17
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22
zfaraday will become famous soon enough
Quote:
Originally Posted by curiosity View Post
Hello Alex,

Iīve made the tutorial you suggested (planeWall2D) and some others by Iīm afraid they havenīt clarify some of my doubts.

Iīve investigated which are the files OpenFOAM ask you for, in order to set a multiRegion case step by step (without using Allrun).
Attached you can find a scheme of the process.

As you can see, my plan is not to use the ./Allrun command. What I want to do is to enter the following commands one by one:

1. blockMesh
2. topoSet
3. splitMeshRegions
4. script to remove fluid fields from solid regions (contained in the Allrun file)
5. chtMultiregionFoam

However, I do not know how to set the changeDictionaryDict and it doesnīt help me so much to look into the example of the tutorial.

Please, could you help me?
Hi Paula,

I don't like the fact that you don't want to use the Allrun script since it is totally helpful in any case you set up. I strongly suggest you to get used to make use of them usually!

I don't understand either what you say you don't understand... I mean, the use of changeDictionary is quite obvious and it is explained in the planeWall2D tutorial

Quote:
system - In here are the files that configure or help configure the case.
  • controlDict - Here you control the number of iterations and so on...
  • topoSetDict - Here you defined the extents of each region. It's here that you can select which cells of the mesh that belong in each region.
  • bottomAir - In here are the runtime configurations for the bottom region.
    • changeDictionaryDict - This is the main file where you define the actual boundary conditions to be used for the bottom region.
  • topAir - In here are the runtime configurations for the top region.
    • changeDictionaryDict - This is the main file where you define the actual boundary conditions to be used for the top region.
  • wall - In here are the runtime configurations for the wall region.
    • changeDictionaryDict - This is the main file where you define the actual boundary conditions to be used for the wall region.
You only need to copy the changeDictionaryDict file from the tutorial case to your own case and adapt it to suit your requirements!

Hope it helps!

Alex
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Old   July 7, 2015, 03:43
Default
  #18
Member
 
Paula
Join Date: Aug 2012
Posts: 30
Rep Power: 14
curiosity is on a distinguished road
Hello Alex,

Of course the Allrun script is useful. I was only entering command by command in order to know what does it execute internally when I enter: ./Allrun in the console. I mean, what folders are created when I enter blockMesh and then SplitMeshRegions, for example. But Iīll use it, of course!

Regarding to the changeDictionary of the tutorial WallPlane2D, what I donīt understand is (comments/questions in the own code):

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

dictionaryReplacement
{
    boundary
    {
        bottomAir_bottom
        {
            type            symmetryPlane;
        }
    }

    U
    {
        internalField   uniform (0.01 0 0);

        boundaryField
        {
            leftLet
            {
                type            fixedValue;
                value           uniform ( 0.1 0 0 );
            }

            rightLet
            {
                type            inletOutlet;
                inletValue      uniform ( 0 0 0 );
                value           uniform ( 0.1 0 0 );
            }

            bottomAir_bottom
            {
                type            symmetryPlane;
            }
            
            "bottomAir_to_.*"
            {
                type            fixedValue;
                value           uniform (0 0 0);
            }
        }
    }

    T
    {
        internalField   uniform 500;

        boundaryField
        {
            leftLet
            {
                type            fixedValue;
                value           uniform 500;
            }

            rightLet
            {
                type            zeroGradient;
            }

            bottomAir_bottom
            {
                type            symmetryPlane;
            }

            "bottomAir_to_.*"
            {
                type            compressible::turbulentTemperatureCoupledBaffleMixed;
                Tnbr            T;
                kappa           fluidThermo;
                kappaName       none;
                value           uniform 300;
            }
        }
    }

    epsilon
    {
        internalField   uniform 0.01;

        boundaryField
        {
            leftLet
            {
                type            inletOutlet;
                inletValue      uniform 0.01;
                value           uniform 0.01;
            }

            rightLet
            {
                type            fixedValue;
                value           uniform 0.01;
            }

            bottomAir_bottom
            {
                type            symmetryPlane;
            }

            "bottomAir_to_.*"
            {
                type            compressible::epsilonWallFunction;
                value           uniform 0.01;
            }
        }
    }

    k
    {
        internalField   uniform 0.1;

        boundaryField
        {
            leftLet
            {
                type            inletOutlet;
                inletValue      uniform 0.1;
                value           uniform 0.1;
            }

            rightLet
            {
                type            fixedValue;
                value           uniform 0.1;
            }

            bottomAir_bottom
            {
                type            symmetryPlane;
            }

            "bottomAir_to_.*"
            {
                type            compressible::kqRWallFunction;
                value           uniform 0.1;
            }
        }
    }

    p_rgh
    {
        internalField   uniform 1e5;

        boundaryField
        {
            ".*"  -----------------------------------> what does this mean?
            {
                type            fixedFluxPressure;
                value           uniform 1e5;
            }

            bottomAir_bottom
            {
                type            symmetryPlane;
            }

            leftLet
            {
                type            fixedValue;
                value           uniform 1e5;
            }

            frontAndBack -------------> Why doesnīt "frontAndBack" appear for other variables: epsilon, k, T and U definition?
            {
                type            empty;
            }
          
        }
    }

    p
    {
        internalField   uniform 1e5;

        boundaryField
        {
            ".*"
            {
                type            calculated;
                value           uniform 1e5;
            }

            bottomAir_bottom
            {
                type            symmetryPlane;
            }

            leftLet
            {
                type            calculated;
                value           uniform 1e5;
            }

            frontAndBack
            {
                type            empty;
            }
          
        }
    }
}

// ************************************************************************* //
Thank you!
curiosity is offline   Reply With Quote

Old   July 7, 2015, 06:39
Default
  #19
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22
zfaraday will become famous soon enough
Hi,

".*" is a wildcard that means "any character chain". Thus, "bottomAir_to_.*" refers to any coupling boundary condition for the region bottomAir to any solid; ".*" refers to any boundary condition found in the geometry.

Hope it helps!
curiosity likes this.
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Old   July 7, 2015, 06:43
Default
  #20
Member
 
Paula
Join Date: Aug 2012
Posts: 30
Rep Power: 14
curiosity is on a distinguished road
Ok!

I think that little by little Iīm solving the mistery

Thank you very much Alex!
curiosity is offline   Reply With Quote

Reply


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
Problem with cyclic boundaries in Openfoam 1.5 fs82 OpenFOAM 37 November 29, 2024 11:15
[CGNS] CGNS converters available mbeaudoin OpenFOAM Meshing & Mesh Conversion 137 December 14, 2018 05:20
[blockMesh] Errors during blockMesh meshing Madeleine P. Vincent OpenFOAM Meshing & Mesh Conversion 51 May 30, 2016 11:51
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch gschaider OpenFOAM Installation 225 August 25, 2015 20:43
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 05:15


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