Modeling nonlinear moisture diffusion in inhomogeneous media