Abstract
The application of suitable numerical boundary conditions for hyperbolic conservation laws on domains with complex geometry has become a problem with certain difficulty that has been tackled in different ways according to the nature of the numerical methods and mesh type. In this paper we present a technique for the extrapolation of information from the interior of the computational domain to ghost cells designed for structured Cartesian meshes (which, as opposed to non-structured meshes, cannot be adapted to the morphology of the domain boundary). This technique is based on the application of Lagrange interpolation with a filter for the detection of discontinuities that permits a data dependent extrapolation, with higher order at smooth regions and essentially non oscillatory properties near discontinuities.
Similar content being viewed by others
References
Aràndiga, F., Baeza, A., Belda, A.M., Mulet, P.: Analysis of WENO schemes for full and global accuracy. SIAM J. Numer. Anal. 49(2), 893–915 (2011)
Baeza, A., Mulet, P.: Adaptive mesh refinement techniques for high-order shock capturing schemes for multi-dimensional hydrodynamic simulations. Int. J. Numer. Methods Fluids 52, 455–471 (2006)
Berger, M.J., Colella, P.: Local adaptive mesh refinement for shock hydrodynamics. J. Comput. Phys. 82, 64–84 (1989)
Boiron, O., Chiavassa, G., Donat, R.: A high-resolution penalization method for large Mach number flows in the presence of obstacles. Comput. Fluids 38, 703–714 (2009). doi:10.1016/j.compfluid.2008.07.003
Faà di Bruno, C.F.: Note sur un nouvelle formule de calcul différentiel. Q. J. Math. 1, 359–360 (1857)
Carpenter, M., Gottlieb, D., Abarbanel, S., Don, W.S.: The theoretical accuracy of Runge–Kutta time discretizations for the initial boundary value problem: a study of the boundary error. SIAM J. Sci. Comput. 16, 1241–1252 (1995)
Donat, R., Marquina, A.: Capturing shock reflections: an improved flux formula. J. Comput. Phys. 125, 42–58 (1996)
Godlewski, E., Raviart, P.A.: Numerical Approximation of Hyperbolic Systems of Conservation Laws, Applied Mathematical Sciences, vol. 118. Springer, New York (1996). doi:10.1007/978-1-4612-0713-9
Gustafsson, B., Kreiss, H.O., Oliger, J.: Time Dependent Problems and Difference Methods. Pure and Applied Mathematics. Wiley, New York (1995). A Wiley-Interscience Publication
Gustafsson, B., Kreiss, H.O., Sundström, A.: Stability theory of difference approximations for mixed initial boundary value problems. II. Math. Comput. 26, 649–686 (1972)
Harten, A., Engquist, B., Osher, S., Chakravarthy, S.R.: Uniformly high order accurate essentially non-oscillatory schemes. III. J. Comput. Phys. 71(2), 231–303 (1987)
Huang, L., Shu, C.W., Zhang, M.: Numerical boundary conditions for the fast sweeping high order WENO methods for solving the Eikonal equation. J. Comput. Math. 26, 336–346 (2008)
Jiang, G.S., Shu, C.W.: Efficient implementation of weighted ENO schemes. J. Comput. Phys. 126, 202–228 (1996)
Marquina, A., Mulet, P.: A flux-split algorithm applied to conservative models for multicomponent compressible flows. J. Comput. Phys. 185, 120–138 (2003)
Oliger, J., Sundström, A.: Theoretical and practical aspects of some initial boundary value problems in fluid dynamics. SIAM J. Appl. Math. 35(3), 419–446 (1978)
Pletcher, R.H., Tannehill, J.C., Anderson, D.: Computational Fluid Mechanics and Heat Transfer, 3rd edn. CRC Press, Boca Raton (2012)
Shu, C.W., Osher, S.: Efficient implementation of essentially non-oscillatory shock-capturing schemes. J. Comput. Phys. 77, 439–471 (1988)
Shu, C.W., Osher, S.: Efficient implementation of essentially non-oscillatory shock-capturing schemes. II. J. Comput. Phys. 83(1), 32–78 (1989)
Sjogreen, B., Petersson, N.: A Cartesian embedded boundary method for hyperbolic conservation laws. Commun. Comput. Phys. 2, 1199–1219 (2007)
Tan, S., Shu, C.W.: Inverse Lax-Wendroff procedure for numerical boundary conditions of conservation laws. J. Comput. Phys. 229, 8144–8166 (2010)
Tan, S., Wang, C., Shu, C.W., Ning, J.: Efficient implementation of high order inverse Lax-Wendroff boundary treatment for conservation laws. J. Comput. Phys. 231(6), 2510–2527 (2012)
Woodward, P., Colella, P.: The numerical simulation of two-dimensional fluid flow with strong shocks. J. Comput. Phys. 54, 115–173 (1984)
Xiong, T., Zhang, M., Zhang, Y.T., Shu, C.W.: Fast sweeping fifth order WENO scheme for static Hamilton-Jacobi equations with accurate boundary treatment. J. Sci. Comput. 45, 514–536 (2010)
Yee, H.C.: Numerical approximation of boundary conditions with applications to inviscid equations of gas dynamics. Technical report N81–19834, NASA (1981)
Author information
Authors and Affiliations
Corresponding author
Additional information
This research was partially supported by Spanish MINECO Grants MTM2011-22741 and MTM2014-54388.
Appendices
Appendix 1: Computations of Intersections and Normals for Meshing
We have implemented a method to automatically compute the interior cells to \(\varOmega \), the ghost cells and the normal (to \(\partial \varOmega \)) vectors associated to them. We require a parametric definition of the curve described by \(\partial \varOmega \).
The knowledge of the Lipschitz constants of this curve is enough for computing the intersections of the boundary with the mesh lines. Indeed, with the notation \(\alpha =(\alpha _x,\alpha _y):[a,b]\rightarrow {\mathbb {R}}^2\) for the curve described by \(\partial \varOmega \), if \(L_x\) and \(L_y\) are upper bounds for the Lipschitz constants of the respective components of \(\alpha \), then the values \(\varDelta _xs:=\frac{h_x}{L_x}, \varDelta _ys:=\frac{h_y}{L_y}\) satisfy
If we detect that a vertical or horizontal mesh line passes through two values of the parameter, we use Newton–Raphson’s method, combined with bisection to safely approximate the intersection.
A similar strategy is used for the computations of the normals. In this case, given a ghost cell center, \((x,y)\), we start from the parameter value of the intersection that has generated that cell, \(s_0\), for this should not be far from the value of the parameter that corresponds to the point \(N(x, y)\in \partial \varOmega \) that determines the normal vector to the boundary passing by \((x, y)\).
Our search criterion is based on the sign of the scalar product of the tangent vector, \((\alpha '_x(s), \alpha '_y(s))\) and the vector formed by \((\alpha _x(s), \alpha _y(s))\) and \((x,y)\). At any rate, we aim to find \(s\) satisfying the equation
To accomplish this, we start from \(s=s_0\) and evaluate this expression at points at each side of \(s_0\) until a sign change in \(f\) is found. At this point we can use Newton-Raphson’s method, together with bisection, to safely approximate the solution of (19) to the required precision.
Appendix 2: Linear Stability Analysis for Inflow Boundary Conditions
Since a GKS stability analysis (see [10]) is out of the scope of this paper, we perform a simpler stability analysis to illustrate the strong influence of the spacing of the closest node to the boundary in the stability of the global numerical method.
For the sake of the exposition, we consider a linear advection equation
defined on \(\varOmega =(0,1)\) and inflow condition at \(x=0\), \(u(0, t)=g(t)\). Let \(h_x>0\), \(\varDelta t>0\), \(k\in (0,1]\) and define our grid points as \(x_j:=(k+j)h_x\), \(0\le j\le E(\frac{1}{h_x})\) and \(t_n:=n\varDelta t\).
For solving numerically the equation, we use a first order upwind scheme:
Assume we want to use linear interpolation at the boundary. This involves the inflow condition itself and the node \(U_0^n\) at each time step \(n\). Naming \(G^n:=g(t_n)\), if we want to extrapolate at \(x_{-1}=(k-1)h_x\), where no information is available, at time step \(n\) using these two points, it can be shown by performing a linear extrapolation that
Since we want to focus on a stability analysis around the left boundary, where inflow conditions are prescribed, the scheme at \(x_0\) reads
With this, following a standard Von Neumann stability analysis from this new scheme, a necessary condition for stability is
which is equivalent to
Appendix 3: Accuracy of Schemes Obtained from Extrapolation at Ghost Cells
Related to Sect. 2.1, let us denote
for fixed \(x\) and sufficiently smooth \(u\), \(\hat{f}\). Then (5) is equivalent to
which is in turn equivalent to
If \(\hat{f}\) were a linear function, these relations would immediately yield a linear system of equations for its coefficients. In general, a more complicated formula equivalent to (21) can be obtained as follows: By induction on \(n\) the following vectorial version of Faà di Bruno’s Formula [5] can be proved:
for suitable and uniquely defined coefficients \(\alpha _{p_1,\ldots ,p_m}\). From (23) and the fact that \(U_j^{(\nu )}\) \(=j^\nu u^{(\nu )}(x)\), for \(j=-p-1,\ldots ,q\) and \(\nu \ge 0\), we deduce that
For \(n=1\), (23) is satisfied with \(\alpha _{p_1}=1\):
It follows from (21) that \(F'(0)=f'(u(x))u'(x)\) for any sufficiently smooth \(u\) if and only if
i.e.,
Now, (20) may be obtained by any means but, as we have just seen, they are equivalent to (21), (23), which only depends on derivatives of \(u\) at \(x\), as long as \(u\) is smooth enough at a convex open set containing the corresponding stencil.
Assume now that that \(u(x-(p+1)h)\) is replaced by, \(\widetilde{u}(x-(p+1)h)\), the evaluation at \(x-(p+1)h\) of a polynomial that interpolates \(u\) at another stencil \(x+p'h,\ldots x+q'h\), with \(p'\ge -p\). Let us denote \(\overline{q}=\max (q, q')\) and
If \(u\) is smooth in a convex open set containing \([x-(p+1)h,\ldots ,x+\overline{q}h]\), then
and, therefore,
It then follows from (20) that
under the assumption of \(u\) being smooth in a convex open set containing \([x-(p+1)h,\ldots ,x+\overline{q}h]\). As argued above, this is equivalent to
which translates into a functional relationship akin to that for \(F\). But now \(G\) depends only on the stencil \(x-ph,\ldots ,x+\overline{q}h\) and therefore (25) on \(u\) being smooth in a convex open set containing \([x-ph,\ldots ,x+\overline{q}h]\), i.e.,
if \(u\) is smooth in a convex open set containing \([x-ph,\ldots ,x+\overline{q}h]\).
Therefore, we have concluded that \(r\)th order extrapolation applied to \(r\)th order schemes decreases the order of the scheme near the boundaries to \(r-1\). It can be seen that this order is sharp. This is in apparent contradiction with the results obtained in Sect. 5.1, where fifth order extrapolation applied together with fifth order schemes yields fifth order global errors, both in 1-norm and \(\infty \)-norm.
We next justify that the global errors are of order \(r\) in 1-norm if the local error is of order \(r+1\) at all but a bounded number (with respect to \(M\)) of nodes where the order is a unit less.
Let us denote \(v^n_j=u(x_j, t_n)\), \(j=1,\ldots ,M\), for \(M\) the total number of spatial nodes, and \({\mathcal {H}}={\mathcal {H}}_{\lambda ,h}\), \(\lambda =\varDelta t/h\), the operator of the numerical scheme:
With this notation, the global error is \(e^n=v^n-u^n\) and the local error can be written as \(f_j^n=v_{j}^{n+1}-{\mathcal {H}}v^n_j,\) which yields:
Subtracting (26) and (27) and using the mean value theorem for \({\mathcal {H}}\) we obtain a relationship between local and global error:
where
which, by induction on \(n\), yields
Now, we recall that the classical argument to obtain convergence from consistency and stability proceeds as follows: Given some fixed \(T>0\), if for \(h \in (0, h_0)\),
and, for the induced matrix norm, \(\Vert B_m\Vert \le 1+D h\), then it easily follows that \(\Vert e^n\Vert \le C h^{r}\) for all \(h\in (0, h_0)\) and all \(n\) such that \(n\varDelta t=n\lambda h \le T\).
This analysis is sufficient for the 1-norm if a bounded number of nodes \(x_j\) satisfy \(f_j^k={\mathcal {O}}(h^r)\), whereas the rest satisfy \(f_j^k={\mathcal {O}}(h^{r+1})\), since then \(\Vert f_j \Vert _1=h\sum _{j=1}^{M} |f_j^k| = {\mathcal {O}}(h^{r+1})\). But this analysis does not explain that \(\Vert e^{n}\Vert _{\infty } = {\mathcal {O}}(h^r)\), since in this case we have \(\Vert f^k\Vert _{\infty } ={\mathcal {O}}(h^{r})\), i.e., (30) does not hold, so this argument would yield \(\Vert e^{n}\Vert _{\infty } = {\mathcal {O}}(h^{r-1})\). A finer analysis, based on the examination of the entries of the vectors involved in (29), is then needed to obtain \(\Vert e^{n}\Vert _{\infty } = {\mathcal {O}}(h^r)\). The analysis of
can be quite involved in general and it is out of the scope of this work. We will show a particular case in which we obtain global errors of order 1 (in \(\infty \)-norm) from local errors with some bounded number of entries of order 1 and the rest of order 2. We consider the upwind scheme
for the linear advection equation \(u_t+u_x=0\) with time dependent boundary condition at \(x=0\), \(u(0, t)=g(t)\). The value of \(u_{0}^{n}\approx u(x_0, t_n)\) needs to be supplied according to this boundary condition. Prescribing \(u_{0}^{n}=g(t_n)=u(0, t_n)\) gives a first order approximation of \(u(x_0, t_n)=u(-h/2, t_n)\) and effectively yields a local error of order \(r=1\) at \(x_1\):
whereas the rest of the entries of the local error satisfy
i.e., are of order \(r+1=2\), for suitable positive constants \(A_1, A\).
For this linear case, all the matrices \(B_m\) are \((1-\lambda )I_{M}+\lambda N_M\), where \(N=N_M\) is the nilpotent matrix whose powers are given by \((N^j)_{pq}=\delta _{p-q,j}\), \(j\ge 1\), \( 1\le p, q\le M\). We compute now, with the change of variables \(k'=n-k-1 \rightarrow k\):
We can bound
for \(s=p-q\) and use that \(\lambda ^{s} \sum _{k=s}^{n-1}\left( {\begin{array}{c}k\\ s\end{array}}\right) (1-\lambda )^{k-s} \le \lambda ^{s} \sum _{k=s}^{\infty }\left( {\begin{array}{c}k\\ s\end{array}}\right) (1-\lambda )^{k-s}=\frac{1}{\lambda }\) (see next lemma) to conclude:
for any \(p=1,\ldots ,M\), i.e., \(\Vert e^n\Vert _{\infty }={\mathcal {O}}(h^r)\), \(r=1\), as proposed.
Lemma 1
For any \(\lambda \in (0,1)\) and \(s \in \mathbb {N}\),
Proof
Set \(A_s=\sum _{k=s}^{\infty }\left( {\begin{array}{c}k\\ s\end{array}}\right) (1-\lambda )^{k-s}\). From the identity \(\left( {\begin{array}{c}k\\ s\end{array}}\right) =\left( {\begin{array}{c}k-1\\ s\end{array}}\right) +\left( {\begin{array}{c}k-1\\ s-1\end{array}}\right) \), for \(0\le s < k\), and the change of variables \(k'=k-1\) we get:
We obtain that \( A_{s}=(1-\lambda )A_s+A_{s-1}\) i.e., \(A_{s}=\lambda ^{-1}A_{s-1}\), which immediately yields
\(\square \)
Rights and permissions
About this article
Cite this article
Baeza, A., Mulet, P. & Zorío, D. High Order Boundary Extrapolation Technique for Finite Difference Methods on Complex Domains with Cartesian Meshes. J Sci Comput 66, 761–791 (2016). https://doi.org/10.1007/s10915-015-0043-2
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10915-015-0043-2