Understanding YSFlight Physics

YSFlight general discussion & everything in between
Post Reply
User avatar
decaff_42
Staff
Staff
Posts: 3565
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 630 times
Been thanked: 1364 times
Contact:

Understanding YSFlight Physics

Post by decaff_42 » Wed Feb 24, 2016 10:42 pm

The title really says it all. I am performing trials to see how variables effect aircraft performance and taking as scientific an approach I can. My goal is to understand how the DAT really effects the Aircraft and see if I can derive the equations used by YSFlight. I already have had some success with the Fuel Burning and Thrust equations (see here for that topic), but want to expand the knowns about YSFlight.

I will sporadically update this topic with graphs showing the data I've collected and I am trying to analyze. As I complete areas of research (presuming success), I will write up/ expand the reports that can be found on my website.


My first area of interest is to learn how YSFlight calculates the aircraft's lift coefficient. So far I have proven to myself that YSFlight uses the Standard Atmosphere Model, at least below ~35k.

Here's the baseline CL vs Angle of Attack data I've gathered in order to (1) verify the Standard Atmosphere model and (2) have something to compare against when I start changing DAT variables.
Baseline_CL_v_AoA.png

(Mod 1)
I want to see how flaps effect the lift coefficient, however I do not want to contaminate the data by changing the drag values of the aircraft, which might change the AoA data. Therefore I set the CDBYFLAP from 1.0 to 0.0. Here's the data I am currently working with:
Flaps_CL_v_AoA.png
Check out my website YSDecaff for all my tutorials and addon releases.
Visit by Bitbucket page for Python codes: https://bitbucket.org/decaff42/

Server Flight Log
Addon Database Submit Addon To Database

User avatar
u2fly
Senior Veteran
Senior Veteran
Posts: 1283
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 770 times
Been thanked: 282 times
Contact:

Re: Understanding YSFlight Physics

Post by u2fly » Wed Feb 24, 2016 11:32 pm

I very interested in your research and would like to see scripts writed with Python to replay your analyzes.
For me using Python for new things for YSFlight is very important because it is crossplatform and easy to learn.
For now there are many interesting tools writed (or in progress) with Python scripts directly for YS:
- Proxy server -
1) https://sourceforge.net/projects/orbforysflight/
2) https://github.com/pasutisu/poseidon2
3) https://github.com/pasutisu/neptun
- Network protocol -
4) https://github.com/vins31/ys-net-tools/
- Format converter -
5) https://github.com/pasutisu/exportsrf
6) http://sourceforge.net/projects/ysfsblender/
- External Radar panel-
7) viewtopic.php?t=1428
8) viewtopic.php?t=7323
9) viewtopic.php?t=8321
/!\ READ YSFLIGHT HANDBOOK (online + PDF) | updated 2019/04/25

U.S. Senator John McCain wrote:
“Spending #NewYearsEve w/ brave #Ukrainian Marines at a forward combat outpost - we stand w/ them in their fight against #Putin's aggression”
http://pic.twitter.com/vkz0gdozVV
(31 DEC 2016)

User avatar
decaff_42
Staff
Staff
Posts: 3565
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 630 times
Been thanked: 1364 times
Contact:

Re: Understanding YSFlight Physics

Post by decaff_42 » Wed Mar 02, 2016 2:49 am

So I realized that I used the wrong Air density for a whole bunch of the data shown above, so I decided to re-analyze all my data, but this time also collect data on the drag. Here's some baseline data. I'm not sure what's up with the 10k point, but it is interesting and will be investigated further with some other flights at 5k and 15k in the future.

Image

Image

I find it interesting that the A_ref * C_D value from the drag equation is a parabola and the Lift Coefficient remains a linear equation.

As the DAT file defines the Critical Positive Angle of Attack, I have noticed that this is also the angle of attack at which the aircraft stalls. Seems like a no brainier, but it is nice to confirm one more thing.
Check out my website YSDecaff for all my tutorials and addon releases.
Visit by Bitbucket page for Python codes: https://bitbucket.org/decaff42/

Server Flight Log
Addon Database Submit Addon To Database

User avatar
u2fly
Senior Veteran
Senior Veteran
Posts: 1283
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 770 times
Been thanked: 282 times
Contact:

Re: Understanding YSFlight Physics

Post by u2fly » Wed Mar 02, 2016 10:25 am

decaff_42, did you update your PDF document with this issues?
/!\ READ YSFLIGHT HANDBOOK (online + PDF) | updated 2019/04/25

U.S. Senator John McCain wrote:
“Spending #NewYearsEve w/ brave #Ukrainian Marines at a forward combat outpost - we stand w/ them in their fight against #Putin's aggression”
http://pic.twitter.com/vkz0gdozVV
(31 DEC 2016)

