Direction of water through a pipe I was recently asked this following interesting question:

How can you find what is the direction of the water flow inside a horizontal pipe, given the pipe is not transparent?


*

*You can assume the pipe is metallic, but I would also love to hear solutions that don't assume that (if there exist any).

*You cannot see the start or the end of the pipe, and you can't pour anything inside.

*I am familiar with the heating solution, so I would appreciate any other solution.

*Is there a way to do this with magnets? If so, how? This essentially was my first thought, but I didn't actually think it through because I'm not really sure what is going to happen there.

 A: Tape a microphone to the pipe near one end and tap on the pipe near the other end with a hammer, rock, etc. Record the sound detected by the mic. Then switch the mic and hammer ends and record again. The recorded audio should have both the sound that travels through the pipe and the sound that travels through the water, with a delay between because sound travels faster in most metals than it does in water. That delay should be longer when the sound travels against the flow than when it travels with the flow, because of course it travels through more water in the first case. The sound should also be shifted higher when traveling against the flow and lower when traveling with, since the moving water will compress or stretch out the sound waves.
A: Pressure drop is the driving force for fluid flow.  For rigid pipe, if you can measure the pressure at two different horizontal points, the flow direction will be from higher pressure to lower pressure.  For elevation changes, you will have to factor in the pressure difference between the two measuring points due to the elevation change, which is $\rho g \Delta h$.
A: Maybe this is what you mean by "I am familiar with the heating solution, so I would appreciate any other solution", but I'll float this anyhow since you didn't specify what that means.
Measure the temperature of the pipe at 2 different points.
Assume a perfectly fabricated pipe (all the walls are exactly the same thickness & density).  Ideally the pipe is made of a material with high thermal conductivity such as copper.
Make the room you're in considerably colder (or warmer) than the pipe.
As the water passes, it will lose heat to the room in a cold room (or gain it if you chose to make the room hot).
This will make any 2 points on the pipe have a slight temperature difference.   In a cold room, the point with higher temperature would be the direction the water is coming from.
A: You can definitely do it with magnets -- at least if the pipe is nonmetallic -- although I don't know a cheap or simple way. But it would be similar to the technique used for imaging blood flow in an MRI. You surround a section of the pipe with a strong magnet, which aligns the spins in the hydrogen nuclei, then detect the oriented spins as they flow to one side or the other. I'm not sure how difficult or expensive the detection could be, if all you need to know is left vs right; the detection methods used in MRI, to produce an image, are very tricky and expensive, but might be overkill here.
As suggested in the comments by Christopher James Huff, you could start with the design of a proton precession magnetometer:
http://ilotresor.com/build-a-proton-precession-magnetometer/
It looks like the detection method here is a simple coil and audio amplifier; in the Earth's weak magnetic field, the protons will "sing" as they precess at a frequency around 2kHz, well within the audio range, as they relax from the stronger magnetic field used to align them.
A: If you are allowed to spin the pipe, you can use the Coriolis effect.
https://en.wikipedia.org/wiki/Mass_flow_meter
You would need to create a loop and rotate it. Then observe the twist in the loop as it rotates. Fluid direction will affect the twist direction.
A: Simple and brutal... cut a piece out of the pipe so there is a gap between the ends and see which end the liquid carries on flowing from. The question doesn't ask that the pipe network stays functional and this solution requires minimum tools (a saw or a pipe cutter would be enough) and will work on any pipe type and any liquid type. Though it might get messy and you'd better  hope it's not a pipe carrying sulphuric acid or the floor might get damaged. And if it's a gas rather than a liquid you might need some streamers to show the gas flow.
A: You could probably use ultrasound, as is done for measuring the speed of blood in arteries. I say 'probably' because there mustn't be too large a discrepancy between acoustic impedances of the pipe wall and the liquid. Here are the details...
Applying acoustic coupling gel, you fix a piezo-electric ultrasound transmitter-receiver to the pipe, so that it sends a beam of ultrasound of frequency $f_0$ almost parallel to the pipe but directed slightly into the pipe. Thus the beam penetrates the pipe wall and hits the flowing liquid at a glancing angle.
Some of the ultrasound is reflected off the liquid, comes out through the pipe wall and returns to the receiver. If the liquid is moving at speed $v$ in a direction away from the transmitter-receiver the liquid is both a moving receiver and a moving emitter, so the frequency of the ultrasound arriving back is shifted by an approximate amount
$$\Delta f = -f_0 \frac {2v} {v_s}$$
in which $v_s$ is the speed of sound in the liquid.
So if the liquid is moving in the same direction as the outgoing ultrasound beam, there is a drop in the received frequency compared with the frequency sent out. If the liquid is moving in the other direction, the received frequency will be larger.
A: A standard technique (https://en.wikipedia.org/wiki/Ultrasonic_flow_meter):
Place two ultrasound transducers along the pipe (a few centimetres is OK) and measure the propagation time of signals in both directions. From the difference, you can determine the speed of the medium. (This is slightly different from Philipp Wood's method which uses the Doppler shift.)
This technique was applied in my former flat to measure the flow rate of hot water for the radiators - together with a temperature measurement, you can detrmine the flow of thermal energy.
(See also Figure.1 here :https://www.edn.com/the-evolution-of-ultrasonic-technology-for-smarter-flow-measurement/)
A: If the pipe weren't made out of metal, but instead some deformable plastic, you could scrunch up some point in the tube (i.e. make a knot such that water can't get through), and then you can feel which side has more pressure. If the left side were firmer, then the water would be flowing from left to right, but if the right side were firmer, then water would be flowing from right to left.
A: One method that hasn't been mentioned, based on this observation: In some houses you can hear the piping knocking when you turn off the water abruptly - this is because somewhere the pipes are able to move a little, just enough to knock against something.
So, if you pipe is able to move a bit, you could try to use this effect, by running the water and then turn it off quickly - the pipe should then move, briefly, in the direction of the water flow. This may be easier to observe by touching the pipe with a finger.
A: The engeneer's answer:
1> cut the pipe
2> install a (fluid)meter
3> reconnect the pipe
4> read the meter
5> Wait some time
6> read the meter again
If Read(T0) < Read(T1) the flow is the same as the meter's in->out
If Read(T0) > Read(T1) the flow is opposite to the meter's in->out
If Read(T0) = Read(T1) there is no flow
A: The easiest way I can think of is to heat/cool the middle of the pipe, then you can tell which direction the water is flowing by feeling which end of the pipe is warming/cooling.
