# [petsc-users] about FD Jacobian for the new DAE solver

Li, Zhisong (lizs) lizs at mail.uc.edu
Thu Apr 29 17:28:39 CDT 2010

```Hi, Jed,

Thank you for your quick response.

but I don't understand why you said it's easy here. My professor got stuck on this problem:

>>It's pretty easy to code an analytic Jacobian for incompressible
>>Navier-Stokes since it's only a quadratic nonlinearity.  But

I wonder if you mean the finite element method here. I am only planning FDM or FVM for my work. Actually we don't have any polynomial in incompressible N-S equations.

>From my understanding from ts/ex8, for example, the continuity equation with pressure term: F = d(p)/dt+ d(u)/dx+d(v)/dy,  we need to compute J[0][0] = d(F)/d(p), J[1][0] = d(F)/d(u) and J[2][0] = d(F)/d(v).  I speculate they are J[0][0] = 1/delta_t, J[1][0] = 1/delta_x and J[2][0] = 1/delta_y. Is this correct? And d(Lap(u))/d(u) might be more difficult.

This is not much about PETSc, but I hope you can still give me some help or suggest a book/ paper on this.

Thank you very much.

Zhisong Li
```