We have seen the equations. Now we need to discretize them, by means of the final element discretization, again we use Galerkin's procedures and come up with the linear momentum balance equation, then we have the two mass balance equations for gas and water.
The system of equation is non-linear, is non-symmetric and is coupled, because we have orthodiagonal matrix. We can collect this matrix in ipomatrixes and can obtain and write a system of equations in a concise form.