SimScale CAE Forum

Optimizing mesh quality and Y+ layer formation on an FSAE car


So the next tests, i think, confirmed my assumptions that the region refinement is changing surface refinements. Both test 1.3 and 1.4 have surface refinements higher then the region refinements (levels 10 and 11) but are still reduced to the region refinement level (level 8)

Dale, are you sure that the final thickness ratio is related to the surface refinement and not the region refinement cell sizes?

Either way, i am not getting the results i want, which is to have the mesh retain smaller cell sizes when i assign higher level surface refinements to specific faces, otherwise i am getting jagged edges. What is interesting is that in the whole model mesh i made, they did, the surface refinement size DID mesh to a higher level.

I am not sure what to do from here as i cant yet even test the Y+ changes i wanted. Would you reccomend sending some meshes through to simulation to see the Y+ values anyways.?

I also dont like the mesh skewing in between main wing and elements


Just a quick look at two sims i did of the Rear Wing test. The best meshing results so far are from test 1.1 and test 1.6. A comparison can be made of the Y+ results and it seems that the absolute layering of test 1.6 covers a bit better. However on both tests the forces and moments resulted in odd numbers for the pressure forces. Not sure if I made a mistake in some settings.

RW Test 1.0 (base test)

Surface refinements

  • Wing surfaces at level 8 - 0.00375
  • Wing trailing edge surfaces at level 11 - 0.00046875m
  • Endplate surfaces at level 6 - 0.0015
  • Endplate and gurney flap edges at level 10 - 0.0009475

Region refinements

  • Close to model cartesian box - Level 6 - 0.015
  • Cell reduction cartesian box - Level 4 - 0.06

Inflate Boundary Layer settings - Final layer thickness (RATIO)

  • Wing surfaces - 0.775
  • Wing trailing edge surfaces - 6.199
  • Endplate surfaces - 0.1937
  • Endplate and gurney flap edges - 3.06

RW Test 1.1 - Simulated

Only changes to Region refinements

  • Close to model cartesian box - Level 8 - 0.00375
  • Cell reduction cartesian box - Level 6 - 0.015

30 & 50

100 & 300

RW Test 1.6 - Simulated

  • Wing trailing edge surfaces min max even again at level 11
  • Endplate and gurney flap edges min max even again at level 10
  • Variable inflate boundary deleted
  • Inflate boundary layer settings same as test 1.5
  • ABSOLUTE Layering used

30 & 50

100 & 300


Hi Dan,

Now that the holidays are over, I will try to catch up to you…

I spent the whole day working on issues that have come up in this topic.

I have a lot to report…

I will start by quoting and responding quite a bit, so here goes ‘Quote and Response’ #1:

This is a huge problem, if your results are not making sense ! To properly see yPlus surface values, your sim run must be pretty well converged. Yours are not… Also, a ‘wings only’ yPlus investigation is a bit meaningless since the air flowing to the wings will not have been disturbed by the body of the car. Use the ‘wings only’ as just a test of how to get yPlus values that you seek… Only after the wings have been added to the body can you make the final yPlus tweaking…

Here is how silly the flow in your domain looks at 1000 iterations of the RW test 1.6 ‘Run 1’:

If you use Potential Foam Initialization, it will converge 3 or 4 time faster… I have a test running now to 5000 iterations with PotInitON…. I also added a ‘Coefficients’ results with a 1m reference length and a 1m^2 area… It is MUCH easier to see if the CL and CD are becoming stable than when the various pressure and viscous forces get stable… I will stop it when the CL and CD are about 1% stable over 500 iterations, THEN we can look at yPlus :slight_smile:

AND FOR THE FIRST TIME IN PUBLIC, HERE IS MY ORSI by Moving Average Output screen that showed me when to stop that sim run :sunglasses::grinning::sunglasses::smiley::sunglasses::smiley::sunglasses:

As you can see, both CD and CL were 1% stable at 950 iterations, so that is when I COULD have stopped it if I were on the ball, OR if SimScale was watching it could have stopped it at 950 iterations EXACTLY (we can only wish for this :pray: )
AND here is the converged flow pattern in your domain at y=0 (that now makes sense to me :wink: ):

AND, here is my analysis of the meshing log table for the 1.6 mesh (VERY NICE RESULT BY THE WAY at 97.7%):

AND here is the yPlusHistogram for the results of the now well converged sim run:

