SDK Question How do I update airfoil parameters every time step?

DerNerf

New member
Joined
Mar 21, 2019
Messages
14
Reaction score
0
Points
0
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 ;)
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,638
Reaction score
2,354
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
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.
 

DerNerf

New member
Joined
Mar 21, 2019
Messages
14
Reaction score
0
Points
0
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?
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,638
Reaction score
2,354
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
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 ----------

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.
 

DerNerf

New member
Joined
Mar 21, 2019
Messages
14
Reaction score
0
Points
0
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.
 

martins

Orbiter Founder
Orbiter Founder
Joined
Mar 31, 2008
Messages
2,448
Reaction score
462
Points
83
Website
orbit.medphys.ucl.ac.uk
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?
 

DerNerf

New member
Joined
Mar 21, 2019
Messages
14
Reaction score
0
Points
0
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 :)
 

martins

Orbiter Founder
Orbiter Founder
Joined
Mar 31, 2008
Messages
2,448
Reaction score
462
Points
83
Website
orbit.medphys.ucl.ac.uk
Good to hear that Orbiter is still going strong there. Say hi to Manuel, Andreas and Valerie if they are still around :thumbup:
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,638
Reaction score
2,354
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
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.
 
Top