Hi all,
I am trying to implement a takeoff segment in my mission but am being faced with a few errors. I apologize in advance for the length of this message and appreciate your time spent assessing my issue.
I have approached this in two ways:
1) I use the "Takeoff.py" segment definition. This does complete, although the results are non-sensical, along with the fact that the iterations do not converge. For showcase purposes, I have only added two segments to the mission here: 'takeoff' and 'climb_1'. A big problem I cannot figure out how to fix is that there seems to be a disconnect between the 'takeoff' and 'climb 1' segments. There is continuity (for lack of a better word) between other mission segment sequences when I define those - climb followed by cruise, for example. Further, TOW is not what I have specified (80 kg) - a guess could be that the value is seemingly being overwritten in an attempt to converge to a solution (see weight output below). Without the takeoff segment, the mission starts with the specified TOW. It seems all outputs are varying in an attempt to find a solution, but I am not sure what the initial trigger is. Last thing I wanted to bring up here for 'Takeoff.py' is that there is no option to specify altitude - I could add that option, but haven't yet tried as it could introduce additional problems and I feel there are potentially more fundamental issues in my setup which I need to fix first.
Below are two of the charts which are produced and highlight the issue(s) I am facing:
2) I use the "Ground.py" script from the same folder as the "Takeoff.py" script from above. It does not complete. I am having trouble discerning if there is actually a fundamental difference in output between the two scripts, although "Ground.py" approaches the problem in a more elaborate manner, to my understanding. Either way, this produces a different set of issues, namely, when it gets to the "solve residuals" step.
The first issue is: segment.state.forces.residuals does not exist. I did a quick fix by adding a data structure in the "Common.py" script. The initial error and subsequent fix are shown below:
This then leads to the next problem: unknowns.time is non-existent. I "fixed" this by adding it in the mission definition. See the error and subsequent fix below:
Finally, this leads to a problem I cannot solve, that being the mismatch in array length where zero elements are added to the velocity array (the amount of zeros added are double the specified number of control points -1. I cannot figure out from where or why). See error and velocity array below:
For added context, I have defined the vehicle parametrically, but also call on CFD results to produce the aero map (see map below). It does not cover a large range of AoA, so potentially that could lead to some underlying issues, but for takeoff, this shouldn't be an issue in my mind.
I am not sure if I am missing setup parameters in my mission profile that could fix my issues from a lower level. I fear that I am adding fixes to "bugs" that are a result of improper mission definition and these "bugs" would not appear otherwise.
I hope I have done a decent job at describing my problem. Again, I know its a long description and I thank you for spending the time to look into this. If you require me to provide more details, I am happy to do so!
Cheers,
Sebastian