CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Mesh Generation & Pre-Processing (http://www.cfd-online.com/Forums/mesh-generation/)
-   -   Help -> Meshing of a Cylinder for Pouseuille Flow (http://www.cfd-online.com/Forums/mesh-generation/113320-help-meshing-cylinder-pouseuille-flow.html)

fisherman05 February 18, 2013 00:14

Help -> Meshing of a Cylinder for Pouseuille Flow
 
Hi Everyone,
I'm new using OpenFoam and I've had some problems generating a mesh for a cylinder in which will pass a flow.

I have this code, based on this tutorial http://www.foamcfd.org/Nabla/guides/...Guidese12.html (only the idea, not the vertices or anything else).

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

convertToMeters 0.1;

vertices
(
//Radio Interior Frontal
(0.5 0 0) //0
(0.353553 0.353553 0) //1
(0 0.5 0) //2
(-0.353553 0.353553 0) //3
(-0.5 0 0) //4
(-0.353553 -0.353553 0) //5
(0 -0.5 0) //6
(0.353553 -0.353553 0) //7

//Radio Exterior Frontal
(1 0 0) //8
(0.707106 0.707106 0) //9
(0 1 0) //10
(-0.707106 0.707106 0) //11
(-1 0 0) //12
(-0.707106 -0.707106 0) //13
(0 -1 0) //14
(0.707106 -0.707106 0) //15

//Radio Interior Posterior
(0.5 0 1) //16
(0.353553 0.353553 1) //17
(0 0.5 5) //18
(-0.353553 0.353553 1) //19
(-0.5 0 1) //20
(-0.353553 -0.353553 1) //21
(0 -0.5 1) //22
(0.353553 -0.353553 1) //23

//Radio Exterior Posterior
(1 0 1) //24
(0.707106 0.707106 1) //25
(0 1 1) //26
(-0.707106 0.707106 1) //27
(-1 0 1) //28
(-0.707106 -0.707106 1) //29
(0 -1 1) //30
(0.707106 -0.707106 1) //31
);

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

edges
(
// Circulo Exterior Frontal
arc 8 9 (0.923879 0.38268 0)
arc 9 10 (0.38268 0.923879 0)
arc 10 11 (-0.38268 0.923879 0)
arc 11 12 (-0.923879 0.38268 0)
arc 12 13 (-0.923879 -0.38268 0)
arc 13 14 (-0.38268 -0.923879 0)
arc 14 15 (0.38268 -0.923879 0)
arc 15 8 (0.923879 -0.38268 0)

//Circulo Interior Posterior
arc 16 17 (0.46194 0.19134 1)
arc 17 18 (0.19134 0.46194 1)
arc 18 19 (-0.19134 0.46194 1)
arc 19 20 (-0.46194 0.19134 1)
arc 20 21 (-0.46194 -0.19134 1)
arc 21 22 (-0.19134 -0.46194 1)
arc 22 23 (0.19134 -0.46194 1)
arc 23 16 (0.46194 -0.19134 1)

//Circulo Interior Frontal
arc 0 1 (0.46194 0.19134 0)
arc 1 2 (0.19134 0.46194 0)
arc 2 3 (-0.19134 0.46194 0)
arc 3 4 (-0.46194 0.19134 0)
arc 4 5 (-0.46194 -0.19134 0)
arc 5 6 (-0.19134 -0.46194 0)
arc 6 7 (0.19134 -0.46194 0)
arc 7 0 (0.46194 -0.19134 0)

//Circulo Exterior Posterior
arc 24 25 (0.923879 0.38268 1)
arc 25 26 (0.38268 0.923879 1)
arc 26 27 (-0.38268 0.923879 1)
arc 27 28 (-0.923879 0.38268 1)
arc 28 29 (-0.923879 -0.38268 1)
arc 29 30 (-0.38268 -0.923879 1)
arc 30 31 (0.38268 -0.923879 1)
arc 31 24 (0.923879 -0.38268 1)
);

boundary
(
ParedesFrontalLateral
{
type wall;
faces
(
(0 1 8 9)
(16 17 24 25)
(1 2 9 10)
(17 18 25 26)
(2 3 10 11)
(18 19 26 27)
(3 4 11 12)
(19 20 27 28)
(4 5 12 13)
(20 21 28 29)
(5 6 13 14)
(21 22 29 30)
(6 7 14 15)
(22 23 30 31)
(7 0 15 8)
(23 16 31 24)

);
}

Cilindro
{
type wall;
faces
(
//Externo


);
}

);

mergePatchPairs
(
);

It runs ok with the bockMesh command, but when I try to use it with paraFoam, it inmmedeatly closes and throws an error. I don't really understand why.


In the other hand, I want to specify the inner circles as an empty patches...┐how can I do it? and ┐How can I specify a type of flow for this faces?

Thank you for your help :)


All times are GMT -4. The time now is 07:59.