Moukalled F., Mangani L., Darwish M. The finite volume method in computational fluid dynamics. An advanced introduction with OpenFOAM and Matlab (811443), страница 74
Текст из файла (страница 74)
Darwish M, Moukalled F (1994) Normalized variable and space formulation methodology forhigh-resolution schemes. Numer Heat Transf, Part B 26(1):79–9634. OpenFOAM Doxygen, 2015 Version 2.3.x. http://www.openfoam.org/docs/cpp/Chapter 13Temporal Discretization: The TransientTermAbstract The discussions in previous chapters assumed steady state conditions,which did not require the discretization of the transient term.
Accounting fortransient phenomena adds a new dimension to the problem. However since transientvariations are parabolic by nature, there is no need to define a field in the timedimension, as is the case for the spatial domain. In general only one or two additional variable fields, or time levels, are stored (depending on the numerical order ofthe selected scheme). Another difference with steady state configurations is thattransient systems are modeled using a time stepping procedure.
Starting with aninitial condition at time t ¼ t0 , the solution algorithm marches forward and finds asolution at time t1 ¼ t0 þ Dt1 . The solution found is the initial condition for the nexttime step and is used to obtain the solution at time t2 ¼ t1 þ Dt2 . The process isrepeated until the required time is reached. The focus of this chapter is on techniques used for the discretization of the transient term. Two approaches fordeveloping transient schemes are presented. In the first one Taylor expansions areused to express the transient term with the aid of nodal values. This is in effect afinite difference discretization.
In the second approach the finite volume method isused on a pseudo time element in a similar fashion to what was done to theconvection term. Several transient schemes are presented and their characteristicsdiscussed.13.1IntroductionFor transient simulations, the governing equations are discretized in both space andtime. While the spatial discretization is performed in the spatial domain as was donefor the steady-state case, the temporal discretization involves setting up a timecoordinate along which the derivative (for the finite difference method) or theintegral (for the finite volume method) of the transient term is evaluated (Fig.
13.1).In general, the expression for the transient behavior, or time evolution, of avariable ϕ is governed by an equation of the form© Springer International Publishing Switzerland 2016F. Moukalled et al., The Finite Volume Method in Computational Fluid Dynamics,Fluid Mechanics and Its Applications 113, DOI 10.1007/978-3-319-16874-6_1348949013 Temporal Discretization: The Transient Termtransient operatorspatial operatorFig. 13.1 Time coordinate, transient, and spatial operators@ ðq/Þþ Lð/Þ ¼ 0@tð13:1Þwhere the function Lð/Þ is a spatial operator that includes all non-transient terms(convection, advection, sources, etc.) and @ ðq/Þ=@t is the transient operator, bothdisplayed in Fig. 13.1.Integrating Eq.
(13.1) over an element C (Fig. 13.2) yieldsZVC@ ðq/ÞdV þ@tZLð/ÞdV ¼ 0ð13:2ÞVCwhich, after a spatial discretization about the volume centroid, becomes @ ðqC /C ÞVC þ L /tC ¼ 0@tð13:3Þ where VC is the volume of the discretization element and L /tC is the spatialdiscretization operator expressed at some reference time t, which can be written inalgebraic form as13.1Introduction491F1F2Convectionf2Diffusionf1TransientCf6f3F3F6Source/Sinkf4f5F4F5Fig. 13.2 Spatial elementX L /tC ¼ aC /tC þaF /tF bCð13:4ÞFNBðCÞIn Eq. (13.3) the steady state discrete equation is recovered when t ! 1. This isalso true when steady state is reached through time marching, i.e., when¼ /tC . This guarantees that the solution obtained when steady state is reached/tþDtCis the same as the one that would have been obtained with the problem solveddirectly as a steady state one.For the discretization of the transient term, the practice traditionally has been tofollow a finite difference approach [1–3], whereby a Taylor series expansion of@ ðq/Þ=@t is used to express the derivative in terms of the discrete nodal values.
Inthis chapter, another procedure that is more in line with the finite volume approachwill also be presented. In this context, @ ðq/Þ=@t is integrated over a temporalelement [4] and transformed into face fluxes in a similar fashion to what was donewith convection schemes, except that the discretization is now performed along thetransient axes.49213.213 Temporal Discretization: The Transient TermThe Finite Difference ApproachSince in the transient space the grid is structured (Fig. 13.3), it has been quitecommon to treat the transient term using the finite difference method.
In thisapproach, the spatial operator, Lð/Þ, is discretized at time t, while the transientderivative is evaluated using a combination of Taylor expansions about timet resulting in a variety of transient schemes, some of which are described next.t+ tttt- tt-2 tFig. 13.3 Structured transient finite difference grid13.2.1Forward Euler SchemeTo evaluate the transient term, a Taylor expansion of the derived quantity about a timedirection is needed.
In this first case, the expansion is performed in a forward mannerabout time t. That is for some function T, its value at time t þ Dt is expressed using aTaylor series in terms of the values of T and its derivates at time t asT ðt þ DtÞ ¼ T ðtÞ þ@T ðtÞ@ 2 T ðtÞ Dt2þ :Dt þ@t@t2 2!ð13:5ÞTruncating the series starting with terms of order Dt2 , the first derivative can beformulated as13.2The Finite Difference Approach493@T ðtÞ T ðt þ DtÞ T ðtÞ¼þ OðDtÞ@tDtð13:6ÞThis is now a first order discretization since the equation was divided by Dt to yieldthe gradient approximation. Replacing T by ðq/Þ in Eq. (13.6) and substituting theresulting expression for the derivative in Eq.
(13.3), the discretized equationbecomes ðqC /C ÞtþDt ðqC /C ÞtVC þ L /tC ¼ 0:Dtð13:7ÞThe transient stencil for Eq. (13.7) shown in Fig. 13.4, indicates that the computation of ðqC /C Þ at time t þ Dt does not require solving a system of equations.Rather, values of /C at time t þ Dt can be computed explicitly based on valuesfrom the previous time step since all spatial terms are evaluated at the old timet. The resulting scheme belongs to the class denoted by explicit transient schemes[5–12]. The main characteristic of all explicit transient schemes is their capability ofgenerating solutions by marching in time without the need to solve a system ofequations at each time level.
This provides a high computational efficiency andsimplifies the parallelization of the computational mesh. Yet only few commercialcodes have adopted this approach and for an important reason related to a limitationon the size of Dt, which will be discussed in the next section.Substituting the discretized algebraic relation of the spatial operator intoEq. (13.7), the complete algebraic equation is obtained as0tþDtþ atC /tC ¼ bC @aC /tC þatþDtC /CXFNBðC ÞFig. 13.4 The explicit EulerstencilCC1aF /tF Að13:8Þ49413 Temporal Discretization: The Transient TermwhereqtþDtC VCDtqtC VCtaC ¼ DtaCtþDt ¼ð13:9ÞIn the above equations atþDtand atC are the diagonal coefficients resulting from theCand /tC are the values at time levels t þ Dtdiscretization of the transient term, /tþDtCand t, respectively, and aC , aF , and bC are the coefficients obtained from the spatialdiscretization.To simplify notation, throughout this chapter variables referring to values obtainedat a previous time step will be denoted with a superscript ° and variables referring tovalues obtained two time steps earlier will be denoted with a superscript °°.
On theother hand no superscript will be used to denote variables at the current time stepexcept for the coefficient of the unsteady term multiplying /C , which will be denotedwith the superscript . Adopting the new notation, Eqs. (13.8) and (13.9) become01Xð13:10ÞaF /F AaC /C þ aC /C ¼ bC @aC /C þFNBðC ÞwhereqC VCDtq VCaC ¼ CDtaC ¼ð13:11ÞEquation (13.10) can be re-arranged intobC /C ¼aC þaC/CþPFNBðCÞ!aF /FaCð13:12Þclearly showing that values of ϕ at the current time step are computed via anexplicit relation without solving a system of equations.13.2.2Stability of the Forward Euler SchemeThe convergence and stability of numerical schemes was initially addressed by Courant,Friedrichs, and Lewy [13].