  Porous and heterogeneous materials are found in many applications from
composites, membranes, chemical reactors, and other engineered materials to
biological matter and natural subsurface structures. In this work we propose an
integrated approach to generate, study and upscale transport equations in
random and periodic porous structures. The geometry generation is based on
random algorithms or ballistic deposition. In particular, a new algorithm is
proposed to generate random packings of ellipsoids with random orientation and
tunable porosity and connectivity. The porous structure is then meshed using
locally refined Cartesian-based or unstructured strategies. Transport equations
are thus solved in a finite-volume formulation with quasi-periodic boundary
conditions to simplify the upscaling problem by solving simple closure problems
consistent with the classical theory of homogenisation for linear
advection-diffusion-reaction operators. Existing simulation codes are extended
with novel developments and integrated to produce a fully open-source
simulation pipeline. A showcase of a few interesting three-dimensional
applications of these computational approaches is then presented. Firstly,
convergence properties and the transport and dispersion properties of a
periodic arrangement of spheres are studied. Then, heat transfer problems are
considered in a pipe with layers of deposited particles of different heights,
and in heterogeneous anisotropic materials.
