CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Native Meshers: blockMesh

create a Mesh

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   April 13, 2016, 11:26
Talking create a Mesh
  #1
Member
 
Mohsen
Join Date: Oct 2012
Posts: 47
Rep Power: 7
mohsen.boojari is on a distinguished road
Hi everyone,

I want to create a cubic domain with (Lx=54m Ly=Lz=18m) dimensions, and divide them into (600 200 200) part so I can have cells with 0.09*0.09*0.09 dimension. I have created 8 Blocks,2 in each X,Y,Z direction .according to this, the cell numbers will become 24-e06!

is it possible to create such a domain only with BlockMesh ? or I have to use snappyHexMesh too?

Thanks
mohsen.boojari is offline   Reply With Quote

Old   April 13, 2016, 15:11
Default
  #2
Senior Member
 
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 163
Rep Power: 5
Flowkersma is on a distinguished road
Hi,

This kind of a mesh is very easy to create with blockMesh and actually it's probably the best tool for it. Just define one block with eight vertices. There are several tutorials how to do this. Look for example $FOAM_TUTORIALS/incompressible/icoFoam/cavity/system/blockMeshDict.

Regards,
Mikko
Flowkersma is offline   Reply With Quote

Old   April 13, 2016, 15:21
Default
  #3
Member
 
Mohsen
Join Date: Oct 2012
Posts: 47
Rep Power: 7
mohsen.boojari is on a distinguished road
Quote:
Originally Posted by Flowkersma View Post
Hi,

This kind of a mesh is very easy to create with blockMesh and actually it's probably the best tool for it. Just define one block with eight vertices. There are several tutorials how to do this. Look for example $FOAM_TUTORIALS/incompressible/icoFoam/cavity/system/blockMeshDict.

Regards,
Mikko
Yeah, I know . I have created the BlockMeshDict. but I just don't know whether it could be run with a simple machine or it need a hpc ?

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1.0;

vertices
(
    (-18 -9 0)//0
    (-18  0 0)//1
    (-18  9 0)//2
    (-18 -9 9)//3
    (-18  0 9)//4
    (-18  9 9)//5
    (-18 -9 18)//6
    (-18  0 18)//7
    (-18  9 18)//8
    (9 -9 0)//9
    (9  0 0)//10
    (9  9 0)//11
    (9 -9 9)//12
    (9  0 9)//13
    (9  9 9)//14
    (9 -9 18)//15
    (9  0 18)//16
    (9  9 18)//17
    (36 -9 0)//18
    (36  0 0)//19
    (36  9 0)//20
    (36 -9 9)//21
    (36  0 9)//22
    (36  9 9)//23
    (36 -9 18)//24
    (36  0 18)//25
    (36  9 18)//26
);

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

edges
(
);

boundary
(
    inlet
    {
        type patch;
        faces
        (
            (0 1 4 3)
            (1 2 5 4)
            (3 4 7 6)
            (4 5 8 7)
        );
    }

    outlet
    {
    type patch;
    faces
        (
            (18 19 22 21)
            (19 20 23 22)
            (21 22 25 24)
            (22 23 26 25)
        );
    }

    walls
    {
    type wall;
        faces
        (
            (5 14 17 8)
            (14 23 26 17)
            (2 11 14 5)
            (11 20 23 14)
            (0 9 12 3)
            (3 12 15 6)
            (9 18 21 12)
            (12 21 24 15)
        );
    }

    top
    {
    type wall;
    faces
        (
            (6 7 16 15)
            (7 8 17 16)
            (15 16 25 24)
            (16 17 26 25)
        );
    }

    bottom
    {
    type wall;
        faces
        (
            (0 1 10 9)
            (1 2 11 10)
            (9 10 19 18)
            (10 11 20 19)
        );
    }
);

mergePatchPairs
(
);
mohsen.boojari is offline   Reply With Quote

Old   April 13, 2016, 15:45
Default
  #4
New Member
 
Maryam
Join Date: Dec 2015
Posts: 13
Rep Power: 3
Persia is on a distinguished road
You don't need hpc for creating such a simple mesh.
Persia is offline   Reply With Quote

Old   April 13, 2016, 15:49
Default
  #5
Member
 
Mohsen
Join Date: Oct 2012
Posts: 47
Rep Power: 7
mohsen.boojari is on a distinguished road
unfortunately, my laptop failed to do that!!
mohsen.boojari is offline   Reply With Quote

Old   April 13, 2016, 16:01
Default
  #6
Senior Member
 
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 163
Rep Power: 5
Flowkersma is on a distinguished road
If you have enough RAM on your machine, it will run. You'll need around 1GB of RAM for 1 million of cells so you should have at least 24gb of ram.
Flowkersma is offline   Reply With Quote

Old   April 14, 2016, 12:05
Default
  #7
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,960
Blog Entries: 6
Rep Power: 33
Tobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Quote:
Originally Posted by mohsen.boojari View Post
unfortunately, my laptop failed to do that!!
What does it mean that your machine failed? You get an error or your Laptop just stopped working (RAM overflow?). You should use some tool to indicate your ressources.

Why you made 8 blocks? Not necessary.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   April 14, 2016, 12:21
Default
  #8
Member
 
Mohsen
Join Date: Oct 2012
Posts: 47
Rep Power: 7
mohsen.boojari is on a distinguished road
Quote:
Originally Posted by Tobi View Post
What does it mean that your machine failed? You get an error or your Laptop just stopped working (RAM overflow?). You should use some tool to indicate your resources.

Why you made 8 blocks? Not necessary.
I got this Error :
Code:
new cannot satisfy memory request.
This does not necessarily mean you have run out of virtual memory.
It could be due to a stack violation caused by e.g. bad use of pointers or an out of date shared library
Aborted (core dumped)
does it make any difference to have a single block or divide your domain into several ones?? from accuracy and timing point of view?
mohsen.boojari is offline   Reply With Quote

Reply

Tags
blockmeshdict

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 83 July 22, 2017 08:26
Gambit problems Althea FLUENT 22 January 4, 2017 04:19
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
[ICEM] Generating Mesh for STL Car in Windtunnel Simulation tommymoose ANSYS Meshing & Geometry 48 April 15, 2013 04:24
Layers:problem with curvature giulio.topazio OpenFOAM Native Meshers: snappyHexMesh and Others 10 August 22, 2012 09:03


All times are GMT -4. The time now is 18:34.