How to impose average velocity inlet condition?

Then you can easily compute what the magnitude of u should be, as you can compute the area of the inlet, and then compute the magnitude in the normal direction. In turn, you can either explicitly build the expression (if the normal direction is known analytically), or use