Difference between revisions of "Vessel aerodynamics"

From OrbiterWiki
Jump to navigation Jump to search
(Started introduction. WIP.)
 
(Added category.)
 
(14 intermediate revisions by 8 users not shown)
Line 1: Line 1:
In orbiter, the aerodynamics of a vessel can be defined in two ways:
+
 
 +
 
 +
In Orbiter, the aerodynamics of a vessel can be defined in two ways:
  
 
* Over [[crosssection]] and [[aerodynamic coefficients]]
 
* Over [[crosssection]] and [[aerodynamic coefficients]]
 
* Over airfoil parameters and lift functions
 
* Over airfoil parameters and lift functions
  
The first option is a simple was and often good enough for most vessels, but has a few limitations:
+
The first option is the simple way and often good enough for most vessels, but it has a few limitations:
  
* You can't model lift. As any real vehicle can create a little lift, thats not always desired.
+
* You can't model [[lift]]. As any real vehicle can create a little lift, thats not always desired.
 
* Your aerodynamics are symmetric (up/down moving vehicles have no special attributes)
 
* Your aerodynamics are symmetric (up/down moving vehicles have no special attributes)
  
Line 13: Line 15:
 
==The airfoil model==
 
==The airfoil model==
  
Orbiter allows much more detailled aerodynamics by defining airfoil parameters. This airfoil is more than just the wing, you represent the whole spacecraft with it.  
+
Orbiter allows much more detailed aerodynamics by defining airfoil parameters. This airfoil is more than just the wing, you represent the whole spacecraft with it.  
  
 
==Defining the lift function==
 
==Defining the lift function==
  
You need two airfoil definitions: horizontal and vertical. The vertical lift function represent the lift working in upwards, the horizonal lift represent the sideways force.
+
You need two airfoil definitions: horizontal and vertical. The vertical lift function represents the lift working upwards, the horizonal lift represent the sideways force.
  
 
A lift function accepts the following parameters:
 
A lift function accepts the following parameters:
 
;aoa:Angle of Attack. Thats the angle between the XZ-plane of your vessel and the airspeed vector.
 
;aoa:Angle of Attack. Thats the angle between the XZ-plane of your vessel and the airspeed vector.
;M:Mach number. The speed of your vehicle in multiple of the speed of sound.
+
;M:Mach number. The speed of your vehicle in multiples of the speed of sound.
;Re:Reynolds number. This value tells you more about the athmosphere surrounding you.
+
;Re:Reynolds number. This value tells you more about the atmosphere surrounding you.
;cl:lift coefficient. here you return how much lift your vessel will create for this airfoil.  
+
;cl:lift coefficient. Here you return how much lift your vessel will create for this airfoil.  
 
;cm:moment coefficient. This return value defines, in which direction and how strong your vessel will rotate.
 
;cm:moment coefficient. This return value defines, in which direction and how strong your vessel will rotate.
 
;cd:drag coefficient. Here you can tell orbiter, how much drag your vessel now creates.
 
;cd:drag coefficient. Here you can tell orbiter, how much drag your vessel now creates.
Line 86: Line 88:
 
==Hypersonic vs supersonic vs subsonic==
 
==Hypersonic vs supersonic vs subsonic==
  
The aerodynamics at supersonic speeds are different to subsonic speed and as most programmers have problems with experiencing supersonic effects in real life, here is a short overview of the effects.
+
The aerodynamics at supersonic speeds are different from subsonic speed and as most programmers have problems with experiencing supersonic effects in real life, here is a short overview of the effects.
  
 
We will split the aerodynamic range of our vehicles into 4 regions:
 
We will split the aerodynamic range of our vehicles into 4 regions:
 
* subsonic
 
* subsonic
* transsonic
+
* transonic
 
* supersonic
 
* supersonic
 
* hypersonic
 
* hypersonic
Line 96: Line 98:
 
===subsonic flight===
 
===subsonic flight===
  
i think i don't have to explain much to you here, so just limit this to the important details. You are subsonic, when you have no local supersonic flow on your vessel (this means: The air does always move slower than mach 1, regardless where you measure it).  
+
I don't think I have to explain much to you here, so I will just limit this to the important details. You are subsonic when you have no local supersonic flow on your vessel (this means: The air always moves slower than mach 1, regardless of where you measure it).
  
===transsonic flight===
+
===transonic flight===
  
When you become faster, the at some points (sharp edges, top side of the wings, control surfaces) the local airspeed will become faster than Mach 1. This creates shockwaves around your craft. aircraft start experiencing vibrations first. The appearing shockwaves have two important effects:
+
When you become faster, then at some points (sharp edges, top side of the wings, control surfaces) the local airspeed will become faster than Mach 1. This creates shockwaves around your craft. The aircraft start experiencing vibrations first. The appearing shockwaves have two important effects:
 
* Drag raises quickly
 
