An optimization procedure is devised to find the inlet velocity profile that yields as uniform an epitaxial layer as possible in a vertical MOCVD reactor. It involves the solution of fully elliptic equations of motion, temperature, and concentration; the process is highly nonlinear and has been efficiently treated by breaking it into a series of linear problems. The optimal profile approximated by a 6th-degree Chebyshev polynomial is very successful in reducing the spatial non-uniformity of the growth rate. The optimization is particularly effective when the Reynolds number is high and the inlet-to-wafer distance becomes large. It is also found that a properly constructed inlet velocity profile can suppress the buoyancy driven secondary flow and improve the growth-rate uniformity. (C) 1999 Elsevier Science Ltd. All rights reserved.