CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[snappyHexMesh] How to improve mesh around delta wing?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 4, 2015, 15:26
Default How to improve mesh around delta wing?
  #1
Member
 
Join Date: Dec 2012
Posts: 81
Rep Power: 13
pizzaspinate is on a distinguished road
Hi Foamers,

I am relatively new to OpenFoam and currently a bit stuck using snappy hex mesh.
I try to mesh a delta wing in with snappy hex mesh but im not happy with the results I got so far. But I have no idea what to change to get a better result at the leading and trailing edge nor how to get layers around the entire aerofoil. I already read some posts here and on the openfoam web page and tried to apply them for my case but with little success.
I have attached some pictures and my snappyHexMeshDict. Maybe someone could give me some advices on what to do because I am absolutely stuck.

Thank you very much in advance for your help.
Attached Images
File Type: jpg Aerfoil_Front.jpg (82.5 KB, 176 views)
File Type: jpg Aerofoil.jpg (47.7 KB, 145 views)
Attached Files
File Type: txt snappyHexMeshDict.txt (3.5 KB, 22 views)
pizzaspinate is offline   Reply With Quote

Old   February 4, 2015, 18:27
Default
  #2
Member
 
Peter
Join Date: Feb 2015
Location: New York
Posts: 73
Rep Power: 11
opedrofunk is on a distinguished road
It looks like you don't quite have adequate refinement in the background grid. I would suggest:

1) Increase the resolution in your blockMeshDict. You can do this "locally" if you define multiple blocks (hex's).
2) Create a "refinementSurface" in the snappyHexMeshDict to progressively increase refinement as a function of distance around your surface. This allows you can set multiple refinement levels at specified distances from the surface;
3) Alternatively, or in combination with (1,2), you might specify a refinementBox which encloses your geometry of interest and apply additional refinement that way.
4) Then have a look at the way you are adding "layers" in the snappyHexMeshDict .

Remember, you can mesh in stages with snappyHexMesh. So if you can get a good castellated mesh, then the snapping is much easier. And when you have a decent "snapped" mesh, the layers will be much easier to add.

You control which steps of the process you run in the dict by setting them to true/false, so you don't have to regenerate each step in the process every time you want to try something, i.e.:

Code:
castellatedMesh true;
snap            true;
addLayers       false;
And, if you run snappy without the -overwrite flag, you can see how each step of the process is performed in paraview. That might help give you a more clear picture of what each process in snappy does, i.e.:

Code:
$ snappyHexMesh
instead of:

Code:
$ snappyHexMesh -overwrite

You may need experiment with different options, but that should get you going in the right direction.

Hope that helps!
Peter


PS: Alternatively, if you are ok with working with tet cells, you might try something like this:
https://extensions.sketchup.com/en/c...y-tetgen-tools in combination with a FoSS mesher like tetgen.
opedrofunk is offline   Reply With Quote

Old   February 5, 2015, 04:35
Default
  #3
Member
 
Join Date: Dec 2012
Posts: 81
Rep Power: 13
pizzaspinate is on a distinguished road
Thank you for the quick response I will try your recommendations.

I have also tried multiple blocks (see attached blockMeshDict) but if I use snappy then it deletes some blocks leaving me with one small block where only half of the geometry is inside (see attached pictures).
I posted here earlier asking why that is as I have my mesh location point in Snappy Hex mesh defined at the outermost point of the box.
I got told that this meshing strategy is not working for snappy.

Do you have any advice? Do I have to merge the patches in the blockMesh or do I have to put a certain parameter into snappy so this does not happen?
Attached Images
File Type: jpg box.jpg (63.6 KB, 105 views)
File Type: jpg aftersnappy.jpg (43.7 KB, 91 views)
Attached Files
File Type: txt blockMeshDict.txt (7.4 KB, 14 views)
pizzaspinate is offline   Reply With Quote

Old   February 5, 2015, 15:21
Default
  #4
Member
 
Peter
Join Date: Feb 2015
Location: New York
Posts: 73
Rep Power: 11
opedrofunk is on a distinguished road
It looks like there may be some issues with the way you have your hexes defined or numbered. I tried running blockMesh with your blockMeshDict and got the following error:

Code:
$ blockMesh 
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.3.1-262087cdf8db
Exec   : blockMesh
Date   : Feb 05 2015
Time   : 10:54:16
Host   : "Peters-MacBook-Pro.local"
PID    : 2558
Case   : /Users/peter/Desktop/of-mesh
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Creating block mesh from
    "/Users/peter/Desktop/of-mesh/constant/polyMesh/blockMeshDict"