* Drag raises quickly
* lift drops.
+
* Lift drops
  
 
The lift drops because you have less wing surface with laminar flow, while the raise in drag just comes from the fact, that the incoming air can no longer flow around your vessel at this point. Because the loss of lift happens mostly on the forward egdes of the wings, the center of pressure will move backward - your nose will drop unless you trim your vessel.  
 
The lift drops because you have less wing surface with laminar flow, while the raise in drag just comes from the fact, that the incoming air can no longer flow around your vessel at this point. Because the loss of lift happens mostly on the forward egdes of the wings, the center of pressure will move backward - your nose will drop unless you trim your vessel.  
Line 110: Line 112:
 
===supersonic flight===
 
===supersonic flight===
  
Supersonic flight has two important qualities: The drag is lower than in subsonic flight and drag is constant at constant aoa (until getting to hypersonic flight). The lift is also lower than in subsonic flight. The reason are the shockwaves created by your vessel, which slow the air down, relative to your vessel, and change its flow direction.
+
Supersonic flight has two important qualities: The drag is lower than in subsonic flight and drag is constant at constant aoa (until getting to hypersonic flight). The lift is also lower than in subsonic flight. The reason is the shockwaves created by your vessel, which slow the air down, relative to your vessel, and change its flow direction.
  
 
===hypersonic flight===
 
===hypersonic flight===
  
 
What is the difference between hypersonic and supersonic? Its not a specific mach number, the transition depends more on the properties of your vessel and the surrounding air.  
 
What is the difference between hypersonic and supersonic? Its not a specific mach number, the transition depends more on the properties of your vessel and the surrounding air.  
At one point, the air is not only no longer able to flow around your vessel (like in subsonic flight), the shockwaves created by your craft also start "flowing" around your vessel. What sounds terribly complex (and creates a lot of high research budgets) is actually very simple to imagine:
+
At some point, the air is not only no longer able to flow around your vessel (like in subsonic flight), the shockwaves created by your craft also start "flowing" around your vessel. What sounds terribly complex (and creates a lot of high research budgets) is actually very simple to imagine:
  
The aerodynamics of your vessel get more and more away from flow and more to the mechanic interaction between the spacecraft hull and individual molecules.
+
The aerodynamics of your vessel get more and more away from flow and more to the mechanical interaction between the spacecraft hull and individual molecules.
  
At true hypersonic flight, you would have no interaction between air molecules. You get this kind of situation at high machnumbers and thin athmosphere - just like satellites and spacecraft like it.
+
At true hypersonic flight, you would have no interaction between air molecules. You get this kind of situation at high mach numbers and thin atmosphere - just like satellites and spacecraft like it.
  
 
Most of the lifetime of your vessels will be in this region of flight, so its always a good idea, to pay attention to it.
 
Most of the lifetime of your vessels will be in this region of flight, so its always a good idea, to pay attention to it.
  
At hypersonic flight, the drag will slowly start to raise again, while lift starts even dropping at bit more.
+
At hypersonic flight, the drag will slowly start to raise again, while lift even starts dropping a bit more.
 +
 
 +
[[Category: Articles]]
 +
[[Category: Tutorials]]
 +
[[Category:Add-on tutorials]]
 +
[[Category:Aerodynamics]]

Latest revision as of 12:14, 16 October 2022


In Orbiter, the aerodynamics of a vessel can be defined in two ways:

The first option is the simple way and often good enough for most vessels, but it has a few limitations:

  • You can't model lift. As any real vehicle can create a little lift, thats not always desired.
  • Your aerodynamics are symmetric (up/down moving vehicles have no special attributes)

The simple model is often just good enough for satellite, spent rocket stages and small objects. For more detailled aerodynamics, you need more effort.

The airfoil model[edit]

Orbiter allows much more detailed aerodynamics by defining airfoil parameters. This airfoil is more than just the wing, you represent the whole spacecraft with it.

Defining the lift function[edit]

You need two airfoil definitions: horizontal and vertical. The vertical lift function represents the lift working upwards, the horizonal lift represent the sideways force.

A lift function accepts the following parameters:

aoa
Angle of Attack. Thats the angle between the XZ-plane of your vessel and the airspeed vector.
M
Mach number. The speed of your vehicle in multiples of the speed of sound.
Re
Reynolds number. This value tells you more about the atmosphere surrounding you.
cl
lift coefficient. Here you return how much lift your vessel will create for this airfoil.
cm
moment coefficient. This return value defines, in which direction and how strong your vessel will rotate.
cd
drag coefficient. Here you can tell orbiter, how much drag your vessel now creates.

For example:

