The yield of greenhouse crops is affected by a variety of climatic factors, including temperature, humidity, and wind speed. Among them, suitable temperature and wind speed are crucial for plant growth. In this paper, a mathematical model is established to optimize the greenhouse fan, so that it can obtain the appropriate wind speed and temperature, and improve its uniformity, which solves the important problems in the current design of glass greenhouse.