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

[blockMesh] blockMesh to generate the mesh of a deep cavity

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 2, 2015, 11:13
Default blockMesh to generate the mesh of a deep cavity
  #1
Member
 
DongHo
Join Date: Jul 2013
Posts: 51
Rep Power: 13
eddykendo is on a distinguished road
Dear. Foamers

Hi..

I am trying to generate a mesh for a deep cavity.
However, there were some of errors in generating it as follows(blockMeshDict, error message).
I will appreciate it if someone can check a blockMeshDict file and give a good advice for me.

Thank you.



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

convertToMeters 1;

vertices
(
(0.0 0.0 -0.05)
(0.05 0.0 -0.05)
(0.05 -0.12 -0.05)
(0.1 -0.12 -0.05)
(0.1 0.0 -0.05)
(0.3 0.0 -0.05)
(0.0 0.1 -0.05)
(0.05 0.1 -0.05)
(0.1 0.1 -0.05)
(0.3 0.1 -0.05)
(0.0 0.0 0.05)
(0.05 0.0 0.05)
(0.05 -0.12 0.05)
(0.1 -0.12 0.05)
(0.1 0.0 0.05)
(0.3 0.0 0.05)
(0.0 0.1 0.05)
(0.05 0.1 0.05)
(0.1 0.1 0.05)
(0.3 0.1 0.05)


);

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

edges
(
);

boundary
(
inlet
{
type patch;
faces
(
(0 6 16 10)
);
}
outlet
{
type patch;
faces
(
(5 9 19 15)
);
}
/* cavity
{
type wall;
faces
(
(2 3 13 12) //(0 10 11 1)
);
}
*/
top
{
type symmetryPlane;
faces
(
(6 16 17 7)
(7 17 18 8)
(8 18 19 9)
);
}
bottom
{
type wall;
faces
(
(0 1 11 10)
(1 2 12 11)
(2 3 13 12)
(3 4 14 13)
(4 5 15 14)
);
}
);

mergePatchPairs
(
);

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



/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.3.0-f5222ca19ce6
Exec : blockMesh
Date : Jul 02 2015
Time : 23:06:37
Host : "user-All-Series"
PID : 2982
Case : /home/user/OpenFOAM/user-2.3.0/run/forwardStep
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

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

Creating block mesh from
"/home/user/OpenFOAM/user-2.3.0/run/forwardStep/constant/polyMesh/blockMeshDict"
Creating curved edges
Creating topology blocks
Creating topology patches

Creating block mesh topology
--> FOAM Warning :
From function polyMesh:olyMesh(... construct from shapes...)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 903
Found 8 undefined faces in mesh; adding to default patch.

Check topology

Basic statistics
Number of internal faces : 3
Number of boundary faces : 18
Number of defined boundary faces : 18
Number of undefined boundary faces : 0
Checking patch -> block consistency

Creating block offsets
Creating merge list .

Creating polyMesh from blockMesh
Creating patches
Creating cells
Creating points with scale 1
Block 0 cell size :
i : 0.00104167 .. 0.00104167
j : 0.00625 .. 0.00625
k : 0.1 .. 0.1

Block 1 cell size :
i : 0.00104167 .. 0.00104167
j : 0.0075 .. 0.0075
k : 0.1 .. 0.1

Block 2 cell size :
i : 0.00104167 .. 0.00104167
j : 0.00625 .. 0.00625
k : 0.1 .. 0.1

Block 3 cell size :
i : 0.00416667 .. 0.00416667
j : 0.00625 .. 0.00625
k : 0.1 .. 0.1


Writing polyMesh
----------------
Mesh Information
----------------
boundingBox: (0 -0.12 -0.05) (0.3 0.1 0.05)
nPoints: 6498
nCells: 3072
nFaces: 12464
nInternalFaces: 5968
----------------
Patches
----------------
patch 0 (start: 5968 size: 16) name: inlet
patch 1 (start: 5984 size: 16) name: outlet
patch 2 (start: 6000 size: 144) name: top
patch 3 (start: 6144 size: 176) name: bottom
patch 4 (start: 6320 size: 6144) name: defaultFaces

End
eddykendo is offline   Reply With Quote

Old   July 3, 2015, 10:42
Default
  #2
Member
 
Alexander Bartel
Join Date: Feb 2015
Location: Germany
Posts: 97
Rep Power: 11
alexB is on a distinguished road
Hi Dong Ho,

could you draw a sketch of your geometry... that would help me to visualize your mesh.

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 4, 2015, 23:02
Default
  #3
Member
 
DongHo
Join Date: Jul 2013
Posts: 51
Rep Power: 13
eddykendo is on a distinguished road
Hi.. Alex

Thank you for your response.
I managed to generate a mesh for a supersonic cavity.
However, that is not good enough because I will need grid grading in multi-direction. I know that OpenFOAM versions before v2.40 do not provide the multi-grading of the grid. I guess I might be able to generate the mesh I will eventually need if I divide a domain into many blocks. But, dividing it more blocks will be quite tedious works. So, I'd like to know if there is a good way to generate the mesh like that. I have attached the mesh I generated. The left side is an inlet and the right side is outlet. The top and bottom sides are walls. As you know, the mesh will need to be expanded from both walls on the top and bottom, also from the sides of the cavity.
So, can OpenFOAM v 2.40 be installed into Ubuntu 12.04 LTS? It is said on the web that OpenFOAM v2.40 can be installed into Ubuntu 14.04 LTS though.. Is there any way to install OpenFOAM v2.40 into Ubuntu 12.04 LTS? since v2.40 can provide multi-grading mesh.

