hi roberto,
the adjoint approach implemented in SU2 solves for the sensitivity of a chosen objective to perturbations of the surface in the local normal direction. this must be chain ruled with the sensitivity of the surface to changes in the chosen design parameterization (ie hicks-henne bump function). to find this sensitivity SU2 uses a finite difference approximation, which is what the code snippet you quoted is doing. the size of the step used by SU2_GPC is chosen by the config option DV_VALUE_NEW. in previous studies we've seen that the accuracy of the overall design gradient is insensitive to the size of this step. the plot you show is showing two different types of sensitivities. the solid line is showing the surface sensitivity (the first one i mentioned), and the x-axis is displacement tangent along the surface. the points are showing the overall design gradient, and the x-axis is the design variable index -trent |
Hi developers,
Also concerning the gradients, I have seen that the subroutine that computes VarCoord (grid_movement_structure.cpp >> CSurfaceMovement::SetHicksHenne) evaluates a variation of the node's coordinates as it follows: double Ampl_old = config->GetDV_Value_Old(iDV); double Ampl_new = config->GetDV_Value_New(iDV); double Ampl = Ampl_new - Ampl_old; […] ek = log10(0.5)/log10(xk); fk = pow( sin( PI_NUMBER * pow(Coord[0],ek) ) , t2); /*--- Upper and lower surface ---*/ if (( upper) && (Normal[1] > 0)) { VarCoord[1] = Ampl*fk; } if ((!upper) && (Normal[1] < 0)) { VarCoord[1] = -Ampl*fk; } Which means that VarCoord is a variation of the coordinates due to a variation ∆δi of the design variable (∆δi=δi new – δi old). Yet, when computing the gradients (SU2_GPC.cpp) , the variable deps is evaluated like this: delta_eps = config->GetDV_Value_New(iDV); […] deps[iDim] = VarCoord[iDim] / delta_eps; } dS = sqrt(dS); dalpha_deps = 0.0; for (iDim = 0; iDim < boundary->GetnDim(); iDim++) { dalpha[iDim] = Normal[iDim] / dS; dalpha_deps -= dalpha[iDim]*deps[iDim]; } my_Gradient += Sensitivity*dalpha_deps; That is, deps[1] = ∆y/δinew = (δi new – δi old)*fk / δinew where fk is the kth bump function. I didn’t understand the meaning of this step. I was expecting to evaluate deps by doing ∆y/(δi new – δi old) instead of doing ∆y/δi new (in order to get the sensitivity of the node’s coordinates w.r.t. the design variable δi). Is there a reason to do it like this? Thanks in advance. Cheers, Andre |
Never mind, this comment in line 184 of SU2_GPC.ccp explains everything:
/*--- Load the delta change in the design variable (finite difference step). Note that this assumes DV_Value_New = finite_diff_step and DV_Value_Old = 0.0 in the config file. ---*/ Best regards, Andre |
Please note that we have removed the DV_Value_New and DV_Value_Old from the current developer's version. Currently, DV_Value is the only parameter.
Best, Francisco Quote:
|
All times are GMT -4. The time now is 07:57. |