Controlled Liquid Simulation

I am trying to create a simulation of water flowing through a pipe and I want the simulated liquid
to react to lets say pressure, movement of the pipe e.t.c I would welcome any pointers on how to
achieve this, from either initial modelling setup in 3dsmax or the final code physics interaction in
unreal engine 4

You and me both, Physx Flex seems the only solution to this and I only have a couple years of experience with UE4.