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

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   September 19, 2014, 03:51
Default Hicks_Henne bump functions :)
  #1
New Member
 
Khiem Pham
Join Date: Nov 2013
Posts: 23
Rep Power: 12
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

 


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 12:35
[Commercial meshers] CCM+ Mesh Conversion Ingenieur OpenFOAM Meshing & Mesh Conversion 17 February 2, 2014 09:34
field functions - table crevoise STAR-CCM+ 3 March 26, 2013 09:37
Field functions and table crevoise Siemens 0 March 20, 2013 10:51
User-Defined Functions Boisson FLUENT 2 January 18, 2002 22:09


All times are GMT -4. The time now is 02:45.