Adjoint method
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 outlet-patch. I think that is not correct ;) Thanks for every comment. Regards, Jens |
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' 44-48 in C. Othmer, Int. J. Numer. Meth. Fluids 2008; 58:861–877 Regard, K |
Jens,
Did the equations converge? |
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 |
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 |
Good point, Fumiya - you're correct!
|
Thanks for your help and hints.
I got also a few hints by C. Othmer and the problem was the pressure equation. |
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 |
Quote:
Regards, Jens |
Quote:
thanks for the findings. How do these BCs look like? Would you mind posting your final case and solver? Thanks. Regards Bastian. |
Quote:
Regards, Jens |
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 |
1 Attachment(s)
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 |
SIMPLE algorithm
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) ); //Under-relax(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 . . . |
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 |
All times are GMT -4. The time now is 10:41. |