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

  1. Ahhh your edit does make sense. And answers my question to number 2. And now i believe i understand how the “relative” or layer sizing toggle turned on, option works.

Am i correct in the following assumption about the inflate boundary layer feature - when used, along with the relative sizing option, (layer sizing toggle turned on) the values for layer size, expansion ratio, etc… are fairly useless as the layer just conform to whatever local volume mesh cell is next to the final layer … as you said. This is shown in my meshes for sure.

the larger cell size on the left has a boundary layer size that seems more like the values I inputed into the inflate boundary layer feature. However this quickly shrinks down when the finer mesh starts. I know that sometimes certain refinements in the system are overwritten or not used when certain setting are active. Is this one of those times?

This begs the question - when “relative” or layer sizing toggle turned on- does the inflate boundary layer inputs really matter or do anything? I believe changing the number of layers can be seen in the mesh but what is the point of this refinement when it shrinks and moves relative to other cells. It seems like this should always be in “absolute” mode or layer sizing toggle turned off for FSAE simulations. So that boundary layer cell size is constant throughout the mesh surface to accurately capture the most important data, the boundary layer.

Does this make sense?

Dan

Layering parameters are not useless if you use relative layering…

Generally, I find the best way to work with layers is to do a surface mesh refinement, on all the faces that you want BLs added, to an EqualMaxMin refinement level… It is this ‘refinement levels’ cells size that would be used for the local cell size ratio calculation (say that is level6)…

In addition to that overall EqualMaxMin surface refinement, when you want to make sure small features are refined nicely, add another surface refinement on the small faces/sharp edges, to INCREASE the refinement level on their faces only using surface refinements with a varied Max/Min (or another EqualMaxMin if you wish).

In the above case with apparently 4 faces, all 4 faces would be surface refined at MaxMinLevel6 and then the two smaller faces would be additionally surface refined to MaxLevel6/MinLevel8… or just EqualMaxMinLevel8

I can’t wait to see your y+ surface mapping on the area you have highlighted in your post above…

Do not worry that you have included all the small feature/sharp edges faces in the EqualMaxMinLevel6 surface refinement, it does not matter to Snappy mesh algo and does not increase your meshing time, it is pretty smart sometimes :wink:

In that way MOST (in terms of total area) of your BL surfaces would have BL level6 as your Y+ calculator requests…

Then, in small features, the relative layering feature does its thing and the small features will still be present in the mesh due to the above surface refinement method…

Also remember that even though the layers can get very thin around edges and small features, that does not mean that the y+ at those locations gets proportionally changed (don’t forget that small features and sharp edge are where eddies get created and the air velocity changes there, which changes the surface y+ in itself)…

Very good questions, I am glad that you persevere :slight_smile:

P.S. I HATE ‘feature refinements’ on HEX meshing, they introduce edge jagginess to a much higher degree than the method above…

It is also possible to reduce the number of cells in your mesh (if you plan to use it for multiple runs at say various AoAs and want to save core hours on the multiple runs) and still have a good y+ surface meshing by looking at a y+ surface mapping of a converged sim run, and changing the BL parameters on faces that have y+s that are quite lower or quite higher than the y+ of 50 that you seek, but that is not often necessary… (even splitting faces (ugh, a generally bad practice :wink: ) can be justified if you save enough mesh cells without affecting the y+ surface map quality)

It is good that this topic forces me to get my ‘learned by the hard knocks’ methodology ‘onto paper’ (this and others of my posts here, may require some editing to portray exactly what I do in a way that all can understand…), so to say, I will come back here for future reference too :wink:

And a final ugh, determining expansion ratio, number of layers and total thickness of all layers is also a bit of a science in itself, that needs to be properly investigated and put on paper… I am somewhat conversant there but I do not have a precise methodology developed yet :wink:

1 Like

Just so that the ParaView tidbit does not get lost in the bowels of this topic :wink:

Even though ParaView is NOT needed to view a simple y+ surface mapping, please consider installing and learning to use ParaView, even to a small knowledge level…

You can do SO much more with it than SimScale PP…

Here is a simple example of what ParaView can do which SimScale PP can not…

Note the surface LIC lines on the velocity plot slice and the detailed scaling control that is possible in ParaView (including Black/grey/white areas that show data areas above and below the scale limits :wink: ):

This y+ mapping was the work of someone else wrt layering and I just made this revealing y+ map for it…

Yes, in SimScale you will input them in meters (divide by 1000). But your table should be updated and if your domain is 10 metres wide, you would not use first layer of 0.45 m, but, for instance 0.00045 m.

Although I have seen SimScale have many problems when using English vs SI units, I have NEVER seen SimScale ask for meters when it wants mm… In fact, I have I have NEVER seen it ask for mm…

I do however THINK, in my head, of BL dimensions in mm because it is much easier to relate the actual BL dimensions in my wacky brain, in mm (not something like 6.5e-4m) :wink: , then when I put my brain mm’s into SimScale I divide by 1000 (which I can still do easily in my head :wink: )

