Heat equation for porous nanostructures filled by a fluid flow