Very thin boundary layers and y+ on complex geometry

It may be time to discuss the numerical parameters that you use.

Dylan has shown me to use these parameter values and they have significantly helped me with some issues I had and I use them all the time for my aircraft sims:

I am not knowledgeable in a lot of the non-default values you see above so I am not sure I can really have an intelligent discussion on them :wink:

Dale

Wow, that will be a large mesh, we may have to rethink this :wink:

Hi everyone,

Just some of my input here. Great discussion and sharing by the way.

With regards to the relative layer sizing, as recommended in the y+ setup that Jousef & I have written (posted a couple of times), relative layer sizing should be off if you want to really control the layers. That way your size will be absolute and as @LWhitson2 has correctly pointed out, this will stop the layers from changing based on the localized mesh where the layers are applied to. As you all should be aware, Snappy is quite inconsistent when it comes to mesh generation even with the exact same parameters and geometry, which leads to the layers being “unknowable” if relative layer sizing is on. For very corase meshes, relative layer sizing is fine as you can get rough results out.

LWhitson2 has also correctly and brilliant pointed out why we need to ensure that the layers should be strictly between 30 and 300. Less will give inaccurate results and more, the same. However, should one need to use values of y+ less than 30, then full resolution is recommended. Usage of y+ less than 30 is usually dependent on the turb model. For my use cases, k-w SST, a full res run requires a mesh of y+ less than 1.

Usage of the wall functions can give you expected flow structures like separation and vortices I believe. It is only the values of these features that may be inaccurate. Another reason is the turbulence model. From my previous work in flow within an urban environment, the commonly used k-eps cannot adequately produce the expected flow structures, k-w sst can even with wall functions applied.

While that is great, I do think that being able to run a 4-5 meshes at the same time is even more incredible!

Absolute tolerance 1e-15? That seems way overkill. Any simulation of moderate complexity will never reach that level of convergence. Most sources I’ve read cited 1e-6 as ideal convergence, so to save yourself some core hours, I recommend that setting. If you’re having trouble converging, other parameters like the the relaxation factors or the gradient schemes can be adjusted on a case by case basis.

The math is interesting. I’ve been looking through them on and off. If I get a grasp on them I will be sure to share with all of you!

Convergence should be checked graphically in two ways, the residual plots and the force plots. As mentioned, for residuals, 1E-6 is ideal, but if you get 1E-5 or even 1E-4 I would say, it is good enough. Force plots wise, a steady-state or oscillatory steady state is sufficient.

Another visual check is the data contours in the post-processor. Example, if you see pockets of pressure abnormalities then you likely need a longer convergence time or your numerical parameters need to be adjusted.

Cheers.

Regards,
Barry

2 Likes

Hi Barry,

My point is that I believe that as long as the desired Y+ range is maintained, I end up with a higher percentage of surface cells that get layered when I use ‘Relative layering’ and this higher percentage of layered surface cells would intuitively seem to me to provide more accurate results.

The reason for this is to make sure the simulation does not end early due to an arbitrary residual value being reached. I watch my simulations as they proceed and stop them manually when the forces and moments are considered stable for a few hundred iterations. I have found that there is not necessarily a direct relationship with stable results and residuals. I find this is needed when you are trying to obtain maximum results accuracy after you have validated your setup and which actually does not waste core hours if monitored manually (this was before the days of being able to continue a simulation run :wink: . I have saved more core hours by watching results convergence and not having to worry about residuals stopping my run which would then require me to start a whole new run.

Those numerics were suggested by @Dylan who has been able to validate his vehicle CFD setups to AMAZING accuracies as you can see at the end of this post.

Dale

@LWhitson2 , Bryce,

This is very interesting and it would then seem to me that OpenFOAM simulations using wall functions don’t need to be too concerned that a few surface cells are layered to Y+<10. I am gaining some confidence back in the use of wall functions as long as Y+ range is strictly maintained 30<Y+<300 :slight_smile:

Also, since it appears that the dividing point of results accuracy of using wall vs full resolution equations is Y+=11, then, again as long as you only have a few surface cells 10<Y+<30 and very few cell where Y+<10, you are still probably going to get good results.

Is that a good concept to commit to memory for OpenFOAM simulations?

Again, thanks for input.

Dale

@DaleKramer, while OpenFOAM is fairly robust at handling a multitude of Y+ values you should still try to match your Y+ to both the turbulence model you are using and the problem you are solving. SimScale offers the two most widely used turbulence models in OpenFOAM, κ-ε and κ-ω Menter SST.

κ-ε: Generally valid for values of 30<Y+<300; the Realizable κ-ε model is valid for Y+<10 as well but I’m not sure SimScale has implemented that one. The traditional model was designed for internal flows such as pipes, flows that have a positive pressure gradient, and free flows such as a jet into a quiescent fluid. This model will generally not perform well in flows that require accurate determination of separation such as external aerodynamics.

κ-ω SST: This model is designed to perform very well for flows with Y+<1 but can handle a Y+<5~10 depending on the resolution required. This model reverts to the κ-ε formulation in areas of Y+>~50 and in the freestream. This makes it ideal and the preferred method for external aerodynamics and other cases where capturing flow separation is extremely important.

I hope this kind of helps and I’m always willing to expand more on the topic if you are interested.

1 Like

Thanks, I should have included that for my aircraft sims, I have only used the SimScale κ-ω SST turbulence model due to similar recommendations and research I had done.

Very nice post Bryce (@LWhitson2)!

Some of the points you mentioned can be found in my y+ SimWiki post: What is y+ (yplus)? - ping me if you have ideas for new posts. Maybe we can work on some together :slight_smile:

Best,

Jousef

Well gentlemen, this is all very interesting but unfortunately the Kramer method for mesh breaks down for Y+<1, at least in my case where the layers become very thin. I attempted using absolute layer sizing and saw (as @DaleKramer observed in his original posts) that Snappy subsequently threw out nearly all of the layers after a few iterations. So, I’m back to the beginning again :sleepy:

But, there is a way to get them back if you want to lower some quality checks…

Totally… I scoured the log and attempted to lower some of the quality checks. I also started looking at OpenFOAM tutorials, documentation, and forums. We are not the only folks frustrated with this. None of the parameters looked to me like they would cause complete rejection of all layers - not even one cell was retained.

Re: your method “breaks down”, it’s simply that it requires really high surface refinement which exceeds the machine memory.

Let me have a look.

I don’t see the meshing log for a 12 layer level 12 attempt in your current state of the project…

I’ll see if I can recreate… I was going rapid fire last night.

Also, I edited my previous post with some results from extending the simulation time of the “Kramer mesh”. Significantly different forces/moments but now very similar flow field.

EDIT
Okay @DaleKramer, it’s recreated. You’ll see it under CAC Deflected.

So (from your meshing log), here is where all your layers just disappeared:
12layersdisappear

You will get the most back by relaxing ‘faces on cells with determinant < 1e-06’, but the rest disappeared for a lot of other reasons as you can see…

Ugh I completely missed that last night somehow… thanks.

I just followed my procedure from here :wink:

1 Like

To me, I still do not think you are anywhere near converged at 500 steps, I would extend that a few hundred iterations yet or maybe the moments will never stabilize for a reason I am unsure of at the moment…

I see you just relaxed to 1e-08 on determinant yet still have no layers left.

I am thinking it may be related to min cell volume, I think I made notes on that in procedure too…

I think there are other things I point to in the procedure that might be relevant.

Yes, trying again with the face interpolation 10x lower. Min cell volume is already at 1E-30.

Maybe it is related to that fact that you have left your surface refinement at level 6, perhaps you should ‘do the numbers’ and update that first…