14
$\begingroup$

I have a problem when I want to use the high order center difference approximation:

$$\left(\frac{-u_{i+2,j}+16u_{i+1,j}-30u_{i,j}+16u_{i-1,j}-u_{i-2,j}}{12}\right)$$

for the Poisson equation

$$(u_{xx}+u_{yy}=0)$$ in a square domain in which the boundary conditions are:

$$u(0,y)=u(x,0)=u(x,1)=0,u(1,y)=\sin \pi y$$ $$\Delta{x}=\Delta{y}=0.1$$

When I want to obtain the value of inside points of domain, considering this approximation some points depend on the outside points of boundary. For example, $u_{1,1}$ needs to have the value of $u_{i-2,j}=u_{-1,0}$ a point which is outside of boundary. Can anybody please help me in this case?

$\endgroup$
  • 1
    $\begingroup$ I presume you are using dirichlet boundary conditions, correct? $\endgroup$ – Paul Feb 25 '12 at 15:56
  • $\begingroup$ Please state the boundary conditions that you would like to impose. $\endgroup$ – David Ketcheson Feb 25 '12 at 18:01
  • $\begingroup$ Maybe the key is in the use of boundary conditions to obtain constraints involving those values. I cannot expand as I have never tried to solve numerically a PDE, but this idea works for ODEs. Can anybody confirm this? $\endgroup$ – astrojuanlu Feb 25 '12 at 18:03
  • $\begingroup$ With high-order methods it can be difficult to ensure stability of the method by filling ghost cells this way. That said, elliptic problems are typically more forgiving from my experience, so you might be able to get away with it. $\endgroup$ – Jeremy Kozdon Feb 25 '12 at 18:10
  • 1
    $\begingroup$ liona, you can edit your question and add the boundary conditions there, which is much better than putting them in comments. $\endgroup$ – David Ketcheson Feb 26 '12 at 7:32
9
$\begingroup$

You may want to look into summation-by-parts (SBP) finite difference methods. Ken Mattsson has done a lot of work on these methods. Good place to start is here (constant coefficients) and here (variable coefficients).

Basically the way these methods work is they are the standard central methods in the interior and transition to one sided near the boundary. An important part of the SBP technology, is that the transition to one-sided is such that stability of the method for time dependent problems can be proven even after the inclusion of boundary conditions. (This is possible because the operators themselves "define" a norm, which mimics discretely integration by parts.)

You say that you are looking at Poisson's equation, I am not totally sure how boundary conditions are stably included with SBP operators and elliptic equations. I have a colleague who has played with these for elliptic problems and seems to indicate it doesn't really matter what you do.

$\endgroup$
8
$\begingroup$

There are other stencils that you can use to obtain a high order accuracy near the boundary points. Your current stencil is of the form:

$Au_{i+2,j} + Bu_{i+1,j} + Cu_{i,j}+Du_{i-1,j}+Eu_{i-2,j}$

But, you can also use a different stencil near the boundary like this:

$Au_{i+3,j} + Bu_{i+2,j}+Cu_{i+1,j}+Du_{i,j} +Eu_{i-1,j}$

to compute the value at $u_{1,1}$. Note that the coefficients in the second stencil will be different from the ones in the first formula.

Similarly, you can approximate the value at the opposite boundary by a similar formula.

$\endgroup$
  • $\begingroup$ Thank you for your answer, however how I can compute the value at $u_{1,1}$ when I use only one type of difference approximation method? (i.e. Can it be correct that it is used different approximation types in different places?) $\endgroup$ – liona Feb 25 '12 at 19:55
  • $\begingroup$ How can I obtain the coefficients? $\endgroup$ – liona Feb 26 '12 at 7:10
  • 2
    $\begingroup$ To understand how to derive finite difference formulas, a good reference is Chapter 1 of Leveque's book: faculty.washington.edu/rjl/fdmbook. It amounts to Taylor series and a bit of algebra. $\endgroup$ – David Ketcheson Feb 26 '12 at 7:32
  • $\begingroup$ @liona: Yes, you can use different approximation formulas at different locations... Generally, it is more important to ensure that all of your formulas adhere to the order of truncation that you desire. That is, if you want your numerical solution to be of order $O(h^2)$, then all of your finite difference approximations must also have a truncation error of $O(h^2)$ $\endgroup$ – Paul Feb 26 '12 at 17:01
  • $\begingroup$ @liona: The book that David Ketcheson is referring to is one of the best books on the subject of finite difference method (in my honest opinion). As he states, we simply need to sum the taylor expansions for the expressions $AU(x+h)$, $BU(x)$, $CU(x-h)$, $DU(x-2h)$, and $EU(x-3h)$. Then, ensure that all the coefficients of the second derivative terms $U_{xx}$ sum to 1, and as many other terms as possible sum to zero. $\endgroup$ – Paul Feb 26 '12 at 17:06
-4
$\begingroup$

please see my fdm paper which you can locate in researchgate under my name david Edwards jr. if you have questions I would be glad to help.

david

$\endgroup$
  • 2
    $\begingroup$ Simply giving instructions for people to search elsewhere is not a useful answer. At a minimum, you should provide a summary of the answer here and provide a link to more details. Furthermore, many of us disagree with the way ResearchGate is run and therefore avoid all interactions with that site, making it impossible to see your paper with your suggested method. $\endgroup$ – Doug Lipinski Jul 12 '15 at 14:24
  • $\begingroup$ Please revise your answer to include a summary of whatever background you think is needed to answer the question. Answers are meant to be relatively self-contained; referring a reader to search for one's paper is not self-contained, and is far less helpful than providing a summary of its contents. $\endgroup$ – Geoff Oxberry Jul 12 '15 at 16:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.