You want to set the flow speed in the duct?
The inlet/outlet boundaries CANNOT have cells on both sides. So, the duct either needs a fan boundary, FIX/source cell zone conditions or to be a void. For the latter the ends are then, by definition, on the outside as there is a hole where the duct ought to be.
What purpose is served by modelling the flow inside the duct?