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

[blockMesh] Problem with meshing in openfoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 21, 2019, 10:15
Default Problem with meshing in openfoam
  #1
New Member
 
Ziqu Cao
Join Date: Aug 2019
Location: The University of Glasgow
Posts: 10
Rep Power: 0
Kevin Cao is on a distinguished road
Hello, I am a beginner in OpenFOAM. I want to simulate a jet ejected from a round nozzle into free space with o-h grid method.
The code of block is shown below:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1906 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

scale 0.001;

vertices
(
(0 0 0) //0
(70 0 0) //1
(70 0 70)//2
(0 0 70)//3
(0 300 0)//4
(70 300 0)//5
(70 300 70)//6
(0 300 70)//7
//outside vertices
(42.071067812 0 27.92893219)//8
(27.92893219 0 27.92893219)//9
(27.92893219 0 42.071067812)//10
(42.071067812 0 42.071067812)//11
(42.071067812 300 27.92893219)//12 link 8
(27.92893219 300 27.92893219)//13 link 9
(27.92893219 300 42.071067812)//14 link 10
(42.071067812 300 42.071067812)//15 link 11
//vertices on the circle
(36.25 0 33.75)//16
(33.75 0 33.75)//17
(33.75 0 36.25)//18
(36.25 0 36.25)//19
(36.25 300 33.75)//20 link 16
(33.75 300 33.75)//21 link 17
(33.75 300 36.25)//22 link 18
(36.25 300 36.25)//23 link 19
//vertices in the circle(a square)
);

edges
(
arc 8 11 (35 0 30)
arc 11 10 (40 0 35)
arc 10 9 (35 0 40)
arc 9 8 (30 0 35)
arc 12 15 (35 300 30)
arc 15 14 (40 300 35)
arc 14 13 (35 300 40)
arc 13 12 (30 300 35)
);

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

boundary
(
inlet
{
type patch;
faces
(
(16 17 18 19)
(8 9 17 16)
(9 10 18 17)
(10 11 19 18)
(8 16 19 11)
);
}

outlet
{
type patch;
faces
(
(0 4 5 1)
(3 7 4 0)
(6 7 3 2)
(2 1 5 6)
(2 3 10 11)
(3 0 9 10)
(8 9 0 1)
(2 11 8 1)
(20 21 22 23)
(12 13 21 20)
(13 14 22 21)
(14 15 23 22)
(15 12 20 23)
(5 4 13 12)
(4 7 14 13)
(7 6 15 14)
(6 5 12 15)
);
}
)

mergePatchPairs
(
);


// ************************************************** *********************** //

But the generation of mesh is failed. The result is shown below:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Creating block mesh from "system/blockMeshDict" Creating block edges No non-planar block faces defined Creating topology blocks Creating topology patches Creating block mesh topology Check topology Basic statistics Number of internal faces : 16 Number of boundary faces : 22 Number of defined boundary faces : 22 Number of undefined boundary faces : 0 Checking patch -> block consistency Creating block offsets Creating merge list --> FOAM FATAL ERROR: Inconsistent number of faces between block pair 1 and 5 From function void Foam::blockMesh::calcMergeInfo() in file blockMesh/blockMeshMerge.C at line 223. FOAM exiting

It is appreciated it someone can help me.Thanks.
Kevin Cao is offline   Reply With Quote

Old   August 22, 2019, 05:44
Default
  #2
Senior Member
 
Muhammad Waqas
Join Date: Jul 2014
Location: Germany
Posts: 122
Rep Power: 12
mwaqas is on a distinguished road
Send a message via Skype™ to mwaqas
Hello ziqu,
Here is your error message

Quote:
inconsistent number of faces between block pair 1 and 5
Quote:

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

Your these two blocks have different number of faces for common wall.
I have no idea, how your geometry look like. In short, the common patch/wall should have same number of faces.


Regards
mwaqas is offline   Reply With Quote

Old   August 22, 2019, 09:29
Default
  #3
New Member
 
Ziqu Cao
Join Date: Aug 2019
Location: The University of Glasgow
Posts: 10
Rep Power: 0
Kevin Cao is on a distinguished road
OK. I know where the problem is. The coordinate system is wrong so the index of vertices is totally wrong. Problem solved. anyway. Thanks.
Kevin Cao is offline   Reply With Quote

Old   August 26, 2019, 07:23
Default converting salome unv file to openfoam file
  #4
New Member
 
Kumar
Join Date: Aug 2019
Posts: 10
Rep Power: 7
UKARUN is on a distinguished road
Dear All, I drew a T junction in Salome file and converted into a .unv file. later when I wanted to convert it into an openfoam file using the command ideasUnvToFoam filename.unv, I get an error message. I post the error message below. Can anyone help to solve this problem?

The error message is

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1812 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : v1812 OPENFOAM=1812
Arch : "LSB;label=32;scalar=64"
Exec : ideasUnvToFoam Tjunction1.unv
Date : Aug 26 2019
Time : 15:20:10
Host : Arun
PID : 1102
I/O : uncollated
Case : /mnt/c/Users/Ebenezer/Downloads/OpenFOAM/OpenFOAM-v1812/tutorials/incompressible/simpleFoam/Tjunction2
nProcs : 1
trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Processing tag:164
Starting reading units at line 3.
l:1
units:" SI: Meter (newton)"
unitType:2
Unit factors:
Length scale : 1
Force scale : 1
Temperature scale : 1
Temperature offset : 273.15


