Boundary conditions for 2D navier stokes equation (incompressible, stationary) I am asked to give the boundary conditions for the following duct flow

We are using a cartesian coordinate system. And $u$ and $v$ are the $x$ and $y$ velocities of the flow. $n_i=(n_{ix},n_{iy})$ is the unit normal vector of the inlet area, $n_0=(n_{ox},n_{oy})$ is the unit normal vector for the outlet area and $n_w$ is the unit normal for the walls.

I would guess that the following boundary conditions are necessary:


Boundary conditions on wall: $(u,v)=(0,0)$ at the wall (no-slip + no-through)
Inlet condition:$(u,v) \cdot (n_{ix},n_{iy})$ is given.
Outlet condition: $(u,v) \cdot (n_{ox},n_{oy})$ is given.



  Are my boundary conditions right? I am a little bit confused because
  our solution says $u\cdot n_{ix} +u\cdot n_{iy}$ (inlet), 
  $v\cdot n_{ix} +v\cdot n_{iy}$ (inlet), $u\cdot n_{ox} + u\cdot n_{oy}$
  (outlet) and $v\cdot n_{ox} + v\cdot n_{oy}$ (outlet) need to be
  specified.
One thing we can say for sure is that the boundary conditions as proposed in the question as "our solution" are wrong; I've never seen such a strange application of the inner product anyway.
Another thing that can be said is that the boundary conditions as proposed by the OP are somehow better - that is: inlet and outlet conditions would rather be applicable for irrotational flow, which is a special case of Navier-Stokes - but in general they cannot be deemed correct as well.

With the 2-D Navier-Stokes equations for incompressible &amp; stationary flow, there is an abundance of more or less proper boundary conditions in literature. Some of these are incredibly complicated, so I'd suggest to hunt for the simple ones. More or less by coincidence, I've stumbled upon a decent example for duct flow:

What Are the Navier-Stokes Equations?

The acccompanying picture illustrating the boundary conditions is resemblant to the OP's:



Then the article says: The fluid velocity is specified at the inlet and pressure prescribed at the outlet.
A no-slip boundary condition (i.e., the velocity is set to zero) is specified at the walls.

This means that, at the inlet area, the full velocity vector field must be specified: $(u_i,v_i) = (U,V)$. If there is no reason to assume otherwise, then an uniform velocity field may be imposed.

The pressure condition at the outlet area comes as a slight surprise for me, but I think it's more reasonable than trying to impose a velocity field. The reason is that you will get in trouble while trying to fulfull the global conservation laws for mass and momentum. An extreme example is the outlet velocity field $(u_o,v_o) = (0,0)$ that will suck all mass into nothingness; I can only hope that the CFD code will protest against this, but have the sad experience that too often it will not.If there is no reason to assume otherwise, then an uniform pressure field may be imposed.

Last but not least, the no-slip boundary conditions are commonly assumed to be correct.

If is is assumed in addition that the flow is irrotational, then the no-slip boundary conditions must be replaced by impermeability conditions, of the form $\;(u,v) \cdot (n_{wx},n_{wy}) = 0$ .The boundary conditions as proposed by the OP for the inlet area are entirely correct for such ideal / potential flow, as it is called : $(u,v) \cdot (n_{ix},n_{iy}) = $ given.
Boundary conditions for the outlet area are: velocities parallel to the normal $\,(u,v)\, //\, (n_{ox},n_{oy})$ . Then let the CFD code be good enough to assure that e.g. global mass conservation is guaranteed.
Mr. YouMath
That isnt QUITE what I am saying, but I am grateful that you pushing me to refine my answer. I realize now that the question as posed admits at least three interpretations, as I shall now list, but no interpretation is very satisfying.
That is the reason why I claimed that there was no good answer to the question, but to be convincing it needs some elaboration.

INTERPRETATION ONE
The question is put to a Mathematician (M); Is the problem defined by these equations (E) and these boundary conditions (B) well-posed? It is not, as Han seems to think, to give all B leading to well-posed problems for E, because there could be an unlimited number of them, but it is usual to give a list of common well-posed B (Dirichlet, Neumann, Robin) that we might describe as pre-approved.
I doubt that the question was meant to be so profound.

INTERPRETATION TWO
The question is put to a designer (D).
Among the set of pre-approved B, or perhaps the set of not-yet-approved B, what specific B gives the best representation of the particular question that D wishes to ask, assuming that D knows what that is? (By specific B I mean that, although M may have said "prescribe the normal velocity", there might be some doubt about the actual value to be prescribed. Where do we get it from?) This is subjective, and will almost always involve physical intuition. Best here to take a specific example, one that I know a little about. Suppose that the domain represents the inlet region 
of a jet engine. The inflow represents external air drawn in from the outside air. Probably that flow is uniform "at infinity", and its passage into the inlet is essentially inviscid, so D will know its Bernouilli constant and that it is irrotational. That does not determine it completely, although almost surely the inflow will not be uniform. D could guess the velocity components consistent with the information they have, or D could couple their calculations with an external calculation (say of potential flow, as opposed to NS internally)

At outlet, the rest of the universe consists of a jet engine. Obviously D has already decided not to include the details of this. Experience has shown that the most important aspect of the engine is to impose the static pressure at outlet, although M would surely approve of other choices.
But then, what should the imposed static pressure be? The question does not allow for any discussion of these issues, so this cannot be the intended interpretation.

The specfic question here is likely to be what shape of the duct leading from inlet to engine provides the engine with the most uniform inflow? Because that was the condition assumed by the engine designer. There are bonus points for a short duct that will weigh less. Because the flow is subsonic, altering the duct shape will alter the flow at inlet although not at infinity. This is the sense in which you need to know the solution before you know the boundary conditions. You may know the SORT OF B that can be used, but not the actual values. Ways out; do a bigger calculation, iterate, divide the universe into different bits.

INTERPRETATION THREE. The question is put to the code-writer (W). At a boundary of any kind, the numerical procedure used to predict the flow elsewhere will fail, because information about the flow variables is not now available from all directions. We then speak of a boundary procedure. Just as not every method for the interior flow is accurate or stable, so not every boundary procedure is accurate or stable. It will depend on the boundary condition that we wish to impose, and on the interior method. It is the task of the algorithm designer (A) to investigate this, perhaps to publish the results. The code writer (W) must understand the conclusions and make choices that are consistent with them. This should be discussed in the users manual, perhaps to describe limitations or perhaps to point out various options. If it isn't, or if you don't understand the discussion, consult the help desk (H), but of course you do not ask them about interpretation one. A reputable software company will work with you to resolve any difficulties if your particular case is not already covered.