OpenFoam+Reference+Files

toc //This page contains numerous essential OpenFoam files used by the group such as BlockMeshDict files, ControlDict files, Boundary files etc.//

=OpenFoam User and Programmer Guides:=

[|OpenFoam Programmers Guide] [|OpenFoam User Guide] [|Cylinder Meshing]

=Group User Code Files:=

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

convertToMeters 0.01;

vertices (   (-1 -1 0)    (1 -1 0)    (8 -1 0)    (-.1767 -.1767 0)    (.1767 -.1767 0)    (-.1767 .1767 0)    (.1767 .1767 0)    (-1 1 0)    (1 1 0)    (8 1 0)    (-1 -1 -0.5)    (1 -1 -0.5)    (8 -1 -0.5)    (-.1767 -.1767 -0.5)    (.1767 -.1767 -0.5)    (-.1767 .1767 -0.5)    (.1767 .1767 -0.5)    (-1 1 -0.5)    (1 1 -0.5)    (8 1 -0.5) );

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

edges (   arc 3 5 (-.25 0 0)    arc 5 6 (0 .25 0)    arc 4 6 (.25 0 0)    arc 3 4 (0 -.25 0)    arc 13 15 (-.25 0 -0.5)    arc 15 16 (0 .25 -0.5)    arc 14 16 (.25 0 -0.5)    arc 13 14 (0 -.25 -0.5) );

boundary (

inlet {       type patch; faces (           (10 17 7 0)        );    }    outlet {       type patch; faces (          (12 2 9 19)        );    }    frontAndBack {       type empty; faces (       (10 11 14 13)        (14 11 18 16)        (15 16  18 17)        (10 13 15 17)        (11 12 19 18)        (0 1 4 3)        (4 1 8 6)        (5 6 8 7)        (0 3 5 7)        (1 2 9 8)        );    }    topAndBottom {   type symmetryPlane; faces (       (17 18 8 7)        (18 19 9 8)        (10 0 1 11)        (11 1 2 12)    );   }   cylinder {   type wall; faces (       (13 3 5 15)        (15 5 6 16)        (14 16 6 4)        (13 14 4 3)    );   } );

mergePatchPairs ;

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

code

