Heat exchangers with shells and tubes are widely employed in the chemical, power generating, and petroleum refining industries. A three-dimensional simulation of a shell and tube heat exchanger with segmental baffles was performed in this paper. The research involves the use of commercial code such as ANSYS CFX, MATLAB, and Solid-Work, which incorporate modeling, meshing, and the use of finite element techniques to produce numerical results. The results have been achieved in transient situations. The purpose of this paper is to optimize and analyze temperature drops, pressure drops in side shells and tubes, stream-by-stream velocities, and parametric investigations such as the number of baffles, the distance between baffles, and the number of passes using the ANSYS program. The pressure drop that has been addressed shows that raising the baffle cut and reducing the baffle spacing have opposite impacts on the pressure drop. In many cases, the pressure drop on the shell and tube sidewalls was investigated as well. Pressure drop has been investigated in terms of the number of baffles, the gap between baffles, and the number of passes.