convergence criteria

10
Convergence criteria I see all kind of mistakes on these forums when dealing with convergence, so I will give brief review of methods... At convergence, the following should be satisfied: All discrete conservation equations (momentum, energy, etc.) are obeyed in all cells to a specified tolerance OR the solution no longer changes with subsequent iterations. Overall mass, momentum, energy, and scalar balances are achieved. Monitoring convergence using residual history: Generally, a decrease in residuals by three orders of magnitude indicates at least qualitative convergence. At this point, the major flow features should be established. Scaled energy residual should decrease to 10-6 (for the pressure-based solver). Scaled species residual may need to decrease to 10-5 to achieve species balance. Monitoring quantitative convergence: Monitor other relevant key variables/physical quantities for a confirmation. Ensure that overall mass/heat/species conservation is satisfied. In addition to residuals, you can also monitor lift, drag and moment coefficients. Relevant variables or functions (e.g. surface integrals) at a boundary or any defined surface. In addition to monitoring residual and variable histories, you should also check for overall heat and mass balances. The net flux imbalance (shown in the GUI as Net Results) should be less than 1% of the smallest flux through the domain boundary If solution monitors indicate that the solution is converged, but the solution is still changing or has a large mass/heat imbalance, this clearly indicates the solution is not yet converged. 1

Upload: ajota7

Post on 04-Sep-2015

213 views

Category:

Documents


0 download

DESCRIPTION

criterio convergencia mallado

TRANSCRIPT

Convergence criteriaI see all kind of mistakes on these forums when dealing with convergence, so I will give brief review of methods...

At convergence, the following should be satisfied: All discrete conservation equations (momentum, energy, etc.) are obeyed in all cells to a specified tolerance OR the solution no longer changes with subsequent iterations. Overall mass, momentum, energy, and scalar balances are achieved. Monitoring convergence using residual history: Generally, a decrease in residuals by three orders of magnitude indicates at least qualitative convergence. At this point, the major flow features should be established. Scaled energy residual should decrease to 10-6 (for the pressure-based solver). Scaled species residual may need to decrease to 10-5 to achieve species balance. Monitoring quantitative convergence: Monitor other relevant key variables/physical quantities for a confirmation. Ensure that overall mass/heat/species conservation is satisfied.

In addition to residuals, you can also monitor lift, drag and moment coefficients.

Relevant variables or functions (e.g. surface integrals) at a boundary or any defined surface.

In addition to monitoring residual and variable histories, you should also check for overall heat and mass balances.

The net flux imbalance (shown in the GUI as Net Results) should be less than 1% of the smallest flux through the domain boundary

If solution monitors indicate that the solution is converged, but the solution is still changing or has a large mass/heat imbalance, this clearly indicates the solution is not yet converged.

In this case, you need to: Reduce values of Convergence Criterion or disable Check Convergence in the Residual Monitors panel. Continue iterations until the solution converges.

Selecting None under Convergence Criterion disables convergence checking for all equations.

Numerical instabilities can arise with an ill-posed problem, poor-quality mesh and/or inappropriate solver settings. Exhibited as increasing (diverging) or stuck residuals. Diverging residuals imply increasing imbalance in conservation equations. Unconverged results are very misleading!

Troubleshooting Ensure that the problem is well-posed. Compute an initial solution using a first-order discretization scheme. For the pressure-based solver, decrease underrelaxation factors for equations having convergence problems. For the density-based solver, reduce the Courant number. Remesh or refine cells which have large aspect ratio or large skewness. Remember that you cannot improve cell skewness by using mesh adaption!

Under-relaxation factor, , is included to stabilize the iterative process for the pressure-based solver Use default under-relaxation factors to start a calculation.

Decreasing under-relaxation for momentum often aids convergence.Default settings are suitable for a wide range of problems, you can reduce the values when necessary.Appropriate settings are best learned from experience!

For the density-based solver, under-relaxation factors for equations outside the coupled set are modified as in the pressure-based solver.

A transient term is included in the density-based solver even for steady state problems.The Courant number defines the time step size.For density-based explicit solver: Stability constraints impose a maximum limit on the Courant number. Cannot be greater than 2(default value is 1).

Reduce the Courant number when having difficulty converging.For density-based implicit solver: The Courant number is not limited by stability constraints. Default value is 5.

Convergence can be accelerated by: Supplying better initial conditions Starting from a previous solution (using file/interpolation when necessary) Gradually increasing under-relaxation factors or Courant number Excessively high values can lead to solution instability convergence problems You should always save case and data files before continuing iterations Controlling MultiGrid solver settings (not generally recommended) Default settings provide a robust Multigrid setup and typically do not need to be changed.

A converged solution is not necessarily a correct one! Always inspect and evaluate the solution by using available data, physical principles and so on. Use the second-order upwind discretization scheme for final results. Ensure that solution is grid-independent: Use adaption to modify the grid or create additional meshes for the grid-independence study

If flow features do not seem reasonable: Reconsider physical models and boundary conditions Examine mesh quality and possibly remesh the problem Reconsider the choice of the boundaries location (or the domain): inadequate choice of domain (especially the outlet boundary) can significantly impact solution accuracy

Numerical errors are associated with calculation of cell gradients and cell face interpolations.

Ways to contain the numerical errors: Use higher-order discretization schemes (second-order upwind, MUSCL) Attempt to align grid with the flow to minimize the false diffusion Refine the mesh Sufficient mesh density is necessary to resolve salient features of flow Interpolation errors decrease with decreasing cell size Minimize variations in cell size in non-uniform meshes Truncation error is minimized in a uniform mesh FLUENT provides capability to adapt mesh based on cell size variation Minimize cell skewness and aspect ratio In general, avoid aspect ratios higher than 5:1 (but higher ratios are allowed in boundary layers) Optimal quad/hex cells have bounded angles of 90 degrees Optimal tri/tet cells are equilateral

