A gas-oil reservoir model by Galerkin's method