How to Calculate Atmospheric Drag?

BruceJohnJennerLawso

Dread Lord of the Idiots
Addon Developer
Joined
Apr 14, 2012
Messages
2,585
Reaction score
0
Points
36
I'm currently working on reaching a 0.1 release of my first space simulator program. One of the trickier problems that Im trying to solve is the modelling of atmospheric drag on any given object (usually a rocket of some sort), but Im unsure of how exactly to do so.

I did check the wikipedia pages on the subject and found that the drag force is equal to 1/2*density*velocity squared*Drag Coefficient*cross sectional area.

[ame="http://en.wikipedia.org/wiki/Drag_equation"]http://en.wikipedia.org/wiki/Drag_equation[/ame]

This introduces several problems, as well as:

-where does the drag force act? I would guess that this might be at a "center of pressure", similar to lift, but how exactly can I figure out where that is?
-How to find cross sectional area? This sounds really easy, until you realize that the profile of the spacecraft is going to be a combination of several rectangles & circles in 2d, rotated at any given angle. I have no idea how to begin determining the Area as a function of angle to the airstream velocity
-What exactly is the drag coefficient? I know from the article above that Cd should be a function of the reynolds number, which itself will depend on velocity, Area, and fluid viscosity. But given this, will viscosity depend on altitude, and if so how do I model it accurately?

Any help is appreciated.

:hailprobe:
 

boogabooga

Bug Crusher
Joined
Apr 16, 2011
Messages
2,999
Reaction score
1
Points
0
Full answer:
[ame="http://en.wikipedia.org/wiki/Computational_fluid_dynamics"]Computational fluid dynamics - Wikipedia, the free encyclopedia[/ame]

Short answers

-Cd depends mostly on the geometry, and angle of attack. Can be determined from experiment or estimated via CFD.
Certain standard shapes like cones, cylinders etc., may have compiled Cd data available. Many airfoils like the standard NACA airfoils have Cl, Cd models available (Google Panel Code).

Air viscosity depends on altitude in so much as temperature depends on altitude.
http://www.cfd-online.com/Wiki/Sutherland's_law

Of more interest to you will be the fact that Cd depends on Mach number above the critical Mach number.
[ame="http://en.wikipedia.org/wiki/Critical_Mach_number"]Critical Mach number - Wikipedia, the free encyclopedia[/ame]

Incompressible theory that you are reading about will only get you so far.
 
Last edited:

BruceJohnJennerLawso

Dread Lord of the Idiots
Addon Developer
Joined
Apr 14, 2012
Messages
2,585
Reaction score
0
Points
36
Full answer:
Computational fluid dynamics - Wikipedia, the free encyclopedia

Short answers

-Cd depends mostly on the geometry, and angle of attack. Can be determined from experiment or estimated via CFD.
Certain standard shapes like cones, cylinders etc., may have compiled Cd data available. Many airfoils like the standard NACA airfoils have Cl, Cd models available (Google Panel Code).

Air viscosity depends on altitude in so much as temperature depends on altitude.
http://www.cfd-online.com/Wiki/Sutherland's_law

Of more interest to you will be the fact that Cd depends on Mach number above the critical Mach number.
Critical Mach number - Wikipedia, the free encyclopedia

Incompressible theory that you are reading about will only get you so far.

Ouch. :blink:

Is there a less complex approximation that I could possibly use just to get the code running? What does say, Orbiter or KSP use for the Aerodynamic models? I understand that the KSP one is quite simplistic?
 

boogabooga

Bug Crusher
Joined
Apr 16, 2011
Messages
2,999
Reaction score
1
Points
0
Simple:
Assume 0 AOA during the ascent and use a constant Cd of about 0.02.

For the area use PI * (max rocket diameter/2)^2

Here is a panel code applet.
http://www.mh-aerotools.de/airfoils/javafoil.htm

The "cambered plate" with 0 camber is sort of rocket-like. You can try to use a t/c with the same value as the rocker diameter/length to get a better Cd if you wish.

You can find the KSP model on their wiki. IIRC, it was made by someone that didn't understand aerodynamics very well.

I think Orbiter is vessel-dependent.
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,628
Reaction score
2,345
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
I think Orbiter is vessel-dependent.

Vessel dependent and great for subsonic or high hypersonic speeds. But not for the velocities between. Its pretty hard implementing the transsonic to supersonic regime properly.
 

boogabooga

Bug Crusher
Joined
Apr 16, 2011
Messages
2,999
Reaction score
1
Points
0
That's why CFD is the FULL answer :lol:

