I'd like to model the fluid flow through a porous medium using finite differences. Since I am new to this numerical technique, I have a simple question.
I use the following set of equations to calculate the change in water volume or porosity over time.
$$q_x = K \frac{dP}{dx}$$
$$q_y = K \left(\frac{dP}{dy} + \varphi g\right)$$
$$\frac{d\phi}{dt} = \frac{q_x}{dx} + \frac{q_y}{dy} $$
where $K$, $P$, $g$, $q$, $\varphi$, $\phi$ are a constant, pressure, gravity, flow velocity, fluid density and porosity.
I know how to solve the groundwater flow equation for fluid flow along the x-axis:
$$\frac{d\phi_{i,j}}{dt} = K \frac{P_{i-1,j} - 2P_{i,j} + P_{i+1,j}}{dx^2 } + ??? $$
But how do I incorporate the gravity term for fluid flow along the y-axis? Would this be the correct solution? $$\frac{d\phi_{i,j}}{dt} = K \frac{P_{i-1,j} - 2P_{i,j} + P_{i+1,j}}{dx^2 } + K \frac{P_{i,j-1} - 2P_{i,j} + P_{i,j+1} + \varphi g}{dy^2} $$