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-29-2019, 12:15 PM   #1
DerNerf
Orbinaut
Default How do I update airfoil parameters every time step?

Hey everyone,

I'm currently working on a lifting caspule Soyuz module.
I have Literature values that state, that the Soyuz flies with a changing trim angle of attack for different Mach numbers.
The Soyuz has a shifted CoG (Cetner of Gravity/Mass) and I set the CoP (Center of Pressure) in a way to achieve a sepcific angle of attack (currently 17,5). For Lift/drag calculations I have 2 airfoils defined, one for vertical and one for horizontal lift, as recommended in the API Guide.

There are two troubles here though:
First: The Soyuz doesn't keep the given AoA for the whole re-entry phase. That has (from my understanding) to do with the change in the pitch moment coefficient over the range of mach numbers. The data for the pitch moment coefficient is the following:

Code:
/*	Pitch Moment Coefficient 
		for |aoa| = { 0, 5, 10, 15, 20, 25, 30 } deg 
	and for all reference mach numbers.										*/
const double	aero_cm[6][7]	=	{
/* |aoa|	0		5		10		15		20		25		30		deg*/
	{		-0.0300,	-0.0200,	-0.0100,	+0.0035,	+0.0153,	+0.0247,	+0.0318	},	// Ma = 0.60
	{		-0.0359,	-0.0241,	-0.0141,	-0.0059,	+0.0012,	+0.00711,	+0.0094	},	// Ma = 0.95
	{		-0.0388,	-0.0282,	-0.0188,	-0.0094,	-0.0012,	+0.0053,	+0.0082	},	// Ma = 1.10
	{		-0.0447,	-0.0400,	-0.0300,	-0.0176,	-0.0041,	+0.0082,	+0.0112	},	// Ma = 1.78
	{		-0.0500,	-0.0412,	-0.0300,	-0.0176,	-0.0041,	+0.0082,	+0.0112	},	// Ma = 2.52
	{		-0.0535,	-0.0435,	-0.0329,	-0.0224,	-0.0118,	+0.0000,	+0.0100	}	// Ma = 5.96
};
The actual coefficient is then interpolated for the current speed and angle of attack.

Secondly: I give the initial CoP to the airfoil via the creatAirfoil2 function. And I know that I can Change Airfoils via the EditAirfoil function. However, to me, that seems to be one time action (to use for example for separation or damage to structure that "contains" an airfoil). I want to update the CoP with every time step though.


So, my questions are:

1. Is Setting up the CoP for the airfoils the right/best way to achieve a trimmed angle of attack != 0?

2. Is my assumption that the AoA changes due to the changing pitch moment coefficient correct?

3. How do I update the CoP with every time step? Can I put the EditAirfoil function in the clbkPostStep to have it as part of the update loop? Are there better/easier options?

Thanks in advance for your time and effort

PS: I'm an aerospace engineering student, so I do have basic knowledge of aerodynamics and space stuff
DerNerf is offline   Reply With Quote
Old 03-29-2019, 12:48 PM   #2
Urwumpe
Certain Super User
 
Urwumpe's Avatar

Default

Not sure if you really need to update the parameters. You could also design the coefficients that way, by varying the moment function depending on Mach number. This way, your reference point of the airfoil could be different from the actual CoP.
Urwumpe is online now   Reply With Quote
Old 03-29-2019, 01:33 PM   #3
DerNerf
Orbinaut
Default

The coefficients are taken from literature and I dont know how I would have to change them to achieve that effect. Furthermore this is for my Bachelor Thesis, so I really don't want to mess with given values. Doesn't leave a good Impression.

Isn't there a smoother way for all of this? A Plane's or winged spacecraft's CoP also changes for different angles of attack. How is that realised in Orbiter?
DerNerf is offline   Reply With Quote
Old 03-29-2019, 02:08 PM   #4
Urwumpe
Certain Super User
 
Urwumpe's Avatar

Default

Quote:
Originally Posted by DerNerf View Post
 The coefficients are taken from literature and I dont know how I would have to change them to achieve that effect. Furthermore this is for my Bachelor Thesis, so I really don't want to mess with given values. Doesn't leave a good Impression.
