4.8 Examples In order to demonstrate the FV method and to display some of the properties of the discretization methods,

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

4.8 Examples In order to demonstrate the FV method and to display some of the properties of the discretization methods,

Post by answerhappygod »

4 8 Examples In Order To Demonstrate The Fv Method And To Display Some Of The Properties Of The Discretization Methods 1
4 8 Examples In Order To Demonstrate The Fv Method And To Display Some Of The Properties Of The Discretization Methods 1 (191.08 KiB) Viewed 33 times
4.8 Examples In order to demonstrate the FV method and to display some of the properties of the discretization methods, we shall present two examples. First consider the problem, illustrated in Fig. 4.4, of transport of a scalar quantity in a known velocity field. The latter is given by Uz = 1 and 2y = -y, which represents the flow near a stagnation point. The streamlines are lines of xy =const. and change direction with respect to the Cartesian grid. On the other hand, on any cell face the normal velocity component is constant so the error in the approximation of the convective flux depends only on the approximation used for de. This aids in the analysis of the accuracy. The scalar transport equation to be solved reads: Typov nds = [1 grado -nds, ρφυ (4.25) and the following boundary conditions are to be applied: - 0 = 0 along the north (inlet) boundary; - Linear variation of ø from = 0 at y = 1 to $ = 1 at y = 0 along the west boundary; - Symmetry condition (zero gradient normal to boundary) on the south boundary; - Zero gradient in the flow direction at outlet (east) boundary. The geometry and the flow field are sketched in Fig. 4.4. We shall give the details of discretization for the 'e' face. The convective flux will be evaluated using the midpoint rule and either UDS or CDS interpolation. Since the normal velocity is constant along cell faces, we express the convective flux as a product of the mass flux and the mean value of $: F = 1, popo-nds z obce (4.26) s where me is the mass flux through the 'e' face: no = Ss.p.nds = (puz). Ay. (4.27) Expression (4.27) is exact on any grid, since the velocity uz,e is constant along the face. The flux approximation is then:
Cozům: The convective flux will be evaluated using the midpoint rule and either UDS or CDS interpolation. Since the normal velocity is constant along cell faces, we express the convective Aux as a product of the mass flux and the mean value of 0: F: = Ss pov: n ds z mede, (4.29) where ne is the mass flux through the 'e' face: the = Suara pun ds = (puz). Ay. (4.30) Expression (4.30) is exact on any grid, since the velocity uze is constant along the face. The flux approximation is then: me(1 - de) dp + mele de for CDS (4.31) The linear interpolation coefficient te is defined by Eq. (4.14). Analogous expressions for the fluxes through the other CV faces produce the following coefficients in the algebraic equation for the case of UDS: Ag = min(me, 0); Aw = min(mw, 0.), Ag = min(tn, 0); Ag = min(ms, 0.) (4.32) A$ = -(Ag + A + A + Ag). For the CDS case, the coefficients are: Ag = mele Aw = my w Ag = mini Ag = msg (4.33) A = -(Ag + 4 + 4 + 48). The expression for As follows from the continuity condition: me +mw + m + thg = 0 which is satisfied by the velocity field. Note that mw and tw for the CV cen- tered around node P are equal to me and 1- le for the CV centered around node W, respectively. In a computer code the mass fluxes and interpolation factors are therefore calculated once and stored as me, in and de, de for each CV. The diffusive flux integral is evaluated using the midpoint rule and CDS approximation of the normal derivative; this is the simplest and most widely used approximation: pa bi (pose, ΓΔy I grado.nds Ay = (OE - op). (4.34) ar TE-IP Note that Ig = }(2i+1+2) and Ip = }(*: +3i-1), see Fig. 4.2. The diffusion coefficient r is assumed constant; if not, it could be interpolated linearly between the nodal values at P and E. The contribution of the diffusion term to the coefficients of the algebraic equation are: ΓΔy ΓΔy : AM = - TE-AP IP-IW r Az Γ Δε AM A = YN -YP YP-ys 1% = -(4+.44 +44 +49) (4.35
= With same approximations applied to other CV faces, the integral equa- tion becomes: Awow + Asos + Apop + ANÓN + AE E = QP, (4.36) which represents the equation for a generic node P. The coefficients A are obtained by summing the convective and diffusive contributions, see Eqs. 14.32), (4.33) and (4.35): A1 = A + A (4.37) tvhere l represents any of the indices P, E, W, N, S. That Ap is equal to the negative sum of all neighbor coefficients is a feature of all conservative schemes and ensures that a uniform field is a solution of the discretized Equations. The above expressions are valid at all internal CV's. For CVs next to boundary, the boundary conditions require that the equations be modified somewhat. At the north and west boundaries, where o is prescribed, the gradient in the normal direction is approximated using one-sided differences, eg. at the west boundary: ao ( ) ΦΡ - Φw IP w ar (4.38) w where W denotes the boundary node whose location coincides with the cell- face center 'w'. This approximation is of first-order accuracy, but it is applied on a half-width CV. The product of the coefficient and the boundary value is added to the source term. For example, along the west boundary (CVs with index i = 2), Awow is added to Qp and the coefficient Aw is set to zero. The same applies to the coefficient An at the north boundary. At the south boundary, the normal gradient of is zero which, when the above approximation is applied, means that the boundary values are equal to the values at CV centers. Thus, for cells with index j = 2, os = op and the algebraic equation for those CVs is modified to: (Ap + As) p + ANØN + Awow + AEME = Qp, (4.39) which requires adding As to Ap and then setting As = 0. The zero-gradient condition at the outlet (east) boundary is implemented in a similar way. We now turn to the results. The isolines of o calculated on a 40 x 40 CV uniform grid using CDS for the convective fluxes with two values of T: 0.001 and 0.01 (p = 1.0) are presented in Fig. 4.5. We see that transport by diffusion across the flow is much stronger for higher I, as expected. In order to assess the accuracy of the prediction, we monitor the total flux of o through the west boundary, at which is prescribed. This quantity is obtained by summing diffusive fluxes over all CV faces along this boundary, which are approximated by Eqs. (4.34) and (4.38). Figure 4.6 shows the vari- ation of the flux as the grid is refined for the UDS and CDS discretizations of
Fig. 4.5. Isolines of , from 0.05 to 0.95 with step 0.1 (top to bottom), for r = 0.01 (left) and r = 0.001 (right) the convective fluxes; the diffusive fluxes are always discretized using CDS The grid was refined from 10 x 10 CV to 320 x 320 CV. On the coarsest grid, the CDS does not produce a meaningful solution for r = 0.001; con- vection dominates and, on such a coarse grid, the rapid change in over short distance near the west boundary (see Fig. 4.5) results in oscillations so strong that most iterative solvers fail to converge (the local cell Peclet num- bers, Pe = puz4x/r, range between 10 and 100 on this grid). (A converged solution could probably be obtained with the aid of deferred correction but it would be very inaccurate.) As the grid is refined, the CDS result convergea monotonically towards a grid-independent solution. On the 40 x 40 CV grid the local Peclet numbers range from 2.5 to 25, but there are no oscillations in the solution, as can be seen in Fig. 4.5. The UDS solution does not oscillate on any grid, as expected. The conver- gence is, however, not monotonic: the flux on the two coarsest grids lies below the converged value; it is too high on the next grid and then approaches the correct result monotonically. By assuming second-order convergence of the CDS scheme, we estimated the grid-independent solution via Richardson ex- trapolation (see Sect. 3.9 for details) and were able to determine the error in each solution. The errors are plotted vs. normalized grid size (At = 1 for the coarsest grid) in Fig. 4.6 for both UDS and CDS. The expected slopes for first- and second-order schemes are also shown. The CDS error curve has the slope expected of a second-order scheme. The UDS error shows irregular be- havior on the first three grids. From the fourth grid onwards the error curve approaches the expected slope. The solution on the grid with 320 x 320 CV is still in error by over 1%; CDS produces a more accurate on the 80 x 80 grid!
1.4 100 CDS, Uniform UDS, Uniform Ideal Slope 1.3 10 Error (%) 1.2 CDS, Uniform UDS, Uniform Exact 1.0 .01 100 100000 .01 .02 .05 1000 10000 No. of CV AX Fig. 4.6. Convergence of total flux of ¢ through the west wall (left) and the error in computed flux as a function of grid spacing, for r = 0.001
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply