Don't use outflow, it's an obsolete option and really should be removed from the GUI. Pressure outlet is the correct choice.
Best guess with the reverse flow is you got a negative in the wrong place in the Expression or UDF. If you initialise from the inlet which way do the velocity vectors point?