Numerical Analysis of Thermal Energy Flow and Substance Migration in a Doman Partially Occupied by Permeable Structures