I will appreciate it if you can let me know these kinds of things.


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

convertToMeters 0.1;

vertices
(
(0 0 0)
(1 0 0)
(1 1 0)
(0 1 0)
(0 0 0.1)
(1 0 0.1)
(1 1 0.1)
(0 1 0.1)
);

blocks
(
hex (0 1 2 3 4 5 6 7) (20 20 1) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
movingWall
{
type wall;
faces
(
(3 7 6 2)
);
}
fixedWalls
{
type wall;
faces
(
(0 4 7 3)
(2 6 5 1)
(1 5 4 0)
);
}
frontAndBack
{
type empty;
faces
(
(0 3 2 1)
(4 5 6 7)
);
}
);

mergePatchPairs
(
);

// ************************************************** *********************** //
Attached Images
File Type: jpg cavity.jpg (85.6 KB, 25 views)
eddykendo is offline   Reply With Quote

Old   July 4, 2015, 23:06
Default blockMeshDict file
  #4
Member
 
DongHo
Join Date: Jul 2013
Posts: 51
Rep Power: 13
eddykendo is on a distinguished road
Sorry I have attached a wrong file.
This is my blockMeshDict file for a supersonic cavity.

Thanks

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

convertToMeters 1;

vertices
(
(0.0 0.0 -0.06)
(0.05 0.0 -0.06)
(-0.05 0.12 -0.06)
(0.0 0.12 -0.06)
(0.05 0.12 -0.06)
(0.25 0.12 -0.06)
(-0.05 0.22 -0.06)
(0.0 0.22 -0.06)
(0.05 0.22 -0.06)
(0.25 0.22 -0.06)
(0.0 0.0 0.06)
(0.05 0.0 0.06)
(-0.05 0.12 0.06)
(0.0 0.12 0.06)
(0.05 0.12 0.06)
(0.25 0.12 0.06)
(-0.05 0.22 0.06)
(0.0 0.22 0.06)
(0.05 0.22 0.06)
(0.25 0.22 0.06)


);

blocks
(
hex (0 1 4 3 10 11 14 13) (72 96 32) simpleGrading (4 0.25 1)
/* simpleGrading
(
(
(0.2 0.3 4)
(0.6 0.4 1)
(0.2 0.3 0.25)
)
(
(0.2 0.3 4)
(0.6 0.4 1)
(0.2 0.3 0.25)
)
1
) */
hex (2 3 7 6 12 13 17 16) (72 64 32) simpleGrading (0.25 4 1)
/* simpleGrading
(
(
(0.4 0.3 4)
(0.6 0.7 0.25)
)
(
(0.4 0.3 4)
(0.6 0.7 0.25)
)
1
) */
hex (3 4 8 7 13 14 18 17) (72 64 32) simpleGrading (4 4 1)
/* simpleGrading
(
(
(0.2 0.3 4)
(0.6 0.4 1)
(0.2 0.3 0.25)
)
(
(0.4 0.3 4)
(0.6 0.7 0.25)
)
1
) */
hex (4 5 9 8 14 15 19 18) (96 64 32) simpleGrading (8 4 1)
/* simpleGrading
(
(
(0.4 0.3 4)
(0.6 0.7 0.25)
)
(
(0.4 0.3 4)
(0.6 0.7 0.25)
)
1
) */
);

edges
(
);

boundary
(
inlet
{
type patch;
faces
(
(2 6 16 12)
);
}
outlet
{
type patch;
faces
(
(5 9 19 15)
);
}
/* cavity
{
type wall;
faces
(
(2 3 13 12) //(0 10 11 1)
);
}
*/
top
{
type wall; //symmetryPlane;
faces
(
(6 16 17 7)
(7 17 18 8)
(8 18 19 9)
);
}
bottom
{
type wall;
faces
(
(2 3 13 12)
(3 0 10 13)
(0 1 11 10)
(1 4 14 11)
(4 5 15 14)
);
}
back
{
type empty;
faces
(
(0 3 4 1)
(2 6 7 3)
(3 7 8 4)
(4 8 9 5)
);
}
front
{
type empty;
faces
(
(10 13 14 11)
(12 16 17 13)
(13 17 18 14)
(14 18 19 15)
);
}

);

mergePatchPairs
(
);

// ************************************************** *********************** //
eddykendo is offline   Reply With Quote

Old   July 5, 2015, 17:54
Default
  #5
Member
 
Alexander Bartel
Join Date: Feb 2015
Location: Germany
Posts: 97
Rep Power: 11
alexB is on a distinguished road
sorry, I didn't realized your new questions the post before...

I don't know much about multigrading and installation issues...

Perhaps you post your question about the installation of OF2.4 in another subforum.

regards
Alex
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.

Last edited by alexB; July 6, 2015 at 09:26.
alexB 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
[ANSYS Meshing] How to generate this mesh Yassin ANSYS Meshing & Geometry 0 February 28, 2017 01:15
[Gmsh] gMsh instead of blockMesh for base mesh, then snappyHexMesh sazabi2001 OpenFOAM Meshing & Mesh Conversion 0 February 23, 2017 13:00
[snappyHexMesh] Snappyhex mesh: poor inlet mesh Swagga5aur OpenFOAM Meshing & Mesh Conversion 1 December 3, 2016 17:59
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 15:09
[Other] Problem when trying to generate a new mesh gaottino OpenFOAM Meshing & Mesh Conversion 0 June 30, 2006 08:51


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