Top Banner
ISSN 0249-6399 apport de recherche 1994 INSTITUT NATIONAL DE RECHERCHE EN INFORMATIQUE ET EN AUTOMATIQUE A Second Order Defect Correction Scheme for Unsteady Problems Re ´gis Martin, Herve ´ Guillard N˚ 2447 Novembre 1994 PROGRAMME 6 Calcul scientifique, mode ´lisation et logiciel nume ´rique
44

A second order defect correction scheme for unsteady problems

Feb 28, 2023

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: A second order defect correction scheme for unsteady problems

ISS

N 0

249-

6399

ap por t de r ech er ch e

1994

INSTITUT NATIONAL DE RECHERCHE EN INFORMATIQUE ET EN AUTOMATIQUE

A Second Order Defect Correction Scheme forUnsteady Problems

Regis Martin, Herve Guillard

N˚ 2447Novembre 1994

PROGRAMME 6

Calcul scientifique,

modelisation

et logiciel numerique

Page 2: A second order defect correction scheme for unsteady problems
Page 3: A second order defect correction scheme for unsteady problems

A Second Order Defect Correction Schemefor Unsteady ProblemsR�egis Martin, Herv�e GuillardProgramme 6 | Calcul scienti�que, mod�elisation et logiciel num�eriqueProjet SINUSRapport de recherche n�2447 | Novembre 1994 | 41 pagesAbstract: Using the defect correction method (DeC), we propose an implicitscheme that is second order accurate both in time and space,but that usesonly �rst order jacobian. In a �rst time, we theoretically analyse the trun-cation error of the scheme and perform a linear stability analysis of it. Thensome numerical experiments over simple test-cases are presented. Finally, thecapability and accuracy of this new scheme is outlined by the analisys of acomplex unsteady ow in a 2-D model of a piston engine.Key-words: Computational Fluid dynamics, Implicit schemes, Defect Cor-rection method (R�esum�e : tsvp)Unite de recherche INRIA Sophia-Antipolis

2004 route des Lucioles, BP 93, 06902 SOPHIA-ANTIPOLIS Cedex (France)

Telephone : (33) 93 65 77 77 – Telecopie : (33) 93 65 77 65

Page 4: A second order defect correction scheme for unsteady problems

Un sch�ema d'ordre 2 avec la m�ethode dud�efaut corrig�e pour des probl�emesinstationnairesR�esum�e : En utilisant la m�ethode du d�efaut corrig�e (DeC), nous proposonsun sch�ema implicite pr�ecis �a l'ordre 2 en temps et en espace, mais n'utilisantque des jacobiens d'ordre 1. Dans un premier temps, nous analysons l'erreur detroncature du sch�ema puis d�emontrons sa stabilit�e lin�eaire inconditionnelle. Onpr�esente plusieurs exp�eriences num�eriques sur des cas-tests simples. Un derniercalcul repr�esentant un �ecoulement complexe instationnaire dans un mod�ele bi-dimensionnel de moteur �a piston illustre les possibilit�es et la pr�ecision dusch�ema.Mots-cl�e : M�ecanique des uides num�erique, Sch�emas implicites, M�ethodedu D�efaut corrig�e

Page 5: A second order defect correction scheme for unsteady problems

A Second Order Defect Correction Scheme for Unsteady Problems 3Contents1 Introduction 52 A Second Order DeC scheme for unsteady problems 73 Stability Analysis 134 Numerical Tests 174.1 Finite Volume Method on unstructured meshes : : : : : : : : : 174.2 Density wave convection : : : : : : : : : : : : : : : : : : : : : : 204.3 Isentropic Compression : : : : : : : : : : : : : : : : : : : : : : : 214.4 Sod Shock Tube : : : : : : : : : : : : : : : : : : : : : : : : : : : 255 Flow in a bi-dimensional model of a piston engine. 275.1 Mesh movement. : : : : : : : : : : : : : : : : : : : : : : : : : : 305.2 Results : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 316 Conclusion 39

RR n�2447

Page 6: A second order defect correction scheme for unsteady problems

4 R. Martin, H. GuillardList of Figures1 Slope of the error curve Cfl = 10 : : : : : : : : : : : : : : : : : 122 Physical eigenvalues with U0 = Unh and Cfl = 50 : : : : : : : : 163 Spurious eigenvalues with U0 = Unh and Cfl = 50 : : : : : : : : 164 Control volume of Cii : : : : : : : : : : : : : : : : : : : : : : : : 185 Density wave convection CFL=10 : : : : : : : : : : : : : : : : : 216 Density wave convection CFL=50 : : : : : : : : : : : : : : : : : 227 Density wave convection CFL=100 : : : : : : : : : : : : : : : : 238 Isentropic compression: pressure : : : : : : : : : : : : : : : : : 259 Isentropic compression : density : : : : : : : : : : : : : : : : : : 2610 Sod Shock Tube : pressure : : : : : : : : : : : : : : : : : : : : : 2711 Sod Shock Tube : density : : : : : : : : : : : : : : : : : : : : : 2812 Sod Shock Tube : Velocity : : : : : : : : : : : : : : : : : : : : : 2913 Time evolution of the unstructured mesh : : : : : : : : : : : : 3314 Position versus Crank angle : (A) Piston motion in cm - (B)Intake Valve motion in mm : : : : : : : : : : : : : : : : : : : : 3415 Mass ow rate versus Crank angle : (a) First order scheme with�� = 5oCA - (b) N2I1 scheme with �� = 5oCA - (c) First orderscheme with �� = 10oCA - (d) N2I1 scheme with �� = 10oCA : 3516 Stream Lines at 230oCA with �� = 5oCA : : : : : : : : : : : : : 3617 Stream lines near the intake valve at 230oCA with �� = 5oCA : 3718 N2I1 scheme - Stream Lines at 230oCA with �� = 10oCA : : : : 38

INRIA

Page 7: A second order defect correction scheme for unsteady problems

A Second Order Defect Correction Scheme for Unsteady Problems 51 IntroductionNowadays the most commonly employed discrete methods to solve steady hy-perbolic problems use second-order discretization schemes. This is achievedeither by central di�erencing [2, 7] or instead by second order upwind schemes(e.g. [4, 16]). The second alternative combined with TVD or MUSCL non li-near dissipation has gained a large popularity among the CFD community.Most of the algorithms employed to implement these second order upwindschemes use a pseudo-time-marching procedure : Given a second order upwinddiscretization �2(Wh) of the steady partial di�erential equation :div(F (W )) = 0 (1)The approximate solution is sought as the limit when j ! +1 of thesolution of the following system where � is a pseudo-time step :W j+1h �W jh� + @Wh�2(W jh)(W j+1h �W jh) = ��2(W jh) (2)In the limit of the large time step � ! +1, it is clear that this last ap-proach reduces to Newton's method. However, the use of the system (2) is oftenunpractical. First, these approaches require the computation of the jacobianmatrix @Wh�2 which is rather di�cult to express in closed form if possible.Actually, even an approximate linearization of this function may be quite in-volved computationally. Second, the linear systems (2) needs to be solved. Thisis computationally di�cult and expensive.These reasons motivated the use of alternate strategies into which the ma-trices appearing in the left hand side of (2) are replaced by computing a crudeapproximation of @Wh�2. Of particular interest is the case where this approxi-mation is choosen as a �rst-order upwind approximation of the continuousproblem div(F (W )) = 0 leading to an iterative method of the form :W j+1h �W jh� + @Wh�1(W jh)(W j+1h �W jh) = ��2(W jh) (3)It is clear that (3) provides at convergence a second -order accurate ap-proximation of the solution of the steady system div(F (W )) = 0. The onlyRR n�2447

Page 8: A second order defect correction scheme for unsteady problems

6 R. Martin, H. Guillardmodi�cation with respect to (2) concerns the sequence of successive iteratesW jh . Computationally the loss of the quadratic convergence of Newton's me-thod is counterbalanced by the reduction of the bandwidth of the matrices andthe ease in solving the linear systems. Actually and at least for model problems,it can be shown that @Wh�1 is very often diagonally dominant. Therefore itsinversion can be performed by simple iterative methods as Gauss-Seidel or Ja-cobi relaxations. In the limit � ! +1, the convergence properties of scheme(3) have been studied in [3] where it was shown that for an appropriate choiceof the discretizations �1(Wh) and �2(Wh), scheme (3) exhibits a good conver-gence rate.We consider now the case where one is interested by the unsteady versionof (1) : @@tW + div(F (W )) = 0 (4)In this case (3) is no more a second-order approximation of the unsteadysystem. Although consistent, this scheme is only formally �rst-order accurateand one may question its capability to compute really unsteady phenomenawith large time steps. Actually, computational evidences have shown that thesolution of (3) is largely better than plain �rst-order schemes and that thisscheme can capture complicated unsteady phenomena that true �rst orderschemes failed to compute [9, 10]. However there may be some cases where atrue second-order accuracy is desirable and one may want to look for a moreaccurate approximation than (3) is.The purpose of this paper is to show theoretically and numerically, by usingthe Defect-Correction (DeC) theory, that (3) can still be the basis of a truesecond-order accurate approximation of (4). The resulting scheme that avoidsthe tedious and often unpractical computation of the jacobian matrix @Wh�2is computationally attractive with good stability properties. The summary ofthis paper is as follows : In Section 2, we make precise the de�nition of thesecond-order scheme we propose and study some of its properties. In particu-lar, we establish that the proposed method is second-order accurate in timeand space and perform a linear stability analysis of this scheme. Section 4 isINRIA

Page 9: A second order defect correction scheme for unsteady problems

A Second Order Defect Correction Scheme for Unsteady Problems 7devoted to numerical tests on some model problems and we end this paper bya description of a bi-dimensional problem where the approximation computedby (3) is compared with the improved one computed by the scheme we propose.2 A Second Order DeC scheme for unsteadyproblemsWe consider an evolution equation that we write in an abstract way :Find W 2 C0([0; T ];H) such that :@@tW + F (W ) = 0W (t = 0) = W0 (5)where H is an Hilbert space, W0 2 H and F is a partial di�erential operatorwhose domain D(H) is included in H. A semi-discrete scheme is obtained byde�ning a �nite-dimensional space Vh included in H and an operator �h fromVh to Vh, resulting in the ordinary di�erential system :Find Wh 2 C0([0; T ];Vh) such that :ddtWh + �h(Wh) = 0Wh(t = 0) = W0;h (6)As usual, h represents a spatial discretisation step such that dim Vh ! 1when h! 0. We also suppose that there exists a stable restriction Rh from Hinto Vh such that :limh!0 jjRhW �W jjH = 0 8W 2 H and jjRhjj = supjjW jj=1 jjRhW jjH � CThe operator �ph will be said to be accurate of order p if the truncationerror de�ned by Th(W ) = jjRhF (W ) � �h(RhW )jjH is such that :Th(W ) < C(W )hp 8W 2 D (7)RR n�2447

Page 10: A second order defect correction scheme for unsteady problems

8 R. Martin, H. Guillardwhere D is a dense subset of H (Usually, D is a set of su�ciently di�erentiablefunctions). A completely discrete scheme is obtained from (6) by approximatingthe time derivative. In a similar way, we will said that a time discretizationformula : ddtW � aW (t + �) � V �(W (t);W (t � �); : : : ;W (t � j�))� (8)where V �(:; : : : ; :) is a j-linear function, is p-order accurate if the truncationerror is a term of order p :jj ddtW � aW (t + �) � V �� jj < C(W )�p (9)In the sequel, we assume that there is a relationship between the time and spacesteps of the type � = rh with r � 1. The completely discrete approximationwe will start with, writes :aW n+1h � V �(W nh ; : : : ;W n�jh )� +�ph(W n+1h ) = 0 (10)We denote byGh(�), the operator from Vh into Vh that associate to V �(W nh ; : : : ;W n�jh ),W n+1h solution of the non linear algebraic equation (10). The local truncationerror associated to scheme (10) is de�ned to be :Th = RhW (t + �) �Gh(�)RhV �(W (t); : : : ;W (t � j�))� (11)and it is easy to see from (7), (9) that Th is a term of order p, provided theoperator (a+ ��ph)�1 is uniformely bounded.Nevertheless, solving (10) is a formidable task : The jacobian @W�ph (if it exists !)can be very di�cult to compute in analytical form and solving the linear sys-tems (a + �@W�ph)X = b be computationally so intensive that a direct ap-plication of Newton method would be prohibitively expensive. Thus instead,given an mth order (m � p) approximation of the operator F , such that @W�mhis easy to invert, we consider solving (10) by the modi�ed Newton method(Defect Correction scheme) :W0h = W0(W nh ; : : : ;W n�jh )Ws+1h = Wsh � � (a+ �@w�mh )�1 aWsh � V �(W nh ; : : : ;W n�jh )� + �phWsh!(12)INRIA

