[petsc-users] about FD Jacobian for the new DAE solver
Matthew Knepley
knepley at gmail.com
Thu Apr 29 17:58:44 CDT 2010
On Thu, Apr 29, 2010 at 5:28 PM, Li, Zhisong (lizs) <lizs at mail.uc.edu>wrote:
> 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.
>
The nonlinearity is u \cdot \nabla u, which is quadratic in u.
> >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.
>
The derivative of Lap is just Lap (this is a Frechet derivative). It is
easiest to think of the residual
F as being a function of the coefficients, and then J_{ij} is just the
derivative of F_i with respect to coefficient j.
Matt
> Thank you very much.
>
>
> Zhisong Li
--
What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20100429/523556c3/attachment.htm>
More information about the petsc-users
mailing list