Proceedings, Twenty-Seventh Workshop on Geothermal Reservoir Engineering
Stanford University, Stanford, California, January 28-30, 2002

Application of Automatic Differentiation for the simulation of nonisothermal, multiphase flow in geothermal reservoirs

Jong G. Kima and Stefan Finsterleb

a Argonne National Laboratory
Argonne, IL 60439

b Lawrence Berkeley National Laboratory, Earth Sciences Division
University of California, Berkeley, CA 94720

Abstract. Simulation of nonisothermal, multiphase flow through fractured geothermal reservoirs involves the solution of a system of strongly nonlinear algebraic equations. The Newton-Raphson method used to solve such a nonlinear system of equations requires the evaluation of a Jacobian matrix. In this paper we discuss automatic differentiation (AD) as a method for analytically computing the Jacobian matrix of derivatives. Robustness and efficiency of the AD-generated derivative codes are compared with a conventional derivative computation approach based on first-order finite differences.