Discretization of mixed partial deriatives
Hello,
I need to solve a partial differential equations having mixed 2nd order partial derivatives like d2u/dxdy. How can I discretize it in finite difference form? Is it something like: (u[i+1][j] - u[i+1][j-1] - u[i][j] + u[i][j-1]) / (2*dx*dy). Thanks. |
Re: Discretization of mixed partial deriatives
Nasim,
As you wish a 2nd order discretization, a better scheme (assuming a uniform grid) is derived as follows: U,x|i,j ~ (Ui+1,j - Ui-1,j)/ (2dx) U,xy|i,j ~ (U,x|i,j),y ~ (Ui+1,j+1 - Ui-1,j+1 - Ui+1,j-1 + Ui-1,j-1) / (4*dx*dy) Please verify there are no typos. Rami |
All times are GMT -4. The time now is 19:08. |