CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Adjoint sensitivity map output doesn't seem right... (https://www.cfd-online.com/Forums/openfoam/228284-adjoint-sensitivity-map-output-doesnt-seem-right.html)

nrooy June 25, 2020 16:41

Adjoint sensitivity map output doesn't seem right...
 
2 Attachment(s)
Hi All,

I'm using OF v1912 and looking at the completed results from the motorBike adjoint sensitivity map, which is suppose to generate adjoint sensitivities in reference to vehicle drag.

tutorials/incompressible/adjointOptimisationFoam/sensitivityMaps/motorBike

The raw results are not as expected. The example case outputs the adjoint sensitivities as a point field called "pointSensNormaladjS1ESI" which span a considerable numerical range. Upon clipping to [-10,10] the results look a little better but still not what one would expect (image #1 below). They should be closer to what is seen in image #2.

In the interest of reducing drag, there are areas that should be highlighted much differently. This unexpected behavior is further validated when compared against the shape optimization case located at:

tutorials/incompressible/adjointOptimisationFoam/shapeOptimisation/motorBike

The end result of this shape optimization case is that a large upward deformation occurs on the front windscreen/fairing. This upward deformation does indeed reduce drag as seen from the output logs, which means that in the case of the sensitivity map mentioned earlier, the front windscreen should be bright red indicating an upward displacement normal to the surface will reduce drag. However as we can see, it's mostly the edges which are colored and not the windscreen area.

My question is this: is there some kind of transformation/normalization that needs to be applied to the adjoint sensitivity map output before it can be used? Because as it, the output from the sensitivity output is very misleading.

Thanks!

Image #1: https://imgur.com/tRMI5Oq
Image #2: https://imgur.com/jGtRwPP

majksner October 21, 2020 04:40

2 Attachment(s)
We have similar findings about sensitive maps when using snappyHexMesh. We have tried many settings, with layers, without layers and other parameter adjustments, but we couldn't get smooth sensitivity maps. The screenshot of the DrivAer car you posted is based on ANSA mesh. (You can download it here and more about whole project here) We have tried CFMesh open source version, and we can produce smother sensitivity maps but only without layers, with layers checkMesh always fails with 5 failed checks no matter of the number of cells and mesh quality and then adjointOptimisationFoam crashes early in the process.


Below are the screenshots of the snappyHexMesh sensitivity maps, with layers and without layers.


Hi-res images: https://imgur.com/a/Abc0bWU

nrooy November 3, 2020 18:58

Hi @majksner. Thanks for the reply! No, I unfortunately been unable to generate a better adjoint sensitivity map. It's a curious situation through, somehow the mesh deformation is able to capture these adjoint values and deform the mesh accordingly. That example case does produce a drag reduction after all, so presumably the adjoint sensitivity is correct, but visualization takes some additional processing?


All times are GMT -4. The time now is 23:01.