I'm coding a flight dynamics simulation, but my simulation runs into a problem with negative angles of attack. Once alpha is negative, it is impossible to get back to a state where the plane is generating positive vertical velocity.
At the start of each frame of the simulation we have some forward velocity ($u$) and vertical velocity ($w$), and at the end of each frame we calculate new values for $u$ and $w$. To keep things simple, assume the plane generates 0 lift at 0 alpha, we're always in level flight with no change to pitch or roll, and the pilot only makes changes to $u$ with the throttle.
If $u$ decreases enough that we generate less lift force than gravity, $w$ becomes negative and the plane begins to descend. The usual formula for angle of attack ($𝛼$) is a function of $u$ and $w$:
$𝛼 = arctan(w / u)$
This means a negative $w$ and positive $u$ will always give a negative $𝛼$.
I calculate lift with this equation (simplified. $q$ is dynamic pressure):
$L = 2π * 𝛼 * q$
This means a negative $𝛼$ will always give negative lift.
And finally, the next frame's $w$ is just a function of lift and gravity (in level flight):
$w_{next} = w + L / mass - g$
So it is possible to have positive $𝛼$ and lift but end up with a negative $w$ due to gravity.
If a frame of my simulation ends with negative $w$, the simulation is put in a state where it is impossible to ever return to positive $𝛼$, because negative $w$ always gives negative $𝛼$. Negative $𝛼$ always gives negative $L$. And negative $L$ always gives negative $w_{next}$ Negative $w_{next}$ always gives negative $𝛼$ on the next frame.
Increasing $u$ eventually should return me to positive $L$ and $w$ as $q$ increases, but doesn't - it only generates more negative lift. What factors am I missing to be able to get back to positive $w$ with just an increase in $u$?