Page 11: A second order defect correction scheme for unsteady problems

A Second Order Defect Correction Scheme for Unsteady Problems 9each step of (12) de�nes an operator Gsh(�) that associate to V �, the vectorWsh. Denoting by T sh , the associated truncation error, it is easy to see from (12)that the truncation error T sh obeys the recursion formula :T s+1h = A(T sh � Th) + Th (13)where A = I � (a + �@W�mh )�1(a+ ��ph).Solving for T sh gives : T sh = As(T 0h � Th) + Th (14)where T 0h is the truncation error associated with the initialisation of the Newtoniteration (12) :T 0h = RhW (t + �)�RhW0(W (t); : : : ;W (t � j�))� (15)If �(A) < 1, (14) shows that the truncation error T sh ! Th which is no surprise.However, it also shows that there is no need to converge the DeC iterations (12)to reach p-order accuracy, it su�ces to perform a �nite number of iterationssp such that the �rst term of (14) is of order p, i.e sp = Ln(Th=T 0h )=Ln�. Thisprinciple sometimes called the �nite termination property of DeC schemesmake them particularly attractive. The same principle is also applied in theso-called Full Multi-grid techniques (FMG see [6]). We now proceed to evaluatesp. We �rst remark :Lemma 1 : 9K� independent of h and V such that for any V 2 D (i.esu�ciently di�erentiable) we have (at least) :jj(a + �@w�mh )�1(�ph � �mh )RhV jjH � K�hmjjDm+1V jjH (16)Proof : This follows from the triangle inequality, that �mh and �ph are orderm and p (m < p) approximations of the same operator and that (a+�@w�mh )�1form a family of bounded operator for h ! 0 (we assume of course that them-order implicit linearized scheme is stable). 2RR n�2447

Page 12: A second order defect correction scheme for unsteady problems

10 R. Martin, H. GuillardBounding now, jjT sh jj by jjAsT 0h jj+2jjThjj, noting that A = �(a+�@w�mh )�1(�mh ��ph) and using lemma 1, we obtain :jjAsT 0h jj � Ks�rs�1h(m+1)s�1jjD(m+1)s(W (t + �) �W0)jj (17)Then suppose that W0 is an approximation of order l of W (t + �) i.e :W (t + �) =W0 + �:� l@ltW(17) implies : jjAsT 0h jj � Ks��rs+l�1h(m+1)s+(l�1)jjD(m+1)s@ltW jj (18)and thus this establishes :Proposition 1 : The truncation error T sh is at least of order p as soon assp � (p� l + 1)=(m+ 1).Remark : The truncation error Th (11) of the fully implicit non-linearscheme is bounded by an expression of the form :jjThjj � Khp �jjD(p+1)W jj + rpjj@ptW jj� (19)we observe that if sp � (p� l+1)=(m+ 1), not only the formal order of accu-racy of the two component of the global truncation order (the exponent of h)are equal but also that the order of the derivatives involved in (18) and (19)are similar.One of the most interesting application of the above theory concerns thecase where �mh is a �rst-order upwind approximation of a hyperbolic �rst-orderoperator F . Specializing the discussion to this case, we have :Corollary 1 : Let �2h be a second-order approximation of F , then :if W0 � 0, sp � 2 is required to obtain a second-order accurate scheme.if W0 �W n, sp � 1 su�ces to obtain a second-order accurate scheme.Thus using sp = 2 with W0 � W n does not improve the formal order ofaccuracy of the scheme, neither does the a priori more accurate initializationINRIA

Page 13: A second order defect correction scheme for unsteady problems

A Second Order Defect Correction Scheme for Unsteady Problems 11W0 = 2W n �W n�1.For completness, if one is interested in third-order accurate schemes, wecan similarly prove :Corollary 2 : Let �3h be a third-order approximation of F , then :if W0 �W n, sp � 2 is required to obtain a third-order accurate scheme.but if W0 is a second-order approximation of W (t + �), (for instance W0 =2W n �W n�1) sp � 1 would su�ce to obtain a third-order accurate scheme.Remark 2 : The above two corollaries shows that second and third orderaccurate implicit schemes can be obtained at the price of inverting only oncethe jacobian matrix arising from a �rst order discretization.We now proceed to test numerically the above theory by applying it to thescalar advection equation : @@tu+ @@xu = 0with periodic boundary conditions. To construct a second-order accurate im-plicit scheme, we will use the following spatial approximation of the �rst-orderderivative :�1(jh) = u(jh)� u(jh� h)h�2c(jh) = u(jh+ h) � u(jh� h)2h �2u(jh) = 3u(jh)� 4u(jh) + u(jh � 2h)2h (20)and �2 = 1=2(�2c + �2u).The time discretization scheme uses the second-order backward di�erentia-tion formula: @@tu � 3un+1 � 4un + un�12�In the computation reported below the CFL number equals 10. Figure 1 dis-plays the slopes of the error curves jjuexact � uhjjL2 at time t = 1:5 as thegrid is ra�ned. We use the following notations : NcV denotes the second-orderRR n�2447

Page 14: A second order defect correction scheme for unsteady problems

12 R. Martin, H. Guillard0

1

2

1e-05 0.0001 0.001 0.01 0.1

Slo

pe

h

NcVN2I0N2I1N1I0N1I1

Figure 1: Slope of the error curve Cfl = 10scheme obtained after full convergence of (12), N1I1 (one Newton step, initia-lisation of �rst order) the scheme (12) after one step withW0 =W n, N2I1 thescheme (12) after two steps with W0 = W n while N1I0 and N2I0 will denotethe schemes obtained after respectively one and two Newton steps with the0-order discretization W0 = 0.The slope of the error curve corresponding to NcV tends to 2 as h! 0. Aspredicted by the above theory, it can be checked that this is also the case forthe N1I1 and N2I1 schemes. The slope of the error curve ! 1 for the schemeN1I0 while in perfect agreement with Corollary 1, second order accuracy isrecovered by a second Newton step (N2I0 scheme).INRIA

