The behavior of this expansion process is largely dictated by pressure--both the pressure of the exhaust itself as well as the pressure of the external environment into which it exhausts. Of greatest concern is to design the shape and length of the nozzle so that it converts as much of that thermal energy into thrust as possible. In an ideal nozzle that optimizes performance, the exit pressure (Pexit) will be equal to the ambient pressure of the external atmosphere (Pฅ). The flow in this case is perfectly expanded inside the nozzle and maximizes thrust.