|
[Sponsors] |
Two Questions About Using SU2 for Impeller Shape Optimization |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Tongtong
Join Date: Jan 2024
Posts: 24
Rep Power: 2 ![]() |
Hello everyone,
I want to use SU2 to build a framework for impeller shape optimization (I firmly believe SU2 can achieve this). I have two questions to ask: What does SU2_DOT_AD output? According to the terminal prompt "Design variable (FFD_CONTROL_POINT_2D) number 0.; CUSTOM_OBJFUNC gradient: -0.0249957", it can be seen that this is the first design variable, and the gradient of the objective function with respect to it is -0.0249957. ![]() What confuses me is why it is not a vector, because this is a two-dimensional shape optimization problem, so there should be at least gradient information in two directions. I can only guess that this is the modulus of the gradient vector, but how does it convert to the component form in each direction? Issues with using the shape_optimization.py script for impeller optimization I studied the shape design optimization examples in the SU2 tutorials carefully. This is a very good starting point. However, the examples are mostly based on airfoils, using the shape_optimization.py script. My original idea was to set OPT_OBJECTIVE to CUSTOM_OBJFUNC, but unfortunately, it didn't work. I looked carefully at the config_template.cfg file, and the optimization settings appear in two places: OPT_OBJECTIVE, OPT_CONSTRAINT, OPT_GRADIENT_FACTOR, OPT_RELAX_FACTOR, OPT_ITERATIONS, OPT_ACCURACY.... This part seems to be related to the shape_optimization.py script. Here, the available flow-based objective functions or constraint functions contain variables related to airfoils, but there is no option for user-defined variables. OBJECTIVE_FUNCTION, OBJECTIVE_WEIGHT, CUSTOM_OBJFUNC. This part has user-defined functions. So, I cannot directly use the shape_optimization.py script to drive the entire impeller optimization process, is that correct? The case 'Unconstrained shape design of a two-way mixing channel' mentioned FADO (which seems to be a driving module). Can I use FADO to solve my problem? ![]() Any suggestions would be greatly appreciated. Tongtong |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 596
Rep Power: 17 ![]() |
>What confuses me is why it is not a vector
If you have an FFD box consisting of a single cell with 4 nodes, then you have 4 control points. in 2D, they can move in (x,y) direction, so there are 8 degrees of freedom, also called design variables. The output shows the gradient for each design variable, so dJ1/dx, dJ2/dx, dJ3/dx, dJ4/dx, dJ1/dy,dJ2/dy, dJ3/dy,dJ4/dy. I can recommend the FADO library, it is very easy to use and very powerful. What is the objective that you want to minimize? |
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Tongtong
Join Date: Jan 2024
Posts: 24
Rep Power: 2 ![]() |
Hi bigfootedrockmidget,
As you mentioned, an FFD box with 4 nodes has four control points. In 2D, they can move along the (x, y) directions, giving 8 degrees of freedom. This makes sense. What confuses me is why the result from SU2_DOT_AD (e.g., CUSTOM_OBJUNC gradient: -0.0249957) is a scalar rather than in a form like CUSTOM_OBJUNC gradient: -0.0249957, 0.001 with two components. Through my conversation with Josh Kelly, he informed me that "SU2_DOT performs a dot product of adjoint and geometric sensitivities (vectors)," so the output (e.g., CUSTOM_OBJUNC gradient: -0.0249957) is indeed a scalar. My current understanding is that when SU2 performs shape design (using FFD as an example), there is actually only one design variable for each control point, which is the displacement. This is because SU2 describes deformation through the combination of a direction vector and displacement along that direction vector. The direction vector is pre-set in the configuration file under DV_PARAM, so I guess the SU2_DOT_AD output is the sensitivity of the objective function along the direction vector. To further explain my previous confusion, my initial understanding was that for a 2D problem (x, y), the optimization variables should have two components (x, y). Therefore, SU2_DOT_AD should output two values for each design variable (e.g., CUSTOM_OBJUNC gradient: -0.0249957, 0.001 instead of CUSTOM_OBJUNC gradient: -0.0249957), which is why I was puzzled that it is not a vector. I reviewed the surface_sens file and confirmed that there are indeed sensitivities in two directions for each node, "Sensitivity_x" and "Sensitivity_y". This should be what you referred to as dJ/dx and dJ/dy. Although the result file shows sensitivities in two directions, I still believe that each control point has only one design variable during the actual optimization process, which is the displacement along the direction vector. If this is not the case, please let me know explicitly. Thank you for your recommendation; I will try using FADO. In this case, my optimization objective is the efficiency of a compressor (although the model is a turbine, this might not be the key point; I just want to try using CUSTOM_OBJUNC). Thank you again, and I wish you all the best. Sincerely, Tongtong |
|
![]() |
![]() |
![]() |
Tags |
gradient, objective function, optimization, shape_optimization.py |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
SU2 configuration | Yuanyang ZOU | SU2 | 1 | May 12, 2023 02:54 |
Optimization of airfoil Gradient based optimization SU2 | ryupuriwat | SU2 | 0 | March 30, 2023 10:46 |
Benchmark Optimization Study for SU2 | Buxwax | SU2 | 6 | March 28, 2019 08:10 |
shape optimization problem | yugang881 | SU2 Shape Design | 3 | December 14, 2017 05:26 |
regarding su2 shape optimization | bala732 | SU2 Shape Design | 1 | August 29, 2017 11:03 |