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

[blockMesh] Substitution of y with z in number of cell - definition of blocks

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 15, 2010, 15:46
Question Substitution of y with z in number of cell - definition of blocks
  #1
New Member
 
Marco
Join Date: Mar 2010
Posts: 9
Rep Power: 16
om3ro is on a distinguished road
I don't understand why the number of cells in the y and z directions is inverted when running the following code. I can see in paraFoam that in order to obtain the 2D case I must invert the y with z coordinate:

blocks
(
hex (1 7 6 0 3 9 8 2) (20 1 10) simpleGrading (1 1 1)
....
)

instead of

blocks
(
hex (1 7 6 0 3 9 8 2) (20 10 1) simpleGrading (1 1 1)
....
)

This is my constant/polyMesh/blockMeshDict:

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

convertToMeters 0.001;

vertices
(
(-0.8 -3.43 -0.8) // 0
(-0.8 -3.43 0) // 1
(-0.8 -0.38 -0.8) // 2
(-0.8 -0.38 0) // 3
(-0.8 0 -0.8) // 4
(-0.8 0 0) // 5

(0 -3.43 -0.8) // 6
(0 -3.43 0) // 7
(0 -0.38 -0.8) // 8
(0 -0.38 0) // 9
(0 0 -0.8) // 10
(0 0 0) // 11

(0.01 -3.43 -0.8) // 12
(0.01 -3.43 0) // 13
(0.01 -0.38 -0.8) // 14
(0.01 -0.38 0) // 15
(0.01 0 -0.8) // 16
(0.01 0 0) // 17

(0.8 -3.43 -0.8) // 18
(0.8 -3.43 0) // 19
(0.8 -0.38 -0.8) // 20
(0.8 -0.38 0) // 21
(0.8 0 -0.8) // 22
(0.8 0 0) // 23
);

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

edges
(
);

patches
(
patch inlet
(
(3 2 0 1)
(5 4 2 3)
)
patch outlet
(
(19 18 20 21)
(21 20 22 23)
)
wall upperWall
(
(5 11 10 4)
(11 17 16 10)
(17 23 22 16)
)
wall lowerWall
(
(1 0 6 7)
(6 8 9 7)
(9 8 14 15)
(13 15 14 12)
(13 12 18 19)
)
empty frontAndBack
(
(7 9 3 1)
(9 11 5 3)
(15 17 11 9)
(19 21 15 13)
(21 23 17 15)
(0 2 8 6)
(2 4 10 8)
(8 10 16 14)
(12 14 20 18)
(14 16 22 20)
)
);

mergePatchPairs
(
);


/////////////////////////////////////////////////////////////////////////////

Here come 0/p and 0/U:

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

dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
type zeroGradient;
}

outlet
{
type fixedValue;
value uniform 0;
}

upperWall
{
type zeroGradient;
}

lowerWall
{
type zeroGradient;
}

frontAndBack
{
type empty;
}

}

////////////////////////////////////////////////////////////

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
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
{
type fixedValue;
value uniform (0.01 0 0);
}

outlet
{
type zeroGradient;
}

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

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

frontAndBack
{
type empty;
}


}

/////////////////////////////////////////////////////////////

Thanks,

Marco
om3ro 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
[Other] Can't Shake Erros: patch type 'patch' not constraint type 'empty' BrendaEM OpenFOAM Meshing & Mesh Conversion 12 April 3, 2022 18:32
[Other] refineWallLayer Error Yuby OpenFOAM Meshing & Mesh Conversion 2 November 11, 2021 11:04
Fluent UDF wrong number of cells in parallel - correct in serial dralexpe Fluent UDF and Scheme Programming 7 May 17, 2018 08:26
[blockMesh] --> foam fatal error: lillo763 OpenFOAM Meshing & Mesh Conversion 0 March 5, 2014 10:27
Cells with t below lower limit Purushothama Siemens 2 May 31, 2010 21:58


All times are GMT -4. The time now is 16:40.