EDIT: And a final word on the tutorial and your Post 1 issues —

  1. The value of ‘1st layer thickness’ which you should enter into your current project SimScale parameters for BL generation, is 0.00133m (if your mesh algorithm needs a 1st layer thickness in meters and if you entered the correct parameters and type of viscosity into the y+ calculator). The cfd-online calculator result is a ‘center of cell’ distance. 1st layer thickness = 2 times cell center distance:wink: If your mesh algorithm needs a different parameter, then set up a spreadsheet expansion table that uses 0.00133m as 1st cell thickness and calculate the parameter you need from that table…

  2. All of the tutorial ‘apparent’ discrepancies, should disappear if you can establish that ‘Layer size’ (it is on by DEFAULT by the way) was turned ON when that screen capture of its ‘Mesh Refinements’ was generated…
    I think the appearance of the (-) in your image, instead of (m) as units for ‘Thickness for final layer’ confirms my theory and tells me that it is indeed a tutorial from a previous version of the SimScale UI that at least changed the (m) to (-) when Layer Size was ON, even though the current SimScale UI shows (m) when Layer Size is ON, don’t even try to figure that one out :wink:

  3. Yes you should take the effort to properly set up your boundary layer cells.

Hopefully, you can mark this post as the answer to your topics 1st post, so people can easily come directly to here without the need to read all my other jibber jabber :wink:

EDIT: And for the specific case of the BL in your 1st post, here is an expansion table that shows, for the current SimScale UI for HEXpara BL addition, that the parameter for ‘Final thickness (m)’ (it is really a RATIO if Layer Size is ON) = 0.733… (if your local cell size is 2mm :wink: )
image

Please do continue, even though you may have answers for the specific 3 issues which you had in your 1st post, as we have digressed quite a bit already…

Besides, your topic title suggests that there is to be more than the issues you asked about in your 1st post :wink:

Retsam

I used 0.45 (which i guess would be meters) for the final layer thickness because this is what the tutorial provided. This is why i asked the question about what this value should be because it seemed incredibly large, especially in comparison to the calculated Y+ values i was getting.

I think what Dale said about this setting (when the layer size toggle is turned on) makes the most sense, that the thickness of the final layer value is not actually the cell size thickness but the ratio between the final cell size and the neighboring cells. In this case 0.45 makes sense because that would mean that it would be about half the size of the neighboring cell.

I will be running another mesh with the layer sizing turned off, with the same settings. Based on this information, i assume that the mesh will either

  • fail with these settings

  • no layers will be created
    or,

  • i will get a crazy large boundary layer.

My money is on number 2. However having a definite answer that this is how the setting operates would be useful. The current description when hovering over the final layer thickness is as follows:
image

I find this a bit confusing but i guess it does make sense.

Thanks for your help!

Dan

image

With ‘Layer Size’ turned OFF you would need to enter 0.001466m for the ‘Final thickness’ parameter, else you will for sure not see much of what you seek :wink:

Wow thats a lot to take in, but extremely useful. I re-read your posts like 3 times to make sure i understand everything haha.

Part 1. What i meant with the “useless” comment was that with layer size on, the values you give dont really do what you want. Number of layers, and expansion ratio both work, but the final thickness, the most important value to determine the size of cells measuring Y+ is based on the surrounding cell size.

I dont want to keep explaining the same thing just in a different was. I think what you said is correct.

  • Layer size toggle on - (relative) = final layer thickness is actually the ratio between the final cell size and the neighboring cells.

In my case, 0.45 makes sense because that would mean that the final cell thickness would be about half the size of the neighboring cell.

  • Layer size toggle off - (absolute) = final layer thickness is exactly what it says. The final layer cell size.

However, in Layer size toggle off or (absolute) mode the ratio between the neighboring cells is not preserved, and could be problematic when different surface refinement levels or region refinement levels are used.

Ok i think that is now clear to me how it works and what i need to do to achieve what i am looking for.

I wasnt planning on taking that mesh through to simulation, but you called me out so now i have too :sweat_smile:

this is also a very cool observation that i missed. Y+ values would definitely need to change when interacting with geometry that causes velocity increases or decreases. However i think this would be absolutely bonkers to even attempt to do.

And yes i will be continuing to the other topics as my intention for this post was to have “total coverage” of this problem as well as optimizing the mesh so that accurate results can be achieved in the simulations - validation is key.

I really appreciate you sticking with me on this and “showing me the way” haha:sunglasses:

Empty post to separate topics
.
.
.
.
.
.
.
.
.

But with the method I specified, they WILL do what you want on the surfaces that are surface refined to that EqualMaxMin level which I mentioned (and those surfaces make up most of the surface area of where your want BL’s to be added)…

Don’t forget that your are in control here with relative layering, your neighboring cells size on the majority of the surface area which you are trying to add BL’s to, is determined AFTER you create your layer expansion table where you have decided # layers and ER to use…

Only then, do you decide on refinement level of surface cells in that majority area… I find that a final thickness RATIO is best in the 0.4 range (this goes for absolute layering too) … At this point you can tweek your Level0 cell size so that a suitable refinement level number gives you about a 0.4 ratio near the final layer…

PART 2 - Mesh quality / illegal cell count

