ME 523

Numerical Solutions Applied To Heat Transfer And Fluid Mechanics Problems

Numerical Evaluation of Jacobians

Any set of finite difference, finite volume, or finite element equations is just a set of coupled nonlinear equations, that can be abbreviated as:


We perform a Taylor series expansion about the latest approximation to the solution, and assume that the difference between the true solution and the last approximation is very small.  This means that the jth component of the vector function can be expressed as:


Back to vector notation, we get:




The biggest piece of work is coming up with the elements of the Jacobian Matrix J.  There are several possible approaches:

  1. Work out all of the analytic derivatives and code them by hand;
  2. Enter the components of the vector function into Mathematica or Maple and let it calculate the derivatives, and generate computer code for you;
  3. Use the an automatic differentiation program such as ADIFOR to differentiate your functions and generate the Fortran for the Jacobian;
  4. Numerically evaluate the elements of the Jacobian



When you are creating a solution procedure from scratch, you should implement two of the above to cross check your work.  Programming errors in Jacobian elements are very difficult to detect, since they may only slow, not prevent, convergence of the Newton iteration.  In practice some  combination of the first and fourth options will be most efficient.

Other Lectures / Home

Maintained by John Mahaffy :