The are usually several ways of solving a problem. I added a method to those Belfiore had shown for the co current problem in an earlier posting. In the attached file, I show four ways of modeling a counter current heat exchanger (without boiling or condensing). One method obtains only the exit temperatures of the two streams. Three methods show how to compute the temperature profiles.
The Exit Temperature method is actually the same as a method I showed for the co current problem. It solves the set of equations and constraints for a system of algebraic equations. Only the temperatures in the "exchanged heat" equation needed changing.
The results from the Exit Temperature method are then used in the polynomial and the eigenvector methods for calculating the temperature profiles. The third profile method is numerical integration. The integration of the two point boundary value problem was easily handled by the Odesolve routine in Mathcad. However, I could not make this routine solve in a parametric manner. The problem appeared to be due to the multiple dependent variables. Mathcad has other ODE solvers that would might work but they would have the same time disadvantage as shown in the file.
If temperature profiles need to be calculated repeatedly as other variables in the system change, then the combination of the Exit Temperature and the eigenvector methods appear to be the best choice. The manual selection of the collocation points for the polynomial method mentioned in the file needs to be performed as the flow rates or heat capacities change. This is a drawback for the polynomial method.
As I was developing this example, I actually thought of other ways of writing the equations, but the solution methods were not changed. Those other ways were just different means of writing the equations using linear algebra. For example, the differential equations could be written as shown below.
This form may be easier for other readers to understand because it keeps the flow rate and heat capacity with the derivative. It also shows more explicitly that the right hand side involves a temperature difference. This form is applicable to the polynomial method only. If Odesolve could handle vector dependent variables, this form would then work for it also.
As I have gained more experience with Mathcad, I find that my earlier work, although correct, could be simplified for easier computation or easier understanding by the reader. The latter factor can be very important for good peer review.