Creating curved edges
Creating topology blocks
Creating topology patches

Creating block mesh topology


--> FOAM FATAL ERROR: 
face 0 in patch 0 does not have neighbour cell face: 4(0 12 15 3)

    From function polyMesh::facePatchFaceCells(const faceList& patchFaces,const labelListList& pointCells,const faceListList& cellsFaceShapes,const label patchID)
    in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 127.

FOAM aborting
So, I built a contrived example using multiple hex blocks and a simple sphere for the obstacle (you could, or course, replace this with whatever you want.

The geometry looks like this (similar to what you are working toward, I think?):

http://imgur.com/BOvZSDm

The blockMesh looks like this:

http://imgur.com/91eMv11

The final mesh on the surface of the sphere looks like this:

http://imgur.com/r0v8yt4

The final mesh (clipped through cross section) looks like this:





http://imgur.com/aRqBgHx
http://imgur.com/4tsHoEx

You can control the gradation and refinement of the mesh easily in the snappyHexMeshDict - see the attached case file.

Hope this helps!
Peter
Attached Files
File Type: gz of-mesh-example.tar.gz (5.7 KB, 38 views)

Last edited by opedrofunk; February 5, 2015 at 16:45. Reason: Added example case.
opedrofunk is offline   Reply With Quote

Old   February 6, 2015, 06:41
Default
  #5
Member
 
Join Date: Dec 2012
Posts: 81
Rep Power: 13
pizzaspinate is on a distinguished road
Hey,
this helps a lot!!! Thank you so much!! I just had a quick look at it but will have closer one on monday when I have my computer back
pizzaspinate is offline   Reply With Quote

Old   February 11, 2015, 06:16
Default
  #6
Member
 
Join Date: Dec 2012
Posts: 81
Rep Power: 13
pizzaspinate is on a distinguished road
Hi,
I have adjusted your blockMesh so it fits to my case it is working fine (haven't put in boundary faces so far though).
I was just wondering if I have to follow certain rules when creating multiple blocks or if the order does not matter.

My snappy mesh with layers looks still a bit funny though. I think it is due to change in chord length and twist of my wing (see attached picture). Do you know by any chance if it would improve my results if I have two blocks; one for the wing section until the kink and one from the kink to the tip. Or won't it improve the mesh at all?

Thank you very very much again for helping me out with the block mesh!!!!! I was absolutely stuck before!!!
pizzaspinate is offline   Reply With Quote

Old   February 11, 2015, 06:17
Default
  #7
Member
 
Join Date: Dec 2012
Posts: 81
Rep Power: 13
pizzaspinate is on a distinguished road
uups forgot to attach the picture
Attached Images
File Type: jpg UCAV.jpg (18.5 KB, 83 views)
pizzaspinate is offline   Reply With Quote

Old   February 11, 2015, 18:19
Default
  #8
Member
 
Peter
Join Date: Feb 2015
Location: New York
Posts: 73
Rep Power: 11
opedrofunk is on a distinguished road
Hi,
No problem - happy to help.

I think, in general, you probably want to keep your blockMesh as simple as possible, since you can control refinement very well with snappyHexMesh.

The main reason I would make a blockMesh that is anything other than a single hex is to control the orientation and flow-wise alignment of the background mesh. This can be helpful when you know a priori the general direction of flow in regions of interest - and ultimately controls the orientation of what is produced from snappy.

Here is a relatively poor but simple example:



Then experiment with refinement options in snappy (refinementBox, surfaces, features, etc...) to get the mesh density you desire for the regions of interest.

Good luck!
Peter
opedrofunk is offline   Reply With Quote

Old   March 7, 2016, 02:34
Default Meshing of delta wing
  #9
New Member
 
Abhishek Kumar
Join Date: Mar 2016
Posts: 1
Rep Power: 0
Emstar is on a distinguished road
Can u describe meshing method to get close values of variation of lift and drag coefficients with AOA for delta wing..Is it d same as u described for above problem..plz help
Emstar is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] SnappyHexMesh no layers and no decent mesh for complex geometry pizzaspinate OpenFOAM Meshing & Mesh Conversion 1 February 25, 2015 07:05
Mesh motion with Translation & Rotation Doginal CFX 2 January 12, 2014 06:21
mesh missing after export in gambit morteza08 ANSYS Meshing & Geometry 1 July 26, 2010 01:10
How to control Minximum mesh space? hung FLUENT 7 April 18, 2005 09:38
Delta Wing Structured Grid Riaan FLUENT 3 December 31, 2004 12:03


All times are GMT -4. The time now is 01:15.