Page 15: A second order defect correction scheme for unsteady problems

A Second Order Defect Correction Scheme for Unsteady Problems 133 Stability AnalysisIn this section, we concentrate on the second order Dec schemes N1I1 and N2I1and perform a stability analysis on the linear model equation :@u@t + @u@x = 0 8x 2 R 8t > 0 (21)Given a regular mesh xj = j:h, we de�ne Unh = fu(xj ; tn)gj2Z and initializethe DeC iterations (12) by U0 = �1:Un + �2:Un�1. With these notations, (12)reduces to : H1(U l+1� U l) = �H2:U l + V � (22)where H1 = [3=2 I + ��1h], H2 = [3=2 I + ��2h] and V � = �2:Un + 1=2 Un�1.We can then express U l by :( U l = Al:U0 + (I �Al)H�12 V �A = I �H�11 H2 (23)To analyse the stability of (22) we rewrite it in the following way :0BB@ U lUnh 1CCA = Glh0BB@ UnhUn�1h 1CCA ; Glh = 0BB@ Gl1 Gl2Id 0 1CCAwhere Gl1 = �1:Al � 2:(Al � Id):H�12Gl2 = �2:Al + 1=2 (Al � Id):H�12The spectral radius of Glh is computed with the help of Fourier analysis. In-troducing a Fourier mode Ek = (:::; eik(j�1)h); eikjh; eik(j+1)h); :::) into (23) :(Unh = Unk :Ek, Un+1h = Un+1k :Ek, Un�1h = Un�1k :Ek) and using that the eigenva-lues of �1h and �2h are respectively d1(k) and d2(k):d1(k) = �1� e�ikh� =hd2(k) = �e�i2kh � 5e�ikh + 3 + eikh� =(4h) (24)RR n�2447

Page 16: A second order defect correction scheme for unsteady problems

14 R. Martin, H. Guillardwe obtain after some algebra, that the coe�cients of the ampli�cation matrixGlk de�ned by : U lkUnk ! = Glk UnkUn�1k ! ; Glk = gl1(k) gl2(k)1 0 ! (25)are given by : gl1(k) = �1�lA(k) � 2(�lA(k) � 1)�H2(k)gl2(k) = �2�lA(k) + 12 (�lA(k)� 1)�H2(k) (26)with : �A(k) = �H1(k) � �H2(k)�H1(k)�H1(k) = 3=2 + �(h:d1(k))�H2(k) = 3=2 + �(h:d2(k))where � = �=h represents the CFL number. The stability of the scheme isinsured if jjGlk jj is uniformely bounded. This can be checked by applying theresult cited in Richtmyer and Morton book ([12], p. 86) requiring that all theeigenvalues of Glk strictly lie inside the unit circle, excepted one maximumwhich norm can equal one. For the schemes N1I1 and N2I1, this is easilychecked by using Miller s theorem (see e.g. [11]) or instead by computingdirectly these eigenvalues: The \spurious root \ (the eigenvalue approximating0) is bounded in norm by 1=3, and the \physical root" (the one approximatinge�i� ) is always inside the unit cicle, excepted for k = 0 where it is equal toone.Figures 2 and 3 show the norm of these eigenvalues, computed for a CFLnumber equals to 50 as function of the parameter � = kh. Figure 2 displaysthe "physical" eigenvalue while �gure 3 shows the "spurious" one.We note that for low frequency, the behavior of the two schemes is verysimilar. For k = 0 ( i.e. � = 0 ) the physical eigenvalues are equal to 1 asexpected. For the spurious roots (�g 3) the absolute value of the eigenvaluesINRIA

Page 17: A second order defect correction scheme for unsteady problems

A Second Order Defect Correction Scheme for Unsteady Problems 15corresponding to the null mode is equal to 1=3 as can be checked directly from(26). For the whole range of frequencies, the norms of the spurious root of thetwo schemes are very similar. The largest di�erences between the two schemesN1I1 and N2I1 appear for � � �=2 and for the physical eigenvalues. It canbe checked from �gure 2 that for these frequencies, the physical ampli�cationfactor of scheme N1I1 is around 1/2. This behavior persits as the CFL numberincreases and actually, it can be shown that for CFL! +1, the ampli�cationfactor ! 1=2 as previously shown in ([3]). This behavior re ects the "incon-sistency" between the �rst order discretisation �1h and the second-order one�2h. Indeed, it is easily shown that the ampli�cation factor of the plain second-order scheme tends to 0 as CFL �! 1 . When one uses scheme N2I1, that isintermediate between N1I1 and plain second-order scheme, it can be seen from�gure 2 that the ampli�cation factor is less than 1/4 in the hight frequencyrange.This analysis leads us to the conclusion that although the two schemes N1I1and N2I1 are both linearly unconditionally stable, scheme N1I1 presents a\pathological" behavior in the medium frequency range and that scheme N2I1possesses better stability properties. In the sequel, we will numerically inves-tigate the di�erences between these two second-order schemes.Remark: The second order DeC scheme (12) N1I2 obtained from (12) byperforming one Newton iteration and initializing withW = 2W n�W n�1 is notstable, due to the spurious root whose norm grows larger than one. Thus, notonly the initialization W = 2W n �W n�1 does not improve the formal orderof accuracy of the scheme, but this initialisation has also a negative e�ect onthe stability.RR n�2447

Page 18: A second order defect correction scheme for unsteady problems

16 R. Martin, H. Guillard

0

0.2

0.4

0.6

0.8

1

-3.14 0 3.14

Am

plfic

atio

n fa

ctor

theta

MU=50

N1I1N2I1

Figure 2: Physical eigenvalues with U0 = Unh and Cfl = 500

0.2

0.4

0.6

0.8

1

-3.14 0 3.14

Am

plfic

atio

n fa

ctor

theta

MU=50

N1I1N2I1

Figure 3: Spurious eigenvalues with U0 = Unh and Cfl = 50 INRIA

Page 19: A second order defect correction scheme for unsteady problems