I think this part of your last answer/ response is starting to build on the next topic of mesh quality.

This builds on the last topic that to have accurate and even Y+ values with “relative” final layer thickness, or the correct between cells in “absolute” mode, then an even Min Max surface mesh would definitely keep an even boundary layer cell size. The only problem i have with this is with geometries that need a change in cell size, which you address here.

I have a question about your method. When you say add another surface refinement to small faces/edges.

  1. Do you mean have two separate surface refinements on the same part?
  2. Do you mean to just have an unequal Min Max level, for example level 5 to 7.
  3. Do you mean to use a feature refinement? - as far as i know this is used specifically for edges correct?

Reading through your post (for a fourth time) you mention that the feature refinement isnt so good and that attempting to get the surface mesh to almost the same level everywhere will add to continuity of boundary layer cell creation. - Perfect. This method. as i understand, is meant with the “relative” layer sizing still on - layer size toggle on - so that any higher level refinement areas are also taken care of. I think i answered the question i asked above but ill leave them there anyways.

New question that i cant answer - Relating the desired boundary layer cell size to surface refinement cell size with your method seems like it would work well. How does this function with region refinements in the 3D space around the model?

Ah ok so, because most of the surface is going to be an equal cell size then the desired inputs into the boundary layer refinement will be accurate to what you want. Got it makes sense

Another Ah ha moment. Your saying that it is better to set up the desired boundary layer cell sizes first. Then relate the last cell size to be in the correct RATIO to the surrounding cells (im thinking region refinement here) or as you said to change the bounding box level 0 cell size so that a region refinement makes sense, and fits to the RATIO between the region refinement cells and final boundary layer cell.

Oh my gosh thats so much to absorb

1 Like

Yes, I said this about that, ‘Do not worry that you have included all the small feature/sharp edges faces in the EqualMaxMinLevel6 surface refinement, it does not matter to Snappy mesh algo and does not increase your meshing time, it is pretty smart sometimes’… This double refinement just makes it easier when selecting the faces that get refined in the EqualMaxMin surface refinement… I usually use a ‘face selection box’ to select them

Yes, on the small features you can do either, selecting between unequal and equal, on them will be based on the size and radius of curvature etc on those faces, you can adjust after you see your first mesh…

Sorry what I HATE is ‘feature refinements’, not ‘edge’, I will fix that…

I still use my equal and unequal MaxMin strategy on Absolute layering, since it works better than the dreaded ‘feature refinement’ in the jaggies department…

3D space views of the mesh are always confusing but a lot of the time I see better layering in 3D vs on a symmetry plane for example…

No, I am meaning the RATIO applies to that EqualMaxMin ‘surface’ refinement, not ‘region’…
I use inside regions just to get finer cells within a meter or 2 of my light aircraft (20 to 40 ft wingspans)…
There are OK guidelines out there for sizing that inside region box around the whole CAD geometry…(and other options for that 1-2 meters)
The same for sizing a ‘Wake box’. behind the vehicle…

Sorry, this self imposed 2nd shift of mine is over for today in a few minutes :wink:

You should have lots to do until tomorrow :wink:

Welcome to the world of trying to get CFD results that are not simply ‘eye candy’ :slight_smile:

Yea lots to do … and change. This is incredible and i know it will help others as well. Understanding meshing is still way over my head haha.

LOL, yet I persist into overtime :wink:

I think it would help you now to have a look at and analyze my one of my better geometry files from last year and this mesh of it … (some of my current methods may not be present in it)

EDIT, darn, I see I used my dreaded ‘feature refinement’ a little bit there (I remember the headaches now back then ,ugh), I should redo that with the method I tell you here, that would be interesting…

Doesn’t hurt for you to look, there are many ways to skin a cat, I will try to find a current mesh that matches my recommendations in this topic, like I said I need to get my current approach ‘onto paper’ , but I will do that tommorrow…

EDIT, the next morning :wink: So I did go back and try to see if I could get as good a mesh WITHOUT that ‘feature refinement’ I had used and sadly I did not get a better mesh… (maybe with a little more effort I could have)

This VERY SPECIFIC settings ‘feature refinement’ was needed there in order to keep the trailing edges defined in one small location at the top rear of the fuselage… (I still don’t know why a very fine 0.625mm surface refinement did not work on the trailing edge at that 2.5mm wide spot)

So, near the end of your meshing process, you MAY have to use a dreaded ‘feature refinement’, as I did :wink:

Hey guys!

I would keep this as an edit post by the way and create a completely new one where only the author makes edits and (optimally) no comments are added. The visitor wants to read through the post without having to jump through arguments, so that’s the way I prefer to do it.

Let me know what you think and if you need any specific help! Dale will also run the study for the cell centroid issue we discussed in another thread.

Best,

Jousef

Yes that is a very good idea. Then it could be more of a solutions guide then a back and forth. Reading other threads this was definitely time consuming and confusing sometimes jumping all over. Maybe it would be best to wait until all the topics i wanted to cover are solved, with documented evidence, then i can upload a final “solution” for everything.

how does that sound,

Dan

1 Like