Processing tag:2420
Skipping tag 2420 on line 9
Skipping section at line 9.

Processing tag:2411
Starting reading points at line 20.
Read 11776 points.

Processing tag:2412
Starting reading cells at line 23575.
First occurrence of element type 11 for cell 1 at line 23576
First occurrence of element type 44 for cell 361 at line 24656
First occurrence of element type 115 for cell 3511 at line 30956
Read 10125 cells and 3150 boundary faces.

Sorting boundary faces according to group (patch)

Constructing mesh with non-default patches of size:

--> FOAM Warning :
From function Foam:olyMesh:olyMesh(const Foam::IOobject&, Foam:ointField&&, const cellShapeList&, const faceListList&, const wordList&, const wordList&, const Foam::word&, const Foam::word&, const wordList&, bool)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 590
Found 3150 undefined faces in mesh; adding to default patch.
End
UKARUN is offline   Reply With Quote

Old   August 26, 2019, 07:49
Default
  #5
Senior Member
 
Muhammad Waqas
Join Date: Jul 2014
Location: Germany
Posts: 122
Rep Power: 12
mwaqas is on a distinguished road
Send a message via Skype™ to mwaqas
Hello Ukarun,


I am not sure about this problem. But from this message it is looking like that some of your boundary faces are undefined in your mesh.
Define every wall/face in your mesh and then try to convert it again.

Quote:
Found 3150 undefined faces in mesh; adding to default patch.

Regards
mwaqas is offline   Reply With Quote

Old   August 28, 2019, 03:47
Default
  #6
New Member
 
Kumar
Join Date: Aug 2019
Posts: 10
Rep Power: 7
UKARUN is on a distinguished road
Thank you so much
UKARUN is offline   Reply With Quote

Old   August 28, 2019, 03:50
Default
  #7
New Member
 
Kumar
Join Date: Aug 2019
Posts: 10
Rep Power: 7
UKARUN is on a distinguished road
Quote:
Originally Posted by UKARUN View Post
Thank you so much
Dear Waqas, Let me post the boundary conditions of my T junction channel. I have included all the walls, top, bottom, front and back under the category of Walls. I did not distinguish between them. My blockMeshDict file is

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


scale 0.001;

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

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

edges
(
);

patches
(
patch inlet_one
(
(0 10 11 1)
)

patch inlet_two
(
(6 7 17 16)
)
patch outlet
(
(4 3 13 14)
)

);


wall Walls
(
(0 1 2 9)
(2 5 8 9)
(5 6 7 8)
(2 3 4 5)
(10 19 12 11)
(19 18 15 12)
(18 17 16 15)
(15 14 13 12)
(0 9 19 10)
(9 8 18 19)
(8 7 17 18)
(2 1 11 12)
(3 2 12 13)
(5 4 14 15)
(6 5 15 16)
)


mergePatchPairs
(
);
UKARUN is offline   Reply With Quote

Old   August 28, 2019, 03:53
Default My boundary condtions are
  #8
New Member
 
Kumar
Join Date: Aug 2019
Posts: 10
Rep Power: 7
UKARUN is on a distinguished road
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1812 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

4
(
inlet_one
{
type patch;
nFaces 100;
startFace 27900;
}
inlet_two
{
type patch;
nFaces 100;
startFace 28000;
}
outlet
{
type patch;
nFaces 100;
startFace 28100;
}
defaultFaces
{
type empty;
inGroups 1(empty);
nFaces 3900;
startFace 28200;
}
)
UKARUN is offline   Reply With Quote

Old   August 28, 2019, 04:05
Default error in boundaryField
  #9
New Member
 
Kumar
Join Date: Aug 2019
Posts: 10
Rep Power: 7
UKARUN is on a distinguished road
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

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

inlet_two
{
type fixedvalue;
value uniform (-0.2 0 0);
}

outlet
{
type zeroGradient;
}

Walls
{
type fixedValue;
value uniform (0 0 0);
}


}

// ************************************************** *********************** //
UKARUN is offline   Reply With Quote

Old   August 28, 2019, 04:15
Default
  #10
Senior Member
 
Muhammad Waqas
Join Date: Jul 2014
Location: Germany
Posts: 122
Rep Power: 12
mwaqas is on a distinguished road
Send a message via Skype™ to mwaqas
What is the problem? I didn't get, what are you trying to ask
mwaqas is offline   Reply With Quote

Reply

Tags
blockmeshdict


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
Getting Started with OpenFOAM wyldckat OpenFOAM 26 June 21, 2024 07:54
OpenFOAM course for beginners Jibran OpenFOAM Announcements from Other Sources 2 November 4, 2019 09:51
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 cfd.direct OpenFOAM Announcements from Other Sources 2 August 31, 2015 14:36
Gambit - meshing over airfoil wrapping (?) problem JFDC FLUENT 1 July 11, 2011 06:59
Adventure of fisrst openfoam installation on Ubuntu 710 jussi OpenFOAM Installation 0 April 24, 2008 15:25


All times are GMT -4. The time now is 12:04.