You’re looking for Bernoulli’s principle, with either assumptions made about the compressibility of your flow (isobaric/isochoric conditions), or use a suitable equation of state to solve for compressibility (Redlich-Kwong, Peng-Robinson, etc.). It’d probably be more cost effective to just buy a proper flow computer than to take the time to try and implement this yourself.