This is a Sino-Danish collaboration project funded by DSF. The objective of the project is to develop numerical tools to simulate wind turbine flows in complex terrain, and optimize and control wind turbines in complex terrain.