Abstract
A general method for computing derivatives of solution fields and other simulation outputs, with respect to arbitrary input quantities, is proposed. The method of automatic differentiation is used to carry out differentiation and propagate derivatives through the simulation code by chain rule, in forward order. An object-oriented approach using the operator overloading and templating features of the C++ programming language is presented. Verification results are given for a plane wall with surface convection, where the derivative of the dimensionless temperature field with respect to the Biot number is computed and compared to an analytical solution. Further results are given for conduction in a composite material with regions of different thermal conductivity. The derivative of the temperature field is computed with respect to the conductivity of one of the phases using the proposed method.