[Nek5000-users] Clarification on Adjoint solver

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Sat Feb 6 12:15:14 CST 2016


Hi Saleh,

There is no easily accessible implementation for this, one has to do the change of the velocities himself. In fact we have ongoing work on this and once we are done I guess we can share it.
What kind of case are you looking at, long time horizons are quite tricky to handle. We can take this conversation off the mailing list if needed.

Oana



________________________________________
From: nek5000-users-bounces at lists.mcs.anl.gov [nek5000-users-bounces at lists.mcs.anl.gov] on behalf of nek5000-users at lists.mcs.anl.gov [nek5000-users at lists.mcs.anl.gov]
Sent: Friday, February 05, 2016 2:15 PM
To: nek5000-users at lists.mcs.anl.gov
Subject: Re: [Nek5000-users] Clarification on Adjoint solver

Adams,

I really appreciate your detailed answer. I definitely clarified the Nek
functionality for adjoint solvers. One question remains is how to
include the velocity of the forward solver into adjoint equations. I
assume this is also the case when you do linear stability analysis with
Nek, since the velocity in convective terms is not completely part of
the solution. Mathematically, my question is:

in $V. \nabla u_a$ term, as the advection, how can we substitute $V$ (as
the forward velocity which is already solved for in a regular NS
solution) in adjoint equations. suppose that the velocity, along with
other quantities are saved in afield out put such as fld.f0000X for X
time-step. So we have access to that velocity but how can we include it
in adjoint equations?

Many thanks again,
Saleh

On 2/2/2016 3:09 AM, nek5000-users at lists.mcs.anl.gov wrote:
> 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
>
> _______________________________________________
> Nek5000-users mailing list
> Nek5000-users at lists.mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users

_______________________________________________
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