Thank you very much for your reply. I need to use the inlet pressure to obtain the value of the outlet pressure. The UDF is meant to be used as a boundary condition in the outlet, and that's why I need to calculate the inlet pressure this way.

I do not understand what reduction means, could you please explain or direct me to other material?