- **Main CFD Forum**
(*http://www.cfd-online.com/Forums/main/*)

- - **Q: Numerical Treatment on Cross-derivatives ?
**
(*http://www.cfd-online.com/Forums/main/5236-q-numerical-treatment-cross-derivatives.html*)

Q: Numerical Treatment on Cross-derivatives ?
Hi, friends:
I got a question on cross-derivative treatment for a 2-D horziontal weakly nonlinear shallow water equation model. Basically the equation being: Continuity: eta_t + h*u_x + h*v_y=0 (*) where eta is the ocean surface elevation, h is water depth. X-momentum: u_t +u_xxt+v_yxt+u_yxt+v_yyt = f(x,y,t) Y-momentum: v_t +v_yyt+u_xyt+v_xyt+v_xxt = g(x,y,t) I'm using a predictor -corrector scheme to solve them. When solve the x momentum equation, all the cross derivative terms and v stuff are moved to rhs: u_t+u_xxt= f(x,y,t)-v_yxt-v_yyt-u_yxt =F(x,y,t) and define u+u_xx=U, so the upper equation becomes U_t =F (**) Similarly,when solve the y momentum equation, all the derivative terms and u starff are moved to rhs: v_t+v_yyt =g(x,y,t)-u_xyt-u_xxt-v_xyt =G(x,y,t) i.e. U_t=(u+u_xx)_t =G(x,y,t) (***) Finit Difference Method is used. Firstly 3 time levels of F(x,y,t) are calcualted, to predict U at n+1 level, and then solve U=u+u_xx by tridiagonal method to get u(x,y,t) Then 3 time levels of G(x,y,t) are calcualted to predict V at n+1 level and then solve for v(x,y,t). The precedure is iterated since source f,g are nonlinear. The code works pretty well, except one thing: the biggest iteration error comes out from the cross-derivative term v_yxt in x-momentum eqn and u_xyt in y-momentum equation. It take much more iteration steps when these terms are at present. It's a 2-D code. I'm runing it for a 1-D test case, basically v~=0, but in the code, I cann't make v exactly zero when solve y-momentum equation because of numerical rounding, so I get v_xyt very small but not zero and this feeds back to x-momentum equation. That is the cross derivative term transfers error back and forth between the x and y equation. I wonder if my treatment of them is okay or not. Is there a better way? I'm getting mad on it ... Thanks, if you point me an idea, I'm gonna buy pizza for you! |

Re: Q: Numerical Treatment on Cross-derivatives ?
Oops, one typo in equation (***) should be:
V_t=(v+v_yy)_t=G(x,y,t) (***) wen |

All times are GMT -4. The time now is 21:44. |