// Exhaust Outlets 

function ExhaustOutlet(q, x, a){
	this.q = q; // volume flow
	this.x = x; // distance from outlet
	this.a = a; // area 
}

ExhaustOutlet.prototype.velocity = function(){
	var v;
	if (this.a == 0) { 
		// smaller outlet
		v = this.q / (4 * Math.PI * Math.pow(this.x,2));
	} else { 
		// larger outlet
		v = this.q / (this.a * 1 + 10 * Math.pow(this.x,2));
	}
	return v;
}

ExhaustOutlet.prototype.inputString = function(){
	return this.q + " " + this.x + " " + this.a;
}

// Copyright engineeringtoolbox.com