navier_stokes test initialisation and sensitivity

Asked by James Maddison

The navier_stokes test is initialised with:
    u0 = Function(ic, name="Velocity")
and then the model immediately starts timestepping. Later a sensitivity to the initial condition is computed:
    m = InitialConditionParameter(soln)
    ...
    rf = ReducedFunctional(J, m)
    dJdm = rf.derative(forget=None)[0]
Should the model be initialised with a pressure projection, so that the velocity used on the first timestep is incompressible? That will then give a different sensitivity (but an identical forward run).

Question information

Language:
English Edit question
Status:
Solved
For:
dolfin-adjoint Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Patrick Farrell (pefarrell) said :
#1

Yes, that's probably right. (It doesn't make sense to start such schemes with nonsolenoidal velocities, after all.) I hadn't thought of that when I took the navier_stokes demo from DOLFIN and adjoined it. Patches welcome :-)

Revision history for this message
Launchpad Janitor (janitor) said :
#2

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
James Maddison (jamesmadd) said :
#3

Fixed in revision 757.