CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > SU2

Hicks_Henne bump functions :)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 19, 2014, 04:51
Default Hicks_Henne bump functions :)
  #1
New Member
 
Khiem Pham
Join Date: Nov 2013
Posts: 23
Rep Power: 13
Bachduong is on a distinguished road
Dear guys!
I'm trying to run optimization case steady_rae2822 (SU2 v 3.2.1)
I have some questions about Hicks_Henne bump functions:
1) I have seen in file grid_movement_structure.cpp some code about Hicks_Henne bump functions, lines 3623-3670 as we seen below

Quote:
double Ampl = config->GetDV_Value(iDV);
double xk = config->GetParamDV(iDV, 1);
const double t2 = 3.0;

if (config->GetParamDV(iDV, 0) == NO) { upper = false; double_surface = true; }
if (config->GetParamDV(iDV, 0) == YES) { upper = true; double_surface = true; }

for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) {

for (iVertex = 0; iVertex < boundary->nVertex[iMarker]; iVertex++) {
VarCoord[0] = 0.0; VarCoord[1] = 0.0; VarCoord[2] = 0.0;


if (config->GetMarker_All_DV(iMarker) == YES) {
Point = boundary->vertex[iMarker][iVertex]->GetNode();

Coord_ = boundary->vertex[iMarker][iVertex]->GetCoord();
Normal_ = boundary->vertex[iMarker][iVertex]->GetNormal();

/*--- The Hicks Henne bump functions should be applied to a basic airfoil without AoA,
and unitary chord, a tranformation is required ---*/
ValCos = cos(AoA*PI_NUMBER/180.0);
ValSin = sin(AoA*PI_NUMBER/180.0);

Coord[0] = Coord_[0]*ValCos - Coord_[1]*ValSin;
Coord[0] = max(0.0, Coord[0]); // Coord x should be always positive
Coord[1] = Coord_[1]*ValCos + Coord_[0]*ValSin;

Normal[0] = Normal_[0]*ValCos - Normal_[1]*ValSin;
Normal[1] = Normal_[1]*ValCos + Normal_[0]*ValSin;

/*--- Bump computation ---*/
if (double_surface) {
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; }
}
else {
xCoord = Coord[0] - BumpLoc;
ek = log10(0.5)/log10(xk/BumpSize);
fk = pow( sin( PI_NUMBER * pow(xCoord/BumpSize,ek)),t2);

/*--- Only one surface ---*/
if ((xCoord <= 0.0) || (xCoord >= BumpSize)) VarCoord[1] = 0.0;
else VarCoord[1] = Ampl*fk;
}
}
Hicks_Henne functions(x) = Ampl*(sin(Pi*x^(log5/logxk)))^3
y(x)=y(x) baseline + Sum (Ampl*(sin(Pi*x^(log5/logxk)))^3)

Perhaps, Ampl = 0.01 (i have seen in config file, that DV_VALUE = 0.01)and xk = 0.05 .. 0.95 (for k = 1..19) respectively, right?
Any suggestion?
Thank you!
Bachduong is offline   Reply With Quote

Old   September 21, 2014, 21:30
Default
  #2
Super Moderator
 
Francisco Palacios
Join Date: Jan 2013
Location: Long Beach, CA
Posts: 404
Rep Power: 15
fpalacios is on a distinguished road
I think you have understood the code, but... Could you please reformulate the question? It is not clear for me.

Thanks,
Francisco
fpalacios is offline   Reply With Quote

Old   September 22, 2014, 02:07
Default
  #3
New Member
 
Khiem Pham
Join Date: Nov 2013
Posts: 23
Rep Power: 13
Bachduong is on a distinguished road
Sorry!
I have seen in config file for shape optimization case for RAE2822 airfoil

Quote:
% ------------------------ GRID DEFORMATION PARAMETERS ------------------------%
%
% Kind of deformation (FFD_SETTING, FFD_CONTROL_POINT_2D, FFD_CAMBER_2D, FFD_THICKNESS_2D,
% HICKS_HENNE, COSINE_BUMP, PARABOLIC,
% NACA_4DIGITS, DISPLACEMENT, ROTATION, FFD_CONTROL_POINT,
% FFD_DIHEDRAL_ANGLE, FFD_TWIST_ANGLE, FFD_ROTATION,
% FFD_CAMBER, FFD_THICKNESS, SURFACE_FILE)
DV_KIND= FFD_SETTING
%
% Marker of the surface to which we are going apply the shape deformation
DV_MARKER= ( AIRFOIL )
%
% Parameters of the shape deformation
% - HICKS_HENNE ( Lower Surface (0)/Upper Surface (1)/Only one Surface (2), x_Loc )
% - NACA_4DIGITS ( 1st digit, 2nd digit, 3rd and 4th digit )
% - PARABOLIC ( Center, Thickness )
% - DISPLACEMENT ( x_Disp, y_Disp, z_Disp )
% - ROTATION ( x_Orig, y_Orig, z_Orig, x_End, y_End, z_End )
% - OBSTACLE ( Center, Bump size )
% - FFD_CONTROL_POINT ( Chunk ID, i_Ind, j_Ind, k_Ind, x_Disp, y_Disp, z_Disp )
% - FFD_DIHEDRAL_ANGLE ( Chunk ID, x_Orig, y_Orig, z_Orig, x_End, y_End, z_End )
% - FFD_TWIST_ANGLE ( Chunk ID, x_Orig, y_Orig, z_Orig, x_End, y_End, z_End )
% - FFD_ROTATION ( Chunk ID, x_Orig, y_Orig, z_Orig, x_End, y_End, z_End )
% - FFD_CAMBER ( Chunk ID, i_Ind, j_Ind )
% - FFD_THICKNESS ( Chunk ID, i_Ind, j_Ind )
% - FFD_VOLUME ( Chunk ID, i_Ind, j_Ind )
DV_PARAM= ( 1, 0.5 )
%
% New value of the shape deformation
DV_VALUE= 0.01
%
% Visualize the deformation (NO, YES)
VISUALIZE_DEFORMATION= NO

% --------------------- OPTIMAL SHAPE DESIGN DEFINITION -----------------------%
% Available Objective functions
% DRAG, LIFT, SIDEFORCE, PRESSURE, FORCE_X, FORCE_Y,
% FORCE_Z, MOMENT_X, MOMENT_Y, MOMENT_Z, EFFICIENCY,
% EQUIVALENT_AREA, THRUST, TORQUE, FREESURFACE

% Optimization objective function with optional scaling factor
% ex= Objective * Scale
OPT_OBJECTIVE= DRAG * 0.001

% Optimization constraint functions with scaling factors, separated by semicolons
% ex= (Objective = Value ) * Scale, use '>','<','='
OPT_CONSTRAINT= ( LIFT > 0.71 ) * 0.001

% List of design variables (Design variables are separated by semicolons)
% - HICKS_HENNE ( 1, Scale | Mark. List | Lower(0)/Upper(1) side, x_Loc )
% - NACA_4DIGITS ( 4, Scale | Mark. List | 1st digit, 2nd digit, 3rd and 4th digit )
% - DISPLACEMENT ( 5, Scale | Mark. List | x_Disp, y_Disp, z_Disp )
% - ROTATION ( 6, Scale | Mark. List | x_Axis, y_Axis, z_Axis, x_Turn, y_Turn, z_Turn )
% - FFD_CONTROL_POINT ( 7, Scale | Mark. List | Chunk, i_Ind, j_Ind, k_Ind, x_Mov, y_Mov, z_Mov )
% - FFD_DIHEDRAL_ANGLE ( 8, Scale | Mark. List | Chunk, x_Orig, y_Orig, z_Orig, x_End, y_End, z_End )
% - FFD_TWIST_ANGLE ( 9, Scale | Mark. List | Chunk, x_Orig, y_Orig, z_Orig, x_End, y_End, z_End )
% - FFD_ROTATION ( 10, Scale | Mark. List | Chunk, x_Orig, y_Orig, z_Orig, x_End, y_End, z_End )
% - FFD_CAMBER ( 11, Scale | Mark. List | Chunk, i_Ind, j_Ind )
% - FFD_THICKNESS ( 12, Scale | Mark. List | Chunk, i_Ind, j_Ind )
% - FFD_VOLUME ( 13, Scale | Mark. List | Chunk, i_Ind, j_Ind )
DEFINITION_DV= ( 1, 1.0 | AIRFOIL | 0, 0.05 ); ( 1, 1.0 | AIRFOIL | 0, 0.10 ); ( 1, 1.0 | AIRFOIL | 0, 0.15 ); ( 1, 1.0 | AIRFOIL | 0, 0.20 ); ( 1, 1.0 | AIRFOIL | 0, 0.25 ); ( 1, 1.0 | AIRFOIL | 0, 0.30 ); ( 1, 1.0 | AIRFOIL | 0, 0.35 ); ( 1, 1.0 | AIRFOIL | 0, 0.40 ); ( 1, 1.0 | AIRFOIL | 0, 0.45 ); ( 1, 1.0 | AIRFOIL | 0, 0.50 ); ( 1, 1.0 | AIRFOIL | 0, 0.55 ); ( 1, 1.0 | AIRFOIL | 0, 0.60 ); ( 1, 1.0 | AIRFOIL | 0, 0.65 ); ( 1, 1.0 | AIRFOIL | 0, 0.70 ); ( 1, 1.0 | AIRFOIL | 0, 0.75 ); ( 1, 1.0 | AIRFOIL | 0, 0.80 ); ( 1, 1.0 | AIRFOIL | 0, 0.85 ); ( 1, 1.0 | AIRFOIL | 0, 0.90 ); ( 1, 1.0 | AIRFOIL | 0, 0.95 ); ( 1, 1.0 | AIRFOIL | 1, 0.05 ); ( 1, 1.0 | AIRFOIL | 1, 0.10 ); ( 1, 1.0 | AIRFOIL | 1, 0.15 ); ( 1, 1.0 | AIRFOIL | 1, 0.20 ); ( 1, 1.0 | AIRFOIL | 1, 0.25 ); ( 1, 1.0 | AIRFOIL | 1, 0.30 ); ( 1, 1.0 | AIRFOIL | 1, 0.35 ); ( 1, 1.0 | AIRFOIL | 1, 0.40 ); ( 1, 1.0 | AIRFOIL | 1, 0.45 ); ( 1, 1.0 | AIRFOIL | 1, 0.50 ); ( 1, 1.0 | AIRFOIL | 1, 0.55 ); ( 1, 1.0 | AIRFOIL | 1, 0.60 ); ( 1, 1.0 | AIRFOIL | 1, 0.65 ); ( 1, 1.0 | AIRFOIL | 1, 0.70 ); ( 1, 1.0 | AIRFOIL | 1, 0.75 ); ( 1, 1.0 | AIRFOIL | 1, 0.80 ); ( 1, 1.0 | AIRFOIL | 1, 0.85 ); ( 1, 1.0 | AIRFOIL | 1, 0.90 ); ( 1, 1.0 | AIRFOIL | 1, 0.95 )
I mean, Ampl = 0.01 and xk = 0.05 ... 0.95 respectively (for k= 1..19) ? or they get another value?
Thank you!
Bachduong is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wall functions ivan-s Main CFD Forum 0 August 25, 2014 13:35
[Commercial meshers] CCM+ Mesh Conversion Ingenieur OpenFOAM Meshing & Mesh Conversion 17 February 2, 2014 10:34
field functions - table crevoise STAR-CCM+ 3 March 26, 2013 10:37
Field functions and table crevoise Siemens 0 March 20, 2013 11:51
User-Defined Functions Boisson FLUENT 2 January 18, 2002 23:09


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