CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   adjointShapeOptimizationFoam (

sambo July 18, 2011 15:02

Hello guys,
I have a questions depending on adjointShapeOptimizationFoam. Did anyone of you already used it?.
I runned the tutorial but I can not identify that he is improving the geometry.
I didn’t changed anything in the tutorial!
Can someone help me?


sambo July 18, 2011 16:42


Ohbuchi July 19, 2011 00:32

You can plot contour of alpha. I suppose this means plugged space for drag reduction.

And following presentation gives adjoint method for optimization.

sambo July 20, 2011 09:45

Thank you very much.
Do you may no, where I can find some more information about that?

NickG August 25, 2011 09:55


Can you explain what the alpha stands for? And in the slide show linked to above, is L the same as lambda in the solver?


boger October 20, 2011 14:15

Hi Nick,

You've probably answered your own questions long ago (or given up entirely), but no, the L in the slides refers to the cost function that is to be optimized. The purpose of the equations is to calculate the gradient of the cost function with respect to the porosity (alpha) in each cell. Once the gradient is in hand, the alpha field is updated by moving in the direction of the gradient (steepest descent). The lambda in the code controls the step size taken along the gradient; i.e., the step size for the steepest descent method.

Hope that helps,

uwsa September 10, 2012 20:29

Hi guys,

i am also new with openfoam. Unfortunatelly the above links are not working :(.
Is there any other document where too have a look on the equations?

Checking the .c file and trying to understand the equations is very difficult.


georg October 24, 2012 12:06

Hello to everybody,

has someone already tried to solve shape optimization for an alternative cost function like flow uniformity?

As far as I understand, the current implementation tries to reduce total pressure loss.
Has someone a starting point for me to change this or add something?

Thanks in advance,

sylvester October 25, 2012 04:12

Hi Georg,

Some references which present additional cost functions:

Othmer, C., Th. Kaminski, and R. Giering, Computation of topological sensitivities in fluid dynamics: Cost function versatility, Proc. ECCOMAS CFD, Delft, 2006


Othmer, C. (2008), A continuous adjoint formulation for the computation of topological and surface sensitivities of ducted flows. International Journal for Numerical Methods in Fluids, 58: 861–877. doi: 10.1002/fld.1770


georg October 26, 2012 06:16

Hi Sylvester,

thank you for the references.
I did not know the first one yet.
Some more stuff to read!

Honestly, I have some difficulties to identify the definition of the cost function within the solver.
Can you help?

Best regards,

sylvester October 26, 2012 08:24

Hi Georg,

That is because the cost function is not defined in the solver, but in the boundary conditions. In this case they are 'adjointOutletPressure' and 'adjointOutletVelocity'.


georg October 26, 2012 11:12

Sylvester, you´re right!
I found the explanation within the papers.
Thanks for your pointer!

Unfortunately, this does not solve my problem completely.
Maybe I just do not see the wood for the trees.
I am still puzzling around the translation of the cost function, e.g. pressure loss, into the correct boundary conditions!

Any hint is helpful!

Best regards,

All times are GMT -4. The time now is 09:32.