Moukalled F., Mangani L., Darwish M. The finite volume method in computational fluid dynamics. An advanced introduction with OpenFOAM and Matlab (811443), страница 81
Текст из файла (страница 81)
(14.1), the algebraic equation becomes½aC FluxCC /C þXaF /F ¼ FluxVCð14:5ÞFNBðC ÞIn this formulation the implicit part of the source, FluxCC [defined in Eq. (14.3)],is required to be negative to guarantee diagonal dominance or else the Scarboroughcriterion may not be fulfilled causing divergence. In addition, for the case when thevariable / is positive-definite, the explicit part, FluxVC [Eq.
(14.3)], must bepositive to ensure positive / predictions.Example 1In problems involving heat transfer by radiation, the source term in theenergy equation takes the form 4QT ¼ A T1 T4where A is a constant, T is the temperature at any grid point, and T1represents the non-varying ambient temperature. Integrate this source termover an element of centroid C and volume VC , then linearize it using differentalternatives and explain their consequences on convergence.53814Discretization of the Source Term, Relaxation, and Other DetailsSolutionZQT dV ¼ QTC VC ¼ FluxVC þ FluxCC TCVCSeveral arbitrary choices can be selected to linearize QT .Option 1FluxCC ¼ 0 4FluxVC ¼ A T1 TC4 VCAdopting this alternative may cause the solution to diverge as it results innegative values for FluxVC , whenever TC [ T1 , leading to possibleunphysical negative absolute temperature values during the iterative process.Option 2Linearizing with respect to the value of temperature of the previous iterationTC , the expanded form of the source term is obtained as T dQC TC TCQTC ¼ QTC þdTC 4¼ A T1 TC4 4ATC3 TC TCComparing with Eq.
(14.9), FluxCC and FluxVC are found to beFluxCC ¼ 4ATC3 VC 4FluxVC ¼ A T1þ 3TC4 VCThis is the ideal approach resulting in a positive FluxVC and a negativeFluxCC and giving the best rate of convergence as the introduced implicitnessin the solution is the optimum one.14.2Under-Relaxation of the Algebraic EquationsAs described in previous chapters, the end product of the discretization process is aset of algebraic equations of the form given by Eq. (14.1), in which aF refers to aneighboring coefficient (Fig.
14.2) representing the effect of the neighboring variable /F on the cell variable /C , bC is the right hand side of the equation that usuallyincludes the source terms and the effects of other variables, while aC is the main14.2Under-Relaxation of the Algebraic Equations539Fig. 14.2 Matrixrepresentation of Eq. (14.1)aF1aCaF2aF3C=bCcoefficient of the algebraic equation and contains the effects of various influences,including the spatial discretization effects, the transient effects, etc. The set ofequations represented by Eq.
(14.1) is usually diagonally dominant.In the iterative solution of the system of algebraic equations it is often desirableto slow down the changes in the values of the dependent variable from iteration toiteration. This is needed to improve the convergence of non-linear problems butalso to avoid divergence when starting with a guessed initial field that could be farfrom the solution. The non-linearities can arise because of the non-orthogonality ofthe grid system, the presence of source terms, the non-linear nature of the modeledequations, etc. One method commonly used to promote convergence by “slowingdown” (“relaxing”) the (sometimes excessive) changes made to the values of thevariable during solution is the relaxation method.
The standard relaxation methodused in many CFD codes is the implicit under relaxation method of Patankar [1],which was briefly presented in Chap. 8. Other under-relaxation methods have beenpresented in the literature such as the E-Factor [2] relaxation method and the Falsetransient method [3]. Van Doormaal and Raithby [2] have shown that these differentrelaxation methods are somewhat related and that the under-relaxation in any of themethods can be related to the under-relaxation in the other methods, as they allbasically retard the effect of neighboring elements and sources on the under-relaxedelement value. In other words, under-relaxation affects equally the source term inthe concerned element and its spatial coefficients. Some of these relaxation methodsare presented next.14.2.1 Under-Relaxation MethodsSolution relaxation may be performed either explicitly after the solution at anyiteration is obtained or implicitly by incorporating its effect into the equation beforethe solution is obtained.
Both methods are outlined below.54014Discretization of the Source Term, Relaxation, and Other Details14.2.2 Explicit Under-RelaxationIn the explicit under-relaxation method, at the end of every iteration after a newsolution is obtained,all cells in the computational domain are visited and thepredictedpredicted value /new;Cin any cell C is modified according tonew; predicted/oldþk///Cnew; used ¼ /oldCCCð14:6Þwhere k/ is the relaxation factor, which for both explicit and implicit relaxation canbe interpreted according to its assigned value as follows:1. A value of k/ \1 results in under-relaxation.
This may slow down the speed ofconvergence but increases the stability of the calculation, i.e., it decreases thepossibility of divergence or oscillations in the solution.2. A value of k/ ¼ 1 corresponds to no relaxation. If applied, then the predictedvalues during an iteration are the ones used at the next iteration.3. A value of k/ [ 1 leads to over-relaxation. It can sometimes be used toaccelerate convergence but usually decreases the stability of the calculations.Explicit under-relaxation is used to under-relax pressure in the SIMPLE algorithm, which will be introduced in the next chapter. Further, in problems where thefluid properties depend on the solution and are iteratively updated, explicitunder-relaxation may be necessary to promote convergence.
Examples include, butare not limited to, the turbulent viscosity in turbulent flows, the density in compressible flows, and computed interface values using HR schemes. In addition, itmay be used to under-relax individual terms in the conservation equation such asthe source term, and in some cases gradients of solution variables.14.2.3 Implicit Under-Relaxation MethodsSeveral approaches in this category have been developed. The standard method thatwas presented in Chap. 8 is Patankar’s approach [1], a summary of which is givenhere for completeness. Other methods include the E-factor approach and the falsetransient technique, which are also discussed.14.2.3.1Patankar’s Under-RelaxationAs mentioned above, the iterative solution of a system of equations can beunder-relaxed by introducing a relaxation factor k/ and expressed via Eq. (14.6).
Tosimplify the notation used with implicit under-relaxation, Eq. (14.6) is modified to14.2Under-Relaxation of the Algebraic Equations541iteration/C ¼ /C þ k/ /new /CCð14:7Þwhere /C is the value of /C from the previous iteration. In Patankar’s relaxationiterationapproach, /newin Eq. (14.7) is replaced by its equivalent expression fromCEq. (14.1) to yieldP0011aF /F þ bCBB FNBðCÞCC/C ¼ /C þ k/ @@ð14:8ÞA /C AaCre-arranging, the equation becomesaCk/X/C þaF / F ¼ b C þFNBðC Þ1 k/k/aC /Cð14:9ÞIn Eq.
(14.9) the relaxation factor k/ modifies the diagonal coefficient and theright hand side without modifying the equation mathematically. Since k/ \1, underrelaxation increases the diagonal dominance of the algebraic system and enhancesthe stability of the iterative linear solver. This is an important advantage whencompared to the explicit approach.However it is worth noting that the implicit relaxation applies a relation that isproportional to the diagonal coefficient. Thus the relaxation will be larger for alarger diagonal coefficient, which translates into a larger relaxation of higherimportance for smaller control volumes.
This is demonstrated in the next section.14.2.3.2E-Factor RelaxationThe E-Factor method [2] is a reformulation of Patankar’s method. It is derived byrewriting Eq. (14.1) in the following form:XaC /C ¼ bC aF /Fð14:10ÞFNBðCÞunder-relaxing, the right hand side of Eq. (14.10) is transformed to0aC /C ¼ k/ @bC XFNBðCÞ1aF /F A þ 1 k/ aC /Cð14:11Þ54214Discretization of the Source Term, Relaxation, and Other DetailsReplacing the under-relaxation factor withE/; Eq. (14.11) becomes1 þ E/01XE/ @E/AaC /C ¼þ1ba/aC /CCFF/1 þ E/1þEFNBðC Þð14:12Þwhich can be reformulated asX11aC 1 þ / / C þaF /F ¼ bC þ / aC /CEEFNBðC Þð14:13ÞWith this formulation the under-relaxation effect can be readily interpreted interm of some artificial transient time scale that advances /C at each solver iteration.The time step Dt can be shown to be proportional to the characteristic time intervalDt according toDt ¼ E / Dtð14:14ÞqC VCaCð14:15ÞwhereDt ¼In Eq.
(14.15) qC is the density of the fluid in cell C of volume VC . Thecharacteristic time interval is related to the time required to diffuse and convect achange of /C across the element. Thus the E-factor is equivalent to an element CFLnumber.It is clear from Eq. (14.15) that the time step advancement of the E-Factorrelaxation is dependent on the cell volume, with the solution in a smaller elementadvancing more slowly than in a coarser element. This can be detrimental to theconvergence rate for a steady state solution since it is very common to use highlystretched elements with small volumes near boundaries, thus forcing a criticalregion in the computational domain to advance at a very small time step comparedto the remainder of the domain.
This is also a characteristic of the Patankarrelaxation method.The relation between E / and k/ can be shown to beE/ ¼11 k/:ð14:16ÞIn general values of E / are chosen in the range of 4–10, corresponding to valuesbetween 0.75 and 0.9 for k/ .14.2Under-Relaxation of the Algebraic Equations543Example 2In the figure below an illustrative boundary mesh is shown. Elements A and Drepresent stretched elements near a wall boundary, with the volume ratio ofabout VCA =VCD 0:1.
The value of the diagonal coefficients for such meshesare usually dominated by the diffusion coefficient and in this case would bearound aCA =aCD 2 since element A has a boundary face.Compute the relative pseudo transient time for elements A and D if anunder-relaxation factor of 0.8 is applied (Fig.