convexengineering / SPaircraft

Models for commercial aircraft design
http://spaircraft.readthedocs.org
25 stars 17 forks source link

Improving x_wing surrogate #16

Closed 1ozturkbe closed 7 years ago

1ozturkbe commented 7 years ago

I noticed some issues in the constraints that describe the CG and AC locations, and relate them to each other. It seems that the constraints are on the verge of being infeasible. I'm looking at commit 8fa3260, within D8_HT_simple_profile.py. There are some substitutions, where x_w is 19*units('m'):

                cruise['x_{CG}'] == 15*units('m'),
                climb['x_{CG}'] == 15*units('m'),
                cruise['x_{AC}'] == aircraft.wing['x_w'],
                climb['x_{AC}'] == aircraft.wing['x_w'],

Then it says that xAC and xCG are related through a dxw term. These constraints are added:

                TCS([climb['x_{AC}'] <= climb['x_{CG}'] + climb['\\Delta x_w'] ]),
                TCS([cruise['x_{AC}'] <= cruise['x_{CG}'] + cruise['\\Delta x_w'] ]),
                TCS([aircraft.wing['x_w'] >= cruise['x_{CG}'] + cruise['\\Delta x_w']]), (9)
                TCS([aircraft.wing['x_w'] >= climb['x_{CG}'] + climb['\\Delta x_w']]), (10)

This pretty much sets xAC == xCG + Delta x_w in a very long-winded way. This is problematic because if there is an external forcing on xCG (which there is in the larger d8 model), it will go infeasible. It currently works within d8_ht because the only value that Delta x_w can be is 4 for this set of equations to be feasible.
I think the solution is a better formulation for xAC, and the removal of the Delta x_w variable which serves no purpose other than to make the model near-infeasible.

mayork commented 7 years ago

yeah i think you're right on the better formulation. did you have any ideas?

1ozturkbe commented 7 years ago

No, but I realized with our current assumptions that substitutions has to be true, because we assume that the moment coefficient around the quarter chord cmw == 1.0, which means necessarily that x_wing == xAC :P I think we can instead remove the dxw variable.

mayork commented 7 years ago

hmm okay we should meet up and discuss this

1ozturkbe commented 7 years ago

sounds good. I am in my office running sweeps right now if you'd like to swing by.

1ozturkbe commented 7 years ago

As of c002a5e, we use x_{wing} as a surrogate for both the aerodynamic center of the aircraft, and the center of gravity of the wing. In a future version (once we have started enhancing the TASOPT models), we should calculate the CG and the AC separately.

mayork commented 7 years ago

for what it's worth TASOPT does separately compute the neutral point

1ozturkbe commented 7 years ago

Want to make a note that we have made significant improvements to x_wing in the last month. The wing location has now been 'split' into multiple variables: x_wing + xNP +dxACwing -> estimated xAC of the aircraft. dxACwing -> area centroid of wing (used for calculating fuel CG and also lift center) x_wing -> x-location of root chord quarter chord xNP -> neutral point x-distance estimate from wing lift center using Drela's approximations. These give a much better estimate for the xAC.

1ozturkbe commented 7 years ago

I'm convinced that this is no longer an issue, since our designs are insensitive to the 'lumping' that we have been doing. Closing.