Thermodynamic method to two dimensional stagnation flow and heat transfer