[Nek5000-users] Clarification on Adjoint solver

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Tue Feb 2 02:09:35 CST 2016


Hi

The adjoint implementation in nek assumes change of the direction of 
time evolution. The goal is to use the standard nek solver with minimal 
modifications (only advection terms have to be changed). You get these 
equations from you standard one by changing the time and pressure sign 
(t -> -t; p-> -p). This of course changes your time integration limits, 
but it shouldn't be a problem. So when you  have your linear direct 
simulation, to turn it into dual one it is enough to include  in your 
userchk include files ADJOINT and TSTEP, and for ISTEP.eq.0 set 
IFADJOINT to true. Something like:
       subroutine userchk

       include 'SIZE'
       include 'TSTEP'           ! ISTEP
       include 'ADJOINT'            ! IFADJ

       if(ISTEP.eq.0) ADJOINT=.TRUE.

There is no need to modify ###.rea or ###.map files. The only problem 
are boundary conditions for open flows, as they would require 
non-homogeneous bc. In this case to avoid problems we usually use 
sufficiently large domain together with zero Dirichlet bc. The last 
issue is sufficient resolution for both direct and adjoin runs. I hope 
this gives you some idea about nek implementation.
Regards
Adam

On 2016-02-01 22:17, nek5000-users at lists.mcs.anl.gov wrote:
> Hi Neks,
>
> To my knowledge, Nek5000 is able to solve adjoint equations of the form:
> $\partial u_a/\partial t + V.\nabla u_a - u_a.(\nabla V)^T + \nabla 
> \p_a + 1/Re \nabla^2 u_a=0$ and $\nabla.u_a=0$
> where u_a and p_a are adjoint velocity and pressure. (Slightly 
> different formulation may be seen in literature).
>
> Let's assume the forward problem is already solved so that $V$, i.e. 
> velocity, (and possibly $p$ as the pressure) is (are) already know. 
> Thus, the initial and boundary conditions for adjoint NS are also 
> known. How can we now solve the dual/adjoint NS problem with Nek5000? 
> Is there any example on how to modify .rea files? Specailly, the 
> "convection term of $V.\nabla u_a - u_a.(\nabla V)^T$ needs to be 
> modified compared to forward NS but am not sure how.
> My search of mailing list entails some modifications in "perturb.f" 
> subroutine, but a little bit more clarification on that would be 
> really appreciated.
>
> Yours,
> Saleh
> _______________________________________________
> Nek5000-users mailing list
> Nek5000-users at lists.mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users



More information about the Nek5000-users mailing list