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

Pictures and Documentation of New Meshing Strategy

Trial 6 - Aero 2 - Mesh QT 6

Total Cell Count 14.2m
Time 152min
Illegal Cells 6524

Checking faces in error :
non-orthogonality > 70 degrees : 6355
faces with concavity > 80 degrees : 0
faces with skewness > 4 (internal) or 20 (boundary) : 0
faces with interpolation weights (0…1) < 0.02 : 0
faces with volume ratio of neighbour cells < 0.01 : 5
faces with face twist < 0.01 : 11
faces on cells with determinant < 0.001 : 0

1. New Cartesian boxes
Cartesian boxes are now setup to encompass the geometry as closely as possible to reduce total cell count

Zone 1 - Nose
Zone 2 - Front Suspension
Zone 3 - Driver area
Zone 4 - Rear of mono
Zone 5 - Front Wing
Zone 6 - Front Tire
Zone 7 - Diffuser
Zone 8 - Rear Tire
Zone 9 - Pre-Rear wing
Zone 10 - Rear wing
Zone 11 - Cell reduction box


2. New Boundary layer settings based on Level 7 & Level 8 Y+ = 540

Level 7

Level 8

3. Needed improvements

Geometries

  1. Split wheel and rim geometry
    Outer wheel surface and spokes share same face selection

  1. Shorten middle of front main wing (mesh attaches to nose)
    Mesh has fused to nose so air cannot pass through.

  2. Split foot pedal cover face from mono
    This is the smallest surface attached to the mono other then the dummy area. This results in a split level refinement being needed which is not optimal

  3. Split driver dummy area from main mono
    The necessary smaller surface refinements of this area should be separate to the mono, boundary layer dependent surface.

  4. Diffuser trailing edge cannot be selected
    The main diffuser profile has no trailing edge face to select. These must be split

  5. Headrest small edge face and side pillow have same face selection
    The small edge face and larger headrest side face should be split to reduce cell size

New Mesh Changes

  1. Mesh size way to fine on rear wing holder main face, smaller side faces, and lateral stabilizing beams.

  1. Mesh reduction on faces such as the MRF zones are getting “print through” from neighboring geometry. This is seen on MRF zone spokes and front endplate wing profile.

  1. Front wing outer endplate gurney flaps cell size too small

  2. Rear wing element gurney flap cell size too small

    !

  3. Radiator exhaust shroud mesh too coarse. Jagged edges

  1. Trailing edges were not meshed however most were converged with cells from the top and bottom of the wing surface. An exception is the front main wing trailing edge which was meshed.

  1. Contact patch cell size too small

  1. Trailing edge of wings, boundary layers not created.

By making these changes then most of the model can be separated into small small faced - high refinement level areas, and the larger cell size areas like the mono. Also unnecessarily small cell refinement areas can be improved.

4 Likes

Definitely making progress…
Just a warning, I have found expansion ratios over 1.3 to start affecting results significantly, you may want to try 1.3 and maybe a couple between 1.3 and 1.66 (while keeping the total thickness of all layers constant, you will need more layers at 1.3) to see what difference in results you see…

Dale,

To build on your analysis of Y+ to overall thickness, i agree that there is not a direct correlation between the boundary layer total thickness and Y+ value range. I did not intend to make it seem like the BL range MUST fall between 30-300 or 30-800. It was intended only to see how thick each layer would be, especially using the calculator, to get the upper limit Y+ for understanding how thick the entire boundary layer would be. From what i understand, (which is not a whole lot) the most important thing is that the first cell size falls within the 30-300 range, or in your opinion so far, 30-800 range.

The part that im not sure about, is your theory that the results would not differ much when the Y+ is so large, closer to the 800 side. I would assume that with such a large cell size, that trying to calculate the entire boundary layer within this cell would produce inaccuracies. This is of course just a guess. Also a Y+ of 800 could have very different values based on the speed or reference length being calculated. Knowing that the boundary layer is very close to the wall geometry, i would bet that a better representation of the BL could be measured, with multiple cells encapsulating the lower side of the Y+ range.

From what i have done with these calculations, and from seeing the resultant mesh, it has been extremely beneficial, even if what i have done is wrong, because the relation of the needed Y+ first layer cell size, the final layer cell size (for the overall thickness ratio), and the total boundary layer thickness ( only needed to see what upper Y+ value we are using) have helped to understand how these all interact with the surface refinement sizing for the geometry.