A Second Order Defect Correction Scheme for Unsteady Problems 174 Numerical TestsIn this section,we are interested in applying the implicit second-order defectcorrection scheme to Euler's equation of uid dynamics, that we de�ne below :8>>>>>>>><>>>>>>>>: @@tW + @@xF (W ) + @@yG(W ) = 0W (x; y; t = 0) = W0(x; y) 8(x; y) 2 W (x; y; t) = W1(x; y; t) 8(x; y) 2 @;8t > 0(27)with : W = 0BBB@ ��u�v�e 1CCCA ; F (W ) = 0BBB@ �u�u2 + p�uv(�e+ p)u 1CCCA ; G(W ) = 0BBB@ �v�uv�v2 + p(�e+ p)v 1CCCAwhere �; (u; v) ; e are respectively the density,velocity and total speci�cenergy of the uid. p represents the pressure, and is related to others ther-modynamical variables by the perfect gas law :p = ( � 1)(�e� 12�(u2 + v2))4.1 Finite Volume Method on unstructured meshesThe spatial discretisation of this set of equation uses a mixed �nite element/�nitevolume method that we describe rapidly below. For further details, we refer to([1],[5]). We assume that is a polygonal domain and we triangulate by a�nite element triangular mesh Th. For each node of the triangulation, a controlvolume Chi is de�ned by means of the medians of the edges of the triangles andthe barycenters of the triangle as shown in Fig(4).Integrating (27) over Chi leads to :@@t ZChi Wdv + Xj2V (i)�ij + BT = 0RR n�2447

Page 20: A second order defect correction scheme for unsteady problems

18 R. Martin, H. Guillard

i

j

G2

G1

I

O

O

O

O

O

O

O

O

O

O

O

O

O

O

O

O

O

O

O

O

O

O

O

O

O

O

O

O

O

O

O

O

O

O

O

OFigure 4: Control volume of CiiINRIA

Page 21: A second order defect correction scheme for unsteady problems

A Second Order Defect Correction Scheme for Unsteady Problems 19where V (i) denotes the set of the neighboors of node i, and BT stands for theboundary uxes. In the above edxpressions, �ij represents the intercell uxesde�ned by: �ij = Z@Chij F:nxij +G:nyijdswhere @Chij is the intersection of the cells Chi and Chj , and ~nij = (nxij; nyij) is theoutward unitary normal of @Chij The approximation of the intercell ux �ijuses a classical Roe approximate Riemann solver [13] that writes�1ij = k@CijkFRoe(Wi;Wj ; ~nij)FRoe(Wi;Wj ; ~nij) = 12 h(F (Wi) + F (Wj)):nxij + (G(Wi) +G(Wj)):nyiji+12jA(Wi;Wj; ~nij)j(Wi �Wj)where A(Wi;Wj; ~nij) is the Roe matrix ( see [13] ). �1ij is a �rst order accurateapproximation of the Euler uxes in the sense of (7). To obtain a second orderaccurate approximation, the classical MUSCL method by van Leer ([15]) isused. �2ij = k@CijkFRoe(W�ij ;W+ij ; ~nij)W�ij = Wi + 12rWi:~ijW+ij = Wj � 12rWj :~ij (28)where rWi, is the gradient of W at node i, evaluated by an average of the P1gradient of W on the triangles having i as node . The time discretisation usesthe formula (8).In summary in this case, the resulting implicit scheme N2I1 takes the form :�32 Id+ �@W�1h(W nh )� (W �W nh ) = �(32W nh + ��2h(W nh ))+(2 W nh � 12 W n�1h )�32 Id+ �@W�1h(W nh )� (W n+1h �W ) = �(32 W + ��2h(W ))+(2 W nh � 12 W n�1h ) (29)RR n�2447

Page 22: A second order defect correction scheme for unsteady problems

20 R. Martin, H. Guillardwhere (�2h)i = Pj2V (i) �2ij and @W�1h is an approximation of the jacobian ofthe �rst order uxes de�ned by :(@W�1h(U)�W )ij = hA(Ui; ~nij) + jA(Ui; Uj; ~nij)ji2 :�W i+hA(Uj ; ~nij)� jA(Ui; Uj; ~nij)ji2 :�W jwhere A(Uj; ~nij) = @WF (Uj)nxij + @WG(Uj)nyij while the implicit scheme N1I1results from the �rst step of (29).4.2 Density wave convectionWe consider a homogenous ow (� = 1:4g:cm�3, P = 104atm) of constantspeed (10cm:s�1) in a 2cm length canal. An initial perturbation of the density�eld (� = 1:6g:cm�3) is located between x = 0:2 and x = 0:3. The solution ofthis problem consists in the convection at the constant velocity ~V = 10cm:s�1of this discontinuity. We also note that in this case, Euler's equations reducesto the simple linear convection equation (21). We now compare the DefectCorrection schemes N2I1 and N1I1.To discriminate between the e�ect of timeand space accuracy, we also consider the �rst order implicit scheme (3). All thecomputations have been done by using the van Albada-van Leer limiters [14].Figure (5) shows the results obtained with a CFL number of 10 ( note that thiscorrespond to a convective CFL, u�=h of 1 ). It can be seen that the solutionsobtained with the two schemes N2I1 and N1I1 are in good agreement withthe exact solution and largely better than the solutions obtained with the �rstorder scheme. The second defect Correction step of (29) does not seem to havea strong in uence on the solution, except that we note that the oscillation atthe rear of the discontinuity that is rather larger with N1I1 is smoothed out bythe second order step of scheme N2I1. We have checked that further Newtoniterations almost do not improve the results and that this oscillation is stillpresent after convergence. Figure (6,7) show the results at a CFL number of50 and 100 ( ie a convective number of 5 and 10 ). The previous conclusionsremains valid for these large time steps: the solutions obtained with the �rstorder scheme is much more damped than the solutions obtained with N2I1INRIA

Page 23: A second order defect correction scheme for unsteady problems

A Second Order Defect Correction Scheme for Unsteady Problems 21

1.35

1.375

1.4

1.425

1.45

1.475

1.5

1.525

1.55

1.575

1.6

0.45 0.55 0.65 0.75 0.85 0.95

EXACTFirst Order

N1I1N2I1

Figure 5: Density wave convection CFL=10and N1I1, and the second order step contribute to a modest improvment ofthe solution, mainly in reducing the amplitude of the oscillation present at therear of the density wave. This �nding is in good qualitative agreement withthe results obtained from the previous linear stability analysis indicating thatscheme N2I1 is more dissipative that scheme N1I1 in the high frequency range.4.3 Isentropic CompressionWe next consider a problem well suited to the use of implicit schemes. This is a1-D isentropic compression-expansion obtained by compressing a gas containedin a closed tube, closed at an end by a moving piston. In this experiment theRR n�2447

Page 24: A second order defect correction scheme for unsteady problems

22 R. Martin, H. Guillard

1.35

1.375

1.4

1.425

1.45

1.475

1.5

1.525

1.55

1.575

1.6

0.45 0.55 0.65 0.75 0.85 0.95

EXACTFirst Order

N1I1N2I1

Figure 6: Density wave convection CFL=50INRIA

Page 25: A second order defect correction scheme for unsteady problems

A Second Order Defect Correction Scheme for Unsteady Problems 23

1.35

1.375

1.4

1.425

1.45

1.475

1.5

1.525

1.55

1.575

1.6

0.45 0.55 0.65 0.75 0.85 0.95

EXACTFirst Order

N1I1N2I1

Figure 7: Density wave convection CFL=100RR n�2447

Page 26: A second order defect correction scheme for unsteady problems

24 R. Martin, H. Guillardlength of the tube is 9:032 cm and the gas is initially at rest with a density andpressure of respectively 1:19g:cm�3 and 106Pa. At t = 0, the piston is movedin a smooth manner according to the law :Xp(t) = (�2 + �)� 12�cos(�(t)) �s�2 � �2sin(�(t))24 (30)where �, � are constant coe�cients. This law mimics the movement of a pistonmoved by a crankshaft system and in this expression � is the crank angle (CA)de�ned by : �(t) = �0 + 2� � (rpm=60)where rpm is the number of rotation per minute. The values of the coe�cientwere here choosen to be :� = 8:9cm; � = 15:5cm; rpm = 2000tr=minFor these values, a typical Mach number of the solution will be around3:10�2. The use of implicit scheme to compute the solution of this type ofproblem is thus mandatory. By using the Low Mach number approximation,an analytical solution of this problem can be found ( see e.g [10] ) that showsthat the velocity is linear, the pressure is a quadratic function and that densityis almost constant. To take into account the displacement of the piston, thecomputation is performed on a moving mesh. This imposes some modi�cationsin the expression of the uxes. We refer to [8],[10] for a detailed description ofthe algorithm on a moving mesh. We show Fig (9,8) respectively, the reduceddensity ~� and the reduced pressure ~p de�ned by :~� = �(x; t)� �(0; t)Maxx�(x; t)~p = p(x; t) � p(0; t)Maxxp(x; t)The computations have been done on a 21x3 node mesh, with a constant timestep corresponding to a variation of 0:5 degres of the parameter � in formula(30).The CFL number goes from 5 ( at the beginning of the computation ) toINRIA

Page 27: A second order defect correction scheme for unsteady problems

A Second Order Defect Correction Scheme for Unsteady Problems 25

9.03 8.57

X

0.2

0000

E-0

4 0

.000

00E

+00

Crank = -20 Degres

N2I1 schemeExact solution

9.03 8.57

X

0.2

0000

E-0

4 0

.000

00E

+00

Crank = -20 Degres

N1I1 scheme

Exact solutionFigure 8: Isentropic compression: pressure120 ( at the end ). One notice the large improvment produced by the second-order DeC N2I1: The pressure is closer to the analytical solution with N2I1than with N1I1. This improvment is emphasized by considering the densitycurves where the solutions obtained with N2I1 scheme is almost the same thanthe exact one. We also note on these density curves that N2I1 scheme reducesdramatically the oscillations of the density present near the piston.4.4 Sod Shock TubeOur third numerical test is composed of the classical Sod shock tube problem.We emphasize that this strongly unsteady problem is not well suited for impli-cit schemes at large CFL number, and that the overall performances of implicitschemes on this problem are poor. The computations have been performed in asquare of 1cm length on a 101x3 node mesh with a CFL number of 5. The vanRR n�2447

Page 28: A second order defect correction scheme for unsteady problems

26 R. Martin, H. Guillard

9.03 8.57

X

0.2

0000

E-0

4-0

.800

00E

-02

Crank = -20 Degres

N2I1 schemeExact solution

9.03 8.57

X

0.2

0000

E-0

4-0

.800

00E

-02

Crank = -20 Degres

N1I1 scheme

Exact solutionFigure 9: Isentropic compression : densityINRIA

Page 29: A second order defect correction scheme for unsteady problems

A Second Order Defect Correction Scheme for Unsteady Problems 27

1.00 0.00

X

0.1

0000

E+0

1 0

.000

00E

+00

time = 0.1600

N2I1 schemeExact solution

1.00 0.00

X

0.1

0000

E+0

1 0

.000

00E

+00

time = 0.1600

N1I1 scheme

Exact solution Figure 10: Sod Shock Tube : pressureAlbada van Leer limiters have been used, but we do not employ any \entropy�x". Figures (10,11,12) display respectively the pressure, density and velocityat time t = 0:16. The most remarkable feature of the N2I1 scheme is the largeoscillation present at the rear of the rarefaction wave. This oscillation is muchmore smaller with N1I1 scheme. On this other hand, the N2I1 scheme morefaithfully respects the contact discontinuity (11) which is barely visible on theresults obtained with the N1I1 scheme.5 Flow in a bi-dimensional model of a pistonengine.We end this paper by the study of the ow in the intake phase of a bi-dimensional planar model of a piston engine. The geometry under investigationRR n�2447

Page 30: A second order defect correction scheme for unsteady problems

28 R. Martin, H. Guillard

1.00 0.00

X

0.1

0000

E+0

1 0

.000

00E

+00

time = 0.1600

N2I1 schemeExact solution

1.00 0.00

X

0.1

0000

E+0

1 0

.000

00E

+00

time = 0.1600

N1I1 scheme

Exact solution Figure 11: Sod Shock Tube : densityINRIA

Page 31: A second order defect correction scheme for unsteady problems

A Second Order Defect Correction Scheme for Unsteady Problems 29

1.00 0.00

X

0.1

2000

E+0

1 0

.000

00E

+00

time = 0.1600

N2I1 schemeExact solution

1.00 0.00

X

0.1

2000

E+0

1 0

.000

00E

+00

time = 0.1600

N1I1 scheme

Exact solution Figure 12: Sod Shock Tube : VelocityRR n�2447

Page 32: A second order defect correction scheme for unsteady problems

30 R. Martin, H. Guillardis given Figure 13.a and 13.b at two di�erent times in the cycle. The diameterof the cylinder is 8.8 cm, its heigh is 9.032 cm at bottom dead center (BDC)while the squish region at top dead center (TDC) is 0.132 cm high. The diame-ter of the intake pipe is 3.06 cm. In this computation, the concurrent motionof the piston and of the valve have to be considered. Figure 14 displays thedisplacement law of the piston and valve with respect to the crank angle (CA).The computation extends from the opening of the valve at �10oCA to its clo-sing at 230oCA. Figure 14 shows that the piston is still moving upward atthe beginning of the valve opening. The valve begins its closure movementat 110oCA and is totally closed at 230oCA while the piston begins to moveupward at 180oCA. In the present computation, the valve is considered closedwhen it is 1 mm close from the cylinder head. At the beginning of the compu-tation, we consider that the ow is at rest with pressure and density equal totheir atmospheric value i.e Patm = 106cgs and �atm = 1:191�3g:cm�3. We useslip condition at the boundaries except at the intake pipe where the value ofthe ux is given through a Steger-Warming formulation :�i� = A+(Wi)Wi +A�(Wi)Watmwhere Watm is the atmospheric state at rest : Watm = (�atm; 0; 0; Patm)t, A+(resp A�) is the positive (resp negative) part ofA = @W (nxF (W ) + nyG(W ))where ~n = (nx; ny)is the outward unit normal.5.1 Mesh movement.The concurrent motions of the valve and piston impose to move the mesh inan adequate way. Because these two motions do not have the same translationaxis, it is di�cult to specify the movement of the mesh in an analytical way. Soinstead we compute the motion of the mesh by solving the following laplacianINRIA

Page 33: A second order defect correction scheme for unsteady problems

A Second Order Defect Correction Scheme for Unsteady Problems 31problem : Let (u,v) be the speed of each mesh points. Then we solve :8><>: �:u = 0 on �:v = 0 on @v@n = 0 on the cylinder sidesu = f on @ v = g on @=the cylinder sides (31)Although not totally satisfactory (in particular, this algorithm does not ex-clude possible crossing of mesh points), this technique has been found su�cientfor this case. Problem (31) is solved in an e�cient way by a conjugate gradientalgorithm and represents only a very modest part of the total computationaltime.5.2 ResultsThe purpose of this section is to compare the results obtained with the secondorder DeC scheme (N2I1) with those obtained with the �rst-order implicitscheme (3) obtained using a �rst-order time accurate discretization formula.Thus two computations have been performed on the same mesh displayed inFigure 13 with two di�erent time steps. Figure 15.a shows the mass ow versusthe crank angle obtained with the two schemes. In these computations, the timestep is �xed and corresponds to a variation of 5o of the crank angle. It canbe noticed that there is almost no di�erence between the results obtained bythe two schemes. Figure 15.b displays the results obtained with a time stepcorresponding to a variation of 10oCA. Again there is almost no di�erencebetween these two curves and the previous two ones. This indicate that thetime and space accuracies are not critical for the computation of integratedquantities like the mass ow. However if one is interested in the detail of themotion of the ow, large di�erences can now be noticed in the results obtainedby the two schemes. For instance, Figure 16 displays the streamlines at 230oCAobtained with a time step of 5oCA. The organization of the motion is on theaverage the same for the two schemes : Two large recirculating regions arepresent under the two sides of the valve. But the centers of the vortices arehigher in the results obtained with the second-order scheme and the vortex onthe right side of the intake valve is much more developped. These di�erencesare emphazised if one looks in the ow around the intake valve (Figure 17.aand 17.b). It can be seen that the second order scheme (N2I1) predicts theRR n�2447

Page 34: A second order defect correction scheme for unsteady problems

32 R. Martin, H. Guillardexistence of two recirculating regions on the upper side of the intake valvewhile these region are barely visible in the results obtained with the �rst orderscheme. Note also that the position of the line of separation between the tworecirculating region under the valve is very di�erent : It is almost symmetricalwith respect to the valve in Figure 17.b while it is shifted on the left in Figure17.a.Figure 18 now shows the results obtained by the second-order scheme (N2I1)with a time step of 10oCA. It is interesting to notice that these results are closerto the results obtained with (N2I1) and a time step of 5oCA than are the resultsobtained with the �rst order scheme and a time step of 5oCA. In particular,the existence of two recirculating regions on the upper part of the intake valveis again predicted and the position of the line of separation is again shiftedon the left. This indicate the importance of the spatial accuracy for this typeof computation. It is worth mentionning that it has not been possible to usea time step of 10oCA with the �rst order scheme. The computation explodedright before 230o CA (this explains the vertical part of the curve displayed inFigure 15.d). It is likely that the second Newton iteration performed in the(N2I1) scheme reinforces the stability of the scheme. Therefore at least for thiscase, the use of a second-order scheme not only improves the accuracy of theresults but also has a bene�cial in uence on the stability of the computation.

INRIA

Page 35: A second order defect correction scheme for unsteady problems

A Second Order Defect Correction Scheme for Unsteady Problems 33

a) Position at 0oCA b) Position at 180oCAFigure 13: Time evolution of the unstructured meshRR n�2447

Page 36: A second order defect correction scheme for unsteady problems

34 R. Martin, H. Guillard

0

10

-180 0 180 240

(A)(B)

Figure 14: Position versus Crank angle : (A) Piston motion in cm - (B) IntakeValve motion in mmINRIA

Page 37: A second order defect correction scheme for unsteady problems

A Second Order Defect Correction Scheme for Unsteady Problems 35

-2

0

10

-10 0 180 240

(a)(b)

-2

0

10

-10 0 180 240

(c)(d)

