CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   Debugging Katz Program 14 (http://www.cfd-online.com/Forums/main/112959-debugging-katz-program-14-a.html)

Engelbeck February 8, 2013 12:22

Debugging Katz Program 14
 
I have successfully compiled Program 14 from Katz & Plotkin's book "Low Speed Aerodynamics" Now I am trying to debug the code to ensure it works.

The baseline case set up in the published code yeilds a reasonable result:
Inputs:
ALPHA1=5.0
CROOT= 1.0
CTIP=1.0
XTIP=0.0
ZTIP=0.0
B=10.0
VT=1.0
JB=3

The answer was not published....hopefully, this matches someones answer?
CL= 0.4487 L= 2.2433 CM= 0.1148 CD= 0.0248
:D
Looking into the code brought up few issues I wanted to ask about:

1.) The programs variable VT I am interpreting as free stream velocity and RO to be density by their use in the program. However, setting the values of both of these variables in the program to 1.0 makes me wonder if they are normalized?
:confused:
2.) However, when I tried to run a geometry more representative of an real airplane (dimensions in inches) I get nonsensical anwsers:

Inputs:
ALPHA1=5.0
CROOT= 246.59
CTIP=58.18
XTIP=311.24
ZTIP=-59.69
B=670.25
VT=1.0
JB=3

Outputs:
CL=-.7883E+08 L=-.4026E+13 CM=-.3876E+10 CD=-.3926E+07
:eek:
Am I missing some other geometry normalization...say wing dimensions normalized to root chord (CROOT)?

3.) There is a fragment of code correcting the individual panel sweeps from chord wise/spanwise to streamwise/perpendicular to streamwise in the code leading up to the force and moment calculations....

C FIRST ORDER CORRECTION FOR PANEL SWEEP
QL=QL+QM*(DX**2+DZ**2)/DR
QM=QM*(DY**2+DZ**2)/DR

Is there a discussion of they theory behind this correction somewhere?

Anybody have any experiance with this code? How about a website that has the source code in machine readable format?...maybe I have a typo somewhere?

Ron

Engelbeck February 12, 2013 08:02

Source code to aide debugging Program 14
 
1 Attachment(s)
Thank you to Dr Katz for allowing me to upload source code....

Aeronautics El. K. February 21, 2013 09:12

Quote:

Originally Posted by Engelbeck (Post 406767)
I have successfully compiled Program 14 from Katz & Plotkin's book "Low Speed Aerodynamics" Now I am trying to debug the code to ensure it works.

The baseline case set up in the published code yeilds a reasonable result:
Inputs:
ALPHA1=5.0
CROOT= 1.0
CTIP=1.0
XTIP=0.0
ZTIP=0.0
B=10.0
VT=1.0
JB=3

The answer was not published....hopefully, this matches someones answer?
CL= 0.4487 L= 2.2433 CM= 0.1148 CD= 0.0248
:D
Looking into the code brought up few issues I wanted to ask about:

1.) The programs variable VT I am interpreting as free stream velocity and RO to be density by their use in the program. However, setting the values of both of these variables in the program to 1.0 makes me wonder if they are normalized?
:confused:
2.) However, when I tried to run a geometry more representative of an real airplane (dimensions in inches) I get nonsensical anwsers:

Inputs:
ALPHA1=5.0
CROOT= 246.59
CTIP=58.18
XTIP=311.24
ZTIP=-59.69
B=670.25
VT=1.0
JB=3

Outputs:
CL=-.7883E+08 L=-.4026E+13 CM=-.3876E+10 CD=-.3926E+07
:eek:
Am I missing some other geometry normalization...say wing dimensions normalized to root chord (CROOT)?


Ron

I'm not familiar with this code but I took a look at it. I would suggest that you do the following:
a) use SI units. not inches.
b) fortran uses rads and not degrees so you should be sure that you use rads or that the conversion from degrees to rads is done properly

PS
ok I just noticed that the conversion from degrees to rads is done : ALPHA1*PAY/180.0 so you don't neet to worry about that. Try to use SI units for the rest. :)

Engelbeck February 22, 2013 12:00

Si units not relivant to problem...
 
I do not think the units of the length dimensions affects the dimensionless results of lift drag and pitching moment coefficients since the should be referenced to wing area and chord length. One way of looking at the conversion factor between si and imperial units is as a geometry scaling factor....this is why I think the input length dimensions and speed are normalized by dividing by some reference length. Katz has no description on how to interpret the inputs, and I can't figure out if I have some coding error or the inputs are normalized by some length parameter like root chord...not a clue!
:confused:

Aeronautics El. K. February 23, 2013 15:03

I was working on CAFFA code (by prof. Peric) and although nowhere was clearly stated, the code was working properly only in SI units thus, I suggest you try SI units (ultimately this is the meaning of the SI units, a common system so that people around the world don't get confused).
Checking your grid's scaling is of critical importance as well. Whatever units you have used, use the appropriate factor to convert it to m.

Engelbeck March 7, 2013 07:52

Remember the section of code I refered to in the orgional post? ie:

C FIRST ORDER CORRECTION FOR PANEL SWEEP
QL=QL+QM*(DX**2+DZ**2)/DR
QM=QM*(DY**2+DZ**2)/DR

...well, I commented it out and all the coefficients came back to magnitudes I was expecting....so I conclude that this code fragment is at least one of the problems...Soooo...what is this section of code doing? Simple sweep correction?


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