Here is my reasoning:

  1. Based on previous meshes from last year, with 32 cores available, I must have a total cell count under around 20 million cells for the mesh and simulation to run successfully. This requires a surface refinement cell size that is large enough to ensure that i am not using too many cells, but small enough that smaller geometries are correctly meshed. (For what i have shown around 0.0075 mm for larger surfaces, 0.00375 for smaller)

  2. Since my surface refinement sizes are unfortunately running the show in terms of how small and accurate the cell coverage is, this partially effects my first layer Y+ cell size through the correct final boundary layer cell size. (3rd cell size). This is due to the relation that must be held between the final BL cell size (3rd cell size) and surface refinement through the Final layer thickness RATIO.
    - This is what you meant by a graceful transition.

Shown in my previous post, my 0.00375mm level 8 boundary layer calculation resulted in a 1.6 value for the final thickness RATIO. this means that the final boundary layer cell size is LARGER then the surface refinement cell size. This was needed to keep the same Y+ range for level 7 and level 8. (this was Y+ min = 100 to Y+ max = 540)
This did not have a graceful transition

  1. In order to uphold this ratio and not have outrageously different cell sizes between the two levels, calculating the final layer thickness for level 7 shown here and also in previous posts:
    0.8 = X / 0.0075
    X = 0.8 * 0.0075
    X = 0.006m

0.006 is our 3rd layer cell size. Using this we can calculate back by finding the closest expansion ratio to achieve our Y+ = 100 value we calculated.

My reason for re-explaining this is to show that our surface refinement cell size (0.0075mm) cannot be changed due to the limitations from #1. This results in a specific final boundary layer cell size (3rd layer cell size, in this case 0.006mm)

UNLESS
the Final layer RATIO is changed outside of the recommended range. ( in the case of using only 3 layers)
OR
Increasing the layers to, for example. 5. This allows for minimal change to the final layer cell size (if the expansion ratio isnt too aggressive, which it shouldnt be) and increases the overall Boundary layer total cell size (all layers added together) which increases the upper limit of the Y+ range. Since a larger final layer (5th layer) is created, the Final layer thickness RATIO can be closer to the recommended range (and a more graceful transition made)

This is why i think it is important to know before hand what the correct Y+ range is. That way you can know where each layer lands, the difference in size between each layer, and if the BL is being measured correctly.

Im sorry if i repeated a lot from previous posts. I wanted to make clear what my though process is.

Now the question is, what should my range be. Not sure what is the most important factor in accurate results

Is the most important having the first cell within 30-300 and nothing else really matters?
Does it matter if the rest of the layers are even near lower Y+ value?
Does having multiple layers in the lower side of the Y+ range (30-400)better then having them towards the higher side (300 - 800)?

I really feel like my current Y+ = 100 value at 0.002165 or 2.1mm thick is more accurate then having a Y+ = 540 at 0.01172 , which is 11.7mm thick. I find it hard to believe that having an 11mm thick first cell can accurately measure most of or the entire boundary layer correctly.

  1. Correct me if im wrong but my next move is to change the BL to 5 layers,
  2. decrease my first layer cell size slightly (maybe Y+ = 50 or 80)
  3. Keep around a 1.3 expansion ratio
  4. Keep a Final thickness RATIO of around 0.4-0.6 to gracefully transition into higher level surface refinement cell sizes

For the higher level wing surfaces:

  1. Consider changing to 6 or 7 layers
  2. keeping the same Expansion ratio and Final thickness RATIO due to extra layers.

The goal is to decrease the region refinement levels, and possibly certain surface refinement levels so that the total cell count of under 20 million can be achieved.

1 Like

Dan,

I think it is not possible to combine all of these ways I have suggested in one grand sweep on a complex geometry…

I would approach the ‘y+30,300,800 test to minimize cell count while maintaining results accuracy’ should be tested on a relevant but simple geometry with a layered mesh of low cell count but finely resolved where needed. Many runs with different layering would need to be made…

I do not have the time to do that right now.

The current approach you are taking is similar to Dylans approach here At the end of that topic I was confused, but since then, I have decided that he uses a y+ value formula for each layer and he uses those values to determine how many layers he needs at any specific ER to fully encompass the turbulent BL zone… Maybe you can use his formula which he has proven to himself…

