You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Great catch by @ngomezve "the squasher of 🐞s"! He noticed a bug in the off-design calculation where the problem is over-constrained. This bug has been there since when woper.jl was translated from FORTRAN (started in this commit here).
The original FORTRAN code actually does not take in user specified altitudes for the off-design missions, but scales the cruise altitude based on the weight of the aircraft:
c---- scale initial cruise altitude by p ~ W
ip = ipcruise1
altkm = para(iaalt,ip)/1000.0
p0new = pared(iep0,ip) * para(iafracW,ip)/parad(iafracW,ip)
call pralt(p0new,gee, altkm, T0,p0,rho0,a0,mu0)
We can't be setting CL, Ma, wing geometry and cruise altitude all to specified values and still have L = W.
Two options exist -
First if you are running a single off-design mission:
Option 1: allow user to specify the altitude of the start of cruise and calculate the CL that is appropriate. In general that is not very robust since it means for every new aircraft being designed the user should be able to specify what altitude the off-des missions are going to start at.
Option 2: Don't let the user specify the cruise start altitudes for off-design missions, let the CL at start of cruise be the design CL and find the right cruise altitude similar to the scaling above (pralt is the inverse calculation to get the altitude given the pressure above). In general this is likely to work better because you're asking the aircraft to start at a similar aerodynamic state and asking it to figure out how to get there. This breaks down when the off-design missions vary substantially from the design mission.
If you are optimizing the aircraft design along with a handful of off-design missions then both options above are similar since you can pass control of the altitude or CL to the optimizer as an optimization variable.
The text was updated successfully, but these errors were encountered:
Great catch by @ngomezve "the squasher of 🐞s"! He noticed a bug in the off-design calculation where the problem is over-constrained. This bug has been there since when
woper.jl
was translated from FORTRAN (started in this commit here).The original FORTRAN code actually does not take in user specified altitudes for the off-design missions, but scales the cruise altitude based on the weight of the aircraft:
We can't be setting CL, Ma, wing geometry and cruise altitude all to specified values and still have L = W.
Two options exist -
First if you are running a single off-design mission:
Option 1: allow user to specify the altitude of the start of cruise and calculate the CL that is appropriate. In general that is not very robust since it means for every new aircraft being designed the user should be able to specify what altitude the off-des missions are going to start at.
Option 2: Don't let the user specify the cruise start altitudes for off-design missions, let the CL at start of cruise be the design CL and find the right cruise altitude similar to the scaling above (
pralt
is the inverse calculation to get the altitude given the pressure above). In general this is likely to work better because you're asking the aircraft to start at a similar aerodynamic state and asking it to figure out how to get there. This breaks down when the off-design missions vary substantially from the design mission.If you are optimizing the aircraft design along with a handful of off-design missions then both options above are similar since you can pass control of the altitude or CL to the optimizer as an optimization variable.
The text was updated successfully, but these errors were encountered: