I concentrate on the two-phase flow in the porous media recently. I want to calculate the relative permeability, and found using Darcy’s law to calculate the permeability,but confuse about the pressure gradient in the equation. the pressure gradient equal to the capillary pressure minus pressure for gas if we want to calculate the relative permeability for water. and also how to calculate the capillary pressure?

can you give me a help to understand or recommend some useful paper that talk about these question.

The capillary pressure is the difference of pressure in the two phases you are computing or, in other terms, the pressure drop at the interface. Basically, the relative permeability is computed as the permeability of only the wetting phase under consideration of saturation (due to non-wetting phase).

You may find some hints in this paper and in the references therein:

Ahrenholz et al., Prediction of capillary hysteresis in a porous material using lattice-Boltzmann methods and comparison to experimental data and a morphological pore network model, Advances in Water Resources, Volume 31, Issue 9, September 2008, Pages 1151-1173