SUMMARYThe aim of the paper is to study the asymptotic behaviour of solutions of second-order elliptic and parabolic equations, arising in modelling of flow in cavernous porous media, in a domain ε weakly connected by a system of traps P ε , where ε is the parameter that characterizes the scale of the microstructure. Namely, we consider a strongly perforated domain2 are non-intersecting subdomains strongly connected with respect to , P ε is a system of traps and meas W ε → 0 as ε → 0. Without any periodicity assumption, for a large range of perforated media and by means of variational homogenization, we find the homogenized models. The effective coefficients are described in terms of local energy characteristics of the domain ε associated with the problem under consideration. The resulting homogenized problem in the parabolic case is a vector model with memory terms. An example is presented to illustrate the methodology.