Heat and mass transfer effects on a viscous fluid in flow regions with expanding or contracting porous walls