Numerical boundary conditions for wide approximation finite difference

In summary, the conversation discusses the use of a wide 5 point stencil to solve a problem with fourth order accuracy. The main focus is on implementing numerical boundary conditions for ##U-1## and ##UN+1##. One suggestion is to use an unsymmetrical fourth order approximation for ##u''_1## and ##u''_{N-1}## in terms of ##u_0, u_1, u_2, u_3, u_4##, which eliminates the need for ##u_{-1}## and ##u_{N+1}##. However, the speaker has been instructed to use ##U-1## and ##UN+1##, so they suggest making finite difference
  • #1
amalak
7
0
Hi,

I have to use a wide 5 point stencil to solve a problem to fourth order accuracy. In particular, the one I'm using is:

u'' = -f(x + 2h) + 16f(x + h) - 30f(x) + 16f(x - h) - f(x - 2h) / 12h2

or when discretized

u'' = -Uj-2 + 16Uj-1 -30Uj + 16Uj+1 -Uj+2 / 12h2

In addition to dirichlet boundary conditions (which are not troubling me to implement), I have to implement numerical boundary conditions for

U-1 and UN+1

The problem I'm encountering is I'm not sure what to try for these numerical boundary conditions (as in, I haven't a clue as to what may work). I have the scheme set up without those conditions, but that's not what I want. The only time I know U-1 and UN+1 come up are with Neumann boundary conditions, which I don't have.

Any help or pointers would be immensely appreciated, thank you.
 
Physics news on Phys.org
  • #3
Thank you very much for your response. That method seems to make more sense, I think, but I've been instructed to use U-1 and UN+1, but thank you again.
 
  • #4
OK, so they probably want your numerical solution satisfy the differential equation at the boundary points ##u_0## and ##u_N##, not just to satisfy the Dirichlet boundary conditions at the boundary points.

So, make finite difference approximations for the derivatives at ##u_0## using ##u_{-1}, u_0,. u_1, \dots## and plug them into the differential equation, and similarly at ##u_N##. That will give you two more equations, so you have enough equations to solve for ##u_{-1}, u_0,\dots, u_N, u_{N+1}##.
 
  • #5


Dear researcher,

Thank you for sharing your work on using a wide 5 point stencil to solve a problem to fourth order accuracy. It seems like you have a well-defined mathematical approach to your problem, and I appreciate your attention to detail in ensuring accuracy.

In regards to your question about the numerical boundary conditions for U-1 and UN+1, I would suggest looking into using a ghost point approach. This involves extending your domain beyond the physical boundaries and using the values at these ghost points to approximate the values at the boundary points. This method has been used successfully in many numerical schemes and may be applicable in your case as well.

Another approach you could consider is using a higher order approximation scheme at the boundary points. This could involve using a wider stencil or incorporating additional terms in your finite difference equation to account for the boundary conditions.

I hope these suggestions are helpful in guiding you towards finding a suitable solution for your numerical boundary conditions. Keep up the good work and best of luck with your research!
 

1. What are numerical boundary conditions for wide approximation finite difference?

Numerical boundary conditions for wide approximation finite difference refer to the set of conditions that must be applied at the boundaries of a finite difference approximation in order to accurately model the behavior of a numerical solution to a differential equation.

2. Why are numerical boundary conditions important in wide approximation finite difference?

Numerical boundary conditions are crucial in wide approximation finite difference because they help to ensure that the finite difference approximation accurately captures the behavior of the underlying differential equation. Without proper boundary conditions, the solution may not accurately represent the physical system being modeled.

3. How are numerical boundary conditions determined in wide approximation finite difference?

Numerical boundary conditions can be determined through a variety of methods, including using known analytical solutions, applying physical principles, or using experimental data. The choice of boundary conditions will depend on the specific problem being solved.

4. Can numerical boundary conditions be applied to any type of differential equation?

While numerical boundary conditions are commonly used in wide approximation finite difference for solving differential equations, they may not be applicable to all types of equations. Some equations may require different types of boundary conditions or may not require them at all.

5. What happens if numerical boundary conditions are not properly applied in wide approximation finite difference?

If numerical boundary conditions are not accurately applied, the resulting finite difference approximation may produce incorrect or unstable solutions. Therefore, it is important to carefully consider and properly apply the appropriate boundary conditions for a given problem.

Similar threads

  • Differential Equations
Replies
22
Views
2K
Replies
17
Views
2K
Replies
5
Views
674
Replies
4
Views
866
  • Advanced Physics Homework Help
Replies
5
Views
1K
Replies
4
Views
762
Replies
3
Views
1K
  • Programming and Computer Science
Replies
1
Views
963
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
3K
Back
Top