|
[Sponsors] |
[blockMesh] Difficulties creating mesh for a 'wind tunnel' kind of set-up |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 6, 2018, 10:08 |
Difficulties creating mesh for a 'wind tunnel' kind of set-up
|
#1 |
New Member
Nigel
Join Date: Aug 2018
Posts: 2
Rep Power: 0 |
Hello, I am a student who is new to CFD in general. I wish to create a 'wind tunnel' kind of set-up on OpenFOAM and observe the flows around simple shapes. When I ran the blockMesh command, an error is returned. I would appreciate of anyone could help me take a look at the blockMeshDict that I have here and advise me if there is any easier alternatives to consider using for my other simulations.
This is basically a 2D simulation of a 1x1 unit square in a 5x5 unit 'wind tunnel'. I have 4 blocks of meshes (basically I'm not sure how to do it otherwise). An illustration is attached in the next post. Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: plus | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // scale 1; vertices ( (0 0 0) (5 0 0) (5 5 0) (0 5 0) (2 2 0) (3 2 0) (3 3 0) (2 3 0) (2 0 0) (3 0 0) (3 5 0) (2 5 0) (0 0 0.5) (5 0 0.5) (5 5 0.5) (0 5 0.5) (2 2 0.5) (3 2 0.5) (3 3 0.5) (2 3 0.5) (2 0 0.5) (3 0 0.5) (3 5 0.5) (2 5 0.5) ); blocks ( hex (3 0 8 11 15 12 20 23) (10 10 1) simpleGrading (1 1 1) hex (4 8 9 5 16 20 21 17) (10 10 1) simpleGrading (1 1 1) hex (2 10 9 1 14 22 21 13) (10 10 1) simpleGrading (1 1 1) hex (10 11 7 6 22 23 19 18) (10 10 1) simpleGrading (1 1 1) ); edges ( ); boundary ( fixedWalls { type wall; faces ( (3 15 23 11) (11 23 22 10) (10 22 14 2) (12 0 8 20) (20 8 9 21) (21 9 1 13) (19 7 6 18) (4 16 17 5) (19 16 4 7) (6 5 17 18) ); } inlet { type patch; faces ( (3 0 12 15) ); } outlet { type patch; faces ( (14 13 1 2) ); } frontAndBack { type empty; faces ( (16 17 18 19) (15 12 20 16 19 23) (16 20 21 17) (22 18 17 21 13 14) (23 19 18 22) (0 3 11 7 4 8) (9 8 4 5) (5 4 7 6) (6 7 11 10) (9 5 6 10 2 1) ); } ); mergePatchPairs ( ); // ************************************************************************* // Last edited by Nigel; August 6, 2018 at 14:44. |
|
August 6, 2018, 10:15 |
|
#2 |
New Member
Nigel
Join Date: Aug 2018
Posts: 2
Rep Power: 0 |
CFD_Illustration.jpg
For illustration, I have attached how the block looks like. The area in the middle is the square to be placed in the 'wind tunnel'. |
|
August 21, 2018, 22:05 |
|
#3 |
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 14 |
To make the blockMeshDict easier, I think an easy way to make the mesh is to first create the 2d mesh. Then use topoSet to select a square of cells and subsetMesh to remove the cells. There are various tutorials that use subsetMesh -- eg : https://github.com/OpenFOAM/OpenFOAM...oscillatingBox.
Caelan |
|
August 22, 2018, 04:05 |
|
#4 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
Hi!
If you have an error message then post it! It can help a LOT! This kind of blocking i think can be done only with mergePatchPairs, or the adjacent block faces must be identical, so you will need 9 blocks for it (OFC if this square is a hole in the middle then only 8). |
|
October 10, 2018, 06:45 |
|
#5 |
Senior Member
Zander Meiring
Join Date: Jul 2018
Posts: 125
Rep Power: 7 |
you have an inconsistant amount of cells between the upstream block and the top and bottom block as well as the downstream block and the top and bottom block. The way to do this is to create 8 different blocks; 4 corner blocks, one in front of the square, one behind the square and one on top and bottom of the square each.
Else you must make use of mergePatchPairs which may result in a messy solution, or you must take very careful care in setting up how many cells are in each block. The latter will become exceptionally difficult if you start using gradings, and is not recommended. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
decomposePar problem: Cell 0contains face labels out of range | vaina74 | OpenFOAM Pre-Processing | 37 | July 20, 2020 05:38 |
[ICEM] ICEM wind tunnel sign panel mesh | tigerdroppings | ANSYS Meshing & Geometry | 5 | July 30, 2018 13:28 |
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! | sc298 | OpenFOAM Meshing & Mesh Conversion | 2 | March 27, 2011 21:11 |
[GAMBIT] How to set up a wind tunnel with interior? | Zweeper | ANSYS Meshing & Geometry | 37 | December 1, 2010 13:03 |
[Other] Mesh generation for Wind Tunnel | terrybarnaby | OpenFOAM Meshing & Mesh Conversion | 19 | November 12, 2009 03:13 |