OHM Wind Tunnel

OrbitHangar

Addon Comments
Joined
Apr 9, 2008
Messages
3,832
Reaction score
13
Points
0

Author: calsir

This addon allows the gathering of the aerodynamic coefficients of orbiter vessels at various Mach numbers and angles of attack. It provides the results in a .csv file for further manipulation.

It is not intended as a design tool, as it will not calculate the lift and drag coefficients of a given mesh, but to gauge the performance of a vessel.

The plugin has to be enabled in the launchpad, and a test scenario is provided. It is strongly recommended to read the included documentation in the Wind Tunnel folder in the orbiter Doc directory.

The addon was created with orbiter_ng in mind for faster performance (thanks to tblaxland for the input), but will work in orbiter with the graphical client as well.

Changelog:
-----------------
1.0
-----------------
Improved handling of configuration errors (no silent errors any more).
Improved feedback during capture of aerodynamic data, both in orbiter log and on the screen.


-----------------
0.9.0
-----------------

Initial release



DOWNLOAD
 

Art

New member
Joined
Nov 19, 2007
Messages
46
Reaction score
1
Points
0
I didn't get a CSV output. I also did not test it with the DG. I changed the config and scenario files to another vessel, but left all other parameters alone. I take it that the CSV output is to go to ../orbiter/windtunnel/*.csv Correct?

I admit, I hoped for some cheezey 3d model fluid test app when I first saw this. It just correlates Orbiter lift perameters so you can evaluate the craft as you have programmed it to behave, not as it SHOULD behave based on the mesh. Still it will be nifty and useful, if I get it to work and figure out how to plot the data!
I take it to get the output file, you just enable the plug-in, run the scenario, and end the scenario when you like and it appears?
 

Hielor

Defender of Truth
Donator
Beta Tester
Joined
May 30, 2008
Messages
5,580
Reaction score
2
Points
0
So, wait...this just tells you the values that you've already given the ship in the config or dll?
 

Calsir

New member
Joined
Jan 8, 2009
Messages
71
Reaction score
0
Points
0
I didn't get a CSV output. I also did not test it with the DG. I changed the config and scenario files to another vessel, but left all other parameters alone. I take it that the CSV output is to go to ../orbiter/windtunnel/*.csv Correct?

Yes, it is how it is supposed to work. The default directory name should be WindTunnel (its name is in the cfg file). It has to be already existent, in order for the save to work. Try the default scenario with the corresponding configuration (DG as the vessel name) and see if it works. Also, check Orbiter.log to see if the module has properly loaded. The logging works properly only in orbiter2009.

I admit, I hoped for some cheezey 3d model fluid test app when I first saw this. It just correlates Orbiter lift perameters so you can evaluate the craft as you have programmed it to behave, not as it SHOULD behave based on the mesh. Still it will be nifty and useful, if I get it to work and figure out how to plot the data!

There are programs to do so, like fluent :). I am not an aerodynamicist, and hypersonic aerodynamics is a real mess. Besides, a wind tunnel is used to test the "actual" behaviour of an object. In this case, its aerodynamic coefficients in the simulation ;). I wrote this module because I needed some way to figure out a proper flight profile for agentgonzo's low fuel challenge, not as a design tool.

I take it to get the output file, you just enable the plug-in, run the scenario, and end the scenario when you like and it appears?

Starting orbiter with the proper scenario with the plugin enabled is the idea. If you are using orbiter_ng, the module should report the moment it has finished testing, while if you are using orbiter.exe, the test ending should become apparent as the velocity vector should behave normally.

---------- Post added at 08:36 PM ---------- Previous post was at 08:34 PM ----------

So, wait...this just tells you the values that you've already given the ship in the config or dll?

As I posted earlier, it is not a fluid dynamic software. It takes more than a week to write one :). I am beginning to think that I have to clarify the download page.

---------- Post added at 08:46 PM ---------- Previous post was at 08:36 PM ----------

Still it will be nifty and useful, if I get it to work and figure out how to plot the data!

Matlab does the trick. I used csv so that it would have been easy to import the data. I guess I will write an .m file to plot some useful characteristics and include it in the distribution soon.

I understand that its functionality is limited, and I have seen a couple of graphic libraries for surface plots, but they seem a little messy to me . I will try to see if I can provide some stand-alone visualization.
 

Art

