A MATLAB program was developed to simulate urethane-forming reactions by solving over a dozen differential equations, energy balance, mass balance, and constitutive equations simultaneously. The simulation program was developed for half a decade to simulate the basic kinetics of polyurethane reactions and more complex phenomena that cannot be obtained in laboratories. In the current investigation, the simulation is applied to determine the limits of the performance of polyurethane foam formation. n-pentane, cyclohexane, and methyl formate were used as physical blowing agents, and water was used as a chemical blowing agent. The simulation code increases the accuracy of the results and makes the foam performance process less time- and money-consuming. Specifically, the MATLAB code was developed to study the impact of physical and chemical blowing agents at different loadings on the performance of rigid polyurethane foams. Experimental data were used to validate the simulation results, including temperature profiles, height profiles, and the tack-free time of urethane foam reactions. The simulation results provide a window for the proper type and the optimum amount range of different physical and chemical blowing agents.