So, how do you obtain this equation?
Here we see a microscopic view of such a porous medium, where we have the solid phase, then we have the porous which leads to the gas phase, and the liquid phase and then we may have the absorbed water along the solid phase.
So, what we do. We write a balance equation microscopic level and since we do not attribute the thermodynamic properties to the interfaces we need also jump conditions.
Then we apply averaging operators, in particular we have phase averaging operators, intrinsic phase averaging operators and mass averaging operators for instance these we apply for density, these for velocity, etc.