void VLiftCoeff (double aoa, double M, double Re, double *cl, double *cm, double *cd)
{
	const int nabsc = 9;
	static const double AOA[nabsc] = {-180*RAD,-60*RAD,-30*RAD, 1*RAD, 15*RAD,20*RAD,25*RAD,60*RAD,180*RAD};
	static const double CL[nabsc]  = {       0,   -0.1,   -0.2,     0,    0.3,   0.7,   0.2,     0,      0};
	static const double CM[nabsc]  = {       0,      0,  0.014, 0.004,-0.0074,-0.094,-0.012,     0,      0};
	for (int i = 0; i < nabsc-1 && AOA[i+1] < aoa; i++);
	double f = (aoa-AOA[i]) / (AOA[i+1]-AOA[i]);
	*cl = CL[i] + (CL[i+1]-CL[i]) * f;  // aoa-dependent lift coefficient
	*cm = CM[i] + (CM[i+1]-CM[i]) * f;  // aoa-dependent moment coefficient
	double saoa = sin(aoa);
	double pd = 0.015 + 0.3*saoa*saoa;  // profile drag
	*cd = pd + oapiGetInducedDrag (*cl, 1.5, 0.7) + oapiGetWaveDrag (M, 0.85, 1.0, 1.1, 0.02);
	// profile drag + (lift-)induced drag + transonic/supersonic wave (compressibility) drag
}

The airfoils get defined by this code in clbkSetClassCaps()

	ClearAirfoilDefinitions();


	CreateAirfoil (LIFT_VERTICAL, _V(0,0, 0.0), VLiftCoeff, 5, 36.28, 1.5);
	// wing and body lift+drag components

	CreateAirfoil (LIFT_HORIZONTAL, _V(0,0,0), HLiftCoeff, 5, 13.79, 1.5);
	// vertical stabiliser and body lift and drag components

Adding control surfaces[edit]

	CreateControlSurface (AIRCTRL_ELEVATOR,     1.2, 1.5, _V(   0,0,-2.9), AIRCTRL_AXIS_XPOS);
	CreateControlSurface (AIRCTRL_RUDDER,       0.8, 1.5, _V(   0,0,-2.9), AIRCTRL_AXIS_YPOS);
	CreateControlSurface (AIRCTRL_AILERON,      0.2, 1.5, _V( 3.5,0,-2.9), AIRCTRL_AXIS_XPOS);
	CreateControlSurface (AIRCTRL_AILERON,      0.2, 1.5, _V(-3.5,0,-2.9), AIRCTRL_AXIS_XNEG);
	CreateControlSurface (AIRCTRL_ELEVATORTRIM, 0.1, 1.5, _V(   0,0,-2.9), AIRCTRL_AXIS_XPOS);

Variable drag elements[edit]

	CreateVariableDragElement (&fSpeedBrake, 1.2, _V(0, 0.75 ,-3.5));        // airbrake

Landing gear[edit]

Parachutes[edit]

Airbrakes[edit]

Need more?[edit]

Hypersonic vs supersonic vs subsonic[edit]

The aerodynamics at supersonic speeds are different from subsonic speed and as most programmers have problems with experiencing supersonic effects in real life, here is a short overview of the effects.

We will split the aerodynamic range of our vehicles into 4 regions:

  • subsonic
  • transonic
  • supersonic
  • hypersonic

subsonic flight[edit]

I don't think I have to explain much to you here, so I will just limit this to the important details. You are subsonic when you have no local supersonic flow on your vessel (this means: The air always moves slower than mach 1, regardless of where you measure it).

transonic flight[edit]

When you become faster, then at some points (sharp edges, top side of the wings, control surfaces) the local airspeed will become faster than Mach 1. This creates shockwaves around your craft. The aircraft start experiencing vibrations first. The appearing shockwaves have two important effects:

  • Drag raises quickly
  • Lift drops

The lift drops because you have less wing surface with laminar flow, while the raise in drag just comes from the fact, that the incoming air can no longer flow around your vessel at this point. Because the loss of lift happens mostly on the forward egdes of the wings, the center of pressure will move backward - your nose will drop unless you trim your vessel.

At mach 1, the drag and the loss in lift will reach a maximum and slowly go down to the supersonic values.

supersonic flight[edit]

Supersonic flight has two important qualities: The drag is lower than in subsonic flight and drag is constant at constant aoa (until getting to hypersonic flight). The lift is also lower than in subsonic flight. The reason is the shockwaves created by your vessel, which slow the air down, relative to your vessel, and change its flow direction.

hypersonic flight[edit]

What is the difference between hypersonic and supersonic? Its not a specific mach number, the transition depends more on the properties of your vessel and the surrounding air. At some point, the air is not only no longer able to flow around your vessel (like in subsonic flight), the shockwaves created by your craft also start "flowing" around your vessel. What sounds terribly complex (and creates a lot of high research budgets) is actually very simple to imagine:

The aerodynamics of your vessel get more and more away from flow and more to the mechanical interaction between the spacecraft hull and individual molecules.

At true hypersonic flight, you would have no interaction between air molecules. You get this kind of situation at high mach numbers and thin atmosphere - just like satellites and spacecraft like it.

Most of the lifetime of your vessels will be in this region of flight, so its always a good idea, to pay attention to it.

At hypersonic flight, the drag will slowly start to raise again, while lift even starts dropping a bit more.