One Cylinder Boundary File:
code /**- C++ -*--*\ \*---*/ FoamFile {   version     2.0; format     ascii; class      polyBoundaryMesh; location   "constant/polyMesh"; object     boundary; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 * \\     /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
 * \\   /   O peration     | Version:  2.0.0                                 |
 * \\ /    A nd           | Web:      www.OpenFOAM.com                      |
 * \\/    M anipulation  |                                                 |
 * \\/    M anipulation  |                                                 |

5 (   inlet    {        type            patch;        nFaces          20;        startFace       6240;    }    outlet    {        type            patch;        nFaces          20;        startFace       6260;    }    frontAndBack    {        type            empty;        nFaces          6400;        startFace       6280;    }    topAndBottom    {        type            symmetryPlane;        nFaces          200;        startFace       12680;    }    cylinder    {        type            wall;        nFaces          80;        startFace       12880;    } )

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

code

One Cylinder ControlDict File:
code /**- C++ -*--*\ \*---*/ FoamFile {   version     2.0; format     ascii; class      dictionary; location   "system"; object     controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 * \\     /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
 * \\   /   O peration     | Version:  2.0.0                                 |
 * \\ /    A nd           | Web:      www.OpenFOAM.com                      |
 * \\/    M anipulation  |                                                 |
 * \\/    M anipulation  |                                                 |

application    icoFoam;

startFrom      startTime;

startTime      0;

stopAt         endTime;

endTime        42;

deltaT         0.007;

writeControl   timeStep;

writeInterval  1000;

purgeWrite     0;

writeFormat    ascii;

writePrecision 6;

writeCompression off;

timeFormat     general;

timePrecision  6;

runTimeModifiable true;

functions {

forces {       type forceCoeffs; functionObjectLibs ("libforces.so"); enabled   true;

outputControl timeStep; outputInterval 1;

patches (cylinder); rhoName   rhoInf; rhoInf 1000; log true;

CofR (0 0 0); liftDir (0 1 0); dragDir (1 0 0); pitchAxis (0 0 0);

magUInf .0141; lRef 1; Aref 7.85e-5; } }

// ************************************************************************* // code

Two Cylinder blockMeshDict File 1:
code /**- C++ -*--*\ \*---*/ FoamFile {   version     2.0; format     ascii; class      dictionary; object     blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 * \\     /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
 * \\   /   O peration     | Version:  2.0.0                                 |
 * \\ /    A nd           | Web:      www.OpenFOAM.com                      |
 * \\/    M anipulation  |                                                 |
 * \\/    M anipulation  |                                                 |

convertToMeters 0.01;

vertices (	(-2 -2 0)	(1 -2 0)	(3 -2 0)	(15 -2 0)	(-0.354 -0.354 0)	(0.354 -0.354 0)	(1.646 -0.354 0)	(2.354 -0.354 0)	(-0.354 0.354 0)	(0.354 0.354 0)	(1.646 0.354 0)	(2.354 0.354 0)	(-2 2 0)	(1 2 0)	(3 2 0)	(15 2 0)

(-2 -2 -0.5)	(1 -2 -0.5)	(3 -2 -0.5)	(15 -2 -0.5)	(-0.354 -0.354 -0.5)	(0.354 -0.354 -0.5)	(1.646 -0.354 -0.5)	(2.354 -0.354 -0.5)	(-0.354 0.354 -0.5)	(0.354 0.354 -0.5)	(1.646 0.354 -0.5)	(2.354 0.354 -0.5)	(-2 2 -0.5)	(1 2 -0.5)	(3 2 -0.5)	(15 2 -0.5) );

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

edges (	arc 4 5 	(0	-0.5 	0)	arc 5 9 	(0.5 	0	0)	arc 9 8 	(0 	0.5 	0)	arc 8 4 	(-0.5 	0 	0)	arc 6 7		(2 	-0.5 	0)	arc 7 11	(2.5 	0	0) 	arc 11 10	(2 	0.5 	0)	arc 10 6	(1.5 	0 	0)

arc 20 21	(0	-0.5 	-0.5) arc 21 25	(0.5	0 	-0.5) arc 25 24	(0 	0.5 	-0.5) arc 24 20	(-0.5 	0 	-0.5) arc 22 23	(2 	-0.5 	-0.5) arc 23 27	(2.5 	0	-0.5) arc 27 26	(2 	0.5 	-0.5) arc 26 22	(1.5 	0 	-0.5) );

boundary (   inlet    {        type patch;        faces        ( (0 12 28 16)       );    }

outlet {       type patch; faces (          (3 19 31 15)        );    }

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

);   }

topAndBottom {	type symmetryPlane; faces (		(0 16 17 1)		(1 17 18 2)		(2 18 19 3)		(14 15 31 30)		(13 14 30 29)		(12 13 29 28)	);  }

cylinder_1 {	type wall; faces (		(8 4 20 24)		(4 5 21 20)		(5 9 25 21)		(8 24 25 9)

);  }

cylinder_2 {	type wall; faces (		(10 6 22 26)		(6 7 23 22)		(7 11 27 23)		(10 26 27 11)

);  }

);

mergePatchPairs ;

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

code

Two Cylinder Boundary File 1:
code /**- C++ -*--*\ \*---*/ FoamFile {   version     2.0; format     ascii; class      polyBoundaryMesh; location   "constant/polyMesh"; object     boundary; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 * \\     /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
 * \\   /   O peration     | Version:  2.0.0                                 |
 * \\ /    A nd           | Web:      www.OpenFOAM.com                      |
 * \\/    M anipulation  |                                                 |
 * \\/    M anipulation  |                                                 |

6 (   inlet    {        type            patch;        nFaces          100;        startFace       25300;    }    outlet    {        type            patch;        nFaces          100;        startFace       25400;    }    frontAndBack    {        type            empty;        nFaces          1800;        startFace       25500;    }    topAndBottom    {        type            symmetryPlane;        nFaces          600;        startFace       27300;    }    cylinder_1    {        type            wall;        nFaces          400;        startFace       27900;    }    cylinder_2    {        type            wall;        nFaces          400;        startFace       28300;    } )

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

code

Two Cylinder ControlDict File 1:
code /**- C++ -*--*\ \*---*/ FoamFile {   version     2.0; format     ascii; class      dictionary; location   "system"; object     controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 * \\     /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
 * \\   /   O peration     | Version:  2.0.0                                 |
 * \\ /    A nd           | Web:      www.OpenFOAM.com                      |
 * \\/    M anipulation  |                                                 |
 * \\/    M anipulation  |                                                 |

application    icoFoam;

startFrom      startTime;

startTime      0;

stopAt         endTime;

endTime        20;

deltaT         0.01;

writeControl   timeStep;

writeInterval  500;

purgeWrite     0;

writeFormat    ascii;

writePrecision 6;

writeCompression off;

timeFormat     general;

timePrecision  6;

runTimeModifiable true;

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

code

Two Cylinder blockMeshDict File 2:
code /**- C++ -*--*\ \*---*/ FoamFile {   version     2.0; format     ascii; class      dictionary; object     blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 * \\     /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
 * \\   /   O peration     | Version:  2.0.0                                 |
 * \\ /    A nd           | Web:      www.OpenFOAM.com                      |
 * \\/    M anipulation  |                                                 |
 * \\/    M anipulation  |                                                 |

convertToMeters 0.01;

vertices (	(-3.606 -3.606 0)	(3.606 -3.606 0)	(26 -3.606 0)	(-0.75 -0.5 0)	(0.75 -0.5 0)	(-0.25 0 0)	(0.25 0 0)	(-0.75 0.5 0)	(0.75 0.5 0)	(-3.606 3.606 0)	(3.606 3.606 0)	(26 3.606 0)	(-3.606 -3.606 -0.5)	(3.606 -3.606 -0.5)	(26 -3.606 -0.5)	(-0.75 -0.5 -0.5)	(0.75 -0.5 -0.5)	(-0.25 0 -0.5)	(0.25 0 -0.5)	(-0.75 0.5 -0.5)	(0.75 0.5 -0.5)	(-3.606 3.606 -0.5)	(3.606 3.606 -0.5)	(26 3.606 -0.5) );

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

);

edges (	arc 3 7 (-1.25 0 0)	arc 3 5 (-0.396 -0.354 0)	arc 5 7 (-0.396 0.354 0)	arc 15 19 (-1.25 0 -0.5)	arc 15 17 (-0.396 -0.354 -0.5)	arc 17 19 (-0.396 0.354 -0.5)	arc 4 8 (1.25 0 0)	arc 4 6 (0.396 -0.354 0)	arc 6 8 (0.396 0.354 0)	arc 16 20 (1.25 0 -0.5)	arc 16 18 (0.396 -0.354 -0.5)	arc 18 20 (0.396 0.354 -0.5) );

boundary (

inlet {       type patch; faces (           (0 9 21 12)        );    }    outlet {       type patch; faces (          (2 14 23 11)        );    }    frontAndBack {       type empty; faces (		(0 3 7 9)		(0 1 4 3)		(4 1 10 8)		(7 8 10 9)		(3 4 6 5)		(5 6 8 7)		(1 2 11 10)		(12 21 19 15)		(12 15 16 13)		(16 20 22 13)		(19 21 22 20)		(15 17 18 16)		(17 19 20 18)		(13 22 23 14)       );    }    topAndBottom {	type symmetryPlane; faces (		(9 10 22 21)		(10 11 23 22)		(0 12 13 1)		(1 13 14 2)

);  }   cylinder   {	type wall;	faces	( (3 15 19 7)		(4 16 18 6)		(6 18 20 8)		(4 8 20 16)		(3 5 17 15)		(5 7 19 17)

);  } );

mergePatchPairs ;

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

code

Two Cylinder Boundary File 2:
code /**- C++ -*--*\ \*---*/ FoamFile {   version     2.0; format     ascii; class      polyBoundaryMesh; location   "constant/polyMesh"; object     boundary; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 * \\     /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
 * \\   /   O peration     | Version:  2.0.0                                 |
 * \\ /    A nd           | Web:      www.OpenFOAM.com                      |
 * \\/    M anipulation  |                                                 |
 * \\/    M anipulation  |                                                 |

5 (   inlet    {        type            patch;        nFaces          10;        startFace       1910;    }    outlet    {        type            patch;        nFaces          10;        startFace       1920;    }    frontAndBack    {        type            empty;        nFaces          2000;        startFace       1930;    }    topAndBottom    {        type            symmetryPlane;        nFaces          100;        startFace       3930;    }    cylinder    {        type            wall;        nFaces          60;        startFace       4030;    } )

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

code

Two Cylinder ControlDict File 2:
code /**- C++ -*--*\ \*---*/ FoamFile {   version     2.0; format     ascii; class      dictionary; location   "system"; object     controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 * \\     /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
 * \\   /   O peration     | Version:  2.0.0                                 |
 * \\ /    A nd           | Web:      www.OpenFOAM.com                      |
 * \\/    M anipulation  |                                                 |
 * \\/    M anipulation  |                                                 |

application    icoFoam;

startFrom      startTime;

startTime      0;

stopAt         endTime;

endTime        80;

deltaT         0.00002;

writeControl   timeStep;

writeInterval  10000;

purgeWrite     0;

writeFormat    ascii;

writePrecision 6;

writeCompression off;

timeFormat     general;

timePrecision  6;

runTimeModifiable true;

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

code

code

code