Computing end-points using the Neumann condition

Click For Summary
SUMMARY

The discussion focuses on computing end-points using the Neumann condition in the context of finite volume schemes. The author proposes a method for approximating the derivative f'(0) based on known values at specific points, leading to a derived equation for f'(x). By equating coefficients from the Taylor series expansion, the values of coefficients a, b, and c are determined as a = -8/(3h), b = 3/h, and c = -1/(3h). The approach is validated with a precision of 10^{-4}\% and emphasizes the importance of not using the same symbol for different meanings in mathematical expressions.

PREREQUISITES
  • Understanding of Neumann boundary conditions in differential equations
  • Familiarity with Taylor series expansions
  • Knowledge of finite volume methods in numerical analysis
  • Experience with ODE solvers, specifically ODE15s in MATLAB
NEXT STEPS
  • Study the implementation of finite volume schemes in computational fluid dynamics
  • Learn about the method of lines for converting PDEs to ODEs
  • Explore advanced applications of Taylor series in numerical methods
  • Investigate the use of MATLAB's ODE15s for solving stiff ODEs
USEFUL FOR

Mathematicians, numerical analysts, and engineers involved in computational modeling and simulation, particularly those working with boundary value problems and numerical methods for differential equations.

hunt_mat
Homework Helper
Messages
1,816
Reaction score
33
TL;DR
How do I compute boundary values from a Neumann condition?
Suppose I have a boundary condition f'(0)=a. I know the value of f(x) at x=h/2,3h/2. Does it make sense to write:
<br /> f&#039;(x)=af(x)+bf(x+h/2)+cf(x+3h/2)<br />
Using Taylor series to expand, we obtain the following:
<br /> f&#039;(x)=(a+b+c)f(x)+\frac{h}{2}(b+3c)f&#039;(x)+\frac{h^{2}}{8}(b+9c)f&#039;&#039;(x)<br />
By equating coefficients, we obtain the following set of linear equations for a,b and c:
<br /> a+b+c=0,\quad b+3c=\frac{2}{h},\quad b+9c=0<br />
The solution of which is:
<br /> a=-\frac{8}{3h},\quad b=\frac{3}{h},\quad c=-\frac{1}{3h}<br />
making:
<br /> f&#039;(x)=-\frac{8}{3h}f(x)+\frac{3}{h}f(x+h/2)-\frac{1}{3h}f(x+3h/2) <br />
Using the above equation, it is possible to obtain:
<br /> f(0)=\frac{3h}{8}\left(-a+\frac{3}{h}f(h/2)-\frac{1}{3h}f(3h/2)\right)<br />
Is this a reasonable approach? I've tested it with a few functions and it appears to be accurate to 10^{-4}\%
 
Physics news on Phys.org
You are using a as both the known value of f&#039;(0) and as the coefficient of f(0) in your approximation to f&#039;(0). Please don't use the same symbol to mean two different things!

Generally one would treat f(0) as one of the unknowns, but instead of enforcing the DE at this point one instead requires that the appropriate one-sided approximation to the derivative should equal the prescribed value of the derivative on the boundary. In an explicit time-marching scheme this reduces to your given expression.
 
This is part of finite volume scheme, and I'm reducing the set of PDEs into a set of ODEs, a method of lines approach, and then I'm using ODE15s. So I'm converting averages within cells to values on the cell boundary.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K