Moukalled F., Mangani L., Darwish M. The finite volume method in computational fluid dynamics. An advanced introduction with OpenFOAM and Matlab (811443), страница 85
Текст из файла (страница 85)
(15.19) becomesZVC@pdV ¼@xZp dy ¼ pe Dye pw Dyw ¼ ðpe pw ÞDy ¼ ðpe pw Þ@VCVCDxð15:20ÞSelecting a linear interpolation profile for the variation of pressure, the pressuregradient term can be rewritten as a function of pressure values at the main gridpoints asZVC@p11VC pE pWdV ¼ ðpE þ pC Þ ðpC þ pW Þ¼VC@x22Dx2Dxð15:21ÞThus either approach leads to the same expression involving the pressure difference between the alternating points E and W.In a similar way, using a linear interpolation profile and noticing that the densityis constant and ðDyÞe ¼ ðDyÞw ¼ ðDyÞC , the continuity equation can be expressedasuE uW ¼ 0ð15:22Þwhich also relates the velocity at two alternating grid points.In Eq.
(15.21) the pressure gradient term in element C depends on the values ofpressure at the two alternating, not consecutive, grid points straddling the element.The same is true for the continuity equation, which enforces conservation only foralternating velocity elements. This implies that non-physical zigzag (or checkerboard)pressure and velocity fields, like the ones shown in Fig.
15.2, will be sensed as uniformfields by the numerical scheme.15.2A Preliminary Derivation567Fig. 15.2 A checkerboardpressure and velocity fieldsgradientp:10-100WWW11010-10010CEEE1101wu:econtinuityFor the pressure and velocity values shown in Fig. 15.2, the pressure gradient atpoints W, C, and E are found to beZVWZVCZVE@pVWVWdV ¼ ðpC pWW Þ¼ ð10 10Þ¼0@x2DxW2DxW@pVCVCdV ¼ ðpE pW Þ¼ ð100 þ 100Þ¼0@x2DxC2DxC@pVEVEdV ¼ ðpEE pC Þ¼ ð10 10Þ¼0@x2DxE2DxEand the continuity equation seems to be enforced for each element sinceZVWZVCZVE@uVWVWdV ¼ ðuC uWW Þ¼ ð1 1Þ¼0@x2DxW2DxW@uVCVCdV ¼ ðuE uW Þ¼ ð10 10Þ¼0@x2DxC2DxC@uVEVEdV ¼ ðuEE uC Þ¼ ð1 1Þ¼0@x2DxE2DxEIn multi dimensional situations a similar non-physical behavior can arise even if it isharder to visualize. This sets the ground for the next step that presents one approachto resolve this problem.15.2.4 The Staggered GridThe culprit in the previous formulation is the uncoupling between the pressure andvelocity fields.
Coupling can be enforced if the different variables are stored at56815 Fluid Flow Computation: Incompressible Flowsstaggered locations such that no interpolation is needed to calculate the pressuregradient in the momentum equation and the velocity field in the continuity equation.Such a staggered grid is shown in Fig. 15.3a, b. In the staggered grid the velocityfield is stored at cell faces (Fig.
15.3a), while pressure and all other variables arestored at cell centroids (Fig. 15.3b).With this formulation, the discretized continuity equation for element C becomesXm_ f ¼ m_ e þ m_ w ¼ 0orue uw ¼ 0ð15:23Þf nbðCÞwith no need for interpolation as the velocity values are available at the e andw locations. Moreover, the momentum equation is integrated over elements similarto element e resulting in the following discretized momentum equation:aue ue þXauf uf ¼ bue Ve ðrpÞe ¼ bue Vef NBðeÞpE pCdxeð15:24ÞThe pressure gradient is related to values at the consecutive grid points straddling the element face with no interpolation needed.
Therefore checkerboardpressure and velocity field solutions are inadmissible as they will be easily detectedand eliminated by the numerical method.xC(a)uwWWwWueCxweEEEEEEyCxexC(b)uwWWWwueCxweyCxeFig. 15.3 An element for a the momentum equation and b the continuity equation in a onedimensional staggered grid arrangement15.2A Preliminary Derivation56915.2.5 The Pressure Correction EquationThe derivations presented next are based on the work of Patankar and Spalding [2, 3],who developed the initial implementation of the SIMPLE (Semi Implicit Method forPressure Linked Equations) algorithm.Starting with the continuity and momentum equations given respectively by(Fig.
15.3)Xð15:25Þm_ f ¼ 0f nbðCÞaue ueþXauf uf¼buef NBðeÞ @p Ve@x eð15:26Þthe solution proceeds by providing an initial guess for the velocity and pressurefields. Denoting the initial guess or the solution at the starts of any iteration with asuperscript (n), then the tentative velocity and pressure fields are given by u(n) andp(n). At any iteration, solving the momentum equation first for the velocity field, thesolution obtained is denoted by a superscript * as it is not the final solution at thecurrent iteration. Thus, the momentum equation satisfiesaue ue þXauf uf ¼ bue Vef NBðeÞ ðnÞ @p@x eð15:27Þwhere the pressure field is still based on values from the previous iteration.
Thecomputed velocity field u* satisfies the momentum equation but not necessarily thecontinuity equation, since the pressure field is not exact. Therefore a correction issought to ensure that the velocity (or the mass flow rate) and pressure fields satisfythe continuity equation.Denoting the correction fields with a superscript prime, i.e., ðu0 ; p0 Þ, then thesought after velocity and pressure are given byu ¼ u þ u0p ¼ p þ p0ð15:28ÞNote that the mass flow rate at cell faces will also be corrected according tom_ f ¼ m_ f þ qu0 Sxf¼ m_ f þ m0fð15:29Þ57015 Fluid Flow Computation: Incompressible Flowssuch that the exact mass flow rate satisfies the continuity equation, i.e.,m_ e þ m_ w ¼ m_ e þ m_ 0e þ m_ w þ m_ 0w ¼ 0ð15:30Þwhich can be rewritten asm_ 0e þ m_ 0w ¼ m_ e m_ wð15:31ÞThis is an interesting form of the continuity equation showing that once thecomputed mass flow rate reaches the exact solution and satisfies the continuityequation, then the RHS becomes zero leading to a zero correction field.
Thus it isthe mass conservation error of the current fields that drives the correction field. Themass flow rates and mass flow rate corrections at an element faces are given bym_ e ¼ qve Se ¼ que Sxe ¼ que Dyem_ w ¼ qvw Sw ¼ quw Sxw ¼ quw Dywð15:32Þm_ 0e ¼ qv0e Se ¼ qu0e Sxe ¼ qu0e Dyem_ 0w ¼ qv0w Sw ¼ qu0w Sxw ¼ qu0w Dywð15:33Þandwhere in Eqs. (15.32) and (15.33) the fact that Sxe ¼ Dye and Sxw ¼ Dyw has beenused.The pressure field does not appear in Eq.
(15.31) and to bring it into theequation, the discrete form of the momentum equation is used. The process starts byrewriting Eq. (15.26) in a more compact form asue þ He ðuÞ ¼ Bue Due@p@xð15:34ÞewhereHe ðuÞ ¼X aufufauf NBðeÞ eBue ¼bueaueandDue ¼Veaueð15:35ÞFor the case of the computed velocity field, the above equation is written asueþ He ðu Þ ¼BueDue ðnÞ @p@x eð15:36ÞSubtracting the computed momentum equation, Eq. (15.36), from the exact one,Eq. (15.34), an equation for the correction field is obtained as15.2A Preliminary Derivation571u0e0þ He ðu Þ ¼Due 0@p@x eð15:37ÞA similar approach is used for the w face yieldingu0w0þ Hw ðu Þ ¼Duw 0@p@x wð15:38ÞSubstituting Eq. (15.33) into the continuity equation, Eq.
(15.31), its expandedform becomesqe u0e Dye þ qw u0w Dyw ¼ ðm_ e þ m_ w Þ:ð15:39ÞThen replacing the discrete forms of u0e and u0w computed from Eqs. (15.37) and(15.38), respectively, in Eq. (15.39), an equation involving pressure correction isobtained and is given by 0 @pqe He ðu0 Þ DueDye@x e 0 @p qw Hw ðu0 Þ DuwDyw ¼ m_ e þ m_ w@x wð15:40ÞIn this equation the pressure field appears in a diffusion like form, which afterdiscretization becomes 0p p0Cqe He ðu0 Þ Due EDyeDxe 0 p p0Wþ qw Hw ðu0 Þ Duw CðDyw Þ ¼ m_ e þ m_ wDxwð15:41ÞDyw 0Dyw 00upE pC qw Dw pC p0WDxwDxw¼ m_ e þ m_ w þ ðqe He ðu0 ÞDye þ qw Hw ðu0 ÞðDyw ÞÞð15:42Þorqe DueRearranging, the pressure correction equation is formulated as000aCp p0C þ aEp p0E þ aWp p0W ¼ bCp0ð15:43Þ57215 Fluid Flow Computation: Incompressible Flowswhereqe Due Dyedxeu0qDDywapW ¼ w wdx 0 w 0p0paC ¼ aE þ aWp0bpC ¼ m_ e þ m_ w þ ½qe Dye He ðu0 Þ qw Dyw Hw ðu0 Þ0apE ¼ ð15:44ÞThe underlined terms in Eqs.
(15.37), (15.38), and (15.44) involve correctionswhich become zero at the state of convergence. Therefore they have no effect on thefinal solution. Different approximations to these terms result in different algorithmsas will be explained later. In the original SIMPLE algorithm these terms are simplyneglected. Moreover for one dimensional constant area situations Δy may be set to 1and dropped from the equations.15.2.6 The SIMPLE Algorithm on Staggered GridUsing the momentum and pressure correction equations, a solution to the flowproblem can be obtained. In the SIMPLE algorithm this solution is found iterativelyby generating pressure and velocity fields that consecutively satisfy the momentumand continuity equations, while approaching the final solution (which satisfies bothequations) at every iteration [4–6]. This sequential, rather than simultaneous,solution of the equations is denoted in the literature by the segregated approach.The sequence of events in the segregated SIMPLE algorithm can be summarized asfollows:1.