In the provided research, the design of CHE (Compact Heat Exchanger) is evaluated and discussed from the heat transfer aspect. Benefiting from present equations and considering the objective concepts, the procedural chart is proposed for achieving optimal design. The main goal of this research study is implementing a new algorithm for optimization to modify a conventional design of CHE. Nonlinear gradient mathematical modeling with different scenarios on free or related variables is developed to cover the purpose of maximizing total heat transfer capacity. By mathematical programming analysis, a model has been provided for optimal design and developed in the GAMS (Generalized Algebraic Modelling System) software. Also for further model test rig development purpose, the proposed model has been incorporated in Matlab software using independent variants and the accuracy of the responses was again evaluated. The comparison indicated 109W/K difference in the exchanged thermal energy rate compared to the optimal exchanger operation conditions. After introducing case study to this model, an acceptable response with 0.997W/K difference on optimal point was achieved. Solving the model indicated 0.833W/K difference with the optimal point, which confirms the resulted technical responses.