Figure 15: Mass ow rate versus Crank angle : (a) First order scheme with�� = 5oCA - (b) N2I1 scheme with �� = 5oCA - (c) First order scheme with�� = 10oCA - (d) N2I1 scheme with �� = 10oCARR n�2447

Page 38: A second order defect correction scheme for unsteady problems

36 R. Martin, H. Guillard

a) N2I1 scheme b) First order schemeFigure 16: Stream Lines at 230oCA with �� = 5oCAINRIA

Page 39: A second order defect correction scheme for unsteady problems

A Second Order Defect Correction Scheme for Unsteady Problems 37

a) N2I1 scheme b) First orderS1/2T1 schemeFigure 17: Stream lines near the intake valve at 230oCA with �� = 5oCARR n�2447

Page 40: A second order defect correction scheme for unsteady problems

38 R. Martin, H. Guillard

Figure 18: N2I1 scheme - Stream Lines at 230oCA with �� = 10oCAINRIA

Page 41: A second order defect correction scheme for unsteady problems

A Second Order Defect Correction Scheme for Unsteady Problems 396 ConclusionThis work proposes a general method to construct high order implicit schemesat the price of inverting only a �nite number of linear systems coming from�rst order schemes. For the case of second order, we demonstrated that thisnumber can be as small as one, while preserving the linear stability of thescheme. In practice, however, we have found that in some case, it is better toperform two iterations of the scheme (12), and we recommend in general thisoption (Although in some cases, scheme N1I1 gives better results than N2I1see section 4.4). We emphasize that when an iterative method is used to solvethe linear systems, this does not imply that the computational time is doubled:due to the good initialisation of the iterative solver provided by the �rst step,the second linear system is much more simpler to solve than the �rst one.In practice, we experimentally found that scheme N2I1 is only less than 50%more expensive than scheme N1I1. The numerical experiments reported in thispaper conclusively show that these Dec schemes provide a very interesting wayto construct high order implicit method.AcknowledgmentSeveral points in this work have been discussed with J.A. D�esid�eri. We alsothank P.Hemker who attracts our attention on the di�erent ways to initializethe Dec iterations in connection with backward di�erentiation formula.This study has been supported in the context of a cooperation between Re-nault S.A., Simulog and INRIA in order to develop e�cient numerical methodsfor the simulations of the aerodynamicsof combustion chambers.

RR n�2447

Page 42: A second order defect correction scheme for unsteady problems

40 R. Martin, H. GuillardReferences[1] P ARMINJON and A DERVIEUX. Construction of tvd-like arti�cial vis-cosities on two-dimensional arbitrary fem grids. J. Comp. Phys., 106:176{198, 1993.[2] R.M. BEAM and R.M. WARMING. An implicit �nite di�erence algorithmfor hyperbolic system in conservation law form. J. Comp. Phys., 22:67{110, 1976.[3] J.A. DESIDERI and P.W. HEMKER. Analysis of the convergence of ite-rative implicit and defect-correction algorithms for hyperbolic problems.INRIA report, 1200, 1990.[4] L. FEZOUI. R�esolution des �equations d'euler par un sch�ema de van leeren �el�ements �nis. INRIA report, 358, 1985.[5] L FEZOUI and B STOUFFLET. A class of implicit upwind schemes foreuler simulations with unstructured meshes. J. Comp. Phys., 84:174{206,1989.[6] W. HACKBUSH. Multi-Grid Methods and Applications. Springer Verlag,1985.[7] A. LERAT, J. SIDES, and V. DARU. An implicit �nite volume methodfor solving the euler equations. Lecture Notes in Physics, 170:343{349,1982.[8] B. NKONGA. D�eveloppement de m�ethodes num�eriques pour les �ecoule-ments tridimensionnels r�eactifs dans un domaine d�eformable. Th�ese del'universit�e de NiceSophia-Antipolis, 1992.[9] B. NKONGA, G. FERNANDEZ, H. GUILLARD, and B. LARROUTU-ROU. Numerical investigations of the tulipe ame instability - compari-sons with experimental results. Combust. Sci. and Tech., 87:69{89, 1992.[10] B. NKONGA and H. GUILLARD. Godunov type method on non-structured meshes for three-dimensional moving boundary problems.Comput. Methods Appl. Mech. Engrg., 113:183{204, April 1993. INRIA

Page 43: A second order defect correction scheme for unsteady problems

A Second Order Defect Correction Scheme for Unsteady Problems 41[11] R. PEYRET and T.D. TAYLOR. Computational Methods for Fluid Flow.Springer-Verlag, 1983.[12] R.D. RICHTMYER and K.W. MORTON. Di�erence methods for initial-value problems. Interscience, 1967.[13] Ph. ROE. Approximate riemann solvers, parameter vectors, and di�erenceschemes. J. Comp. Phys., 43:357{371, 1981.[14] G.D. VAN ALBADA, B. VAN LEER, and W.W. ROBERTS. A compara-tive study of computational methos in cosmic gas dynamics. Astronomyans Astrophysics, 108:76{84, 1982.[15] B. VAN LEER. Towards the ultimate conservation di�erence scheme v,a second-order sequel to godunov's method. J. Comp. Phys., 32:101{136,1979.[16] H.C. YEE. Upwind and symmetric shock capturing schemes. NASA Tech.Memorandum 89464, May 1987.

RR n�2447

Page 44: A second order defect correction scheme for unsteady problems

Unite de recherche INRIA Lorraine, Technopole de Nancy-Brabois, Campus scientifique,615 rue du Jardin Botanique, BP 101, 54600 VILLERS LES NANCY

Unite de recherche INRIA Rennes, Irisa, Campus universitaire de Beaulieu, 35042 RENNES CedexUnite de recherche INRIA Rhone-Alpes, 46 avenue Felix Viallet, 38031 GRENOBLE Cedex 1

Unite de recherche INRIA Rocquencourt, Domaine de Voluceau, Rocquencourt, BP 105, 78153 LE CHESNAY CedexUnite de recherche INRIA Sophia-Antipolis, 2004 route des Lucioles, BP 93, 06902 SOPHIA-ANTIPOLIS Cedex

Editeur

INRIA, Domaine de Voluceau, Rocquencourt, BP 105, 78153 LE CHESNAY Cedex (France)

ISSN 0249-6399