CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums

checkMesh for a Hollow Cylinder

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

Rate this Entry

checkMesh for a Hollow Cylinder

Posted August 9, 2021 at 21:23 by binyang

Create a hollow cylinder. Thanks.

Quote:
Originally Posted by zfaraday View Post
The error shown by checkMesh only means that you forgot to define the boundary faces in your blockMeshDict file. By the way, two questions.

First one, you forgot to define one of the arcs, well actually you have defined it in a wrong way. This is the arc going from point 15 to point 8 that you have defined it from 15 to 0.

Second question, why are you using such an amount of blocks to create a cylinder? You can do it with less blocks. Look at your blockMeshDict modified to create your cylinder with the half of the blocks you used:


Code:
/*--------------------------------*- 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
(
(-5.000000 -0.000000 0.000000) // v0
(-2.500000 -4.330127 0.000000) // v1
(0.000000 -5.000000 0.000000) // v2
(2.500000 -4.330127 0.000000) // v3
(5.000000 -0.000000 0.000000) // v4
(2.500000 4.330127 0.000000) // v5
(0.000000 5.000000 0.000000) // v6
(-2.500000 4.330127 0.000000) // v7
(-0.500000 -0.000000 0.000000) // v8
(-0.250000 -0.433013 0.000000) // v9
(0.000000 -0.500000 0.000000) // v10
(0.250000 -0.433013 0.000000) // v11
(0.500000 -0.000000 0.000000) // v12
(0.250000 0.433013 0.000000) // v13
(0.000000 0.500000 0.000000) // v14
(-0.250000 0.433013 0.000000) // v15
(-5.000000 -0.000000 1.000000) // v16
(-2.500000 -4.330127 1.000000) // v17
(0.000000 -5.000000 1.000000) // v18
(2.500000 -4.330127 1.000000) // v19
(5.000000 -0.000000 1.000000) // v20
(2.500000 4.330127 1.000000) // v21
(0.000000 5.000000 1.000000) // v22
(-2.500000 4.330127 1.000000) // v23
(-0.500000 -0.000000 1.000000) // v24
(-0.250000 -0.433013 1.000000) // v25
(0.000000 -0.500000 1.000000) // v26
(0.250000 -0.433013 1.000000) // v27
(0.500000 -0.000000 1.000000) // v28
(0.250000 0.433013 1.000000) // v29
(0.000000 0.500000 1.000000) // v30
(-0.250000 0.433013 1.000000) // v31
);

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

edges
(
arc 0 2 (-3.750000 -3.307189 0.000000) // c0
//arc 1 2 (-1.250000 -4.841229 0.000000) // c1
arc 2 4 (1.250000 -4.841229 0.000000) // c2
//arc 3 4 (3.750000 -3.307189 0.000000) // c3
arc 4 6 (3.750000 3.307189 0.000000) // c4
//arc 5 6 (1.250000 4.841229 0.000000) // c5
arc 6 0 (-1.250000 4.841229 0.000000) // c6
//arc 7 0 (-3.750000 3.307189 0.000000) // c7
arc 8 10 (-0.375000 -0.330719 0.000000) // c8
//arc 9 10 (-0.125000 -0.484123 0.000000) // c9
arc 10 12 (0.125000 -0.484123 0.000000) // c10
//arc 11 12 (0.375000 -0.330719 0.000000) // c11
arc 12 14 (0.375000 0.330719 0.000000) // c12
//arc 13 14 (0.125000 0.484123 0.000000) // c13
arc 14 8 (-0.125000 0.484123 0.000000) // c14
//arc 15 8 (-0.375000 0.330719 0.000000) // c15 0->8
arc 16 18 (-3.750000 -3.307189 1.000000) // c16
//arc 17 18 (-1.250000 -4.841229 1.000000) // c17
arc 18 20 (1.250000 -4.841229 1.000000) // c18
//arc 19 20 (3.750000 -3.307189 1.000000) // c19
arc 20 22 (3.750000 3.307189 1.000000) // c20
//arc 21 22 (1.250000 4.841229 1.000000) // c21
arc 22 16 (-1.250000 4.841229 1.000000) // c22
//arc 23 16 (-3.750000 3.307189 1.000000) // c23
arc 24 26 (-0.375000 -0.330719 1.000000) // c24
//arc 25 26 (-0.125000 -0.484123 1.000000) // c25
arc 26 28 (0.125000 -0.484123 1.000000) // c26
//arc 27 28 (0.375000 -0.330719 1.000000) // c27
arc 28 30 (0.375000 0.330719 1.000000) // c28
//arc 29 30 (0.125000 0.484123 1.000000) // c29
arc 30 24 (-0.125000 0.484123 1.000000) // c30
//arc 31 24 (-0.375000 0.330719 1.000000) // c31
);

boundary // patches
(
    out
    {
        type wall;
        faces
        (
            (0 2 18 16)
            (2 4 20 18)
            (4 6 22 20)
            (6 0 16 22)
        );
    }
    in
    {
        type wall;
        faces
        (
            (10 8 24 26)
            (12 10 26 28)
            (14 12 28 30)
            (8 14 30 24)
        );
    }
);

mergePatchPairs
(
	//( masterpatch slavepatch ) // define connecting faces
);

// ************************************************************************* //
Try to use this file and you will get no errors!

Regards,

Alex
Posted in Uncategorized
Views 179 Comments 0 Edit Tags Email Blog Entry
« Prev     Main     Next »
Total Comments 0

Comments

 

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