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

[blockMesh] Need help defining internal face as boundary

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 8, 2021, 23:43
Post Need help defining internal face as boundary
  #1
Member
 
Venkat Ganesh
Join Date: May 2020
Location: Cincinnati, Ohio
Posts: 43
Rep Power: 3
Venky_94 is on a distinguished road
I'm new to OpenFOAM and I'm trying to create a wedge geometry using Block mesh. I'm facing a couple of issues with the mesh creation. I'm sharing an image showing the boundaries I'll be needing for the simulation.
  1. I'm trying to create a wall at the face marked nozzle wall but I'm getting an error saying "--> FOAM FATAL ERROR: (openfoam-2012)
    Trying to specify a boundary face 4(6 7 8 9) on the face on cell 0 which is either an internal face or already belongs to the same patch. This is face 0 of patch 3 named orificewall." I'd like to know how to create an wall at that internal face.
  2. I tried leaving out the orificewall boundary and creating the geometry to debug the issue and I identified another issue which is that the face marked by an ellipse is being detected as a wall by default and falls under the patch "defaultfaces". I do not require a boundary at that position.

I'd be really grateful if someone could point me in the right direction.

Here's my blockmesh file.
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;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

scale   1;

vertices
(
    (0 0 0)
    (0.0105 0 0)
    (0.0105 0.0099904822158185784680695107340398 -0.00043619387365336002686244665227377)
    (0 0.0099904822158185784680695107340398 -0.00043619387365336002686244665227377)
    (0 0.0099904822158185784680695107340398 0.00043619387365336002686244665227377)
    (0.0105 0.0099904822158185784680695107340398 0.00043619387365336002686244665227377)
	(0 0.00040011881274353401985455214173726 -0.000017469564639817068040427913699908)
	(0 0.00040011881274353401985455214173726 0.000017469564639817068040427913699908)
	(0.001 0.00040011881274353401985455214173726 0.000017469564639817068040427913699908)
	(0.001 0.00040011881274353401985455214173726 -0.000017469564639817068040427913699908)
	(0.001 0.0039961928863274315607001518912966 -0.00017447754946134399448194607362694)
	(0.001 0.0039961928863274315607001518912966 0.00017447754946134399448194607362694)
	(0.0105 0.0039961928863274315607001518912966 0.00017447754946134399448194607362694)
	(0.0105 0.0039961928863274315607001518912966 -0.00017447754946134399448194607362694)
	(0.001 0.0099904822158185784680695107340398 -0.00043619387365336002686244665227377)
	(0.001 0.0099904822158185784680695107340398 0.00043619387365336002686244665227377)
	(0.001 0 0)
	(0 0.0039961928863274315607001518912966 -0.00017447754946134399448194607362694)
	(0 0.0039961928863274315607001518912966 0.00017447754946134399448194607362694)
);

blocks
(
//Orifice Block//
    hex (0 16 9 6 0 16 8 7) (25 10 1) simpleGrading (1 1 1)
//Block to the left of orifice (Pair 1)//
	hex (6 9 10 17 7 8 11 18) (25 90 1) simpleGrading (1 1 1)
//Block to the far left of orifice (Pair 2)//
	hex (17 10 14 3 18 11 15 4) (25 100 1) simpleGrading (1 1.5 1)
//Block above orifice (Pair 1)//
	hex (16 1 13 10 16 1 12 11) (300 100 1) simpleGrading (1.5 1.5 1)
//Block above orifice and to the left (Pair 2)//
	hex (10 13 2 14 11 12 5 15) (300 100 1) simpleGrading (1.5 1.5 1)
);

edges
(
);

boundary
(
	upperwall
    {
        type wall;
        faces
        (
            (3 4 15 14)
			(14 15 5 2)
        );
    }
	lowerwall
    {
        type wall;
        faces
        (
            (6 7 18 17)
			(17 18 4 3)
        );
    }
	pressure_outlet
    {
        type patch;
        faces
        (
            (1 12 13 1)
			(13 12 5 2)
        );
    }
	orificewall
    {
        type wall;
        faces
        (
            (6 7 8 9)
        );
    }
	airinlet
    {
        type patch;
        faces
        (
            (0 7 6 0)
        );
    }
	axis
    {
        type empty;
        faces
        (
            (0 16 16 0)
			(16 1 1 16)
        );
    }
	frontPlane
    {
        type wedge;
        faces
        (
            (0 16 8 7)
			(16 1 12 11)
			(11 12 5 15)
			(7 8 11 18)
			(18 11 15 4)
        );
    }
	backPlane
    {
        type wedge;
        faces
        (
            (0 16 9 6)
			(16 1 13 10)
			(10 13 2 14)
			(6 9 10 17)
			(17 10 14 3)
		);
    }
);

