CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [blockMesh] Substitution of y with z in number of cell - definition of blocks (https://www.cfd-online.com/Forums/openfoam-meshing/73733-substitution-y-z-number-cell-definition-blocks.html)

om3ro March 15, 2010 15:46

Substitution of y with z in number of cell - definition of blocks
 
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


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