Orbiter-Forum  

Go Back   Orbiter-Forum > Orbiter Space Flight Simulator > Orbiter SDK
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Orbiter SDK Orbiter software developers post your questions and answers about the SDK, the API interface, LUA, meshing, etc.

Reply
 
Thread Tools
Old 03-21-2019, 03:17 PM   #1
DerNerf
Orbinaut
Question Questions about the functionality of airfoils

Hello Everyone,

I'm currently working on the soyuz spacecraft for a reentry simulation and have a few questions about the way airfoils work. I've already read this Forum Post: https://www.orbiter-forum.com/showthread.php?t=38047 about how to programm lift generating capsule and the use of airfoils.

I still have a few questions about the basic functionality of airfoils though.
I use the CreatAirfoil2 function to create the needed airfoils when the Soyuz is created (in the clbkSetClassCaps function). There I use a callback function which gives me the airodynamic coefficients.
These are obviously dependant on the flight parameters, such as Angle of Attack and Mach number. However, as far as I understand, the airfoils are not part of the Orbiter update loop. Thus the question: Do the airfoils update themselfes and their Airodynamic properties? From my understanding they have to, to calculate changes of Lift/Drag due to changing Aerodynamic Coefficients.

Furthermore I wanted to ask, if it is possible to change/update the Center of Pressure as the simulation goes as it is part of the creation of the airfoils. For the Soyuz the Trim angle of attack changes over the course of the reentry and as far as I understand, I would have to model that by moving the Center of Pressure along the axis of symmtery during simulation.

If that is possible, then I'd like to know, if it is also possible to update the orientation of the airfoils mid flight. This way, I could use only one airfoil that turns with capsules bank angle and wouldn't need separated horizontal and vertical airfoils.

Thanks in advance for your time and effort.
DerNerf
DerNerf is offline   Reply With Quote
Old 03-22-2019, 11:56 AM   #2
BrianJ
thing
Default

Quote:
Originally Posted by DerNerf View Post
 Do the airfoils update themselfes and their Airodynamic properties?
Hi,
as far as my understanding goes, the airfoils will apply the lift/drag/torque that you have specified in the coefficient callback function, at each simulation step.



Quote:
Originally Posted by DerNerf View Post
 Furthermore I wanted to ask, if it is possible to change/update the Center of Pressure as the simulation goes as it is part of the creation of the airfoils.
Yes, you can change the CoP and other airfoil parameters by using the EditAirfoil(...) function.



Quote:
Originally Posted by DerNerf View Post
 If that is possible, then I'd like to know, if it is also possible to update the orientation of the airfoils mid flight.
No, the orientation is fixed as either VERTICAL or HORIZONTAL.


That's my understanding, but MartinS could tell you for sure.


Cheers,
Brian
BrianJ is offline   Reply With Quote
Old 03-22-2019, 12:57 PM   #3
Urwumpe
Certain Super User
 
Urwumpe's Avatar

Default

Quote:
Originally Posted by BrianJ View Post
 Yes, you can change the CoP and other airfoil parameters by using the EditAirfoil(...) function.
Or by using the cm parameter in case of the CoP.
Urwumpe is offline   Reply With Quote
Old 03-22-2019, 03:19 PM   #4
martins
Orbiter Founder
Default

Quote:
Originally Posted by DerNerf View Post
 I still have a few questions about the basic functionality of airfoils though.
I use the CreatAirfoil2 function to create the needed airfoils when the Soyuz is created (in the clbkSetClassCaps function). There I use a callback function which gives me the airodynamic coefficients.
These are obviously dependant on the flight parameters, such as Angle of Attack and Mach number. However, as far as I understand, the airfoils are not part of the Orbiter update loop. Thus the question: Do the airfoils update themselfes and their Airodynamic properties? From my understanding they have to, to calculate changes of Lift/Drag due to changing Aerodynamic Coefficients.
I think this may be a misunderstanding of how the lift/drag callback functions work. The airfoils are part of the update loop, but the parameters are not updated by orbiter, but by your code. This is the purpose of the callback functions: Orbiter calls them at each frame to query the current lift and drag coefficients. Orbiter then applies them to update the aerodynamic vessel forces.

Orbiter provides a few relevant parameters for the calculation (AOA, Mach number, Reynolds number) as input to the callback function, but you can retrieve any other required values via the vessel API or directly from your module.

Quote:
Originally Posted by BrianJ
 That's my understanding, but MartinS could tell you for sure.
Couldn't have put it better myself
martins is offline   Reply With Quote
Old 03-24-2019, 04:10 PM   #5
DerNerf
Orbinaut
Default

First of all thanks for all the reply's

Quote:
Originally Posted by martins View Post
 I think this may be a misunderstanding of how the lift/drag callback functions work. The airfoils are part of the update loop, but the parameters are not updated by orbiter, but by your code. This is the purpose of the callback functions: Orbiter calls them at each frame to query the current lift and drag coefficients. Orbiter then applies them to update the aerodynamic vessel forces.

Orbiter provides a few relevant parameters for the calculation (AOA, Mach number, Reynolds number) as input to the callback function, but you can retrieve any other required values via the vessel API or directly from your module
Thanks for the clarification. I suspected it to work that way but couldn't find it in the API_Reference file. I'm still kinda new to the whole C++ thing.
One more thing: In the API Guide the Lift and Drag Coefficients are defined as:

cl = L/q*S and cd = D/q*S

with q being the dynamic pressure and S the wing area. Do the airfoils also work with this formula to calculate the Lift and Drag they produce? And do I get it right, that everything else (like the projected area perpendicular to the inflow velocity which would be needed for the Drag calculation) is part of the coefficients.
I'm sorry if this is a stupid question but I seem to find different Equations for Lift and Drag calculations wherever I look.

Concerning the CoP: If I want to update it with every Simulation step, would I have to put the EditAirfoil(...) function inside the clbkPre/PostStep function? And can I give EditAirfoil(...) a callback function for the CoP or would I have to simply put a CoP calculating function in front of the EditAirfoil(...) inside the clbkPre/PostStep function?

Once again thanks in advance for all your time and effort, it helps me very much.

Kind regards,
DerNerf
DerNerf is offline   Reply With Quote
Reply

  Orbiter-Forum > Orbiter Space Flight Simulator > Orbiter SDK

Tags
airfoil, orbitersdk, reentry, sdk


Thread Tools

Posting Rules
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


All times are GMT. The time now is 12:41 AM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Copyright 2007 - 2017, Orbiter-Forum.com. All rights reserved.