Chapter 18. Solver Theory
Total Page:16
File Type:pdf, Size:1020Kb
Chapter 18. Solver Theory This chapter describes the ANSYS FLUENT solver theory. Details about the solver algo- rithms used by ANSYS FLUENT are provided in Sections 18.1–18.6. For more information about using the solver, see Chapter 26: Using the Solver in the separate User’s Guide. • Section 18.1: Overview of Flow Solvers • Section 18.2: General Scalar Transport Equation: Discretization and Solution • Section 18.3: Discretization • Section 18.4: Pressure-Based Solver • Section 18.5: Density-Based Solver • Section 18.6: Multigrid Method • Section 18.7: Full Multigrid (FMG) Initialization 18.1 Overview of Flow Solvers ANSYS FLUENT allows you to choose one of the two numerical methods: • pressure-based solver (see Section 18.1.1: Pressure-Based Solver) • density-based solver (see Section 18.1.2: Density-Based Solver) Historically speaking, the pressure-based approach was developed for low-speed incom- pressible flows, while the density-based approach was mainly used for high-speed com- pressible flows. However, recently both methods have been extended and reformulated to solve and operate for a wide range of flow conditions beyond their traditional or original intent. In both methods the velocity field is obtained from the momentum equations. In the density-based approach, the continuity equation is used to obtain the density field while the pressure field is determined from the equation of state. On the other hand, in the pressure-based approach, the pressure field is extracted by solving a pressure or pressure correction equation which is obtained by manipulating continuity and momentum equations. Release 12.0 c ANSYS, Inc. January 29, 2009 18-1 Solver Theory Using either method, ANSYS FLUENT will solve the governing integral equations for the conservation of mass and momentum, and (when appropriate) for energy and other scalars such as turbulence and chemical species. In both cases a control-volume-based technique is used that consists of: • Division of the domain into discrete control volumes using a computational grid. • Integration of the governing equations on the individual control volumes to con- struct algebraic equations for the discrete dependent variables (“unknowns”) such as velocities, pressure, temperature, and conserved scalars. • Linearization of the discretized equations and solution of the resultant linear equa- tion system to yield updated values of the dependent variables. The two numerical methods employ a similar discretization process (finite-volume), but the approach used to linearize and solve the discretized equations is different. The general solution methods are described in Sections 18.1.1 and 18.1.2. To learn how to apply the solvers, see Section 26.1.1: Choosing the Solver in the separate User’s Guide. 18.1.1 Pressure-Based Solver The pressure-based solver employs an algorithm which belongs to a general class of meth- ods called the projection method [54]. In the projection method, wherein the constraint of mass conservation (continuity) of the velocity field is achieved by solving a pressure (or pressure correction) equation. The pressure equation is derived from the continuity and the momentum equations in such a way that the velocity field, corrected by the pres- sure, satisfies the continuity. Since the governing equations are nonlinear and coupled to one another, the solution process involves iterations wherein the entire set of governing equations is solved repeatedly until the solution converges. Two pressure-based solver algorithms are available in ANSYS FLUENT. A segregated algorithm, and a coupled algorithm. These two approaches are discussed in the sections below. The Pressure-Based Segregated Algorithm The pressure-based solver uses a solution algorithm where the governing equations are solved sequentially (i.e., segregated from one another). Because the governing equations are non-linear and coupled, the solution loop must be carried out iteratively in order to obtain a converged numerical solution. 18-2 Release 12.0 c ANSYS, Inc. January 29, 2009 18.1 Overview of Flow Solvers In the segregated algorithm, the individual governing equations for the solution variables (e.g., u, v, w, p, T , k, , etc.) are solved one after another . Each governing equation, while being solved, is “decoupled” or “segregated” from other equations, hence its name. The segregated algorithm is memory-efficient, since the discretized equations need only be stored in the memory one at a time. However, the solution convergence is relatively slow, inasmuch as the equations are solved in a decoupled manner. With the segregated algorithm, each iteration consists of the steps illustrated in Fig- ure 18.1.1 and outlined below: 1. Update fluid properties (e,g, density, viscosity, specific heat) including turbulent viscosity (diffusivity) based on the current solution. 2. Solve the momentum equations, one after another, using the recently updated val- ues of pressure and face mass fluxes. 3. Solve the pressure correction equation using the recently obtained velocity field and the mass-flux. 4. Correct face mass fluxes, pressure, and the velocity field using the pressure correc- tion obtained from Step 3. 5. Solve the equations for additional scalars, if any, such as turbulent quantities, energy, species, and radiation intensity using the current values of the solution variables. 6. Update the source terms arising from the interactions among different phases (e.g., source term for the carrier phase due to discrete particles). 7. Check for the convergence of the equations. These steps are continued until the convergence criteria are met. Release 12.0 c ANSYS, Inc. January 29, 2009 18-3 Solver Theory Pressure−Based Segregated Algorithm Pressure−Based Coupled Algorithm Update properties Update properties Solve sequentially: U V W vel vel vel Solve simultaneously: system of momentum and pressure−based continuity equations Solve pressure−correction (continuity) equation Update mass flux, Update mass flux pressure, and velocity Solve energy, species, Solve energy, species, turbulence, and other turbulence, and other scalar equations scalar equations No Yes No Yes Converged? Stop Converged? Stop Figure 18.1.1: Overview of the Pressure-Based Solution Methods 18-4 Release 12.0 c ANSYS, Inc. January 29, 2009 18.1 Overview of Flow Solvers The Pressure-Based Coupled Algorithm Unlike the segregated algorithm described above, the pressure-based coupled algorithm solves a coupled system of equations comprising the momentum equations and the pressure- based continuity equation. Thus, in the coupled algorithm, Steps 2 and 3 in the segre- gated solution algorithm are replaced by a single step in which the coupled system of equations are solved. The remaining equations are solved in a decoupled fashion as in the segregated algorithm. Since the momentum and continuity equations are solved in a closely coupled manner, the rate of solution convergence significantly improves when compared to the segregated algorithm. However, the memory requirement increases by 1.5 – 2 times that of the segre- gated algorithm since the discrete system of all momentum and pressure-based continuity equations needs to be stored in the memory when solving for the velocity and pressure fields (rather than just a single equation, as is the case with the segregated algorithm). 18.1.2 Density-Based Solver The density-based solver solves the governing equations of continuity, momentum, and (where appropriate) energy and species transport simultaneously (i.e., coupled together). Governing equations for additional scalars will be solved afterward and sequentially (i.e., segregated from one another and from the coupled set) using the procedure described in Section 18.2: General Scalar Transport Equation: Discretization and Solution. Because the governing equations are non-linear (and coupled), several iterations of the solution loop must be performed before a converged solution is obtained. Each iteration consists of the steps illustrated in Figure 18.1.2 and outlined below: 1. Update the fluid properties based on the current solution. (If the calculation has just begun, the fluid properties will be updated based on the initialized solution.) 2. Solve the continuity, momentum, and (where appropriate) energy and species equa- tions simultaneously. 3. Where appropriate, solve equations for scalars such as turbulence and radiation using the previously updated values of the other variables. 4. When interphase coupling is to be included, update the source terms in the appro- priate continuous phase equations with a discrete phase trajectory calculation. 5. Check for convergence of the equation set. These steps are continued until the convergence criteria are met. Release 12.0 c ANSYS, Inc. January 29, 2009 18-5 Solver Theory Update properties Solve continuity, momentum, energy, and species equations simultaneously Solve turbulence and other scalar equations No Yes Converged? Stop Figure 18.1.2: Overview of the Density-Based Solution Method In the density-based solution method, you can solve the coupled system of equations (con- tinuity, momentum, energy and species equations if available) using, either the coupled- explicit formulation or the coupled-implicit formulation. The main distinction between the density-based explicit and implicit formulations is described next. In the density-based solution methods, the discrete, non-linear governing equations are linearized to produce a system of equations for the dependent variables in every compu- tational cell. The resultant linear system is then