mdolab / dafoam

DAFoam: Discrete Adjoint with OpenFOAM for High-fidelity Multidisciplinary Design Optimization

Home Page:https://dafoam.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to transfer psi_ adjoint vector to adjoint variables Ua Pa Phia nuTilda_a

nuaawqf opened this issue · comments

Hi Ping He:
I want to make a comparison between the dafoam and my continuous adjoint solver. So I want to display the adjoint variables such as adjoint velocity, adjoint pressure, adjoint flux and adjoint turbulent viscosity.
I think the psi_ (adjoint vector) is the combination of the adjoint variables in the code. May I know how to restore them into adjoint fields in OpenFOAM format?

%Vec Object: 2 MPI processes
% type: mpi
Vec_0x2430d10_5 = [
2.3408021501763571e-10
-4.0155779102974452e-10
-2.2986008393808899e-13
-6.0818491560728194e-09
-1.4040886658018889e-07
2.6810842584837121e-08
-2.3629970887731813e-07
1.4979062944125512e-11
1.4978624960477857e-11
-3.1721950201180557e-06
......
];

I not sure about the list order of cells and faces variables. The magnitude seems much less than I expected. Should I multiply them with the scaling factors?

Thanks,
Qifeng

Please see the updated docs.