{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# CFD Results Post-Process and Validation\n", "\n", "**The final step for the development of a CFD simulation for a problem of interest is to process and examine the validity of the obtained numerical results (a.k.a post-processing and validation step). These steps requires an in-depth engineering knowledge about the fundamentals of the physical problem of interest. Thus, the value of investing time in understanding the fundamental physics of the flow, once again is highlighted here. This process is done starting from general inspection on CFD simulation results and ends with more detail validation process.**\n", "\n", "In this section the results for simulation of flow over a cylinder with Reynolds of 50 will be presented, discussed and experimentally validated. It should be noted that the post-processing and validation of all simulations with different Reynolds numbers would be similar to the presented procedure here. The first general rule of thumb to check the convergence of a CFD simulation is to visualize the residuals of key flow field variables, such as continuity, momentum, velocity and etc.. In FLUENT once user starts to run the simulation, the Residual values for the relative variables, based on the choices of models, are visualized in the solver window. Furthermore, users can manage details of the plotted residuals or add other residuals to be visualized via plot/residuals.\n", "\n", "\n", "
\n", "Fig.1 - Residuals of continuity and streamwise velocity for simulation of flow over a cylinder with Re=50.\n", "\n", "Fig. 1 visualizes the residual values of continuity and streamwise velocity (i.e. velocity in x-direction) versus the number of iterations. The general decreasing trend of the residual values confirms that the numerical solution of the conservation/governing equations are converging to specific final values. As a rule of thumb reaching the continuity residual of 10E-3 is the first necessary but not sufficient general criteria to confirm the convergence of the CFD simulation. In this study case this criteria is reached after about 100 iterations and after about 500 iterations the continuity residuals reached value of 1E-4, which is a solid necessary confirmation of CFD simulation convergence. Users can also define criteria to stop the iteration process once the desired criteria is met during the iteration process. For the case study of Re=50 the iterations were stopped after FLUENT-set iterations as shown in Fig. 1.\n", "\n", "The second step is to visualize dimensionless form of the important variables within the CFD domain. This visualization step can be problem specific and should be performed over an adequate plane of choice. For most of the problems contour of normalized velocity or pressure, over a horizontal or vertical plane at the center of the CFD domain, is a good start point. The path to define an adequate visualization probe such as planes or lines is surface/plane-bounded. With this path a user can define various type of surface probes to visualize the obtained numerical results over them. However, for the current problem since the entire domain is two dimensional and planar, it would make the entire domain the best candidate for the post-processing plane.\n", "\n", "User should now define the normalized variable of interest that needs to be visualized. The normalized streamwise velocity by the inlet velocity can be defined using define/custom-field-functions/define, name the variable (e.g. normalized_streamwise_velocity)and put the required formula for the variable of interest with correct syntax under x_velocity/1. This will define and calculate the normalized streamwise velocity with free stream velocity within entire CFD domain. It order to visualize the defined normalized flow field variable in the previous step users should use display/contour/normalized_streamwise_velocity and set the range of [0,1.2] to visualize the normalized velocity contours and it's legend as shown in figure 2:.\n", "\n", "\n", "Fig.2 - Contours of normalized streamwise velocity with the free stream velocity over a cylinder for various Reynolds numbers.\n", "\n", "Fig. 2 visualizes the normalized streamwise velocity with free stream for four different flows with various Reynolds numbers (specified on the bottom right corner of each contour). The general physics for all these four flow fields are the same. Flow enters the domain with normalized velocity of 1. Due to the imposed no slip boundary conditions over the surface of cylinder, the velocity instantly decrease to zero on the nose of the cylinder and a laminar boundary layer starts to form and grow around the cylinder's surface. Moving slightly further downstream at the top and bottom edges of the cylinder, where the formed laminar boundary layer is exposed to the free stream velocity, a shear layer will form and results in to an accelerated flow region, colored with dark red, at these two points. These two accelerated regions can be though as continues and attached vortices to the cylinder's surface.\n", "Since the body of cylinder, as a blunt body, is blocking the incoming flow a decelerated region of flow would form right at the back of the cylinder. This area is the place in which the flow recirculates and two counter rotating vortices, as a result of flow moving over the top and bottom curved surfaces of cylinder, would form here. At low Reynolds number this region will stay attached to the cylinder. Moving further downstream the cylinder, as a result of a momentum gradient between the formed shear layer at the top and bottom edges of the cylinder and the recirculation zone behind the cylinder, a wake with velocity deficit is created and is shown by light green color. Moving further downstream and getting closer to the outlet boundary this wake recovers and the velocity become very close to the freestream velocity at the inlet of the CFD domain.\n", "\n", "Comparison between obtained numerical results for the normalized velocity contours for different Reynolds number reveals that as Reynolds number increases, effect of inertial forces become dominant within the flow field, the area of recirculation region just behind the cylinder, shown in blue, and local acceleration on top of bottom of the cylinder increases. This lead into a large momentum gradient between these two regions and eventually unsteady vortex shedding from the cylinder (i.e. around Re=100). This unsteady phenomena is a well-known physical process that can be investigated using unsteady numerical models.\n", "\n", "**After performing the general post-processing steps, the user need to perform more detail oriented post-processing to confirm the validity of the CFD simulation. This stage can be a state-of-the-art. Comparing the numerical results against the theory (discussed earlier) or any other available experimental results is the final stage of post-processing. It is extremely important to calculate the correct corresponding numerical variables and compare them against the experimental or other numerical data.**\n", "\n", "In order to validate the numerical results from these simulations the numerically predicted drag coefficients of the cylinder were compared against the corresponding experimentally measure drag coefficient values from [here](https://www.researchgate.net/publication/232025673_Computations_of_the_drag_coefficients_for_low-Reynolds-number_flow_past_rings) for different Reynolds numbers. The reason behind choosing the drag coefficient is that the cylinder is significantly affected by the pressure forces acting on the body of cylinder and generating a wake behind the cylinder. It is worth to mention that in the laminar flows the effect of viscous forces on the drag force and coefficient on the cylinder is minimum.\n", "\n", "The value of the drag coefficient of the cylinder is defined as:\n", "\n", "$$ C_D~=~\\frac{F_D}{\\frac{1}{2} . \\rho_{ref} . V_{ref} ^2 . A_{proj}}. $$\n", "\n", "In this equation $F_D$, the total drag force due to pressure and viscous forces within the flow acting on the cylinder's surface in the streamwise direction, is normalized with the available momentum within the undisturbed incoming flow that could be exerted on the cylinder. The value of this momentum is calculated using $\\rho_{ref}$ as the reference density of the flow, which is the density of the flow. $V_{ref}$ as the undisturbed streamwise flow velocity in the inlet and $A_{proj}$, which is the projected area of the cylinder surface. For a two-dimensional cylinder the projected area is equal to the diameter of the cylinder. This is the area where pressure and viscous forces are acting on the cylinder in the streamwise direction. It should be noted that the pressure and viscous forces in the perpendicular direction to streamwise direction cancel each other. Hence, the forces and areas that they act on does not have any contribution to the drag force and coefficient.\n", "\n", "Users can calculate and report the value of drag coefficient following the report\\forces\\wall-forces. Running this command in the console will ask for the direction of the force, which is x-direction in this case. Users should note that this command uses default reference variables to calculate the force coefficients. Therefore, it should be confirmed that the reference values are set correctly. This setting can be done using report/reference-values path and set the corresponding reference values for each variable as mentioned above and discussed extensively in the Physics section. Following table provides a summary of comparison between the experimentally measured and numerically calculated drag coefficients values:\n", "\n", "| Reynolds # | $C_D$ Experiment| $C_D$ Numerical | Relative Error [%]|\n", "| :-------------:|:-------------: | :-----:|:--------:|\n", "| 10 | 2.89 | 2.80 |3.11|\n", "| 25 | 1.87 | 1.83 |2.10|\n", "| 50 | 1.47 | 1.43 |2.72|\n", "| 100 | 1.34 | 1.26 |5.97|\n", "Table 1. Comparison between the experimentally measured and numerically predicted a cylinder drag coefficient for different Reynolds number.\n", "\n", "Table 1 compares the experimentally [measured](https://www.researchgate.net/publication/232025673_Computations_of_the_drag_coefficients_for_low-Reynolds-number_flow_past_rings) and numerically calculated drag coefficient values for case study of laminar flow over a cylinder and states the corresponding value of the relative error percentage. As shown in this table the value of the relative error percentage are below 4% and numerical and experimental values are in a close agreement with each other for each corresponding Reynolds number. It is important to highlight the fact that due to low value of Reynolds number (i.e. slow flow) obtaining very accurate values for numerical drag coefficient requires running simulations for more 100000 iterations. It can be shown that performing more iteration would decrease the value of the relative error to less than 2% as well. The disagreement between the corresponding drag coefficient values start to increase for Reynolds number of 100. The reason behind this large error is that at this Reynolds number the effect of inertial forces become more significant and flow becomes unsteady. Therefore, steady model can not simulate this flow field accurately. .\n", "\n", "At this stage one can conclude that this CFD numerical simulation is validated to study steady laminar flow over a cylinder. Therefore, these simulations can be used for similar or more complex problems, such as unsteady flow over a cylinder or three dimensional laminar steady or unsteady flow over a sphere. This can be done via correct implementation in changing the corresponding solver, models and/or boundary conditions." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.5.1" } }, "nbformat": 4, "nbformat_minor": 0 }