[BLANK_AUDIO] Welcome back to Sports and Building Aerodynamics, in the week on Computational Fluid Dynamics. In this module we're going to focus on errors, uncertainty, verification and validation. We start again with a module question. Which statement is correct? Errors are assessed by verification and uncertainties by validation. Errors are assessed by validation and uncertainties by verification. Or both errors and uncertainties are assessed by verification. Or D) Both errors and uncertainties are assessed by validation. Please hang on to your answer and we'll come back to this later on in this module. And the end of this module, you will understand errors and uncertainty in CFD, and you will understand the important actions of verification and validation. Let me briefly focus on the importance of accuracy and reliability in CFD. And I just want to use one quote for that. A quote by Versteeg and Malalasekera. Saying that the consequences of inaccurate CFD results, are at best wasted time, money and efforts, and at worst, catastrophic failure of components, structures and machines. There are different definitions of error and uncertainty and I've selected this one here, which is quite widely adopted, being that an error is a recognizable deficiency in a CFD model that is not caused by a lack of knowledge. While uncertainty is a potential deficiency in a CFD model that is caused by a lack of knowledge. Causes of errors are so-called numerical errors, which can be round-off errors, iterative convergence errors, or discretization errors. The coding errors, which are simply mistakes or so-called bugs in the software, or user errors, which are human errors due to incorrect use of the software. Main sources of uncertainty are, the input uncertainty, which are inaccuracies, for example, due to limited information or approximate representation of geometry, boundary conditions, and so on. And the so-called physical model uncertainty, which is the discrepancy between real flows and what we model in CFD, and that's often due to an inaccurate representation of the real physics going on. This can be turbulence, or assumptions, simplifications, such as assuming a steady flow where a flow is in the reality transient, and so on. Coding errors generally can be considered to be the responsibility of the code developer and code vender and not of the user, unless you programmed the code yourself. User errors, they should be reduced or eliminated by adequate training and experience. And the fact that I only write one line about it here, actually, does not at all mean that these are not important. On the contrary. Round-off errors. A round-off error is actually the difference between the exact value of a number and its approximation, as it is in the computation. And this is actually caused by the fact that real numbers in the computer are actually represented by a finite number of digits. That's called the machine accuracy. This can be controlled by careful arrangement of arithmetic operations, floating point arithmetic operations. For example, to avoid subtraction of almost equal numbers that are very large. Or addition of numbers with very large differences in magnitude. And a nice example of this here is actually the use of a so-called gauge pressure in CFD. So we do not use the absolute pressure which is, for example, for cycling aerodynamics the atmospheric pressure plus the overpressure or underpressure. No, we actually just use this overpressure or underpressure. An iterative convergence error is actually due to the fact that, well the numerical solution of a flow, of the complex non-linear partial differential equations actually requires an iterative process to solve the discretized algebraic equations. And of course, at some point in time we need to stop, because time is limited. And also the computational resources are limited. But when we stop, we will most likely not have a fully converged solution. Well, the difference between the fully converged solution and the solution that we get after stopping the iterations, is the iterative convergence error. Actually to determine whether a solution, an iterative process can be stopped, often, the so-called residuals are used, and a threshold for these residuals is set. And just to indicate what a residual really is, well, let's focus on this simplified expression that represents a discretized equation for a certain flow variable phi at grid cell called i, and then when we have the right solution, this indeed will satisfy the bottom equation, so this difference will be equal to zero. However, as long as we are in the iterative process and have not reached the exact solution, the numerically exact solution, well, then this equation will not be satisfied and it's difference, this unbalance is called the residual. That of course you can do for one particular point in the flow field. And then often the absolute value is taken, to avoid when you sum them up, to avoid that positive and negative residuals would, cancel each other. And then if you want to have the global residual over the entire computational domain, you actually sum the residual for, the variable of interest over all the cells, all the control volumes or finite elements in the computational domain. And then a threshold is set for this residual. And then often the residual is also scaled, it is divided by a reference value, by the norm of a given vector. And then this actually scaled residual is used and is compared against a threshold value. However, please be careful with preset residual thresholds in CFD simulations. Sometimes these are sufficient. But sometimes, they're completely not sufficient, and the actual thresholds should be set much more stringent. Then discretization errors. We already addressed discretization errors briefly in module 4. Well, actually, the discretization error can be a potentially very large, very important error, so it's a major concern in CFD similations to build a high-quality and high-resolution grid. So, making a good grid actually requires a lot of expertise and independent of expertise, it still requires a lot of care, a lot of time, and a lot of ingenuity, because you have to balance the high quality and low discretization errors on the one hand, and on the other hand still keep a feasible grid size. And estimating discretization errors is something that we discussed in module 4, there are also Richardson extrapolation and uniform reporting of grid-convergence studies was treated. Additional guidelines actually on how to make a high-quality grid will be given in the next module. Let's focus on input uncertainty. An example of input uncertainty is the simplification of the geometry of the computational domain. As you can see here for example this football stadium in a complex urban environment is actually translated into a computational model where we're not going to model all the details of facade and roof geometry of the surrounding buildings. Because we're not interested in the flow around the balcony of one particular building, except the building that we're actually focusing on, which is the stadium, and there you see that clearly the detail in the geometry and also the grid resolution is much higher. Then boundary conditions. Boundary conditions are a cut-off of the domain. And sometimes these are boundaries that are not present in reality, like you see here at the side and the top of this computational domain shown here. And sometimes they are present in reality. For example, a ground surface or a wall. But they are often significantly simplified, so special care is needed here to select correct boundary conditions, and also this will be treated in more detail in the next module. Then concerning physical model uncertainty, we distinguish between the limited accuracy, or the lack of validity of so-called submodels and the limited accuracy or the lack of simplifying assumptions. And some examples are given here. Well the fact that we use the RANS equations with turbulence models, which we know is a simplification, we know it's wrong but the issue is, how wrong is it? Or how close are we to a more accurate solution? The same holds for Large Eddy Simulation with sub-grid scale models. Turbulence model constants which have been fitted but better fits might be available for the particular problem at hand. Wall functions, we know it's an approximation, we know there are errors involved but the question is, the issue is to determine these errors. And then in the second degree we have well, applying steady simulations while we know the problem is transient. Applying a 2D simulation, while we know, actually, turbulent flows are by definition three dimensional, and so on. Verification and validation. Verification, this is a rather long definition, is a process of determining that a model implementation accurately represents the developer's conceptual description of the model, and the solution to the model. A shorter definition, or a shorter description is "solving the equations right". This actually refers to quantifying the errors. Validation on the other hand, is the process of determining the degree to which a model is an accurate representation of the real world, from the perspective of the intended uses of the model, or shorter, this is "solving the right equations". This actually refers to quantifying the uncertainties. Some examples, well to estimate the round-off error, what we can do is compare results obtained with different levels of machine accuracy. Single precision, double precision and so on. The iterative convergence error can be assessed by comparing results obtained after a different number of iterations, or with different convergence criteria, or limits for the residuals. And then the discretization error can be determined by systematic refinement of the grids and maybe also the time steps if we are talking about a transient simulation, and then we should strive for a monotonic reduction of the discretization error, and then we can actually estimate this error as explained in module 4. Then in validation, well to estimate input uncertainty, what is typically done are a sensitivity analysis and uncertainty analysis. So these are indeed termed validation not verification. And for physical modeling uncertainty this is typically done by comparing CFD results with high-quality experimental results. And the word high quality is really essential here, because a meaningful validation is something that you can only do after you have obtained good quantitative estimates of the following three errors: All the numerical errors, the input uncertainty, and the uncertainty of the experimental data that you're using for validation. So let's turn back to the module question. Which statement is correct here? And after this module, you know that errors are assessed by verification, and uncertainties by validation. In this module, we've learned about errors and uncertainty in CFD, and about the important actions of verification and validation. In the next module, we'll focus on best practice guidelines. Thank you again for watching, and we hope to see you again in the next module. [BLANK_AUDIO]