(Unless he happens to have a supersonic wind tunnel in his basement)
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,628
Reaction score
2,345
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
That's why CFD is the FULL answer :lol:

(Unless he happens to have a supersonic wind tunnel in his basement)

Or knows how to use OpenFOAM properly for the calculations.
 

AlfalfaQc

Future Rocket Engineer
Joined
Jun 19, 2012
Messages
74
Reaction score
0
Points
6
OpenFOAM is quite complex, but once you know how to use it you can do pretty much anything.
 

HarvesteR

Member
Joined
Apr 22, 2008
Messages
386
Reaction score
15
Points
18
Welcome to my world. ;)

Drag is, *puts on sunglasses*, a drag to implement. Short of a complete fluid dynamics simulation, you'll have to settle with some sort of approximation.

The standard drag equation is probably your best option for a simulator, but it requires one key value which isn't very easy to get.. .your 'coefficient of drag', which is essentially a number that abstracts away all the complexities of real fluid flowing through the craft, so as you can imagine, it's something that requires careful tweaking.

The matter is made more complicated when you are dealing with objects of complex geometries, like actual aircraft, which are built to in essence abuse these variations of drag to be controllable as they move through the air.

So, there is no simple solution to offer you... It depends on how realistic you want things to be, and weighing the gains against the added complexity.

For KSP, even though the current drag model is flawed (it applies the force as an acceleration instead of as a force, ignoring mass), it is ok enough for the game's requirements at the moment. Later we might end up upgrading it for a more realistic solution, but so far the effort and risk involved in doing it are too high (and the gains from having it too low) when compared to other project-critical things still on the to-do list.


It's hard to give a more definitive answer without knowing more about what you want to achieve with your project.

As a starting point, I'd suggest implementing a very simple version for the time being, so you can focus on rounding out the scope of the entire project, then circle back to it as you iterate. (yes, that is my answer for everything, but that doesn't mean it applies any less here ;) )

Cheers
 

Dantassii

HUMONGOUS IMS shipbuilder
Joined
Jul 14, 2012
Messages
508
Reaction score
20
Points
33
That's why it's called Rocket Science

Take it from someone who spent 12 year in college/university nearly getting a Ph.D. in Aerospace Engineering (the math comprehensive exam tripped me up), atmospheric flight at supersonic, hypersonic, and near orbital speed is not something that's easy to calculate. That being said, 99% of all the CFD that I ever did in college was done on 66 MHZ CPU Sparc Stations with 486-DX4/100 workstations to make the pretty pictures from the data. A low end laptop has hundreds (thousands?) of times the raw horsepower that I had in college, not to mention it has more RAM than my computers had hard drive space!

One thing that can be said though about these calculations. Once you do them for a given speed/shape, they generally don't change. So if you were to collect a bunch of speed/altitude points you might be able to do a reasonable curve through the data to connect the dots.

Personally, I found atmospheric flight to be a nightmare, both as a simulator pilot and as a rocket designer. That's why I stick with IMS ships. ;)

Dantassii
HUMONGOUS IMS shipbuilder
BS Aerospace Engineering
MS Mechanical Systems Engineering
(nearly) Ph.D Aerospace Engineering
Major: Computational Fluid Dynamics and Numerical Heat Transfer Analysis
Minor: Spacecraft Design
 

AlfalfaQc

Future Rocket Engineer
Joined
Jun 19, 2012
Messages
74
Reaction score
0
Points
6
You could use OpenFOAM to calculate the drag coefficient for your ships/rocket. The web definition of OpenFOAM is: OpenFOAM is a C++ toolbox for the development of customized numerical solvers, and pre-/post-processing utilities for the solution of continuum mechanics problems, including computational fluid dynamics.

However, it is very hard to use (IMHO). I started playing with it this summer (for race car purposes) and I can now run some basic simulations (incompressible turbulent). The "problem" with OpenFOAM is that it has no UI, you modify files to enter you initial values, solver, functions, etc. It can become really complex if you don't know anything about CFD. The nice thing though is that you have complete control on your simulation. Meshing is ok if you use snappyHexMesh (the native mesher). It is not too complex to understand and it works fairly well.

The documentation for OpenFOAM is ok, but not more than that. There are a lot of tutorial that come with it when you download OpenFOAM, but it is a lot of trial and error.

Obviously, it is a lot easier to use commercial software (Fluent, Star-CCM+) since they do all the complicated work for you (especially the meshing part), but they cost a lot if you can't find them free on the web.

For more info you can check out: http://www.openfoam.org/docs/
 
Top