CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   SU2 (https://www.cfd-online.com/Forums/su2/)
-   -   New objective function (https://www.cfd-online.com/Forums/su2/218762-new-objective-function.html)

khavart July 3, 2019 06:06

New objective function
 
Hello,

I'm currently optimizing a nozzle in order to have a uniform mach number at the outlet. So by using SURFACE_MACH objective function the uniformity is ok but I need to have a directionnal flow at the outlet (meaning that the velocity vector have to be parallel to the nozzle axis).

So I need to compute a new objective function. The first idea is to modify an existing objective function in order to get rid of output/input problems. So let's say that I want to modify the objective function named SURFACE_TOTAL_PRESSURE.

What are the lines of the code I should modify ? When I searched about it I found many places where it appears so a little help would be helpful.

Thanks,
Kevin

pcg July 4, 2019 06:33

Hi Kevin,
It is computed in COutput::SpecialOutput_AnalyzeSurface (along with many other surface quantities).
Regards,
Pedro

khavart July 9, 2019 10:17

Hi Pedro,


Thank you very much, I have found all I need.

Once I have modified the code, must I recompile it or something else of this kind ?



Thanks,
Kevin


All times are GMT -4. The time now is 19:43.