mergePatchPairs
(
);

// ************************************************************************* //
Attached Images
File Type: jpg Intended Mesh Domain.jpg (60.4 KB, 6 views)
Venky_94 is offline   Reply With Quote

Old   August 8, 2021, 23:52
Default
  #2
Member
 
Venkat Ganesh
Join Date: May 2020
Location: Cincinnati, Ohio
Posts: 43
Rep Power: 3
Venky_94 is on a distinguished road
Quote:
Originally Posted by Venky_94 View Post
I'm new to OpenFOAM and I'm trying to create a wedge geometry using Block mesh. I'm facing a couple of issues with the mesh creation. I'm sharing an image showing the boundaries I'll be needing for the simulation.
  1. I'm trying to create a wall at the face marked nozzle wall but I'm getting an error saying "--> FOAM FATAL ERROR: (openfoam-2012)
    Trying to specify a boundary face 4(6 7 8 9) on the face on cell 0 which is either an internal face or already belongs to the same patch. This is face 0 of patch 3 named orificewall." I'd like to know how to create an wall at that internal face.
  2. I tried leaving out the orificewall boundary and creating the geometry to debug the issue and I identified another issue which is that the face marked by an ellipse is being detected as a wall by default and falls under the patch "defaultfaces". I do not require a boundary at that position.

I'd be really grateful if someone could point me in the right direction.

Here's my blockmesh file.
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;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

scale   1;

vertices
(
    (0 0 0)
    (0.0105 0 0)
    (0.0105 0.0099904822158185784680695107340398 -0.00043619387365336002686244665227377)
    (0 0.0099904822158185784680695107340398 -0.00043619387365336002686244665227377)
    (0 0.0099904822158185784680695107340398 0.00043619387365336002686244665227377)
    (0.0105 0.0099904822158185784680695107340398 0.00043619387365336002686244665227377)
	(0 0.00040011881274353401985455214173726 -0.000017469564639817068040427913699908)
	(0 0.00040011881274353401985455214173726 0.000017469564639817068040427913699908)
	(0.001 0.00040011881274353401985455214173726 0.000017469564639817068040427913699908)
	(0.001 0.00040011881274353401985455214173726 -0.000017469564639817068040427913699908)
	(0.001 0.0039961928863274315607001518912966 -0.00017447754946134399448194607362694)
	(0.001 0.0039961928863274315607001518912966 0.00017447754946134399448194607362694)
	(0.0105 0.0039961928863274315607001518912966 0.00017447754946134399448194607362694)
	(0.0105 0.0039961928863274315607001518912966 -0.00017447754946134399448194607362694)
	(0.001 0.0099904822158185784680695107340398 -0.00043619387365336002686244665227377)
	(0.001 0.0099904822158185784680695107340398 0.00043619387365336002686244665227377)
	(0.001 0 0)
	(0 0.0039961928863274315607001518912966 -0.00017447754946134399448194607362694)
	(0 0.0039961928863274315607001518912966 0.00017447754946134399448194607362694)
);

blocks
(
//Orifice Block//
    hex (0 16 9 6 0 16 8 7) (25 10 1) simpleGrading (1 1 1)
//Block to the left of orifice (Pair 1)//
	hex (6 9 10 17 7 8 11 18) (25 90 1) simpleGrading (1 1 1)
//Block to the far left of orifice (Pair 2)//
	hex (17 10 14 3 18 11 15 4) (25 100 1) simpleGrading (1 1.5 1)
//Block above orifice (Pair 1)//
	hex (16 1 13 10 16 1 12 11) (300 100 1) simpleGrading (1.5 1.5 1)
//Block above orifice and to the left (Pair 2)//
	hex (10 13 2 14 11 12 5 15) (300 100 1) simpleGrading (1.5 1.5 1)
);

edges
(
);