NOW, is this what you EXPECTED for your ‘RW test 1.6’ yPlus values (theoretically, below 20 is not so good for wall function use) :question:


Just to be able to see the need for a more complete convergence before the yPlus should have been looked at, here are the ‘Not well converged’ residual and force plots:

Compared to the ‘Well converged’ residual and coefficients plots:

And again, here are the ORSI values for the ‘Well converged’ coefficients:


HOLY mother of Dale! this is amazing.

First off I hope you still know that this much help is not required of you. I appreciate it more then you know, but I do not want you to have to invest so much your time doing sim runs and analyzing everything. for me. This level of expertise is way beyond what i could have asked for and could have expected, especially when you are getting nothing in return. You should be paid for these services.

I assume you are doing this because you enjoy it but i will not be offended if you jump out completely at any time.
(end of rent)

Getting on to your response:

I did these two sim runs for two reasons;

  1. to see if the meshes are working and converging as they should - they are not, but i assume this has more to do with the sim settings then the mesh. I have used the same sim setting from last year. I have no idea what they do, just like i had no idea about the mesh settings when i started this thread, I intend to learn this now/soon.

  2. The intention was to just get the Y+ values stable on wing surfaces, I know these could change based on the turbulent incoming air of the car in front but i wanted to get good mesh quality first, then tweak after as you said. I am also concerned with how my meshing strategy effects the total cell count.

I definetly need to start with the post processing in Paraview, the amount you can do with this is impressive.

To be honest im not quite yet at the point of deciding to fine tune the Y+ settings through the boundary layer refinement. Im much farther behind you, where i am still trying to get the mesh to do what i want.

My main goal for these simulations, is to have decent mesh quality with low cell count. I am still stuck on:

  • surface refinement cells to region refinement transition

the only was i know of having higher region refinement levels next to the wing surface is to make many cartesian boxes. (the need for higher level region refinements is killing my total cell count.

  • lower level (endplate main surface) to higher level (wing surfaces or very small trailing edge faces)

I think that different levels on large vs small faces is not crucially important to increasing the cell count over mall areas but having super small cells on large surfaces (mono) is not needed and would effect this number. I seem to be having trouble getting different surface refinement levels even though i am telling each refinement to be different. The level 6 endplate main face is forced to increase its level even though i am not telling it to in the surface refinement. I think this is due to the region refinement being higher and forcing it to increase also. This is another problem i need solved. Once i can control these factors it will allow me to apply the mesh strategy to the whole car and i can get the quality and total cell count i require.

Once this is done, i can focus on Y+ settings and eventually understanding the simulation settings.

I look forward to your advice and am always grateful for your help



I think a lot of your issues with having to use Cartesian box region refinements will disappear if you use my Feature refinement trick at this topic link

Also check out my Cybertruck meshing here… It may give you clues too… I did not use any Cartesian region boxes in that mesh since I used the Feature refinement trick…


No way! i had already tests (which i think i deleted) without cartesian boxes. I had just increased the cells between layers t like 6 or 7 on one test and to 10 (the level distance between level 0 and my wing surface level) and i got the same results as you. Nothing showing up. Ideally my perfect mesh solution would have no boxes except for wake regions so that the cells could simply be reduced when they are a certain distance to the geometry. This would help a ton in terms of cell count and i could maybe if im lucky increase surface the refinement level on everything.

If this works as i envision it, along with possible absolute layering, i think this could work for my application needs!



It did not make sense to me until I tried it and I thought I was stupid for not knowing why the mesh would not appear without the region refinements…

I finally discovered the Feature refinement trick and then I created that topic yesterday, where I tried to find out if there was a better way to get the mesh to ‘appear’ again… BUT it looks like so far the Feature refinement trick is working the best for me :slight_smile:


The gradient between refinement level changes is controlled by the ‘Cells between levels’ HEX Parametric algorithm meshing parameter… I am using 2 instead of the default 3 for my CyberTruck mesh (saves some cell count on layering the tire treads) :wink:

Also, you need to discover the ‘Distance to surface’ region refinement… I am using it on the CyberTruck mesh now…


Oh my gosh this is a game changer

I had known about this feature i just applied it to cartesian boxes. I never saw that it could be applied to the geometry. I feel so dumb, because this would have saved me a lot of frustration and mesh trials. Oh well, now a new round of meshes can be made and hopefully i can figure out how to get a good mesh.

Another side note about the pictures above. I do not like the leading edge on the element wing at all. It is extremely jagged. I am pretty sure that increasing the surface refinement level will not hlep here because the STL file size is too small. Currently I believe that it is at 0.013m but saving this again at a higher level will help. Another piece to this puzzle.

On a side note. I think i have made my decision, at least for wing surfaces, on the Y+ vlaue. After observing the meshes on the symmetry plane from the Rear wing, I have noticed that creating a boundary layer that has a max Y+ value over a certain amount, starts to warp the cells between the main and element wings. Shown below is from test 1.6 which is ok. if the boundary layer cells from both wings is too large Shown in seccond pic. Either the cells will distort too much or they will touch which i assume is no good.

However, using the distance region refinement on the geometry will allow for smaller cells in this region so maybe this distortion will not occur. The only downside of this is from what Dylan said about region refinements being a lower level then surface refinements and forcing the surface refinement down a level to whatever the region refinement was set to. I will be testing this as well.

As usual a lot to do and even more learned as the testing continues. Pumped to do this next round. I think im getting close.


Personally I would make all your trailing edges square (not sloped) and make sure they are slightly wider than the level that you are refining your TEs to… Reduces jaggies…

Also, try to stick with EXACTLY 1 meter Level 0 cell size in all axes… I even generally make my BMB locations exactly on 1 meter steps…

Have a look at how I modified your top wing in that link I sent you to. It has fewer faces and all surfaces never get closer than 0.5mm from each other and all faces never get narrower than 0.5mm…

Just to be sure you understand the trick, your Feature refinement that makes the mesh appear with be to 0.5mm which is the TE thicknesses…

You also need to make the mesh finer on your leading edges to smooth them out:


Can you give me a direct link to the mesh that this 2D image was extracted from :question: (I would like to see those weird cells in a 3D viewer):
Also, I have isolated another issue where meshing fails with a Floating Point Exception error when either an Inside Cartesian Box region refinement OR a Distance from surface face Region refinement is added around a geometry to increase mesh fineness around the vehicle…

Here is the project that shows the isolated issue and SimScale support is working in it now…

Porous Media Simulation Guide For FSAE Radiator
Porous Media Simulation Guide For FSAE Radiator

Dale, this picture is from test 1.1. It is in the Rear wing test project i shared before but here it is again.

I am working on more tests now and am making good progress, will show the results soon


By the way, you can copy the browser link when you are on any tree item to send me right to the test 1.1 mesh, like this.

It is good to put direct embedded links everywhere you show a picture for the lazy helpers like me :wink:


Ok Dale, i havent done one of these yet but i assume this is how it works …Just for you


My preferred way to handle this is to split the airfoil surface so that the LE is a separate face at the yellow highlighted section so the you can mesh it at an EqualMaxMin level that is different than the less curved rear airfoil surfaces…


I took a mesh clip half way out to the endplate and they are less squished but you should worry about squished cells, these are OK but later you would see bad ones in the mesh quality metrics at the end of the mesh log… (views at symmetry plane are always worse looking for layering collapses and squished cells):

and end of mesh log:


thanks for the advice!

yea i am currently working on the squished cells by increasing the distance of the first region refinement level from the geometry.
Test 1.9 has level 9 at 0.001
Test 2.1 has level 9 at 0.005
Test 2.2 has level 9 at 0.01

I have also added decreasing levels as the distance from the geometry increases but im not sure if they are getting overwritten. Im going to finish my report of test 1.9-2.2 and report in a bit


RW Test 1.9


  • Suggested to change the bounding box to 1m
Level 0 (calculated) 1m
Level 1 0.5m
Level 2 0.25m
Level 3 0.125m
Level 4 0.0625m
Level 5 0.03125m
Level 6 0.015625m
Level 7 0.0078125m
Level 8 0.00390625m
Level 9 0.001953125m
Level 10 0.0009765625m
Level 11 0.0004828125m
Level 12 0.000244140625m
  • New boundary layer calculation to increase average Y+ values

0.001953m * X = 0.00182182m

0.00182182m /0.001953m = X

X = 0.932

Inflate boundary layer settings - layer calculation Y+ Value
Layers 3
1st 0.001078 Y+ = 50
2nd 0.0014014
3rd 0.00182182
Overall thickness 0.00430122 Y+ = 200 = 0.004311
Expansion ratio 1.3
Min thickness 0.001m
Final layer thickness (RATIO) 0.932
Relative 0.932
Absolute 0.00182182
  • Region refinements added as distance from geometry in addition to wake boxes
  • Trailing edges surface refinement level reduced
  • Wing surface refinement level reduced


Test 1.9 Pic 1: Cell squish between main wing and elements. Not many cells shown of level 9 region refinement at 0.001 - must increase distance from geometry.

Test 1.9 Pic 2: Cells are not even along wing surface - solutions could be adding feature refinement or unequal min max of refinement

Test 1.9 Pic 3: Shown again the surface refinement levels of the wing surface affect the boundary layer cells making unequal cell sizes - no bueno

Test 1.9 Pic 4: Trailing edge gurney flap boundary layer is well meshed

Test 1.9 Pic 5: Trailing edge of 1st element has jagged trailing edge

Test 1.9 Pic 6: Edge of endplate has some odd cells - solution could be unequal min max levels

Test 1.9 Pic 7: Layering chart from the meshing log. Thicknesses are good in some areas but need to be approved in others.
Overall results: Surface and region refinements need work

RW Test 2.0


  • Exact same as test 1.9 but with feature refinement
    • 0.0004 level 11
    • 0.0009 level 10


Test 2.0 Pic 1: Region refinement level 9 is more prevalent even though the distance is not changed. Trailing edge boundary layer cells gone in main wing trailing edge. Squish is reduced slightly

Test 2.0 Pic 2: Gurney flap boundary layers gone, but cell refines to a lower level - most likely to surface refinements moving to lower levels

Test 2.0 Pic 3: Main wing trailing edge has many jaggies even though cell size is reduced near the edge

Test 2.0 Pic 4: Gurney flap has some bad cells

Test 2.0 Pic 5: mesh thickness log shows less coverage then test 1.9 without the feature refinement.

Overall results: Feature refinement allows transition to designated higher level surface refinements to show up. In test 1.9 the higher level trailing edge refinements (especially at the gurney flap) are not recognized

RW Test 2.1


  • Distances to surface of region refinement increased
  • Feature refinement removed
  • Wing surfaces surface refinement changed to min lvl 9 max lvl 10
  • Endplate main surface refinement increased to lvl 8
  • Wake region refinement levels reduced
  • Wake region box smaller

Test 2.1 Pic 1: Increased region refinement level 9 to 0.005 gave better results then test 1.9. Increased distance of level 9 did not help with cell squish - solution, maybe this needs to be increased further to conjoin the two regions

Test 2.1 Pic 2: Same as pic 1 Showing how the surface and region refinements are related. It can be seen that in Test 1.9 Pic 1 with a region refinement distance of level 9 at 0.001m away from the geometry, this does not surpass the overall thickness of all three layers which results in 0.0043m This is why the level 9 region refinement doesn’t show up well on the mesh clip and seems to go directly to the next lower level 8, which was set at 0.005m. In this picture below the level 9 region refinement distance was changed to 0.005, and level 8 to 0.01m which is why there is better coverage outside of the boundary layer. Understanding that with distance from geometry region refinements, the first level distance value should be larger then the overall thickness of the boundary layer.

Test 2.1 Pic 3: Cell squish is still apparent even with increased level 9 region refinement distance.Also notice that the boundary layers near the trailing edge have disappeared. - solution could be to make unequal min max levels for trailing edges

Test 2.1 Pic 4: Endplate edge cells are better and wing surface cells are also better.

Overall results:

Boundary layer depletion around trailing edge - no good

Cell squish is not gone - solution is to increase the distance of level 9 region refinement

RW Test 2.2


  • Increased region refinement distance of highest level - level 9 = 0.01
  • Increased trailing edge level to min 11 max 12

Test 2.2 Pic 1: Increased level 9 distance did not remove cell squish

Test 2.2 Pic 2: Trailing edge boundary layers gone still between 1st and second element

Test 2.2 Pic 3: Trailing edge has jaggies just like test 1.9. I think the unequal cell sizes on the surface refinement is to blame. Not sure how to fix this

Overall Results: Need to find new solutions to problems


Going though what i have done again. I feel that my attempts to get a really good mesh using different refinement settings might be towards its end. I think if i understood the mesh settings better, especially the snap controls and layer adding controls, i would be able to better manipulative the cells by changing these settings. This is where i need more guidance