I am working on a mass diffusion problem within a porous medium with time- and space-varying porosity (epsilon) and apparent diffusion coefficient (D*).
That is, epsilon and D* are both fn(x, y, z, t)
For the general three-dimensional case, my best guess for the accurate diffusion equation is:
d (epsilon *C)/d t = div [ D* [ div (epsilon C)],
where the concentration C is defined in the porous space only.
But I also saw from some literature that wrote the mass diffusion equation as
d (epsilon *C)/d t = div [ epsilon* x D* (div C)].
I am pretty sure that porosity (epsilon) should be included within the time derivative at the left hand side. But I am not sure about the location of epsilon at the right hand side of the equation. It all depends on how you define the diffusion flux J:
J = epsilon x D* x div C
or
J = D* x div (epsilon C),
you might get different answers. This is important because different mass governing equation may lead to different simulation results, since porosity (epsilon) now is a function of space. I wonder if someone can help me and share some thoughts with me on this issue.