implementation details of the adjoint linearised NSE
Hi everyone, This might be a trivial question but I have some trouble understanding the implementation of the linearised adjoint (incompressible) navier stokes equations in nektar++. From Barkley, Blackburn and Sherwin (2008) it seems to me that the only differences between the direct and adjoint equations, are switched signs for the time derivative (du/dt -> -du/dt) and one of the advective terms ((U nabla) u -> -(U nabla) u). From my understanding the necessary modifications to the existing direct solver are then to modify this advection term and to choose a negative time step to "reverse" the time integration. The modification to the advection term are taken into account in AdjointAdvection.cpp. However, I cannot find any reference in the code where the negative time derivative is considered. In the parameter files for the adjoint cylinder example the time step is as well positive. Am I just missing the respective line of code or are my assumptions wrong? I would really appreciate any insight to help me understand the procedure :) Cheers Simon
Dear SImon, You are correct that there is indeed a minus sign that goes on these terms. In AdjointAdvevtion.cpp:146 there is a call to Math::Neg() which should negate the linearised advection terms. Possibly it is the reference to the Neg call that was masking how it was evaluated? Hope this helps. Regards, Spencer.
On 25 Sep 2019, at 15:38, Simon Schmidt <schmidt.simon01@gmail.com> wrote:
Hi everyone,
This might be a trivial question but I have some trouble understanding the implementation of the linearised adjoint (incompressible) navier stokes equations in nektar++. From Barkley, Blackburn and Sherwin (2008) it seems to me that the only differences between the direct and adjoint equations, are switched signs for the time derivative (du/dt -> -du/dt) and one of the advective terms ((U nabla) u -> -(U nabla) u). From my understanding the necessary modifications to the existing direct solver are then to modify this advection term and to choose a negative time step to "reverse" the time integration. The modification to the advection term are taken into account in AdjointAdvection.cpp. However, I cannot find any reference in the code where the negative time derivative is considered. In the parameter files for the adjoint cylinder example the time step is as well positive. Am I just missing the respective line of code or are my assumptions wrong? I would really appreciate any insight to help me understand the procedure :)
Cheers
Simon _______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
Spencer Sherwin FREng, FRAeS Head, Aerodynamics, Director of Research Computing Service, Professor of Computational Fluid Mechanics, Department of Aeronautics, s.sherwin@imperial.ac.uk South Kensington Campus, Phone: +44 (0)20 7594 5052 Imperial College London, Fax: +44 (0)20 7594 1974 London, SW7 2AZ, UK http://www.imperial.ac.uk/people/s.sherwin/
participants (2)
- 
                
                Sherwin, Spencer J
- 
                
                Simon Schmidt