1/ You need to set deacivate the periodicity in the flow direction like..
cGeometry->setPeriodicity( true, true ); -> cGeometry->setPeriodicity( true, false);
2/ Set a new material number for the inflow and one for the outflow region (as indicated in e.g. cylinder2d example)
3/ Add a boundary condition for the inflow (as indicated in e.g. cylinder2d example)
4/ Add a boundary condition for the outlow (as indicated in e.g. cylinder2d example)
5/ Define the boundary values for the inflow and outflow materials (as indicated in e.g. cylinder2d example)