grid convergence study question

Hi all,

Does anyone have any tips or tricks for performing a grid convergence study in Flow Simulation?  I need to try to determine the grid convergence index (GCI) for my simulation.  It seems that to do it right, I have to disable all of the automatic settings.  I have an airflow problem where I have set up the following parameters in the manual mesh settings:

 

Case123456
Nx70140168202242280
Ny183643526272
Nz224453637688
Total Cells27,720221,760383,201662,1721,144,2331,774,080

However, the total cell count never works out to those numbers due to some of the mesh refinements that occur, such as finer mesh in corners.  I solved steady-state simulations for each case, using global goals for average static pressure, turb dissipation, turb energy, Vx, Vy, Vz, and Mass of Fluid.  I left all of the convergence criteria set to auto.  For a grid study, would it be better for me to manually set the convergence criteria so each simulation solves to the same level of accuracy?  Or are the automatic criteria good enough?

After all simulations finished, I compared Velocity at several points (using point parameters) and plotted the values from each case.  What I am finding is that the values don't seem to be converging, and in many cases are oscillating as much as 20% from one case to the next even at the highest mesh levels used so far. 

The room I am simulating is 36' long x 9 ft wide x 8 ft high, and the total flow rate is less than 2,000 cfm (see attached model).  Should I really need more than 1/2-million cells in a room of that size?

The next steps I need to accomplish are to perform a time-step sensitivity study, then run a transient simulation and try to achieve a time-accurate gas decay solution that I can compare to measured data.  Any help is appreciated!

SolidworksFlow Simulation
Answers 14
SF
SF 2015-01-12 Best Answer

can you define how you want to define your GCI?

a few things i'm not following:

1. in your table, you say that the cell count doesn't work out to what is in the table because of refinements. what is the number in the table? the basic mesh? does having more or less cells cause an issue with the way you are defining the GCI?

2."...set the convergence criteria...solves with the same level of accuracy" what do you mean here? you could manually stop the solution at a certain point, number of iterations or some % of the goal but i'm not sure what you are looking to gain with respect to accuracy. it could still be on the high or low side.

3. regarding oscillation, are you talking about the goals plots or are you talking about the results between studies? ie 1 to 2, 2 to 3 and then 3 to 4?

DH
DH 2015-01-12

Thanks for replying so quickly!  I'll answer in the order you listed:

1.  The number in the table is the basic mesh (simply Nx * Ny * Nz), so it is the ideal mesh size.  After Flow Simulation creates the basic mesh and does some refinements, the total number of cells increases.  Some of those are fluid, partial, or solid cells.  It causes an issue with calculating the GCI, but that could be OK as long as the solution is close to being asymptotic from one case to the next.

2.  I guess I was thinking that I might need to manually set the convergence criteria in each study, so that  the solution stops at the level of convergence in all simulations.  I'm not sure how much this matters, though, I was just wondering if anyone had a better suggestion. 

3.  Regarding oscillation, I am talking about the results between studies as you mentioned:  1 to 2, 2 to 3, and 3 to 4.  Once the solution is nearly mesh-independent, the difference in variables should be less than 5% or so from one simulation to the next as the mesh gets finer.

DH
DH 2015-01-12

I added two more configurations with more mesh cells and ran the simulations last night, and I am getting even more divergence.  Do I need 10 or 20 million cells to solve this problem? 

My plan was to run somewhat uniform grids (using manual settings) at a few levels, compare results and show what level of grid resulted in less than 5% difference in velocity values, then run the simulation again using automatic settings.  Then I would compare the velocitty values from the manual and automatic grids to show that the automatic settings produce results that are just as good as the manual settings (with hopefully many fewer cells in the overall mesh).  So I would have a GCI value to report for the manual mesh settings, and I would be able to state that the automatic settings produced results that were just as good.

  

Case78
Nx290348
Ny7590
Nz91109
Total Cells1,977,2343,416,661

comment imagecomment image
SF
SF 2015-01-12

why does the solution need to be within 5% convergence?

overall from what you're showing me, you need more cells

or you need a bit more tolerance for the accuracy of the results and where you're measuring the results

DH
DH 2015-01-12

5% difference is a fairly commonly used value I've seen in literature when assessing grid independence.  Honestly, I'd be happy with 10% right now if I could achieve it.  I never expected to see the velocity at one point change by that much as I increased the number of cells in the mesh.

Here's a link to a procedure similar to what I'm trying to do:  Computational Fluid Dynamics (CFD) Blog - LEAP Australia & New Zealand | Tips & Tricks: Convergence and Mesh Independe…

Regardless of whether I use 5% or 10%, I need the solution to be in the asymptotic range to have confidence in the results.  I'll try a few more simulations with denser meshes and see what happens.

SF
SF 2015-01-12

5 or 10% is certainly possible but i think you're going to have to really dig in and look at whether those parameters are convergable

for example if i had a point parameter in a natural convection analysis, i don't know that i would be confident that value would converge

but the average value over the whole computational domain should

SF
SF 2015-01-13

I would be interested in seeing what you got if you go up to 10-20 million cells. Not necessarily because I believe you would have better results, but because from my personal experience Flow Sim starts to have serious stability and convergence issues past the first few million cell count.

DH
DH 2015-01-13

I'm wondering if any of the divergence I'm seeing in spot values with increasing mesh density is due to cumulative errors due to weak convergence criteria.  The automatic convergence criteria may not be small enough.  I often read in literature that the residuals should be reduced to 10^-4 or 10^-5.  The terminology used in Flow Simulation is somewhat different than what is used in other commercial codes and can be confusing at times.  Does setting the convergence criteria to 0.0001 for all variables achieve the 10^-4 guideline for reducing residual error?

SF
SF 2015-01-13

The goal plot should tell you specifically what the value of the criteria that is being used for convergence is, it's one of the columns. Can you tell us what the ratio of criteria/converged value is?

DH
DH 2015-01-13

Hmm, I have not found an easy way to find these values after the solver window has been closed.  Is there a way to find convergence criteria information after a project has been finished?  I looked through the .stdout file, but don't see those values listed.  Luckily, I took a screenshot once:

comment imagecomment image
CM
CM 2015-01-13

If you make a goal plot and export it to Excel it provides all of the information in that table

DH
DH 2015-01-13

Thanks!

DH
DH 2015-01-15

So, for the GG Av Velocity (X) 1 solution variable in the image above, the current value is -0.12237 ft/s, the criterion is 0.0154136 ft/s, and the delta is 0.00648359 ft/s.  Does this mean the level of convergence with respect to the average value is 0.0154136/0.12237 * 100, or 12.6%?  So if I want to reach a level of 1% I would need to manually specify the criterion as 0.0012237 ft/s?

SF
SF 2015-01-15

you could set it manually

you may also want to bump up the calc control level (you probably have default level 3)