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

[snappyHexMesh] Distance to Medial Axis

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 4 Post By SirWombat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 14, 2012, 00:46
Default Distance to Medial Axis
  #1
Member
 
Kalyan
Join Date: Oct 2011
Location: Columbus, Ohio
Posts: 53
Blog Entries: 1
Rep Power: 14
kalyangoparaju is on a distinguished road
Guys,

Can someone tell me what exactly are

1. minThicknessToMedialRatio
2. minMedianAxisAngle.

I am trying to grow layers on a round tip so as to achieve a first cell height of around 5e-6m which gives me a y+=1. I observe that there are layers in other parts of the wing except the round tip once I decrease the minThickness of the first layer below a certain threshold.

wing.jpg

I have a feeling that the above parameters can influence the layer addition process.

Thanks,
Kalyan Goparaju
kalyangoparaju is offline   Reply With Quote

Old   May 14, 2012, 03:11
Default
  #2
Member
 
Jan
Join Date: Dec 2009
Location: Berlin
Posts: 50
Rep Power: 19
SirWombat is on a distinguished road
Send a message via Skype™ to SirWombat
maxThicknessToMedialRatio:

A first guess: the ratio of the average cell thickness at each "corner" to the maximum thickness of a cell.
A seconf thought: It could also be the ratio of the thickness of a single cell to the averaged overall layer thickness (==distance from the surface to first cell of the background mesh).

To see what changes in those parameter does to your layers, you might try to switch of all quality controls, i.e. like this:

Code:
meshQualityControls
{
    maxNonOrtho 180;
    maxBoundarySkewness -1;
    maxInternalSkewness -1;
    maxConcave 180;
    minVol -1e30; 
    minTetQuality -1e30;
    minArea -1;
    minTwist -1e30;
    minDeterminant -1;
    minFaceWeight -1;
    minVolRatio -1;
    minTriangleTwist -1;
    nSmoothScale 4;
    errorReduction 0.75;
}
If you keep your quality controls too high, you will simply filter all bad cells and never find out about the effect of the changes in your layer parameters! So yes, you need to switch them off. Really! Try it!


Try a
Code:
minMedianAxisAngle 90;
and then start from
Code:
maxThicknessToMedialRatio 1.0;
and have a look at the result. You may then slightly reduce that ratio to 0.9 and maybe all the way down to 0.1 and you will see the changes in paraview.
Make sure that
Code:
nRelaxIter 5;
is set good number: it's the number of iterations SHM uses to move the mesh away from the surface where you want your layers on.

When you are satisfied with your mesh you will have to start on meshQualityControls, carefully increasing single parameters (start with maxNonOrtho- and the Skewness-parameters.
When running SHM have a look at the output and check your LayerIteration-process and make sure that after a few iterations, the mesh meets your quality demands.
Use checkMesh to create sets of problematic cells and view them in paraview!

If the layer iteration process does not converge, start with changes on your layer settings (those two ratios are a good start). Use the sets checkMesh creates to view your changes.

Note: Even with the tighest quality-controls you won't make a bad mesh into a good mesh. Better start with a good mesh and let SHM use the quality-controls to iterate it to a perfect mesh!
MadsR, toolpost, ilhado and 1 others like this.
__________________
~~~_/)~~~

Last edited by SirWombat; May 14, 2012 at 03:32.
SirWombat is offline   Reply With Quote

Old   May 14, 2012, 12:10
Default
  #3
Member
 
Kalyan
Join Date: Oct 2011
Location: Columbus, Ohio
Posts: 53
Blog Entries: 1
Rep Power: 14
kalyangoparaju is on a distinguished road
Thanks for the reply.

Deactivating the mesh quality controls does the work and inserts the layers on the parts where it was not inserting before. But now, if I run checkMesh, there are cells where the aspect ratio is reaching around 2000 and these cells are near the tip where there were no layers before. I increased the density at that region but that just increased the aspect ratio. I am confused as to what to change to decrease this problem.

My base mesh from blockMesh has an aspect ratio of 1:1

Thanks,
Kalyan
kalyangoparaju is offline   Reply With Quote

Old   May 14, 2012, 14:48
Default
  #4
Member
 
Jan
Join Date: Dec 2009
Location: Berlin
Posts: 50
Rep Power: 19
SirWombat is on a distinguished road
Send a message via Skype™ to SirWombat
You need to play with your layer-settings! Try

Code:
maxFaceThicknessRatio 1.0;
maxThicknessToMedialRatio 0.1;
minMedianAxisAngle 90;
and use a few Layer-Iterations, let's say
Code:
nLayerIter 5;
then under quality controls start off with
Code:
maxNonOrtho 75;
maxBoundarySkewness 20;
maxInternalSkewness 15;
keep all others switched off.

See what snappyHexMesh does when iterating those layers. Keep a sharp eye on those cells filtered by the quality controls during iterations!

Hope to get you started! Good luck (which is sometimes needed with SHM)!
__________________
~~~_/)~~~
SirWombat 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] Error snappyhexmesh - Multiple outside loops avinashjagdale OpenFOAM Meshing & Mesh Conversion 53 March 8, 2019 09:42
[blockMesh] Wierd behaviour of blockMesh creating axis in wedge rcastilla OpenFOAM Meshing & Mesh Conversion 1 December 4, 2018 06:24
Coded FunctionObject to calculate distance to axis? Nothing written be_inspired OpenFOAM Programming & Development 0 February 22, 2018 18:23
How to get the distance from an unknown point and an axis? redline CFX 4 July 23, 2015 09:21
Axis treatment in axisymmetrical problem Jakob1 OpenFOAM Pre-Processing 2 August 25, 2014 03:09


All times are GMT -4. The time now is 14:06.