Entransy dissipation minimization for generalized heat exchange processes