A grid-independent solution exists when the solution does not change when the mesh is refined.Below is a systematic procedure for obtaining a grid-independent solution: Generate a new, finer mesh. Return to the meshing application and manually adjust the mesh. OR Use the solution-based adaption capability in FLUENT. VERY IMPORTANT: Save the case and data files first. Create adaption register(s) and adapt the mesh. Data from the original mesh is interpolated onto the finer mesh. FLUENT offers dynamic mesh adaption which automatically changes the mesh according to user-defined criteria. Continue calculations until convergence. Compare the results obtained on the different meshes. Repeat the procedure if necessary.

To use a different mesh on a single problem, use the TUI commands file/write-bc and file/read-bc to facilitate the setup of a new problem.Better initialization can be obtained via interpolation from existing case/data by using solution data interpolationA web-based training module is available to train users in replication of case setup and solution data interpolation.

Summary:

Solution procedure for both the pressure-based and density-based solvers is identical. Calculate until you get a converged solution Obtain a second-order solution (recommended) Refine the mesh and recalculate until a grid-independent solution is obtained.

All solvers provide tools for judging and improving convergence and ensuring stability.

All solvers provide tools for checking and improving accuracy.

Solution accuracy will depend on the appropriateness of the physical models that you choose and the boundary conditions that you specify.Tips & Tricks: Convergence and Mesh Independence StudyPosted ByLEAP CFD Teamon Jan 17, 2012 |26 commentsThe previous posts have discussed the meshing requirements that we need to pay attention to for a valid result. It is important to remember that your solution is the numerical solution to the problem that you posed by defining your mesh and boundary conditions. The more accurate your mesh and boundary conditions, the more accurate your "converged" solution will be.CONVERGENCEConvergence is something that all CFD Engineers talk about, but we must remember that the way we generally define convergence (by looking at Residual values) is only a small part of ensuring that we have a valid solution. For a Steady State simulation we need to ensure that the solution satisfies the following three conditions:- Residual RMS Error values have reduced to an acceptable value (typically 10-4or 10-5)- Monitor points for our values of interest have reached a steady solution- The domain has imbalances of less than 1%.

RMS Residual Error ValuesOur values of interest are essentially the main outputs from our simulation, so pressure drop, forces, mass flow etc. We need to make sure that these have converged to a steady value otherwise if we let the simulation run for an additional 50 iterations then you would have a different result. Ensuring that these values have reached a steady solution means that you are basing your decisions on a single repeatable value.

Example of Monitoring a Value of InterestAs a rule, we must ensure that prior to starting a simulation we clearly define what our values of interest are, and we make sure that we monitor these to ensure that they reach a steady state. As previously highlighted, we also need to make sure that the Residual RMS Error values are to at least 10-4. Finally, we need to ensure that the overall imbalance in the domain is less than 1% for all variables.

Imbalances in the Domain

MESH INDEPENDENCE STUDYA bit of background We conduct mesh independence studies in CFD to make sure that the results we get are due to the boundary conditions and physics used, not the mesh resolution. So if the results do not change with mesh density, we have achieved mesh independence.

The approach outlined above results in a single solution for the given mesh that we have used. Although we are happy that this has "converged" based on RMS Error values, monitor points and imbalances, we need to make sure that the solution is also independent of the mesh resolution. Not checking this is a common cause of erroneous results in CFD, and this process should at least be carried out once for each type of problem that you deal with so that the next time a similar problem arises, you can apply the same mesh sizing. In this way you will have more confidence in your results.The way we carry out a mesh independence study is fairly straight forward.-Step 1Run the initial simulation on your initial mesh and ensure convergence of residual error to 10-4, monitor points are steady, and imbalances below 1%. If not refine the mesh and repeat.- Step 2Once you have met the convergence criteria above for your first simulation, refine the mesh globally so that you have finer cells throughout the domain. Generally we would aim for around 1.5 times the initial mesh size.Run the simulation and ensure that the residual error drops below 10-4, that the monitor points are steady, and that the imbalances are below 1%.At this point you need to compare the monitor point values from Step 2 against the values from Step 1. If they are the same (within your own allowable tolerance), then the mesh at Step 1 was accurate enough to capture the result.If the value at Step 2 is not within acceptable values of the Step 1 result, then this means that your solution is changing because of your mesh resolution, and hence the solution is not yet independent of the mesh. In this case you will need to move to Step 3.- Step 3Because your solution is changing with the refinement of mesh, you have not yet achieved a mesh independent solution. You need to refine the mesh more, and repeat the process until you have a solution that is independent of the mesh. You should then always use the smallest mesh that gives you this mesh independent solution (to reduce your simulation run time).- ExampleThe best way to check for a mesh independent solution is to plot a graph of the resultant monitor value vs the number of cells in your simulation. This is illustrated below where we have three results from our steady monitor points for the average temperature at an outlet.We can see that with 4 million cells we have a result, which could be "converged" for that particular mesh, with 10-4residuals and imbalances below 1%. By increasing the mesh resolution to 6 million cells, we can see that there has been a jump in the value of interest that is not within my user specified tolerance (in this example I'll say +/-0.5 degrees).By increasing the mesh size further we can see that the 8 million cell simulation results in a value that is within my acceptable range. This indicates that we have reached a solution value that is independent of the mesh resolution, and for further analysis we can use the 6 million cell case, as it will give us a result within the user defined tolerance.Example of Mesh Independence Study

8