boundary
(
	upperwall
    {
        type wall;
        faces
        (
            (3 4 15 14)
			(14 15 5 2)
        );
    }
	lowerwall
    {
        type wall;
        faces
        (
            (6 7 18 17)
			(17 18 4 3)
        );
    }
	pressure_outlet
    {
        type patch;
        faces
        (
            (1 12 13 1)
			(13 12 5 2)
        );
    }
	orificewall
    {
        type wall;
        faces
        (
            (6 7 8 9)
        );
    }
	airinlet
    {
        type patch;
        faces
        (
            (0 7 6 0)
        );
    }
	axis
    {
        type empty;
        faces
        (
            (0 16 16 0)
			(16 1 1 16)
        );
    }
	frontPlane
    {
        type wedge;
        faces
        (
            (0 16 8 7)
			(16 1 12 11)
			(11 12 5 15)
			(7 8 11 18)
			(18 11 15 4)
        );
    }
	backPlane
    {
        type wedge;
        faces
        (
            (0 16 9 6)
			(16 1 13 10)
			(10 13 2 14)
			(6 9 10 17)
			(17 10 14 3)
		);
    }
);

mergePatchPairs
(
);

// ************************************************************************* //
The attachment was missed out in the original post. PFA
Attached Images
File Type: jpg Intended Mesh Domain.jpg (60.4 KB, 5 views)
Venky_94 is offline   Reply With Quote

Old   August 9, 2021, 06:59
Default
  #3
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 681
Rep Power: 11
piu58 is on a distinguished road
You cannot change two sides of a patch into a boundary. If you really need a boundary in the very inner of your domain, you have to create two patches.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   August 10, 2021, 01:38
Default
  #4
Member
 
Venkat Ganesh
Join Date: May 2020
Location: Cincinnati, Ohio
Posts: 43
Rep Power: 3
Venky_94 is on a distinguished road
Quote:
Originally Posted by piu58 View Post
You cannot change two sides of a patch into a boundary. If you really need a boundary in the very inner of your domain, you have to create two patches.
Can you please explain how to do that? Like have duplicate vertices for the same coordinates and then define both sides of the patches as walls (with the different coordinates?)

Last edited by Venky_94; August 10, 2021 at 10:46.
Venky_94 is offline   Reply With Quote

