FSIC Messageboard
  Tech Talk
  New airfoil editor

Post New Topic  Post A Reply
profile | register | preferences | faq | search

UBBFriend: Email This Page to Someone! next newest topic | next oldest topic
Author Topic:   New airfoil editor
Sv
Pilot
posted 05-08- 12:32 PM     Click Here to See the Profile for Sv   Click Here to Email Sv     Edit/Delete Message   Reply w/Quote
The first early version of my AirFoil editor can be down-loaded at:
http://www.schoolmusic.com/chickencoop/se5a/fm/3/index.htm

I have been hacking the SE5a airfoil with it... it is not ready to complete a job, but it is fun to see what airFoils do. I will be working to finish it...

I just found a major bug, if you minimize it, it will not refresh the graph - I will fix this. You can save it, then reload it to see it if this happens to you

Here is the readme:

AirEd V1
--------

May 7, 2000
Airfoil Editor for OpenPlane (www.openplane.org) by Sv (sean@schoolmusic.com)

This is a very basic app by someone who does not know how to program this kind of stuff. It is also a very, very early version - I just started it.

To INSTALL
--------------- Unzip the file to any directory.
Run the Setup.exe program and install airEd.
To test it, type SPIT into the name window, then the "load" button. Do you see a graph?

To use:
---------------

Right now it is just a tool to help you hack the TEXT version of the airfoils (.ppf), not the binary .sm airfoil file. I have included most of the airfoils that come with SDOE as PPF files, I got these from the OpenPlane demo.

You can load a PPF airfoil file that is in the same directory as this application, just type the name of the foil in the name box, like "SPIT". You will now see the lift and drag graph of the airfoil. As you move the mouse across the graph you will see a read-out of the Angle of Attack (AOA) for the current loaction of your mouse as well as the corrent coeficiant (coef) value. AOA goes from -179 degrees on the left to 180 degrees on the right. The center line is 0 degrees AOA. The horizontal black line represents a coef of 0. Up is positive, down is negative. You can scale the graph by sliding the sliders to the left. You can only zoom inwards, sorry - but that is the area where you should need to zoom in anyway.

The black points along the graph represents data samples. The airfoil files may have an entry for each degree AOA, but mose skip angles. For each angel that has an entry, ALL coef values must be entered for that AOA as well!

Here is how you edit. You can either edit the lift chart (GREEN) or the drag chart (RED). To choose an aedit mode, click a radio button to the left. Now you can edit the line you want. To move a point, simply click on the point and then drag it up or down. You will see the AOA you are trying to edit displayed as a number. If you try and edit an AOA that has no entries, nothing will happen.

You can add new AOA entries! Just hold the "shift" key while you click and drag. This will add a new AOA entry if you are clicking on an AOA that has no entry yet. IMPORTANT: Since all coef must be included in a new entry, lift, drag, and moment coefs are interpolated from the nearest neighbor to keep the chart correct. This happens automaticlly, and you can see the points added.

When you are finished your editing, just click on the save button, this will over-write the old file. If you want to keep the old file, just change the foil name in the name box. NOTE that this name is used as the file name AND inside the PPF file, so be careful!

How to get airFoils to work for your plane:

1. Create the new airfoil and name it to match the airfoil name or your plane name. I think plane name might be better becuase it allows for hacking the airfoil without effecting other people's planes. Example: SE5A.ppf -this will also have the name SE5A inside the PPF file (along with SE5Aup and SE5Adn)

2. Move this airfoil into the media/aircraft.airfoils directory. Create this directory if you need to.

3. Add a line for your new airfoil to the startup.ppf file found in your media directory. If you don't have a startup.ppf file, I have included one - start with that. Add a line like this:

"aircraft/airfoils/SE5A.ppf"

4. Open your plane in Bryan Russell's OpenPlane Studio (OPS) Find the prop lists on the wings. Here you will see something like "FW190foil" as a property. Change this to your foil, for example:

"SE5A"

5. Try it! Pray to God it works! If any little thing is wrong you will get a crash as soon as the missions starts

Once you have it working, it is easy to tweek it. Just keep copying the PPF file between your airEd (this app) directory and your media/aircraft/airfoils directory.

This is just the begining! Let me know what bugs you find as well as ideas you have for this. I have many including:


Edit up/down airfoil charts
Edit a special "delta" up/dn chart (delta from normal foil position)
Select and move multiple points
Edit moment data (I have code to see this now, editing it is easy to add)
Apply various filters to the data to due things like add overall drag, lift, etc.
Feature to pull neighbor data points arounf the AOA you chose to edit, a "shaper"
Understand the probabilty values... what do they do? The three other fields...
Better scaling with scroll bars
Let you size the graohung window, this shold be easy.
Many more!
I will continue to work on this as well as work on the SE5a air foil!

Some basic info on what AirFoils do in OpenPlane

Airfoil files are used to help dertermine the lift, drag, and moment forces produced by a wing in flight.

Lift is the force that pulls th wing and therefor the plane upward. It is applied perp. to the wing.

Drag is the force that slows the wing down, it is applied in a direction opposite of the aircraft's heading.

Moment if the tourque created by the wing, the force that tries to change the wings Angle of Attack (AOA)

AOA is the aingle the wing is compared with the airflow it is encountering. 0 AOA means that the airflow is paralell with the wing. An AOA of 45 means that the wing is pointing 45 degrees higher than the airflow, like when you have the stick pulled back... that direction. -45 AOA would be the opposite.

Total lift is determined by many things, mostly the airspeed, air density, and wing surface area. The other aspects that effect lift are very very complicated. Instead of trying to model each variable in such a complex system, hacks are used! These are called "coefficiants" In other words, you build a wind tunel model, find out what lift the wing should produce via some simple equations, then see what happens in the tunnel! Now use a fudge-factor (coef) to get the equation to work better. There are such coefs for lift, drag, and moment here. More importantly, each AOA has its own coef. Some airfoils work well at higher AOA, some dont. The heart of the airfoil file is to manage these coef for each AOA.

Coef values are gemeraly multiplied right in an equation, like the basic drag equation:

d = .5 p cd v-squared s

d = drag force
p = air density
cd = drag coef
v = velocity
s = sirface area


So you see a drag coef of 0 means NO drag at all, no matter what speed! Same thing works for lift and moment. So a drag coef of 2 means doubleing the effect of the other parameters. Also negative numbers reverse the force. You will see negative coef of life and moment, when the wing AOA is negative, the lift usually pulls that plane downward.

Well this is just a start, and I am not a master, so much of this may be plain wrong - have fun!


------------------
-Sv =FC=

WWI in SDOE!


IP: Logged

Laika 801
Pilot
posted 05-08- 01:22 PM     Click Here to See the Profile for Laika 801   Click Here to Email Laika 801     Edit/Delete Message   Reply w/Quote
Great ! DL'ing now, hope I understand it !

LK

IP: Logged

Pang
Pilot
posted 05-08- 07:36 PM     Click Here to See the Profile for Pang   Click Here to Email Pang     Edit/Delete Message   Reply w/Quote
This will be a great help, Sv!! Etienne's "Wing Editor" is still a great program, but yours looks like it will be a bit more intuitive. We definitely need that moment data edited as well.

GREAT WORK!

------------------
Pang 33rd~GS
33rd Strike Group

IP: Logged

Ronin
Pilot
posted 05-08- 07:47 PM     Click Here to See the Profile for Ronin   Click Here to Email Ronin     Edit/Delete Message   Reply w/Quote
Great going SV!

I spent quite a bit of time this weekend cruising airfoil sites on the net so you tool is timely!

Ronin

IP: Logged

Sv
Pilot
posted 05-08- 09:26 PM     Click Here to See the Profile for Sv   Click Here to Email Sv     Edit/Delete Message   Reply w/Quote
Ok, version 1.1 is posted here:
http://www.schoolmusic.com/chickencoop/se5a/fm/3/index.htm

Here's whats new:

- Fixed graph screen refresh bug
- Unlimited level of undos
- Edit/show moment graph
- You can show/hide all graphs

I am now working on the foilup/foildn editing

Pang,
Yea, I liked Etienne's Wing extractor too, but it was over my head heheh. It is also nice to edit the sm airfoils, I am stuck doing the PPF files because I am not very good with binary files.

-Sv

IP: Logged

Sv
Pilot
posted 05-08- 09:30 PM     Click Here to See the Profile for Sv   Click Here to Email Sv     Edit/Delete Message   Reply w/Quote
By the way, make sure you uninstall the old versin first by going to control panel -> add/remove programs. I don't know how to make a patch yet

-Sv

IP: Logged

juzz
Pilot
posted 05-09- 03:53 AM     Click Here to See the Profile for juzz     Edit/Delete Message   Reply w/Quote
Those drag coefficients are mighty low - the SPIT airfoil has a maximum Cl/Cd ratio of 26, which seems rather high.

Do the AirAR and AirChord variables change the drag coefficients significantly differently than the lift coefficients?

IP: Logged

Sv
Pilot
posted 05-09- 07:17 AM     Click Here to See the Profile for Sv   Click Here to Email Sv     Edit/Delete Message   Reply w/Quote
Exactly what I want to know Juzz

-Sv

IP: Logged

Tailslide
Pilot
posted 05-09- 11:19 AM     Click Here to See the Profile for Tailslide   Click Here to Email Tailslide     Edit/Delete Message   Reply w/Quote

Yes they do I have the formula kicking around somewhere if you need it.

TS

IP: Logged

Sv
Pilot
posted 05-09- 09:52 PM     Click Here to See the Profile for Sv   Click Here to Email Sv     Edit/Delete Message   Reply w/Quote
Another new version of the airfoil editor (1.2):
http://www.schoolmusic.com/chickencoop/se5a/fm/3/index.htm

I added the ability to edit/show the foilUp and foilDn charts. You should be able to use this for really editing an airfoil now

Let me know what other features you need...

-Sv

IP: Logged

juzz
Pilot
posted 05-10- 01:12 AM     Click Here to See the Profile for juzz     Edit/Delete Message   Reply w/Quote
I just realised those are 2D airfoils, right?

So there's no induced drag present, duh.

IP: Logged

Tailslide
Pilot
posted 05-10- 02:36 AM     Click Here to See the Profile for Tailslide   Click Here to Email Tailslide     Edit/Delete Message   Reply w/Quote

SDOE induced drag formula:
================================
Cdi = Cl*Cl / (PI * airK * airAR)


------------------
Patch It!

TS Aircombat


IP: Logged

Sv
Pilot
posted 05-10- 08:27 AM     Click Here to See the Profile for Sv   Click Here to Email Sv     Edit/Delete Message   Reply w/Quote
TS,

Could you rattle of the basic lift and drag formulas as well?

-Sv

IP: Logged

Tailslide
Pilot
posted 05-10- 02:09 PM     Click Here to See the Profile for Tailslide   Click Here to Email Tailslide     Edit/Delete Message   Reply w/Quote

I wasn't given them.. if you ask MH maybe he will look them up for you. Please post them if you do find out !

TS

IP: Logged

Sv
Pilot
posted 05-10- 02:35 PM     Click Here to See the Profile for Sv   Click Here to Email Sv     Edit/Delete Message   Reply w/Quote
He pointed me in the direction of the books he uses, this is cool. I remember the equations I used to use fooling around in the old days, but I am not sure how good they were.

The thing that confuses me is that there seems to be many ways to approach simulating flight, isn't there? Some approaches are more detailed and require more variables (more CPU too) than others. Doesn't one need to make many choices when deciding how to implement a simplified model of flight? Or is there just a practical standard that most sims use? Can't you even model seperate aspects of flight with different approaches?

It is very intersting to me. I used to write basic 2d flight sims on my old computer with my dad when I was a kid. We also did model rocket sims and orbit sims, it was fun. But this was on a ZX81 and Commodore hehe. I remember having problems with orbit decay in the orbit app and positive feedback in the flight sim. The plane would not reach equalibrium. We had some problems

-Sv

IP: Logged

Tailslide
Pilot
posted 05-10- 11:43 PM     Click Here to See the Profile for Tailslide   Click Here to Email Tailslide     Edit/Delete Message   Reply w/Quote
Yes thats why I thought asking MH for the specific equeations would be a good idea.. I seem to remember mighty saying that they made drag reduced at very low altitudes who knows what other effects are thrown in there..

The induced drag forumula above is the one actually used in the game.

TS

[This message has been edited by Tailslide (edited 05-10-2000).]

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | Fighter Squadron Information Center

(This site Copyright (c) 1999 Inertia LLC)

Powered by Infopop www.infopop.com © 2000
Ultimate Bulletin Board 5.45c