Boundary geometric control of a counter-current heat exchanger