Old   August 10, 2021, 04:41
Default
  #5
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 681
Rep Power: 11
piu58 is on a distinguished road
> Like have duplicate vertices for the same coordinates and then define both sides of the patches as walls (with the different coordinates?

That is what I recommend.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   August 10, 2021, 10:49
Default
  #6
Member
 
Venkat Ganesh
Join Date: May 2020
Location: Cincinnati, Ohio
Posts: 43
Rep Power: 3
Venky_94 is on a distinguished road
Quote:
Originally Posted by piu58 View Post
> Like have duplicate vertices for the same coordinates and then define both sides of the patches as walls (with the different coordinates?

That is what I recommend.
Thanks. That worked out fine. I now have a wall in place at the nozzle wall section.

What would you suggest for the second part of my issue though? The interface between the blocks 0,3 and 1,3 is being detected as a wall. How can I change that?
Venky_94 is offline   Reply With Quote

Old   August 10, 2021, 12:09
Default
  #7
Member
 
Venkat Ganesh
Join Date: May 2020
Location: Cincinnati, Ohio
Posts: 43
Rep Power: 3
Venky_94 is on a distinguished road
Quote:
Originally Posted by Venky_94 View Post
Thanks. That worked out fine. I now have a wall in place at the nozzle wall section.

What would you suggest for the second part of my issue though? The interface between the blocks 0,3 and 1,3 is being detected as a wall. How can I change that?
I tried mergePatchPairs but I'm getting the below error, which I'm not able to understand. I'm sharing my blockMesh file as well. Pls suggest.

Quote:
--> FOAM FATAL ERROR: (openfoam-2012)
Bad points: (0.001 0 0) (0.001 0 0) (1.001 0 0)

From void Foam:: plane::calcFromEmbeddedPoints(const point&, const point&, const point&, const char*)
in file meshes/primitiveShapes/plane/plane.C at line 108.
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;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

scale   1;

vertices
(
    (0 0 0)
    (0.0105 0 0)
    (0.0105 0.0099904822158185784680695107340398 -0.00043619387365336002686244665227377)
    (0 0.0099904822158185784680695107340398 -0.00043619387365336002686244665227377)
    (0 0.0099904822158185784680695107340398 0.00043619387365336002686244665227377)
    (0.0105 0.0099904822158185784680695107340398 0.00043619387365336002686244665227377)
	(0 0.00040011881274353401985455214173726 -0.000017469564639817068040427913699908)
	(0 0.00040011881274353401985455214173726 0.000017469564639817068040427913699908)
	(0.001 0.00040011881274353401985455214173726 0.000017469564639817068040427913699908)
	(0.001 0.00040011881274353401985455214173726 -0.000017469564639817068040427913699908)
	(0.001 0.0039961928863274315607001518912966 -0.00017447754946134399448194607362694)
	(0.001 0.0039961928863274315607001518912966 0.00017447754946134399448194607362694)
	(0.0105 0.0039961928863274315607001518912966 0.00017447754946134399448194607362694)
	(0.0105 0.0039961928863274315607001518912966 -0.00017447754946134399448194607362694)
	(0.001 0.0099904822158185784680695107340398 -0.00043619387365336002686244665227377)
	(0.001 0.0099904822158185784680695107340398 0.00043619387365336002686244665227377)
	(0.001 0 0)
	(0 0.0039961928863274315607001518912966 -0.00017447754946134399448194607362694)
	(0 0.0039961928863274315607001518912966 0.00017447754946134399448194607362694)
	(0 0.00040011881274353401985455214173726 -0.000017469564639817068040427913699908) //Copy of pt. 6//
	(0 0.00040011881274353401985455214173726 0.000017469564639817068040427913699908) //Copy of pt. 7//
	(0.001 0.00040011881274353401985455214173726 0.000017469564639817068040427913699908) //Copy of pt. 8//
	(0.001 0.00040011881274353401985455214173726 -0.000017469564639817068040427913699908) //Copy of pt. 9//
	(0.001 0 0) //Copy of pt. 16//
	(0.001 0.0039961928863274315607001518912966 -0.00017447754946134399448194607362694) //Copy of pt. 10//
	(0.001 0.0039961928863274315607001518912966 0.00017447754946134399448194607362694) //Copy of pt. 11//
);

blocks
(
//Orifice Block//
    hex (0 16 22 19 0 16 21 20) (25 10 1) simpleGrading (1 1 1)
//Block to the left of orifice//
	hex (6 9 24 17 7 8 25 18) (25 90 1) simpleGrading (1 1 1)
//Block to the far left of orifice//
	hex (17 10 14 3 18 11 15 4) (25 100 1) simpleGrading (1 1.5 1)
//Block above orifice//
	hex (23 1 13 10 23 1 12 11) (300 100 1) simpleGrading (1.5 1.5 1)
//Block above orifice and to the left//
	hex (10 13 2 14 11 12 5 15) (300 100 1) simpleGrading (1.5 1.5 1)
);

edges
(
);

boundary
(
	upperwall
    {
        type wall;
        faces
        (
            (3 4 15 14)
			(14 15 5 2)
        );
    }
	lowerwall
    {
        type wall;
        faces
        (
            (6 7 18 17)
			(17 18 4 3)
        );
    }
	pressure_outlet
    {
        type patch;
        faces
        (
            (1 12 13 1)
			(13 12 5 2)
        );
    }
	orificewall
    {
        type wall;
        faces
        (
            (6 7 8 9)
			(19 20 21 22)
        );
    }
	airinlet
    {
        type patch;
        faces
        (
            (0 20 19 0)
        );
    }
	axis
    {
        type empty;
        faces
        (
            (0 16 16 0)
			(23 1 1 23)
        );
    }
	frontPlane
    {
        type wedge;
        faces
        (
            (0 16 21 20)
			(23 1 12 11)
			(11 12 5 15)
			(7 8 25 18)
			(18 11 15 4)
        );
    }
	backPlane
    {
        type wedge;
        faces
        (
            (0 16 22 19)
			(23 1 13 10)
			(10 13 2 14)
			(6 9 24 17)
			(17 10 14 3)
		);
    }
	mpatch
    {
        type patch;
        faces
        (
			(23 11 10 23)
        );
    }
	spatch1 //Outlet of orifice//
    {
        type patch;
        faces
        (
            (16 21 22 16)
        );
    }
	spatch2 //Patch to left of orifice outlet//
    {
        type patch;
        faces
        (
            (8 25 24 9)
        );
    }
);

mergePatchPairs
(
	(mpatch spatch1)
	(mpatch spatch2)
);

// ************************************************************************* //
Venky_94 is offline   Reply With Quote

Reply

Tags
blockmesh, interface, internal face

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
[snappyHexMesh] Invalid Normals for source face to target face while making AMI? Sorabh OpenFOAM Meshing & Mesh Conversion 1 August 3, 2021 07:35
Error - Solar absorber - Solar Thermal Radiation MichaelK CFX 12 September 1, 2016 06:15
[snappyHexMesh] sHM layer process keeps getting killed MBttR OpenFOAM Meshing & Mesh Conversion 4 August 15, 2016 04:21
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 10:38
snappyhexmesh remove blockmesh geometry philipp1 OpenFOAM Running, Solving & CFD 2 December 12, 2014 11:58


All times are GMT -4. The time now is 22:58.