Mesh Independence Study - Layering disappears across study meshes

Hi @DaleKramer,

Thanks for the posts on the convergence plots. I will only consider those that have either converged or reached the simulation end time. Plots like the second figure top left (R1 1 35mph 0aoa SRJ1 leastsquares) and almost all of the fourth plots except the bottom left R5 134 mph 0aoa SRJ4 fourth) are diverged and the results obtained from those cannot be used. Further adjustment may be needed in the meshes or numerical parameters in order to try to get these plots to converge. We’ll work on them probably later as higher order schemes don’t seem to yield the result behavior we expect.

If you look at the plots that do converge, we see acceptable margins for convergence even for the residuals of Ux. The residual that does not converge as well tend to be the pressure (p, yellow) and this is usually due to the mesh and how the velocity interacts with the mesh itself from what I’ve experienced. However, some simulations do give good convergence for that value and the ones that don’ t converge as well are also of acceptable convergence.

Side note, what we deem by convergence is typically having the residuals at 1E-4 and below. Ideally everything would be 1E-6 or below but 1E-4 is deemed loosely converged. We can probably set a reasonable limit of 1E-5 as the acceptable convergence margin that we’re looking for.

So, here is what I think we can try. Definitely we should try to get the results to fully converge first then get them below our arbitrary set limit of 1E-5. I suggest picking two of your best meshes (probably the SRJ4 and SJR3 or something, you can determine this), performing a first order simulation with the default solver schemes and adjusting the residual controls for pressure and all corresponding residual controls to 1E-6. I’ve attached screenshots of the default parameters you should adjust to below. Once this is done, increased the simulation end time to 2000s and post the convergence plots and result control plots here for those two meshes.

image

image

image

Results control is under the simulation tab and is a way to check for additional convergence while getting a good estimate on the actual values that the simulation is obtaining. You’ve already posted a result control in the second set of figures for Leastsquares, its at the top right corner. Do ensure you apply this result monitoring for both the meshes that we’re going to simulate again so we can monitor them.

After we get steady-state convergence, aka when the residuals or the result controls have reached a steady-state, we can work on bringing any less than preferred residuals down to our set limit. We will probably do this by adjusting the relaxation factors, but that will entail a longer simulation end time so we will deal with that later. Provided that of course whatever we just did to get-steady state results do not simply resolve our continued divergence in results.

The possibility of small issues in meshes causing large deviations in results is very well possible. Whether it is worth it for the user to spend significant amount of time refining their meshes or troubleshooting in order to negate this discrepancy may be debatable based on why exactly this occurs. So yes I would say we should start a topic on this. However, I would like to resolve this issue of yours first before we move on. Then we can spend our efforts tacking the other topic. You are welcome however to start on it if you do have ample free time.

Looking forward to the results. Cheers.

Regards,
Barry

EDIT: On a side note of peculiar issues with the mesher that has not been resolved. I’ve encountered several issues like in this post where the mesh seems to behave very strangely. Maybe we can start a mega-thread (with your observation about each mesh not being the same) and post all the peculiar problems and try to fix or understand them. It would then be very beneficial for everyone once we figure it out and post the solution.

2 Likes

As I realize that this topic will likely be a great help to other new users, I appreciate that you are expanding on things that I now take for granted, thanks :slight_smile:

All of the runs had residuals for convergence set to the default 1E-5.

I’m on it :slight_smile:

I have already confirmed that the issue was not the fact that I had only used Default Initial Conditions for k and Omega. I put realistic values in using a reference length of my fuselage length and got very little difference in force results.

Also, I had already started relaxing trying to converge the SRJ3 mesh with ‘fourth’ scheme, no luck, here is convergence plot for U,k,Omega relaxed to 0.3 (the cyan dip and red peak are gone :smile:) :

Sorry, I was confused when you asked me to provide the ‘results control’ of a mesh rather that the ‘results control’ of a simulation run which I was familiar with.

Here is the sim run results for run ‘R9 135mph 0aoa SRJ3 leastSquares’ (stable to less than +/- 0.5% after 300s):

