
[Sponsors] 
February 16, 2011, 09:28 
Adjoint method

#1 
New Member
Join Date: Jul 2009
Posts: 10
Rep Power: 8 
Hi,
Is there anybody who have experiences with the adjoint method to optimise a geometry? I implemented the adjoint equations based on papers and work of C. Othmers: ================================================= tmp<fvVectorMatrix> adUEqn ( ... ); ================================================= I think my problem is in the pressure correction. In all papers that i found they use the simple method and i did it in the same way: ================================================= adp.boundaryField().updateCoeffs(); ... for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { fvScalarMatrix adpEqn ( ... ); ================================================= If I calculated adU there are values with 10^(11) or sometimes 10^(30) near the outletpatch. I think that is not correct Thanks for every comment. Regards, Jens Last edited by Jens; March 14, 2011 at 12:39. 

February 17, 2011, 03:50 

#2 
Senior Member
KarlJohan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 268
Rep Power: 13 
Hi!
I never tried this stuff, but I read somewhat about it earlier... are you sure about those boundary conditions? If I understood correctly, your cost function should come into the BC's for the adjoint eqs (if the cost function is described as a integral function over the domain). Check 'eq' 4448 in C. Othmer, Int. J. Numer. Meth. Fluids 2008; 58:861–877 Regard, K 

February 17, 2011, 08:59 

#3 
Senior Member
David Boger
Join Date: Mar 2009
Location: Penn State Applied Research Laboratory
Posts: 146
Rep Power: 9 
Jens,
Did the equations converge?
__________________
David A. Boger 

February 17, 2011, 09:34 

#4 
New Member
Join Date: Jul 2009
Posts: 10
Rep Power: 8 
Hi,
Thanks for the replies. @Kalle I see your point and you are right, the BC's are one problem to solve and the equations are very sensitive to the BC's but the problem is ... that leads me to @boger No, that is the "main" problem/issue. The normal velocity converge but "adjoint U" dont converge. The problem is, if i print the divergence of adjoint velocity the values are very hight (16.xx or 0.1) but the priority/task of the pressure correction is the divergence of adjoint U is equal to zero. Well, I think the first problem to solve is that the pressure correction solve > div(adjoint U) = 0. Isn't it? The question is, is there a term missing or something else? Regards, Jens 

March 10, 2011, 02:47 

#5 
Senior Member
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 193
Rep Power: 9 
Hi Jens,
Is your pressure equation right? I think the right hand side of this equation is the divergence of the adjoint velocity field. Regards, Fumiya 

March 10, 2011, 08:14 

#6 
Senior Member
David Boger
Join Date: Mar 2009
Location: Penn State Applied Research Laboratory
Posts: 146
Rep Power: 9 
Good point, Fumiya  you're correct!
__________________
David A. Boger 

March 10, 2011, 08:49 

#7 
New Member
Join Date: Jul 2009
Posts: 10
Rep Power: 8 
Thanks for your help and hints.
I got also a few hints by C. Othmer and the problem was the pressure equation. Last edited by Jens; March 14, 2011 at 12:39. 

March 10, 2011, 22:49 

#8 
Senior Member
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 193
Rep Power: 9 
In my calculations, the continuity error of the adjoint velocity field does not drop compared to that of the primal velocity field.
1) Though there may be problems in my code, do the adjoint equations have this tendency? 2) Are the adjoint equations sensitive to the boundary conditions? Do they converge with the same boundary conditions as the primal ones? I would be grateful if you could share findings from your computations with the original solver from Dr. Othmer. Regards, Fumiya 

March 11, 2011, 04:36 

#9  
New Member
Join Date: Jul 2009
Posts: 10
Rep Power: 8 
Quote:
Regards, Jens 

March 12, 2011, 06:55 

#10 
Senior Member
BastiL
Join Date: Mar 2009
Posts: 488
Rep Power: 12 

March 13, 2011, 11:39 

#11  
New Member
Join Date: Jul 2009
Posts: 10
Rep Power: 8 
Quote:
Regards, Jens Last edited by Jens; March 14, 2011 at 12:40. 

March 14, 2011, 22:45 

#12 
Senior Member
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 193
Rep Power: 9 
I would be grateful if you could post contour plots of the adjoint pressure and
velocity fields for a simple duct when the cost function is dissipated power and flow is laminar. I would like to use these data for comparison with my results. I will prepare a case if it could save your work. Regards, Fumiya Last edited by fumiya; March 16, 2011 at 02:12. 

March 16, 2011, 02:52 

#13 
Senior Member
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 193
Rep Power: 9 
I calculated surface sensitivities according to Dr. Othmer's article
when the cost function is dissipated power. In this calculation, outlet boundary conditions are not properly imposed. I have to implement new boundary conditions to obtain more precise results. Regards, Fumiya Last edited by fumiya; March 18, 2011 at 04:11. 

March 18, 2011, 04:11 
SIMPLE algorithm

#14 
Senior Member
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 193
Rep Power: 9 
I'm implementing the adjoint solver in OpenFOAM by myself.
Any comments are appreciated. ***************SIMPLE algorithm*************** /**\ //Momentum predictor step \**/ //Define the equation for adU(adjoint velocity field) tmp<fvVectorMatrix> adUEqn ( fvm::div(phi,adU) //Flux phi is obtained from the primal flow solutions  (fvc::grad(adU) & U) + turbulence>divDevReff(adU) ); //Underrelax(Inertial relaxation) the equation for adU adUEqn().relax(); //Solve the momentum predictor using the last known adp(adjoint pressure field) on the RHS. //This gives us a adjoint velocity field that is "not divergence free", but approximately satisfies momentum. eqnResidual = solve ( adUEqn() == fvc::grad(adp) ).initialResidual(); maxResidual = max(eqnResidual, maxResidual); //Update the boundary conditions for adp adp.boundaryField().updateCoeffs(); /**\ //Pressure solution step(estimate a new pressure field //that satisfies zero adjoint velocity divergence) \**/ To be continued . . . Last edited by fumiya; March 20, 2011 at 12:00. 

June 12, 2011, 21:09 

#15 
Senior Member
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 193
Rep Power: 9 
I have run several cases and found it difficult to obtain a converged
solution. I think it is related to the adjoint transpose convection term. What should I do to improve convergence of the adjoint equations? Best regards, fumiya 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
discretizer  gmshToFoam  Andyjoe  Open Source Meshers: Gmsh, Netgen, CGNS, ...  13  March 14, 2012 05:35 
SQP method for adjoint based aerodynamic shape optimization  cfdbooks  Main CFD Forum  2  May 26, 2009 10:40 
Code for most powerfull FDV Method  D.S.Nasan  Main CFD Forum  6  September 4, 2008 02:08 
Adjoint method for error estimation  Fab  Main CFD Forum  0  May 27, 2008 02:11 
A question about discrete adjoint method  Thomas  Main CFD Forum  3  August 9, 2006 12:37 