Automatic Differentiation - for CFD
Automatic Differentiation (AD) deals with differentiating a single / multi variable function w.r.t a set of independent parameters. Simply, its a package which differentiates a function, and function is given by a piece of code.
This is particularly helpful in CFD in the case of implicit algorithms, where the Flux Jacobian is required. Of course, there are other ways of computing the Jacobian, like Numerical Differentiation, but it is computationally very expensive.
We think TAPENADE package (and even MATLAB - Symbolic toolbox) is a good place to start in AD. The package takes the function, its dependent and independent variables and gives the differential (a slope - in case of single variable and Jacobian - in case of multi-variable function).
As an example, the process of deriving the analytical flux Jacobians for the Roe flux formulation is tedious and may result in incorrect evaluation of the Jacobians. An efficient alternative to avoid both hand-derived Jacobians and computationally expensive finite-difference evaluation or Numerical differentiation of the Jacobians, is to generate the flux Jacobians using automatic-differentiation. Auto-differentiation uses the chain-rule to calculate the derivative of a function, in this case the flux formulation. In this method the flux formulation is passed as a differentiable function to the auto-differentiation package (TAPENADE). This generates the analytical expressions of the flux Jacobians.
Alternative info, obviously on AD on Wiki
TAPENADE Documentation
0 comments:
Post a Comment