CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Debugging Katz Program 14

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 8, 2013, 11:22
Question Debugging Katz Program 14
  #1
New Member
 
Ranald M Engelbeck
Join Date: Feb 2013
Location: Puyallup, Washington
Posts: 4
Rep Power: 13
Engelbeck is on a distinguished road
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

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?

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

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 is offline   Reply With Quote

Old   February 12, 2013, 07:02
Default Source code to aide debugging Program 14
  #2
New Member
 
Ranald M Engelbeck
Join Date: Feb 2013
Location: Puyallup, Washington
Posts: 4
Rep Power: 13
Engelbeck is on a distinguished road
Thank you to Dr Katz for allowing me to upload source code....
Attached Files
File Type: f LowOrderPanelMethod.f (20.5 KB, 30 views)
Engelbeck is offline   Reply With Quote

Old   February 21, 2013, 08:12
Default
  #3
Senior Member
 
Lefteris
Join Date: Oct 2011
Location: UK
Posts: 337
Rep Power: 15
Aeronautics El. K. is on a distinguished road
Quote:
Originally Posted by Engelbeck View Post
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

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?

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

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.
__________________
Lefteris

Aeronautics El. K. is offline   Reply With Quote

Old   February 22, 2013, 11:00
Default Si units not relivant to problem...
  #4
New Member
 
Ranald M Engelbeck
Join Date: Feb 2013
Location: Puyallup, Washington
Posts: 4
Rep Power: 13
Engelbeck is on a distinguished road
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!
Engelbeck is offline   Reply With Quote

Old   February 23, 2013, 14:03
Default
  #5
Senior Member
 
Lefteris
Join Date: Oct 2011
Location: UK
Posts: 337
Rep Power: 15
Aeronautics El. K. is on a distinguished road
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.
__________________
Lefteris

Aeronautics El. K. is offline   Reply With Quote

Old   March 7, 2013, 06:52
Default
  #6
New Member
 
Ranald M Engelbeck
Join Date: Feb 2013
Location: Puyallup, Washington
Posts: 4
Rep Power: 13
Engelbeck is on a distinguished road
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?
Engelbeck is offline   Reply With Quote

Reply

Tags
debug katz program 14


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
Chemkin Forums? PSR.f program help? johnjohnmulley Main CFD Forum 2 August 5, 2013 07:53
ANSYS program has stopped working? chihoangkt ANSYS 0 July 16, 2012 16:41
error in program: mani.rajendiran Fluent UDF and Scheme Programming 0 March 22, 2012 11:25
Which opensource and free CAD program? Xwang Main CFD Forum 1 October 24, 2010 17:29
Update boundary conditions calculated by an external program CedricVH OpenFOAM 2 January 15, 2010 11:55


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