key: cord-0058884-x1ihrpp0 authors: Cárdenas R., César A.; Morales, Carlos Andrés Collazos; Ospina, Juan P.; Sánchez, Joaquín F.; Racedo-Gutiérrez, Jelibeth; Ariza-Colpas, Paola; De-la-Hoz-Franco, Emiro; González, Ramón E. R. title: OpenFOAM Numerical Simulations with Different Lid Driven Cavity Shapes date: 2020-08-24 journal: Computational Science and Its Applications - ICCSA 2020 DOI: 10.1007/978-3-030-58799-4_18 sha: f71a26536f7be18afecc5f295a832b6c40b0acd2 doc_id: 58884 cord_uid: x1ihrpp0 The finite volume method have been developed to solve the Navier-Stokes equations with primitive variables and non dimensional form. This work examine the classical benchmark problem of the lid-driven cavity at a different Reynolds range (Re = 10,100,400, 1000, 2000, 3200) and several cavity geometries. The cavity configurations include square cavity, skewed cavity, trapezoidal cavity and arcshaped cavity. The flow is assumed laminar and solved in a uniform mesh. A CFD tool with its solvers (icoFoam) will be used for this study. Cavity flows have been of great importance in many industrial processes applications. These type of flows such as lid-driven cavity has served as a model for testing and validation. They provide a model to understand more complex flows with closed recirculation regions. These types of flows contain a wide variety ranging from rotation near the recirculation region to a strong extent near the edges of the top cover. Generally, numerical simulations of 2D cavity flows are made at different Reynolds numbers. The incompressible laminar flow in square, trapezoidal and skewed cavities whose top wall moves at a uniform speed of 1 m/s are studied in this work. The Reynolds numbers taken range from 10 to 3200. Also, different mesh sizes are determined for all configurations (41 × 41, 61 × 61, 81 × 81, 129 × 129) [1, 5, 7] . combined with appropriate implementations of numerical methods and even discretization of partial differential equations and resulting linear systems solutions. The discretization of governing equations in OpenFOAM is based on the finite volume method (FVM). It is formulated with collocated arrangements, pressure and speed results by segregated methods. SIMPLE (Semi-implicit Method for Pressure Linked Equations) or PISO (Pressure Implicit Splitting of Operators), are the most used algorithms for pressure-speed coupling. This software also offers a variety of schemes of interpolation, solvers and preconditioners for the algebraic equation system. To create a OpenFOAM case, three files are required: 0, or initialization, system and constant. In the 0 directory, the initial condition properties of the fluid are established. It also contains two subdirectories P and U , which are the velocity fields and pressure. In the constant directory there are two subdirectories: Polymesh and transport properties. Finally, in the system directory, the methods of discretization and procedure of solution are set. Open-FOAM always operates in 3D and all geometries are generated in 3D. However, for the cavity case, it is possible to instruct it to solve the 2D case specifying a empty boundary condition. Within the system directory there is a subdirectory called fvSchemes which defines the discretization schemes. For this case, Euler is the one used for temporary discretization and Gauss Liner for convection. The fvSolution defines the solution procedure. For the linear equations system, P is defined as P P CG, DIC is a preconditioner in which the conjugate gradient P CG is employed as solver. For the system of U linear equations, the following parameters are defined: DILU as a preconditioner with a conjugated gradient P BiCG as solver. Some research works present interesting simulations in which different mesh sizes and different Reynolds numbers are used. Also, the appearance or emergence of vortices is noticed. Several studies have shown that the boundary condition of vorticity has a significant influence on the simulation stability [2, 8] . For the rectangular cavity case study, all the border conditions are walls. The upper wall moves in the x direction at a constant speed while the others are stationary. The flow is assumed as laminar which is resolved in a uniform mesh by using the icoFoam approach. This solver is commomly applied for laminar and incompressible flow. The moment and continuity equations are incorporated into the mathematical model for the 2D flow cavity problem. It is noted that the Navier-Stokes equation is the moment equation for incompressible flow in 2D [3, 4, 6, 9] . Where u and v are the velocities in the x and y directions. t is time ρ, is the density and μ is the viscosity. A steady 2D flow is considered for this work. The top border (lid) moves at a certain velocity while the other walls remain fixed. For all the applied geometries, the top wall always moves. Cartesian coordinates are utilized (x, y) and its origin is located in the left lower corner and indicates the unit vectors in the x and y directions. With the non-dimensional variables given as: The domain is divided into different control volumes (CVs) [10] . A separated Cartesian mesh is used both horizontally and vertically. For each control volume (CV), the momentum and continuity equations are approximated by using some algebraic expressions. These involve the u, v, p values in the center of each control volume and its neighbors. The momentum equations can be represented as discretizations of finite volumes differences in which i and j are the cell indexes within a staggered mesh in x and y directions. Figure 1 shows a control volume P ans its neighbors S, E, N , and W . Likewise, the previous abbreviations will denote the position vectors of CVs centers as well. These three equations can be combined with what is known as stream function and the vorticity equation. Then, the transport vorticity equation (3) ant two more velocity equations (6) are obtained. ω is the voticity and Ψ is the stream function and are non-dimensional variables. The PISO method involves a predictor step and two correcting steps. It means that the velocity fields u and v do not satisfy continuity unless pressure is corrected. The p, u, v are assumed at the beginning. The following is a summary of the PISO algorithm steps: Different geometries (square, skewed and trapezoidal) are applied to study the 2D cavity flow behaviour by using an openFOAM solver. Also, several values for parameters such as reynolds numbers, pressure and velocities are used. Hence, results are obtained for all these conditions to check the influence on the cavity vorticity The other figures present the simulation results. These include Courant numbers variation over time and iterations required for convergence. The results are discussed for the three proposed cases. All the plots are got through gnuplot. 1. Square cavity Variables are defined for U x , U y , P and Re. Other parameters are taken by default as set up in the CFD OpenFOAM solver (turbulence variables k, epsilon). Hence, in this type of geometry cavity, it is noticed in the residuals plot that P converges at a steady value of 1. Likewise, U x and U y converge close to 1. Regarding the Courant number, it is observed that is goes a bit above 1 as the time step also increases. However, it looks like convergence is not affected in any way since the solver can deal with relative large numbers. Also, it can be seen in Fig. 2 that vorticity is generated at the top of the cavity and shifts all over the cavity. Similar to the square case, different Re, speed and pressure values are considered. An important matter noted is that the maximum Courant number is a bit larger than 1 when convergence is reached. With respect to the residuals, it can be seen that the simulation parameters converge at lower ranges. An important issue is that pressure is solved at higher numbers and it does not affect the solution as the solver can handle it. Figure 6 shows pressure p streamlines and some kind of vortex originated at the right top corner and its variations from top to center and all over the cavity. Normally this kind of cavity is inclined at 45 • concerning the x axis. It is seen in Fig. 13 that the Courant number got is less than 1. Concerning the residuals, velocities U x , U y and P achieve small values for convergence. In addition, Fig. 10 depicts vorticity contour at the right top corner and moves to the whole cavity. Some vorticity is also created at the bottom, particularly on the left corner. Re numbers are taken at different values as well. The simulation of this cavity geometry is also carried out by setting up different reynolds numbers R e as well as velocities. In the residuals (Fig. 16) , all the parameters converged at very small values. The Courant number reached is very small even smaller than 1 which facilitates an appropriate solution. Vorticity is obtained at the right top corner which shifts towards the center of the cavity attempting to get the left side and bottom. The OpenFAOM tutorial for the 2D cavity lid driven cases establishes some parameters for simulation purposes of an incompressible and isothermal flow. In this work, a complete mathematical model is developed. It provides an overall insight of the partial differential equations to be resolved. Since different cavity configurations are taken, it can be seen that a solution is given for instance, for Courant ranges over 1. Certainly, the square and trapezoidal cases are the ones that get these values above to 1 to be solved. Likewise, it seems that no matter the velocity value, vorticity is always originated for all cavity shapes using just a uniform mesh. It can be inferred that fine grids or with better resolution may even improve the prediction of vortices. There are also more complex cases such as the arc-shaped type for which a solution is found as well. Hence, the icofoam solver is suitable or appropriate to give a solution of complex cavity flows. It would be possible to increase convergence and accuracy employing other solver like pisofoam or SIMPLE. Partially-averaged navier-stokes (PANS) simulations of lid-driven cavity flow-part 1: comparison with URANS and LES OpenFOAM for computational fluid dynamics Numerical simulation of creeping flow in Square Lid-Driven Cavity by using Open-Foam Instability and sensitivity analysis of flows using OpenFOAM R . Chin The lid-driven square cavity flow: numerical solution with a 1024 x 1024 grid Flow structure for power-law fluids in lid-driven arc-shape cavities Partially-averaged Navier-Stokes (PANS) simulations of lid-driven cavity flow-part ii: ow structures Lid-driven cavity flow of viscoelastic liquids Numerical simulation of flow in lid-driven cavity using OpenFOAM Simple solver for driven cavity OW problem