How does an electromagnetic flowmeter measure corrosive media?