hello. i just read a paper about modelling clouds, and im implementing it’s algorithm. in order to do that, i need the discrete form of W = grad(divU), where U is the velocity vector. so, in the paper, the x component of W is presented, and it is noted that the y and z are computed in a similiar way, so i sat and wrote the equations, and ended up with a slightly different solution, so maybe im wrong, or maybe there is a mistake in the paper. so if you can take a look at that-
my solution -
Wx = 1/4[Ux(x+2,y,z)+Ux(x-2,y,z)-2Ux(x,y,z)]
+ 1/4[Uy(x+1,y+1,z)+Uy(x-1,y-1,z)-Uy(x-1,y+1,z)-Uy(x+1,y-1,z)+Uz(x+1,y,z+1)+Uz(x-1,y,z-1)-Uz(x-1,y,z+1)-Uz(x+1,y,z-1)].
the papers solution, the second term is identical-
Wx = 1/2[Ux(x+1,y,z)+Ux(x-1,y,z)-2Ux(x,y,z)]
+ 1/4[Uy(x+1,y+1,z)+Uy(x-1,y-1,z)-Uy(x-1,y+1,z)-Uy(x+1,y-1,z)+Uz(x+1,y,z+1)+Uz(x-1,y,z-1)-Uz(x-1,y,z+1)-Uz(x+1,y,z-1)].
my question is who is right and what should be Wy,Wz?
i will appriciate any answer, thnx.