Thanks so much for the link! I will look at that tomorrow.
EDIT after reading through this post (the beginning was super confusing but most likely useful when i get into all the simulation settings UGH.) Once Dylan stepped in, his reasoning was sound. but i dont think its necessary for me to do such a large comparison as you did.

I agree the best method would be to do a smaller test with multiple runs using different settings. Right now im not sure i have time for that either. EDIT I will make time. However i have said such things before on other projects and ended up going with the more work/better result route.

If i did do this test, i would most likely use a multi element wing as this would be the most important area to get right.

EDIT My new approach is to attack the rear wing with different layering techniques. The best results will then be applied to all wing surfaces on the full model. Method is as follows:

  1. Half wing symmetric simulation (i know you said to avoid these but i wish to pump out many runs quickly)
  2. wing surface refinement at 0.00375mm or smaller.
  3. split faces and surface refinements for large surfaces (endplate) and small (wing profiles)
  4. Y+ first cell size test 30, 50, 80, 100
  5. layer amount to match with region refinement level from full car 3,4,5,6 layers to keep recommended expansion ratio and Final layer thickness RATIO
  6. Y+ max range test without changes to ER or FLTR, 300, 500, 800

I really appreciate you sticking with me for so long.

1 Like

Dale, I re-read this post and found this from Dylan to be potential problem in my meshing. He says that a HIGHER Region refinement will increase the surface refinement level but will this also happen if the region refinement is LOWER then the surface refinement?

dylan

Sep '18

@DaleKramer

Sorry my bad. In the refinement settings, you can define refinement levels on the fuselage, the wings, and landing gears, etc. You can also define refinement levels on a box that covers the plane, so that the cells within the box will have at least that refinement level. For example, with a background mesh of 0.5m generated from blockMesh, you can define level 8 refinement on the plane, and level 6 refinement on a box that covers the plane. Now, if you define a level 9 refinement on the box, then the entire plane will also have level 9 refinement, finer than what you need creating a lot of cells.

When doing mesh independency study, you can increase the level of refinement of that box to 7, but you don’t need to increase the level on the plane. If there are areas on the plane that are apparently not described by the surface mesh properly, then you refine it.

After a test of only the Rear Wing, using the following settings, it seems that the region refinement effected the surface refinement level by lowering it back down to level 6.

RW Test 1.0

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 - layer calculation Y+ Value
Layers 4
1st 0.000647 Y+ = 30
2nd 0.00106755
3rd 0.001761
4th 0.002906
Overall thickness 0.006381 Y+ = 296
Expansion ratio 1.65
Min thickness 0.001m
Final layer thickness (RATIO) 0.775
Inflate Boundary Layer settings - changes in 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

Region refinement level was not lower than the surface refinement which causes the whole model to obtain region refinement level. This can be seen by observing the mesh and in the meshing log which shows only level 6 was achieved.

Layer mesh : cells:139885 faces:433057 points:153466

Cells per refinement level:

0 156

1 483

2 1262

3 3041

4 30329

5 7816

6 96798


RW test 1.1

By increasing the region refinement to level 8, the mesh conformed much better but lower level areas (endplate small edges, gurney flaps, wing trailing edges) are also changed to level 8 cell size- 0.00375

Another problem is just this rear wing mesh has 7.6 million cells - waay too much

Gurney flap not meshed very well - was set to level 10 - 0.0009475 surface refinement

I have also tried no region refinements, with a high level change between cells, but that resulted in the wing not even being meshed.

I am also trying just one universal boundary layer inflation, and will also try having the smaller faces with unequal level refinements.

1 Like

Can you give me a direct link to the RW test 1.1 mesh?

Sorry i just made it so i forgot to share /make it public. here it is

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

4 Likes

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:

4 Likes

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:

1 Like

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

Dan

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]( What to do if geometry does not appear in your Hex-dominant parametric algorithm mesh - try the Feature Trick)…

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!

1 Like

WAY BACK HERE WHEN YOU MADE THAT STATEMENT A WEEK AGO, I STARTED INVESTIGATING THE STRANGE ISSUE…

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.
image
image

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:
image

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):
image
.
.
.
.
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…