Thanks, I had not come across this topic. I am am already playing with a copy of his project to see if my layering methods will help. He never did get a 15 layer mesh down to 0.0002 m first layer.

I agree and will add that to my ‘ToDo’ list unless you start one first :smile:

But the problem with mega threads is that it gets very had to follow just the ‘each mesh not the same issue’ if a lot of other issues are being discussed too…

Dale

Here is SRJ3 convergence to 2000s with your numerics:

Here is SRJ3 forces results to 2000s with your nemerics:

Here is SRJ4 convergence to 2000s with your numerics:

Here is SRJ4 forces results to 2000s with your nemerics:

All the results shown vary less than 0.1% between 500s and 2000s.

What are we trying to determine with these plots?

Dale

Hi @DaleKramer,

Thanks for the all the work. Can you can check the results between these two simulations and see the result % difference? Is it significantly different from the behavior we experienced in the results for the other set of results you posted much earlier?

We’re trying to ensure that the simulation has indeed fully converged and that fluctuating trend of the results is not due to the simulation not having enough time to fully converge. At this point I’m trying to pin point which part of the process is causing the continued result deviation.

Cheers.

Regards,
Barry

OK, to be more precise, the average difference between these 2000s results and the ~500s results for the corresponding 8 result values presented in this MIS of SRJ meshes , is only 0.11%. That is, the result values of ‘Pressure Force x’ (Pressure Drag), ‘Pressure Force z’ (Lift), ‘Viscous Force x’ (Viscous Drag), and ‘Pressure Moment y’ (Pitching Moment) for the two 2000s simulation runs.

Dale

Hi @DaleKramer,

What about the result differences for the various parameters(CL, CD, pressure drag etc) between the new sim runs for SRJ3 and SRJ4? Is it still within acceptable margin?

Cheers.

Regards,
Barry

Since the new sim runs were only 0.11% different from what was presented in this MIS of SRJ meshes chart, I believe that just looking at that chart answers that question since the pressure drag anomaly between SRJ3 and SRJ4 was the ~5% reduction that is my main concern about the MIS of SRJ meshes

To be more accurate, my concern is that ~5% reduction and a further ~5% reduction between SRJ4 and SRJ5 pressure drags.

Also, the study presents forces and moments, not coefficients.

Thanks,
Dale

Hi @DaleKramer,

Understood, just trying to isolate the potential issues for the continued divergence of the results. Looks like convergence was probably not the issue. I will have to keep looking around and doing research to figure out other causes for this behavior in the results.

Cheers and thanks for all the effort thus far.

Regards,
Barry

1 Like

Hey @DaleKramer

There are some mistakes in the verification method that you follow. The problems that you have encountered as a result are generally not an issue if you had used a different mesh generation algorithm. Fortunately, there is a way to do proper verification using snappyhexmesh that comes with OpenFOAM.
Before we dive into the details, please remember to avoid ‘halving cell size in one or more directions until results converge to a value’. It is unrealistic.

First of all, you want to locate (as many cells on the wall surface as possible) in the log layer, which is where y+>30, if you are modelling an entire plane. This saves the computation effort, and can actually be done in OpenFOAM.

Secondly, once you have an initial mesh, vary

  1. inlet, outlet, sides, top and buttom boundary locations so that Cd and Cl do not change more than 1%
  2. the number of cells in the boundary layer ( try 3, 4, 5, and 6) until Cd and Cl do not change more than 1%
  3. the size of the first layer, which controls y+, so that Cd and Cl do not change more than 1%. Note that you want to maintain 30<y+<100 for majority of the surface area. If the averaged y+ is 30, then you will have many areas below 30. But if the averaged y+ is 50, then you will get more of them above 30, which is what you want.
  4. the refinement levels around the plane, say level n, n+1 and n+2. Note that you want to keep the refinement levels on the plane surface unaltered for two reasons: 1) RANS does not require a lot of cells. As long as the plane surface is described by the Cartesian surface mesh, chances are you have more than enough cells already. 2) You should use the relative setting in addLayer - it gives you better control over the coverage% on the wall. If you alter the surface mesh sizing, the boundary layer sizing will change as a result, but you don’t want to change more than one parameter at a time. Simply make sure the refinement levels in space are always smaller than the refinement levels on the plane surface.

