|
[Sponsors] |
[blockMesh] Trouble building blockMeshDict for cylinder in Karman vortex simulation |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 18, 2023, 19:00 |
Trouble building blockMeshDict for cylinder in Karman vortex simulation
|
#1 |
New Member
Jack Nesbitt
Join Date: Oct 2023
Posts: 1
Rep Power: 0 |
I'm very new to this, this is my first time using GMSH/OpenFOAM/Paraview. I am having trouble understanding why this blockMeshDict I've written does not work.
I have been attempting to model a cylinder in a Karman vortex simulation, following the block layout in the attached image. When I navigate to the correct folder and run "blockMesh" I get this error message. ------------------------------------------------------------------ Create time Creating block mesh from "system/blockMeshDict" Creating block edges No non-planar block faces defined Creating topology blocks --> FOAM FATAL IO ERROR: Block hex (0 1 2 3 4 5 6 7) (20 20 1) simpleGrading (1(1) 1(1) 1(1)) is inside-out file: D:/BlueCFD_Files/OpenFOAM_Files/cylinderKarman/system/blockMeshDict/blocks at line 133. From function void Foam::blockDescriptor::check(const Foam::Istream&) in file blockDescriptor/blockDescriptor.C at line 100. FOAM exiting ------------------------------------------------------------------ My code within the blockMeshDict is as follows (the weird coordinates where the cylinder is split into the different blocks was provided to me from material, I can not change this): ------------------------------------------------------------------ /*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 8 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 0.1; vertices ( // block A/0: (-5 -5 0) //Vertex A0 = 0 (-2 -5 0) //Vertex A1 = 1 (-2 -5 1) //Vertex A2 = 2 (-5 -5 1) //Vertex A3 = 3 (-5 -2 0) //Vertex A4 = 4 (-2 -2 0) //Vertex A5 = 5 (-2 -2 1) //Vertex A6 = 6 (-5 -2 1) //Vertex A7 = 7 // block B/1: (-2 -5 0) //Vertex B0 = 8 (2 -5 0) //Vertex B1 = 9 (2 -5 1) //Vertex B2 = 10 (-2 -5 1) //Vertex B3 = 11 (-2 -2 0) //Vertex B4 = 12 (2 -2 0) //Vertex B5 = 13 (2 -2 1) //Vertex B6 = 14 (-2 -2 1) //Vertex B7 = 15 // block C/2: (2 -5 0) //Vertex C0 = 16 (25 -5 0) //Vertex C1 = 17 (25 -5 1) //Vertex C2 = 18 (2 -5 1) //Vertex C3 = 19 (2 -2 0) //Vertex C4 = 20 (25 -2 0) //Vertex C5 = 21 (25 -2 1) //Vertex C6 = 22 (2 -2 1) //Vertex C7 = 23 // block D/3: (-5 -2 0) //Vertex D0 = 24 (-2 -2 0) //Vertex D1 = 25 (-2 -2 1) //Vertex D2 = 26 (-5 -2 1) //Vertex D3 = 27 (-5 2 0) //Vertex D4 = 28 (-2 2 0) //Vertex D5 = 29 (-2 2 1) //Vertex D6 = 30 (-5 2 1) //Vertex D7 = 31 // block E/4: (-2 -2 0) //Vertex E0 = 32 (-0.353552 -0.353552 0) //Vertex E1 = 33 (-0.353552 -0.353552 1) //Vertex E2 = 34 (-2 -2 1) //Vertex E3 = 35 (-2 2 0) //Vertex E4 = 36 (-0.353552 0.353552 0) //Vertex E5 = 37 (-0.353552 0.353552 1) //Vertex E6 = 38 (-2 2 1) //Vertex E7 = 39 // block F/5: (-2 -2 0) //Vertex F0 = 40 (2 -2 0) //Vertex F1 = 41 (2 -2 1) //Vertex F2 = 42 (-2 -2 1) //Vertex F3 = 43 (-0.353552 -0.353552 0) //Vertex F4 = 44 (0.353552 -0.353552 0) //Vertex F5 = 45 (0.353552 -0.353552 1) //Vertex F6 = 46 (-0.353552 -0.353552 1) //Vertex F7 = 47 // block G/6: (0.353552 -0.353552 0) //Vertex G0 = 48 (2 -2 0) //Vertex G1 = 49 (2 -2 1) //Vertex G2 = 50 (0.353552 -0.353552 1) //Vertex G3 = 51 (0.353552 0.353552 0) //Vertex G4 = 52 (2 2 0) //Vertex G5 = 53 (2 2 1) //Vertex G6 = 54 (0.353552 0.353552 1) //Vertex G7 = 55 // block H/7: (-0.353552 0.353552 0) //Vertex H0 = 56 (0.353552 0.353552 0) //Vertex H1 = 57 (0.353552 0.353552 1) //Vertex H2 = 58 (-0.353552 0.353552 1) //Vertex H3 = 59 (-2 2 0) //Vertex H4 = 60 (2 2 0) //Vertex H5 = 61 (2 2 1) //Vertex H6 = 62 (-2 2 1) //Vertex H7 = 63 // block I/8: (2 -2 0) //Vertex I0 = 64 (25 -2 0) //Vertex I1 = 65 (25 -2 1) //Vertex I2 = 66 (2 -2 1) //Vertex I3 = 67 (2 2 0) //Vertex I4 = 68 (25 2 0) //Vertex I5 = 69 (25 2 1) //Vertex I6 = 70 (2 2 1) //Vertex I7 = 71 // block J/9: (-5 2 0) //Vertex J0 = 72 (-2 -2 0) //Vertex J1 = 73 (-2 -2 1) //Vertex J2 = 74 (-5 2 1) //Vertex J3 = 75 (-5 5 0) //Vertex J4 = 76 (-2 5 0) //Vertex J5 = 77 (-2 5 1) //Vertex J6 = 78 (-5 5 1) //Vertex J7 = 79 // block K/10: (-2 2 0) //Vertex K0 = 80 (2 2 0) //Vertex K1 = 81 (2 2 1) //Vertex K2 = 82 (-2 2 1) //Vertex K3 = 83 (-2 5 0) //Vertex K4 = 84 (2 5 0) //Vertex K5 = 85 (2 5 1) //Vertex K6 = 86 (-2 5 1) //Vertex K7 = 87 // block L/11: (2 2 0) //Vertex L0 = 88 (25 2 0) //Vertex L1 = 89 (25 2 1) //Vertex L2 = 90 (2 2 1) //Vertex L3 = 91 (2 5 0) //Vertex L4 = 92 (25 5 0) //Vertex L5 = 93 (25 5 1) //Vertex L6 = 94 (2 5 1) //Vertex L7 = 95 ); blocks ( hex (0 1 2 3 4 5 6 7) (20 20 1) simpleGrading (1 1 1) //block A = 0 hex (8 9 10 11 12 13 14 15) (20 20 1) simpleGrading (1 1 1) //block B = 1 hex (16 17 18 19 20 21 22 23) (20 20 1) simpleGrading (1 1 1) //block C = 2 hex (24 25 26 27 28 29 30 31) (20 20 1) simpleGrading (1 1 1) //block D = 3 hex (32 33 34 35 36 37 38 39) (20 20 1) edgeGrading (1 1 1 1 2 2 2 2 3 3 3 3) //block E = 4 hex (40 41 42 43 44 45 46 47) (20 20 1) edgeGrading (1 1 1 1 2 2 2 2 3 3 3 3) //block F = 5 hex (48 49 50 51 52 53 54 55) (20 20 1) edgeGrading (1 1 1 1 2 2 2 2 3 3 3 3) //block G = 6 hex (56 57 58 59 60 61 62 63) (20 20 1) edgeGrading (1 1 1 1 2 2 2 2 3 3 3 3) //block H = 7 hex (64 65 66 67 68 69 70 71) (20 20 1) simpleGrading (1 1 1) //block I = 8 hex (72 73 74 75 76 77 78 79) (20 20 1) simpleGrading (1 1 1) //block J = 9 hex (80 81 82 83 84 85 86 87) (20 20 1) simpleGrading (1 1 1) //block K = 10 hex (88 89 90 91 92 93 94 95) (20 20 1) simpleGrading (1 1 1) //block L = 11 ); edges ( arc 25 29 45 (0 1 0) // 45 degrees, y-normal block D/3: 1-->4 (left of cylinder) arc 36 37 45 (1 0 0) // 45 degrees, x-normal block E/4: 1-->2 (bottom of cylinder) arc 48 52 45 (0 1 0) // 45 degrees, y-normal block F/5: 2-->3 (right of cylinder) arc 56 57 45 (1 0 0) // 45 degrees, x-normal block G/6: 4-->3 (top of cylinder) ); boundary ( inlet // patch name { type patch; // patch type for patch 0 faces ( (0 76 79 3) // block face in this patch (A0 J4 J7 A3) ); } // end of 0th patch definition outlet // patch name { type patch; // patch type for patch 1 faces ( (17 93 94 18) // (C2 L6 L7 C3) ); } walls { type wall; faces ( (32 33 34 35) // block D/3: 1-->4 (left of cylinder) (40 41 42 43) // block E/4: 1-->2 (bottom of cylinder) (48 49 50 51) // block F/5: 2-->3 (right of cylinder) (56 57 58 59) // block G/6: 4-->3 (top of cylinder) ); } frontAndBack { type empty; faces ( (0 76 93 17) // (A0 J4 L6 C2) (3 79 94 18) // (A3 J7 L7 C3) ); } ); mergePatchPairs ( ); // ************************************************** *********************** // |
|
October 20, 2023, 03:06 |
|
#2 |
Senior Member
M
Join Date: Dec 2017
Posts: 703
Rep Power: 13 |
I doubt you will find someone here fixing this kind of stuff for you. Blocks are inside-out if you provide the number of corners in a wrong order for example. My advice is to build it block by block. Put in stuff for the first block -> run blockMesh, check its ok. Add the next block -> run blockMesh, check. Repeat until finished.
|
|
November 2, 2023, 13:09 |
|
#3 |
Senior Member
Saeed Jamshidi
Join Date: Aug 2019
Posts: 214
Rep Power: 8 |
This is a blockMesh file for flow over cylinder in:
Code:
\\wsl.localhost\Ubuntu-18.04\home\myfoam\OpenFOAM\myfoam-v2112\run\tutorials\incompressible\pimpleFoam\LES\vortexShed\system Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2112 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // scale 0.02; vertices ( (0 0 -1) // pt 0 (p0f) (8.5857864376 0 -1) // pt 1 (p1f) (11.4142135624 0 -1) // pt 2 (p2f) (40 0 -1) // pt 3 (p3f) (40 13.5857864376 -1) // pt 4 (p4f) (40 16.4142135624 -1) // pt 5 (p5f) (40 30 -1) // pt 6 (p6f) (11.4142135624 30 -1) // pt 7 (p7f) (8.5857864376 30 -1) // pt 8 (p8f) (0 30 -1) // pt 9 (p9f) (0 16.4142135624 -1) // pt 10 (p10f) (0 13.5857864376 -1) // pt 11 (p11f) (8.5857864376 13.5857864376 -1) // pt 12 (p12f) (11.4142135624 13.5857864376 -1) // pt 13 (p13f) (11.4142135624 16.4142135624 -1) // pt 14 (p14f) (8.5857864376 16.4142135624 -1) // pt 15 (p15f) (9.2928932188 14.2928932188 -1) // pt 16 (p16f) (10.7071067812 14.2928932188 -1) // pt 17 (p17f) (10.7071067812 15.7071067812 -1) // pt 18 (p18f) (9.2928932188 15.7071067812 -1) // pt 19 (p19f) (0 0 0) // pt 20 (p0b) (8.5857864376 0 0) // pt 21 (p1b) (11.4142135624 0 0) // pt 22 (p2b) (40 0 0) // pt 23 (p3b) (40 13.5857864376 0) // pt 24 (p4b) (40 16.4142135624 0) // pt 25 (p5b) (40 30 0) // pt 26 (p6b) (11.4142135624 30 0) // pt 27 (p7b) (8.5857864376 30 0) // pt 28 (p8b) (0 30 0) // pt 29 (p9b) (0 16.4142135624 0) // pt 30 (p10b) (0 13.5857864376 0) // pt 31 (p11b) (8.5857864376 13.5857864376 0) // pt 32 (p12b) (11.4142135624 13.5857864376 0) // pt 33 (p13b) (11.4142135624 16.4142135624 0) // pt 34 (p14b) (8.5857864376 16.4142135624 0) // pt 35 (p15b) (9.2928932188 14.2928932188 0) // pt 36 (p16b) (10.7071067812 14.2928932188 0) // pt 37 (p17b) (10.7071067812 15.7071067812 0) // pt 38 (p18b) (9.2928932188 15.7071067812 0) // pt 39 (p19b) ); blocks ( // 0 hex (0 1 12 11 20 21 32 31) ( 120 80 1 ) simpleGrading (1 0.2 1) // 1 hex (1 2 13 12 21 22 33 32) ( 40 80 1 ) simpleGrading (1 0.2 1) // 2 hex (2 3 4 13 22 23 24 33) ( 400 80 1 ) simpleGrading (1 0.2 1) // 3 hex (13 4 5 14 33 24 25 34) ( 400 40 1 ) simpleGrading (1 1 1) // 4 hex (14 5 6 7 34 25 26 27) ( 400 80 1 ) simpleGrading (1 5 1) // 5 hex (15 14 7 8 35 34 27 28) ( 40 80 1 ) simpleGrading (1 5 1) // 6 hex (10 15 8 9 30 35 28 29) ( 120 80 1 ) simpleGrading (1 5 1) // 7 hex (11 12 15 10 31 32 35 30) ( 120 40 1 ) simpleGrading (1 1 1) // 8 hex (12 16 19 15 32 36 39 35) ( 80 40 1 ) simpleGrading (0.025 1 1) // 9 hex (12 13 17 16 32 33 37 36) ( 40 80 1 ) simpleGrading (1 0.025 1) // 10 hex (17 13 14 18 37 33 34 38) ( 80 40 1 ) simpleGrading (40 1 1) // 11 hex (19 18 14 15 39 38 34 35) ( 40 80 1 ) simpleGrading (1 40 1) ); edges ( // Inner circle arc 16 17 (10 14 -1) arc 17 18 (11 15 -1) arc 18 19 (10 16 -1) arc 19 16 (9 15 -1) arc 36 37 (10 14 0) arc 37 38 (11 15 0) arc 38 39 (10 16 0) arc 39 36 (9 15 0) // Outer circle arc 12 13 (10 13 -1) arc 13 14 (12 15 -1) arc 14 15 (10 17 -1) arc 15 12 (8 15 -1) arc 32 33 (10 13 0) arc 33 34 (12 15 0) arc 34 35 (10 17 0) arc 35 32 (8 15 0) ); defaultPatch { name frontAndBack; type empty; } boundary ( inlet { type patch; faces ( (9 29 30 10) (10 30 31 11) (11 31 20 0) ); } outlet { type patch; faces ( (3 23 24 4) (4 24 25 5) (5 25 26 6) ); } cylinder { type wall; faces ( (16 36 37 17) (17 37 38 18) (18 38 39 19) (19 39 36 16) ); } top { type patch; faces ( (6 26 27 7) (7 27 28 8) (8 28 29 9) ); } bottom { type patch; faces ( (0 20 21 1) (1 21 22 2) (2 22 23 3) ); } ); mergePatchPairs ( ); // ************************************************************************* // |
|
Tags |
blockmesh, blockmeshdict, cylinder, gmsh, openfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Natural ventilation simulation of high rise building in ANSYS Fluent | Surajtalele | FLUENT | 1 | April 6, 2018 03:28 |
2D simulation of vortex shedder with rhoPimpleFoam | linkamp | OpenFOAM Running, Solving & CFD | 0 | October 31, 2016 11:00 |
karman vortex street help please | SSeth | STAR-CCM+ | 7 | January 10, 2011 12:31 |
Video about Karman vortex street simulation | Marek | Main CFD Forum | 0 | August 20, 2008 08:54 |
Karman vortex street ??? | anisa | FLUENT | 1 | May 5, 2005 14:04 |