Hi Yicheng,
Thanks for your email.
There was a bug with the 2D scalar adjoint equations, which have been fixed recently - the latest commit (e7eb4f43)in master.
Can we check if the adjoint solver you ran was compiled with the latest commit?
I'm not sure if this would help but could you try specifying EVARS="u v c1 p" for each <E VAR> under the body-forcing function?
Cheers,Chi Hin
From: nektar-users-bounces@imperial.ac.uk <nektar-users-bounces@imperial.ac.uk> on behalf of Yicheng Cao <yichengc2@student.unimelb.edu.au>
Sent: 14 February 2023 06:47
To: nektar-users <nektar-users@imperial.ac.uk>
Subject: [Nektar-users] Adjoint stability of Rayleigh Benard Posillue Flow
This email from yichengc2@student.unimelb.edu.au originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list to disable email stamping for this address.
Hi Nektar-users,
I am doing stability analysis on the 2D Rayleigh Benard Posillue (RBP) Flow. I am using the Boussinesq approximation as the buoyancy force. I get the correct eigenvalue for the direct mode. However, when I change the EvolutionOperator to Adjoint, I cannot get the correct eigenvalue.
Here are some details, since the Adjoint LNS equation is different from Direct LNS (Adj LNS and Dir LNS equation are attached in the figure for your convenience). The body force for the Direct LNS in v-mom is const*c1 (c1 is the scalar). But in Adjoint LNS, there is a new term (const*v) in the scalar equation. So the body forces need to be modified as,
<FUNCTION NAME="BodyForce">
<E VAR="u" VALUE="0" />
<E VAR="v" VALUE="0" />
<E VAR="c1" VALUE="const*v" EVARS="v" /></FUNCTION>
I am wondering if I can put it into the scalar equation (c1) as the above function. Or any idea is welcome.
Thank you for your timeYoursYicheng