User avatar
decaff_42
Staff
Staff
Posts: 3565
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 630 times
Been thanked: 1364 times
Contact:

Re: Understanding YSFlight Physics

Post by decaff_42 » Thu Apr 07, 2016 11:03 pm

A peak at the atmospheric data I've collected so far for airspeed/ mach at altitude in YSFlight. Definitely different from the Standard Atmospheric model I have been using, so strike that hypothesis.

It's nice to see a very linear line as that equals easy equation to understand. I think I will be able to take this data and develop a KIAS and KTAS vs altitude relationship.

Image
Check out my website YSDecaff for all my tutorials and addon releases.
Visit by Bitbucket page for Python codes: https://bitbucket.org/decaff42/

Server Flight Log
Addon Database Submit Addon To Database

User avatar
decaff_42
Staff
Staff
Posts: 3565
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 630 times
Been thanked: 1364 times
Contact:

Re: Understanding YSFlight Physics

Post by decaff_42 » Sun Apr 10, 2016 11:16 pm

The completion of this plot. Note the change at 40,000 feet. This is similar to the Standard Atmospheric model, however it occurs at a different altitude in YSFlight.

Image
Check out my website YSDecaff for all my tutorials and addon releases.
Visit by Bitbucket page for Python codes: https://bitbucket.org/decaff42/

Server Flight Log
Addon Database Submit Addon To Database

User avatar
bernholm
Veteran
Veteran
Posts: 734
Joined: Sun Dec 04, 2011 6:28 am
Favorite Aircraft: 777-9X
Location: Middle of Nowhere, Connecticut
OS: 10.9.5
Has thanked: 67 times
Been thanked: 25 times
Contact:

Re: Understanding YSFlight Physics

Post by bernholm » Wed May 11, 2016 5:43 pm

I find it interesting how the change in KIAS trend is much less pronounced than the trend in KTAS. If you think about it, the difference between IAS and TAS at higher altitudes is caused by differences in air density, which also changes the speed of sound at those altitudes. Therefore you'd think that the IAS changed similarly.

What I'm trying to say is that since KTAS seems to remain fairly constant past 40,000 feet, that should mean that the air density remains about the same past 40,000 feet. If the air density is relatively unchanging past 40,000ft, shouldn't the IAS/TAS ratio remain relatively constant past 40,000 feet too?
Image

User avatar
decaff_42
Staff
Staff
Posts: 3565
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 630 times
Been thanked: 1364 times
Contact:

Re: Understanding YSFlight Physics

Post by decaff_42 » Thu May 12, 2016 1:24 am

Actually, the speed of sound (which is being plotted above) is dependent on the gas and temperature ONLY. SQRT(\gamma * R * T)

In the standard atmospheric model, at ~36k the atmosphere changes and goes to a constant temperature profile in the tropopause. This therefore means that the speed of sound does not change. You can see the temperature lapse rate is 0 deg C per 1000 ft.

This is interesting because the air density is also changing at the same time. I do not understand why the atmosphere is like this, only that it happens. :lol:
Check out my website YSDecaff for all my tutorials and addon releases.
Visit by Bitbucket page for Python codes: https://bitbucket.org/decaff42/

Server Flight Log
Addon Database Submit Addon To Database

User avatar
bernholm
Veteran
Veteran
Posts: 734
Joined: Sun Dec 04, 2011 6:28 am
Favorite Aircraft: 777-9X
Location: Middle of Nowhere, Connecticut
OS: 10.9.5
Has thanked: 67 times
Been thanked: 25 times
Contact:

Re: Understanding YSFlight Physics

Post by bernholm » Fri May 13, 2016 2:46 am

Pressure decreases with distance from the Earth because there's simply less air pushing down from above the higher you go. Density decreases as pressure decreases because the pressure compresses the gas and makes it more dense, I guess.

Now the temperature of a substance also affects its density, but I'm pretty sure the weight of hundreds of kilometers of atmosphere would have far more of an effect on density than the vibrations of molecules (unless we're talking about mercury or something, which we're not)

However, the vibration of molecules would have a major impact on the speed of sound, considering sound is just a longitudinal wave propagated by molecules bumping into each other. I can see why the density wouldn't really affect the speed of sound, because the manner (and therefore the speed) of wave transmission would depend on the properties of the medium, which are defined by its composition. Since the temperature of a substance affects the vibration of the molecules, that would also affect how the wave is transmitted.

(Actually, 80% of this is just speculation based off my high school science knowledge, but it seems pretty reasonable :mrgreen: )
Image

User avatar
decaff_42
Staff
Staff
Posts: 3565
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 630 times
Been thanked: 1364 times
Contact:

Re: Understanding YSFlight Physics

Post by decaff_42 » Fri May 13, 2016 2:59 am

With respect to air, you are wrong. With respect to solids (like rock and metals and liquids like water), you are correct in that density will play a role in the transmission of vibrations and thus the speed of sound. For water think of sonar and submarines.

I am an Aerospace Engineer and took grad classes on fluid mechanics as part of my masters degree. The standard atmosphere and the speed of sound equation are things that are in every one of my fluid mechanics text books.

There are many phenomenons out there in aviation and things that are difficult to predict and understand, but the speed of sound and in particular the Standard Atmospheric model has been around for a long time and is a well established fact. The original standard atmosphere model comes from data taken in 1958 and has been updated several times between then and 1976. If you think about the type of advances that were happening in Aviation during that time, the speed of sound is a major component (higher, faster, further).
Check out my website YSDecaff for all my tutorials and addon releases.
Visit by Bitbucket page for Python codes: https://bitbucket.org/decaff42/

Server Flight Log
Addon Database Submit Addon To Database

User avatar
bernholm
Veteran
Veteran
Posts: 734
Joined: Sun Dec 04, 2011 6:28 am
Favorite Aircraft: 777-9X
Location: Middle of Nowhere, Connecticut
OS: 10.9.5
Has thanked: 67 times
Been thanked: 25 times
Contact:

Re: Understanding YSFlight Physics

Post by bernholm » Fri May 20, 2016 1:22 pm

Yeah, I guess. It was probably the oversimplified middle school science class that said "sound travels faster in solids than in liquids and in liquids than in gases because of density." So you have to remember, most of this is me trying to wrap my head around it.

My last post may have been somewhat confusing. I was offering a theory as to why "the atmosphere was like this". It may make it simpler to ignore the first paragraph - I generally understand things better when I say them out loud (or type them out).

I'm not trying to argue that density affects the speed of sound in a gas. In fact, I can see why it wouldn't. Solids and liquids are bonded together, while gases are not, so what affects the speed of sound in a solid or liquid may not do the same in a gas.

Again, this is just me trying to get an understanding of how it works, because everything I've seen about the Standard Atmospheric Model has gone a bit over my head (give it another 2-3 years). I'm not trying to make a point here, if that's how I was coming across - I'm just asking some VERY roundabout questions in a non-question format. :lol:
Image

User avatar
decaff_42
Staff
Staff
Posts: 3565
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 630 times
Been thanked: 1364 times
Contact:

Re: Understanding YSFlight Physics

Post by decaff_42 » Mon Sep 05, 2016 3:33 pm

It's been a while but I've been doing some more experiments. Here I'm doing the zero-fuel auto-pilot slowdowns at 35000ft with different REFACRUS values, looking at the lift coefficient curves.

Image

Lower lift coefficients mean higher speeds!
Image

It appears that changing the REFACRUS value effects the slope of the lift coefficient curves.
Image

These plots were made with python and matplotlib to make them look cleaner than the excel plots seen previously. It takes a bit more work to make them, but I like how they look a lot more! :D
Check out my website YSDecaff for all my tutorials and addon releases.
Visit by Bitbucket page for Python codes: https://bitbucket.org/decaff42/

Server Flight Log
Addon Database Submit Addon To Database

User avatar
megaprime13
Contributor
Contributor
Posts: 289
Joined: Tue Mar 04, 2014 12:00 am
Favorite Aircraft: 737
Location: Lead. You should stay on my wing.
Has thanked: 33 times
Been thanked: 36 times

Re: Understanding YSFlight Physics

Post by megaprime13 » Wed Sep 28, 2016 2:27 am

Interesting how standard rate of turn is not 3 degrees a second, and my 36b does not coincide with time speed distance calcs.

250kn 80 miles should take almost 20 minutes. I went afk and came back 16 minutes later and overshot the VOR by 30 miles, or something outrageous, i dont quite remember.
Copperhead: "I could care less about politics anyways"
Sentinel182 wrote: at the moment im this many years
*middle finger*

User avatar
decaff_42
Staff
Staff
Posts: 3565
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 630 times
Been thanked: 1364 times
Contact:

Re: Understanding YSFlight Physics

Post by decaff_42 » Wed Sep 28, 2016 2:30 am

If you are 250 IAS vs TAS then it is quite easy to overshoot as the IAS will always understate the TAS (see the speed of sound plots). It was one of the main reasons I did that trial, in order to quantify what was going on there.
Check out my website YSDecaff for all my tutorials and addon releases.
Visit by Bitbucket page for Python codes: https://bitbucket.org/decaff42/

Server Flight Log
Addon Database Submit Addon To Database

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest