A numerical simulation of the nonlinear optical and thermal response of a material is described. The code is divided into preprocessor, simulation and postprocessing functions. The simulation function is a transient, three dimensional, finite difference algorithm which describes the thermal response and the optical phase change that occurs due to 3rd order nonlinearity and thermal effects. Irradiance changes due to linear and nonlinear absorption mechanisms are included in the code. In the postprocessing function a Gaussian beam decomposition technique is used to calculate the irradiance and transmitted power at a far field location and the temperature time response of the material. Examples of using the code to simulate Z-scan experiments are presented and compared to those reported in the literature. Results are presented that demonstrate that the code can be used as a tool to investigate using thermal transport mechanisms to modify the nonlinear optical response of the material. Limitations of the code are discussed.