I have obtained good results with high y+ modelling. See the DrivAer model (different configurations) drag prediction:
image
image

1 Like

Thanks, I have been so frustrated trying to find meshes that supported that method. I was about to give up :relieved:

With regard to points 1-4, it sounds like once I have accomplished these points on a single mesh (no multi-mesh independence study required :smile:) , that I will have a mesh which should provide meaningful CFD results that would compare to experimental results +/- 1 % or so, is that correct?

This does make sense to me and it has some relevance for a different layering issue I am having here.

You have given me renewed hope that I can eventually obtain good enough CFD results to aid me in designing my new aircraft :smile:.

I will implement your suggestions on a new mesh and report back :slight_smile:

Thanks so much,
Dale

@DaleKramer

I hope you get the results that you want. But bear in mind that there is another side of CFD - discretization schemes and linear solver settings. If you still run into problems, share your project here so I can have a look.

1 Like

Look out, I plan to take you up on that offer at some point :smile:

Dale

Before you leave, I am a little unsure of what you mean here. Are you talking the plane surface refinement levels ‘normal’ to flow dimension or ‘along’ the flow dimension?

Dale

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

1 Like

Ok, so would you consider these ‘space’ refinement levels sufficient for the 15 layer boundary?

Yes, I think the space refinement is enough. However, you want to increase a parameter called ‘nCellsBetweenLevels’ to 4 or 5 so that the transition between levels is smoother. At the moment it seems to be 2 or 3. Also, you don’t want 15 layers in this case, because:

  1. using an averaged y+ = 50 first layer, with a growth rate of 1.2, 4 of these layers will yield an overal y+ = 50+50 * 1.2+50 * 1.2 * 1.2+50 * 1.2 * 1.2 * 1.2 = 268.4. A turbulent boundary layer ranges from y+ = 100 to 300. I think 4~5 layers is sufficient.
  2. even with 15 layers, the transition between the final layer and the adjacent cell is still abrupt – very large volume size change between the two. You want to avoid such behaviour.

Sorry, I used that previous image only to see what kind of space refinement levels were required with respect to the final BL layer. That is not how I have layered my yPlus 30-100 mesh. The 30-100 mesh only has 3 layers like this:

Is this better?

Dale

1 Like

@DaleKramer

That looks much better.

1 Like

:rofl::rofl::rofl: I think I’m off to the races now …

Hi Dylan, @dylan

Could you explain how your formula, that calculates a yPlus value for the 4th boundary layer, was derived and what purpose does it serve?

Is it somehow a guide for how many layers to choose based on a particular 1st layer y+ value and layer expansion ratio?

If that is the case, is this layering setup somehow a most optimized setup for a desired 1st layer y+ and layer expansion ratio?

Your formula seems to determine the yPlus value of each layer ( YP(x) ), and that value is based on the 1st layer yPlus value ( YP(1) ) and an exponential progression of the expansion ratio (ER). The formula can be summarized as:

YP(x) = YP(x-1) + YP(1)*ER^YP(x)

(derived from your equation for the 4th layer y+ = 50+50 * 1.2+50 * 1.2 * 1.2+50 * 1.2 * 1.2 * 1.2 = 268.4)

With 1.2 ER and a 1st layer y+ of 50, here is the progression of your formula:
LayerYplus

I thought a desired yPlus was used in the online yPlus calculator in order to determine ONLY the 1st layer thickness.

I can not find any information of yPlus values being assigned to any layer but the first Layer.

When I view my yPlus values of a converged simulation, they are only on the geometry surface, the 2nd and further away layers are mapped at yPlus=0, like this 6 layer BL:

I am confused :cry:

Thanks,
Dale