spec_ellp

Embed Size (px)

Citation preview

  • 7/31/2019 spec_ellp

    1/10

    Spectral Solution of Elliptic Systems in Arbitrary

    Quadrilateral Domains

    Chitra Alavani, Pallavi Joshi, Smita Bedekar

    Interdisciplinary School of Scientific Computing

    University of Pune, India.S. Pavitran

    Department of Mechanical Engineering,

    Vishwakarma Institute of Technology,Pune

    June 8, 2010

    Abstract

    The Chebyshev spectral method is applied to linear elliptic partial differ-

    ential equations. Arbitrary quadrilateral domains are considered. Bothcurved and straight boundaries are looked into. The derivative matrix isobtained in the physical space and utilised in obtaining the solution us-ing the collocation method. The algorithm is tested for quadrilaterals withstraight as well as curved boundaries. A general algorithm is also presentedfor an arbitrary curved quadrilateral. It can be seen that the algorithmyields spectral accuracy in all cases. In most cases, eight Chebychev modesin each direction is sufficient to yield a high accuracy.

    1 Introduction

    Spectral methods belong to the general class of weighted residual methods

    [2, 3, 4]. Being global, the method is highly accurate. Spectral methods arein general computationally intensive as they result in dense matrices. Themain advantage of the standard spectral methods relies on the exponential con-vergence property. The main drawback is their inability to handle complexgeometries. Although there have been attempts to use the spectral methodin irregular domains[10], these approaches usually involve either incorporatingfinite-element preconditioning or using the spectral element method. Heinrichin his work on spectral collocation method on a unit disc [6], mapped the unitsquare directly onto the unit disc by means of interpolation techniques avoidingthe singularity of polar coordinates. To apply spectral methods on a complexgeometry, one needs to divide the domain into triangular(tetrahedral in 3D) or

    quadrilateral elements. Results are available for spectral methods on triangulardomains [5, 7].Alfonso et al [1] have proposed a numerical method to approximate the solu-tion of partial differential equations in irregular domains with no-flux boundary

    1

  • 7/31/2019 spec_ellp

    2/10

    conditions. The main advantage of the method is its capability to deal withdomains of arbitrary shape and its easy implementation through FFT routines.Kong and Wu [9] have implemented a Chebychev tau method for irregular do-mains by embedding it in a larger regular one.The important aspect of the present work is that the Chebychev collocationmethod is applied in the physical space and derivatives are determined in thesame. The governing equation is solved in the actual domain and is not trans-formed. Thus, the algorithm is more general in the sense that any ellipticsystem can be solved, as the derivative matrices are only domain dependant.

    The paper is organized as follows. In the next section, the algorithm for solv-ing linear elliptic partial differential equations(PDE) with Dirichlet boundarycondition on quadrilateral domains is discussed. Numerical results and theirdiscussion are presented in Section 3. The conclusions are presented in Section4.

    2 Algorithm

    An arbitrary quadrilateral in the (x,y) domain is considered. In order to solve alinear elliptic system, the standard Chebychev(collocation) derivative matricesDx and Dy have to be obtained.

    An one-one mapping is defined between the quadrilateral in (x, y) and a square[-1,1]x[-1,1] in the (, ) plane. This yields x = x(, ) and y = y(, ). Thecollocation points in (x, y) get mapped to the Chebychev Gauss-Lobotto pointsin (, ). The gradient and the mapping are elobarated in the subsequent sub-sections.

    2.1 Mapping

    In order to determine the gradient, one needs the mapping function as x =x(, ), y = y(, ). Figure(2 shows the mapping from (, ) domain to (x, y)domain. The straight sided and curved quadrilaterals are presented.

    2

  • 7/31/2019 spec_ellp

    3/10

    a1(-1,1) a2(1,-1)

    a3(1,1)a4(-1,1)

    Figure 1: Mapping from natural to physical coordinate systems.

    2.1.1 Straight Sided Quadrilateral

    For quadrilaterals with straight sides, the mapping as outlined by [11] can bewritten as

    x =4

    i=1

    i(, )xi,

    y =4

    i=1

    i(, )yi,

    (1)

    where

    1 =1

    4(1 )(1 ),

    2 =1

    4(1 + )(1 ),

    3 = 14(1 + )(1 + ),4 =

    1

    4(1 )(1 + ).

    (2)

    Here xi, yi are the vertices of the quadrilateral.

    2.1.2 Quadrilateral with Curved Sides

    For an arbitrary quadrilateral, collocation points on the boundary of the domainare obtained. This is done using the arc length. The mapping is obtained bysolving the Laplacian equation for x and y, given by

    2x

    2+

    2x

    2= 0, (3)

    2y

    2+

    2y

    2= 0, (4)

    with the boundary values ofx and y corresponding to the boundary conditions.

    3

  • 7/31/2019 spec_ellp

    4/10

    2.2 Gradient Calculation and Solution Methodology

    The gradient is defined as

    =

    x

    y

    =

    x

    +

    x

    y

    +

    y

    (5)

    The derivatives

    and

    are obtained from the Chebychev derivative ma-

    trix(cf. [3]).

    The partial derivatives such as

    xare expressed as

    x=

    1

    J

    y

    ,

    y=

    1

    J

    x

    ,

    x=

    1

    J

    y

    ,

    y=

    1

    J

    x

    (6)

    where J is the determinant of the Jacobian matrix of (x, y) with respect to (, )defined as

    J =

    x

    x

    y

    y

    (7)

    The Jacobian is obtained directly from the mapping function. Thus, the differ-entiation matrices Dx and Dy are formed. The second order derivative matricesDxx and Dyy are obtained by matrix multiplication. The elliptic(linear) PDEis then reduced to a linear algebraic system [8].The matrix is dense and ill conditioned. Hence, iterative methods such asconjugate gradient are not suitable. A direct method such as LU decompositionis used to solve the linear system.

    3 Results and Discussion

    The results for elliptic systems on quadrilaterals with straight and curved sidesare presented. The mapping is defined initially. The results are comparedagainst the analytical(exact) solution. The boundary conditions are prescribedaccording to the exact solution. The L2 error norm(E) is defined as

    ||E||2L2 =1

    N2

    i,j=Ni,j=1

    (ui,j ui,j)2 , (8)

    where ui,j is the spectral solution, ui,j the exact one and N is the number of

    Chebychev modes in either(, ) direction.

    4

  • 7/31/2019 spec_ellp

    5/10

    3.1 Mapping for Quadrilateral with straight sides

    Consider a quadrilateral element with four nodes numbered 1, 2, 3 and 4 in ananti-clockwise direction, as shown in Figure(2).

    Figure 2: Mapping from natural to physical coordinate systems.

    The equationuxx + uyy = 2

    2sin(x)sin(y) (9)

    is solved with vertices at (1, 1), (5, 2), (4, 4) and (2, 4). The exact solution is

    given by u = sin(x)sin(y). (10)

    The results of the ||E||L2 for different N is presented in Table 3. From that, itcan be seen that spectral convergence is obtained for N 16.

    N ||E||L2

    4 0.18438 0.0125

    12 0.000216 9.1187e-00732 5.1981e-015

    Figure 3: ||E||L2 for different order of N on quadrilateral with points(1, 1), (5, 2), (4, 4) and (2, 4)

    The equationuxx + uyy = 4(x

    2 + y2)ex2y2 (11)

    5

  • 7/31/2019 spec_ellp

    6/10

    is solved with vertices at (0,3), (3, 0), (0, 2) and (2, 0). The exact solution isgiven by

    u = ex2y2 (12)

    The results of the ||E||L2 for different N is presented in Table ??. It can beobserved that spectral convergence is obtained for N = 32. The reason forspectral convergence being obtained at a higher N, compared to the previouscase, is that the exact solution being an exponential one needs more terms ofChebychev series for convergence.

    N ||E||L2

    4 36.03728 2.1031

    12 0.025616 0.019232 3.0336e-012

    Figure 4: ||E||L2 for different order of N on quadrilateral with points(0,3), (3, 0), (0, 2) and (2, 0)

    3.2 Quadrilateral with curved sides

    This section discusses results of PDEs solved on quadrilaterals with curvedboundaries shown in Figure 5

    6

  • 7/31/2019 spec_ellp

    7/10

    Figure 5: Domain bounded by exponential curve y = ex + 1, y = ex 1,y = ex + 1 and y = ex 1

    The mapping can be defined trivially as

    = ex

    y, = ex y.

    For equation 9, the ||E||L2 results for different N are presented in Table 1.As can be seen in that, one can say that spectral convergence is obtained forN 8.

    N ||E||L2

    4 0.01148 5.6364e-005

    12 1.1953e-008

    16 1.2420e-01132 9.1953e-015

    Table 1: Variation of ||E||L2(for equation 9) with N

    For equation 11, the error norm results for different N is presented in Table 2.As can be seen in Table 2, it can be seen that spectral convergence is obtainedfor N 4.

    7

  • 7/31/2019 spec_ellp

    8/10

    N ||E||L2

    4 1.4915e-0048 2.3943e-007

    12 1.4193e-01016 5.4749e-01432 5.2478e-015

    Table 2: Variation of ||E||L2(for equation 11) with N

    3.3 Arbitrary Curved Quadrilateral

    Here we will discuss the results of PDEs solved on arbitrary curved domainbounded by four different curves as shown in figure 6.

    Figure 6: Domain bounded by four different curves

    The equation of the curve between

    point A and B is x = cos3(), y = sin3().

    point B and C is x = x0 + rcos(), y = y0 + rsin().

    point C and D is x = 2( + sin()) + 4.5, y = 2(1 cos()) 0.1.

    point D and A is y = cosh(x).

    The mesh generated by using the mapping for curved quadrilaterals is given infigure 7.

    8

  • 7/31/2019 spec_ellp

    9/10

    Figure 7: Generated mesh in x , y domain

    The error norm results for equation 9. are given in Table 3. As one can observe,spectral convergence is obtained for N 8.

    N ||E||L2

    4 0.00668 3.4001e-005

    12 3.2886e-00616 6.1663e-00732 2.6554e-008

    Table 3: ||E||L2 Variation with N

    The results are presented for Equation 11. The variation of error norm ||E||L2for different N is presented in Table 4. As can be seen in Table 4, one can saythat spectral convergence is obtained for N 8.

    N ||E||L2

    4 0.00398 1.9463e-005

    12 1.4214e-00616 5.0343e-00732 1.8559e-008

    Table 4: ||E||L2 for different order of N

    4 Conclusions

    It can be seen that the algorithm yields spectral accuracy for elliptic systems.In most of the cases, spectral accuracy is obtained for N 16. Thus, even

    9

  • 7/31/2019 spec_ellp

    10/10

    though the matrices are dense, the relative size of the matrix is small, leadingto a low computational cost. In the case of results shown in Table ??, theerror reduction is slower due to the exponential behaviour of the solution. Thealgorithm can be extended to higher dimensions and to parabolic systems.

    References

    [1] Alfonso, B., Vctor, M. P., and F., F. H. Spectral methods forpartial differential equations in irregular domains: The spectral smoothed

    boundary method. SIAM Journal of Scientific Computing 28 (2006), 886900.

    [2] Boyd, J. P. Chebyshev and Fourier Spectral Methods, second(revised) ed.Dover Publications, INC, 2001.

    [3] Canuto, C., Hussaini, M. Y., Quarteroni, A., and Zang, T. Spec-tral Methods in Fluid Dynamics. Springer, 1988.

    [4] Canuto, C., Hussaini, M. Y., Quarteroni, A., and Zang, T. Spec-tral Methods Fundamentals in Single Domains. Springer, 2006.

    [5] Heinrichs, W. Spectral collocation on triangular elements. Journal ofComputational Physics 145 (June 1998), 743757.

    [6] Heinrichs, W. Spectral collocation schemes on the unit disc. Journal ofComputational Physics 199 (February 2004), 6686.

    [7] Heinrichs, W., and Loch, B. I. Spectral schemes on triangular ele-ments. Journal of Computational Physics 173 (June 2001), 280301.

    [8] Karniadakis, G. E., and Sherwin, S. J. Spectral/hp Element Methodsfor Computational Fluid Dynamics, second ed. Oxford Science Publica-tions, 2005.

    [9] Kong, W., and Wu, X. Chebyshev tau matrix method for poisson-type equations in irregular domain. Journal of Computational and AppliedMathematics 228 (2008), 158167.

    [10] Orszag, S. A. Spectral methods for problems in complex geometries.Journal of Computational Physics 37 (1980), 7092.

    [11] Pozrikidis, C. Introduction to Finite and Spectral Element Methods usingMATLAB. Chapman and Hall/CRC, 2005.

    10