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

Enhanced blockMesh for external aerodynamics

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

Reply
 
LinkBack Thread Tools Display Modes
Old   December 5, 2012, 17:50
Default Enhanced blockMesh for external aerodynamics
  #1
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: South Bend, IN, USA
Posts: 688
Blog Entries: 9
Rep Power: 12
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
I have written an enhanced blockMesh for the last few days, I am wondering if the developers want to include it or not.

The utility is now able to handle almost all single-object, non-concave, 2D external flow CFD mesh generation, flow around a 2D object. For example, an regular shape, or irregular polygon, or airfoil, etc.

The mesh generated is still multi-block mesh. But the burden on the user is much smaller.

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

convertToMeters 1;

twoDObject
(
// NACA Airfoil
// ....

    // Square
    // (0 0 0)
    // (1 0 0)
    // (1 1 0)
    // (0 1 0)

    // irregular
    (-2 -1 0)
    (-1.9 -1.2 0)
    (-2.2 -0.2 0)
    (1.2 -0.3 0)
    (1.2 -0.2 0)
    (2 0 0)
    (1.8 1 0)
    (0 2 0)
    (-2 1 0)

    // Concave
    // (-5 -1 0)
    // (-2 -3 0)
    // (2 -3 0)
    // (3 1 0)
    // (1 4 0)
    // (-3 0 0)
    // (-4 2 0)
);

xLimM   -40.0;
xLimP    50.0;
yLimM   -40.0;
yLimP    40.0;
zThik    0.5;
meshDensity     (1 100 1);
expRatios       (1 120 1);
refineLevel     5;
firstCellHeight 0.001;

isConcave       false;

AOA     90;


edges
(
);

mergePatchPairs
(
);

// ************************************************************************* //
As can be seen, a few features:
1. You can define the object, just by its corners, and also no need to care about its orders.
2. You could set the first cell height.
3. You could set the mesh density as usual, but now you can even do it in a more simply way by setting mesh refine level, which refines the circumferential grid;
4. Angle of attach could be easily set (AOA);
5. The outer boundary (geometries and patch names and types) is done like a macro, you just need to set the x and y limits. (This is a rectangular outer boundary.)

Here are two figures,
a.jpg
b.jpg

Cheers,
__________________
~
Daniel WEI
-------------
NatHaz Modeling Laboratory
Department of Civil & Environmental Engineering & Earth Sciences
University of Notre Dame, USA
Email || My Personal CFD Blog
lakeat is offline   Reply With Quote

Old   December 6, 2012, 03:49
Default
  #2
Senior Member
 
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 198
Rep Power: 7
Chris Lucas is on a distinguished road
Hi,

thanks for your work. If you want to share your code, you can publish it asstand alone application on openFoam wiki as Nils did with waves2FOAM (http://openfoamwiki.net/index.php/Contrib/waves2Foam).

You could also contact Hrvoje Jasak and ask if the code gets includes in OpenFOAM ext (http://www.extend-project.de/index.p...iew=department)

Kind Regards,
Christian Lucas
Chris Lucas is offline   Reply With Quote

Old   December 6, 2012, 12:41
Default
  #3
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: South Bend, IN, USA
Posts: 688
Blog Entries: 9
Rep Power: 12
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
Thanks, I asked because it is not a standalone application, I changed the core library as well, including the constructor of blockMesh.
__________________
~
Daniel WEI
-------------
NatHaz Modeling Laboratory
Department of Civil & Environmental Engineering & Earth Sciences
University of Notre Dame, USA
Email || My Personal CFD Blog
lakeat is offline   Reply With Quote

Old   December 10, 2012, 13:14
Default
  #4
Member
 
plucas's Avatar
 
Anonymous
Join Date: Dec 2011
Location: Everywhere
Posts: 74
Rep Power: 5
plucas is on a distinguished road
Sorry if this is a dumb question, but is multiple airfoils possible with this enhanced blockMesh?
plucas is offline   Reply With Quote

Old   December 10, 2012, 14:23
Default
  #5
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: South Bend, IN, USA
Posts: 688
Blog Entries: 9
Rep Power: 12
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
Not now, I tried to make it more able to handle multi-objects, but before doing that, I was hoping to have smoothing works first. After a few days of trial and error, the smoothing does work a little bit, but I found it not very efficient to write within OpenFOAM's framework, majorly because of the grid definition of each block descriptor, so I give up.

But I will keep this in mind (it is also one of my objectives) as I am currently looking for a better mechanism to replace OpenFOAM's native block descriptor.

Thanks though.
__________________
~
Daniel WEI
-------------
NatHaz Modeling Laboratory
Department of Civil & Environmental Engineering & Earth Sciences
University of Notre Dame, USA
Email || My Personal CFD Blog
lakeat is offline   Reply With Quote

Reply

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
tutorial 2.2 Stress(...) trouble with blockMesh colinB OpenFOAM Native Meshers: blockMesh 8 January 22, 2012 11:32
Enhanced wall treatment and Enhanced wall functions Alina FLUENT 2 January 3, 2012 19:48
blockMesh - help atareen64 OpenFOAM Native Meshers: blockMesh 2 June 16, 2011 15:32
Blockmesh cavity error message tonitoney OpenFOAM Installation 2 March 17, 2008 12:59
Is Playstation 3 cluster suitable for CFD work hsieh OpenFOAM 8 March 12, 2008 05:58


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