A New Intelligent Ultrasonic Flowmeter for Closed Conduits and Open Channels