Well, if it is for a bachelor thesis, you should at least know, which exact functions for lift and drag you have. Adapting the functions for implementation is OK, as long as you can document, how you did it then.

What is the focus of the bachelor thesis?

---------- Post added at 15:08 ---------- Previous post was at 15:05 ----------

Quote:
Originally Posted by DerNerf View Post
 Isn't there a smoother way for all of this? A Plane's or winged spacecraft's CoP also changes for different angles of attack. How is that realised in Orbiter?
By the cm output parameter in the respective lift-function. It describes the torque of the airfoil around its reference.
Urwumpe is online now   Reply With Quote
Old 03-29-2019, 03:13 PM   #5
DerNerf
Orbinaut
Default

Ok, I think there is a fundamental understanding issue here from my Side.

I dont know what the Lift or Drag function are. As far as I got it, to achieve lift and drag in Orbiter, I use airfoils. These have certain dimensions, a reference point where the forces act on the vehicle and the Aero Coefficient Callback function. Via the callback function the airfoils get the Coefficients of the current fligth situation with which it can calculate the Lift and Drag via L=q_inf*S*cl and D=q_inf*s*cd.

My Thesis builds upon another Bachelor Thesis that was supposed to implement the Soyuz's automatic reentry system. My University already has a Soyuz model for Orbiter but it was only for orbital missions. Then my predecessor implemented the aerodynamics and a entry controll system for the automated reentry. However, the results showed, that the trajectory was way too steep. And my Thesis is effectively to fix this. From my research I found, that it's mainly a problem of the aerodynamics.

And here I am trying to fix the aerodynamics. And a wrong angle of attack was one of the problems why the capsules trajectory through the atmosphere was too steep.
DerNerf is offline   Reply With Quote
Old 03-29-2019, 03:27 PM   #6
martins
Orbiter Founder
Default

Quote:
Originally Posted by DerNerf View Post
 My Thesis builds upon another Bachelor Thesis that was supposed to implement the Soyuz's automatic reentry system. My University already has a Soyuz model for Orbiter but it was only for orbital missions.
Out of interest (but slightly off-topic ): are you by any chance at the IRS at Uni Stuttgart?
martins is offline   Reply With Quote
Old 03-29-2019, 03:32 PM   #7
DerNerf
Orbinaut
Default

Quote:
Originally Posted by martins View Post
 Out of interest (but slightly off-topic ): are you by any chance at the IRS at Uni Stuttgart?
Yes I am. The Soyuz basis is a model by a Manuel Schmitz and my predecessor also posted on this forum under the Name birdman. You have helped him quite a bit too
DerNerf is offline   Reply With Quote
Thanked by:
Old 03-29-2019, 03:42 PM   #8
martins
Orbiter Founder
Default

Good to hear that Orbiter is still going strong there. Say hi to Manuel, Andreas and Valerie if they are still around
martins is offline   Reply With Quote
Thanked by:
Old 03-29-2019, 03:48 PM   #9
Urwumpe
Certain Super User
 
Urwumpe's Avatar

Default

Quote:
Originally Posted by DerNerf View Post
 I dont know what the Lift or Drag function are. As far as I got it, to achieve lift and drag in Orbiter, I use airfoils.
Yes. And as you can know, those airfoils can have different cross sections, twist and roughness, parameters that you can't describe by aspect ratio or area alone.

So, Orbiter allows to finetune this behavior by the lift and drag functions, which essentially represent the polar plots of the airfoil in C++.

There, Orbiter enters AOA (or beta/slide slip angle for horizontal lift), Mach number and Reynolds number, and expect the function to calculate lift coefficient, drag coefficient and pitching moment coefficient

If you can find it in your universities library, I recommend reading "Flight Mechanics of high performance aircraft" by Nguyen X. Vinh, it was very helpful for me some years ago to understand Orbiter better.
Urwumpe is online now   Reply With Quote
Reply

  Orbiter-Forum > Orbiter Space Flight Simulator > Orbiter 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:08 PM.

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.