New member
Joined
Nov 19, 2007
Messages
46
Reaction score
1
Points
0
I am using 2006 and not the Beta. There was no original output file in the directory, and I don't believe one came with the package. I also see no description of what happens when it is working. Perhaps we can clarify some of this a bit and maybe (from the perspective of a dumb-butt like me) put together a noob checklist for running it.
Wind Tunnel 0.9.0
This module aims to gather information about the aerodynamic behaviour
of a vessel in Earth atmosphere. It has to be enabled in the modules
section of the launchpad.
To set the test parameters and the vessel to be tested, edit the
configuration file in Config\Modules\Plugin\WindTunnel.cfg. The name of
the test vessel must correspond to the name of a vessel that is already
in earth orbit and in free flight: if the vessel is landed the test will
be performed with extended undercarriage. See the included scenario for
an example. The test parameters are the values of the angle of attack
and mach number at which the aerodynamic coefficients are calculated.
Each of the two parameter is an interval which is divided in a number
of increments between each control node.
For example:
MachIntervals = 0.1 1.1 3.1
MachIncrements = 10 2
means that the test will be conducted between M=0.1 and M=3.1, that
there will be 10 increments between M=0.1 and M=1.1 (0.1, 0.2, 0.3, ...)
and two increments between M=1.1 and M=3.1 (2.1 and 3.1, since 1.1 was
already included in the test). The parameters for the Angle of Attack
are configured in the same way. It is necessary that xxxIncrements has
one fewer element than xxxIntervals, for both Aoa and Mach.
The output is a comma separated value (csv) file that uses the semicolon
as separator. The output file name corresponds to the name of the vessel
class with an optional date; it is created in the WindTunnel directory
at orbiter root level. The header contains the number of elements in
each parameter (nAoa and nMach) that are useful for handling the data.
This plugin was created with the latest sdk (API 091023) with the no
graphics executable in mind, as it provides the fastest execution and
best performance. Nonetheless, it works on orbiter 2006p1.
Those are the instructions I have. It doesn't say much about the velocity vector doing something etc. I also did not notice any unusual behavior on the HUD. I suppose you have tested this with 2006, but I am guessing you really developed it for the Beta, right? Have you used it for any vessel type other than the DG?
 
Last edited:

Calsir

New member
Joined
Jan 8, 2009
Messages
71
Reaction score
0
Points
0
I am using 2006 and not the Beta. There was no original output file in the directory, and I don't believe one came with the package. I also see no description of what happens when it is working. Perhaps we can clarify some of this a bit and maybe (from the perspective of a dumb-butt like me) put together a noob checklist for running it.

Those are the instructions I have. It doesn't say much about the velocity vector doing something etc. I also did not notice any unusual behavior on the HUD. I suppose you have tested this with 2006, but I am guessing you really developed it for the Beta, right? Have you used it for any vessel type other than the DG?

I commented out a line in the config file to test its behaviour a few days ago. I do not know why that version of the config got in the distro. Remove the semicolon from the line
;AoaIntervals = -10 0 10
or just go to orbithangar and download it again. I guess I will have to introduce a code to control actual input sanity...
The module was tested with DeltaGlider, XR2 and ShuttleA (who has lousy lift characteristics).
It now works both in beta and 2006.

You should see the velocity vector sweeping from +10 to -10 on the hud, with the default config. After each sweep, the airspeed indicator should increase, until it gets to mach 3. The end of the sweeping is the indication that the test is over.

I apologise for the mistake.
 

Notebook

Addon Developer
Addon Developer
News Reporter
Donator
Joined
Nov 20, 2007
Messages
11,820
Reaction score
641
Points
188
Trying this with another vessel, and its not generating the .csv file.

The example scenario works fine, and I can read that data into a Mathcad prog:
http://i89.photobucket.com/albums/k207/Notebook_04/Windtunnel.jpg

Copied the WindTunnel.scn and renamed it, then changed the ship name and path. Changed the VesselName in WindTunnel.cdg to match.

It appears to work, it goes through the speed ranges same as the example, but dosent generate the .csv file?

It not using the DG.csv, the file time dosen't change.

Anyone any suggestions.

N.
 

Calsir

New member
Joined
Jan 8, 2009
Messages
71
Reaction score
0
Points
0
Odd, it goes through all the angles of attacks and velocities, yet it does not create a new file...

I tried with different scenarios and classes, and the only thing that I can say is: "it works on my pc" :(, which is not exactly helpful. Could you post the Scenario and Config file here, please? Could it be possible that the vessel class contains illegal characters in its name? I guess I'll have to code in some controls.

Try to run it under orbiter_ng (2009) and check orbiter.log.
 

Notebook

Addon Developer
Addon Developer
News Reporter
Donator
Joined
Nov 20, 2007
Messages
11,820
Reaction score
641
Points
188
Odd, it goes through all the angles of attacks and velocities, yet it does not create a new file...

I tried with different scenarios and classes, and the only thing that I can say is: "it works on my pc" :(, which is not exactly helpful. Could you post the Scenario and Config file here, please? Could it be possible that the vessel class contains illegal characters in its name? I guess I'll have to code in some controls.

Try to run it under orbiter_ng (2009) and check orbiter.log.

Here's the Scenario & Config files:

BEGIN_DESC
This scenario is intended to be run with WindTunnel addon enabled. Be sure to properly configure the addon to set the test parameters. The vessel name of the Delta Glider in this scenario is "DG". Tests should be conducted with damage and failure simulation disabled.
END_DESC
BEGIN_ENVIRONMENT
System Sol
Date MJD 51982.5318200688
END_ENVIRONMENT
BEGIN_FOCUS
Ship BlueStreakF1
END_FOCUS
BEGIN_HUD
TYPE Surface
END_HUD
BEGIN_CAMERA
TARGET BlueStreakF1
MODE Cockpit
FOV 50.00
END_CAMERA
BEGIN_SHIPS
ISS:projectAlpha_ISS
STATUS Orbiting Earth
RPOS -1960853.52 6289473.51 -1395461.73
RVEL 7224.560 1821.314 -1916.307
AROT 29.93 -0.22 50.47
IDS 0:588 100 1:586 100 2:584 100 3:582 100 4:580 100
NAVFREQ 0 0
XPDR 466
END
Mir:Mir
STATUS Orbiting Earth
RPOS -5526988.32 228224.51 3734352.69
RVEL -4331.919 -391.969 -6386.130
AROT -0.00 -45.02 90.03
IDS 0:540 100 1:542 100 2:544 100
XPDR 482
END
Luna-OB1:Wheel
STATUS Orbiting Moon
RPOS 775484.71 2099242.47 258.01
RVEL -1388.253 512.781 0.283
AROT 0.00 0.00 -152.60
IDS 0:560 100 1:564 100
XPDR 494
END
BlueStreakF1:Velcro/BlueStreakF1
STATUS Orbiting Earth
RPOS 6383686.73 0 0
RVEL -1526.702 542.753 -1565.143
AROT -24.05 -1.30 89.73
VROT 0 0 0
PRPLEVEL 0:0.553000 1:0.871311
NAVFREQ 0 0 0 0
XPDR 0
TRIM 0.000000
AAP 0:0 0:0 0:0
END
END_SHIPS

; Wind Tunnel Configuration File
; The vessel name must match one that is present in the scenario being used
VesselName = BlueStreakF1

; Defines the extremes of the evaluation interval and its internal control nodes. It will cause Orbiter to hang if not properly formatted.
AoaIntervals = -10 0 10
; Defines the number of increments between each control node. Must have one element less than xIntervals. It will cause Orbiter to hang if not properly formatted.
AoaIncrements = 10 10
; Defines the extremes of the evaluation interval and its internal control nodes. It will cause Orbiter to hang if not properly formatted.
MachIntervals = 0.1 1.1 3.1
; Defines the number of increments between each control node. Must have one element less than xIntervals. It will cause Orbiter to hang if not properly formatted.
MachIncrements = 10 2

; Save directory name, from orbiter root.
SaveDirectory = WindTunnel
; ReportNameStyle: controls the name format for the report
; 0 Vessel class only (eg "DeltaGlider")
; 1 Vessel class and run start (eg "DeltaGlider_YYYYMMDD_hhmmss")
;
ReportNameStyle = 0

I'm rebuilding this pc from scratch at the moment(had a dodgy hard drive), so I can't get all my usual stuff together.
If I get it finished at a reasonable time, I'll try with the ShuttlePb.

N.
 

Calsir

New member
Joined
Jan 8, 2009
Messages
71
Reaction score
0
Points
0
Maybe this is the culprit:

Code:
BlueStreakF1:Velcro/BlueStreakF1

If "Velcro/BlueStreakF1" is actually the name of the vessel class, then no file can be created with that name, due to the presence of "/". As a workaround (which may or may not work) try to create a directory called "Velcro" inside WindTunnel. I have no clue whether it will work or not, but it may be worth a try.
 
Last edited:

Notebook

Addon Developer
Addon Developer
News Reporter
Donator
Joined
Nov 20, 2007
Messages
11,820
Reaction score
641
Points
188
Ok, I'll give it a try, just as soon as my pc cools down...:compbash2:

---------- Post added at 10:56 PM ---------- Previous post was at 10:52 PM ----------

Well it cooled down...and your suggestion works, here's the first few lines of "BlueStreakF1.csv" in Velcro directory.

Wind Tunnel version 0.9.0
Vessel Class: Velcro/BlueStreakF1
System time at simulation start: 2009/11/25::22:54:54
nAoa = 21
nMach = 13
Mach Number; AOA; Dynamic Pressure; Airspeed; CL*S; CD*S; L/D
0.100000; -10.000000; 185.414184; 29.946366; 0.000000; 5.154768; 0.000000;
0.100000; -9.000000; 185.414184; 29.946366; 0.000000; 5.045795; 0.000000;
0.100000; -8.000000; 185.414184; 29.946366; 0.000000; 4.935284; 0.000000;
0.100000; -7.000000; 185.414184; 29.946366; 0.000000; 4.823270; 0.000000;

Marvellous, I'll have a prod with Mathcad tommorow, Thanks, N.
 

Calsir

New member
Joined
Jan 8, 2009
Messages
71
Reaction score
0
Points
0
From what I see, the vessel you are testing creates no lift at these AoAs.
 

Notebook

Addon Developer
Addon Developer
News Reporter
Donator
Joined
Nov 20, 2007
Messages
11,820
Reaction score
641
Points
188
You are correct there!
It is a simple .cfg I set up while investigating Sputnik's Velcro Rockets, and it was the only working mesh I had. Here's the Velcro .cfg file for it.

; === Configuration file for vessel class Generic CVEL stage BlueStreakF1 ===
Module = Velcro
Meshname = Velcro/BlueStreakF1
Size = 10
Mass = 8900 ; empty mass [kg]
MaxFuel = 80000 max fuel mass [kg]
Isp = 2793 ; fuel specific impulse [m/s]
IspSL = 2432
MaxMainThrust = 1334000
MaxRetroThrust = 0
MaxHoverThrust = 0
MaxAttitudeThrust = 25000
COG_OverGround = 8.5
CameraOffset = 0.0 0.0 10.61
LiftFactor = 0.0
CW = .4 .6 .7 .7
CrossSections = 63.0, 63.0, 8.6
RotResistance = 0.7 0.7 0.3
Touchdownpoints = 0 4.4 -.5 4.4 0 -.5 -4.4 0 -.5
; === Attachment specs ===
BEGIN_ATTACHMENT
C 0.0 0.0 8 0 0 1 0 1 0 VELCRO1
C 2.0 0.0 0.0 0 0 1 -1 0 0 VELCRO2
P 0.0 0.0 17 0 0 1 0 1 0 VELCRO3
P 2.0 0.0 0.0 0 0 1 -1 0 0 VELCRO4
END_ATTACHMENT
; === Engine reference points ===
ExhaustType = KERO
MEngineRef1 = 0 -1 -8
MEngineRef2 = 0 1 -8
;ExhaustType = LH2
;MEngineRef3 = -1 -.2 -8
;MEngineRef4 = -1 .2 -8

I only needed it to work at the time, not being interested in any aerodynamic paramaters.

Currently playng with Vinka's Spacecraft3, and thats where I'll use your windtunnel program, once I get the attachments sorted...

N.
 

tblaxland

O-F Administrator
Administrator
Addon Developer
Webmaster
Joined
Jan 1, 2008
Messages
7,320
Reaction score
25
Points
113
Location
Sydney, Australia
So, wait...this just tells you the values that you've already given the ship in the config or dll?
The idea is to be able to get those values where you do not have the source code.
 

Calsir

New member
Joined
Jan 8, 2009
Messages
71
Reaction score
0
Points
0
New Release

I released a new version of wind tunnel (1.0).

It is basically a complete redesign, with improved stability and better handling of configuration / scenario errors.
 

Wishbone

Clueless developer
Addon Developer
Joined
Sep 12, 2010
Messages
2,421
Reaction score
1
Points
0
Location
Moscow
Calsir, you may wish to peruse and perhaps incorporate into your add-on code written for similar purpose in my Precession MFD. It grabs an airfoil's coefficients in the background, in a separate thread.
 

Calsir

New member
Joined
Jan 8, 2009
Messages
71
Reaction score
0
Points
0
Calsir, you may wish to peruse and perhaps incorporate into your add-on code written for similar purpose in my Precession MFD. It grabs an airfoil's coefficients in the background, in a separate thread.

Wishbone, thanks for the offer.

I have read your code for the computation of optimal angles of attack for each given need: in PrecessionMFD.cpp, lines 3461-3506 and the related structs and functions. If I understand correctly you perform your calculations by considering the airfoil with the biggest area alone, without any other empennages/appendages or the fuselage. Moreover, the orbiter API does not allow an external module to determine the direction of an airoil lift (either vertical or horizontal), so no navigation for a B-Wing ;).

Since the Wind Tunnel plugin is supposed to provide accurate measures in various flight configurations (landing gear, aerobrakes, etc), I cannot limit the testing to the airfoil with the greatest surface area. Besides, it is unclear in the API whether the function bool VESSEL::GetAirfoilParam() returns the full drag of the airfoil or it excludes the induced drag.

Yet, reading your code provided a piece of very useful information: I can determine a reference surface area (the biggest, of course :) ) against which to compute the lift, drag and moment coefficients.
 
Top