CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   2order discretization (https://www.cfd-online.com/Forums/main/13376-2order-discretization.html)

student April 26, 2007 08:46

2order discretization
 
sir, im new to cfd i just want to know how to apply d2u/dx2 at the boundary. usually we apply du/dx=0 for a fully developed flow at the boundary. inorder to have 2 order accuracy i want to give d2u/dx2 =0 at the boundary please tell.. thanks

Harish April 26, 2007 08:54

Re: 2order discretization
 
d^2u/dx^2=(u_n-2u_n-1+u_n-2)/dx^2 + O(dx)

u_n=2u_n-1 - u_n-2

if this is what you are looking for.

student April 26, 2007 08:56

Re: 2order discretization
 
thank you very much

Mani April 26, 2007 09:40

Re: 2order discretization
 
Maybe we should point out what it is that we are doing here. The centered finite difference of the second-order derivative at n-1 is

(u_n -2u_n-1 +u_n-2)/dx^2

and Harish's approach to use the same term for the boundary (n) amounts to a zeroth-order extrapolation of the second derivative (in other words, you assume a zero third-order derivative). Now that you know where it comes from, you can probably come up with alternative methods. You have to use some sort of extrapolation, unless you know the conditions beyond the boundary. However, if you do know these conditions, you ought to make use of them.

student April 29, 2007 09:44

Re: 2order discretization
 
yes mr mani i clearly understand what harish has written. actually im implementing fully developed condition at the exit. so i knw the values at n-1 and n-2. thanks a lot


All times are GMT -4. The time now is 09:07.